Ko taku ra tuarima me Haiku: me kawe etahi kaupapa

Ko taku ra tuarima me Haiku: me kawe etahi kaupapa

TL; DR: I kite tetahi tauhou ki a Haiku mo te wa tuatahi, e ngana ana ki te kawe i etahi kaupapa mai i te ao Linux.

Ko taku ra tuarima me Haiku: me kawe etahi kaupapa
Ko taku kaupapa tuatahi a Haiku, he mea whakatakoto ki tana whakatakotoranga hpkg

I tata nei I kitea e ahau a Haiku, he punaha whakahaere tino pai mo nga PC.
I tenei ra ka ako ahau me pehea te kawe i nga kaupapa hou ki tenei punaha whakahaere. Ko te kaupapa matua ko te whakaahuatanga o te wheako tuatahi o te whakawhiti ki Haiku mai i te tirohanga a te kaiwhakawhanake Linux. E mihi ana ahau mo nga hapa poauau i mahia e au i te huarahi, na te mea kare ano kia kotahi wiki mai i taku tango tuatahi i a Haiku.

E hiahia ana ahau ki te whakatutuki i nga whaainga e toru:

  • Tukuna he tono CLI ngawari
  • Tukuna he tono mai i te GUI ki te Qt
  • Kātahi ka pōkai ki te whakatakotoranga hpkg (i te mea kei te whakaaro tonu ahau ki te urutau AppDir me te AppImage mo Haiku...)

Kia timata tatou. I nga waahanga te tuhi и whanaketangarite te wiki mai i HaikuPorts i kitea e au te huarahi tika. He pukapuka PDF ipurangi ano BeOS: Te kawe i tetahi Taupānga Unix.
467 wharangi - mai i te tau 1997 tenei! He whakamataku te titiro ki roto, engari ko taku tumanako kia pai. Ko nga kupu a te kaiwhakawhanake he whakatenatena: "he roa te wa no te mea kaore a BeOS i te POSIX-whakarite," engari ko Haiku "mo te nuinga" kua penei.

Te kawe i tetahi tono CLI ngawari

Ko te whakaaro tuatahi ko te kawe i te tono kaare, engari, i te mea kua puta ke, kua oti tenei kua mahia he wa roa i mua.

Ngana tuatahi: kaore he mea hei matakitaki

Ko te mea e kore e taea e au te mohio ko tera Neke atu i te 10 tau nga tono kua tukuna ki Haiku - ahakoa te mea ko te OS ake ehara i te putanga 1.0 ano.

Ngana tuarua: me tuhi ano

Na ka whakamahi ahau pao-770, CLI mo te whakahaere i te kaituhi a Brother P-Touch 770 ka whakamahia e au ki te ta tapanga.
Ka taia e au etahi momo tapanga ki runga, a kua kite pea koe i te tuhinga o mua. I mua tata ake nei, i tuhia e au tetahi kaupapa takai GUI iti ki Python (i te mea kei roto i te Gtk+, me tuhi ano, he take pai tenei hei ako).

Ko taku ra tuarima me Haiku: me kawe etahi kaupapa
Taea'e P-Touch 770 tapanga pūreretā. Ka mahi tahi me Haiku?

E mohio ana te kaiwhakahaere kete Haiku mo nga whare pukapuka me nga whakahau, na mena ka whiwhi au i te karere "kaore e kitea te libintl" ina rere ana configure - Ka whakarewa noa ahau pkgman install devel:libintl a ka kitea te kete e hiahiatia ana. Waihoki pkgman install cmd:rsync. Well, etc.

Haunga te kore e mahi:

/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

Akene he tino Linux te udev, no reira karekau e noho mo Haiku. Ko te tikanga me whakatika ahau i te waehere puna e ngana ana ahau ki te whakahiato.
Ae, kaore e taea e koe te peke i runga i to mahunga, kaore au i te mohio ki hea ka timata.

Tuatoru nga whakamatautau

