mirror of
https://github.com/dragoonDorise/EmuDeck.git
synced 2024-05-20 13:17:55 -04:00
d5e8a36b40
* test proton launch for bigpemu * continue working on config * continue with configs * update proton launch with new proton versions * update from old CEMU stuff to be specific to BigPEmu * begin saves and storage config * testing on deck * typo * change proton to 7 only worked for a tester on 7 will figure out updating later. * add ESDE config * update SRM from new update * idk why the rebase didnt delete the file * add jaguarcd to parser * add jaguarcd to esde * update readme * add to all functions * typo and remove vblank * consistency with casing * typo * update order in esde * typo * update esde config script * move esde xml script to config file * unique command letters * lack of sleep typos * woooo typos * fix xml * typo * convert bigpemu script to curl * nyi set folder * fix after pulling from upstream * additional spacing fixes * fix wget and add if statements * missing a space * add review changes * local data * local data * BigPEmu Tidying * Added hotkeys * Added bigpemu.sh to Applications folder * Cleaned up emuDeckBigPEmu.sh * Added icon * Added BigPEmu to binupdate * Add missing fi in binupdate --------- Co-authored-by: Dragoon Dorise <rodrigosedano@me.com> Co-authored-by: rawdatafeel <108900299+rawdatafeel@users.noreply.github.com>
174 lines
6 KiB
Bash
174 lines
6 KiB
Bash
#!/bin/bash
|
|
#variables
|
|
BigPEmu_emuName="BigPEmu (Proton)"
|
|
BigPEmu_emuType="$emuDeckEmuTypeWindows"
|
|
BigPEmu_emuPath="$HOME/Applications/BigPEmu/BigPEmu.exe"
|
|
BigPEmu_appData="$HOME/Applications/BigPEmu/UserData"
|
|
BigPEmu_BigPEmuSettings="$HOME/Applications/BigPEmu/UserData/BigPEmuConfig.bigpcfg"
|
|
|
|
#cleanupOlderThings
|
|
BigPEmu_cleanup(){
|
|
echo "NYI"
|
|
}
|
|
|
|
#Install
|
|
BigPEmu_install(){
|
|
setMSG "Installing $BigPEmu_emuName"
|
|
|
|
mkdir -p "$HOME/Applications/BigPEmu"
|
|
downloadBigPEmu=$(wget -m -nd -A "BigPEmu_*.zip" -O "$HOME/Applications/BigPEmu/BigPEmu.zip" "https://www.richwhitehouse.com/jaguar/index.php?content=download" -R "BigPEmu_*-DEV.zip")
|
|
|
|
local showProgress="$1"
|
|
if $downloadBigPEmu; then
|
|
|
|
unzip -o "$HOME/Applications/BigPEmu/BigPEmu.zip" -d "$HOME/Applications/BigPEmu"
|
|
rm -f "$HOME/Applications/BigPEmu/BigPEmu.zip"
|
|
else
|
|
return 1
|
|
fi
|
|
|
|
cp "$EMUDECKGIT/tools/launchers/bigpemu.sh" "$toolsPath/launchers/bigpemu.sh"
|
|
# So users can still open it from the ~/Applications folder.
|
|
cp "$EMUDECKGIT/tools/launchers/bigpemu.sh" "$HOME/Applications/BigPEmu/bigpemu.sh"
|
|
|
|
chmod +x "${toolsPath}/launchers/bigpemu.sh"
|
|
|
|
createDesktopShortcut "$HOME/.local/share/applications/BigPEmu (Proton).desktop" \
|
|
"BigPEmu (Proton)" \
|
|
"${toolsPath}/launchers/bigpemu.sh -w" \
|
|
"False"
|
|
}
|
|
|
|
#ApplyInitialSettings
|
|
BigPEmu_init(){
|
|
setMSG "Initializing $BigPEmu_emuName settings."
|
|
rsync -avhp "$EMUDECKGIT/configs/bigpemu/" "$BigPEmu_appData" --backup --suffix=.bak
|
|
if [ -e "$BigPEmu_BigPEmuSettings.bak" ]; then
|
|
mv -f "$BigPEmu_BigPEmuSettings.bak" "$BigPEmu_BigPEmuSettings" #retain BigPEmuSettings
|
|
fi
|
|
BigPEmu_addESConfig
|
|
BigPEmu_setEmulationFolder
|
|
BigPEmu_setupSaves
|
|
}
|
|
|
|
BigPEmu_addESConfig(){
|
|
if [[ $(grep -rnw "$es_systemsFile" -e 'atarijaguar') == "" ]]; then
|
|
xmlstarlet ed -S --inplace --subnode '/systemList' --type elem --name 'system' \
|
|
--var newSystem '$prev' \
|
|
--subnode '$newSystem' --type elem --name 'name' -v 'atarijaguar' \
|
|
--subnode '$newSystem' --type elem --name 'fullname' -v 'Atari Jaguar' \
|
|
--subnode '$newSystem' --type elem --name 'path' -v '%ROMPATH%/atarijaguar' \
|
|
--subnode '$newSystem' --type elem --name 'extension' -v '.abs .ABS .bin .BIN .cdi .CDI .cof .COF .cue .CUE .j64 .J64 .jag .JAG .prg .PRG .rom .ROM .7z .7Z .zip .ZIP' \
|
|
--subnode '$newSystem' --type elem --name 'commandB' -v "/usr/bin/bash ${toolsPath}/launchers/bigpemu.sh %ROM%" \
|
|
--insert '$newSystem/commandB' --type attr --name 'label' --value "BigPEmu (Proton)" \
|
|
--subnode '$newSystem' --type elem --name 'commandV' -v "%EMULATOR_RETROARCH% -L %CORE_RETROARCH%/virtualjaguar_libretro.so %ROM%" \
|
|
--insert '$newSystem/commandV' --type attr --name 'label' --value "Virtual Jaguar" \
|
|
--subnode '$newSystem' --type elem --name 'commandM' -v "%STARTDIR%=~/.mame %EMULATOR_MAME% -rompath %GAMEDIR%\;%ROMPATH%/atarijaguar jaguar -cart %ROM%" \
|
|
--insert '$newSystem/commandM' --type attr --name 'label' --value "MAME (Standalone)" \
|
|
--subnode '$newSystem' --type elem --name 'platform' -v 'atarijaguar' \
|
|
--subnode '$newSystem' --type elem --name 'theme' -v 'atarijaguar' \
|
|
-r 'systemList/system/commandB' -v 'command' \
|
|
-r 'systemList/system/commandV' -v 'command' \
|
|
-r 'systemList/system/commandM' -v 'command' \
|
|
"$es_systemsFile"
|
|
|
|
xmlstarlet ed -S --inplace --subnode '/systemList' --type elem --name 'system' \
|
|
--var newSystem '$prev' \
|
|
--subnode '$newSystem' --type elem --name 'name' -v 'atarijaguarcd' \
|
|
--subnode '$newSystem' --type elem --name 'fullname' -v 'Atari Jaguar CD' \
|
|
--subnode '$newSystem' --type elem --name 'path' -v '%ROMPATH%/atarijaguarcd' \
|
|
--subnode '$newSystem' --type elem --name 'extension' -v '.abs .ABS .bin .BIN .cdi .CDI .cof .COF .cue .CUE .j64 .J64 .jag .JAG .prg .PRG .rom .ROM .7z .7Z .zip .ZIP' \
|
|
--subnode '$newSystem' --type elem --name 'commandB' -v "/usr/bin/bash ${toolsPath}/launchers/bigpemu.sh %ROM%" \
|
|
--insert '$newSystem/commandB' --type attr --name 'label' --value "BigPEmu (Proton)" \
|
|
--subnode '$newSystem' --type elem --name 'platform' -v 'atarijaguarcd' \
|
|
--subnode '$newSystem' --type elem --name 'theme' -v 'atarijaguarcd' \
|
|
-r 'systemList/system/commandB' -v 'command' \
|
|
"$es_systemsFile"
|
|
|
|
#format doc to make it look nice
|
|
xmlstarlet fo "$es_systemsFile" > "$es_systemsFile".tmp && mv "$es_systemsFile".tmp "$es_systemsFile"
|
|
fi
|
|
#Custom Systems config end
|
|
}
|
|
|
|
#update
|
|
BigPEmu_update(){
|
|
setMSG "Updating $BigPEmu_emuName settings."
|
|
rsync -avhp "$EMUDECKGIT/configs/bigpemu/" "$BigPEmu_appData" --ignore-existing
|
|
BigPEmu_setEmulationFolder
|
|
BigPEmu_setupSaves
|
|
}
|
|
|
|
|
|
#ConfigurePaths
|
|
BigPEmu_setEmulationFolder(){
|
|
setMSG "Setting $BigPEmu_emuName Emulation Folder"
|
|
|
|
echo "NYI"
|
|
}
|
|
|
|
#SetupSaves
|
|
BigPEmu_setupSaves(){
|
|
if [ -e "${savesPath}/BigPEmu/saves" ]; then
|
|
unlink "${savesPath}/BigPEmu/saves"
|
|
fi
|
|
linkToSaveFolder BigPEmu saves "${BigPEmu_appData}"
|
|
|
|
if [ -e "${savesPath}/BigPEmu/states" ]; then
|
|
unlink "${savesPath}/BigPEmu/states"
|
|
fi
|
|
linkToSaveFolder BigPEmu states "${BigPEmu_appData}"
|
|
}
|
|
|
|
|
|
#SetupStorage
|
|
BigPEmu_setupStorage(){
|
|
unlink "${storagePath}/BigPEmu/screenshots"
|
|
linkToStorageFolder BigPEmu screenshots "${BigPEmu_appData}"
|
|
}
|
|
|
|
|
|
#WipeSettings
|
|
BigPEmu_wipeSettings(){
|
|
rm -rf $BigPEmu_BigPEmuSettings
|
|
}
|
|
|
|
|
|
#Uninstall
|
|
BigPEmu_uninstall(){
|
|
setMSG "Uninstalling $BigPEmu_emuName."
|
|
rm -rf "${BigPEmu_emuPath}"
|
|
rm -rf "$HOME/.local/share/applications/BigPEmu (Proton).desktop"
|
|
BigPEmu_wipeSettings
|
|
}
|
|
|
|
#setABXYstyle
|
|
BigPEmu_setABXYstyle(){
|
|
echo "NYI"
|
|
}
|
|
|
|
#finalExec - Extra stuff
|
|
BigPEmu_finalize(){
|
|
BigPEmu_cleanup
|
|
}
|
|
|
|
BigPEmu_IsInstalled(){
|
|
if [ -e "$BigPEmu_emuPath" ]; then
|
|
echo "true"
|
|
else
|
|
echo "false"
|
|
fi
|
|
}
|
|
|
|
BigPEmu_resetConfig(){
|
|
mv "$BigPEmu_BigPEmuSettings" "$BigPEmu_BigPEmuSettings.bak" &>/dev/null
|
|
BigPEmu_init &>/dev/null && echo "true" || echo "false"
|
|
}
|
|
|
|
BigPEmu_addSteamInputProfile(){
|
|
echo "NYI"
|
|
# addSteamInputCustomIcons
|
|
# setMSG "Adding $BigPEmu_emuName Steam Input Profile."
|
|
# rsync -r "$EMUDECKGIT/configs/steam-input/BigPEmu_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/"
|
|
}
|