我与Haiku的第五天:让我们移植一些程序


TL; DR :初学者第一次看到Haiku,试图从Linux世界移植一些程序。



我的第一个Haiku移植程序以hpkg格式打包


最近发现了Haiku,这是出乎意料的出色PC操作系统。
今天,我将学习将新程序传输到此OS。 主要重点是从Linux开发人员的角度描述切换到Haiku的初体验。 毕竟,自从我第一次下载Haiku以来,还没有一个星期过去了,我对此过程中的愚蠢错误深表歉意。


我要实现三个目标:


  • 移植一个简单​​的CLI应用程序
  • 将应用程序从GUI移植到Qt
  • 以后将它们打包成hpkg格式(因为我仍在考虑针对Haiku改编AppDir和AppImage ...)

让我们开始吧。 在文档开发部分以及HaikuPorts Wiki中,我找到了正确的方向。 甚至还有在线PDF书BeOS:移植Unix应用程序
467页-这是从1997年开始! 里面看起来很恐怖,但我希望最好。 开发人员的话令人鼓舞:“很长一段时间,因为BeOS不兼容POSIX,”但是Haiku“大部分时间”已经是这样。


移植一个简单​​的CLI应用程序


首先想到的是移植avrdude应用程序,但事实证明,它已经很久以前完成了


第一次尝试:没什么可看的


我根本无法理解的是,尽管操作系统本身甚至没有1.0版,但应用程序已移植到Haiku已有十多年了


第二次尝试:需要重写


因此,我将使用ptouch-770和CLI来控制在其上打印标签的Brother P-Touch 770打印机。
我在上面打印了各种标签,您可能在上一篇文章中已经看到过。 之前,我用Python用GUI编写了一个小型包装程序(由于它在Gtk +上,因此我必须重写它,这是学习一些东西的一个很好的理由)。



标签打印机Brother P-Touch770。它可以在Haiku下使用吗?


Haiku的软件包管理器了解库和命令,因此,如果在运行configure时收到消息“找不到libintl”,则只需运行pkgman install devel:libintl找到所需的软件包。 类似于pkgman install cmd:rsync 。 好吧等等


除非这不起作用:


 /Haiku/home> git clone https://github.com/probonopd/ptouch-770 Cloning into 'ptouch-770'... remote: Enumerating objects: 134, done. remote: Total 134 (delta 0), reused 0 (delta 0), pack-reused 134 Receiving objects: 100% (134/134), 98.91 KiB | 637.00 KiB/s, done. Resolving deltas: 100% (71/71), done./Haiku/home> cd ptouch-770//Haiku/home/ptouch-770> make gcc -Wall -O2 -c -o ptouch-770-write.o ptouch-770-write.c ptouch-770-write.c:28:10: fatal error: libudev.h: No such file or directory #include <libudev.h> ^~~~~~~~~~~ compilation terminated. Makefile:16: recipe for target 'ptouch-770-write.o' failed make: *** [ptouch-770-write.o] Error 1/Haiku/home/ptouch-770> pkgman install devel:libudev 100% repochecksum-1 [65 bytes] Validating checksum for Haiku...done. 100% repochecksum-1 [64 bytes] Validating checksum for HaikuPorts...done. *** Failed to find a match for "devel:libudev": Name not found/Haiku/home/ptouch-770> pkgman install devel:udev 100% repochecksum-1 [65 bytes] Validating checksum for Haiku...done. 100% repochecksum-1 [64 bytes] Validating checksum for HaikuPorts...done. *** Failed to find a match for "devel:udev": Name not found 

udev可能太满,因此Haiku不存在。 这意味着需要编辑我尝试编译的源代码。
嗯,你不会跳到头上,我什至不知道从哪里开始。


第三次尝试


拥有Haiku tmate会很高兴,然后我会让Haiku开发人员连接到我的终端会话-以防出现问题。 说明非常简单:


 ./autogen.sh ./configure make make install 

