CudaText 64bit: Text/Code Editor: Ready, test it out and report

Good day,

Among other things, these days I’ve also been trying to test a new Code Editor on Haiku 64 bit. A while ago I asked at VSCode forums to get it to run on Haiku. No one cared. Then @kallisti5 also pointed out some news on node.js there (thanks @kallisti5) . No one cared. So I’ve been searching for code editors here and there (while using Vim atm) and finally found CudaText.

CudaText doesn’t have a Haiku package (yet) but source code can be downloaded and can be played with. Of course, first need Lazarus IDE to get CudaText to compile. This is all new to me. Last time I touched Pascal was in 1990… :older_man: :older_man: :older_man:

While I’m having some issues getting things working properly, here is a sneak peek:
screenshot10

Running from Lazarus and without Debugging. There are some visual quirks though.

Let’s see if with some help we can get it working and built.

Thanks.
Regards,
RR

6 Likes

We are not all great developers, but maybe we can help out on other fronts :wink:
Just call for anything you need there :slight_smile:

Good day,

Well, it builds:
screenshot11
screenshot12

Right now, it builds. This is still a test build, not ready because of the issues that need to be addressed in order to properly get CudaText code editor with all its features. But it does build and the software does run. Now I also need to learn a bit about CudaText features to do the right testing.

There is no Icon yet on the deskbar (I’ll sure do something about it), and some bugs present, though I presume due to the lack of some packages at build time.

@humdinger, thanks for changing the category to “software”, I forgot about it.

@Begasus, thanks for your offer, I’ll take it. :wink: Sure I’ll need help in order to make the HPKG later on. Right now I have to figure out why I can’t install packages inside Lazarus IDE for CudaText to compile and build with everything. I presume (I already told CudaText devs) that it is due to Lazarus being installed in /system/apps, which I presume is a read-only dir and Lazarus rebuilds itself when a new package is added for it to be used within the IDE. Therefore I asume that Lazarus can’t write inside that dir, resulting in no changes applied to the IDE (I have to review Lazarus’ doc to certify this also). This is the first Issue I have to solve. I’ll try to install Lazarus in /home/config/packages to verify that it’s the cause of the problem.

With this issue solved, build it again and then test it; I’ll do with Python which is what I’m onto right now. Build process was damn fast, and CudaText lauches very quickly. Which is a good thing for any software that runs on Haiku.

The other issue that is obvious is the font rendering, characters seem to overlap, so I’ll check if that can be solved.

Will update with more news as they come.

Thanks!
Regards,
RR

Theming also works quite well.

PS> the font issue solves itself changing the font to a different one and back:
screenshot13

And after solving the Python issue, addons can be installed and the left sidebar is visible:
screenshot14

Notice the “pylib__haiku” line in the user.json file.
This code editor seems quite nice so far.

4 Likes

Good day,

Finally I got some more time today to give to CudaText:
screenshot15

This is CudaText 1.133.5, stable version, compiled and built just now. It’s got some nice improvements regarding Haiku, check the CudaText tracker window, showing the settings in the proper place, not in some .config folder.

I’ll add the icon, which is already ready, and start with the packaging… @Begasus

And here, with the icon already set:
screenshot16

And with a project folder opened and vertical splits:
screenshot18

Regards,
RR

11 Likes

This is awesome, thank you!

@Coldfirex
No need to thank yet. Let’s better wait for the package and testing. Once it works properly I will appreciate it :wink:

Hi RR, I see that it also needs Lazarus and fpc? IIRC we don’t have them at haikuports?

Yes they are not in Haikuport.
There are readily available fpc and lazarus binaries for Haiku. They come in tar.gz files containing tar.gz files which should not be too hard to make a recipe of. Just need someone to take the task :wink:

Looking into fpc_bin 3.2.0 for x86_64 atm, saw they also provided a package there for Haiku 64 bit :slight_smile:

1 Like

Good day @Begasus,

IIRC I got them from the Hakilo repo. Not sure now because I have the CudaText testing on another Haikbox at work.

Besides, I have to report some issues to Lazarus/FreePascal (already talked about this with Alexey, CudaText’s developer) and should be doing it in the next days, though I rather make a test package before, and then iron out any issue that appears.

In order to get this to work I moved the Lazarus install to a different drive, with read/write permissions for Lazarus to recompile itself. I’m not certain that this is needed though. I just tried that as wasn’t getting any further with the default install. There are some quirks though that I have no clue about, related to how Lazarus works, so I’ll join the community and ask there.

There is also some fpcupdeluxe package that helps with the installation of FreePascal and Lazarus in a desired location though I never got it to work.

Anyway, little by little. Once we have a package ready, should be time for testing everything, plugins, behaviour, …

One thing is sure, it launches really fast. Less than 1 second, as shown in the pics.

Regards,
RR

