Commit 749fa723 authored by Antoine Le Gonidec's avatar Antoine Le Gonidec

Merge branch 'play.it-2'

parents 297d3ccb c8a9e41c
Pipeline #107582 passed with stage
in 8 minutes and 41 seconds
......@@ -11,6 +11,7 @@ shellcheck:
script:
- ./tests/shellcheck-lib.sh
- ./tests/shellcheck-main-script.sh
- ./tests/shellcheck-game-scripts.sh
artifacts:
paths:
- play.it-2/lib/libplayit2.sh
......@@ -104,6 +104,7 @@ DATA_FILES='./140.sav'
APP_MAIN_TYPE='native'
APP_MAIN_EXE_BIN32='140Linux.x86'
APP_MAIN_EXE_BIN64='140Linux.x86_64'
# shellcheck disable=SC2016
APP_MAIN_OPTIONS='-logFile ./logs/$(date +%F-%R).log'
APP_MAIN_ICON='140Linux_Data/Resources/UnityPlayer.png'
# Keep compatibility with old versions
......@@ -130,7 +131,7 @@ PKG_BIN64_DEPS="$PKG_BIN32_DEPS"
target_version='2.10'
if [ -z "$PLAYIT_LIB2" ]; then
: ${XDG_DATA_HOME:="$HOME/.local/share"}
: "${XDG_DATA_HOME:="$HOME/.local/share"}"
for path in\
"$PWD"\
"$XDG_DATA_HOME/play.it"\
......@@ -150,6 +151,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
printf 'libplayit2.sh not found.\n'
exit 1
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Extract game data
......
......@@ -58,6 +58,7 @@ DATA_DIRS='./logs'
APP_MAIN_TYPE='native'
APP_MAIN_EXE='6180 the moon.x86'
# shellcheck disable=SC2016
APP_MAIN_OPTIONS='-logFile ./logs/$(date +%F-%R).log'
APP_MAIN_ICON='6180 the moon_Data/Resources/UnityPlayer.png'
......@@ -95,6 +96,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
exit 1
fi
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Extract game data
......
......@@ -105,6 +105,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
exit 1
fi
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Extract game data
......
......@@ -95,6 +95,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
exit 1
fi
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Try to load icons archive
......
......@@ -101,6 +101,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
exit 1
fi
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Try to load icons archive
......
......@@ -94,6 +94,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
exit 1
fi
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Extract game data
......@@ -115,11 +116,13 @@ write_launcher 'APP_MAIN'
# Store saved games outside of WINE prefix
# shellcheck disable=SC2016
save_path='$WINEPREFIX/drive_c/users/$(whoami)/Local Settings/Application Data/Daedalic Entertainment/A New Beginning - Final Cut/Savegames'
# shellcheck disable=SC2016
pattern='s#cp --force --recursive --symbolic-link --update "$PATH_GAME"/\* "$PATH_PREFIX"#&\n'
pattern="$pattern\tmkdir --parents \"${save_path%/*}\"\n"
pattern="$pattern\tmkdir --parents \"\$PATH_DATA/saves\"\n"
pattern="$pattern\tln --symbolic \"\$PATH_DATA/saves\" \"$save_path\"#"
pattern="$pattern\\tmkdir --parents \"${save_path%/*}\"\\n"
pattern="$pattern\\tmkdir --parents \"\$PATH_DATA/saves\"\\n"
pattern="$pattern\\tln --symbolic \"\$PATH_DATA/saves\" \"$save_path\"#"
for file in "${PKG_BIN_PATH}${PATH_BIN}"/*; do
sed --in-place "$pattern" "$file"
done
......
......@@ -99,6 +99,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
exit 1
fi
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Try to load icons archive
......
......@@ -96,6 +96,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
exit 1
fi
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Extract game data
......
......@@ -96,6 +96,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
exit 1
fi
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Extract game data
......
......@@ -60,6 +60,7 @@ DATA_DIRS='./logs'
APP_MAIN_TYPE='native'
APP_MAIN_EXE_BIN32='ActionHenk.x86'
APP_MAIN_EXE_BIN64='ActionHenk.x86_64'
# shellcheck disable=SC2016
APP_MAIN_OPTIONS='-logFile ./logs/$(date +%F-%R).log'
APP_MAIN_ICONS_LIST='APP_MAIN_ICON'
APP_MAIN_ICON='ActionHenk_Data/Resources/UnityPlayer.png'
......@@ -92,6 +93,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
exit 1
fi
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Extract game data
......
......@@ -63,6 +63,7 @@ ARCHIVE_GAME_DATA_FILES='./*_Data'
DATA_DIRS='./logs'
# shellcheck disable=SC2016
APP_MAIN_PRERUN='
file="$HOME/.config/unity3d/Daedalic Entertainment GmbH/AERMemoriesofOld/prefs"
if [ ! -f "$file" ] ; then
......@@ -80,6 +81,7 @@ fi
APP_MAIN_TYPE='native'
APP_MAIN_EXE_BIN32='AER.x86'
APP_MAIN_EXE_BIN64='AER.x86_64'
# shellcheck disable=SC2016
APP_MAIN_OPTIONS='-logFile ./logs/$(date +%F-%R).log'
APP_MAIN_ICON='AER_Data/Resources/UnityPlayer.png'
......@@ -120,6 +122,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
exit 1
fi
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Extract game data
......
......@@ -107,6 +107,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
exit 1
fi
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Extract game data
......@@ -130,6 +131,7 @@ rm --recursive "$PLAYIT_WORKDIR/gamedata"
PKG='PKG_BIN'
write_launcher 'APP_MAIN'
# shellcheck disable=SC2016
sed -i 's|$APP_EXE $APP_OPTIONS $@|cd ${APP_EXE%/*}\n${APP_EXE##*/} $APP_OPTIONS $@|' "${PKG_BIN_PATH}${PATH_BIN}/${GAME_ID}"
# Build package
......
......@@ -97,6 +97,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
exit 1
fi
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Try to load icons archive
......
......@@ -99,6 +99,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
exit 1
fi
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Extract game data
......
......@@ -90,6 +90,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
exit 1
fi
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Extract game data
......
......@@ -39,6 +39,7 @@ script_version=20180401.2
# Set game-specific variables
GAME_ID='alan-wakes-american-nightmare'
# shellcheck disable=SC1112
GAME_NAME='Alan Wake’s American Nightmare'
ARCHIVE_GOG='setup_alan_wake_american_nightmare_2.1.0.24.exe'
......@@ -86,6 +87,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
exit 1
fi
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Extract game data
......
......@@ -40,6 +40,7 @@ script_version=20180612.1
# Set game-specific variables
GAME_ID='amerzone'
# shellcheck disable=SC1112
GAME_NAME='L’Amerzone'
ARCHIVE_GOG='setup_amerzone_french_2.1.0.10.exe'
......@@ -95,6 +96,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
exit 1
fi
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Extract game data
......
......@@ -90,7 +90,7 @@ PKG_BIN_DEPS="$PKG_DATA_ID wine"
target_version='2.10'
if [ -z "$PLAYIT_LIB2" ]; then
: ${XDG_DATA_HOME:="$HOME/.local/share"}
: "${XDG_DATA_HOME:="$HOME/.local/share"}"
for path in\
"$PWD"\
"$XDG_DATA_HOME/play.it"\
......@@ -110,6 +110,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
printf 'libplayit2.sh not found.\n'
exit 1
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Extract game data
......
......@@ -69,6 +69,7 @@ DATA_DIRS='./logs'
APP_MAIN_TYPE='native'
APP_MAIN_EXE_BIN32='GoMLinux.x86'
APP_MAIN_EXE_BIN64='GoMLinux.x86_64'
# shellcheck disable=SC2016
APP_MAIN_OPTIONS='-logFile ./logs/$(date +%F-%R).log'
APP_MAIN_ICON='GoMLinux_Data/Resources/UnityPlayer.png'
......@@ -91,7 +92,7 @@ PKG_BIN64_DEPS="$PKG_BIN32_DEPS"
target_version='2.10'
if [ -z "$PLAYIT_LIB2" ]; then
: ${XDG_DATA_HOME:="$HOME/.local/share"}
: "${XDG_DATA_HOME:="$HOME/.local/share"}"
for path in\
"$PWD"\
"$XDG_DATA_HOME/play.it"\
......@@ -111,6 +112,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
printf 'libplayit2.sh not found.\n'
exit 1
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Extract game data
......
......@@ -39,6 +39,7 @@ script_version=20180224.1
# Set game-specific variables
GAME_ID='annas-quest'
# shellcheck disable=SC1112
GAME_NAME='Anna’s Quest'
ARCHIVES_LIST='ARCHIVE_GOG'
......@@ -100,6 +101,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
exit 1
fi
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Extract game data
......
......@@ -140,6 +140,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
exit 1
fi
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Extract game data
......
......@@ -88,6 +88,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
exit 1
fi
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Extract game data
......
......@@ -91,6 +91,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
exit 1
fi
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Try to load icons archive
......
......@@ -75,7 +75,7 @@ PKG_BIN_DEPS="$PKG_DATA_ID glibc libstdc++ glx gcc32"
target_version='2.10'
if [ -z "$PLAYIT_LIB2" ]; then
: ${XDG_DATA_HOME:="$HOME/.local/share"}
: "${XDG_DATA_HOME:="$HOME/.local/share"}"
for path in\
"$PWD"\
"$XDG_DATA_HOME/play.it"\
......@@ -95,6 +95,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
printf 'libplayit2.sh not found.\n'
exit 1
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Extract game data
......
......@@ -90,6 +90,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
exit 1
fi
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Extract game data
......@@ -110,6 +111,7 @@ rm --recursive "$PLAYIT_WORKDIR/gamedata"
PKG='PKG_BIN'
write_launcher 'APP_MAIN'
# shellcheck disable=SC2016
sed --in-place 's|"./$APP_EXE" \($APP_OPTIONS $@\)|cd "${APP_EXE%/*}"\n"./${APP_EXE##*/}" \1|' "${PKG_BIN_PATH}${PATH_BIN}/$GAME_ID"
# Build package
......
......@@ -99,6 +99,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
exit 1
fi
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Extract game data
......
......@@ -72,6 +72,7 @@ DATA_DIRS='./logs'
APP_MAIN_TYPE='native'
APP_MAIN_EXE_BIN32='./Aragami.x86'
APP_MAIN_EXE_BIN64='./Aragami.x86_64'
# shellcheck disable=SC2016
APP_MAIN_OPTIONS='-logFile ./logs/$(date +%F-%R).log'
APP_MAIN_ICONS_LIST='APP_MAIN_ICON'
APP_MAIN_ICON='*_Data/Resources/UnityPlayer.png'
......@@ -104,6 +105,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
exit 1
fi
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Extract game data
......
......@@ -76,7 +76,7 @@ ARCHIVE_GAME_DATA_PATH_GOG_OLD0='app'
CONFIG_FILES='./*.cfg'
DATA_DIRS='./data ./modules/arcanum/maps ./modules/arcanum/saves'
APP_WINETRICKS="vd=\$(xrandr|grep '\*'|awk '{print \$1}')"
APP_WINETRICKS="vd=\$(xrandr|grep '\\*'|awk '{print \$1}')"
APP_MAIN_TYPE='wine'
APP_MAIN_EXE='arcanum.exe'
......@@ -118,6 +118,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
exit 1
fi
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Extract game data
......
......@@ -101,6 +101,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
exit 1
fi
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Extract game data
......
......@@ -65,6 +65,7 @@ DATA_DIRS='./logs'
APP_MAIN_TYPE='native'
APP_MAIN_EXE_BIN32='Armikrog.x86'
APP_MAIN_EXE_BIN64='Armikrog.x86_64'
# shellcheck disable=SC2016
APP_MAIN_OPTIONS='-logFile ./logs/$(date +%F-%R).log'
APP_MAIN_ICONS_LIST='APP_MAIN_ICON'
APP_MAIN_ICON='Armikrog_Data/Resources/UnityPlayer.png'
......@@ -106,6 +107,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
exit 1
fi
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Extract game data
......
......@@ -63,6 +63,7 @@ DATA_DIRS='./logs'
APP_MAIN_TYPE='native'
APP_MAIN_EXE_32='Ascendant.x86'
APP_MAIN_EXE_64='Ascendant_64.x86_64'
# shellcheck disable=SC2016
APP_MAIN_OPTIONS='-logFile ./logs/$(date +%F-%R).log'
APP_MAIN_ICONS_LIST='APP_MAIN_ICON'
APP_MAIN_ICON='*_Data/Resources/UnityPlayer.png'
......@@ -94,6 +95,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
exit 1
fi
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Extract game data
......
......@@ -65,6 +65,7 @@ DATA_DIRS='./logs'
APP_MAIN_TYPE='native'
APP_MAIN_EXE_BIN32='AsuraVengeance.x86'
APP_MAIN_EXE_BIN64='AsuraVengeance.x86_64'
# shellcheck disable=SC2016
APP_MAIN_OPTIONS='-logFile ./logs/$(date +%F-%R).log'
APP_MAIN_ICON='AsuraVengeance_Data/Resources/UnityPlayer.png'
......@@ -84,7 +85,7 @@ PKG_BIN64_DEPS="$PKG_BIN32_DEPS"
target_version='2.10'
if [ -z "$PLAYIT_LIB2" ]; then
: ${XDG_DATA_HOME:="$HOME/.local/share"}
: "${XDG_DATA_HOME:="$HOME/.local/share"}"
for path in\
"$PWD"\
"$XDG_DATA_HOME/play.it"\
......@@ -104,6 +105,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
printf 'libplayit2.sh not found.\n'
exit 1
fi
# shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Extract game data
......
......@@ -111,6 +111,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
exit 1
fi
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Extract game data
......
......@@ -39,6 +39,7 @@ script_version=20180929.2
# Set game-specific variables
GAME_ID='baldurs-gate-1-enhanced-edition'
# shellcheck disable=SC1112
GAME_NAME='Baldur’s Gate - Enhanced Edition - Siege of Dragonspear'
ARCHIVE_GOG='baldur_s_gate_siege_of_dragonspear_en_2_5_23121.sh'
......@@ -70,7 +71,7 @@ PKG_MAIN_DEPS="$GAME_ID"
target_version='2.10'
if [ -z "$PLAYIT_LIB2" ]; then
: ${XDG_DATA_HOME:="$HOME/.local/share"}
: "${XDG_DATA_HOME:="$HOME/.local/share"}"
for path in\
"$PWD"\
"$XDG_DATA_HOME/play.it"\
......@@ -90,6 +91,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
printf 'libplayit2.sh not found.\n'
exit 1
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Extract game data
......
......@@ -39,6 +39,7 @@ script_version=20180930.1
# Set game-specific variables
GAME_ID='baldurs-gate-1-enhanced-edition'
# shellcheck disable=SC1112
GAME_NAME='Baldur’s Gate - Enhanced Edition'
ARCHIVE_GOG='baldur_s_gate_enhanced_edition_en_2_5_23121.sh'
......@@ -119,7 +120,7 @@ PKG_BIN_DEPS_GOG_OLD2="$PKG_BIN_DEPS_GOG_OLD0"
target_version='2.10'
if [ -z "$PLAYIT_LIB2" ]; then
: ${XDG_DATA_HOME:="$HOME/.local/share"}
: "${XDG_DATA_HOME:="$HOME/.local/share"}"
for path in\
"$PWD"\
"$XDG_DATA_HOME/play.it"\
......@@ -139,6 +140,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
printf 'libplayit2.sh not found.\n'
exit 1
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Use libSSL 1.0.0 32-bit archive (Debian packages only)
......@@ -178,6 +180,7 @@ rm --recursive "$PLAYIT_WORKDIR/gamedata"
if [ "$ARCHIVE_LIBSSL32" ]; then
(
# shellcheck disable=SC2030
ARCHIVE='ARCHIVE_LIBSSL32'
extract_data_from "$ARCHIVE_LIBSSL32"
)
......@@ -194,6 +197,7 @@ write_launcher 'APP_MAIN'
# Build package
use_archive_specific_value 'PKG_BIN_DEPS'
# shellcheck disable=SC2031
case "$ARCHIVE" in
('ARCHIVE_GOG_OLD0'|'ARCHIVE_GOG_OLD1'|'ARCHIVE_GOG_OLD2')
case "$OPTION_PACKAGE" in
......
......@@ -41,6 +41,7 @@ script_version=20180930.4
SCRIPT_DEPS='unix2dos'
GAME_ID='baldurs-gate-1'
# shellcheck disable=SC1112
GAME_NAME='Baldur’s Gate'