看起来不错,为什么不在Haiku上尝试呢?


 /Haiku/home> git clone https://github.com/tmate-io/tmate/Haiku/home> cd tmate//Haiku/home/tmate> ./autogen.sh (...)/Haiku/home/tmate> ./configure (...) checking for libevent... no checking for library containing event_init... no configure: error: "libevent not found"/Haiku/home/tmate> pkgman install devel:libevent (...) The following changes will be made: in system: install package libevent21-2.1.8-2 from repository HaikuPorts install package libevent21_devel-2.1.8-2 from repository HaikuPorts Continue? [yes/no] (yes) : 100% libevent21-2.1.8-2-x86_64.hpkg [965.22 KiB] (...) [system] Done.checking for ncurses... no checking for library containing setupterm... no configure: error: "curses not found"/Haiku/home/tmate> pkgman install devel:libcurses (...) *** Failed to find a match for "devel:libcurses": Name not found/Haiku/home/tmate> pkgman install devel:curses (...) *** Failed to find a match for "devel:curses": Name not found 

在这一步中,我打开HaikuDepot并查找curses
发现了一些东西,这给了我一个更称职的要求的提示:


 /Haiku/home/tmate> pkgman install devel:libncurses (...) 100% ncurses6_devel-6.1-1-x86_64.hpkg [835.62 KiB] (...)./configure (...) checking for msgpack >= 1.1.0... no configure: error: "msgpack >= 1.1.0 not found"/Haiku/home/tmate> pkgman install devel:msgpack (...) *** Failed to find a match for "devel:msgpack": Name not found/Haiku/home/tmate> pkgman install devel:libmsgpack (...) *** Failed to find a match for "devel:libmsgpack": Name not found 

再次前往HaikuDepot,当然找到了devel:msgpack_c_cpp_devel 。 什么样的怪异名字?


 /Haiku/home/tmate> pkgman install devel:msgpack_c_cpp_devel 100% repochecksum-1 [65 bytes] Validating checksum for Haiku...done. 100% repochecksum-1 [64 bytes] Validating checksum for HaikuPorts...done. *** Failed to find a match for "devel:msgpack_c_cpp_devel": Name not found# Why is it not finding it? To hell with the "devel:".../Haiku/home/tmate> pkgman install msgpack_c_cpp_devel (...) The following changes will be made: in system: install package msgpack_c_cpp-3.1.1-1 from repository HaikuPorts install package msgpack_c_cpp_devel-3.1.1-1 from repository HaikuPorts Continue? [yes/no] (yes) : (...)/Haiku/home/tmate> ./configure (...) checking for libssh >= 0.8.4... no configure: error: "libssh >= 0.8.4 not found"/Haiku/home/tmate> pkgman install devel:libssh/Haiku/home/tmate> make (...) In file included from /boot/system/develop/headers/msgpack.h:22, from tmate.h:5, from cfg.c:29: /boot/system/develop/headers/msgpack/vrefbuffer.h:19:8: error: redefinition of struct iovec' struct iovec { ^~~~~ In file included from tmux.h:27, from cfg.c:28: /boot/system/develop/headers/posix/sys/uio.h:12:16: note: originally defined here typedef struct iovec { ^~~~~ Makefile:969: recipe for target 'cfg.o' failed make: *** [cfg.o] Error 1 

在这一步,我意识到,将程序移植到Haiku所需的知识远远超过简单重建所需的知识。
我与友好的Haiku开发人员进行了交谈,结果发现msgpack中存在错误,几分钟后,我在HaikuPorts中看到了补丁。 我个人观察了如何在此处构建固定软件包(buildslave-虚拟机)。



在buildmaster上构建固定的msgpack


同时,将修补程序发送到上游以将Haiku支持添加到msgpack


五分钟后,更新的msgpack已在Haiku上可用:


 /Haiku/home/tmate> pkgman update (...) The following changes will be made: in system: upgrade package msgpack_c_cpp-3.1.1-1 to 3.2.0-2 from repository HaikuPorts upgrade package msgpack_c_cpp_devel-3.1.1-1 to 3.2.0-2 from repository HaikuPorts Continue? [yes/no] (yes) : y 100% msgpack_c_cpp-3.2.0-2-x86_64.hpkg [13.43 KiB] (...) [system] Done. 

出乎意料的好。 我说了吗?


