diff --git a/play.it-2/games/play-jydge.sh b/play.it-2/games/play-jydge.sh new file mode 100755 index 0000000000000000000000000000000000000000..112a26066617e79ee480892987282491bfd056dd --- /dev/null +++ b/play.it-2/games/play-jydge.sh @@ -0,0 +1,113 @@ +#!/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. +### + +### +# JYDGE +# build native Linux packages from the original installers +# send your bug reports to vv221@dotslashplay.it +### + +script_version=20180419.1 + +# Set game-specific variables + +GAME_ID='jydge' +GAME_NAME='JYDGE' + +ARCHIVE_HUMBLE='JYDGE' +ARCHIVE_HUMBLE_URL='https://www.humblebundle.com/store/jydge' +ARCHIVE_HUMBLE_MD5='3b8c8a14b7d7bc7c059c479910eb449d' +ARCHIVE_HUMBLE_VERSION='1.0-humble1' +ARCHIVE_HUMBLE_SIZE='310000' +ARCHIVE_HUMBLE_TYPE='zip' + +ARCHIVE_GAME_BIN_PATH='.' +ARCHIVE_GAME_BIN_FILES='./JYDGE ./libSDL2-2.0.so.0' + +ARCHIVE_GAME_DATA_PATH='.' +ARCHIVE_GAME_DATA_FILES='./*.pak ./*.xml' + +APP_MAIN_TYPE='native' +APP_MAIN_EXE='JYDGE' +APP_MAIN_ICON_RES='128' + +PACKAGES_LIST='PKG_BIN PKG_DATA' + +PKG_DATA_ID="${GAME_ID}-data" +PKG_DATA_DESCRIPTION='data' + +PKG_BIN_ARCH='64' +PKG_BIN_DEPS="$PKG_DATA_ID glibc openal sdl2" + +# 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 + +PKG='PKG_BIN' +write_launcher 'APP_MAIN' + + +# Build package + +write_metadata +build_pkg + +# Clean up + +rm --recursive "$PLAYIT_WORKDIR" + +# Print instructions + +print_instructions + +exit 0