mirror of
https://github.com/dragoonDorise/EmuDeck.git
synced 2024-06-02 19:47:51 -04:00
Citra/Yuzu: Clean up configurator (#1093)
This commit is contained in:
parent
31c166e5e2
commit
2a7fc91bae
|
@ -5,8 +5,11 @@ Citra_emuType="$emuDeckEmuTypeAppImage"
|
||||||
Citra_emuPath="$HOME/Applications/citra-qt.AppImage"
|
Citra_emuPath="$HOME/Applications/citra-qt.AppImage"
|
||||||
Citra_releaseURL=""
|
Citra_releaseURL=""
|
||||||
Citra_configFile="$HOME/.config/citra-emu/qt-config.ini"
|
Citra_configFile="$HOME/.config/citra-emu/qt-config.ini"
|
||||||
|
Citra_configPath="$HOME/.config/citra-emu"
|
||||||
Citra_texturesPath="$HOME/.config/citra-emu/load/textures"
|
Citra_texturesPath="$HOME/.config/citra-emu/load/textures"
|
||||||
|
Citra_flatpakPath="$HOME/.var/app/org.citra_emu.citra"
|
||||||
|
Citra_flatpakconfigPath="$Citra_flatpakPath/config/citra-emu"
|
||||||
|
Citra_flatpakconfigFile="$Citra_flatpakconfigPath/qt-config.ini"
|
||||||
#cleanupOlderThings
|
#cleanupOlderThings
|
||||||
Citra_finalize(){
|
Citra_finalize(){
|
||||||
echo "NYI"
|
echo "NYI"
|
||||||
|
@ -24,13 +27,21 @@ Citra_install(){
|
||||||
Citra_init(){
|
Citra_init(){
|
||||||
setMSG "Initializing $Citra_emuName settings."
|
setMSG "Initializing $Citra_emuName settings."
|
||||||
#configEmuFP "${Citra_emuName}" "${Citra_emuPath}" "true"
|
#configEmuFP "${Citra_emuName}" "${Citra_emuPath}" "true"
|
||||||
Citra_migrate
|
#Citra_migrate
|
||||||
|
#Citra_setupStorage
|
||||||
Citra_setupStorage
|
|
||||||
Citra_setEmulationFolder
|
Citra_setEmulationFolder
|
||||||
Citra_setupSaves
|
Citra_setupSaves
|
||||||
#SRM_createParsers
|
#SRM_createParsers
|
||||||
#Citra_addSteamInputProfile
|
#Citra_addSteamInputProfile
|
||||||
|
cp "$EMUDECKGIT/tools/launchers/citra.sh" "$toolsPath/launchers/citra.sh"
|
||||||
|
chmod +x "$toolsPath/launchers/citra.sh"
|
||||||
|
|
||||||
|
createDesktopShortcut "$HOME/.local/share/applications/Citra.desktop" \
|
||||||
|
"Citra (AppImage/Flatpak)" \
|
||||||
|
"${toolsPath}/launchers/citra.sh" \
|
||||||
|
"False"
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#update
|
#update
|
||||||
|
@ -47,6 +58,8 @@ Citra_update(){
|
||||||
Citra_setEmulationFolder(){
|
Citra_setEmulationFolder(){
|
||||||
setMSG "Setting $Citra_emuName Emulation Folder"
|
setMSG "Setting $Citra_emuName Emulation Folder"
|
||||||
|
|
||||||
|
mkdir -p "$Citra_configPath"
|
||||||
|
rsync -avhp "$EMUDECKGIT/configs/org.citra_emu.citra/config/citra-emu/qt-config.ini" "$Citra_configPath/qt-config.ini" --backup --suffix=.bak
|
||||||
gameDirOpt='Paths\\gamedirs\\3\\path='
|
gameDirOpt='Paths\\gamedirs\\3\\path='
|
||||||
newGameDirOpt='Paths\\gamedirs\\3\\path='"${romsPath}/n3ds"
|
newGameDirOpt='Paths\\gamedirs\\3\\path='"${romsPath}/n3ds"
|
||||||
sed -i "/${gameDirOpt}/c\\${newGameDirOpt}" "$Citra_configFile"
|
sed -i "/${gameDirOpt}/c\\${newGameDirOpt}" "$Citra_configFile"
|
||||||
|
@ -55,6 +68,23 @@ Citra_setEmulationFolder(){
|
||||||
mkdir -p "${biosPath}/citra/"
|
mkdir -p "${biosPath}/citra/"
|
||||||
mkdir -p "$HOME/.local/share/citra-emu/sysdata"
|
mkdir -p "$HOME/.local/share/citra-emu/sysdata"
|
||||||
ln -sn "$HOME/.local/share/citra-emu/sysdata" "${biosPath}/citra/keys"
|
ln -sn "$HOME/.local/share/citra-emu/sysdata" "${biosPath}/citra/keys"
|
||||||
|
|
||||||
|
if [ -d $Citra_flatpakPath ]; then
|
||||||
|
|
||||||
|
mkdir -p $Citra_flatpakconfigPath
|
||||||
|
rsync -avhp "$EMUDECKGIT/configs/org.citra_emu.citra/config/citra-emu/qt-config.ini" "$Citra_flatpakconfigPath/qt-config.ini" --backup --suffix=.bak
|
||||||
|
gameDirOpt='Paths\\gamedirs\\3\\path='
|
||||||
|
newGameDirOpt='Paths\\gamedirs\\3\\path='"${romsPath}/n3ds"
|
||||||
|
sed -i "/${gameDirOpt}/c\\${newGameDirOpt}" "$Citra_flatpakconfigFile"
|
||||||
|
|
||||||
|
#Setup symlink for AES keys
|
||||||
|
mkdir -p "$HOME/.var/app/org.citra_emu.citra/data/citra-emu/sysdata"
|
||||||
|
mkdir -p "${biosPath}/citra-flatpak"
|
||||||
|
ln -sn "$HOME/.var/app/org.citra_emu.citra/data/citra-emu/sysdata" "${biosPath}/citra-flatpak/keys"
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#SetupSaves
|
#SetupSaves
|
||||||
|
@ -64,67 +94,6 @@ Citra_setupSaves(){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#SetupStorage
|
|
||||||
Citra_setupStorage(){
|
|
||||||
|
|
||||||
if [ -d "${HOME}/.local/share/Steam" ]; then
|
|
||||||
STEAMPATH="${HOME}/.local/share/Steam"
|
|
||||||
elif [ -d "${HOME}/.steam/steam" ]; then
|
|
||||||
STEAMPATH="${HOME}/.steam/steam"
|
|
||||||
else
|
|
||||||
echo "Steam install not found"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -L "$romsPath/n3ds" && ! $(readlink -f "$romsPath/n3ds") =~ ^"$romsPath" ]] || [[ -L "$romsPath/3ds" && ! $(readlink -f "$romsPath/3ds") =~ ^"$romsPath" ]]; then
|
|
||||||
echo "User has symlinks that don't match expected paths located under $romsPath. Aborting symlink update."
|
|
||||||
else
|
|
||||||
if [[ ! -e "$romsPath/3ds" && ! -e "$romsPath/n3ds" ]]; then
|
|
||||||
mkdir -p "$romsPath/n3ds"
|
|
||||||
ln -sfn "$romsPath/n3ds" "$romsPath/3ds"
|
|
||||||
elif [[ -d "$romsPath/3ds" && -L "$romsPath/n3ds" ]]; then
|
|
||||||
echo "Converting n3ds symlink to a regular directory..."
|
|
||||||
unlink "$romsPath/n3ds"
|
|
||||||
mv "$romsPath/3ds" "$romsPath/n3ds"
|
|
||||||
ln -sfn "$romsPath/n3ds" "$romsPath/3ds"
|
|
||||||
echo "3ds symlink updated to point to n3ds"
|
|
||||||
elif [[ -d "$romsPath/3ds" && ! -e "$romsPath/n3ds" ]]; then
|
|
||||||
echo "Creating n3ds directory and updating 3ds symlink..."
|
|
||||||
mv "$romsPath/3ds" "$romsPath/n3ds"
|
|
||||||
ln -sfn "$romsPath/n3ds" "$romsPath/3ds"
|
|
||||||
echo "3ds symlink updated to point to n3ds"
|
|
||||||
elif [[ -d "$romsPath/n3ds" && ! -e "$romsPath/3ds" ]]; then
|
|
||||||
echo "3ds symlink not found, creating..."
|
|
||||||
ln -sfn "$romsPath/n3ds" "$romsPath/3ds"
|
|
||||||
echo "3ds symlink created"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
find "$STEAMPATH/userdata" -name "shortcuts.vdf" -exec sed -i "s|${romsPath}/n3ds|${romsPath}/3ds|g" {} +
|
|
||||||
|
|
||||||
local textureLink="$(readlink -f "$Citra_texturesPath")"
|
|
||||||
if [[ "$textureLink" != "$emulationPath/hdpacks/3ds" ]]; then
|
|
||||||
rm -rf "$Citra_texturesPath"
|
|
||||||
ln -s "$Citra_texturesPath" "$emulationPath/hdpacks/3ds"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f "$storagePath/citra/nand" ] && [ -d "$HOME/.local/share/citra-emu/nand/" ]; then
|
|
||||||
|
|
||||||
echo "citra nand does not exist in storagepath."
|
|
||||||
echo -e ""
|
|
||||||
setMSG "Moving Citra nand to the Emulation/storage folder"
|
|
||||||
echo -e ""
|
|
||||||
|
|
||||||
mv "$HOME/.local/share/citra-emu/nand/" $storagePath/citra/nand/
|
|
||||||
mv "$HOME/.local/share/citra-emu/sdmc/" $storagePath/citra/sdmc/
|
|
||||||
|
|
||||||
unlink "$HOME/.local/share/citra-emu/nand/"
|
|
||||||
unlink "$HOME/.local/share/citra-emu/sdmc/"
|
|
||||||
|
|
||||||
ln -ns "${storagePath}/citra/nand/" "$HOME/.local/share/citra-emu/nand/"
|
|
||||||
ln -ns "${storagePath}/citra/sdmc/" "$HOME/.local/share/citra-emu/sdmc/"
|
|
||||||
fi
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#WipeSettings
|
#WipeSettings
|
||||||
Citra_wipe(){
|
Citra_wipe(){
|
||||||
|
|
|
@ -76,8 +76,13 @@ Yuzu_install() {
|
||||||
Yuzu_init() {
|
Yuzu_init() {
|
||||||
echo "Begin Yuzu Init"
|
echo "Begin Yuzu Init"
|
||||||
|
|
||||||
|
cp "$EMUDECKGIT/tools/launchers/yuzu.sh" "$toolsPath/launchers/yuzu.sh"
|
||||||
|
chmod +x "$toolsPath/launchers/yuzu.sh"
|
||||||
|
mkdir -p "$HOME/.config/yuzu"
|
||||||
|
mkdir -p "$HOME/.local/share/yuzu"
|
||||||
|
rsync -avhp "$EMUDECKGIT/configs/org.yuzu_emu.yuzu/config/yuzu/." "$HOME/.config/yuzu"
|
||||||
|
rsync -avhp "$EMUDECKGIT/configs/org.yuzu_emu.yuzu/data/yuzu/." "$HOME/.local/share/yuzu"
|
||||||
Yuzu_migrate
|
Yuzu_migrate
|
||||||
|
|
||||||
configEmuAI "$Yuzu_emuName" "config" "$HOME/.config/yuzu" "$EMUDECKGIT/configs/org.yuzu_emu.yuzu/config/yuzu" "true"
|
configEmuAI "$Yuzu_emuName" "config" "$HOME/.config/yuzu" "$EMUDECKGIT/configs/org.yuzu_emu.yuzu/config/yuzu" "true"
|
||||||
configEmuAI "$Yuzu_emuName" "data" "$HOME/.local/share/yuzu" "$EMUDECKGIT/configs/org.yuzu_emu.yuzu/data/yuzu" "true"
|
configEmuAI "$Yuzu_emuName" "data" "$HOME/.local/share/yuzu" "$EMUDECKGIT/configs/org.yuzu_emu.yuzu/data/yuzu" "true"
|
||||||
|
|
||||||
|
@ -87,6 +92,11 @@ Yuzu_init() {
|
||||||
Yuzu_finalize
|
Yuzu_finalize
|
||||||
#SRM_createParsers
|
#SRM_createParsers
|
||||||
|
|
||||||
|
createDesktopShortcut "$HOME/.local/share/applications/Yuzu.desktop" \
|
||||||
|
"Yuzu" \
|
||||||
|
"${toolsPath}/launchers/yuzu.sh" \
|
||||||
|
"False"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#update
|
#update
|
||||||
|
|
2
icons/Citra.svg
Normal file
2
icons/Citra.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 17 KiB |
Loading…
Reference in a new issue