He pai ki te whai tmate mo Haiku, katahi ka whakaae au ki nga kaiwhakawhanake Haiku ki te hono atu ki taku huihuinga mutunga - mena ka he. He tino ngawari nga tohutohu:

./autogen.sh
./configure
make
make install

He pai te ahua, no reira he aha e kore ai e whakamatau ki a 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

I tenei taahiraa ka whakatuwhera ahau i te HaikuDepot ka rapu curses.
I kitea tetahi mea, i homai he tohu ki ahau mo tetahi patai mohio ake:

/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

I haere ano ahau ki HaikuDepot, a, ka kitea devel:msgpack_c_cpp_devel. He aha enei ingoa kee?

/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

I tenei taahiraa, i mohio ahau ko te kawe i tetahi kaupapa ki Haiku me nui ake te mohiotanga mo te hanga hou.
I korero ahau ki nga kaiwhakawhanake Haiku hoa, ka kitea he pepeke kei roto i te msgpack, a i muri i etahi meneti ka kite ahau i tetahi papaki kei HaikuPorts. Ka taea e au te kite me pehea te whakatika i te kete haere ki konei (buildslave - miihini mariko).

Ko taku ra tuarima me Haiku: me kawe etahi kaupapa
Te hanga i te msgpack kua whakatikahia ki te kaihanga

I waenganui i nga wa ka tukuna e ahau he papa ki te taha whakarunga hei taapiri i te tautoko Haiku ki te msgpack.

E rima meneti i muri mai, kua watea kē te kete karere kua whakahoutia ki 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.

He pai ohorere. I korero ahau i tera?!

Ka hoki ahau ki te raru tuatahi:

/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

Inaianei te ahua nei ehara i te msgpack te he. Kei te korero ahau IMAXLABEL в tty.c na:

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

Hua:

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.

Ana, ka haere ano tatou... Ma te ara:

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

Mr. waddlesplash ka korero ki a koe te wahi hei keri:

/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.

I konei i whakairi ahau config.log.

I whakamarama mai ratou ki ahau he mea ano kei roto i te libnetwork i tua atu i te libresolv i Haiku. Te ahua nei me whakatika ano te waehere. Me whakaaro…

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

Ko te patai mure ore: he aha kei te haere?

/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

Ko te mea ano, i roto i te kōtaha anake. Googled me kitea tenei. Mena ka tapiritia e koe -lssp "I etahi wa" ka awhina, ka ngana ahau:

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

Aue! Kei te timata! Engari…

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

Ka ngana ahau ki te patuiro kōnae i konei:

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

Ko te "ID tauranga kino" kua rite ki te kaari pakihi haiku. He whakaaro pea tetahi he aha te he me pehea te whakatika? Mena, ka whakahouhia e au te tuhinga. Hononga ki GitHub.

Te kawe i te tono GUI ki Qt.

Ka whiriwhiri ahau i tetahi tono QML ngawari.

/> 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!

Tino ngawari. Iti iho i te meneti!

Ko nga tono takai i roto i te hpkg ma te whakamahi i te haikuporter me te haikuports.

Me timata ahau ki te aha? Karekau he tuhinga ngawari, ka haere ahau ki te hongere #haiku i irc.freenode.net ka rongo:

  • rōpū package - he huarahi taumata-iti ki te hanga kete. Mo te nuinga, he ranea a PackageInfo mo ia, pera i te korero i te waahanga "Making it into a proper .hpkg package"
  • Me mahi au i tetahi mea pera
  • Ka taea te whakamahi hpkg-kaihanga (ka pakaru ki ahau, pūrongo hapa)

Kaore i te maarama he aha te mahi. Te ahua nei kei te hiahia ahau ki tetahi aratohu mo te timatanga o te ahua Hello World, he ataata pai. He pai ki te whai kupu whakataki watea ki HaikuPorter, pera ano i te GNU hello.

Kei te panui ahau i nga korero e whai ake nei:

haikuporter he taputapu mo te hanga kaupapa mokihi noa mo Haiku. Ka whakamahia te whare pupuri HaikuPorts hei turanga mo nga kete katoa. Ka whakamahia nga tohutao Haikuporter ki te hanga kete.

I tua atu, ka kitea e ahau:

Kaore he take ki te rokiroki i nga tohutao ki te rokiroki HaikuPorts. Ka taea e koe te hanga i tetahi atu putunga, hoatu nga tohutao ki roto, katahi ka tohuhia te kai kawe ki reira.

Ko nga mea e hiahiatia ana e au - mena kaore e rapu huarahi ki te tuku whanui i te kete. Engari he kaupapa tenei mo tetahi atu panui.

Te whakauru i te haikuporter me te 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

Te tuhi tohutaka

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
}

Te whakaemi i te tunu

Ka tiakina e ahau te konae i raro i te ingoa QtQuickApp-1.0.recipe, muri iho ka whakarewa ahau aikuporter -S ./QuickApp-1.0.recipe. Ka tirohia nga whakawhirinakitanga mo nga kohinga katoa kei roto i te putunga haukuports, he wa roa. Ka haere ahau ki te tiki kawhe.

He aha i runga i te whenua me mahi tenei tirotiro i runga i taku miihini o te rohe, kauaka i runga i te tūmau kotahi mo te katoa?

E ai ki a mr. waddlesplash:

Ma tenei ka taea e koe te tuhi ano i tetahi konae kei roto i te putunga 😉 Ka taea e koe te arotau i tenei mea iti, ma te tatau i nga korero e tika ana ina hiahiatia, na te mea he onge nga huringa whakamutunga.

~/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

Te ahua nei karekau he mea penei i te konae tunu kai e mau ana te waehere puna o to tono. Me pupuri e koe i roto i te putunga ki te whakatakotoranga HaikuPorts.

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

Ko tenei meka ka nui ake te uaua o te huihuinga. Kaore au i te tino pai, engari ki taku whakaaro he mea tika kia puta katoa nga punaha punaha tuwhera ki HaikuPorts.

Ka whiwhi ahau i nga mea e whai ake nei:

~/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.

He aha te he? I muri i te panui irc ka mahia e au:

~/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!

Kua ara ake he patai whakamere. Mena ka taapirihia e au he kaute ki te tunu - ka rite ki te git commit hou mo te whakauru tonu? (Ka whakamanahia e te kaiwhakawhanake: "Kare e mahi. Ko nga tohutao kua hangaia kia tino pai.")

Mo te ngahau, taapiri atu ki te tunu:

CHECKSUM_SHA256="cf906a65442748c95df16730c66307a46d02ab3a12137f89076ec7018d8ce18c"

Kaore ano i makona:

~/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

He aha tana mahi? I muri i nga mea katoa, he putunga git tenei, kei reira tonu te waehere, kaore he mea hei wetewete. Mai i taku tirohanga, me mohio te taputapu ki te kore e rapu mo te wetewete mena kei runga ake i te url GitHub.

Ka whai hua pea te uri git://

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

Inaianei kei te amuamu penei:

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

Hmm, he aha i tino uaua ai nga mea katoa, he aha koe e kore ai e "mahi noa"? I muri i nga mea katoa, ehara i te mea rereke te hanga i tetahi mea mai i GitHub. Ahakoa ko nga taputapu ka mahi tonu, kaore he hiahia mo te tatūnga, ka kiia ranei e ahau he "pupuhi".

Ka penei pea te mahi:

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

Kao. Kei te whiwhi tonu ahau i tenei hapa tipua ka mahi, i whakaahuatia i konei

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

Kei te neke ake ahau, engari he aha te mea e hamama mai ana ki ahau (Kaore a GitHub i te haumaru!) me te ngana tonu ki te wetewete i tetahi mea.

E ai ki Mr. waddlesplash:

