Commit a48d6aa0 authored by Mopi's avatar Mopi
Browse files

2.8 - Armikrog - New script

parent 86b002d0
Pipeline #56270 passed with stage
in 20 seconds
#!/bin/sh -e
set -o errexit
###
# Copyright (c) 2015-2018, Antoine Le Gonidec
# Copyright (c) 2018, Solène Huault
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# This software is provided by the copyright holders and contributors "as is"
# and any express or implied warranties, including, but not limited to, the
# implied warranties of merchantability and fitness for a particular purpose
# are disclaimed. In no event shall the copyright holder or contributors be
# liable for any direct, indirect, incidental, special, exemplary, or
# consequential damages (including, but not limited to, procurement of
# substitute goods or services; loss of use, data, or profits; or business
# interruption) however caused and on any theory of liability, whether in
# contract, strict liability, or tort (including negligence or otherwise)
# arising in any way out of the use of this software, even if advised of the
# possibility of such damage.
###
###
# Armikrog
# build native Linux packages from the original installers
# send your bug reports to mopi@dotslashplay.it
###
script_version=20180608.1
# Set game-specific variables
GAME_ID='armikrog'
GAME_NAME='Armikrog'
ARCHIVE_GOG='gog_armikrog_2.5.0.6.sh'
ARCHIVE_GOG_URL='https://www.gog.com/game/armikrog'
ARCHIVE_GOG_MD5='4ca9ac6d05ac66c18229e41da6fd89dd'
ARCHIVE_GOG_SIZE='2900000'
ARCHIVE_GOG_VERSION='11.01.2016-gog2.5.0.6'
ARCHIVE_DOC_DATA_PATH='data/noarch/docs'
ARCHIVE_DOC_DATA_FILES='./*'
ARCHIVE_GAME_BIN32_PATH='data/noarch/game'
ARCHIVE_GAME_BIN32_FILES='./*.x86 ./*_Data/*/x86'
ARCHIVE_GAME_BIN64_PATH='data/noarch/game'
ARCHIVE_GAME_BIN64_FILES='./*.x86_64 ./*_Data/*/x86_64'
ARCHIVE_GAME_DATA_PATH='data/noarch/game'
ARCHIVE_GAME_DATA_FILES='./*_Data'
DATA_DIRS='./logs'
APP_MAIN_TYPE='native'
APP_MAIN_EXE_BIN32='Armikrog.x86'
APP_MAIN_EXE_BIN64='Armikrog.x86_64'
APP_MAIN_OPTIONS='-logFile ./logs/$(date +%F-%R).log'
APP_MAIN_ICONS_LIST='APP_MAIN_ICON'
APP_MAIN_ICON='Armikrog_Data/Resources/UnityPlayer.png'
PACKAGES_LIST='PKG_BIN32 PKG_BIN64 PKG_DATA'
PKG_DATA_ID="${GAME_ID}-data"
PKG_DATA_DESCRIPTION='data'
PKG_BIN32_ARCH='32'
PKG_BIN32_DEPS="$PKG_DATA_ID glibc glu xcursor libxrandr"
PKG_BIN64_ARCH='64'
PKG_BIN64_DEPS="$PKG_BIN32_DEPS_DEB"
# Load common functions
target_version='2.8'
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'
return 1
fi
fi
. "$PLAYIT_LIB2"
# Extract game data
extract_data_from "$SOURCE_ARCHIVE"
prepare_package_layout
rm --recursive "$PLAYIT_WORKDIR/gamedata"
# Write launchers
for PKG in 'PKG_BIN32' 'PKG_BIN64'; do
write_launcher 'APP_MAIN'
done
# Build package
PKG='PKG_DATA'
icons_linking_postinst 'APP_MAIN'
write_metadata 'PKG_DATA'
write_metadata 'PKG_BIN32' 'PKG_BIN64'
build_pkg
# Clean up
rm --recursive "$PLAYIT_WORKDIR"
# Print instructions
print_instructions
exit 0
Supports Markdown
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