回到原始任务:


 /Haiku/home/tmate> make (...) In file included from tmux.h:40, from tty.c:32: compat.h:266: warning: "AT_FDCWD" redefined #define AT_FDCWD -100 In file included from tty.c:25: /boot/system/develop/headers/posix/fcntl.h:62: note: this is the location of the previous definition #define AT_FDCWD (-1) /* CWD FD for the *at() functions */ tty.c: In function 'tty_init_termios': tty.c:278:48: error: 'IMAXBEL' undeclared (first use in this function); did you mean 'MAXLABEL'? tio.c_iflag &= ~(IXON|IXOFF|ICRNL|INLCR|IGNCR|IMAXBEL|ISTRIP); ^~~~~~~ MAXLABEL tty.c:278:48: note: each undeclared identifier is reported only once for each function it appears in Makefile:969: recipe for target 'tty.o' failed make: *** [tty.o] Error 1 

现在看来,msgpack没有罪恶感。 像这样在IMAXLABEL中评论IMAXLABEL


 tio.c_iflag &= ~(IXON|IXOFF|ICRNL|INLCR|IGNCR|/*IMAXBEL|*/ISTRIP); 

结果:


 osdep-unknown.c: In function 'osdep_get_cwd': osdep-unknown.c:32:19: warning: unused parameter 'fd' [-Wunused-parameter] osdep_get_cwd(int fd) ~~~~^~ make: *** No rule to make target 'compat/forkpty-unknown.c', needed by 'compat/forkpty-unknown.o'. Stop. 

好吧,再次...顺便说一句:


 /Haiku/home/tmate> ./configure | grep -i OPENAT checking for openat... no 

先生 waddlesplash告诉在哪里挖:


 /Haiku/home/tmate> ./configure LDFLAGS="-lbsd" (...)/Haiku/home/tmate> make (...) In file included from tmux.h:40, from window.c:31: compat.h:266: warning: "AT_FDCWD" redefined #define AT_FDCWD -100 In file included from window.c:22: /boot/system/develop/headers/posix/fcntl.h:62: note: this is the location of the previous definition #define AT_FDCWD (-1) /* CWD FD for the *at() functions */ make: *** No rule to make target 'compat/forkpty-unknown.c', needed by 'compat/forkpty-unknown.o'. Stop. 

在这里,我布置了config.log


他们向我解释说,libnetwork中还有其他东西需要在Haiku上使用libresolv。 最有可能需要进一步编辑代码。 我必须考虑...


 find . -type f -exec sed -i -e 's|lresolv|lnetwork|g' {} \; 

永恒的问题:正在发生什么。


 /Haiku/home/tmate> ./configure LDFLAGS="-lbsd" (...)/Haiku/home/tmate> make (...) # Success!# Let's run it:/Haiku/home/tmate> ./tmate runtime_loader: /boot/system/lib/libssh.so.4.7.2: Could not resolve symbol '__stack_chk_guard' resolve symbol "__stack_chk_guard" returned: -2147478780 runtime_loader: /boot/system/lib/libssh.so.4.7.2: Troubles relocating: Symbol not found 

相同,仅在配置文件中。 搜索并找到它 。 如果添加-lssp “有时”有帮助,我尝试:


 /Haiku/home/tmate> ./configure LDFLAGS="-lbsd -lssp" (...)/Haiku/home/tmate> make (...)/Haiku/home/tmate> ./tmate 

哇! 开始了! 但是...


 [tmate] ssh.tmate.io lookup failure. Retrying in 2 seconds (non-recoverable failure in name resolution) 

我将在这里尝试调试文件


 /Haiku/home/tmate> strace -f ./tmate >log 2>&1 

“端口错误ID”已经像like 名片一样。 也许有人想象出什么问题了,以及如何解决? 如果有的话,我将更新本文。 链接到GitHub


将GUI应用程序移植到Qt。


我选择一个简单的QML应用程序。


 /> cd /Haiku/home//Haiku/home> git clone https://github.com/probonopd/QtQuickApp /Haiku/home/QtQuickApp> qmake . /Haiku/home/QtQuickApp> make /Haiku/home/QtQuickApp> ./QtQuickApp # Works! 

真的很简单。 不到一分钟!


使用haikuporter和haikuports在hpkg中打包应用程序。


