Posted September 08, 2018
Here is a flatpak manifest for BG1 (German). The flatpak has to build with the option "--arch=i386".
app-id: com.gog.baldur_s_gate_the_original_saga_german
branch: 2.1.0.10
runtime: org.freedesktop.Sdk
runtime-version: 1.6
sdk: org.freedesktop.Sdk/
command: start
finish-args:
- --socket=x11
- --socket=pulseaudio
- --device=dri
- --env=GOG_INSTALL_PATH=/app/game
- --env=GOG_GAME_PATH=/var/data/game
modules:
- name: install
buildsystem: simple
build-commands:
- script --return -c "sh gog_baldur_s_gate_the_original_saga_german_2.1.0.10.sh -- --notermspawn --i-agree-to-all-licenses --noreadme --nooptions --noprompt --destination /app/game --ui=stdio" /dev/null
- mkdir -p /app/share/applications /app/share/icons/hicolor/256x256/apps
- cp /app/game/support/icon.png /app/share/icons/hicolor/256x256/apps/com.gog.baldur_s_gate_the_original_saga_german.png
- echo "[Desktop Entry]" > /app/share/applications/com.gog.baldur_s_gate_the_original_saga_german.desktop
- echo "Type=Application" >> /app/share/applications/com.gog.baldur_s_gate_the_original_saga_german.desktop
- echo -n "Name=" >> /app/share/applications/com.gog.baldur_s_gate_the_original_saga_german.desktop
- head -1 /app/game/gameinfo >> /app/share/applications/com.gog.baldur_s_gate_the_original_saga_german.desktop
- echo "Icon=com.gog.baldur_s_gate_the_original_saga_german" >> /app/share/applications/com.gog.baldur_s_gate_the_original_saga_german.desktop
- echo "Exec=start" >> /app/share/applications/com.gog.baldur_s_gate_the_original_saga_german.desktop
- echo "Categories=Game;" >> /app/share/applications/com.gog.baldur_s_gate_the_original_saga_german.desktop
sources:
- type: file
path: gog_baldur_s_gate_the_original_saga_german_2.1.0.10.sh
- name: game
buildsystem: simple
build-commands:
- install -D start /app/bin/start
- install -D start-window /app/bin/start-window
- install -D settings /app/bin/settings
sources:
- type: script
dest-filename: start
commands:
- #!/bin/sh
- '# Because a flatpak starts read-only and the game changes files in the installation folder the game has to copied to the changeable user data.'
- '# This happens the first time. If you want to delete/uninstall the user data then you have to make this manually from the host system in ~/.var/'
- '# But safe before the savegames'
- '[ -d $GOG_GAME_PATH ] || cp -R $GOG_INSTALL_PATH $GOG_GAME_PATH '
- $GOG_GAME_PATH/start.sh $1
- type: script
dest-filename: start-window
commands:
- #!/bin/sh
- start --wine-window
- type: script
dest-filename: settings
commands:
- #!/bin/sh
- start --settings
I tested start, save and load a game.
Edit: It's a yml-file. You have to indent the text or you tell me how i can make in this forum the indentation.
app-id: com.gog.baldur_s_gate_the_original_saga_german
branch: 2.1.0.10
runtime: org.freedesktop.Sdk
runtime-version: 1.6
sdk: org.freedesktop.Sdk/
command: start
finish-args:
- --socket=x11
- --socket=pulseaudio
- --device=dri
- --env=GOG_INSTALL_PATH=/app/game
- --env=GOG_GAME_PATH=/var/data/game
modules:
- name: install
buildsystem: simple
build-commands:
- script --return -c "sh gog_baldur_s_gate_the_original_saga_german_2.1.0.10.sh -- --notermspawn --i-agree-to-all-licenses --noreadme --nooptions --noprompt --destination /app/game --ui=stdio" /dev/null
- mkdir -p /app/share/applications /app/share/icons/hicolor/256x256/apps
- cp /app/game/support/icon.png /app/share/icons/hicolor/256x256/apps/com.gog.baldur_s_gate_the_original_saga_german.png
- echo "[Desktop Entry]" > /app/share/applications/com.gog.baldur_s_gate_the_original_saga_german.desktop
- echo "Type=Application" >> /app/share/applications/com.gog.baldur_s_gate_the_original_saga_german.desktop
- echo -n "Name=" >> /app/share/applications/com.gog.baldur_s_gate_the_original_saga_german.desktop
- head -1 /app/game/gameinfo >> /app/share/applications/com.gog.baldur_s_gate_the_original_saga_german.desktop
- echo "Icon=com.gog.baldur_s_gate_the_original_saga_german" >> /app/share/applications/com.gog.baldur_s_gate_the_original_saga_german.desktop
- echo "Exec=start" >> /app/share/applications/com.gog.baldur_s_gate_the_original_saga_german.desktop
- echo "Categories=Game;" >> /app/share/applications/com.gog.baldur_s_gate_the_original_saga_german.desktop
sources:
- type: file
path: gog_baldur_s_gate_the_original_saga_german_2.1.0.10.sh
- name: game
buildsystem: simple
build-commands:
- install -D start /app/bin/start
- install -D start-window /app/bin/start-window
- install -D settings /app/bin/settings
sources:
- type: script
dest-filename: start
commands:
- #!/bin/sh
- '# Because a flatpak starts read-only and the game changes files in the installation folder the game has to copied to the changeable user data.'
- '# This happens the first time. If you want to delete/uninstall the user data then you have to make this manually from the host system in ~/.var/'
- '# But safe before the savegames'
- '[ -d $GOG_GAME_PATH ] || cp -R $GOG_INSTALL_PATH $GOG_GAME_PATH '
- $GOG_GAME_PATH/start.sh $1
- type: script
dest-filename: start-window
commands:
- #!/bin/sh
- start --wine-window
- type: script
dest-filename: settings
commands:
- #!/bin/sh
- start --settings
Edit: It's a yml-file. You have to indent the text or you tell me how i can make in this forum the indentation.
Post edited September 08, 2018 by fre.sch