RetroDECK/developer_toolbox/inject_framework.sh

49 lines
1.8 KiB
Bash
Raw Normal View History

#!/bin/bash
2024-03-08 19:36:39 +00:00
# WARNING: run this script from the project root folder, not from here!!
# This script is used to inject framework and config files inside a RetroDECK cooker installation
# To apply the injected config you have to reset the targeted component from the Configurator
# Please know what you're doing, if you need to undo this you need to completely uninstall and reinstall RetroDECK flatpak
# Please note that this may create a dirty situation where older files are still in place as the action is add and overwrite
flatpak_user_installation="$HOME/.local/share/flatpak/app/net.retrodeck.retrodeck/current/active/files"
flatpak_system_installation="/var/lib/flatpak/app/net.retrodeck.retrodeck/current/active/files"
force_user=false
force_system=false
# Parse arguments
while [[ "$#" -gt 0 ]]; do
case $1 in
--force-user) force_user=true ;;
--force-system) force_system=true ;;
*) echo "Unknown parameter: $1"; exit 1 ;;
esac
shift
done
# Determine installation path
if [ "$force_user" = true ]; then
echo "Forcing user mode installation."
app="$flatpak_user_installation"
elif [ "$force_system" = true ]; then
echo "Forcing system mode installation."
app="$flatpak_system_installation"
elif [ -d "$flatpak_user_installation" ]; then
echo "RetroDECK is installed in user mode, proceeding."
app="$flatpak_user_installation"
elif [ -d "$flatpak_system_installation" ]; then
2024-03-11 14:22:02 +00:00
echo "RetroDECK is installed in system mode, proceeding."
app="$flatpak_system_installation"
else
echo "RetroDECK installation not found, quitting"
exit 1
fi
# Copying files to the installation
2024-03-19 23:19:06 +00:00
sudo cp -vfr "res/binding_icons" "$app/retrodeck/binding_icons"
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
sudo cp -vfr "config/"** "$app/retrodeck/config/"
2024-03-19 23:19:06 +00:00
sudo cp -vfr "tools" "$app"
sudo cp -vfr "retrodeck.sh" "$app/bin/"
sudo cp -vfr "functions/"** "$app/libexec/"