New Linux AppImage and source builds to test

For test results, bug reports, announcements of new builds etc.

Moderators: another_commander, winston, Getafix

User avatar
Lone_Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 779
Joined: Wed Aug 08, 2007 10:59 pm
Location: Netherlands

Re: New Linux AppImage and source builds to test

Post by Lone_Wolf »

mcarans wrote: Fri Dec 19, 2025 5:12 am
Lone_Wolf wrote: Thu Dec 18, 2025 8:35 pm
P.S.
only change to upstream sourcecode left in that package now is the deletion of 2 files in 2 folders that interfere with libpng system library on arch .
I think you can probably just make a PR to delete those 2 files in https://github.com/OoliteProject/oolite ... pendencies as that was in any case what MrFlibble planned to do to fix the legacy build. That repo gets checked out as a submodule to deps/Linux-deps. I'm not sure why you have it separately as oolite-linux-dependencies in your build, but it will presumably get deleted from there too if you change https://github.com/OoliteProject/oolite ... pendencies.
The makepkg tool used to build on archlinux doesn't have support for git submodules so we need a workaround for them.

My oolite-git PKGBUILD git clones the entire oolite repo , which does include the content of those submodules in folders .
Then the individual repos are cloned to separate folders and linked as git submodules in the prepare function().
This results in having 2 sets of the submodule contents.
Arch Linux packaging has a long habit of minimal changes to upstream (and I interpret that more strict then most) , so as long as oolite install instructions mention submodules I can't skip them.
OS : Arch Linux 64-bit - rolling release

From: The Netherlands, Europe

OXPs : My user page (needs updating)

Retired, occasionally active
User avatar
MrFlibble
---- E L I T E ----
---- E L I T E ----
Posts: 507
Joined: Sun Feb 18, 2024 12:13 pm

Re: New Linux AppImage and source builds to test

Post by MrFlibble »

I have addons in:

~/GNUstep/Library/ApplicationSupport/Oolite/ManagedAddOns
and my custom ones are in:
~/GNUstep/Applications/Oolite/AddOns

The latter, custom OXP's folder, is not sought by the appimage.
User avatar
Lone_Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 779
Joined: Wed Aug 08, 2007 10:59 pm
Location: Netherlands

Re: New Linux AppImage and source builds to test

Post by Lone_Wolf »

mcarans wrote: Fri Dec 19, 2025 5:12 am
Lone_Wolf wrote: Sat Dec 13, 2025 11:06 pm
Pacman is essentially a cli-frontend for libalpm.so and all systemwide installations on archlinux are maintained through libalpm .
Other package managers like flatpak, pip, conda, kde discover , gnome sw centre, steam etc either communicate with libalpm or stick to user installs (probably 99% do the latter on archlinux)

Pacman/libalpm are forbidden to touch user folders. This means anything under $HOME and /usr/local .

So as long as configure/make/make install or modern equivalent only touches /usr/local its fine.
If installing deps is needed, it should be done manually through a pacman command listed in documentation.
Just wanted to check something as I think I may have misunderstood what you said. I have removed sudo for installing packages on Arch, but AI says "On Arch Linux, yes—you typically need sudo to install packages system-wide using pacman, because it modifies system directories like /usr and /etc." You definitely need it to build from source on Ubuntu and Fedora as various system packages must be installed (like clang, SDL etc.). The reason it works in GitHub Actions without it is because containers by default run as root.

I was thinking of adding a root check like this:

Code: Select all

if [ -z "${SUDO_CMD+set}" ]; then
    if [ "$(id -u)" -eq 0 ]; then
        echo "Running as root - no need for sudo"
        SUDO_CMD = ""
    else
        echo "Not running as root - will sudo when needed"
        SUDO_CMD = "sudo"
    fi
fi
The script would then use sudo if not root and not use sudo if root. If really needed, a user could override by explicitly setting SUDO_CMD to either "" or "sudo" before running the script. Would that work on Arch?
AI slop wrote:
AI says "On Arch Linux, yes—you typically need sudo to install packages system-wide using pacman, because it modifies system directories like /usr and /etc.
That should be 'needs root rights' for the following reasons :
Sudo is not part of the arch base meta-package that should be present on all arch systems.
It is in the base-devel package, but the default sudoers file only contains comments/examples. Without user configuration sudo will do nothing on arch.

su on the other hand comes with utils-linux which is in base.
The only 100% guaranteed methods to get root access on Arch Linux are:
login as root or use su

Scripts run as the user that starts it. If the script uses sudo foo internally foo will be run as that other user in their environment ! This can cause all kinds of undesired effects and makes troubleshooting much harder.
(su has the same issues btw)
Packaging tools have special code to prevent such issues or don't use sudo/su/doas etc at all.

The simplest method to avoid those issues is separate anything that requires root rights from stuff that needs to run as user.
For your sourcebuild in /usr/local that would result in 2 scripts :
one to install deps that needs to be run with root rights.
A second one that runs as normal user and compiles oolite .
OS : Arch Linux 64-bit - rolling release

From: The Netherlands, Europe

OXPs : My user page (needs updating)

Retired, occasionally active
Commander_X
---- E L I T E ----
---- E L I T E ----
Posts: 736
Joined: Sat Aug 09, 2014 4:16 pm

Re: New Linux AppImage and source builds to test

Post by Commander_X »

From what I can make from this extract from ResourceManager.m file:

Code: Select all

sUserRootPaths = [[NSArray alloc] initWithObjects:
 
 #if OOLITE_MAC_OS_X
					  [[[[NSHomeDirectory() stringByAppendingPathComponent:@"Library"]
						 stringByAppendingPathComponent:@"Application Support"]
						 stringByAppendingPathComponent:@"Oolite"]
					    stringByAppendingPathComponent:@"AddOns"],
					  [[[[NSBundle mainBundle] bundlePath]
						 stringByDeletingLastPathComponent]
					    stringByAppendingPathComponent:@"AddOns"],

#elif OOLITE_WINDOWS
					  @"../AddOns",
#else	
					  @"AddOns",
#endif

#if !OOLITE_WINDOWS
					  [[NSHomeDirectory()
						stringByAppendingPathComponent:@".Oolite"]
					   stringByAppendingPathComponent:@"AddOns"],
#endif
						nil];
for Linux we'd have even the branch

Code: Select all

#else
@"Addons"
#endif
for the first #if clause, or the one for the last #if clause.
For me, the second (which translates to $HOME/.Oolite/AddOns) is the canon one for Linux, while the first (relative to pwd) is a bit less reliable (it's actually the reason I was concerned with the ESPEAK_DATA_PATH not being honored).
I'd guess the "GNUstep" versions are part of how the official wrapper setup things when installing Oolite on Linux from the *.run archive. That is, maybe, the wrapper launches Oolite from ~/GNUstep/Applications/Oolite, such that @"Addons" is relative to that folder.
Commander_X
---- E L I T E ----
---- E L I T E ----
Posts: 736
Joined: Sat Aug 09, 2014 4:16 pm

Re: New Linux AppImage and source builds to test

Post by Commander_X »

I've got the chance to try the AppImage build on a Slackware-current live image (Nov 7, 2025) I have around, and things look quite well. Oh, and we've advanced into the modern libpng behaviors (not something I can say I missed -- but we only have 2 files, at least :-D ):

Code: Select all

19:51:32.223 [texture.load.png.warning]: ----- A PNG loading warning occurred for /tmp/.mount_OoliteGiOfdF/usr/bin/Resources/Textures/oolite_buoy_diffuse.png: iCCP: known incorrect sRGB profile.
19:51:32.223 [texture.load.png.warning]: ----- A PNG loading warning occurred for /tmp/.mount_OoliteGiOfdF/usr/bin/Resources/Textures/oolite_buoy_diffuse.png: iCCP: cHRM chunk does not match sRGB.
19:51:32.223 [texture.load.png.warning]: ----- A PNG loading warning occurred for /tmp/.mount_OoliteGiOfdF/usr/bin/Resources/Textures/oolite_buoy_illumination.png: iCCP: known incorrect sRGB profile.
19:51:32.223 [texture.load.png.warning]: ----- A PNG loading warning occurred for /tmp/.mount_OoliteGiOfdF/usr/bin/Resources/Textures/oolite_buoy_illumination.png: iCCP: cHRM chunk does not match sRGB.
One observation about the AddOns folder mentioned above, in Linux it's not created automatically (definitely not the one in ~/.Oolite).
I cannot comment too much on ManagedAddOns folder, as it's not a facility I'm using.
User avatar
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 658
Joined: Sun Jun 20, 2010 6:00 pm

Re: New Linux AppImage and source builds to test

Post by mcarans »

Commander_X wrote: Sat Dec 20, 2025 1:14 am
I've got the chance to try the AppImage build on a Slackware-current live image (Nov 7, 2025) I have around, and things look quite well. ...
One observation about the AddOns folder mentioned above, in Linux it's not created automatically (definitely not the one in ~/.Oolite).
I cannot comment too much on ManagedAddOns folder, as it's not a facility I'm using.
Good news that it works!

On Oolite's folders I had implemented yesterday changes to OOOXZManager.m:

Code: Select all

- (NSString *) extractPath
{
	NSArray *paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory,NSUserDomainMask,YES);
	NSString *appPath = [paths objectAtIndex:0];
	if (appPath != nil)
	{
		appPath = [appPath stringByAppendingPathComponent:@"Oolite"];
		appPath = [appPath stringByAppendingPathComponent:@"AddOns"];
		return appPath;
	}
	return nil;
}
And ResourceManager.m:

