Commit 1ddf560e authored by Antoine Le Gonidec's avatar Antoine Le Gonidec Committed by Antoine Le Gonidec

SteamWorld Heist — Syntax update

* Update script to 2.11 syntax
* Update authors list
* Update archive version number
* Tweak game title typography
* Improve icon handling
parent 6c5f91e0
#!/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,40 +31,35 @@ set -o errexit
###
# Steamworld Heist
# 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=20190720.1
# Set game-specific variables
GAME_ID='steamworld-heist'
GAME_NAME='Steamworld Heist'
ARCHIVES_LIST='ARCHIVE_HUMBLE'
GAME_NAME='SteamWorld Heist'
ARCHIVE_HUMBLE='SteamWorldHeist.tar.gz'
ARCHIVE_HUMBLE_URL='https://www.humblebundle.com/store/steamworld-heist'
ARCHIVE_HUMBLE_MD5='79a499459c09d7881efeb95be7abc559'
ARCHIVE_HUMBLE_VERSION='1.0-humble1'
ARCHIVE_HUMBLE_VERSION='1.0-humble170131'
ARCHIVE_HUMBLE_SIZE='200000'
ARCHIVE_DOC_PATH='SteamWorldHeist'
ARCHIVE_DOC_FILES='./*.txt ./Licenses'
ARCHIVE_DOC_FILES='*.txt Licenses'
ARCHIVE_GAME_BIN_PATH='SteamWorldHeist'
ARCHIVE_GAME_BIN_FILES='./Heist'
ARCHIVE_GAME_BIN_FILES='Heist'
ARCHIVE_GAME_DATA_PATH='SteamWorldHeist'
ARCHIVE_GAME_DATA_FILES='./Bundle ./icon.png ./icon.bmp'
ARCHIVE_GAME_DATA_FILES='Bundle icon.png icon.bmp'
APP_MAIN_TYPE='native'
APP_MAIN_EXE='Heist'
APP_MAIN_ICONS_LIST='APP_MAIN_ICON APP_MAIN_ICON_BMP'
APP_MAIN_ICON='icon.png'
APP_MAIN_ICON_BMP='icon.bmp'
APP_MAIN_ICON_RES='48'
PACKAGES_LIST='PKG_BIN PKG_DATA'
......@@ -75,43 +71,51 @@ PKG_BIN_DEPS="$PKG_DATA_ID libstdc++ glx"
# Load common functions
target_version='2.3'
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
PLAYIT_LIB2="$path/libplayit2.sh"
break
fi
done
fi
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
# shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"
# Extract game data
extract_data_from "$SOURCE_ARCHIVE"
set_standard_permissions "$PLAYIT_WORKDIR/gamedata"
prepare_package_layout
rm --recursive "$PLAYIT_WORKDIR/gamedata"
for PKG in $PACKAGES_LIST; do
organize_data "DOC_${PKG#PKG_}" "$PATH_DOC"
organize_data "GAME_${PKG#PKG_}" "$PATH_GAME"
done
# Get icon
rm --recursive "$PLAYIT_WORKDIR/gamedata"
PKG='PKG_DATA'
icons_get_from_package 'APP_MAIN'
# Write launchers
PKG='PKG_BIN'
write_launcher 'APP_MAIN'
launchers_write 'APP_MAIN'
# Build package
postinst_icons_linking 'APP_MAIN'
write_metadata
build_pkg
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment