Thanks for the tip on the B_ARGV, I’ll check into that to see if that is the problem.
Regarding the install, I did the test now, inside a clean VM and it does install though it requires libQt5pas, so should add it to the requirements part of the PackageInfo.
It looks like the installer calls for the needed stuff and even more (I presume due to Qt5 being required so pulls all its stuff).
I’ll fix the libQt5pas stuff and add the flag you pointed out, test it and release again. Nonetheless, libQt5pas.so seems to be unavailable in HaikuDepot, so I presume I could add it to the package while it gets added there?
Looking into it atm, I found the source from lazarus trunk (1) and one from an unofficial github release (2)
The second one is easy to pull, the first one I haven’t found out yet as it’s using svn there
Not sure which one is the best to go with, but building the second one for now, if this works out ok we can have both 32bit and 64bit version for libQt5pas
From what I’ve learned, CudaText requires Python3>=3.6m, Qt5 and libqt5pas.
Python3- I set it to 3.6m as it was the default one in the CudaText settings, though any version up to 3.9 would do. Alexey, CudaText dev already added the right path in the source code, so next time we package a new version won’t need to create a dummy user.json settings file. Maybe we could go with default Python3, which if I recall correctly is 3.7.x. All these are available through HaikuDepot, so no issue with these.
Qt5- As it is already available in HaikuDepot, there was no issue with this neither.
libqt5pas- well, I still have no clue on how to do anything Haikuports related so I just added the .so files (actually, an .so file and 2 links) to the package. Ideally should be in HaikuDepot so can be added as a requirement (just learning on requirements atm). In the meantime, best way I thought of was including the libs in the HPKG.
TODO:
add a ‘pre-uninstall’ script that removes the cudatext folder from the /boot/home/config/settings. Software should be clean, once removed, everything is removed not leaving stuff behind. At least I think so.
fix the issue that I have when double clicking a text file. CudaText launches but doesn’t open the file. (no clue yet)
move CudaText to Haikuports so can be installed directly from HaikuDepot, instead of downloading the package from Github. (no clue yet)
add screenshots to the hpkg so they appear on HaikuDepot. (no clue yet)
Hello @roiredxsoto Didn’t touch CudaText yet, as for python and Qt5 they should be ok, I almost have a working recipe for libQt5Pas (1.2.9), just need to finetune the install part, slowly we’ll get there
There are two ways to handle that. On Haiku when a file should be opened by an application a RefsReceived message is being sent to this application. Haiku’s Qt implementation by default translates this into a Qt FileOpen event. If an application supports this everything works out of the box as it should. But since the FileOpen event is otherwise only being used on macOS many Qt applications that were only written with Linux or Windows in mind don’t implement that event.
So the ideal solution would be to implement support for the FileOpen event in CudaText. That would give the best results.
But the qthaikuplugin also allows for a workaround. When setting the QT:QPA_FLAGS attribute to Q_REF_TO_ARGV Qt will attempt to convert the initial RefsReceived message into command line arguments.
See the following post and the discussion preceding it for details:
With the work by @Begasus on LibQt5Pas 1.2.9, looks like now CudaText HPKG pulls the right dependencies and installs and runs on a clean Haiku install:
The libqt5pas shown here is the one provided by @Begasus. I had to include the symlinks libQt5Pas.so and libQt5Pas.so.1.2 in the HPKG, didn’t know of any other way to do it as the post-install shell script didn’t put them there.
Next is fixing the double click on text file → launch CudaText and open such file.
Besides, here is CudaText with GDScript, working on a Godot’s demo project (Platformer):
Well, finally. This is CudaText 1.133.7 64bit running on Haiku R1|b3 opening a text file after double clicking on the Text file. Loads the file inside CudaText. Has the proper icon in Tracker and Deskbar.
Please test it out:
And report any issues you may find.
By the way, it does not update prior version of CudaText. Best scenario is install on a clean Haiku which never had CudaText.
Thanks to @Lrrr (mimeset, mimeset, mimeset), @Begasus, @phw , @3dEyes and Alexey-T (CudaText dev).