diff --git a/elapseio.dll b/elapseio.dll new file mode 100755 index 0000000..794e05c Binary files /dev/null and b/elapseio.dll differ diff --git a/init.sh b/init.sh index 5cb8c88..a04b1ad 100755 --- a/init.sh +++ b/init.sh @@ -44,7 +44,7 @@ get_required_app () { } import_from_ins () { - result=$(blkid | grep SEGA_INS | head -n 1 | cut -d: -f1 ) + result=$(lsblk -fl | awk '/SEGA_INS/ {print "/dev/"$1; exit}') if [ -n "${result:-}" ]; then udisksctl mount --block-device $result mount_point=$(findmnt -n -o TARGET $result) diff --git a/patches/10-segatools.sh b/patches/10-segatools.sh index 0cc5be5..2bd0b0a 100755 --- a/patches/10-segatools.sh +++ b/patches/10-segatools.sh @@ -1,9 +1,20 @@ #!/bin/bash +airgap=${AIRGAP:-false} set -e if [ -z ${dir+x} ]; then echo "\$dir not set, skipping."; exit 22; else - wget https://gitea.tendokyu.moe/TeamTofuShop/segatools/releases/download/latest/segatools.zip -O /tmp/segatools.zip - mkdir -p $dir/segatools/{amfs,appdata,option} - unzip -p /tmp/segatools.zip mercury.zip | bsdtar -xf- -C $dir/game/bin + if [ -f ../imagestore/misc/segatools.zip ]; then + mkdir -p $dir/segatools/{amfs,appdata,option} + unzip -p ../imagestore/misc/segatools.zip mercury.zip | bsdtar -xf- -C $dir/game/bin + else + if [ "$airgap" = false ]; then + wget https://gitea.tendokyu.moe/TeamTofuShop/segatools/releases/download/latest/segatools.zip -O ../imagestore/misc/segatools.zip + mkdir -p $dir/segatools/{amfs,appdata,option} + unzip -p ../imagestore/misc/segatools.zip mercury.zip | bsdtar -xf- -C $dir/game/bin + else + echo "ERROR: Missing following segatools.zip" + exit 2 + fi + fi fi sed -i '/^\[vfs\]/,/^\[/ { diff --git a/patches/60-elapseio.sh b/patches/60-elapseio.sh new file mode 100644 index 0000000..30c6ae8 --- /dev/null +++ b/patches/60-elapseio.sh @@ -0,0 +1,7 @@ +#!/bin/bash +set -e +elapseio=${ELAPSEIO_ENABLE:-false} +if [ "$elapseio" = true ]; then + cp ../elapseio.dll $dir/game/bin + sed -i '/^\[mercuryio\]/,/^path=/ s/^path=/path=elapseio.dll/' $dir/game/bin/segatools-netenv.ini +fi \ No newline at end of file