2 Likes

Created a fpc_bin recipe and a fpc_source recipe, using export FPCDIR=/system/lib/fpc/3.2.0 seems to be ok, but when trying to build lazarus with fcpmake -Tall and make LCL_PLATFORM=qt5 I’m getting:

Free Pascal Compiler version 3.2.0 [2020/06/07] for x86_64
Copyright © 1993-2020 by Florian Klaempfl and others
Warning: (11053) The selected debug format is not supported on the current target, not changing the current setting
(1002) Target OS: Haiku for x86_64
(3104) Compiling codetools.pas
(1008) 33 lines compiled, 0.5 sec
(1021) 1 warning(s) issued
(1022) 2 hint(s) issued
/bin/cp -f Makefile.compiled units/x86_64-haiku/CodeTools.compiled
make[1]: Leaving directory ‘/boot/home/wip/lazarus/components/codetools’
make -C lcl LCL_PLATFORM=nogui
make[1]: Entering directory ‘/boot/home/wip/lazarus/lcl’
Makefile:214: *** The Makefile doesn’t support target x86_64-haiku, please run fpcmake first. Stop.
make[1]: Leaving directory ‘/boot/home/wip/lazarus/lcl’
Makefile:2029: recipe for target ‘lazbuild’ failed
make: *** [lazbuild] Error 2

Good day,

Working on the Package for CudaText 1.133.5:
screenshot3

Though still need to tweak the .PackageInfo with the requirements and all that stuff (still learning about it), and the folder structure inside the HPKG file. Nonetheless, it already installs:
screenshot2

There is already a pre-release available on Github (https://github.com/roired/CudaText-Haiku/releases). I just put it there to test it out, and to test how to release anything. By the way, couldn’t do that on Haiku, had to add the release on Win, WebPositive crashed always trying to upload the HPKG.

Some things don’t work yet with this package (still learning). As soon as I figure out how to solve it, and test it, will update the package there and let you know. This package won’t ask yet for the requirements, this is something I need to learn how to properly add to .PackageInfo.

Regards,
RR

2 Likes

Is that a known WebPositive bug?

Good day @Coldfirex,

To be honest, I haven’t used Github/GitLab/git so much, so I’m quite a newbie on these matters.
Regarding Github, I’ve experienced that I can’t upload images to Github. I tried a couple of times without success. I haven’t reported it yet, as I should be doing more testing on the Haikbox I use regularly. Trying to upload the HPKG to the “Releases” section of Github crashes WebPositive, but it’s more a quit than a crash, as no bug report dialog pops up when WebPositive quits. So I’m a bit puzzled regarding this.

These two issues might be related? The image upload and the HPKG upload? I have no clue… :roll_eyes:

The image upload issue, I also experienced with Otter. So maybe it’s time to file the bug…

Regards,
RR

For images you can use the add-on uploadIt to be found on HaikuDepot.
Right click you image and click the upload-it add on. It will create a url… which you can paste with alt+v in the text.

For text upload you can use pastebin.com upload your text there and copy the link in the browser after creating a new paste. No register needed.

To upload a HPKG no idea. Sorry

1 Like

Yes. Reported a long time ago and still not fixed.

Good day,

Finally, it seems to be ready. I figured out how to make it, though not sure if it’s the right way to do it.
I tested adding plugins and it seem to work.

Not sure yet about the ‘requirements’ thing, so someone who does not have Python 3.6m nor Qt5 installed should try it to see if installing the package calls for the dependencies.

Other than that, need to change font size and then fonts render properly.
screenshot4

screenshot1

The package is on Github available to download and test:

Let me know if you find any issues.

It hasn’t been easy. And this is the first attempt so, please do enlighten me on how to improve it for the next time.

Thanks,
Regards,
RR

2 Likes

Just to be clear, UploadIt transfers any kind of file to an online service, not just images. Currently that service is The Null Pointer, but these online services are wont to (temporarily) disappear over time. So the service and with it the terms of service may change.
For 0x0.st the max. size is currently 512 MiB and the rentention time depends on the filesize, i.e. smaller files are retained longer than large ones (30 days to 1 year).
It’s a nice, quick way to share some file, but may not be really suited for bug reports that are not actively worked on. If someone has a look in a year or two, your uploaded file will be gone…

Good day,

All right. So now I’m testing CudaText on Haiku and I did the following:

  • Set CudaText as default application to open plain Text Files
  • Double click on a text file
  • CudaText launches
  • The file is not opened

So, I presume I’ve missed something here in order to make CudaText open the file when it launches. Any help appreciated.

Thanks,
Regards,
RR

The package wouldn’t install for me on Haiku B2 x86_64. I suspect your file opening problem is a missing B_ARGV_ONLY flag in the rdef file.

Edit: I was trying to install it on a B2 x86_gcc2 VM by mistake