CudaText 64bit: Text/Code Editor: RC. Please report issues

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

  1. https://svn.freepascal.org/svn/lazarus/trunk/lcl/interfaces/qt5/cbindings/
  2. GitHub - davidbannon/libqt5pas: Unofficial Repository

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 :slight_smile:

1 Like

Good day @Begasus,

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)

Hopefully we’ll get there.

Regards,
RR

2 Likes

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 :slight_smile:

2 Likes

I have to learn to make recipes… :stew:
I felt understanding PackageInfo was a first step in order to understand recipes :thinking:

Regards,
RR

Never used that one :wink:

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:

3 Likes

@roiredxsoto libqt5pas (1.2.9) has been merged into haikuports, could you have a check if it works with that version also?

3 Likes

Good day @Begasus,

I’m having some issues atm. Most likely won’t be able to test this until after June 25th.

I don’t forget about this, don’t worry. I’ll get to it as soon as I can.

Thanks a lot!!
Regards,
RR

1 Like

Good day,

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:
CudaTextLibQt5Pas

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):
CudaTexgGDScript

Getting closer to RC.
Regards,
RR

Thanks @Begasus!

13 Likes

Glad it worked out alright, another dependency out of the way :+1:

3 Likes

Good day,

CudaText

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

Regards,
RR

4 Likes

Maybe good to mention this is for x86_64 :slight_smile:

@Begasus , the topic ?? :crazy_face:
Has been there all the time… :wink:

1 Like

Whoops, my bad :stuck_out_tongue:

@roiredxsoto
How did you fix the ‘open with’ problem? I am facing the same problem (UBLViewer)
I looked into the reply by @phw and I downloaded your package that you made for CudaText, where I see that you made a resource file with the attributes QT:QPA_FLAGS.
I’ve made a rdef-file (and .rsrc file) based on your example, but how do I incorperate this into pascal code (freepascal or lazarus)
I am using libQt5Pas (1.2.9) and Haiku 64bit (and a bit lost)

FOUND IT: Seems I needed to add the attributes using xres

Good day,

After some time out, today I got back to Haiku. Updated the OS to latest nightly which caused some display issues… missing icons(the ones I had modified), font settings… And was the time to retake the CudaText stuff.

CudaText1.146.2

This is last CudaText with a Godot Project open. This is run whitin Lazarus, not yet built. At least it runs, so next step is building it and redo all the packaging.

I’ll try to build it and update the package. Once done, will update info.

Regards,
RR

11 Likes

Good day,

As you can see here:
cudatext

The package is made. Not yet available on Github, I have to review git commands and not sure if should make a new branch or replace things (no idea on how to work with branches neither).

Presumably, before the end of the week the HPKG will be available to download.

Regards,
RR

9 Likes

Good day,

Finally the release is available on Github:

I made a branch. It’s the first time, so I expect everything should be fine. If not, let me know.

CudaText should install without issues, though it might show an issue when closing tabs. This was present already in prior releases, and I haven’t figured out yet how to solve it (I presume it’s related to the Lazarus package? :thinking: :thinking: :thinking:

Please do test and report.

Regards,
RR

2 Likes

It looks good. Is there any chance of it getting onto HaikuDepot?

Good day @MrEntropy,

That is the idea, though I just learnt to make HPKGs with CudaText, and today to work with branches on Github [though not sure if properly].

AFAIK, to get it onto HaikuDepot there are two ways:

1- I make a repo to hold this package [and hopefully others] that users should add to HaikuDepot. I don’t know how to do this yet, nor how to manage version updates with the HPKG file format for when a new version is released. I don’t think that a HaikuDepot repo can be made from a Github repo, or parts of it.

2- Add it to Haikuports. I don’t know how to do this neither. @Begasus is helping here and he already did a nice work with freepascal and libQt5pas as they are already available on HaikuDepot through Haikuports thanks to him. Now CudaText HPKG calls for the install of libQt5pas instead of it being provided within the CudaText package. Lazarus seems harder to get to Haikuports, and while it’s not available at Haikuports, CudaText couldn’t be available at Haikuports neither [@Begasus is this correct?]

I don’t really understand how Haikuports works yet, and I’m just starting with the HPKG format as well, so it’s going to take some time to get it on HaikuDepot, unless someone knows of a third way [then please enlighten me] to get it there sooner. It’s a long path to walk, and gets longer because of shortage of free time to dedicate to Haiku. We’ll hopefully get there though. :wink:

Regards,
RR

2 Likes