-
-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split patchscript (patching vs updating)
- Loading branch information
Showing
7 changed files
with
104 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# What are those? | ||
|
||
Those are native Android libraries meant to be loaded into the guest environment, | ||
and the come from a [prebuilt AOSP image provided by google](https://ci.android.com/builds/branches/aosp-main/grid). | ||
|
||
# What are these files for then? | ||
|
||
They provide a similar-to-android implementation to all of the supported libraries, | ||
allowing us to make less guesswork, and provide more accurate renditions of a lot | ||
of those functionalities, specially for libc++ where a lot of guesswork was done | ||
in the past. | ||
|
||
OpenAL, OpenGL and libc.so are provided from the host (via thunking where needed) or | ||
via reimplementations. | ||
|
||
You still need a suitable GameMaker Android title/runner. You can source those from | ||
either [freeware Android APKs](https://itch.io) or finding a [suitable runner](https://gamemaker.io/account/runtimes) for hacking. |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#!/bin/bash | ||
|
||
# | ||
# Risk of Rain update script | ||
# Author: kotzebuedog | ||
# Version: 1.0 | ||
# Update 671b20f | ||
# | ||
|
||
XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share} | ||
|
||
if [ -d "/opt/system/Tools/PortMaster/" ]; then | ||
controlfolder="/opt/system/Tools/PortMaster" | ||
elif [ -d "/opt/tools/PortMaster/" ]; then | ||
controlfolder="/opt/tools/PortMaster" | ||
elif [ -d "$XDG_DATA_HOME/PortMaster/" ]; then | ||
controlfolder="$XDG_DATA_HOME/PortMaster" | ||
else | ||
controlfolder="/roms/ports/PortMaster" | ||
fi | ||
|
||
source $controlfolder/control.txt | ||
|
||
# Set GAMEDIR to the current directory and set logfile | ||
export GAMEDIR="$PWD" | ||
LOGFILE="$GAMEDIR/patchlog.txt" | ||
|
||
# Redirect output and error to the log file | ||
exec > >(tee -a "$LOGFILE") 2>&1 | ||
echo "GAMEDIR is set to: $GAMEDIR" | ||
|
||
# -------------------- BEGIN FUNCTIONS -------------------- | ||
|
||
update_install_671b20f() | ||
{ | ||
# Update from previous install (git commit 671b20f) | ||
files_to_move=( | ||
"Prefs.ini" | ||
"Save.ini" | ||
"game.droid" | ||
"options.ini" | ||
) | ||
|
||
for file in "${files_to_move[@]}"; do | ||
echo "Moving $file" | ||
mv "$file" "$GAMEDIR/gamedata/" | ||
[[ ! $? -eq 0 ]] && echo "Cannot move $file" && return 1 # CRITICAL | ||
done | ||
|
||
echo "Renaming game.apk" | ||
mv "$GAMEDIR/game.apk" "$GAMEDIR/riskofrain.port" | ||
[[ ! $? -eq 0 ]] && echo "Cannot rename game.apk" && return 1 # CRITICAL | ||
|
||
files_to_delete=( | ||
"gmloadernext" | ||
"lib/libcrypto.so.1.1" | ||
"lib/libzip.so.5" | ||
"lib/arm64-v8a" | ||
) | ||
|
||
for file in "${files_to_delete[@]}"; do | ||
echo "Deleting $file" | ||
rm -rf "$file" | ||
done | ||
|
||
return 0 | ||
|
||
} | ||
|
||
# --------------------- END FUNCTIONS --------------------- | ||
|
||
update_install_671b20f | ||
[[ ! $? -eq 0 ]] && echo "Cannot update game" \ | ||
&& echo "Patching process failed!" && exit 1 | ||
|
||
echo "Game updated" && echo "Patching process done!" && exit 0 |