BeamMP-Launcher icon indicating copy to clipboard operation
BeamMP-Launcher copied to clipboard

Add Linux AppImage generation support

Open jstefanelli opened this issue 2 months ago • 10 comments

Adds optional AppImage generation via appimagetool on Linux.

Only 1 code change was necessary to make AppImage work: In Startup.cpp, disable name checking if running from inside AppImage

Other changes are: Added AppImage.cmake to generate AppDir and AppImage Includes icon (required for AppImage)

The target to generate the AppImage (which is not build by default) is Launcher_AppImage, and it generates the file Launcher.AppImage in the build directory


By creating this pull request, I understand that code that is AI generated or otherwise automatically generated may be rejected without further discussion. I declare that I fully understand all code I pushed into this PR, and wrote all this code myself and own the rights to this code.

jstefanelli avatar Oct 23 '25 19:10 jstefanelli

Sorry for the delay. That's waay too big of a file. I think the standard icon sizes for appImages go up to 1024x1024.

jstefanelli avatar Oct 25 '25 23:10 jstefanelli

@jstefanelli Thanks for this PR!

Friend on mine is on Linux, cant compile this project because of some weird error that neither of us cant figure out, so an AppImage would be really nice to have. Do you have some basic build instructions for your branch? I would like to test this and build an AppImage for my friend, and while im at it review the PR.

ToasterUwU avatar Oct 26 '25 23:10 ToasterUwU

Hi @ToasterUwU, the build instructions are almost the same as usual. For the AppImage you need 2 things: make sure appimagetool is in your PATH, and then, when building with cmake, make sure to set the target to Launcher_AppImage. In practice: cmake --build bin -t Launcher_AppImage with appimagetool in PATH

jstefanelli avatar Oct 26 '25 23:10 jstefanelli

@ToasterUwU

because of some weird error

Could you send this error? If it doesn't compile normally I doubt it will work as an AppImage.

WiserTixx avatar Oct 27 '25 08:10 WiserTixx

@WiserTixx I'm not familira with GH, I may have hit "resolve conversation" too soon, thought it was a me only thing. Apologies.

jstefanelli avatar Oct 27 '25 12:10 jstefanelli

@jstefanelli So i did everything you described i should do, but i get an error that the target Launcher_AppImage doesnt exist.

gmake: *** No rule to make target 'Launcher_AppImage'.  Stop.

I have no prior experience with cmake, so i dont know if its normal that "gmake" is complaining to me instead of cmake, when i ran cmake.

So its either user error, or the target actually doesnt exist.

ToasterUwU avatar Oct 27 '25 23:10 ToasterUwU

I looked over the changed files, and i cant really see anything that would add this extra target, but like i said, no prior experience.

ToasterUwU avatar Oct 27 '25 23:10 ToasterUwU

@ToasterUwU CMakeLists.txt lines 35 and 36 in my first commit. The target only exists if appimagetool is found by CMake.

jstefanelli avatar Oct 27 '25 23:10 jstefanelli

Mhh interesting. Then it doesn't find it, even tho it is in PATH

Had to do it temporarily in PATH with a wrapper script since appimagetool only exists as an appimage it seems.

ToasterUwU avatar Oct 28 '25 00:10 ToasterUwU

Friend on mine is on Linux, cant compile this project because of some weird error that neither of us cant figure out

https://github.com/gabriele2000/scripts-collection/blob/main/beammp-autoinstall.sh

gabriele2000 avatar Oct 30 '25 23:10 gabriele2000