Best practices for a new software release

Hello everyone.
I am really new here, so please excuse my newbie questions.

I am working on the port of a new lightweight editor for developers called LiteXL and I would like some guidance on how to release it to more people. I have it already here running, and it seems to work pretty well.

I am not the original author of it but I port it for other systems, like AmigaOS 4 and MorphOS, and I thought to give it a try for Haiku, as I am learning more about it. The official repository of the editor can be found at GitHub - lite-xl/lite-xl: A lightweight text editor written in Lua and my own repo is at walkero/lite-xl - lite-xl - Gitea: Git with a cup of tea

So, now with my questions:

  1. How can I make a hpkg package that will be able to be installed on the system?
  2. Is it preferred applications that are ported from other systems be in the HaikuPorts repo? If so, I will create a fork and do a PR with all the changes that are needed.
  3. The application works with some scripts in Lua. These need to be accessible always from the application. The folder structure is like the below:
    lite-xl/bin/lite-xl
    lite-xl/share/doc/
    lite-xl/share/lite-xl/

Should these be stored like below, respectively?
/boot/system/bin/lite-xl
/boot/system/documentation/lite-xl/
/boot/system/lite-xl/

And if so, how can I do that?

  1. If I manage to make the files go to the specific folders as seen above, can I rely on these paths to find them, no matter from where the application is started?
  2. How can I add a default icon for the app?
  3. How can I make it appear in the applications menu?

I am sorry for the many questions, but I would like to proceed with the specific release in a proper way. You don’t need to provide all the info in detail. If you can point me to where I need to look about these, that would be great.

If someone would like to get an experimentation archive, please let me know and I will release one.

Thank you in advance for your help.

1 Like

Welcome!

For starters, you might want to read the Haikuports Wiki first. Once you have a basic grasp of the things, I’m sure more experienced people here will give any guidance you might need. Make sure to glance at other recipes as well, even via looking at the recipes, most of your questions would be answered I’m sure.

Happy porting!

2 Likes

You can use the command package in haiku for this.
haikuports is not required though many users have only this. Nothing is stopping you from haiku hpkg files on your releases :slight_smile:

This should be /system/data/lite-xl/
In your package then only data/lite-xl/ because the package will be moubted at /system
(/boot is the drive that was booted from so /system and /boot/system is the sane folder)
https://www.haiku-os.org/docs/develop/packages/BuildingPackages.html

You need to add an extended attribute to your application/launch script

On creating icons: Icon-O-Matic

With a symlink in the deskbar menu folder, not sure where that is on the top if my head, sorry

1 Like

This is probably the most convenient solution. While it’s named “HaikuPorts”, it is actually used for pretty much all apps available in HaikuDepot, including some that are not ports at all and were written specifically for Haiku.

In theory it is also possible to set up your own package repository, but it just makes things more complicated for users (they need to add your repository to their system) and from our experience, HaikuPorts has done a good job at keeping their repositories online, while other repos have come and gone.

You have two choices:

  • Create a directory in /boot/system/apps/lite-xl and put all your files in there
  • Try to follow the system hierarchy in unix style. In this case, binaries in system/apps or system/bin, documentation in system/data/documentation, and other files in /system/data/lite-xl. In the code you can use the find_directory() API to locate these if needed.

No. If you create a package, it can be installed either in /system or in /home/config (per-user packages) and the path prefix will change accordingly. You can use find_directory or the more advanced BPathFinder to locate the directories. Or just put everything in “apps” and use relative paths to the executable.

Actually you need to add resources first. Tracker (or the tool used for package creation) will copy these into attributes.

Resources are managed with tools like rc (resource compiler) and xres (resource extractor).

an example I found on internet:

https://github.com/mywave82/opencubicplayer/blob/master/ocp.rdef

If you use Haikuporter, it provides an helper function for this: addAppDeskbarSymlink
You can find many examples of it in existing haikuports recipes.

Thank you all of you guys for your replies and the details you shared with me. I will work with them for now and will get back to you in case something is trivial.

If you want to make the hpkg for external repositories, you can use my HPKGCreator too.

Tutorial: HPKG Creator

But to add to Haiku ports (for open source projects) makes sense.