从哪里开始? 没有简单的文档,我转到irc.freenode.net的#haiku频道,我听到:


  • package命令是创建软件包的低级方法。 在大多数情况下,如“将其放入正确的.hpkg软件包中”部分中所述,PackageInfo就足够了。
  • 我需要做这样的事情
  • 您可以使用hpkg-creator (崩溃, 错误报告

目前尚不清楚该怎么办。 我想我需要一个“ Hello World!”风格的初学者指南,最好是一个视频。 像在GNU hello中所做的那样,对HaikuPorter进行方便的介绍将是很好的。


我阅读以下内容:


haikuporter是用于为Haiku创建共享批处理项目的工具。 它使用HaikuPorts存储库作为所有软件包的基础。 要创建软件包,将使用haikuporter配方。

另外,我发现:


HaikuPorts保管库中无需保留配方。 您可以创建另一个存储库,在其中添加配方,然后将haikuporter指向该存储库。

这正是我需要的-如果您不希望公开发布该程序包。 但这是另一篇文章的主题。


安装haikuporter和haikuports


 cd /boot/home/ git clone https://github.com/haikuports/haikuporter --depth=50 git clone https://github.com/haikuports/haikuports --depth=50 ln -s /boot/home/haikuporter/haikuporter /boot/home/config/non-packaged/bin/ # make it runnable from anywhere cd haikuporter cp haikuports-sample.conf /boot/home/config/settings/haikuports.conf sed -i -e 's|/mydisk/haikuports|/boot/home/haikuports|g' /boot/home/config/settings/haikuports.conf 

写食谱


 SUMMARY="Demo QtQuick application" DESCRIPTION="QtQuickApp is a demo QtQuick application for testing Haiku porting and packaging" HOMEPAGE="https://github.com/probonopd/QtQuickApp" COPYRIGHT="None" LICENSE="MIT" REVISION="1" SOURCE_URI="https://github.com/probonopd/QtQuickApp.git" #PATCHES="" ARCHITECTURES="x86_64" PROVIDES=" QtQuickApp = $portVersion " REQUIRES=" haiku " BUILD_REQUIRES=" haiku_devel cmd:qmake "BUILD() { qmake . make $jobArgs }INSTALL() { make install } 

配方组装


QtQuickApp-1.0.recipe文件QtQuickApp-1.0.recipeQtQuickApp-1.0.recipe ,然后运行aikuporter -S ./QuickApp-1.0.recipe 。 检查haikuports存储库中所有软件包的依赖关系,这需要一些时间。 我去喝杯咖啡。


为什么要在我的本地计算机上而不是在服务器上一次对所有人进行一次此检查?


据先生。 waddlesplash:


这样一来,您就可以重写存储库中的任何文件;)您可以通过在必要时计算必要的信息来稍微优化此文件,因为最新的更改非常罕见。

 ~/QtQuickApp> haikuporter QtQuickApp-1.0.recipe Checking if any dependency-infos need to be updated ... Looking for stale dependency-infos ... Error: QtQuickApp not found in repository 

事实证明,没有包含您的应用程序源代码的普通配方文件。 您需要将其以HaikuPorts格式保存在存储库中。


 ~/QtQuickApp> mv QtQuickApp-1.0.recipe ../haikuports/app-misc/QtQuickApp/ ~/QtQuickApp> ../haikuport ~/QtQuickApp> haikuporter -S QtQuickApp-1.0.recipe 

这个事实使组装更加麻烦。 我不太喜欢它,但我认为有必要使所有开源软件最终出现在HaikuPorts中。


我得到以下内容:


 ~/QtQuickApp> haikuporter -S QtQuickApp-1.0.recipe Checking if any dependency-infos need to be updated ... updating dependency infos of QtQuickApp-1.0 Looking for stale dependency-infos ... Error: QtQuickApp-1.0.recipe not found in tree. 

怎么了 阅读irc之后,我会:


 ~/QtQuickApp> haikuporter -S QtQuickApp Checking if any dependency-infos need to be updated ... updating dependency infos of QtQuickApp-1.0 Looking for stale dependency-infos ... ---------------------------------------------------------------------- app-misc::QtQuickApp-1.0 /boot/home/haikuports/app-misc/QtQuickApp/QtQuickApp-1.0.recipe ----------------------------------------------------------------------Downloading: https://github.com/probonopd/QtQuickApp.git ... --2019-07-14 16:12:44-- https://github.com/probonopd/QtQuickApp.git Resolving github.com... 140.82.118.3 Connecting to github.com|140.82.118.3|:443... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: https://github.com/probonopd/QtQuickApp [following] --2019-07-14 16:12:45-- https://github.com/probonopd/QtQuickApp Reusing existing connection to github.com:443. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/html] Saving to: '/boot/home/haikuports/app-misc/QtQuickApp/download/QtQuickApp.git' 0K . 1.34M=0.06s 2019-07-14 16:12:45 (1.34 MB/s) - '/boot/home/haikuports/app-misc/QtQuickApp/download/QtQuickApp.git' saved [90094] Validating checksum of QtQuickApp.git Warning: ----- CHECKSUM TEMPLATE ----- Warning: CHECKSUM_SHA256="cf906a65442748c95df16730c66307a46d02ab3a12137f89076ec7018d8ce18c" Warning: ----------------------------- Error: No checksum found in recipe! 

一个有趣的问题出现了。 如果我在配方中添加校验和-它是否匹配最新的git commit以进行持续集成? (开发人员确认:“将一事无成。食谱被设计为相对稳定。”)


为了娱乐,请添加到食谱中:


 CHECKSUM_SHA256="cf906a65442748c95df16730c66307a46d02ab3a12137f89076ec7018d8ce18c" 

还是不开心:


 ~/QtQuickApp> haikuporter -S QtQuickApp Checking if any dependency-infos need to be updated ... updating dependency infos of QtQuickApp-1.0 Looking for stale dependency-infos ... ---------------------------------------------------------------------- app-misc::QtQuickApp-1.0 /boot/home/haikuports/app-misc/QtQuickApp/QtQuickApp-1.0.recipe ---------------------------------------------------------------------- Skipping download of source for QtQuickApp.git Validating checksum of QtQuickApp.git Unpacking source of QtQuickApp.git Error: Unrecognized archive type in file /boot/home/haikuports/app-misc/QtQuickApp/download/QtQuickApp.git 

他在做什么? 毕竟,这是git存储库,代码已经直接存在,没有任何可解压的东西。 从我的角度来看,该工具应该足够聪明,如果它在GitHub的URL上方,则不要寻找该解包程序。


也许uri git://可以工作


 SOURCE_URI="git://github.com/probonopd/QtQuickApp.git" 

现在它抱怨像这样:


 Downloading: git://github.com/probonopd/QtQuickApp.git ... Error: Downloading from unsafe sources is disabled in haikuports.conf! 

嗯,为什么一切都如此复杂,为什么不能只是“工作”呢? 最后,使用GitHub构建东西并不罕见。 这些工具可以立即工作,而无需自定义,也可以称之为“麻烦”。


也许它将像这样工作:


 SOURCE_URI="git+https://github.com/probonopd/QtQuickApp.git" 

不行 仍然出现这个愚蠢的错误并按照此处所述进行操作


 sed -i -e 's|#ALLOW_UNSAFE_SOURCES|ALLOW_UNSAFE_SOURCES|g' /boot/home/config/settings/haikuports.conf 

我要走得更远,但是为什么对我大吼大叫(GitHub不安全!),并且仍在尝试分解某些内容。


先生。 waddlesplash


好吧,是的,原因是希望检查为装配体获得的数据的完整性。 一种选择是验证存档的校验和,但是您当然也可以对单个文件进行哈希处理,这将不会实现,因为 需要更长的时间。 其结果是git和其他VCS的“不安全性”。 因为在GitHub上创建存档非常容易且通常更快,因此很可能会一直如此。 好吧,将来,错误消息可能不会那么浮华……(我们不再在HaikuPorts中合​​并这样的配方)。

 ~/QtQuickApp> haikuporter -S QtQuickApp Checking if any dependency-infos need to be updated ... Looking for stale dependency-infos ... ---------------------------------------------------------------------- app-misc::QtQuickApp-1.0 /boot/home/haikuports/app-misc/QtQuickApp/QtQuickApp-1.0.recipe ----------------------------------------------------------------------Downloading: git+https://github.com/probonopd/QtQuickApp.git ... Warning: UNSAFE SOURCES ARE BAD AND SHOULD NOT BE USED IN PRODUCTION Warning: PLEASE MOVE TO A STATIC ARCHIVE DOWNLOAD WITH CHECKSUM ASAP! Cloning into bare repository '/boot/home/haikuports/app-misc/QtQuickApp/download/QtQuickApp.git'... Unpacking source of QtQuickApp.git tar: /boot/home/haikuports/app-misc/QtQuickApp/work-1.0/sources/QtQuickApp-1.0: Cannot open: No such file or directory tar: Error is not recoverable: exiting now Command 'git archive HEAD | tar -x -C "/boot/home/haikuports/app-misc/QtQuickApp/work-1.0/sources/QtQuickApp-1.0"' returned non-zero exit status 2 

