diff --git a/create_appimage.sh b/create_appimage.sh index ffbde51..da8b47f 100755 --- a/create_appimage.sh +++ b/create_appimage.sh @@ -1,5 +1,9 @@ #!/bin/bash +set -e + +cd Ishiiruka + ZSYNC_STRING="gh-releases-zsync|Birdthulu|FPM-AppImage|latest|Faster_Project_Plus-x86_64.AppImage.zsync" LINUXDEPLOY_PATH="https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous" @@ -14,7 +18,7 @@ UPDATETOOL_PATH="https://github.com/AppImage/AppImageUpdate/releases/download/co UPDATETOOL_FILE="appimageupdatetool-x86_64.AppImage" UPDATETOOL_URL="${UPDATETOOL_PATH}/${UPDATETOOL_FILE}" -APPDIR_BIN="./AppDir/usr/bin" +APPDIR_BIN="./build/AppDir/usr/bin" # Grab various appimage binaries from GitHub if we don't have them if [ ! -e ./Tools/linuxdeploy ]; then @@ -30,27 +34,14 @@ if [ ! -e ./Tools/appimageupdatetool ]; then chmod +x ./Tools/appimageupdatetool fi -# Delete the AppDir folder to prevent build issues -rm -rf ./AppDir/ - -# Build the AppDir directory for this image -mkdir -p AppDir -./Tools/linuxdeploy \ - --appdir=./AppDir \ - -e ./build/Binaries/ishiiruka \ - -d ./Data/ishiiruka.desktop \ - -i ./Data/ishiiruka.png +./Tools/linuxdeploy --appdir=./build/AppDir --executable ./build/Binaries/ishiiruka -d ./Data/ishiiruka.desktop -i ./Data/ishiiruka.png # Add the Sys dir to the AppDir for packaging cp -r Data/Sys ${APPDIR_BIN} -# echo "Using Netplay build config" - -# rm -f ${NETPLAY_APPIMAGE_STRING} - # Package up the update tool within the AppImage -cp ./Tools/appimageupdatetool ./AppDir/usr/bin/ +cp ./Tools/appimageupdatetool ${APPDIR_BIN} # Bake an AppImage with the update metadata -UPDATE_INFORMATION="${ZSYNC_STRING}" \ - ./Tools/linuxdeploy-update-plugin --appdir=./AppDir/ +export UPDATE_INFORMATION="${ZSYNC_STRING}"; +./Tools/linuxdeploy-update-plugin --appdir=./build/AppDir/; diff --git a/faster-project-plus-2.2.desktop b/faster-project-plus-2.2.desktop deleted file mode 100755 index 7423a0a..0000000 --- a/faster-project-plus-2.2.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Type=Application -GenericName=Wii/GameCube Emulator -Comment=Ishiiruka fork for SSBPM -Categories=Emulator;Game; -Icon=/home/kaloshade/Code/FPM-AppImage/bin/ishiiruka.png -Keywords=ProjectM;Project M;ProjectPlus;Project Plus;Project+ -Version=2.15 -Name=Faster Project Plus -Exec=/home/kaloshade/Code/FPM-AppImage/bin/ishiiruka diff --git a/setup b/setup deleted file mode 100755 index aac115e..0000000 --- a/setup +++ /dev/null @@ -1,407 +0,0 @@ -#!/bin/sh - -# --- Stops the script if errors are encountered. --- -set -e -# --- -# -# --- Based Off of/Ripped from https://github.com/FasterMelee/FasterMelee-installer/ Thank you Faster Melee Team! -# --- - -# if [ -f "./setup" ] && [ -z "${IN_NIX_SHELL++}" ]; then -# echo "You are running a hosted copy of the script. Please *delete the local file 'setup'* and run" -# echo "" -# echo "sh -c \"\$(curl -Ls https://github.com/Birdthulu/FPM-Installer/raw/master/setup)" -# echo "" -# echo "to ensure you have the latest version!" -# exit -# fi - -# --- Attempts to determine the number of cores in the CPU. --- -# Source: https://gist.github.com/jj1bdx/5746298 -# Linux and similar... -CPUS=$(getconf _NPROCESSORS_ONLN 2>/dev/null) -# FreeBSD and similar... -[ -z "$CPUS" ] && CPUS=$(getconf NPROCESSORS_ONLN) -# Solaris and similar... -[ -z "$CPUS" ] && CPUS=$(ksh93 -c 'getconf NPROCESSORS_ONLN') -# Give up... -[ -z "$CPUS" ] && CPUS=1 -# --- - -# --- define custom config links here! -FPPVERSION="" # name of FPP version, used in folder name -COMMITHASH="" # full commit hash -GITCLONELINK="" # Version of Ishiiruka -CONFIGLINK="" # Packed configs, can be found under config/ or config/legacy/ -# --- - -# --- delete all "FasterProjectPlus" folders filled with incomplete installations -echo "" -echo "Attempting to delete incomplete installations of FPP..." -for f in FasterProjectPlus*; do - if [ -d "${f}" ] && [ ! -d "$f/bin" ]; then - echo "Found incomplete installation at $f/, deleting." - rm -rf "$f" # is incomplete if bin/ doesn't exist - fi -done -# --- - -# --- ask if you want to delete all remaining FPP* folders -echo "" -echo "Would you like to overwrite ALL of your previous installations? (y/N)" -read -r RESP -if [ "$RESP" = "y" ] || [ "$RESP" = "Y" ]; then - echo "Are you sure? This action is not reversible! (y/N)" - read -r RESP - if [ "$RESP" = "y" ] || [ "$RESP" = "Y" ] ; then - rm -rf FasterProjectPlus*/ - echo "Deleted all FPP folders!" - fi -else - echo "No changes made!" -fi -# --- - -# --- ask if the user is on Ubuntu 20.04 or a derivative -echo "" -echo "Are you running Ubuntu 20.04 or downstream distribution? This applies a patch allowing the installer to work. (y/N)" -read -r RESP -if [ "$RESP" = "y" ] || [ "$RESP" = "Y" ]; then - echo "Applying patch!" - UBPATCH=1 -else - echo "Will not apply patch." - UBPATCH=0 -fi -# --- - -if [ "$UBPATCH" != 1 ]; then - # --- ask if the user is on Arch or a derivative - echo "" - echo "Are you running Arch or downstream distribution? This applies a patch allowing the installer to work. (y/N)" - read -r RESP - if [ "$RESP" = "y" ] || [ "$RESP" = "Y" ]; then - echo "Applying patch!" - ARPATCH=1 - else - echo "Will not apply patch." - ARPATCH=0 - fi -fi -# --- - - -# --- if custom links aren't defined, prompt to choose a version -if [ -z "$FPPVERSION" ] || [ -z "$COMMITHASH" ] || [ -z "$GITCLONELINK" ] || [ -z "$CONFIGLINK" ]; then #ORs used to ensure everything filled out - echo "" - echo "Which version of Faster Project Plus would you like to install? (default: 1)" - echo "1.) 2.15 (Latest version)" - echo "2.) 2.1.1" - read -r RESP - if [ "$RESP" -eq 2 ] 2> /dev/null; then - FPPVERSION="2.1.1" - CONFIGNAME="fppconfig" - COMMITHASH="9054c90d9170f47a707933eac8cf0d67d553e951" - CONFIGLINK="https://github.com/Birdthulu/FPM-Installer/raw/master/config/legacy/$FPPVERSION-$CONFIGNAME.tar.gz" - GITCLONELINK="https://github.com/Birdthulu/Ishiiruka" - SdCardFileName="ProjectPlusSdCard211.tar.gz" - SdCardDlHash="7f7q8a6m8plyq16" - SdCardLink="http://www.mediafire.com/file/$SdCardDlHash/$SdCardFileName/file" - else - FPPVERSION="2.15" - CONFIGNAME="fppconfig" - COMMITHASH="d6800a124dbba118e297188900d07adfea661b87" - CONFIGLINK="https://github.com/Birdthulu/FPM-Installer/raw/master/config/$FPPVERSION-$CONFIGNAME.tar.gz" - GITCLONELINK="https://github.com/Birdthulu/Ishiiruka" - SdCardFileName="ProjectPlusSdCard215.tar.gz" - SdCardDlHash="0anckw4hrxlqn5i" - SdCardLink="http://www.mediafire.com/file/$SdCardDlHash/$SdCardFileName/file" - fi - echo "Installing version $FPPVERSION!" -else - echo "" - echo "Attempting to install version $FPPVERSION!" -fi - -# Set FOLDERNAME based on FPP version -FOLDERNAME="FasterProjectPlus-${FPPVERSION}" - -# --- check for previously installed version, ask if overwrite is wanted -if [ -d "$FOLDERNAME" ]; then - echo " - FPP Folder with same version found! Would you like to overwrite? (y/N)" - read -r RESP - if [ "$RESP" = "y" ] || [ "$RESP" = "Y" ]; then - echo "Are you sure? This action is not reversible! (y/N)" - read -r RESP - if [ "$RESP" = "y" ] || [ "$RESP" = "Y" ] ; then - rm -r "$FOLDERNAME" - echo "Deleted!" - else - echo "Quitting!" - exit - fi - else - echo "Quitting!" - exit - fi -fi -# --- - - -# --- prompt to install adapter support -echo " -Would you like to install udev rules for your Wii U adapter? (y/N) (Necessary for reduced-lag direct adapter connection)" -read -r RESP -if [ "$RESP" = "y" ] || [ "$RESP" = "Y" ]; then - if [ ! -z "${IN_NIX_SHELL++}" ]; then - echo "please add services.udev.extraRules = ''" - echo 'SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="0337", MODE="0666";' - echo 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2300", SYMLINK+="model01", ENV{ID_MM_DEVICE_IGNORE}:="1", ENV{ID_MM_CANDIDATE}:="0";' - echo 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2301", SYMLINK+="model01", ENV{ID_MM_DEVICE_IGNORE}:="1", ENV{ID_MM_CANDIDATE}:="0";' - echo "'';" - else - sudo rm -f /etc/udev/rules.d/51-gcadapter.rules # remove even if doesn't exist - echo 'SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="0337", MODE="0666"' | sudo tee /etc/udev/rules.d/51-gcadapter.rules > /dev/null # pipe to write-protected file, remove STDOUT - sudo udevadm control --reload-rules - echo "Rules added!" - fi -else - echo "No changes made!" -fi -# --- - -# --- prompt to queue shortcut creation for later -echo " -Would you like to make a desktop shortcut? (Y/n)" -read -r RESP -if [ ! "$RESP" = "n" ] && [ ! "$RESP" = "N" ]; then - SHORTCUTBOOL=1 - echo "Desktop shortcut queued!" -else - SHORTCUTBOOL=0 - echo "No changes made!" -fi -# --- - -# --- prompt for -j flag (# of cores utilized) -echo "" -echo "CPU Threads detected: $CPUS" -echo "How many threads would you like to use to compile? (passed to make as -j flag, default: $CPUS, range: 1 - $(( CPUS )))" -read -r RESP -if [ "$RESP" -ge 1 ] 2> /dev/null && [ "$RESP" -le $((CPUS + 1)) ] 2> /dev/null; then - CPUS=$RESP -else - CPUS=$CPUS -fi -echo "Using $CPUS thread(s)!" -# --- - -# --- enter folder, download and extract needed files -echo "" -mkdir "$FOLDERNAME" && cd "$FOLDERNAME" -echo "Downloading config files..." -curl -LO# $CONFIGLINK -echo "Extracting config files..." -tar -xzf "$FPPVERSION-$CONFIGNAME.tar.gz" --checkpoint-action='exec=printf "%d/410 records extracted.\r" $TAR_CHECKPOINT' --totals -rm "$FPPVERSION-$CONFIGNAME.tar.gz" -echo "" -echo "Downloading tarball..." -curl -LO# "$GITCLONELINK/archive/$COMMITHASH.tar.gz" -echo "Extracting tarball..." -tar -xzf "$COMMITHASH.tar.gz" --checkpoint-action='exec=printf "%d/12130 records extracted.\r" $TAR_CHECKPOINT' --totals -rm "$COMMITHASH.tar.gz" -echo "" #spacing -mv "Ishiiruka-$COMMITHASH" Ishiiruka -cd Ishiiruka - -# --- Patch tarball to display correct hash to other netplay clients -echo "Patching tarball..." -sed -i "s|\${GIT_EXECUTABLE} rev-parse HEAD|echo ${COMMITHASH}|g" CMakeLists.txt # --set scm_rev_str everywhere to actual commit hash when downloaded -sed -i "s|\${GIT_EXECUTABLE} describe --always --long --dirty|echo FM v$FPPVERSION|g" CMakeLists.txt # ensures compatibility w/ netplay -sed -i "s|\${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD|echo HEAD|g" CMakeLists.txt -# --- - -# --- Patch DiscExtractor.h -echo "Patching DiscExtractor.h" -sed -i "s|#include |#include \n#include |g" Source/Core/DiscIO/DiscExtractor.h -# --- - -# --- Set compiler to ggc-8 for Arch -if [ "$ARPATCH" -eq 1 ]; then - echo "Setting compiler to gcc-8 for Arch based distros" - # Set C compiler and C++ compiler to GCC8 - export CC="gcc-8" - export CXX="g++-8" -else - echo "Skipping patch for Arch based distros" -fi -# --- - -# --- Patch wxWidgets3 for Ubuntu 20.04 -if [ "$UBPATCH" -eq 1 ]; then - echo "Patching wxWidgets3 for Ubuntu 20.04 based distros" - sed -i "s| OR NOT X11_Xinerama_FOUND||g" Externals/wxWidgets3/CMakeLists.txt - sed -i "s|needs Xinerama and|needs|g" Externals/wxWidgets3/CMakeLists.txt - sed -i "s|\t\t\${X11_Xinerama_LIB}||g" Externals/wxWidgets3/CMakeLists.txt -else - echo "Skipping patch for Ubuntu 20.04 based distros" -fi -# --- - - -# --- move wx files into source -cp Externals/wxWidgets3/include/wx Source/Core/ -r -cp Externals/wxWidgets3/wx/* Source/Core/wx/ -# --- - -# --- move necessary config files into the build folder -echo "Adding FPP config files..." -mkdir build && cd build -mv ../../Binaries . -mv ../Data/ishiiruka.png Binaries/ -# --- - -# --- cmake and compile -echo "cmaking..." -if [ ! -z "${IN_NIX_SHELL++}" ]; then - cmake .. -DLINUX_LOCAL_DEV=true -DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib}/lib/glib-2.0/include -DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2}/lib/gtk-2.0/include -DGTK2_INCLUDE_DIRS=${gtk2}/lib/gtk-2.0 -DENABLE_LTO=True -DCMAKE_INSTALL_PREFIX=/usr -else - cmake .. -DLINUX_LOCAL_DEV=true -DCMAKE_INSTALL_PREFIX=/usr -fi -echo "Compiling..." -make -j $CPUS -s -# --- - -# --- Download the sd card tarball, extract it, move it to proper folder, and delete tarball -# credit to https://superuser.com/a/1517096 superuser.com user Zibri -echo "Downloading sd card" -url=$(curl -Lqs0 "$SdCardLink" | grep "href.*download.*media.*"| grep "$SdCardFileName" | cut -d '"' -f 2) - -echo "Attempting with Axel"; -if [ -x "$(command -v axel)" ]; then - axel "$url" -a -n $CPUS; -elif [ -x "$(command -v aria2c)" ]; then - echo "Axel command failed, dependency may be missing, attempting with aria2c"; - aria2c -x$CPUS "$url" -else - echo "Axel and Aria2c command failed, dependency may be missing, reverting to slowest way possible"; - wget "$url" -fi - -echo "Extracting sd card" -tar -xzf "$SdCardFileName" --checkpoint-action='exec=printf "%d/12130 records extracted.\r" $TAR_CHECKPOINT' --totals -mv "sd.raw" "Binaries/User/Wii/sd.raw" -rm "$SdCardFileName" -# --- - -# # --- Delete created files and old symlinks, isolate Binaries to their own folder -# echo "Cleaning up..." -# cd ../.. -# mv Ishiiruka/build/Binaries/ bin/ -# rm -rf Ishiiruka # -f required to remove git history -# rm -f ../launch-faster-project-plus # -f required if shortcuts do not exist -# rm -f ../launch-fpp -# # --- - -rm AppDir -r; -mkdir AppDir; - -make install DESTDIR=AppDir; -LINUXDEPLOY_PATH="https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous" -LINUXDEPLOY_FILE="linuxdeploy-x86_64.AppImage" -LINUXDEPLOY_URL="${LINUXDEPLOY_PATH}/${LINUXDEPLOY_FILE}" - -UPDATEPLUG_PATH="https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous" -UPDATEPLUG_FILE="linuxdeploy-plugin-appimage-x86_64.AppImage" -UPDATEPLUG_URL="${UPDATEPLUG_PATH}/${UPDATEPLUG_FILE}" - -UPDATETOOL_PATH="https://github.com/AppImage/AppImageUpdate/releases/download/continuous" -UPDATETOOL_FILE="appimageupdatetool-x86_64.AppImage" -UPDATETOOL_URL="${UPDATETOOL_PATH}/${UPDATETOOL_FILE}" - -DESKTOP_APP_URL="https://github.com/project-slippi/slippi-desktop-app" -DESKTOP_APP_SYS_PATH="./slippi-desktop-app/app/dolphin-dev/overwrite/Sys" - -APPDIR_BIN="./AppDir/usr/bin" - -function download_file { - url = $1 - output = $2 - echo "Attempting with Axel"; - if [ -x "$(command -v axel)" ]; then - axel "$url" -a -n $CPUS --output $output; - elif [ -x "$(command -v aria2c)" ]; then - echo "Axel command failed, dependency may be missing, attempting with aria2c"; - aria2c -x $CPUS "$url" -o $output; - else - echo "Axel and Aria2c command failed, dependency may be missing, reverting to slowest way possible"; - wget "$url" -O $output; - fi -} - -# Grab various appimage binaries from GitHub if we don't have them -if [ ! -e ./linuxdeploy ]; then -fi -if [ ! -e ./linuxdeploy-update-plugin ]; then - aria2c -x 8 ${LINUXDEPLOY_URL} -o ./linuxdeploy - chmod +x ./linuxdeploy - aria2c -x 8 ${UPDATEPLUG_URL} -o ./linuxdeploy-update-plugin - chmod +x ./linuxdeploy-update-plugin - aria2c -x 8 ${UPDATETOOL_URL} -o ./appimageupdatetool - chmod +x ./appimageupdatetool -fi -if [ ! -e ./appimageupdatetool ]; then -fi - -OUTPUT="FasterProjectPlus-x86_64.AppImage" ./linuxdeploy --appdir AppDir/ --output appimage -i ./Ishiiruka/bin/ishiiruka.png -d ././Ishiiruka/bin/faster-project-plus.desktop -# # --- Get Main path and Set Up path variables for config/Dolphin.ini -# echo "Setting config paths" -# MainDir=../AppDir/usr/bin" -# LauncherDir=$MainDir"/Launcher" -# GamesDir=$MainDir"/Games" -# SDPath=$MainDir"/User/Wii/sd.raw" -# IsoPath=$GamesDir"/RSBE01.iso" -# ConfigPath=$MainDir"/User/Config/Dolphin.ini" -# # --- - -# # --- Set LauncherDir, GamesDir, SdCardPath, and Default ISO path in config/Dolphin.ini -# sed -i -e "s|LauncherDir|${LauncherDir}|" $ConfigPath -# sed -i -e "s|GamesPath|${GamesDir}|" $ConfigPath -# sed -i -e "s|SDPath|${SDPath}|" $ConfigPath -# sed -i -e "s|ISODirPath|${IsoPath}|" $ConfigPath -# # --- - -# # --- create symlink to newly compiled dolphin-emu. if queued, create shortcut. -# echo "Creating shortcuts..." -# ln -s "$FOLDERNAME/bin/ishiiruka" ../launch-fpp -# if [ "$SHORTCUTBOOL" -eq 1 ] && [ -d ~/.local/share/applications ]; then -# rm -f ~/.local/share/applications/faster-project-plus-$FPPVERSION.desktop # remove old shortcut -# rm -f ~/Desktop/faster-project-plus-$FPPVERSION.desktop -# touch ~/.local/share/applications/faster-project-plus-$FPPVERSION.desktop # fixes very rare tee bug? -# EXEPATH="$(pwd)/bin" -# FPPNAME="Faster Project Plus $FPPVERSION" -# echo "[Desktop Entry] -# Type=Application -# GenericName=Wii/GameCube Emulator -# Comment=Ishiiruka fork for SSBPM -# Categories=Emulator;Game; -# Icon=$EXEPATH/ishiiruka.png -# Keywords=ProjectM;Project M;ProjectPlus;Project Plus;Project+ -# Version=$FPPVERSION -# Name=$FPPNAME -# Exec=$EXEPATH/ishiiruka" | tee ~/.local/share/applications/faster-project-plus-$FPPVERSION.desktop > /dev/null -# cp ~/.local/share/applications/faster-project-plus-$FPPVERSION.desktop ~/Desktop -# chmod +x ~/Desktop/faster-project-plus-$FPPVERSION.desktop -# else -# echo ".local folder not found, skipping desktop shortcut." -# fi -# --- - -# echo "" -# echo "***************************************************************************************************" -# echo "Done! Run ./launch-fpp to run the latest installed version!" -# echo "Alternatively, go to Application > Games or your desktop and select the desired version." -# echo "Make sure to unplug and replug your adapter before opening Dolphin if adapter rules were installed!" -# echo "***************************************************************************************************" -# # \ No newline at end of file diff --git a/setup_appimage b/setup_appimage index 8842e3a..e1683ab 100755 --- a/setup_appimage +++ b/setup_appimage @@ -2,7 +2,17 @@ # --- Stops the script if errors are encountered. --- set -e -CPUS=8 +# --- Attempts to determine the number of cores in the CPU. --- +# Source: https://gist.github.com/jj1bdx/5746298 +# Linux and similar... +CPUS=$(getconf _NPROCESSORS_ONLN 2>/dev/null) +# FreeBSD and similar... +[ -z "$CPUS" ] && CPUS=$(getconf NPROCESSORS_ONLN) +# Solaris and similar... +[ -z "$CPUS" ] && CPUS=$(ksh93 -c 'getconf NPROCESSORS_ONLN') +# Give up... +[ -z "$CPUS" ] && CPUS=1 +# --- # --- define custom config links here! FPPVERSION="" # name of FPP version, used in folder name @@ -78,40 +88,37 @@ echo "Using $CPUS thread(s)!" # # --- # --- enter folder, download and extract needed files -echo "" -if [ -d "$FOLDERNAME" ] -then - cd "$FOLDERNAME" -else - mkdir "$FOLDERNAME" && cd "$FOLDERNAME" -fi +# echo "" +# if [ -d "$FOLDERNAME" ] +# then +# cd "$FOLDERNAME" +# else +# mkdir "$FOLDERNAME" && cd "$FOLDERNAME" +# fi if [ -d "./Binaries" ] then - echo "Binaries already found" -else - echo "Downloading config files..." - curl -LO# $CONFIGLINK - echo "Extracting config files..." - tar -xzf "$FPPVERSION-$CONFIGNAME.tar.gz" --checkpoint-action='exec=printf "%d/72980480 records extracted.\r" $TAR_CHECKPOINT' --totals - rm "$FPPVERSION-$CONFIGNAME.tar.gz" + echo "Removing binaries already found" + rm ./Binaries -r fi +echo "Extracting config files..." +tar -xzf "./config/$FPPVERSION-$CONFIGNAME.tar.gz" --checkpoint-action='exec=printf "%d/72980480 records extracted.\r" $TAR_CHECKPOINT' --totals if [ -d "./Ishiiruka" ] then echo "Ishiiruka dir found source files already accquired" - cd Ishiiruka -else - echo "" - echo "Downloading tarball..." - curl -LO# "$GITCLONELINK/archive/$COMMITHASH.tar.gz" - echo "Extracting tarball..." - tar -xzf "$COMMITHASH.tar.gz" --checkpoint-action='exec=printf "%d/12130 records extracted.\r" $TAR_CHECKPOINT' --totals - rm "$COMMITHASH.tar.gz" - echo "" #spacing - mv "Ishiiruka-$COMMITHASH" Ishiiruka -cd Ishiiruka + rm ./Ishiiruka -r fi +echo "" +echo "Downloading source tarball..." +curl -LO# "$GITCLONELINK/archive/$COMMITHASH.tar.gz" +echo "Extracting source..." +tar -xzf "$COMMITHASH.tar.gz" --checkpoint-action='exec=printf "%d/12130 records extracted.\r" $TAR_CHECKPOINT' --totals +rm "$COMMITHASH.tar.gz" +echo "" #spacing +mv "Ishiiruka-$COMMITHASH" Ishiiruka +cd Ishiiruka + # --- Patch tarball to display correct hash to other netplay clients @@ -167,11 +174,24 @@ echo "cmaking..." if [ ! -z "${IN_NIX_SHELL++}" ]; then cmake .. -DLINUX_LOCAL_DEV=true -DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib}/lib/glib-2.0/include -DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2}/lib/gtk-2.0/include -DGTK2_INCLUDE_DIRS=${gtk2}/lib/gtk-2.0 -DENABLE_LTO=True -DCMAKE_INSTALL_PREFIX=/usr else - cmake .. -DLINUX_LOCAL_DEV=true -DCMAKE_INSTALL_PREFIX=/usr + cmake .. -DLINUX_LOCAL_DEV=true -DCMAKE_INSTALL_PREFIX=/usr -DVERSION_TAG="2.2.0" fi echo "Compiling..." -make -j $CPUS -s +make -j $CPUS -s BUILD_TAG=2.2.0 touch ./Binaries/portable.txt + +cp ../../faster-project-plus.desktop ../Data/ishiiruka.desktop; +cp ../../faster-project-plus.desktop .; + +if [ -d "./AppDir/" ] +then +# Delete the AppDir folder to prevent build issues +rm -rf ./AppDir/ +fi +# Build the AppDir directory for this image +mkdir -p AppDir + +make install DESTDIR=AppDir; # --- # # --- Download the sd card tarball, extract it, move it to proper folder, and delete tarball