How to put wineprefix directory in AppImage
Hi,
I would like to make a wine AppImage with an included wineprefix (which contains a windows game). It also should start the game exe file when executing the AppImage.
How can I do that? And what happens with savegames? My idea is, the AppImage creates a directory where the AppImage lies and writes files like savegames to the created directory.
Thank you very much!
You can't really have the wineprefix inside of your AppImage, it has to be writable.
You can store a read-only version of the wineprefix that you extract on the first run. Your savedata can then either be written there, or if it's a customisable path, you can set it to save anywhere you'd like.
In order to have the AppImage run your game's exe, you need to modify the wrapper script (the one inside the AppImage). You can see the file structure by extracting the AppImage contents
./MyAppImage.AppImage --appimage-extract
So you can plop your wineprefix in that directory, modify your wrapper script to extract and set the wineprefix environment variable to the extracted prefix and then switch out the "normal" wine call for a wine call with your game's .exe. And then repackage the AppImage with AppImagetool (or any other bundling tool)
You can check my AppImage of cnctsun which have a version with wineprefix inside AppImage and also ships dotnet, wine AppImages within it.
you can make changes in wineprefix only before adding it in AppImage it may break things with readonly in some cases.
Thanks, I will check it out!