From 6c6c1a38674a23e60076f05d4a04aa3ecdbaa030 Mon Sep 17 00:00:00 2001 From: theonlyzac Date: Tue, 5 Dec 2023 02:50:14 -0500 Subject: [PATCH] Update setup script --- appveyor.yml | 6 ++-- {tools => scripts}/install_dependencies.sh | 0 scripts/prodg_env.reg | 5 ++++ scripts/run.sh | 7 +++++ {tools => scripts}/setup_prodg_windows.bat | 0 .../setup_progd_linux.sh | 29 +++++++++++-------- 6 files changed, 33 insertions(+), 14 deletions(-) rename {tools => scripts}/install_dependencies.sh (100%) create mode 100644 scripts/prodg_env.reg create mode 100755 scripts/run.sh rename {tools => scripts}/setup_prodg_windows.bat (100%) rename tools/setup_prodg_linux.sh => scripts/setup_progd_linux.sh (65%) diff --git a/appveyor.yml b/appveyor.yml index ce8286db..ce9e99eb 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -11,8 +11,10 @@ environment: - CONFIGURATION: Release install: - - sudo sh tools/install_dependencies.sh - - sudo sh tools/setup_prodg_linux.sh + - cd tools + - sudo sh install_dependencies.sh + - sh setup_prodg_linux.sh + - cd .. build_script: - make diff --git a/tools/install_dependencies.sh b/scripts/install_dependencies.sh similarity index 100% rename from tools/install_dependencies.sh rename to scripts/install_dependencies.sh diff --git a/scripts/prodg_env.reg b/scripts/prodg_env.reg new file mode 100644 index 00000000..b6face94 --- /dev/null +++ b/scripts/prodg_env.reg @@ -0,0 +1,5 @@ +Windows Registry Editor Version 5.00 + +[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment] +"PS2_CPATH"="C:\\usr/local/sce/ee/gcc/lib/gcc-lib/ee/2.95.3/include;C:\\usr/local/sce/ee/gcc/ee/include;C:\\usr/local/sce/ee/gcc/include/g++-2;C:\\usr/local/sce/ee/include" +"PS2_DRIVE"="C" diff --git a/scripts/run.sh b/scripts/run.sh new file mode 100755 index 00000000..abbcadc0 --- /dev/null +++ b/scripts/run.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# Insert the paths to your PCSX2 executable and your copy of the game below +PCSX2_PATH="" +ISO_PATH="" + +"$PCSX2_PATH" --nogui --console --gameargs="-d --debug" --elf="./SCUS_971.98" "$ISO_PATH" diff --git a/tools/setup_prodg_windows.bat b/scripts/setup_prodg_windows.bat similarity index 100% rename from tools/setup_prodg_windows.bat rename to scripts/setup_prodg_windows.bat diff --git a/tools/setup_prodg_linux.sh b/scripts/setup_progd_linux.sh similarity index 65% rename from tools/setup_prodg_linux.sh rename to scripts/setup_progd_linux.sh index 71dfa431..741e4713 100755 --- a/tools/setup_prodg_linux.sh +++ b/scripts/setup_progd_linux.sh @@ -21,32 +21,37 @@ download_and_check() { wget -qP /tmp $1.b2 BASENAME=$(basename $1) - pushd /tmp >/dev/null - b2sum -c $BASENAME.b2 || die "b2sums failed to verify when downloading $1" - echo "b2sums verified, moving files out of /tmp" + b2sum -c /tmp/$BASENAME.b2 || die "b2sums failed to verify when downloading $1" - rm $BASENAME.b2 # No longer needed - mv $BASENAME $TOP - popd >/dev/null + echo "b2sums verified, moving files out of /tmp" + rm /tmp/$BASENAME.b2 # No longer needed + mv /tmp/$BASENAME $TOP +} + +# downloads files without checking integrity +download() { + echo "Downloading $1..." + wget -qP /tmp $1 + + BASENAME=$(basename $1) + + echo "moving files out of /tmp" + mv /tmp/$BASENAME $TOP } echo Starting ProDG setup script... # download required files (registry + SDK package) -download_and_check "https://computernewb.com/~lily/sly1/prodg_env.reg" -download_and_check "https://computernewb.com/~lily/sly1/prodg_sce$SDK_VER.7z" +download "https://computernewb.com/~lily/sly1/prodg_sce$SDK_VER.7z" # apply environment variables from the registry file wine regedit prodg_env.reg # Extract the SDK into the wine C drive root echo "Extracting SDK to $WINE_ROOT..." -pushd $WINE_ROOT >/dev/null - 7z x -y $TOP/prodg_sce$SDK_VER.7z -popd >/dev/null +7z x -y $TOP/prodg_sce$SDK_VER.7z -o$WINE_ROOT echo "Removing temporary files..." rm prodg_sce$SDK_VER.7z -rm prodg_env.reg echo "Setup complete!"