Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert old appimages to the new flatimage #57

Open
Blad3forc3 opened this issue Apr 4, 2024 · 4 comments
Open

Convert old appimages to the new flatimage #57

Blad3forc3 opened this issue Apr 4, 2024 · 4 comments

Comments

@Blad3forc3
Copy link

I have tried extracting an old appimage which was made with a 32bit wineprefix and substituting it into the flatimage wineprefix directly but it complains of a kernal32 error. IS there anyway to convert these to flatimage format without having to reinstall the game again?
Also what is the process to extract a flatimage?
WIth appimage all i had to do was run --appimage-extract
and then run appimagetool to create an appimage with any changes

@ruanformigoni
Copy link
Owner

ruanformigoni commented Apr 5, 2024

Hi @Blad3forc3 ! Issue acknowledged, I'm creating a simple script for this, will post here when it is finished.

Also what is the process to extract a flatimage?

Currently that is no direct method to extract, you can use:

# Mount
./game.flatimage fim-mount some-folder
# Copy
cp -r ./some-folder some-other-folder
# Unmount
fusermount -u some-folder

@Blad3forc3
Copy link
Author

Thanks Ruan. I'll try the fusermount option. Just be handy now and again. If I've extracted the contents of the flat image would I just need to replace the contents of the flat image with the contents of my game image build folder and re-run game image to pack it again?

@ruanformigoni
Copy link
Owner

No problem. It would not be that simple because the games are stored in compressed filesystems inside flatimage. The flatimage method of doing things does not require to extract everything to modify like it was with AppImage. Here are some examples, (make a backup before trying):

List the filesystems inside the image

$ ./tomb-raider-collection.flatimage fim-dwarfs-list
tomb-raider-anniversary
tomb-raider-legend
tomb-raider-underworld
usr
wine

Extract a game from the flatimage to the current directory (from the previous list):

./tomb-raider-collection.flatimage fim-exec cp /fim/dwarfs/tomb-raider-anniversary.dwarfs .

Extract a dwarfs file to a folder:

mkdir tomb-raider-anniversary
tomb-raider-collection.flatimage fim-exec dwarfsextract -i tomb-raider-anniversary.dwarfs -o tomb-raider-anniversary

Move the tomb-raider-anniversary directory and the tomb-raider-anniversary.dwarfs filesystem to the build directory of gameimage. On the creator, create click on '+', for adding a new game, type the same name of the directory/dwarfs file tomb-raider-anniversary and it should detect the folder and executables inside, without having to reinstall.


Update wine, with a new version downloaded from the gameimage-runners github. The name of the filesystem should be wine.dwarfs, the last argument is the mountpoint, games look for wine in this location.

./tomb-raider-collection.flatimage fim-dwarfs-add wine.dwarfs /fim/mount/wine

Note that I have not exposed this features yet because it is a bit experimental, if it is working I recommend to just leave it.

@Blad3forc3
Copy link
Author

Blad3forc3 commented Apr 5, 2024

Thanks Ruan!

It does actually work fine.
I managed to extract and rebuild the flatimage following your exact instructions.
I have also managed to write a basic script and desktop file to add to my dolphin right click menu , kservicemenu, to automate this in the folder of the FlatImage I want to change

Great Stuff!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants