diff options
author | Claudia Pellegrino | 2022-08-10 23:15:21 +0200 |
---|---|---|
committer | Claudia Pellegrino | 2022-08-10 23:15:21 +0200 |
commit | 5ca0e761d97451a462c6c0a7ca5189cea8ae5934 (patch) | |
tree | 2ea133b4f841cc689716e6c2eb40f05336e00fcf /inscryption.bash | |
parent | 3e87d95f35e4175367bd50db8e495c730d2c9458 (diff) | |
download | aur-5ca0e761d97451a462c6c0a7ca5189cea8ae5934.tar.gz |
gog-inscryption 1.10.57447
Update to 1.10.57447 and switch to the native Linux build.
Diffstat (limited to 'inscryption.bash')
-rw-r--r-- | inscryption.bash | 74 |
1 files changed, 28 insertions, 46 deletions
diff --git a/inscryption.bash b/inscryption.bash index babb6dcbff4d..d7c97703f9ef 100644 --- a/inscryption.bash +++ b/inscryption.bash @@ -2,57 +2,39 @@ set -eu PKGNAME='inscryption' -APPNAME_UPSTREAM='Inscryption' -EXE="C:/Program Files/GOG Games/${APPNAME_UPSTREAM}/Inscryption.exe" PKG_USER_DATA_HOME="${XDG_DATA_HOME:-"${HOME}/.local/share"}/${PKGNAME}" echo >&2 "Initializing" -export WINEARCH='win64' -export WINEPREFIX="${PKG_USER_DATA_HOME}/wine" +APPDIR_SOURCE='/opt/inscryption/data/noarch' +USER_OVERLAYDIR="${PKG_USER_DATA_HOME}/overlay" -APPDIR_SOURCE="/opt/${PKGNAME}" -APPDIR_PARENT="${WINEPREFIX}/drive_c/Program Files/GOG Games" -APPDIR_TARGET="${APPDIR_PARENT}/${APPNAME_UPSTREAM}" -TARGET_HOME="${WINEPREFIX}/drive_c/users/$(whoami)" +echo >&2 "Refreshing symlinks from ${USER_OVERLAYDIR}" -USER_APPDATADIR_SOURCE="${PKG_USER_DATA_HOME}/userappdata" -USER_APPDATADIR_TARGET="${TARGET_HOME}/AppData/LocalLow/Daniel Mullins Games" -USER_OVERLAYDIR="${PKG_USER_DATA_HOME}/overlay" +echo >&2 "==> Creating ${USER_OVERLAYDIR}" +mkdir >&2 -pv "${USER_OVERLAYDIR}/game" + +echo >&2 "==> Linking from ${APPDIR_SOURCE}" +cd "${USER_OVERLAYDIR}" +ln >&2 -fnsv "${APPDIR_SOURCE}/start.sh" 'start.sh' +ln >&2 -fnsv "${APPDIR_SOURCE}/support" 'support' +ln >&2 -fnsv "${APPDIR_SOURCE}/game/Inscryption_Data" 'game/Inscryption_Data' +ln >&2 -fnsv "${APPDIR_SOURCE}/game/UnityPlayer.so" 'game/UnityPlayer.so' + +# Copy the launcher binary because symlinking would cause it to +# pick up its own real path +cp -vP --preserve=mode "${APPDIR_SOURCE}/game/Inscryption.x86_64" 'game/' + +echo >&2 "==> Done" + +# Migrate saved game files from the earlier, Wine-based package; +# the native Linux version of Inscryption expects the saved game to +# live in the `game` subdirectory +echo >&2 "Migrating saved game files from previous version" +find "${USER_OVERLAYDIR}" -mindepth 1 -maxdepth 1 -name '*.gwsave' \ + -exec mv -nv '{}' "${USER_OVERLAYDIR}/game/" ';' >&2 -echo >&2 "Checking for Wine prefix" -if ! [ -d "${WINEPREFIX}" ]; then - echo >&2 "==> Bootstrapping Wine prefix: ${WINEPREFIX}" - mkdir >&2 -pv "${WINEPREFIX}" - wineboot -i 2>&1 - rm >&2 -fv "${WINEPREFIX}/dosdevices/z:" - echo >&2 "==> Done" -fi - -echo >&2 "Checking user data directory" -if ! [ -h "${USER_APPDATADIR_TARGET}/${APPNAME_UPSTREAM}" ]; then - echo >&2 "==> Creating ${USER_APPDATADIR_TARGET}" - mkdir >&2 -pv "${USER_APPDATADIR_TARGET}" - cd "${USER_APPDATADIR_TARGET}" - echo >&2 "==> Linking from ${USER_APPDATADIR_SOURCE}/${APPNAME_UPSTREAM}" - mkdir >&2 -pv "${USER_APPDATADIR_SOURCE}/${APPNAME_UPSTREAM}" - ln >&2 -fnsv "${USER_APPDATADIR_SOURCE}/${APPNAME_UPSTREAM}" -fi - -echo >&2 "Checking app directory" -if ! [ -h "${APPDIR_TARGET}" ]; then - echo >&2 "==> Creating ${APPDIR_PARENT}" - mkdir >&2 -pv "${APPDIR_PARENT}" - echo >&2 "==> Creating ${USER_OVERLAYDIR}" - mkdir >&2 -pv "${USER_OVERLAYDIR}" - echo >&2 "==> Linking from ${USER_OVERLAYDIR}" - ln >&2 -fnsv "${USER_OVERLAYDIR}" "${APPDIR_TARGET}" - cd "${APPDIR_TARGET}/" - echo >&2 "==> Linking from ${APPDIR_SOURCE}" - find "${APPDIR_SOURCE}" -mindepth 1 -maxdepth 1 -exec ln >&2 -fnsv '{}' ';' - echo >&2 "==> Done" -fi - -echo >&2 "Launching app with Wine" -wine 2>&1 "${EXE}" +echo >&2 "Launching app" +cd "${USER_OVERLAYDIR}" +./start.sh "$@" echo >&2 "==> Finished" |