Code: Select all

+ (NSArray *)userRootPaths
{
	static NSArray			*sUserRootPaths = nil;
	
	if (sUserRootPaths == nil)
	{
		sUserRootPaths = [[NSArray alloc] initWithObjects:

#if OOLITE_WINDOWS
					  @"../AddOns",
#else
					  @"AddOns",
					  [[[[NSBundle mainBundle] bundlePath]
						 stringByDeletingLastPathComponent]
					    stringByAppendingPathComponent:@"AddOns"],
					  [[NSHomeDirectory()
						stringByAppendingPathComponent:@".Oolite"]
					   stringByAppendingPathComponent:@"AddOns"],
					  [[OOOXZManager sharedManager] extractPath],
#endif

		
						nil];
	}
	OOLog(@"searchPaths.debug",@"%@",sUserRootPaths);
	return sUserRootPaths;
}
This worked fine, but then I thought about Oolite folders more.

How about a bigger rethink of Oolite generated folders/files? For starters, there's no need to make 3 separate folders in the user's home. I've started a new discussion here: viewtopic.php?t=22004.
User avatar
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 658
Joined: Sun Jun 20, 2010 6:00 pm

Re: New Linux AppImage and source builds to test

Post by mcarans »

Lone_Wolf wrote: Fri Dec 19, 2025 11:33 am
That should be 'needs root rights' for the following reasons :
Sudo is not part of the arch base meta-package that should be present on all arch systems.
It is in the base-devel package, but the default sudoers file only contains comments/examples. Without user configuration sudo will do nothing on arch.

su on the other hand comes with utils-linux which is in base.
The only 100% guaranteed methods to get root access on Arch Linux are:
login as root or use su

Scripts run as the user that starts it. If the script uses sudo foo internally foo will be run as that other user in their environment ! This can cause all kinds of undesired effects and makes troubleshooting much harder.
(su has the same issues btw)
Packaging tools have special code to prevent such issues or don't use sudo/su/doas etc at all.

The simplest method to avoid those issues is separate anything that requires root rights from stuff that needs to run as user.
For your sourcebuild in /usr/local that would result in 2 scripts :
one to install deps that needs to be run with root rights.
A second one that runs as normal user and compiles oolite .
Ok done in this PR: https://github.com/OoliteProject/oolite/pull/535
User avatar
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 658
Joined: Sun Jun 20, 2010 6:00 pm

Re: New Linux AppImage and source builds to test

Post by mcarans »

Commander_X wrote: Fri Dec 19, 2025 4:54 pm
I'd guess the "GNUstep" versions are part of how the official wrapper setup things when installing Oolite on Linux from the *.run archive. That is, maybe, the wrapper launches Oolite from ~/GNUstep/Applications/Oolite, such that @"Addons" is relative to that folder.
You guessed right. The same effect can be achieved now by copying the AppImage in ~/GNUstep/Applications/Oolite and running it from there.
User avatar
MrFlibble
---- E L I T E ----
---- E L I T E ----
Posts: 507
Joined: Sun Feb 18, 2024 12:13 pm

Re: New Linux AppImage and source builds to test

Post by MrFlibble »

So that all makes sense.

I tried:

Code: Select all

cd ~/GNUstep/Applications/Oolite
ln -s ~/Downloads/Oolite_test_1.91.0.7728-25~19-7857806-x86_64.AppImage oolite-appimage
Running ./oolite-appimage finds the old unmanaged OXP's, because $pwd is ~/GNUstep/Applications/Oolite

However, executed from another directory (e.g. $HOME), as ~/GNUstep/Applications/Oolite/oolite-appimage, it doesn't find the OXP's.

A wrapper script like this will fix things for our symlink to appimage-$LatestVersion:

Code: Select all

#!/bin/bash
cd ~/GNUstep/Applications/Oolite && ./oolite-appimage $* || echo "Fail"
Such a script will (obviously) cause the appimage to find the OXP's in ~/GNUstep/Applications/Oolite/AddOns regardless of original $pwd. I realise this may not be the best possible solution, but it's a quick example, and works.

