gameimage icon indicating copy to clipboard operation
gameimage copied to clipboard

Help for people running older games in appimages

Open Blad3forc3 opened this issue 2 years ago • 2 comments

This isnt an issue more of a help on my experience

Here is the step by step i promised on the appimages i have created that work. I install a game to its own prefix first using regular wine and make sure it works before starting the gameimage setup. I also use cdemu to mount any game cd images i use within the gameimage appimage i am creating. (https://launchpad.net/~cdemu/+archive/ubuntu/ppa)

  1. Type export GIMG_WINE_DIST=staging
  2. Set up your gameimage directory as stated on the main how to (https://gitlab.com/formigoni/gameimage#usage). I also put a program called nglide (https://www.zeus-software.com/downloads/nglide) in the rom folder which is needed for some of the old games i am using but any exe is required in the rom folder or the process will fail later. I use one with a setup procedure
  3. Run the gameimage setup (./GameImage.AppImage --platform="wine" --name="game name" --dir="path-to-gameimage-setup-folder")
  4. Once it has download the necessary components select the architecture win32 or win64 (Personally i install my games in a separate 32bit wine prefix with "WINEARCH=win32 WINEPREFIX="path-to-wine-prefix" before i attempt to put it in an appimage so i select 1 for win32.
  5. Select yes to download wineprefix
  6. Once you get to this stage: [] configuration phase, use it to install dependencies, type continue to skip [] Commands are 'winetricks ...' and 'wine ...', example 'wine winecfg' [*] You can also type any bash cmd, e.g., 'ls -l' This is where i open the folder inside your appimage you are creating build/AppDir/app/wine/ where you will see the standard folders inside a wineprefix (drive_c, dosdevices, system.reg etc) and delete all the contents and i open a separate window in my file manager and open the wineprefix i originally installed the game to with the same folder and files and copy these into the gameimage build/AppDir/app/wine folder.
  7. Optional If the game has a cd image of the game to run it will need copying to the build/AppDir/app folder
  8. Type continue at the config> prompt
  9. You will now be presented with this [] Showing executable files in path-to-your-gameimage-setup-folder/rom [] Select the file to install [*] Selected "path-to-your-selected-exe" file that you added to the rom folder earlier. As i said if you didnt put some kind of exe file in the rom folder it will fail here. Let this setup exe file start but just cancel it at the first chance.
  10. You will now be presented with a list of exe files from the wineprefix you copied over earlier. Select the number corresponding to the exe file you want to run
  11. You will be prompted with: [*] AppRun written, make further changes to it if you desire, then press enter... At this point if the game doesnt need a cd image to auto mount you can select enter and the appimage will be created If you need an image mounted then i edit the apprun file that is in the gameimage/build/AppDir folder and add this line after the line in the apprun file that reads

Mount prefix with unionfs

"$APPDIR/usr/bin/unionfs" -o uid="$(id -u)",gid="$(id -g)" -ocow "$WINEPREFIX_RW"=RW:"$WINEPREFIX_RO"=RO "$WINEPREFIX"

if ! command -v cdemu &>/dev/null; then notify-send "cdemu not found, please install it to use the gameimage" exit 1 fi cdemu load 0 "$APPDIR/app/path-to-cd-image.cue"

I also add this at the end of the apprun file to automatically unmount the cd image after closing the game

cdemu unload 0

As a side note, if you use dgvoodoo to enhance any older games graphics you can configure all this in your original wineprefix you installed the game to and add this line to your apprun file (as an example, yours maybe slightly different)

export WINEDLLOVERRIDES="d3d8,d3dimm,ddraw=n,b"

I put this just after the automount cd image line in the apprun file.

I hope this helps!

Blad3forc3 avatar Feb 17 '23 12:02 Blad3forc3

Thanks for taking the time to make this :)

ruanformigoni avatar Feb 19 '23 06:02 ruanformigoni

No problem. I was thinking about the prebuilt cdemu appimage, it wouldnt work from inside the appimage as cdemu requires a kernel module. What command would work from inside the appimage to mount the cd image then unmount after exiting the appimage?

Blad3forc3 avatar Feb 19 '23 19:02 Blad3forc3

Closing this issue since AppImage is not supported anymore. Cd image mounting is tracked in #53 .

ruanformigoni avatar May 06 '24 12:05 ruanformigoni