From 669904cfde9b9fe00031e593836776ae5d50c849 Mon Sep 17 00:00:00 2001 From: Mopi Date: Sun, 8 Apr 2018 20:24:54 +0200 Subject: [PATCH] 2.7 - Keep Talking and Nodody Explodes - Ne< script --- .../play-keep-talking-and-nobody-explodes.sh | 127 ++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100755 play.it-2/games/play-keep-talking-and-nobody-explodes.sh diff --git a/play.it-2/games/play-keep-talking-and-nobody-explodes.sh b/play.it-2/games/play-keep-talking-and-nobody-explodes.sh new file mode 100755 index 00000000..6ede189d --- /dev/null +++ b/play.it-2/games/play-keep-talking-and-nobody-explodes.sh @@ -0,0 +1,127 @@ +#!/bin/sh -e +set -o errexit + +### +# Copyright (c) 2015-2018, Antoine Le Gonidec +# 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. +### + +### +# Keep Talking and Nobody Explodes +# build native Linux packages from the original installers +# send your bug reports to vv221@dotslashplay.it +### + +script_version=20180408.1 + +# Set game-specific variables + +GAME_ID='keep-talking-and-nobody-explodes' +GAME_NAME='Keep Talking and Nobody Explodes' + +ARCHIVE_HUMBLE='Keep_Talking_and_Nobody_Explodes_1.6.1_-_Linux.zip' +ARCHIVE_HUMBLE_URL='https://www.humblebundle.com/store/keep-talking-and-nobody-explodes' +ARCHIVE_HUMBLE_MD5='ac321144f9ed9dc6797d35a33bd0b0e7' +ARCHIVE_HUMBLE_VERSION='1.0-humble1' +ARCHIVE_HUMBLE_SIZE='940000' +ARCHIVE_HUMBLE_TYPE='zip' + +ARCHIVE_GAME_BIN32_PATH='Keep Talking and Nobody Explodes' +ARCHIVE_GAME_BIN32_FILES='./ktane.x86 ./*_Data/*/x86' + +ARCHIVE_GAME_BIN64_PATH='Keep Talking and Nobody Explodes' +ARCHIVE_GAME_BIN64_FILES='./ktane.x86_64 ./*_Data/*/x86_64' + +ARCHIVE_GAME_DATA_PATH='Keep Talking and Nobody Explodes' +ARCHIVE_GAME_DATA_FILES='*_Data/level* *_Data/StreamingAssets *_Data/Managed *_Data/Mono/etc *_Data/*.assets *_Data/Resources *_Data/*.resS *_Data/globalgamemanagers *_Data/boot.config *_Data/*.resource *_Data/ScreenSelector.png' + +DATA_DIRS='./logs' + +APP_MAIN_TYPE='native' +APP_MAIN_EXE_BIN32='ktane.x86' +APP_MAIN_EXE_BIN64='ktane.x86_64' +APP_MAIN_OPTIONS='-logFile ./logs/$(date +%F-%R).log' +APP_MAIN_ICONS_LIST='APP_MAIN_ICON' +APP_MAIN_ICON='Mini?Metro_Data/Resources/UnityPlayer.png' +APP_MAIN_ICON_RES='128' + +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" + +PKG_BIN64_ARCH='64' +PKG_BIN64_DEPS="$PKG_BIN32_DEPS" + +# Load common functions + +target_version='2.7' + +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 + +postinst_icons_linking '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 -- GitLab