Ae, ko te take ko te hiahia ki te tirotiro i te pono o nga raraunga kua riro mo te huihuinga. Ko tetahi o nga whiringa ko te manatoko i te arowhai o te purongo, engari ka taea e koe, ko te tikanga, te whai i nga konae takitahi, kaore e whakatinanahia, na te mea he roa ake. Ko te hua o tenei ko te "korekore" o git me etahi atu VCS. Ka penei tonu te ahua, na te mea he ngawari te hanga i tetahi puranga ki runga i a GitHub me te tere ake. Kaati, hei nga ra kei te heke mai, kare pea te karere hapa e tino maramara... (kaore matou e hanumi i nga momo tohutao ki 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

Na roto i nga tikanga tawhito, ka haere ahau ki te patai ki nga tangata pai i runga i te hongere #haiku i runga i te whatunga irc.freenode.net. A kei hea ahau ki te kore ratou? I muri i te tohu, ka mohio ahau me whakamahi ahau:

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

Kaati, kua marama he aha tana mahi - ka tangohia e ia he purongo me te waehere puna o tetahi whakahoutanga. He poauau, mai i taku tirohanga, ehara i te mea i tino hiahia ahau, ara, ki te tango i nga whakahoutanga hou mai i te peka matua.

I whakamarama tetahi o nga kaihanga i tenei ara:

Kei a maatau ake te CI, no reira ko nga mea katoa ka tuuhia ki roto i te whare putunga haikuports ka kohia mo nga kaiwhakamahi katoa, a kaore matou e pai ki te tupono ki te kohi me te tuku "nga mea katoa i roto i te putanga hou o te awa."

Kua marama! Ahakoa he aha, koinei te mea i tupu:

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
(...)

Ka whakahoki ano i tenei panui kore mutunga. Te ahua nei he hapa tenei (he tono? Kaore i kitea e au).

С haikuporter me te putunga haukuports Karekau he ahua "mahi noa" ki a ia, engari hei kaiwhakawhanake, tera etahi mea e pai ana ahau mo te mahi tahi me Haiku. Mo te nuinga, he rite ki te Open Build Service, he huinga taputapu mo te hanga Linux hanga: tino kaha, me te huarahi nahanaha, engari he nui mo taku tono iti "hello world".

Ano, e ai ki a mr. waddlesplash:

Inaa, he tino kaha a HaikuPorter ma te taunoa (me te aratau lint me te aratau tino kaha kia kaha ake!), engari na te mea ka hangaia e ia nga kohinga ka pai, kaua ki te hanga i nga kete. Koia te take i amuamu ai ia mo nga whakawhirinakitanga kaore i whakapuakina, kaore i tika te kawemai i nga whare pukapuka, nga putanga he, aha atu. Ko te whainga ko te hopu i nga raru katoa, tae atu ki nga mea kei te heke mai, i mua i te mohiotanga o te kaiwhakamahi mo taua mea (koinei te take i kore ai e taea te whakauru i te avrdude, na te mea kua tohua te ti'aturi i roto i te tunu). Ko nga whare pukapuka ehara i te mea ko nga kohinga takitahi, ko nga putanga SO motuhake ranei. Ka whakarite a HaikuPorter kia kitea enei mea katoa i roto i nga tohutao kia karohia nga hapa i te wa e mahia ana.

Ko te tikanga, ko tenei taumata o te uaua ka tika i te wa e hanga ana i tetahi punaha whakahaere, engari he mea kore ki ahau mo te tono "hello world". I whakatau ahau ki te whakamatau i tetahi atu mea.

Te hanga tono i roto i te whakatakotoranga hpkg ma te whakamahi i te whakahau "hangai kete".

Tera pea, tenei Ka pai ake nga tohutohu ngawari ki ahau?

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

He tere ohorere, he ngawari ohorere, he whai hua ohorere. He tino pai ki ahau, miharo!

Tāuta - he aha me hea?

I nukuhia te kōnae QtQuickApp.hpkg ki ~/config/packageste whakamahi i te kaiwhakahaere konae, i muri mai ka puta mai a QtQuickApp ~/config/apps.
Ano, tere ohorere, ngawari me te whai hua. Mīharo, mīharo!

Engari... (kei hea tatou me kore ratou!)

Kei te ngaro tonu te taupānga mai i te rarangi tahua taupānga me QuickLaunch. Ki taku whakaaro kua mohio ahau ki te whakatika. I roto i te kaiwhakahaere kōnae ka nekehia e ahau te QtQuickApp.hpkg mai i ~/config/packages ki /system/packages.

Kaore, kei te ngaro tonu. Ko te ahua, i ngaro ahau (me nga tohutohu) tetahi mea.

Whai muri i taku titiro ki te ripa "Ihirangi" i HaikuDepot mo etahi atu tono, i kite ahau he konae penei /data/mimedb/application/x-vnd... he aha te mea tino whakamiharo /data/deskbar/menu/Applications/….

Kaati, he aha taku me whakatakoto ki reira? Haere mai...

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

Kei te tino mohio ahau ka mahi tenei mahi, engari kei te mau tonu nga patai: he aha te take e tika ai, hei aha? Ki taku whakaaro ka pakaru tenei i te whakaaro katoa he tino maamaa te punaha.

I whakamaramahia e Mr. waddlesplash:

I etahi wa he tono e hiahiatia ana e etahi atu tono engari kaore i te rarangi. Hei tauira, LegacyPackageInstaller i roto i to whakaahua whakaahua, te tukatuka .pkg pūranga ki te hōputu BeOS. Kei te pirangi au ki nga kaiwhakamahi ki te whakauru i a raatau, engari ko te noho ki roto i te tahua ka raru.

Mo etahi take ki taku whakaaro he otinga ngawari ake, hei tauira Hidden=true i roto i nga kōnae .desktop i runga i te Linux. He aha e kore ai e waiho nga korero "huna" hei rauemi me te huanga o te punaha konae?

Ko te mea kaore i te ngawari ko te ingoa o (etahi) tono e whakaatu ana i te tahua, deskbar, ka herea marie i te huarahi.

Mr. Ka whakamāramahia e waddlesplash tenei:

Ko te "paemahi" i roto i tenei keehi me maarama he momo kupu whanui (he rite tonu ki te "paemahi", e pa ana ki te tono Windows me te ariā whanui). Na, mai i tenei deskbar, ehara i te "Deskbar", ka taea ano te maarama penei.

Ko taku ra tuarima me Haiku: me kawe etahi kaupapa
2 "tata rite" whaiaronga me nga tono kei roto

He aha e 2 nga raarangi me nga tono, me te aha hoki taku QtQuickApplication kei roto i tetahi, engari kaore i tetahi atu? (I muri i nga mea katoa, ehara tenei i te punaha kotahi, engari he kaiwhakamahi tuarua, ka maarama ake ahau).
Kei te tino raruraru ahau, a ki taku whakaaro me whakakotahi tenei.

korero na mr. waddlesplash

Kei roto i te Putumōhio Taupānga nga tono karekau e hiahiatia ki te tahua. Engari ko te ahuatanga o te tahua me tino whakapai ake, kia pai ake ai te whakarite.

Te tono, karekau ranei e puta 😉

I miharo ahau: he mea tino tika ki te manaaki i nga tono ki roto /system/apps, ki te kite nga kaiwhakamahi i a raatau i reira, kaore e pai. He pai ake pea ki te tuu ki tetahi atu waahi kaore te kaiwhakamahi e tutaki ki a raatau? Ka rite ki te mahi i roto i te Mac OS X, kei reira nga ihirangi o nga kohinga .app, e kore e kitea e te kaiwhakamahi i roto /Applications, huna ana ki te hohonutanga o /System/Library/…“`.

Me pehea te whakawhirinaki?

Ki taku whakaaro he mea tika ki te whakaatu i nga whakawhirinakitanga, tika? Ka taea te kiia a Qt he waahanga mana o te whakaurunga Haiku ma te taunoa? Kao! Ko te Qt kaore i te whakauruhia ma te taunoa. Ka taea e te kaihanga kete te kite aunoa i nga whakawhirinakitanga ma te tirotiro i nga konae ELF? I korerotia mai ki ahau kei te mahi a HaikuPorter i tenei, engari package Kao. Na te mea he "kaihanga kete" ka hanga noa i nga konae hpkg.

Me whakarangatira ake a Haiku ma te taapiri i tetahi kaupapa here kia kaua e whakawhirinaki tetahi kete ki nga kete kei waho atu o Haiku? haikuports? (Kei te pirangi au, na te mea ma tenei kaupapa here ka ngawari ake nga mahi - ka taea e te punaha te whakatau aunoa i nga whakawhirinakitanga o ia kete ka tangohia mai i hea, me te kore e pohehe me etahi atu puna kete.)

Mr. Ka whakamārama a waddlesplash:

Kaore matou e pai ki te whakawhäiti i te herekoretanga o nga kaiwhakawhanake, na te mea e tino kitea ana mena kei te pirangi a CompanyX ki te tautoko i ana ake raupaparorohiko me nga whakawhirinakitanga (na reira he putunga putunga), ka mahi noa.

I roto i tera keehi, he mea tika ki te kii kia karohia e nga kohinga tuatoru nga whakawhirinakitanga ki nga mea katoa kaore i whakauruhia ki roto i nga haikuports ma te whakakii i nga mea katoa e hiahiatia ana me te tono. Engari ki taku whakaaro he kaupapa tenei mo te tuhinga a muri ake nei o tenei raupapa. [Kei te anga te kaituhi ki te AppImage? — āhua. kaiwhakamaori]

Te taapiri i tetahi ata tono

He aha mena ka hiahia au ki te taapiri i tetahi o nga tohu kua oti te hanga ki roto ki nga rauemi o taku tono hou i hangaia? Te ahua nei he kaupapa whakamiharo tenei, no reira ka noho hei turanga mo te tuhinga ka whai ake.

Me pehea te whakarite hanga tono tonu?

Whakaarohia he kaupapa penei i te Inkscape (ae, kei te mohio ahau kaore ano kia waatea i Haiku, engari he pai te whakaatu ki runga). Kei a ratou he putunga waehere puna https://gitlab.com/inkscape/inkscape.
I nga wa katoa ka tukuna e te tangata a raatau huringa ki te putunga, ka whakarewahia nga raina paipa, ka mutu ka whakamatauhia nga huringa, ka hangaia, ka whakauruhia te tono ki roto i nga momo kete, tae atu ki te AppImage mo Linux (he kete tono tuuturu ka taea te tango mo nga whakamatautau o te rohe ahakoa he aha te mea ka whakauruhia ki runga i te punaha [I mohio ahau! — āhua. kaiwhakamaori]). He pera ano ki nga tono hanumi manga katoa, na reira ka taea e koe te tango i te tono i hangaia mai i te waehere i whakaarohia i roto i te tono hanumi i mua i te hanumi.

Ko taku ra tuarima me Haiku: me kawe etahi kaupapa
Hanumi nga tono me nga mana hanga me te kaha ki te tango i nga raarangi whakahiato mena ka angitu te hanga (kua tohua ki te kaakaariki)

Ka rere te hanga i roto i nga ipu Docker. Ka tuku a GitLab i nga kaiwhaiwhai kore utu i runga i te Linux, a ki taku whakaaro ka taea pea te whakauru i a koe ake oma (ma te ara, kaore au e kite me pehea te mahi mo nga punaha penei i a Haiku, e mohio ana ahau kaore he Docker, he rite ranei, engari mo FreeBSD hoki kaore he Docker, no reira ehara tenei raruraru i te mea motuhake ki a Haiku).

Ko te tikanga, ka taea te hanga tono Haiku ki roto i te ipu Docker mo Linux. I tenei ahuatanga, ka taea te whakauru i te huihuinga mo Haiku ki roto i nga paipa o naianei. Kei kona ano nga kaiwhakarite whakawhiti? Me whai ranei ahau i nga Haiku katoa i roto i te ipu Docker ma te whakamahi i tetahi mea penei i te QEMU/KVM (mehemea ka mahi pera i roto i a Docker)? Ma te ara, he maha nga kaupapa e whakamahi ana i nga kaupapa rite. Hei tauira, ka mahia e Scribus tenei - kei te waatea noa mo Haiku. He ra ka tae mai te ra ka taea e au te tuku pera Toia nga tono ki etahi atu kaupapa hei taapiri tautoko Haiku.

Ka whakamarama tetahi o nga kaihanga:

Mo etahi atu kaupapa e hiahia ana ki te hanga kete ake, ka tautokohia te tikanga CMake/CPack auau. Ka taea te tautoko i etahi atu punaha hanga ma te waea atu ki te kaupapa hanga o te kete, he pai mena kei te pirangi te tangata. Ko nga wheako e whakaatu ana: i tenei wa kaore ano kia nui te hiahia, no reira he pai te mahi a te haikuporter mo tatou, engari, i te mutunga, me mahi tahi nga tikanga e rua. Me whakauru mai he huinga taputapu mo te rorohiko hanga-whakawhiti mai i te Linux, i tetahi atu punaha whakahaere tūmau ranei (Kaore a Haiku i hoahoa ki te whakahaere i runga i nga kaitoro).

Ka hoatu e ahau he tu ovation. Ko nga kaiwhakamahi Linux e mau ana i enei kawenga taapiri katoa me nga taapiri taapiri (te haumaru, te mana whakahaere, me etahi atu) e tika ana mo te punaha whakahaere, engari kaua mo te tangata ake. Na ka tino whakaae ahau ko te kaha ki te hanga i nga taupānga Haiku i runga i te Linux te huarahi hei haere.

mutunga

Ka taea te kawe i nga tono POSIX ki Haiku, engari he nui ake te utu i te hanga hou. Ka tino mau ahau ki tenei mo te wa roa mena ehara i te awhina o nga tangata mai i te hongere #haiku i runga i te whatunga irc.freenode.net. Engari ahakoa kaore ratou i kite tonu he aha te he.

Ko nga tono kua tuhia ki te Qt he rereke ngawari. Ka whakahiatohia e ahau tetahi tono demo ngawari kaore he raru.

Ko te hanga i tetahi kete mo nga tono ngawari he tino ngawari, engari mo nga mea "tukua tuku iho", ara. he putunga waehere puna kua whakaputahia hei tautoko i nga tauranga haiku. Mo te hanga tonu (hanga mo nga huringa katoa) me GitHub, he ahua ngawari nga mea katoa. I konei ka rite a Haiku ki te tohatoha Linux i te hua i runga i te Mac, ka paato koe i te paatene "Hanga" ki te XCode ka whiwhi koe i tetahi kete. .app, kua reri ki te whakauru ki roto i te ahua kōpae .dmg, kua rite mo te tango i runga i taku paetukutuku.
Ko te hanga tonu o nga tono i runga i te punaha whakahaere "tūmau", hei tauira, Linux, ka taea pea mena he tono mai i nga kaihanga, engari i tenei wa kei te kaupapa Haiku etahi atu mahi nui ake.

Whakamātauria koe! I muri i nga mea katoa, ko te kaupapa Haiku e whakarato ana i nga whakaahua mo te pupuhi mai i te DVD, i te USB ranei, i hangaia . Hei whakauru, tango noa i te ahua ka tuhia ki te puku kohiko ma te whakamahi Etcher

He patai ano taau? Ka tono matou ki a koe ki te reo Russian hongere waea waea.

Tirohanga hapa: Me pehea te kopere i a koe i te waewae i C me C ++. Kohinga tohutao Haiku OS

Tuhinga ka whai mai kaituhi whakamaoritanga: koinei te tuarima o nga korero mo Haiku.

Rarangi tuhinga: Tuatahi Ko te tuarua Ko te tuatoru Tuawha

Source: will.com

Tāpiri i te kōrero