作为一种老习惯,我将在irc.freenode.net网络上的#haiku频道上问好人。 没有他们,我在哪里? 提示后,我意识到我应该使用:


 srcGitRev="d0769f53639eaffdcd070bddfb7113c04f2a0de8" SOURCE_URI="https://github.com/probonopd/QtQuickApp/archive/$srcGitRev.tar.gz" SOURCE_DIR="QtQuickApp-$srcGitRev" CHECKSUM_SHA256="db8ab861cfec0ca201e9c7b6c0c9e5e828cb4e9e69d98e3714ce0369ba9d9522" 

好了,很清楚它在做什么-它正在下载带有特定修订版源的存档。 从我的角度来看,这很愚蠢,不是我想要的,即从master分支下载最新的修订版。


其中一位开发人员以这种方式进行了解释:


我们拥有自己的CI,因此haikuports存储库中放置的所有内容都将为所有用户保护,并且我们不希望冒险收集和交付“所有最新版本到上游”。

知道了! 无论如何,这发生了:


 waiting for build package QtQuickApp-1.0-1 to be activated waiting for build package QtQuickApp-1.0-1 to be activated waiting for build package QtQuickApp-1.0-1 to be activated waiting for build package QtQuickApp-1.0-1 to be activated waiting for build package QtQuickApp-1.0-1 to be activated (...) 

无限重复此广告。 显然,这是一个错误(是否有应用程序?我没有找到它)。


使用haikuporterhaikuports储存库, 不会觉得这个级别“ 行之有效 ”,但是作为开发人员,我喜欢与Haiku合作的一些事情。 在大多数情况下,这类似于Open Build Service(开放构建服务)-一组用于构建Linux程序集的工具:功能强大,具有系统化的方法,但是对于我的小型hello world应用程序来说是多余的。


再次,根据先生。 waddlesplash:


确实,HaikuPorter默认情况下是非常严格的(加上lint模式以及严格模式,使其更加严格!),但这仅是因为它创建了可以使用的软件包,而不仅仅是创建了软件包。 因此,他发誓未声明的依赖项,未正确导入的库,错误的版本等。 目标是在用户发现所有问题之前无一例外地捕获所有问题,包括将来的问题(因此,无法安装avrdude,因为该依赖关系实际上已在配方中指出)。 库不仅是单独的软件包,甚至不是SO的未定义版本。 HaikuPorter确保在配方中遵循所有这些规则,以避免运行时错误。

原则上,在创建操作系统时,此级别的严格性是合理的,但在我看来,对于hello world应用程序而言,这是不必要的。 我决定尝试其他方法。


使用“ package create”命令以hpkg格式构建应用程序


也许这个简单的说明会更适合我?


 mkdir -p apps/ cp QtQuickApp apps/cat > .PackageInfo <<\EOF name QtQuickApp version 1.0-1 architecture x86_64 summary "Demo QtQuick application" description "QtQuickApp is a demo QtQuick application for testing Haiku porting and packaging" packager "probono" vendor "probono" copyrights "probono" licenses "MIT" provides { QtQuickApp = 1.0-1 }requires { qt5 } EOFpackage create -b QtQuickApp.hpkg package add QtQuickApp.hpkg apps# See below if you also want the application # to appear in the menu 

出乎意料的快速,出乎意料的简单,出乎意料的效果。 就我喜欢的方式来说,太神奇了!


安装-什么地方?


使用文件管理器将QtQuickApp.hpkg文件移动到~/config/packages之后,QtQuickApp神奇地出现在~/config/apps
再次,出乎意料的快速,简单和有效。 太神奇了!


但是...(没有他们的地方!)


该应用程序仍不在应用程序菜单列表和QuickLaunch中。 我想我已经知道如何解决它。 在文件管理器中,我将QtQuickApp.hpkg从〜/ config / packages移至/ system / packages。


不,仍然不见了。 显然,我(嗯,这条指令)错过了一些东西。


看了HaikuDepot中其他应用程序的“目录”选项卡后,我发现其中有/data/mimedb/application/x-vnd...等文件,甚至还有/data/deskbar/menu/Applications/…