One thing the old installer did, which this clearly doesn't (yet) is to add an item to the apps menu (~/.local/share/applications/oolite.org.desktop)

Another consideration. Does this all play nice with Oolite-Starter app versions?
User avatar
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 658
Joined: Sun Jun 20, 2010 6:00 pm

Re: New Linux AppImage and source builds to test

Post by mcarans »

MrFlibble wrote: Sun Dec 21, 2025 11:15 pm
So that all makes sense.

I tried:

Code: Select all

cd ~/GNUstep/Applications/Oolite
ln -s ~/Downloads/Oolite_test_1.91.0.7728-25~19-7857806-x86_64.AppImage oolite-appimage
Running ./oolite-appimage finds the old unmanaged OXP's, because $pwd is ~/GNUstep/Applications/Oolite

However, executed from another directory (e.g. $HOME), as ~/GNUstep/Applications/Oolite/oolite-appimage, it doesn't find the OXP's.

A wrapper script like this will fix things for our symlink to appimage-$LatestVersion:

Code: Select all

#!/bin/bash
cd ~/GNUstep/Applications/Oolite && ./oolite-appimage $* || echo "Fail"
Such a script will (obviously) cause the appimage to find the OXP's in ~/GNUstep/Applications/Oolite/AddOns regardless of original $pwd. I realise this may not be the best possible solution, but it's a quick example, and works.

One thing the old installer did, which this clearly doesn't (yet) is to add an item to the apps menu (~/.local/share/applications/oolite.org.desktop)

Another consideration. Does this all play nice with Oolite-Starter app versions?
That's odd. If I cd to a random directory eg /usr, then run the appimage: ~/Downloads/Oolite_1.91.0.7743-251221-4f87626-x86_64.AppImage, it find the AddOns folder in ~/Downloads. Are you using the latest version?
User avatar
MrFlibble
---- E L I T E ----
---- E L I T E ----
Posts: 507
Joined: Sun Feb 18, 2024 12:13 pm

Re: New Linux AppImage and source builds to test

Post by MrFlibble »

mcarans wrote: Mon Dec 22, 2025 1:42 am
MrFlibble wrote: Sun Dec 21, 2025 11:15 pm
So that all makes sense.

I tried:

Code: Select all

cd ~/GNUstep/Applications/Oolite
ln -s ~/Downloads/Oolite_test_1.91.0.7728-25~19-7857806-x86_64.AppImage oolite-appimage
Running ./oolite-appimage finds the old unmanaged OXP's, because $pwd is ~/GNUstep/Applications/Oolite

However, executed from another directory (e.g. $HOME), as ~/GNUstep/Applications/Oolite/oolite-appimage, it doesn't find the OXP's.

A wrapper script like this will fix things for our symlink to appimage-$LatestVersion:

Code: Select all

#!/bin/bash
cd ~/GNUstep/Applications/Oolite && ./oolite-appimage $* || echo "Fail"
Such a script will (obviously) cause the appimage to find the OXP's in ~/GNUstep/Applications/Oolite/AddOns regardless of original $pwd. I realise this may not be the best possible solution, but it's a quick example, and works.

One thing the old installer did, which this clearly doesn't (yet) is to add an item to the apps menu (~/.local/share/applications/oolite.org.desktop)

Another consideration. Does this all play nice with Oolite-Starter app versions?
That's odd. If I cd to a random directory eg /usr, then run the appimage: ~/Downloads/Oolite_1.91.0.7743-251221-4f87626-x86_64.AppImage, it find the AddOns folder in ~/Downloads. Are you using the latest version?
I didn't have an AddOns folder in ~Downloads. I understand that it looks for one in the appimage's $pwd. It does not look in what was the legacy executable's normal $pwd, which in effect is a legacy location for a lot of users who formerly used the self-installer to $HOME.
User avatar
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 658
Joined: Sun Jun 20, 2010 6:00 pm

Re: New Linux AppImage and source builds to test

Post by mcarans »

MrFlibble wrote: Mon Dec 22, 2025 3:29 pm
I didn't have an AddOns folder in ~Downloads. I understand that it looks for one in the appimage's $pwd. It does not look in what was the legacy executable's normal $pwd, which in effect is a legacy location for a lot of users who formerly used the self-installer to $HOME.
Does it work if you put the appimage in ~/GNUstep/Applications/Oolite assuming the AddOns folder is ~/GNUstep/Applications/Oolite/AddOns, cd to another directory eg. /usr and then launch the appimage using ~/GNUstep/Applications/Oolite/Oolite_1.91.0.XXX-x86_64.AppImage?
User avatar
MrFlibble
---- E L I T E ----
---- E L I T E ----
Posts: 507
Joined: Sun Feb 18, 2024 12:13 pm

Re: New Linux AppImage and source builds to test

Post by MrFlibble »

mcarans wrote: Mon Dec 22, 2025 6:43 pm
MrFlibble wrote: Mon Dec 22, 2025 3:29 pm
I didn't have an AddOns folder in ~Downloads. I understand that it looks for one in the appimage's $pwd. It does not look in what was the legacy executable's normal $pwd, which in effect is a legacy location for a lot of users who formerly used the self-installer to $HOME.
Does it work if you put the appimage in ~/GNUstep/Applications/Oolite assuming the AddOns folder is ~/GNUstep/Applications/Oolite/AddOns, cd to another directory eg. /usr and then launch the appimage using ~/GNUstep/Applications/Oolite/Oolite_1.91.0.XXX-x86_64.AppImage?
Yes, of course... That's why I was looking at putting a small wrapper script in, to launch from a constant symlink to whatever the current version is, wherever that may be, but set $pwd to ~/GNUstep/Applications/Oolite before running it. Alas, simply putting the symlink into ~/GNUstep/Applications/Oolite doesn't work if launching with a different $pwd.

Another simple wrapper. This will only bother to change $pwd if the AddOns folder exists there.

Code: Select all

[ -d ~/GNUstep/Applications/Oolite/AddOns ]  && cd ~/GNUstep/Applications/Oolite
.local/bin/Oolite
The top line of that 'could' be inserted into the Appimage's Oolite launch wrapper script as an invisible workaround for the unwitting user migrating from old installer.
User avatar
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 658
Joined: Sun Jun 20, 2010 6:00 pm

Re: New Linux AppImage and source builds to test

Post by mcarans »

MrFlibble wrote: Mon Dec 22, 2025 10:42 pm
Yes, of course... That's why I was looking at putting a small wrapper script in, to launch from a constant symlink to whatever the current version is, wherever that may be, but set $pwd to ~/GNUstep/Applications/Oolite before running it. Alas, simply putting the symlink into ~/GNUstep/Applications/Oolite doesn't work if launching with a different $pwd.

Another simple wrapper. This will only bother to change $pwd if the AddOns folder exists there.

Code: Select all

[ -d ~/GNUstep/Applications/Oolite/AddOns ]  && cd ~/GNUstep/Applications/Oolite
.local/bin/Oolite
The top line of that 'could' be inserted into the Appimage's Oolite launch wrapper script as an invisible workaround for the unwitting user migrating from old installer.
Currently I'm doing:

Code: Select all

		const char *appimageEnv = SDL_getenv("APPIMAGE");
		NSString *appPath;

		if (appimageEnv)
		{
			// Running an AppImage
			appPath = [NSString stringWithUTF8String:appimageEnv];
			return [[appPath stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"AddOns"];
APPIMAGE returns the "(Absolute) path to AppImage file (with symlinks resolved)"

I could replace APPIMAGE with ARGV0. The difference is:

"ARGV0 provides information how the AppImage was called. When you call an AppImage through a symlink for instance, you can get the path to this symlink through ARGV0, while APPIMAGE would contain the absolute path to the file behind that symlink."

That sounds like it could solve the problem. What do you think?

The only other env var is OWD which is "Path to working directory at the time the AppImage is called". I could also add that one if useful.
User avatar
MrFlibble
---- E L I T E ----
---- E L I T E ----
Posts: 507
Joined: Sun Feb 18, 2024 12:13 pm

Re: New Linux AppImage and source builds to test

Post by MrFlibble »

mcarans wrote: Tue Dec 23, 2025 12:18 am
"ARGV0 provides information how the AppImage was called. When you call an AppImage through a symlink for instance, you can get the path to this symlink through ARGV0, while APPIMAGE would contain the absolute path to the file behind that symlink."

That sounds like it could solve the problem. What do you think?
From where I'm sitting, that sounds like the cleanest way to give old installer users a simple-ish workaround during the 'test phase', short of my proposed patch to the wrapper script which would be invisible to them and require no action.

Further... Could it be a fairly good idea to get the Appimage to drop stuff (if not already existent) into ~/.local to cause apps menu items to be created in a similar way to the installer? I'd suggest avoiding clashes with existing filenames from installers etc., and to ensure apps menu titles appear different so the testers know which they're launching. Perhaps it could appear as "Oolite (Appimage)", rather than "Oolite (oolite.space)".

Great work! Wish I had time at the moment to get properly re-immersed.
Post Reply