mirror of
https://notabug.org/litucks/torzu.git
synced 2025-04-24 09:05:13 +00:00
Tested as working. It is self-contained with no dependencies, uses relative paths, downloads what it needs on the fly, requires the main repo to already be cloned and built for native linux, so it doesn't need to be a separate repo. - Copied the `build.sh` file and `assets` folder into a new `AppImageBuilder` folder on the torzu repo root. - Created a `AppImage-build.sh` shortcut on the repo root that checks if an executable is already in `build/bin`. If it doesn't find one, it prompts the user to build a native version first. If it does find one: - enters the `AppImageBuilder` folder - runs the command `./build.sh ../build ./torzu.AppImage`, using the correct relative path to the build folder (if they followed the build instructions as directed) - moves the resulting `torzu.AppImage` executable back into the main `torzu` folder - returns back to the main folder and shows current directory contents - Added relevant entries to `.gitignore` - Added AppImage section to linux build guide, with some clarifying explanation for Flatpaks, and section separators Co-authored-by: anon <anon@no.reply> Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/78 Co-authored-by: anon <anon@noreply.localhost> Co-committed-by: anon <anon@noreply.localhost>
43 lines
1.1 KiB
Bash
Executable File
43 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
FILE=build/bin/yuzu
|
|
if test -f "$FILE"; then
|
|
# remove any previously made AppImage in the base torzu git folder
|
|
rm ./torzu.AppImage
|
|
|
|
# enter AppImage utility folder
|
|
cd AppImageBuilder
|
|
|
|
# run the build script to create the AppImage
|
|
# (usage) ./build.sh [source torzu build folder] [destination .AppImage file]
|
|
./build.sh ../build ./torzu.AppImage
|
|
|
|
FILE=./torzu.AppImage
|
|
if test -f "$FILE"; then
|
|
# move the AppImage to the main torzu folder
|
|
mv torzu.AppImage ..
|
|
# return to main torzu folder
|
|
cd ..
|
|
# show contents of current folder
|
|
echo
|
|
ls
|
|
# show AppImages specifically
|
|
echo
|
|
ls *.AppImage
|
|
echo
|
|
echo "'torzu.AppImage' is now located in the current folder."
|
|
echo
|
|
else
|
|
cd ..
|
|
echo "AppImage was not built."
|
|
fi
|
|
else
|
|
echo
|
|
echo "$FILE does not exist."
|
|
echo
|
|
echo "No yuzu executable found in the /torzu/build/bin folder!"
|
|
echo
|
|
echo "You must first build a native linux version of torzu before running this script!"
|
|
echo
|
|
fi
|