RetroDECK/functions/global.sh

230 lines
13 KiB
Bash
Raw Normal View History

2022-06-09 08:25:20 +00:00
#!/bin/bash
# This file is containing some global function needed for the script such as the config file tools
feat/lighter manifest (#844) * ES-DE: outsourced * RetroArch: migrated to AppImage * XEMU: migrated to AppImage * MELONDS: migrated to AppImage * RPCS3: migrated to AppImage * MANIFEST: avoid overwriting native libraries * MANIFEST: fixing ES-DE * MANIFEST: fixed and normalized /app with FLATPAK_DEST * MANIFEST: cleanup * MANIFEST: fixed RetroArch * PPSSPP: added wanted sdl module * ES-DE: moved repo * PPSSPP: outsourced * PPSSPP: fixed link * MANIFEST: fixing copy actions * PCSX2: removing troublesome file * DOLPHIN: outsourced * SOLARUS: outsourced * MANIFEST: lowercased rpcs3 sha * MANIFEST: trying to figure out automation_task_list * MANIFEST: fixed primehack placeholders * REVERT ME: RUNNER CHANGED * XEMU: moved on the bottom just to see if something changes * DUCKSTATION: wrong cp target * MANFEST: moved thir party libraries in /app/usr/local/lib * MANFEST: removing dolphin debug libraries * MANFEST: removing primehack debug libraries * MANFEST: removing primehack pkgconfig libraries * MANFEST: removing cemu lib * SOLARUS: removing errored libs * MAME: reverted to its original state as it's not coming with libraries * RYUJINX: fixing chmod command * GZDOOM: outsourced * MANIFEST: added debug for checking out where tf is our icon * Submodules cleanup * GZDOOM: cleanup * FRAMEWORK: moved third party libs into /app/retrodeck/lib * MANIFEST: added retrodeck-pre-build commands * MANIFEST: module renamed * ES-DE: re-removed 'files/lib/girepository-1.0' * GLOBAL: pathing the retrodeck components provided libraries * RPCS3: moved bufgix in the proper module * MANIFEST: moved component libraries into /app/retrodeck/lib * MANIFEST: removing some debug cleanups * MANIFEST: desktop file don't need to be executable * ES-DE: re-adding libpoppler * ES--DE: moved to the end to overwrite older libraries * RYUJINX: fixed manifest * MANIFEST: injecting needed libraries and discarding the troublesome ones * MANIFEST: injecting needed libraries and discarding the troublesome ones - adding more * MelonDS: outsourced but self built in QT6 * MANIFEST: automated the third party libs manager * MANIFEST: fixed melonds build * Ryujinx: downgraded to the older but working version * MANIFEST: removed debug code * WORKFLOW: running on self-hosted again * MANIFEST: including debug and pkgconfig's librareis * MANIFEST: removing pkgconfig's librareis * MANIFEST: cannot move so copy and remove * MANIFEST: cannot move so copy and remove - fix * Toying with automation file to make it work again * PRE_BUILD_AUTOMATION: testing a different script * PRE_BUILD_AUTOMATION: adding new sha function * MAME: fixing link * MANIFEST: tweaks * ATL: fixing ES-DE entry * PPSSPP: fixed hash * SOLARUS: fixing debug libs copy command * APDATA: updated * SOLARUS: that's not the library you're looking for * GZDOOM: removing debug even here * Revamped codename wordlist * MANIFEST: following symlinks during library copy * WORKFLOW: moving down the artifact preparation for fltahub as we don't even need it in cooker * Manually adding missing libraries * More codenames * CEMU: added wrapper + RPCS3 fixes * THE GREAT FOLDER MOVE (aka let's see how much things I can break in a single commit) * emu: fixed dest filename for the wrapper * Cemu: fixing wrapper installation * MANIFEST: trying to add LLVM to solve PCSX2, Duckstation issues * MANIFEST: adding llvm doesn't change the situation, removed * MANIFEST: trying to add vulkan * MANIFEST: trying to add vulkan - removed as it should be already in (and that's broken) * VULKAN: testing some libraries * VULKAN: trying to add shaderc * Manifest: renaming es-de module to stick with the repo name for updating purposes * Migrated to the new latest links * MAME: frixed url * PCSX2: updated to 2.1.55 * Reverting workfolw edits * WORKFLOW: targetting the old repo for the release * WORKFLOW: updated some actions to a newever version to avoid deprecation at the end of the year * MISSING_LIBS: trying to fetch libshaderc * MAIN_WORKLFOW: updating actions versions [skip ci]
2024-08-05 01:45:21 +00:00
# pathing the retrodeck components provided libraries
# now disabled as we are importing everything in /app/lib. In case we are breaking something we need to restore this approach
# export LD_LIBRARY_PATH="/app/retrodeck/lib:/app/retrodeck/lib/debug:/app/retrodeck/lib/pkgconfig:$LD_LIBRARY_PATH"
source /app/libexec/050_save_migration.sh
source /app/libexec/checks.sh
source /app/libexec/compression.sh
source /app/libexec/dialogs.sh
source /app/libexec/logger.sh
source /app/libexec/other_functions.sh
source /app/libexec/multi_user.sh
source /app/libexec/framework.sh
source /app/libexec/post_update.sh
source /app/libexec/prepare_component.sh
source /app/libexec/presets.sh
2024-06-20 17:45:38 +00:00
source /app/libexec/configurator_functions.sh
source /app/libexec/run_game.sh
2022-09-06 13:24:36 +00:00
# Static variables
rd_conf="/var/config/retrodeck/retrodeck.cfg" # RetroDECK config file path
rd_conf_backup="/var/config/retrodeck/retrodeck.bak" # Backup of RetroDECK config file from update
rd_logs_folder="/var/config/retrodeck/logs" # Static location to write all RetroDECK-related logs
config="/app/retrodeck/config" # folder with all the default emulator configs
feat/lighter manifest (#844) * ES-DE: outsourced * RetroArch: migrated to AppImage * XEMU: migrated to AppImage * MELONDS: migrated to AppImage * RPCS3: migrated to AppImage * MANIFEST: avoid overwriting native libraries * MANIFEST: fixing ES-DE * MANIFEST: fixed and normalized /app with FLATPAK_DEST * MANIFEST: cleanup * MANIFEST: fixed RetroArch * PPSSPP: added wanted sdl module * ES-DE: moved repo * PPSSPP: outsourced * PPSSPP: fixed link * MANIFEST: fixing copy actions * PCSX2: removing troublesome file * DOLPHIN: outsourced * SOLARUS: outsourced * MANIFEST: lowercased rpcs3 sha * MANIFEST: trying to figure out automation_task_list * MANIFEST: fixed primehack placeholders * REVERT ME: RUNNER CHANGED * XEMU: moved on the bottom just to see if something changes * DUCKSTATION: wrong cp target * MANFEST: moved thir party libraries in /app/usr/local/lib * MANFEST: removing dolphin debug libraries * MANFEST: removing primehack debug libraries * MANFEST: removing primehack pkgconfig libraries * MANFEST: removing cemu lib * SOLARUS: removing errored libs * MAME: reverted to its original state as it's not coming with libraries * RYUJINX: fixing chmod command * GZDOOM: outsourced * MANIFEST: added debug for checking out where tf is our icon * Submodules cleanup * GZDOOM: cleanup * FRAMEWORK: moved third party libs into /app/retrodeck/lib * MANIFEST: added retrodeck-pre-build commands * MANIFEST: module renamed * ES-DE: re-removed 'files/lib/girepository-1.0' * GLOBAL: pathing the retrodeck components provided libraries * RPCS3: moved bufgix in the proper module * MANIFEST: moved component libraries into /app/retrodeck/lib * MANIFEST: removing some debug cleanups * MANIFEST: desktop file don't need to be executable * ES-DE: re-adding libpoppler * ES--DE: moved to the end to overwrite older libraries * RYUJINX: fixed manifest * MANIFEST: injecting needed libraries and discarding the troublesome ones * MANIFEST: injecting needed libraries and discarding the troublesome ones - adding more * MelonDS: outsourced but self built in QT6 * MANIFEST: automated the third party libs manager * MANIFEST: fixed melonds build * Ryujinx: downgraded to the older but working version * MANIFEST: removed debug code * WORKFLOW: running on self-hosted again * MANIFEST: including debug and pkgconfig's librareis * MANIFEST: removing pkgconfig's librareis * MANIFEST: cannot move so copy and remove * MANIFEST: cannot move so copy and remove - fix * Toying with automation file to make it work again * PRE_BUILD_AUTOMATION: testing a different script * PRE_BUILD_AUTOMATION: adding new sha function * MAME: fixing link * MANIFEST: tweaks * ATL: fixing ES-DE entry * PPSSPP: fixed hash * SOLARUS: fixing debug libs copy command * APDATA: updated * SOLARUS: that's not the library you're looking for * GZDOOM: removing debug even here * Revamped codename wordlist * MANIFEST: following symlinks during library copy * WORKFLOW: moving down the artifact preparation for fltahub as we don't even need it in cooker * Manually adding missing libraries * More codenames * CEMU: added wrapper + RPCS3 fixes * THE GREAT FOLDER MOVE (aka let's see how much things I can break in a single commit) * emu: fixed dest filename for the wrapper * Cemu: fixing wrapper installation * MANIFEST: trying to add LLVM to solve PCSX2, Duckstation issues * MANIFEST: adding llvm doesn't change the situation, removed * MANIFEST: trying to add vulkan * MANIFEST: trying to add vulkan - removed as it should be already in (and that's broken) * VULKAN: testing some libraries * VULKAN: trying to add shaderc * Manifest: renaming es-de module to stick with the repo name for updating purposes * Migrated to the new latest links * MAME: frixed url * PCSX2: updated to 2.1.55 * Reverting workfolw edits * WORKFLOW: targetting the old repo for the release * WORKFLOW: updated some actions to a newever version to avoid deprecation at the end of the year * MISSING_LIBS: trying to fetch libshaderc * MAIN_WORKLFOW: updating actions versions [skip ci]
2024-08-05 01:45:21 +00:00
rd_defaults="$config/retrodeck/retrodeck.cfg" # A default RetroDECK config file
rd_update_patch="/var/config/retrodeck/rd_update.patch" # A static location for the temporary patch file used during retrodeck.cfg updates
feat/lighter manifest (#844) * ES-DE: outsourced * RetroArch: migrated to AppImage * XEMU: migrated to AppImage * MELONDS: migrated to AppImage * RPCS3: migrated to AppImage * MANIFEST: avoid overwriting native libraries * MANIFEST: fixing ES-DE * MANIFEST: fixed and normalized /app with FLATPAK_DEST * MANIFEST: cleanup * MANIFEST: fixed RetroArch * PPSSPP: added wanted sdl module * ES-DE: moved repo * PPSSPP: outsourced * PPSSPP: fixed link * MANIFEST: fixing copy actions * PCSX2: removing troublesome file * DOLPHIN: outsourced * SOLARUS: outsourced * MANIFEST: lowercased rpcs3 sha * MANIFEST: trying to figure out automation_task_list * MANIFEST: fixed primehack placeholders * REVERT ME: RUNNER CHANGED * XEMU: moved on the bottom just to see if something changes * DUCKSTATION: wrong cp target * MANFEST: moved thir party libraries in /app/usr/local/lib * MANFEST: removing dolphin debug libraries * MANFEST: removing primehack debug libraries * MANFEST: removing primehack pkgconfig libraries * MANFEST: removing cemu lib * SOLARUS: removing errored libs * MAME: reverted to its original state as it's not coming with libraries * RYUJINX: fixing chmod command * GZDOOM: outsourced * MANIFEST: added debug for checking out where tf is our icon * Submodules cleanup * GZDOOM: cleanup * FRAMEWORK: moved third party libs into /app/retrodeck/lib * MANIFEST: added retrodeck-pre-build commands * MANIFEST: module renamed * ES-DE: re-removed 'files/lib/girepository-1.0' * GLOBAL: pathing the retrodeck components provided libraries * RPCS3: moved bufgix in the proper module * MANIFEST: moved component libraries into /app/retrodeck/lib * MANIFEST: removing some debug cleanups * MANIFEST: desktop file don't need to be executable * ES-DE: re-adding libpoppler * ES--DE: moved to the end to overwrite older libraries * RYUJINX: fixed manifest * MANIFEST: injecting needed libraries and discarding the troublesome ones * MANIFEST: injecting needed libraries and discarding the troublesome ones - adding more * MelonDS: outsourced but self built in QT6 * MANIFEST: automated the third party libs manager * MANIFEST: fixed melonds build * Ryujinx: downgraded to the older but working version * MANIFEST: removed debug code * WORKFLOW: running on self-hosted again * MANIFEST: including debug and pkgconfig's librareis * MANIFEST: removing pkgconfig's librareis * MANIFEST: cannot move so copy and remove * MANIFEST: cannot move so copy and remove - fix * Toying with automation file to make it work again * PRE_BUILD_AUTOMATION: testing a different script * PRE_BUILD_AUTOMATION: adding new sha function * MAME: fixing link * MANIFEST: tweaks * ATL: fixing ES-DE entry * PPSSPP: fixed hash * SOLARUS: fixing debug libs copy command * APDATA: updated * SOLARUS: that's not the library you're looking for * GZDOOM: removing debug even here * Revamped codename wordlist * MANIFEST: following symlinks during library copy * WORKFLOW: moving down the artifact preparation for fltahub as we don't even need it in cooker * Manually adding missing libraries * More codenames * CEMU: added wrapper + RPCS3 fixes * THE GREAT FOLDER MOVE (aka let's see how much things I can break in a single commit) * emu: fixed dest filename for the wrapper * Cemu: fixing wrapper installation * MANIFEST: trying to add LLVM to solve PCSX2, Duckstation issues * MANIFEST: adding llvm doesn't change the situation, removed * MANIFEST: trying to add vulkan * MANIFEST: trying to add vulkan - removed as it should be already in (and that's broken) * VULKAN: testing some libraries * VULKAN: trying to add shaderc * Manifest: renaming es-de module to stick with the repo name for updating purposes * Migrated to the new latest links * MAME: frixed url * PCSX2: updated to 2.1.55 * Reverting workfolw edits * WORKFLOW: targetting the old repo for the release * WORKFLOW: updated some actions to a newever version to avoid deprecation at the end of the year * MISSING_LIBS: trying to fetch libshaderc * MAIN_WORKLFOW: updating actions versions [skip ci]
2024-08-05 01:45:21 +00:00
bios_checklist="$config/retrodeck/reference_lists/bios_checklist.cfg" # A config file listing BIOS file information that can be verified
input_validation="$config/retrodeck/reference_lists/input_validation.cfg" # A config file listing valid CLI inputs
finit_options_list="$config/retrodeck/reference_lists/finit_options_list.cfg" # A config file listing available optional installs during finit
splashscreen_dir="/var/config/ES-DE/resources/graphics/extra_splashes" # The default location of extra splash screens
current_splash_file="/var/config/ES-DE/resources/graphics/splash.svg" # The active splash file that will be shown on boot
default_splash_file="/var/config/ES-DE/resources/graphics/splash-orig.svg" # The default RetroDECK splash screen
feat/single feature file (#887) * FEATURES: new branch init [skip ci] * FEATURES: structural changes [skip ci] * FEATURES: structural changes [skip ci] * FRAMEWORK: migrating easter_eggs into a reworked splash_screen function * FRAMEWORK: migrating update_rd_conf into a reworked function with features.json support * FRAMEWORK: variabilized features.json location * FEATURES: fixed an invalid value * FEATURES: added a sample jq to fetch all the resettable emulators for CLI * FEATURES: added a sample jq to fetch all the resettable emulators for CLI - fix * FEATURES: added more emulators and placeholders * FEATURES: added more systems and emulators * FEATURES: added more systems and emulators - fix * FEATURES: added more systems and emulators - fix2 * FEATURES: moved libretro cores in retroarch and added more presets * FEATURES: added the last missing presets * FEATURES: added the last missing presets - fix * FEATURES: json fmt * FEATURES: added more bioses * FEATURES: removed the bioses * FEATURES: migrated incompatible_presets * FEATURES: migrated deploy_helper_files and find_empty_rom_folders * FEATURES: migrated deploy_helper_files and find_empty_rom_folders * FEATURES: moved emulators outside system, added all the system pretty names * FEATURES: fixes due to the new structure * FEATURES: migrated pretty system names * FEATURES: migrated compression_targets * FEATURES: cleanup incompatible_presets * FEATURES: migrated zip_compressable_extensions * BIOS_FILE: creating a json (WIP) * FEATURES: fixed Japanese system names * FEATURES: fixed incompatible presets
2024-08-15 14:42:40 +00:00
# TODO: instead of this maybe we can iterate the features.json
feat/lighter manifest (#844) * ES-DE: outsourced * RetroArch: migrated to AppImage * XEMU: migrated to AppImage * MELONDS: migrated to AppImage * RPCS3: migrated to AppImage * MANIFEST: avoid overwriting native libraries * MANIFEST: fixing ES-DE * MANIFEST: fixed and normalized /app with FLATPAK_DEST * MANIFEST: cleanup * MANIFEST: fixed RetroArch * PPSSPP: added wanted sdl module * ES-DE: moved repo * PPSSPP: outsourced * PPSSPP: fixed link * MANIFEST: fixing copy actions * PCSX2: removing troublesome file * DOLPHIN: outsourced * SOLARUS: outsourced * MANIFEST: lowercased rpcs3 sha * MANIFEST: trying to figure out automation_task_list * MANIFEST: fixed primehack placeholders * REVERT ME: RUNNER CHANGED * XEMU: moved on the bottom just to see if something changes * DUCKSTATION: wrong cp target * MANFEST: moved thir party libraries in /app/usr/local/lib * MANFEST: removing dolphin debug libraries * MANFEST: removing primehack debug libraries * MANFEST: removing primehack pkgconfig libraries * MANFEST: removing cemu lib * SOLARUS: removing errored libs * MAME: reverted to its original state as it's not coming with libraries * RYUJINX: fixing chmod command * GZDOOM: outsourced * MANIFEST: added debug for checking out where tf is our icon * Submodules cleanup * GZDOOM: cleanup * FRAMEWORK: moved third party libs into /app/retrodeck/lib * MANIFEST: added retrodeck-pre-build commands * MANIFEST: module renamed * ES-DE: re-removed 'files/lib/girepository-1.0' * GLOBAL: pathing the retrodeck components provided libraries * RPCS3: moved bufgix in the proper module * MANIFEST: moved component libraries into /app/retrodeck/lib * MANIFEST: removing some debug cleanups * MANIFEST: desktop file don't need to be executable * ES-DE: re-adding libpoppler * ES--DE: moved to the end to overwrite older libraries * RYUJINX: fixed manifest * MANIFEST: injecting needed libraries and discarding the troublesome ones * MANIFEST: injecting needed libraries and discarding the troublesome ones - adding more * MelonDS: outsourced but self built in QT6 * MANIFEST: automated the third party libs manager * MANIFEST: fixed melonds build * Ryujinx: downgraded to the older but working version * MANIFEST: removed debug code * WORKFLOW: running on self-hosted again * MANIFEST: including debug and pkgconfig's librareis * MANIFEST: removing pkgconfig's librareis * MANIFEST: cannot move so copy and remove * MANIFEST: cannot move so copy and remove - fix * Toying with automation file to make it work again * PRE_BUILD_AUTOMATION: testing a different script * PRE_BUILD_AUTOMATION: adding new sha function * MAME: fixing link * MANIFEST: tweaks * ATL: fixing ES-DE entry * PPSSPP: fixed hash * SOLARUS: fixing debug libs copy command * APDATA: updated * SOLARUS: that's not the library you're looking for * GZDOOM: removing debug even here * Revamped codename wordlist * MANIFEST: following symlinks during library copy * WORKFLOW: moving down the artifact preparation for fltahub as we don't even need it in cooker * Manually adding missing libraries * More codenames * CEMU: added wrapper + RPCS3 fixes * THE GREAT FOLDER MOVE (aka let's see how much things I can break in a single commit) * emu: fixed dest filename for the wrapper * Cemu: fixing wrapper installation * MANIFEST: trying to add LLVM to solve PCSX2, Duckstation issues * MANIFEST: adding llvm doesn't change the situation, removed * MANIFEST: trying to add vulkan * MANIFEST: trying to add vulkan - removed as it should be already in (and that's broken) * VULKAN: testing some libraries * VULKAN: trying to add shaderc * Manifest: renaming es-de module to stick with the repo name for updating purposes * Migrated to the new latest links * MAME: frixed url * PCSX2: updated to 2.1.55 * Reverting workfolw edits * WORKFLOW: targetting the old repo for the release * WORKFLOW: updated some actions to a newever version to avoid deprecation at the end of the year * MISSING_LIBS: trying to fetch libshaderc * MAIN_WORKLFOW: updating actions versions [skip ci]
2024-08-05 01:45:21 +00:00
multi_user_emulator_config_dirs="$config/retrodeck/reference_lists/multi_user_emulator_config_dirs.cfg" # A list of emulator config folders that can be safely linked/unlinked entirely in multi-user mode
rd_es_themes="/app/share/es-de/themes" # The directory where themes packaged with RetroDECK are stored
lockfile="/var/config/retrodeck/.lock" # Where the lockfile is located
default_sd="/run/media/mmcblk0p1" # Steam Deck SD default path
hard_version="$(cat '/app/retrodeck/version')" # hardcoded version (in the readonly filesystem)
rd_repo="https://github.com/RetroDECK/RetroDECK" # The URL of the main RetroDECK GitHub repo
es_themes_list="https://gitlab.com/es-de/themes/themes-list/-/raw/master/themes.json" # The URL of the ES-DE 2.0 themes list
remote_network_target_1="https://flathub.org" # The URL of a common internet target for testing network access
remote_network_target_2="$rd_repo" # The URL of a common internet target for testing network access
remote_network_target_3="https://one.one.one.one" # The URL of a common internet target for testing network access
feat/lighter manifest (#844) * ES-DE: outsourced * RetroArch: migrated to AppImage * XEMU: migrated to AppImage * MELONDS: migrated to AppImage * RPCS3: migrated to AppImage * MANIFEST: avoid overwriting native libraries * MANIFEST: fixing ES-DE * MANIFEST: fixed and normalized /app with FLATPAK_DEST * MANIFEST: cleanup * MANIFEST: fixed RetroArch * PPSSPP: added wanted sdl module * ES-DE: moved repo * PPSSPP: outsourced * PPSSPP: fixed link * MANIFEST: fixing copy actions * PCSX2: removing troublesome file * DOLPHIN: outsourced * SOLARUS: outsourced * MANIFEST: lowercased rpcs3 sha * MANIFEST: trying to figure out automation_task_list * MANIFEST: fixed primehack placeholders * REVERT ME: RUNNER CHANGED * XEMU: moved on the bottom just to see if something changes * DUCKSTATION: wrong cp target * MANFEST: moved thir party libraries in /app/usr/local/lib * MANFEST: removing dolphin debug libraries * MANFEST: removing primehack debug libraries * MANFEST: removing primehack pkgconfig libraries * MANFEST: removing cemu lib * SOLARUS: removing errored libs * MAME: reverted to its original state as it's not coming with libraries * RYUJINX: fixing chmod command * GZDOOM: outsourced * MANIFEST: added debug for checking out where tf is our icon * Submodules cleanup * GZDOOM: cleanup * FRAMEWORK: moved third party libs into /app/retrodeck/lib * MANIFEST: added retrodeck-pre-build commands * MANIFEST: module renamed * ES-DE: re-removed 'files/lib/girepository-1.0' * GLOBAL: pathing the retrodeck components provided libraries * RPCS3: moved bufgix in the proper module * MANIFEST: moved component libraries into /app/retrodeck/lib * MANIFEST: removing some debug cleanups * MANIFEST: desktop file don't need to be executable * ES-DE: re-adding libpoppler * ES--DE: moved to the end to overwrite older libraries * RYUJINX: fixed manifest * MANIFEST: injecting needed libraries and discarding the troublesome ones * MANIFEST: injecting needed libraries and discarding the troublesome ones - adding more * MelonDS: outsourced but self built in QT6 * MANIFEST: automated the third party libs manager * MANIFEST: fixed melonds build * Ryujinx: downgraded to the older but working version * MANIFEST: removed debug code * WORKFLOW: running on self-hosted again * MANIFEST: including debug and pkgconfig's librareis * MANIFEST: removing pkgconfig's librareis * MANIFEST: cannot move so copy and remove * MANIFEST: cannot move so copy and remove - fix * Toying with automation file to make it work again * PRE_BUILD_AUTOMATION: testing a different script * PRE_BUILD_AUTOMATION: adding new sha function * MAME: fixing link * MANIFEST: tweaks * ATL: fixing ES-DE entry * PPSSPP: fixed hash * SOLARUS: fixing debug libs copy command * APDATA: updated * SOLARUS: that's not the library you're looking for * GZDOOM: removing debug even here * Revamped codename wordlist * MANIFEST: following symlinks during library copy * WORKFLOW: moving down the artifact preparation for fltahub as we don't even need it in cooker * Manually adding missing libraries * More codenames * CEMU: added wrapper + RPCS3 fixes * THE GREAT FOLDER MOVE (aka let's see how much things I can break in a single commit) * emu: fixed dest filename for the wrapper * Cemu: fixing wrapper installation * MANIFEST: trying to add LLVM to solve PCSX2, Duckstation issues * MANIFEST: adding llvm doesn't change the situation, removed * MANIFEST: trying to add vulkan * MANIFEST: trying to add vulkan - removed as it should be already in (and that's broken) * VULKAN: testing some libraries * VULKAN: trying to add shaderc * Manifest: renaming es-de module to stick with the repo name for updating purposes * Migrated to the new latest links * MAME: frixed url * PCSX2: updated to 2.1.55 * Reverting workfolw edits * WORKFLOW: targetting the old repo for the release * WORKFLOW: updated some actions to a newever version to avoid deprecation at the end of the year * MISSING_LIBS: trying to fetch libshaderc * MAIN_WORKLFOW: updating actions versions [skip ci]
2024-08-05 01:45:21 +00:00
helper_files_folder="$config/retrodeck/helper_files" # The parent folder of RetroDECK documentation files for deployment
rd_appdata="/app/share/appdata/net.retrodeck.retrodeck.appdata.xml" # The shipped appdata XML file for this version
rpcs3_firmware="http://dus01.ps3.update.playstation.net/update/ps3/image/us/2024_0227_3694eb3fb8d9915c112e6ab41a60c69f/PS3UPDAT.PUP" # RPCS3 Firmware download location
RA_API_URL="https://retroachievements.org/dorequest.php" # API URL for RetroAchievements.org
feat/lighter manifest (#844) * ES-DE: outsourced * RetroArch: migrated to AppImage * XEMU: migrated to AppImage * MELONDS: migrated to AppImage * RPCS3: migrated to AppImage * MANIFEST: avoid overwriting native libraries * MANIFEST: fixing ES-DE * MANIFEST: fixed and normalized /app with FLATPAK_DEST * MANIFEST: cleanup * MANIFEST: fixed RetroArch * PPSSPP: added wanted sdl module * ES-DE: moved repo * PPSSPP: outsourced * PPSSPP: fixed link * MANIFEST: fixing copy actions * PCSX2: removing troublesome file * DOLPHIN: outsourced * SOLARUS: outsourced * MANIFEST: lowercased rpcs3 sha * MANIFEST: trying to figure out automation_task_list * MANIFEST: fixed primehack placeholders * REVERT ME: RUNNER CHANGED * XEMU: moved on the bottom just to see if something changes * DUCKSTATION: wrong cp target * MANFEST: moved thir party libraries in /app/usr/local/lib * MANFEST: removing dolphin debug libraries * MANFEST: removing primehack debug libraries * MANFEST: removing primehack pkgconfig libraries * MANFEST: removing cemu lib * SOLARUS: removing errored libs * MAME: reverted to its original state as it's not coming with libraries * RYUJINX: fixing chmod command * GZDOOM: outsourced * MANIFEST: added debug for checking out where tf is our icon * Submodules cleanup * GZDOOM: cleanup * FRAMEWORK: moved third party libs into /app/retrodeck/lib * MANIFEST: added retrodeck-pre-build commands * MANIFEST: module renamed * ES-DE: re-removed 'files/lib/girepository-1.0' * GLOBAL: pathing the retrodeck components provided libraries * RPCS3: moved bufgix in the proper module * MANIFEST: moved component libraries into /app/retrodeck/lib * MANIFEST: removing some debug cleanups * MANIFEST: desktop file don't need to be executable * ES-DE: re-adding libpoppler * ES--DE: moved to the end to overwrite older libraries * RYUJINX: fixed manifest * MANIFEST: injecting needed libraries and discarding the troublesome ones * MANIFEST: injecting needed libraries and discarding the troublesome ones - adding more * MelonDS: outsourced but self built in QT6 * MANIFEST: automated the third party libs manager * MANIFEST: fixed melonds build * Ryujinx: downgraded to the older but working version * MANIFEST: removed debug code * WORKFLOW: running on self-hosted again * MANIFEST: including debug and pkgconfig's librareis * MANIFEST: removing pkgconfig's librareis * MANIFEST: cannot move so copy and remove * MANIFEST: cannot move so copy and remove - fix * Toying with automation file to make it work again * PRE_BUILD_AUTOMATION: testing a different script * PRE_BUILD_AUTOMATION: adding new sha function * MAME: fixing link * MANIFEST: tweaks * ATL: fixing ES-DE entry * PPSSPP: fixed hash * SOLARUS: fixing debug libs copy command * APDATA: updated * SOLARUS: that's not the library you're looking for * GZDOOM: removing debug even here * Revamped codename wordlist * MANIFEST: following symlinks during library copy * WORKFLOW: moving down the artifact preparation for fltahub as we don't even need it in cooker * Manually adding missing libraries * More codenames * CEMU: added wrapper + RPCS3 fixes * THE GREAT FOLDER MOVE (aka let's see how much things I can break in a single commit) * emu: fixed dest filename for the wrapper * Cemu: fixing wrapper installation * MANIFEST: trying to add LLVM to solve PCSX2, Duckstation issues * MANIFEST: adding llvm doesn't change the situation, removed * MANIFEST: trying to add vulkan * MANIFEST: trying to add vulkan - removed as it should be already in (and that's broken) * VULKAN: testing some libraries * VULKAN: trying to add shaderc * Manifest: renaming es-de module to stick with the repo name for updating purposes * Migrated to the new latest links * MAME: frixed url * PCSX2: updated to 2.1.55 * Reverting workfolw edits * WORKFLOW: targetting the old repo for the release * WORKFLOW: updated some actions to a newever version to avoid deprecation at the end of the year * MISSING_LIBS: trying to fetch libshaderc * MAIN_WORKLFOW: updating actions versions [skip ci]
2024-08-05 01:45:21 +00:00
presets_dir="$config/retrodeck/presets" # Repository for all system preset config files
git_organization_name="RetroDECK" # The name of the organization in our git repository such as GitHub
cooker_repository_name="Cooker" # The name of the cooker repository under RetroDECK organization
main_repository_name="RetroDECK" # The name of the main repository under RetroDECK organization
features="$config/retrodeck/reference_lists/features.json" # A file where all the RetroDECK and component capabilities are kept for querying
es_systems="/app/share/es-de/resources/systems/linux/es_systems.xml" # ES-DE supported system list
2024-09-12 01:38:00 +00:00
es_find_rules="/app/share/es-de/resources/systems/linux/es_find_rules.xml" # ES-DE emulator find rules
2022-09-06 12:46:59 +00:00
# Godot data transfer temp files
2024-02-27 21:31:39 +00:00
godot_bios_files_checked="/var/config/retrodeck/godot/godot_bios_files_checked.tmp"
godot_current_preset_settings="/var/config/retrodeck/godot/godot_current_preset_settings.tmp"
godot_compression_compatible_games="/var/config/retrodeck/godot/godot_compression_compatible_games.tmp"
godot_empty_roms_folders="/var/config/retrodeck/godot/godot_empty_roms_folders.tmp"
# Config files for emulators with single config files
duckstationconf="/var/config/duckstation/settings.ini"
melondsconf="/var/config/melonDS/melonDS.ini"
ryujinxconf="/var/config/Ryujinx/Config.json"
xemuconf="/var/config/xemu/xemu.toml"
yuzuconf="/var/config/yuzu/qt-config.ini"
citraconf="/var/config/citra-emu/qt-config.ini"
# ES-DE config files
export ESDE_APPDATA_DIR="/var/config/ES-DE"
es_settings="/var/config/ES-DE/settings/es_settings.xml"
2024-03-22 21:10:26 +00:00
es_source_logs="/var/config/ES-DE/logs"
# RetroArch config files
raconf="/var/config/retroarch/retroarch.cfg"
ra_core_conf="/var/config/retroarch/retroarch-core-options.cfg"
ra_scummvm_conf="/var/config/retroarch/system/scummvm.ini"
2024-09-12 01:38:00 +00:00
ra_cores_path="/var/config/retroarch/cores"
# CEMU config files
cemuconf="/var/config/Cemu/settings.xml"
cemucontrollerconf="/var/config/Cemu/controllerProfiles/controller0.xml"
# Dolphin config files
dolphinconf="/var/config/dolphin-emu/Dolphin.ini"
dolphingcpadconf="/var/config/dolphin-emu/GCPadNew.ini"
dolphingfxconf="/var/config/dolphin-emu/GFX.ini"
dolphinhkconf="/var/config/dolphin-emu/Hotkeys.ini"
dolphinqtconf="/var/config/dolphin-emu/Qt.ini"
# PCSX2 config files
pcsx2conf="/var/config/PCSX2/inis/PCSX2.ini"
pcsx2gsconf="/var/config/PCSX2/inis/GS.ini" # This file should be deprecated since moving to PCSX2-QT
pcsx2uiconf="/var/config/PCSX2/inis/PCSX2_ui.ini" # This file should be deprecated since moving to PCSX2-QT
pcsx2vmconf="/var/config/PCSX2/inis/PCSX2_vm.ini" # This file should be deprecated since moving to PCSX2-QT
2022-11-18 20:10:17 +00:00
# PPSSPPDL config files
ppssppconf="/var/config/ppsspp/PSP/SYSTEM/ppsspp.ini"
ppssppcontrolsconf="/var/config/ppsspp/PSP/SYSTEM/controls.ini"
# Primehack config files
primehackconf="/var/config/primehack/Dolphin.ini"
primehackgcpadconf="/var/config/primehack/GCPadNew.ini"
primehackgfxconf="/var/config/primehack/GFX.ini"
primehackhkconf="/var/config/primehack/Hotkeys.ini"
primehackqtconf="/var/config/primehack/Qt.ini"
2023-04-06 20:16:50 +00:00
# RPCS3 config files
rpcs3conf="/var/config/rpcs3/config.yml"
rpcs3vfsconf="/var/config/rpcs3/vfs.yml"
# Vita3k config files
vita3kconf="/var/config/Vita3K/config.yml"
# MAME-SA config files
2024-03-01 12:56:32 +00:00
mameconf="/var/config/mame/ini/mame.ini"
mameuiconf="/var/config/mame/ini/ui.ini"
2024-02-28 09:17:03 +00:00
mamedefconf="/var/config/mame/cfg/default.cfg"
2024-03-22 21:10:26 +00:00
# Initialize logging location if it doesn't exist, before anything else happens
if [ ! -d "$rd_logs_folder" ]; then
create_dir "$rd_logs_folder"
fi
if [[ ! -d "$rd_logs_folder/ES-DE" ]]; then
dir_prep "$rd_logs_folder/ES-DE" "$es_source_logs"
fi
# Initialize location of Godot temp data files, if it doesn't exist
if [[ ! -d "/var/config/retrodeck/godot" ]]; then
create_dir "/var/config/retrodeck/godot"
fi
2022-11-18 20:10:17 +00:00
# We moved the lockfile in /var/config/retrodeck in order to solve issue #53 - Remove in a few versions
2024-02-21 15:04:00 +00:00
if [[ -f "$HOME/retrodeck/.lock" ]]; then
2022-11-18 20:10:17 +00:00
mv "$HOME/retrodeck/.lock" $lockfile
fi
# If there is no config file I initalize the file with the the default values
if [[ ! -f "$rd_conf" ]]; then
2024-01-04 16:34:02 +00:00
log w "RetroDECK config file not found in $rd_conf"
log i "Initializing"
# if we are here means that the we are in a new installation, so the version is valorized with the hardcoded one
2022-09-19 07:25:49 +00:00
# Initializing the variables
2024-02-21 15:04:00 +00:00
if [[ -z "$version" ]]; then
if [[ -f "$lockfile" ]]; then
if [[ $(cat $lockfile) == *"0.4."* ]] || [[ $(cat $lockfile) == *"0.3."* ]] || [[ $(cat $lockfile) == *"0.2."* ]] || [[ $(cat $lockfile) == *"0.1."* ]]; then # If the previous version is very out of date, pre-rd_conf
log d "Running version workaround"
2024-02-21 15:04:00 +00:00
version=$(cat $lockfile)
fi
else
version="$hard_version"
fi
2022-10-06 21:47:09 +00:00
fi
# Check if SD card path has changed from SteamOS update
if [[ ! -d "$default_sd" && "$(ls -A /run/media/deck/)" ]]; then
2024-02-23 18:37:22 +00:00
if [[ $(find /run/media/deck/* -maxdepth 0 -type d -print | wc -l) -eq 1 ]]; then # If there is only one SD card found in the new SteamOS 3.5 location, assign it as the default
default_sd="$(find /run/media/deck/* -maxdepth 0 -type d -print)"
else # If the default legacy path cannot be found, and there are multiple entries in the new Steam OS 3.5 SD card path, let the user pick which one to use
2024-02-21 15:04:00 +00:00
configurator_generic_dialog "RetroDECK Setup" "The SD card was not found in the default location, and multiple drives were detected.\nPlease browse to the location of the desired SD card.\n\nIf you are not using an SD card, please click \"Cancel\"."
default_sd="$(directory_browse "SD Card Location")"
fi
fi
cp $rd_defaults $rd_conf # Load default settings file
2023-03-08 14:51:13 +00:00
set_setting_value $rd_conf "version" "$version" retrodeck # Set current version for new installs
2023-04-05 18:21:50 +00:00
set_setting_value $rd_conf "sdcard" "$default_sd" retrodeck "paths" # Set SD card location if default path has changed
2022-09-19 07:25:49 +00:00
if grep -qF "cooker" <<< "$hard_version" || grep -qF "PR-" <<< "$hard_version"; then # If newly-installed version is a "cooker" or PR build
set_setting_value $rd_conf "update_repo" "$cooker_repository_name" retrodeck "options"
set_setting_value $rd_conf "update_check" "true" retrodeck "options"
2023-05-19 14:03:02 +00:00
set_setting_value $rd_conf "developer_options" "true" retrodeck "options"
fi
2024-01-04 16:34:02 +00:00
log i "Setting config file permissions"
chmod +rw $rd_conf
log i "RetroDECK config file initialized. Contents:\n\n$(cat $rd_conf)\n"
2023-04-19 12:39:35 +00:00
conf_read # Load new variables into memory
#tmplog_merger # This function is tempry(?) removed
2022-09-24 18:28:49 +00:00
2023-04-19 12:39:35 +00:00
# If the config file is existing i just read the variables
else
2024-01-04 16:34:02 +00:00
log i "Found RetroDECK config file in $rd_conf"
log i "Loading it"
if grep -qF "cooker" <<< $hard_version; then # If newly-installed version is a "cooker" build
set_setting_value $rd_conf "update_repo" "$cooker_repository_name" retrodeck "options"
set_setting_value $rd_conf "update_check" "true" retrodeck "options"
2023-05-19 14:03:02 +00:00
set_setting_value $rd_conf "developer_options" "true" retrodeck "options"
fi
2023-04-19 12:39:35 +00:00
conf_read
# Verify rdhome is where it is supposed to be.
2024-02-21 15:04:00 +00:00
if [[ ! -d "$rdhome" ]]; then
prev_home_path="$rdhome"
configurator_generic_dialog "RetroDECK Setup" "The RetroDECK data folder was not found in the expected location.\nThis may happen when SteamOS is updated.\n\nPlease browse to the current location of the \"retrodeck\" folder."
2023-03-07 15:06:08 +00:00
new_home_path=$(directory_browse "RetroDECK folder location")
set_setting_value $rd_conf "rdhome" "$new_home_path" retrodeck "paths"
2023-04-19 12:39:35 +00:00
conf_read
#tmplog_merger # This function is tempry(?) removed
prepare_component "retrodeck" "postmove"
prepare_component "all" "postmove"
conf_write
fi
2023-08-17 17:38:18 +00:00
# Static variables dependent on $rd_conf values, need to be set after reading $rd_conf
backups_folder="$rdhome/backups" # A standard location for backup file storage
multi_user_data_folder="$rdhome/multi-user-data" # The default location of multi-user environment profiles
fi
2024-02-16 16:20:23 +00:00
logs_folder="$rdhome/logs" # The path of the logs folder, here we collect all the logs