Commit ad017bf1 authored by Antoine Le Gonidec's avatar Antoine Le Gonidec

Merge branch 'staging-2.x'

* New games
* Games fixes and updates
parents aa579f45 26fcc95c
......@@ -35,7 +35,7 @@ set -o errexit
# send your bug reports to vv221@dotslashplay.it
###
script_version=20190623.6
script_version=20190623.7
# Set game-specific variables
......@@ -77,6 +77,31 @@ ARCHIVE_GAME_BIN_FILES='*.exe *.dll bin tools'
# Keep compatibility with old archives
ARCHIVE_GAME_BIN_PATH_GOG_OLD0='game'
ARCHIVE_GAME_L10N_DE_PATH='app'
ARCHIVE_GAME_L10N_DE_FILES='addon/ger0.rda maindata/ger0.rda'
# Keep compatibility with old archives
ARCHIVE_GAME_L10N_DE_PATH_GOG_OLD0='game'
ARCHIVE_GAME_L10N_EN_PATH='app'
ARCHIVE_GAME_L10N_EN_FILES='addon/eng0.rda maindata/eng0.rda'
# Keep compatibility with old archives
ARCHIVE_GAME_L10N_EN_PATH_GOG_OLD0='game'
ARCHIVE_GAME_L10N_ES_PATH='app'
ARCHIVE_GAME_L10N_ES_FILES='addon/esp0.rda maindata/esp0.rda'
# Keep compatibility with old archives
ARCHIVE_GAME_L10N_ES_PATH_GOG_OLD0='game'
ARCHIVE_GAME_L10N_FR_PATH='app'
ARCHIVE_GAME_L10N_FR_FILES='addon/fra0.rda maindata/fra0.rda'
# Keep compatibility with old archives
ARCHIVE_GAME_L10N_FR_PATH_GOG_OLD0='game'
ARCHIVE_GAME_L10N_IT_PATH='app'
ARCHIVE_GAME_L10N_IT_FILES='addon/ita0.rda maindata/ita0.rda'
# Keep compatibility with old archives
ARCHIVE_GAME_L10N_IT_PATH_GOG_OLD0='game'
ARCHIVE_GAME0_DATA_PATH='app'
ARCHIVE_GAME0_DATA_FILES='addon data maindata resources'
# Keep compatibility with old archives
......@@ -110,20 +135,36 @@ APP_VENICE_EXE='addon.exe'
APP_VENICE_ICON='addon.exe'
APP_VENICE_NAME="$GAME_NAME - Venice"
APP_L10N_ID="${GAME_ID}_l10n"
APP_L10N_TYPE='wine'
APP_L10N_EXE='language_selector.exe'
APP_L10N_ICON='language_selector.exe'
APP_L10N_NAME="$GAME_NAME - language selector"
APP_L10N_CAT='Settings'
PACKAGES_LIST='PKG_DATA PKG_BIN'
PACKAGES_LIST='PKG_L10N_DE PKG_L10N_EN PKG_L10N_ES PKG_L10N_FR PKG_L10N_IT PKG_DATA PKG_BIN'
PKG_DATA_ID="${GAME_ID}-data"
PKG_DATA_DESCRIPTION='data'
PKG_L10N_ID="${GAME_ID}-l10n"
PKG_L10N_DESCRIPTION='localization'
PKG_L10N_DE_ID="${PKG_L10N_ID}-de"
PKG_L10N_DE_PROVIDE="$PKG_L10N_ID"
PKG_L10N_DE_DESCRIPTION="$PKG_L10N_DESCRIPTION - German"
PKG_L10N_EN_ID="${PKG_L10N_ID}-en"
PKG_L10N_EN_PROVIDE="$PKG_L10N_ID"
PKG_L10N_EN_DESCRIPTION="$PKG_L10N_DESCRIPTION - English"
PKG_L10N_ES_ID="${PKG_L10N_ID}-es"
PKG_L10N_ES_PROVIDE="$PKG_L10N_ID"
PKG_L10N_ES_DESCRIPTION="$PKG_L10N_DESCRIPTION - Spanish"
PKG_L10N_FR_ID="${PKG_L10N_ID}-fr"
PKG_L10N_FR_PROVIDE="$PKG_L10N_ID"
PKG_L10N_FR_DESCRIPTION="$PKG_L10N_DESCRIPTION - French"
PKG_L10N_IT_ID="${PKG_L10N_ID}-it"
PKG_L10N_IT_PROVIDE="$PKG_L10N_ID"
PKG_L10N_IT_DESCRIPTION="$PKG_L10N_DESCRIPTION - Italian"
PKG_BIN_ARCH='32'
PKG_BIN_DEPS="$PKG_DATA_ID winetricks wine glx xcursor"
PKG_BIN_DEPS="$PKG_DATA_ID $PKG_L10N_ID winetricks wine glx xcursor"
# Load common functions
......@@ -174,7 +215,7 @@ rm --recursive "$PLAYIT_WORKDIR/gamedata"
# Extract icons
PKG='PKG_BIN'
icons_get_from_package 'APP_MAIN' 'APP_VENICE' 'APP_L10N'
icons_get_from_package 'APP_MAIN' 'APP_VENICE'
icons_move_to 'PKG_DATA'
# Fix immediate crash
......@@ -198,7 +239,7 @@ fi
# Write launchers
PKG='PKG_BIN'
launchers_write 'APP_MAIN' 'APP_VENICE' 'APP_L10N'
launchers_write 'APP_MAIN' 'APP_VENICE'
# Build package
......@@ -211,6 +252,39 @@ rm --recursive "$PLAYIT_WORKDIR"
# Print instructions
print_instructions
case "${LANG%_*}" in
('fr')
lang_string='version %s :'
lang_de='allemande'
lang_en='anglaise'
lang_es='espagnole'
lang_fr='française'
lang_it='italienne'
;;
('en'|*)
lang_string='%s version:'
lang_de='German'
lang_en='English'
lang_es='Spanish'
lang_fr='French'
lang_it='Italian'
;;
esac
printf '\n'
# shellcheck disable=SC2059
printf "$lang_string" "$lang_de"
print_instructions 'PKG_L10N_DE' 'PKG_DATA' 'PKG_BIN'
# shellcheck disable=SC2059
printf "$lang_string" "$lang_en"
print_instructions 'PKG_L10N_EN' 'PKG_DATA' 'PKG_BIN'
# shellcheck disable=SC2059
printf "$lang_string" "$lang_es"
print_instructions 'PKG_L10N_ES' 'PKG_DATA' 'PKG_BIN'
# shellcheck disable=SC2059
printf "$lang_string" "$lang_fr"
print_instructions 'PKG_L10N_FR' 'PKG_DATA' 'PKG_BIN'
# shellcheck disable=SC2059
printf "$lang_string" "$lang_it"
print_instructions 'PKG_L10N_IT' 'PKG_DATA' 'PKG_BIN'
exit 0
#!/bin/sh -e
#!/bin/sh
set -o errexit
###
......@@ -30,11 +30,11 @@ set -o errexit
###
# Arcanum: Of Steamworks and Magick Obscura
# build native Linux packages from the original installers
# build native packages from the original installers
# send your bug reports to vv221@dotslashplay.it
###
script_version=20180819.4
script_version=20190327.2
# Set game-specific variables
......@@ -43,12 +43,18 @@ SCRIPT_DEPS='upx'
GAME_ID='arcanum'
GAME_NAME='Arcanum: Of Steamworks and Magick Obscura'
ARCHIVE_GOG='setup_arcanum_-_of_steamworks_and_magick_obscura_1.0.7.4_(19476).exe'
ARCHIVE_GOG='setup_arcanum_-_of_steamworks_and_magick_obscura_1.0.7.4_hotfix_(24155).exe'
ARCHIVE_GOG_URL='https://www.gog.com/game/arcanum_of_steamworks_and_magick_obscura'
ARCHIVE_GOG_MD5='298a3315baebf40f3cc6cee4acae9947'
ARCHIVE_GOG_TYPE='innosetup1.7'
ARCHIVE_GOG_MD5='6d14d07f7cc8c9823cba5322cf2336f4'
ARCHIVE_GOG_TYPE='innosetup'
ARCHIVE_GOG_SIZE='1200000'
ARCHIVE_GOG_VERSION='1.0.7.4-gog19476'
ARCHIVE_GOG_VERSION='1.0.7.4-gog24155'
ARCHIVE_GOG_OLD1='setup_arcanum_-_of_steamworks_and_magick_obscura_1.0.7.4_(19476).exe'
ARCHIVE_GOG_OLD1_MD5='298a3315baebf40f3cc6cee4acae9947'
ARCHIVE_GOG_OLD1_TYPE='innosetup1.7'
ARCHIVE_GOG_OLD1_SIZE='1200000'
ARCHIVE_GOG_OLD1_VERSION='1.0.7.4-gog19476'
ARCHIVE_GOG_OLD0='setup_arcanum_2.0.0.15.exe'
ARCHIVE_GOG_OLD0_MD5='c09523c61edd18abb97da97463e07a88'
......@@ -56,7 +62,7 @@ ARCHIVE_GOG_OLD0_SIZE='1200000'
ARCHIVE_GOG_OLD0_VERSION='1.0.7.4-gog2.0.0.15'
ARCHIVE_DOC0_DATA_PATH='.'
ARCHIVE_DOC0_DATA_FILES='./*.doc ./*.htm ./*.pdf ./*.txt ./documents'
ARCHIVE_DOC0_DATA_FILES='*.doc *.htm *.pdf *.txt documents'
# Keep compatibility with old archives
ARCHIVE_DOC0_DATA_PATH_GOG_OLD0='app'
......@@ -64,19 +70,19 @@ ARCHIVE_DOC1_DATA_PATH='__support/app'
ARCHIVE_DOC1_DATA_FILES='./eula.*'
ARCHIVE_GAME_BIN_PATH='.'
ARCHIVE_GAME_BIN_FILES='./*.asi ./*.cfg ./*.exe ./*.inf ./binkw32.dll ./ddraw.dll ./mm_won.dll ./mss32.dll ./sierrapt.dll'
ARCHIVE_GAME_BIN_FILES='*.asi *.cfg *.exe *.inf binkw32.dll ddraw.dll mm_won.dll mss32.dll sierrapt.dll'
# Keep compatibility with old archives
ARCHIVE_GAME_BIN_PATH_GOG_OLD0='app'
ARCHIVE_GAME_DATA_PATH='.'
ARCHIVE_GAME_DATA_FILES='./*.dat ./data ./modules'
ARCHIVE_GAME_DATA_FILES='*.dat data modules'
# Keep compatibility with old archives
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|awk '/*/ {print \$1}')"
APP_MAIN_TYPE='wine'
APP_MAIN_EXE='arcanum.exe'
......@@ -94,44 +100,43 @@ PKG_BIN_DEPS="$PKG_DATA_ID wine winetricks xrandr"
# Load common functions
target_version='2.10'
target_version='2.11'
if [ -z "$PLAYIT_LIB2" ]; then
[ -n "$XDG_DATA_HOME" ] || XDG_DATA_HOME="$HOME/.local/share"
: "${XDG_DATA_HOME:="$HOME/.local/share"}"
for path in\
'./'\
"$XDG_DATA_HOME/play.it/"\
"$XDG_DATA_HOME/play.it/play.it-2/lib/"\
'/usr/local/share/games/play.it/'\
'/usr/local/share/play.it/'\
'/usr/share/games/play.it/'\
'/usr/share/play.it/'
"$PWD"\
"$XDG_DATA_HOME/play.it"\
'/usr/local/share/games/play.it'\
'/usr/local/share/play.it'\
'/usr/share/games/play.it'\
'/usr/share/play.it'
do
if [ -z "$PLAYIT_LIB2" ] && [ -e "$path/libplayit2.sh" ]; then
if [ -e "$path/libplayit2.sh" ]; then
PLAYIT_LIB2="$path/libplayit2.sh"
break
fi
done
if [ -z "$PLAYIT_LIB2" ]; then
printf '\n\033[1;31mError:\033[0m\n'
printf 'libplayit2.sh not found.\n'
exit 1
fi
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
if [ -z "$PLAYIT_LIB2" ]; then
printf '\n\033[1;31mError:\033[0m\n'
printf 'libplayit2.sh not found.\n'
exit 1
fi
# shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Extract game data
extract_data_from "$SOURCE_ARCHIVE"
prepare_package_layout
rm --recursive "$PLAYIT_WORKDIR/gamedata"
# Extract game icons
PKG='PKG_BIN'
icons_get_from_package 'APP_MAIN'
icons_move_to 'PKG_DATA'
rm --recursive "$PLAYIT_WORKDIR/gamedata"
# Decompress UPX-packed executable
......@@ -143,7 +148,7 @@ fi
# Write launchers
PKG='PKG_BIN'
write_launcher 'APP_MAIN'
launchers_write 'APP_MAIN'
# Build package
......
#!/bin/sh -e
#!/bin/sh
set -o errexit
###
# Copyright (c) 2015-2019, Antoine "vv221/vv222" Le Gonidec
# Copyright (c) 2016-2019, Solène "Mopi" Huault
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
......@@ -30,17 +31,16 @@ set -o errexit
###
# Baldur’s Gate 2 - Enhanced Edition
# build native Linux packages from the original installers
# build native packages from the original installers
# send your bug reports to vv221@dotslashplay.it
###
script_version=20180801.4
script_version=20190915.1
# Set game-specific variables
GAME_ID='baldurs-gate-2-enhanced-edition'
# shellcheck disable=SC1112
GAME_NAME='Baldur’s Gate 2 - Enhanced Edition'
GAME_NAME='Baldurʼs Gate 2 - Enhanced Edition'
ARCHIVE_GOG='baldur_s_gate_2_enhanced_edition_en_2_5_21851.sh'
ARCHIVE_GOG_URL='https://www.gog.com/game/baldurs_gate_2_enhanced_edition'
......@@ -54,17 +54,18 @@ ARCHIVE_GOG_OLD0_MD5='b9ee856a29238d4aec65367377d88ac4'
ARCHIVE_GOG_OLD0_SIZE='2700000'
ARCHIVE_GOG_OLD0_VERSION='2.3.67.3-gog2.6.0.11'
ARCHIVE_LIBSSL_32='libssl_1.0.0_32-bit.tar.gz'
ARCHIVE_LIBSSL_32_MD5='9443cad4a640b2512920495eaf7582c4'
ARCHIVE_OPTIONAL_LIBSSL32='libssl_1.0.0_32-bit.tar.gz'
ARCHIVE_OPTIONAL_LIBSSL32_URL='https://www.dotslashplay.it/ressources/libssl/'
ARCHIVE_OPTIONAL_LIBSSL32_MD5='9443cad4a640b2512920495eaf7582c4'
ARCHIVE_DOC_DATA_PATH='data/noarch/docs'
ARCHIVE_DOC_DATA_FILES='./*'
ARCHIVE_DOC_DATA_FILES='*'
ARCHIVE_GAME_BIN_PATH='data/noarch/game'
ARCHIVE_GAME_BIN_FILES='./BaldursGateII ./engine.lua'
ARCHIVE_GAME_BIN_FILES='BaldursGateII engine.lua'
ARCHIVE_GAME_DATA_PATH='data/noarch/game'
ARCHIVE_GAME_DATA_FILES='./chitin.key ./lang ./Manuals ./movies ./music ./scripts ./data'
ARCHIVE_GAME_DATA_FILES='chitin.key lang Manuals movies music scripts data'
APP_MAIN_TYPE='native'
APP_MAIN_LIBS='libs'
......@@ -75,49 +76,54 @@ PACKAGES_LIST='PKG_BIN PKG_DATA'
PKG_DATA_ID="${GAME_ID}-data"
PKG_DATA_DESCRIPTION='data'
# this is needed for smooth upgrades from packages generated with script version < 20180801.3
# This is needed for smooth upgrades from packages generated with script version < 20180801.3
PKG_DATA_PROVIDE="${GAME_ID}-areas"
PKG_BIN_ARCH='32'
PKG_BIN_DEPS="$PKG_DATA_ID glibc libstdc++ glx openal"
PKG_BIN_DEPS_ARCH='lib32-openssl-1.0'
PKG_BIN_DEPS="$PKG_DATA_ID glibc libstdc++ glx openal libxrandr alsa xcursor"
PKG_BIN_DEPS_ARCH='lib32-libx11 lib32-expat lib32-openssl-1.0'
PKG_BIN_DEPS_DEB='libx11-6, libexpat1'
PKG_BIN_DEPS_GENTOO='libx11-6[abi_x86_32] dev-libs/expat[abi_x86_32] dev-libs/openssl[abi_x86_32]'
# Keep compatibility with old archives
PKG_BIN_DEPS_OLD0="$PKG_DATA_ID glibc libstdc++ glx openal json"
# Load common functions
target_version='2.9'
target_version='2.11'
if [ -z "$PLAYIT_LIB2" ]; then
[ -n "$XDG_DATA_HOME" ] || XDG_DATA_HOME="$HOME/.local/share"
: "${XDG_DATA_HOME:="$HOME/.local/share"}"
for path in\
'./'\
"$XDG_DATA_HOME/play.it/"\
"$XDG_DATA_HOME/play.it/play.it-2/lib/"\
'/usr/local/share/games/play.it/'\
'/usr/local/share/play.it/'\
'/usr/share/games/play.it/'\
'/usr/share/play.it/'
"$PWD"\
"$XDG_DATA_HOME/play.it"\
'/usr/local/share/games/play.it'\
'/usr/local/share/play.it'\
'/usr/share/games/play.it'\
'/usr/share/play.it'
do
if [ -z "$PLAYIT_LIB2" ] && [ -e "$path/libplayit2.sh" ]; then
if [ -e "$path/libplayit2.sh" ]; then
PLAYIT_LIB2="$path/libplayit2.sh"
break
fi
done
if [ -z "$PLAYIT_LIB2" ]; then
printf '\n\033[1;31mError:\033[0m\n'
printf 'libplayit2.sh not found.\n'
exit 1
fi
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
if [ -z "$PLAYIT_LIB2" ]; then
printf '\n\033[1;31mError:\033[0m\n'
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
if [ "$OPTION_PACKAGE" != 'arch' ]; then
ARCHIVE_MAIN="$ARCHIVE"
set_archive 'ARCHIVE_LIBSSL' 'ARCHIVE_LIBSSL_32'
ARCHIVE="$ARCHIVE_MAIN"
fi
case "$OPTION_PACKAGE" in
('deb')
ARCHIVE_MAIN="$ARCHIVE"
set_archive 'ARCHIVE_LIBSSL32' 'ARCHIVE_OPTIONAL_LIBSSL32'
ARCHIVE="$ARCHIVE_MAIN"
;;
esac
# Extract game data
......@@ -132,54 +138,54 @@ rm --recursive "$PLAYIT_WORKDIR/gamedata"
# Include libSSL into the game directory
if [ "$ARCHIVE_LIBSSL" ]; then
if [ "$ARCHIVE_LIBSSL32" ]; then
(
# shellcheck disable=SC2030
ARCHIVE='ARCHIVE_LIBSSL'
extract_data_from "$ARCHIVE_LIBSSL"
ARCHIVE='ARCHIVE_LIBSSL32'
extract_data_from "$ARCHIVE_LIBSSL32"
)
mkdir --parents "${PKG_BIN_PATH}${PATH_GAME}/$APP_MAIN_LIBS"
mv "$PLAYIT_WORKDIR/gamedata"/* "${PKG_BIN_PATH}${PATH_GAME}/$APP_MAIN_LIBS"
mkdir --parents "${PKG_BIN_PATH}${PATH_GAME}/${APP_MAIN_LIBS:=libs}"
mv "$PLAYIT_WORKDIR/gamedata"/lib*.so.1.0.0 "${PKG_BIN_PATH}${PATH_GAME}/$APP_MAIN_LIBS"
rm --recursive "$PLAYIT_WORKDIR/gamedata"
fi
# Write launchers
PKG='PKG_BIN'
write_launcher 'APP_MAIN'
launchers_write 'APP_MAIN'
# Ensure that libjson.so.0 can be found and loaded for game versions needing it
# shellcheck disable=SC2031
if [ "$ARCHIVE" = 'ARCHIVE_GOG_OLD0' ]; then
PKG_BIN_DEPS="$PKG_BIN_DEPS json"
target="$PATH_GAME/$APP_MAIN_LIBS/libjson.so.0"
cat > "$postinst" <<- EOF
if [ ! -e "$target" ]; then
for source in \
/lib/i386-linux-gnu/libjson-c.so \
/lib/i386-linux-gnu/libjson-c.so.2 \
/lib/i386-linux-gnu/libjson-c.so.3 \
/usr/lib32/libjson-c.so
do
if [ -e "\$source" ] ; then
mkdir --parents "${target%/*}"
ln --symbolic "\$source" "$target"
break
fi
done
fi
EOF
cat > "$prerm" <<- EOF
if [ -e "$target" ]; then
rm "$target"
rmdir --ignore-fail-on-non-empty --parents "${target%/*}"
fi
EOF
fi
case "$ARCHIVE" in
('ARCHIVE_GOG_OLD0')
target="$PATH_GAME/$APP_MAIN_LIBS/libjson.so.0"
cat > "$postinst" <<- EOF
if [ ! -e "$target" ]; then
for source in \
/lib/i386-linux-gnu/libjson-c.so \
/lib/i386-linux-gnu/libjson-c.so.2 \
/lib/i386-linux-gnu/libjson-c.so.3 \
/usr/lib32/libjson-c.so
do
if [ -e "\$source" ] ; then
mkdir --parents "${target%/*}"
ln --symbolic "\$source" "$target"
break
fi
done
fi
EOF
cat > "$prerm" <<- EOF
if [ -e "$target" ]; then
rm "$target"
rmdir --ignore-fail-on-non-empty --parents "${target%/*}"
fi
EOF
;;
esac
# Build packages
......
#!/bin/sh -e
#!/bin/sh
set -o errexit
###
......@@ -31,11 +31,11 @@ set -o errexit
###
# Bastion
# build native Linux packages from the original installers
# build native packages from the original installers
# send your bug reports to vv221@dotslashplay.it
###
script_version=20180929.7
script_version=20190824.2
# Set game-specific variables
......@@ -86,6 +86,8 @@ ARCHIVE_GAME_DATA_PATH_HUMBLE='data'
ARCHIVE_GAME_DATA_FILES='*.config *.dll *.txt Bastion.exe Bastion.bmp Content mono*'
APP_MAIN_TYPE='native'
# shellcheck disable=SC2016
APP_MAIN_PRERUN='export TERM="${TERM%-256color}"'
APP_MAIN_EXE_BIN32='Bastion.bin.x86'
APP_MAIN_EXE_BIN64='Bastion.bin.x86_64'
APP_MAIN_ICON='Bastion.bmp'
......@@ -103,7 +105,7 @@ PKG_BIN64_DEPS="$PKG_BIN32_DEPS"
# Load common functions
target_version='2.10'
target_version='2.11'
if [ -z "$PLAYIT_LIB2" ]; then
: "${XDG_DATA_HOME:="$HOME/.local/share"}"
......@@ -126,7 +128,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
printf 'libplayit2.sh not found.\n'
exit 1
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
# shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Extract game data
......@@ -143,7 +145,7 @@ icons_get_from_package 'APP_MAIN'
# Write launchers
for PKG in 'PKG_BIN32' 'PKG_BIN64'; do
write_launcher 'APP_MAIN'
launchers_write 'APP_MAIN'
done
# Build package
......
#!/bin/sh -e
#!/bin/sh
set -o errexit
###
......@@ -35,7 +35,7 @@ set -o errexit
# send your bug reports to mopi@dotslashplay.it
###
script_version=20180913.1
script_version=20190724.2
# Set game-specific variables
......@@ -58,8 +58,7 @@ ARCHIVE_GAME_DATA_FILES='Cornerstone_Data'
DATA_DIRS='./logs'
APP_MAIN_TYPE='native'
APP_MAIN_PRERUN='pulseaudio --start
export LANG=C'
APP_MAIN_PRERUN='export LANG=C'
APP_MAIN_EXE='Cornerstone.x86'
# shellcheck disable=SC2016
APP_MAIN_OPTIONS='-logFile ./logs/$(date +%F-%R).log'
......@@ -71,11 +70,11 @@ PKG_DATA_ID="${GAME_ID}-data"
PKG_DATA_DESCRIPTION='data'
PKG_BIN_ARCH='32'
PKG_BIN_DEPS="$PKG_DATA_ID glibc libstdc++ glu xcursor pulseaudio alsa"
PKG_BIN_DEPS="$PKG_DATA_ID glibc libstdc++ glu xcursor alsa"
# Load common functions
target_version='2.10'
target_version='2.11'
if [ -z "$PLAYIT_LIB2" ]; then
: "${XDG_DATA_HOME:="$HOME/.local/share"}"
......@@ -98,7 +97,7 @@ if [ -z "$PLAYIT_LIB2" ]; then
printf 'libplayit2.sh not found.\n'
exit 1
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
# shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Extract game data
......@@ -107,17 +106,19 @@ extract_data_from "$SOURCE_ARCHIVE"
prepare_package_layout
rm --recursive "$PLAYIT_WORKDIR/gamedata"
# Get icon
PKG='PKG_DATA'
icons_get_from_package 'APP_MAIN'
# Write launchers
PKG='PKG_BIN'
write_launcher 'APP_MAIN'
launchers_write 'APP_MAIN'
# Build package
PKG='PKG_DATA'
icons_linking_postinst 'APP_MAIN'
write_metadata 'PKG_DATA'
write_metadata 'PKG_BIN'
write_metadata
build_pkg
# Clean up
......
#!/bin/sh -e
#!/bin/sh
set -o errexit
###
# Copyright (c) 2015-2019, Antoine "vv221/vv222" Le Gonidec
# Copyright (c) 2015-2019, mortalius
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
......@@ -30,37 +31,34 @@ set -o errexit
###
# Don’t Starve: Reign Of Giants
# build native Linux packages from the original installers
# build native packages from the original installers
# send your bug reports to vv221@dotslashplay.it
###
script_version=20180224.1
script_version=20160724.1
# Set game-specific variables
GAME_ID='dont-starve'
# shellcheck disable=SC1112
GAME_NAME='Don’t Starve: Reign Of Giants'
ARCHIVES_LIST='ARCHIVE_GOG ARCHIVE_GOG_OLD'
GAME_NAME='Donʼt Starve: Reign Of Giants'
ARCHIVE_GOG='don_t_starve_reign_of_giants_dlc_en_20171215_17628.sh'
ARCHIVE_GOG_URL='https://www.gog.com/game/dont_starve_reign_of_giants'
ARCHIVE_GOG_MD5='47084ab8d5b36437e1bcb899c35bfe00'
ARCHIVE_GOG_SIZE='400000'
ARCHIVE_GOG_TYPE='mojosetup'
ARCHIVE_GOG_VERSION='20171215-gog17628'
ARCHIVE_GOG_VERSION='246924-gog17628'
ARCHIVE_GOG_OLD='gog_don_t_starve_reign_of_giants_dlc_2.0.0.3.sh'
ARCHIVE_GOG_OLD_MD5='bd505adc70ed478a92669bc8c1c3a127'
ARCHIVE_GOG_OLD_SIZE='400000'
ARCHIVE_GOG_OLD_VERSION='gog2.0.0.3'
ARCHIVE_GOG_OLD0='gog_don_t_starve_reign_of_giants_dlc_2.0.0.3.sh'
ARCHIVE_GOG_OLD0_MD5='bd505adc70ed478a92669bc8c1c3a127'
ARCHIVE_GOG_OLD0_SIZE='400000'
ARCHIVE_GOG_OLD0_VERSION='1.0-gog2.0.0.3'
ARCHIVE_DOC_PATH='data/noarch/docs'
ARCHIVE_DOC_FILES='./*'
ARCHIVE_DOC_MAIN_PATH='data/noarch/docs'
ARCHIVE_DOC_MAIN_FILES='*'
ARCHIVE_GAME_PATH='data/noarch/game/dontstarve32'
ARCHIVE_GAME_FILES='./data ./manifest_dlc0001.json'
ARCHIVE_GAME_MAIN_PATH='data/noarch/game/dontstarve32'
ARCHIVE_GAME_MAIN_FILES='data manifest_dlc0001.json'
PACKAGES_LIST='PKG_MAIN'
......@@ -69,30 +67,36 @@ PKG_MAIN_DEPS="$GAME_ID"
# Load common functions
target_version='2.5'
target_version='2.11'
if [ -z "$PLAYIT_LIB2" ]; then
[ -n "$XDG_DATA_HOME" ] || XDG_DATA_HOME="$HOME/.local/share"
if [ -e "$XDG_DATA_HOME/play.it/play.it-2/lib/libplayit2.sh" ]; then
PLAYIT_LIB2="$XDG_DATA_HOME/play.it/play.it-2/lib/libplayit2.sh"
elif [ -e './libplayit2.sh' ]; then
PLAYIT_LIB2='./libplayit2.sh'
else
printf '\n\033[1;31mError:\033[0m\n'
printf 'libplayit2.sh not found.\n'
exit 1
fi
: "${XDG_DATA_HOME:="$HOME/.local/share"}"
for path in\
"$PWD"\
"$XDG_DATA_HOME/play.it"\
'/usr/local/share/games/play.it'\
'/usr/local/share/play.it'\
'/usr/share/games/play.it'\
'/usr/share/play.it'
do
if [ -e "$path/libplayit2.sh" ]; then