Xojo To Linux AppImage Software

Hello Everyone I have made and open sourced a new tool that hopefully will help some of you have a Linux version of your software :slight_smile:. This tool, once pointed at a compiled Xojo project directory will package and output a Linux AppImage!

What is an AppImage? (https://appimage.org/)

  • A highly portable program kind of like a exe file on Windows but it runs the application vs installing it
  • it also contains all of the dependencies located inside the lib and resources folders so there is no moving around a bunch of items, your Linux software is now an all-in-one package!
  • It doesn’t require a repo or package manager, you can sell it as a download on a website or share it another way quite easily

You can get the project and code here:

Please give it a try and if you like it consider tossing me a donation or hey a copy of your software. I would be happy to test it out :slight_smile: I also plan to make a Patreon website with AppImages of all my software if you don’t want to use source code and just want a nice AppImage. Thank you for taking a look and let me know if you find any issues!

8 Likes

Crashes with a simple built Xojo 2024r2.1 Linux project at:

App.executableLocation.Parent.Child(App.executableLocation.Name+" Resources").CopyTo(binDir)

as this project has no Resources folder…

Commenting this out, it crashes further down at:

App.resourcesFolder.Child("AppRun").CopyTo(App.appDirFolder)

I’ll have to make logic for applications without resource folders, all of mine I tested with had one generated by default.
Until then could you make one? It should work with that.

I’ll have to use the lib folder if no resource folder is present or something. Thank you for the insight though! I’ll work on it tonight.

1 Like

There I added a check to make sure the folder exists before trying to copy it. So shouldn’t be an issue now.

When I comment out that line, it crashes further down at:
App.resourcesFolder.Child(“AppRun”).CopyTo(App.appDirFolder)

Please make sure when you build this the Assets folder in the editor looks like this:
image

I also have a Patreon with pre-built AppImages of everything I make for sale :slight_smile:
https://www.patreon.com/AlwaysOfflineSoftware
Just in case :wink:

Thank you for this. It inspired me to try again at getting my app working on Linux… only to find that Xojo still has some major problems on Linux. Maybe another try again in another year…

2 Likes

What major problems? I am a pure Xojo Linux developer pretty much, maybe I can help

Drawing bugs. Xojo’s own remote debug app suffers the same problems. Drawing text inside a canvas is squished horizontally, and window controls (close, minimize, maximize) are squished vertically.

The close/min/max buttons should be handled via GTK3 settings or themes, Xojo to my knowledge doesn’t draw that. It’s also why you can’t switch from dark to light mode at will with the ide toggle.
As for the canvas text, have you tried something like the Ubuntu font or monospace, might fix the issue with made for Linux stuff?
Either way, I’m always going to be pro Linux editions the community isn’t as aesthetically focused as other tech spaces!

Considering it’s any and all Xojo apps (well, that’s I’ve tested) and only Xojo apps doing it, it’s Xojo’s problem. As for the font, it’s set to System. Labels and controls draw correctly, but Graphics.DrawText gets it wrong.

Sorry to derail your thread though. I just wanted to say I really appreciate your work on this. I had asked a while ago about distribution on Linux, and got met with crickets. So it’s nice to see somebody putting some effort in, even if I’m not able to take advantage of it. Or I guess willing would be the right word, since I could release with these oddities, but I’m not willing to.

Totally understand, and no problem here! I’ll just keep doing what I’m doing :+1:

2 Likes

Just tried to build an AppImage…it does generate it in the same directory as XojoToAppImage is.

Trying to run the AppImage just gives on the Console:

Segmentation fault (core dumped)

A picture have a max size. In the documentation, I only found:

' 2000 x 2000 Pixel works, but 20000 x 20000 Pixel will raise exception

In Picture.

I have tested it on 5 different applications of mine with no issues, even deleted my resource folders for those apps. Does your application have any dependencies needed in a specific place? What does your app do?
Unfortunately I can’t debug everyone’s app, do you have your application up anywhere and I can try packaging it to see if it is a problem with my tool?

If you are referencing the AppImage icon, I would recommend not having extremely large pictures in general. 256x256 is the minimum, I never use over 1k by 1k but I don’t know the true AppImage limits for this.

The simple App just does scaling of an image to three different sizes, nothing needed in a special place…

Not getting that in Ubuntu environments I have tried.
I do see issues with controls on panels - after a few minutes of use, they don’t paint. Sometimes I can get them to show up by waving the mouse over them. Close, but not shippable as a sellable build.

I am not running into the same issue unfortunately, what is your distro?

Running Debian 12 here with XFCE…no icons displayed for any AppImage app (o;

This was Ubuntu 24.04 ARM64.

Do you have libfuse2 installed? It is a dependency for AppImages.

sudo apt install libfuse2

What image format/size are you using? I selected a png from inside your exported app folder.

Apologies, I am genuinely trying to help.

1 Like