diff --git a/applypatches.sh b/applypatches.sh deleted file mode 100755 index c0bd46d..0000000 --- a/applypatches.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash - -if [ $# -eq 0 ]; then - echo "Usage: $0 " - exit 1 -fi - -profile="$1" - -source .config -source ./profiles/$profile/metadata -dir="/tmp/wacca/$profile" -PATCHES_DIR="./patches" - -[ ! -d "$PATCHES_DIR" ] && { echo "Error: $PATCHES_DIR not found"; exit 1; } - -# Change to patches directory and process files in numerical order -cd "$PATCHES_DIR" || exit 1 - -# Use ls with version sort to handle numbers correctly (1,2,3,10,50,etc.) -for script in $(ls -1v 2>/dev/null); do - [ -f "$script" ] && [ -r "$script" ] || continue - - echo -e "\033[0;34m=== Applying: $script ===\033[0m" - - # Create a named pipe for real-time output - pipe=$(mktemp -u) - mkfifo "$pipe" - - # Execute the script with real-time output - if (source "$script" 2>&1 | while IFS= read -r line; do - echo "[$script] $line" - done); then - echo -e "\033[0;32m=== Successfully applied: $script ======\033[0m" - echo "$script" >> $dir/patches - else - exit_code=$? - echo -e "\033[0;31m=== Failed: $script (exit code: $exit_code) ===\033[0m" - fi - - # Clean up the pipe - rm -f "$pipe" - echo -done \ No newline at end of file diff --git a/versionselect.sh b/configure.sh similarity index 100% rename from versionselect.sh rename to configure.sh diff --git a/extractapps.sh b/extractapps.sh deleted file mode 100755 index 3feb2d6..0000000 --- a/extractapps.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -if [ $# -eq 0 ]; then - echo "Usage: $0 " - exit 1 -fi - -profile="$1" - -while IFS=, read -r version backingversion url -do - file=$(basename "$url") - vhd=$(basename "$url" | sed -E "s/.app/.vhd/") - if [ -f images/app/$file ]; then - echo "Found $file" - if [ -f images/vhd/$vhd ]; then - echo "Found $vhd" - else - echo "Decrypting $file" - fsdecrypt images/app/$file - mkdir -p images/vhd - mv images/app/*.vhd images/vhd/ - fi - else - if [ ! -f images/vhd/$vhd ]; then - echo "Downloading $file" - aria2c -x 8 -j 8 -o images/app/$file $url - - echo "Decrypting $file" - fsdecrypt images/app/$file - mkdir -p images/vhd - mv images/app/*.vhd images/vhd - fi - fi -done < profiles/$profile/apps.csv diff --git a/generatetree.sh b/generatetree.sh deleted file mode 100755 index 31ec398..0000000 --- a/generatetree.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -if [ $# -eq 0 ]; then - echo "Usage: $0 " - exit 1 -fi - -profile="$1" -rm -r images/tree/$profile -mkdir -p images/tree/$profile -while IFS=, read -r vhd version identifier backingversion parent_identifier parent_filename -do - match=0 - echo $vhd - while IFS=, read -r vhd2 version2 identifier2 backingversion2 parent_identifier2 parent_filename2 - do - if [ "$identifier" == "$parent_identifier2" ]; then - echo "Match: $vhd $parent_filename2" - l=$(echo $parent_filename2 | sed 's/\\/\//g') - ln -s $(pwd)/images/vhd/$vhd images/tree/$profile/$basename$(basename $l) - match=1 - fi - done < images/lookup/phase1_$1.csv - if [[ match -eq 0 ]]; then - echo "End of chain $vhd" - ln -s $(pwd)/images/vhd/$vhd images/tree/$profile/"game.vhd" - fi -done < images/lookup/phase1_$1.csv diff --git a/images/lookup/phase1_waccalilyr.csv b/images/lookup/phase1_waccalilyr.csv deleted file mode 100644 index 86871ab..0000000 --- a/images/lookup/phase1_waccalilyr.csv +++ /dev/null @@ -1,4 +0,0 @@ -SDFE_2.00.00_20200813163739_0.vhd,2.00.00,929a27e2-6aae-b54c-ba86-13d515152fb6,base,, -SDFE_2.50.00_20210129180947_1_2.00.00.vhd,2.50.00,ef51ac04-e8a3-e14e-8d4d-254d70ad30a5,2.00.00,929a27e2-6aae-b54c-ba86-13d515152fb6,\Device\FscryptDisk_APP_0\internal_0.vhd -SDFE_2.52.00_20210426101902_2_2.50.00.vhd,2.52.00,1eacb393-f579-cd41-afe7-f2e6689cd879,2.50.00,ef51ac04-e8a3-e14e-8d4d-254d70ad30a5,\Device\FscryptDisk_APP_1\internal_1.vhd -SDFE_2.53.00_20210607052915_3_2.52.00.vhd,2.53.00,ab623e80-e23f-d649-a6be-9788ec521ecc,2.52.00,1eacb393-f579-cd41-afe7-f2e6689cd879,\Device\FscryptDisk_APP_2\internal_2.vhd diff --git a/genbind.sh b/init.sh similarity index 99% rename from genbind.sh rename to init.sh index e4a5e4c..b552144 100755 --- a/genbind.sh +++ b/init.sh @@ -159,6 +159,6 @@ check_prereqs get_required_app extract_apps patchbin -# mount +mount apply_patches # patchbin "images/vhd/SDFE_2.53.00_20210607052915_3_2.52.00.vhd.old" \ No newline at end of file diff --git a/launch.sh b/launch.sh index 1f11db5..7bc653c 100755 --- a/launch.sh +++ b/launch.sh @@ -1,8 +1,7 @@ -if [ $# -eq 0 ]; then - echo "Usage: $0 " - exit 1 -fi +source .config -profile="$1" +workdir=${WORKDIR:-/tmp/wacca} +version=${VERSION:-3.07.01} +dir=$workdir/$version -WINEPREFIX=/tmp/wacca/$profile/prefix umu-run /tmp/wacca/$profile/game/bin/launch.bat \ No newline at end of file +WINEPREFIX=$dir/prefix umu-run $dir/game/bin/launch.bat \ No newline at end of file diff --git a/mountprofile.sh b/mountprofile.sh deleted file mode 100755 index d123f11..0000000 --- a/mountprofile.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -if [ $# -eq 0 ]; then - echo "Usage: $0 " - exit 1 -fi - -profile="$1" - -mkdir -p /tmp/wacca/$profile/{dev,lower,upper,game,work} -mkdir -p /tmp/wacca/$profile/lower -mkdir -p /tmp/wacca/$profile/upper -mkdir -p /tmp/wacca/$profile/game -sudo vhdimount images/tree/$profile/game.vhd /tmp/wacca/$profile/dev -sudo mount -t ntfs -o offset=$((2048*512)),uid=$(id -u),gid=$(id -g) $(sudo find /tmp/wacca/$profile/dev -maxdepth 1 -type f | sort -V | tail -1) /tmp/wacca/$profile/lower -sudo mount overlay -t overlay -o lowerdir=/tmp/wacca/$profile/lower,upperdir=/tmp/wacca/$profile/upper,workdir=/tmp/wacca/$profile/work /tmp/wacca/$profile/game \ No newline at end of file diff --git a/patches/15-ledstub.sh b/patches/15-ledstub.sh old mode 100755 new mode 100644 diff --git a/profiles/waccalily/apps.csv b/profiles/waccalily/apps.csv deleted file mode 100755 index 62cacdc..0000000 --- a/profiles/waccalily/apps.csv +++ /dev/null @@ -1,5 +0,0 @@ -2.00.00,base,https://archive.org/download/WACCA/EXP/2.00.00%20USB/SDFE_2.00.00_20200813163739_0.app -2.01.00,2.00.00,https://archive.org/download/WACCA/EXP/SDFE_2.01.00_20200923205643_1_2.00.00.app -2.02.00,2.01.00,https://archive.org/download/WACCA/EXP/SDFE_2.02.00_20201030154849_2_2.01.00.app -2.03.00,2.02.00,https://archive.org/download/WACCA/EXP/SDFE_2.03.00_20201130071007_3_2.02.00.app -2.04.00,2.03.00,https://archive.org/download/WACCA/EXP/SDFE_2.04.00_20210114100544_4_2.03.00.app diff --git a/profiles/waccalily/metadata b/profiles/waccalily/metadata deleted file mode 100755 index 0200bd4..0000000 --- a/profiles/waccalily/metadata +++ /dev/null @@ -1,3 +0,0 @@ -prettyname="WACCA Lily" -version="2.0" -icf="https://archive.org/download/WACCA/EXP/2.00.00%20USB/SDFE_ACA.icf" \ No newline at end of file diff --git a/profiles/waccalilyr/apps.csv b/profiles/waccalilyr/apps.csv deleted file mode 100755 index a2afc93..0000000 --- a/profiles/waccalilyr/apps.csv +++ /dev/null @@ -1,5 +0,0 @@ -2.00.00,base,https://archive.org/download/WACCA/EXP/2.00.00%20USB/SDFE_2.00.00_20200813163739_0.app -2.50.00,2.00.00,https://archive.org/download/WACCA/EXP/SDFE_2.50.00_20210129180947_1_2.00.00.app -2.51.00,2.50.00,https://archive.org/download/WACCA/EXP/SDFE_2.51.00_20210309120850_2_2.50.00.app -2.52.00,2.50.00,https://archive.org/download/WACCA/EXP/SDFE_2.52.00_20210426101902_2_2.50.00.app -2.53.00,2.52.00,https://archive.org/download/WACCA/EXP/SDFE_2.53.00_20210607052915_3_2.52.00.app diff --git a/profiles/waccalilyr/metadata b/profiles/waccalilyr/metadata deleted file mode 100755 index 394094c..0000000 --- a/profiles/waccalilyr/metadata +++ /dev/null @@ -1,3 +0,0 @@ -prettyname="WACCA Lily R" -version="2.5" -icf="https://archive.org/download/WACCA/EXP/2.00.00%20USB/SDFE_ACA.icf" \ No newline at end of file diff --git a/profiles/waccareverse/apps.csv b/profiles/waccareverse/apps.csv deleted file mode 100755 index 2c17e4f..0000000 --- a/profiles/waccareverse/apps.csv +++ /dev/null @@ -1,9 +0,0 @@ -3.00.00,base,https://archive.org/download/WACCA/EXP/3.00.00%20USB/SDFE_3.00.00_20210701023921_0.app -3.01.00,3.00.00,https://archive.org/download/WACCA/EXP/SDFE_3.01.00_20210817052556_1_3.00.00.app -3.02.00,3.01.00,https://archive.org/download/WACCA/EXP/SDFE_3.02.00_20210927052723_2_3.01.00.app -3.03.00,3.02.00,https://archive.org/download/WACCA/EXP/SDFE_3.03.00_20211112063023_3_3.02.00.app -3.04.00,3.03.00,https://archive.org/download/WACCA/EXP/SDFE_3.04.00_20211208062838_4_3.03.00.app -3.05.00,3.04.00,https://archive.org/download/WACCA/EXP/SDFE_3.05.00_20220203063543_5_3.04.00.app -3.06.00,3.05.00,https://archive.org/download/WACCA/EXP/SDFE_3.06.00_20220412064126_6_3.05.00.app -3.07.00,3.06.00,https://archive.org/download/WACCA/EXP/SDFE_3.07.00_20220609093125_7_3.06.00.app -3.07.01,3.07.00,https://archive.org/download/WACCA/EXP/SDFE_3.07.01_20220628165934_8_3.07.00.app diff --git a/profiles/waccareverse/metadata b/profiles/waccareverse/metadata deleted file mode 100755 index 52a5b9c..0000000 --- a/profiles/waccareverse/metadata +++ /dev/null @@ -1,3 +0,0 @@ -prettyname="WACCA Reverse" -version="3.0" -icf="https://archive.org/download/WACCA/EXP/3.00.00%20USB/SDFE_ACA.icf" \ No newline at end of file diff --git a/profiles/waccas/apps.csv b/profiles/waccas/apps.csv deleted file mode 100755 index fce9c05..0000000 --- a/profiles/waccas/apps.csv +++ /dev/null @@ -1,8 +0,0 @@ -version,backingversion,url -1.50.00,base,https://archive.org/download/WACCA/EXP/1.50.00%20USB/SDFE_1.50.00_20191225123843_0.app -1.50.01,1.50.00,https://archive.org/download/WACCA/EXP/SDFE_1.50.01_20200130145033_1_1.50.00.app -1.50.02,1.50.01,https://archive.org/download/WACCA/EXP/SDFE_1.50.02_20200227161144_2_1.50.01.app -1.50.03,1.50.02,https://archive.org/download/WACCA/EXP/SDFE_1.50.03_20200316131604_3_1.50.02.app -1.50.04,1.50.03,https://archive.org/download/WACCA/EXP/SDFE_1.50.04_20200325170234_4_1.50.03.app -1.50.05,1.50.04,https://archive.org/download/WACCA/EXP/SDFE_1.50.05_20200608155410_5_1.50.04.app -1.50.06,1.50.05,https://archive.org/download/WACCA/EXP/SDFE_1.50.06_20200722145703_6_1.50.05.app diff --git a/profiles/waccas/metadata b/profiles/waccas/metadata deleted file mode 100755 index 1b8158b..0000000 --- a/profiles/waccas/metadata +++ /dev/null @@ -1,3 +0,0 @@ -prettyname="WACCA S" -version="1.5" -icf="https://archive.org/download/WACCA/EXP/1.50.00%20USB/SDFE_ACA.icf" \ No newline at end of file diff --git a/unmount.sh b/unmount.sh index b5669cb..c6e2f04 100755 --- a/unmount.sh +++ b/unmount.sh @@ -1,6 +1,16 @@ #!/bin/bash source .config -sudo umount /tmp/wacca/$profile/game -sudo umount /tmp/wacca/$profile/lower -sudo fusermount -u /tmp/wacca/$profile/dev \ No newline at end of file +workdir=${WORKDIR:-/tmp/wacca} +version=${VERSION:-3.07.01} +dir=$workdir/$version + +if [ "$MOUNT_AS_ROOT" = false ]; then + sudo="" +else + sudo="sudo" +fi + +$sudo umount $dir/game +$sudo umount $dir/lower +$sudo fusermount -u $dir/dev \ No newline at end of file diff --git a/unmountprofile.sh b/unmountprofile.sh deleted file mode 100755 index 33ee813..0000000 --- a/unmountprofile.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -if [ $# -eq 0 ]; then - echo "Usage: $0 " - exit 1 -fi - -profile="$1" - -sudo umount /tmp/wacca/$profile/game -sudo umount /tmp/wacca/$profile/lower -sudo fusermount -u /tmp/wacca/$profile/dev \ No newline at end of file diff --git a/wacca_led.dll b/wacca_led.dll old mode 100644 new mode 100755 index 02a1eeb..96292fe Binary files a/wacca_led.dll and b/wacca_led.dll differ