Commit cbc92939 authored by Mopi's avatar Mopi
Browse files

2.8 - RiME - New script

parent 86b002d0
Pipeline #56764 passed with stage
in 28 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.
###
###
# RiME
# build native Linux packages from the original installers
# send your bug reports to mopi@dotslashplay.it
###
script_version=20180610.1
# Set game-specific variables
GAME_ID='rime'
GAME_NAME='RiME'
ARCHIVE_GOG='setup_rime_152498_signed_(14865).exe'
ARCHIVE_GOG_URL='https://www.gog.com/game/rime'
ARCHIVE_GOG_MD5='303d41314564c753fcef92260c3e20f8'
ARCHIVE_GOG_VERSION='1.04-gog14865'
ARCHIVE_GOG_SIZE='8000000'
ARCHIVE_GOG_PART1='setup_rime_152498_signed_(14865)-2.bin'
ARCHIVE_GOG_PART1_MD5='b65792a122d267cc799e9b044605c1a1'
ARCHIVE_GOG_PART1_TYPE='innosetup'
ARCHIVE_GOG_PART2='setup_rime_152498_signed_(14865)-1.bin'
ARCHIVE_GOG_PART2_MD5='ea9fc9eeaeeb2d7c58eab42cef31bb2e'
ARCHIVE_GOG_PART2_TYPE='innosetup'
ARCHIVE_GAME_BIN_PATH='app'
ARCHIVE_GAME_BIN_FILES='./language_setup.exe ./rimelauncher.exe ./engine ./sirengame/binaries'
ARCHIVE_GAME_DATA_PATH='app'
ARCHIVE_GAME_DATA_FILES='./language_setup.png ./sirengame/content'
APP_MAIN_TYPE='wine'
APP_MAIN_EXE='sirengame/binaries/win64/rime.exe'
APP_MAIN_ICON='sirengame/binaries/win64/rime.exe'
PACKAGES_LIST='PKG_BIN PKG_DATA'
PKG_DATA_ID="${GAME_ID}-data"
PKG_DATA_DESCRIPTION='data'
PKG_BIN_ARCH='64'
PKG_BIN_DEPS="$PKG_L10N_ID $PKG_DATA_ID wine"
# Load common functions
target_version='2.8'
if [ -z "$PLAYIT_LIB2" ]; then
[ -n "$XDG_DATA_HOME" ] || 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/'
do
if [ -z "$PLAYIT_LIB2" ] && [ -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'
return 1
fi
fi
. "$PLAYIT_LIB2"
# Extract game data
extract_data_from "$SOURCE_ARCHIVE"
prepare_package_layout
rm --recursive "$PLAYIT_WORKDIR/gamedata"
# Extract icons
PKG='PKG_BIN'
icons_get_from_package 'APP_MAIN'
icons_move_to 'PKG_DATA'
# Write launchers
write_launcher 'APP_MAIN'
# Build package
write_metadata
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