好吧,我应该放在那儿? 好吧...


 mkdir -p data/deskbar/menu/Applications/ ( cd data/deskbar/menu/Applications ; ln -s ../../../../apps/QtQuickApp . ) package add QtQuickApp.hpkg apps data 

我很确定这个技巧一定会成功,但问题仍然存在:为什么需要它,目的是什么? 我认为,这破坏了该系统如此复杂的总体印象。


正如先生解释。 waddlesplash:


有时有些应用程序需要其他应用程序,但菜单上没有。 例如,您的屏幕快照中的LegacyPackageInstaller处理BeOS格式的.pkg存档。 我希望用户进行设置,但是他们在菜单中的存在会引起混乱。

由于某种原因,在我看来,有一个更简单的解决方案,例如Linux .desktop文件中的Hidden=true 。 为什么不将“隐藏”信息作为文件系统的资源和属性?


显示菜单的(某些)应用程序的名称( deskbar )并不是很复杂。


先生 waddlesplash在这种情况下说明:


在这种情况下,“桌面栏”应理解为一种通用术语(与“任务栏”大致相同,指的是Windows应用程序和通用概念)。 好吧,由于这是一个deskbar ,而不是“桌面deskbar栏”,因此也可以用类似的方式来理解。


2个“几乎相同”的目录,其中包含应用程序


为什么在应用程序中有2个目录,为什么在QtQuickApplication中有一个目录,而在另一个目录中却没有? (毕竟,这不是一个系统,而是第二个用户,我个人会理解)。
我真的很困惑,我认为我们应该统一这一点。


评论先生。 蹒跚


在Apps目录中,菜单中不需要一些应用程序。 但是确实需要改善菜单的情况,以使其更具可定制性。

申请,否则不会发生;)


我认为:是否真的有必要将应用程序放置在/system/apps ,如果用户在此处看到它们-这是不可取的。 也许最好将它们放置在用户不会遇到它们的另一个地方? 就像在Mac OS X上所做的一样, .app软件包的内容隐藏在/ System / Library / ...''的肠子中,这些内容对于/Applications的用户不可见。


那依赖关系呢?


我认为值得以某种方式指出依赖关系,对吗? Qt是否可以视为默认Haiku安装的必需部分? 不! 默认情况下未安装Qt。 软件包构建程序可以通过检查ELF文件自动检测依赖项吗? 有人告诉我HaikuPorter确实可以,但是package却没有。 那是因为他只是一个“程序包生成hpkg ”,它本身只是创建hpkg文件。


是否应该通过添加一项策略来使Haiku更加完善,根据该策略,程序包不应该依赖haikuports未包含的程序包? (我非常想这样做,因为这样的策略使任务容易得多-系统将能够自动解决从任何地方下载的每个软件包的依赖关系,而不必大惊小怪。


先生 waddlesplash解释:


, , ( ) — .

-, haikuports, . , , . [ AppImage? — . 译者]



? , , .


?


, Inkscape (, , Haiku, ). https://gitlab.com/inkscape/inkscape .
, - , , , , , AppImage Linux ( , , , [ ! — . ] ). , , , , .



( )


Docker. GitLab runners Linux, , runners (, , Haiku, , , Docker , FreeBSD Docker, Haiku).


Haiku Docker Linux. Haiku . ? Haiku Docker, - QEMU/KVM ( , Docker)? , . , Scribus — Haiku. , , Haiku.


:


, , CMake/CPack. , , , . : , haikuporter , , , . Linux (Haiku ).

. Linux (, ..), , . , Haiku Linux — .


结论


POSIX Haiku , , . , #haiku irc.freenode.net. , .


, Qt, — . .


, " ", .. , haikuports. ( ) GitHub . Haiku Linux, Mc, "" XCode .app , .dmg , .
"" , , Linux, , , Haiku , .


自己尝试! 毕竟,Haiku项目每天都会从DVD或USB提供下载图像。 要安装,只需下载图像并使用Etcher将其写入USB闪存驱动器


有问题吗? 我们邀请您访问俄语电报频道


错误概述: 如何在C和C ++中扎根。 Haiku OS食谱集


: Haiku.


:

Source: https://habr.com/ru/post/zh-CN463803/


All Articles