Description
This is a script for the GOG version of the game Pathologic Classic HD. Pathologic Classic HD is the Definitive Edition of the original Cult Classic Psychological First-Person Survival game. In this unforgettable experience, players control one of three unique characters as they try to save a mysterious town from a deadly plague that cannot be stopped.
This script is quite heavily based on Mystic-Mirage's script for the steam version of the game, so kudos and my thanks to him for writing that one!
Things done outside of PlayOnLinux
Nothing have to be done outside of PlayOnLinux to install the program.
Errors
The installer throws a few errors during installation, but these errors seems to be fine to ignore. The game have been running fine when I played it. I tried playing a bit with a gamepad (an xbox 360 controller) and as long as the controller was plugged in when I started the game, it all seemed to work fine.
Questions
Besides general comments on the script I would apprecciate to get a few specific questions answered:
* As you can see I have used the POL_SetupWindow_SetID command. This was something i copied from Mystic-Mirage's script, and I'm actually not really sure what it does. What is the function of this command, and does it matter which number I set as the id?
* I have provided a md5 hash for the installer in the POL_GoG_setup function. I got this hash by running the md5sum terminal command on the installer I downloaded from GOG. I suspect that this isn't the proper way of getting the hash, my guess is that the best thing is to get it from GOG. Is this possible to do? And if so, how?
Also, if someone could test this on OSX that would be golden. I don't have an OSX computer to test on myself.
Images
Screenshots
https://www.dropbox.com/s/c2n2kta658jxkph/pathologic_screenshot_1.png?dl=0
https://www.dropbox.com/s/u6z9ox59et6pkt3/pathologic_screenshot_2.png?dl=0
https://www.dropbox.com/s/vynrf6s36bjslzj/pathologic_screenshot_3.png?dl=0
Icons
22x22 -- http://i.imgur.com/vOw4Yzp.png
For the top and left installer images I am using the same as the steam version of this script.
The Script!
So, here comes the script!
#!/bin/bash
# Date : (2016-01-20 21-00)
# Wine version used : 1.7.52
# Distribution used to test : Xubuntu 15.10 x64
# Author : August Lindberg
# Program licence : Retail
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
TITLE="GOG.com - Pathologic Classic HD"
SHORTCUT_NAME="Pathologic Classic HD"
PREFIX="PathologicClassicHd_gog"
WORKING_WINE_VERSION="1.7.52"
GOGID="pathologic_classic_hd"
# Starting the script
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/pathologic_classic_hd/top.jpg" "http://files.playonlinux.com/resources/setups/pathologic_classic_hd/left.jpg" "$TITLE"
POL_SetupWindow_Init
POL_SetupWindow_SetID 2642
POL_Debug_Init
POL_SetupWindow_presentation "$TITLE" "Ice-pick Lodge" "http://www.ice-pick.com/" "August Lindberg" "$PREFIX"
# Setting prefix path
POL_Wine_SelectPrefix "$PREFIX"
# Forcing x86 to make wmp9 work
POL_System_SetArch "x86"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
# Installing mandatory dependencies
POL_Call POL_Install_d3dx9_35
POL_Call POL_Install_d3dx9_36
POL_Call POL_Install_devenum
POL_Call POL_Install_quartz
POL_Call POL_Install_wmp9
# Choose setup file
POL_Call POL_GoG_setup "$GOGID" "d7a4ffe9afcf8aec87df436927b55b0e"
# Warn for installer errors
POL_SetupWindow_message "$(eval_gettext "The installer will probably throw a few errors during installation. This is nothing to worry about. Just press 'OK' when the errors appear and everything should work fine.")" "$TITLE"
# Install game
POL_Call POL_GoG_install "/nogui"
## Fix for this game
# Ask if the user want to play with a gamepad
POL_SetupWindow_question "$(eval_gettext 'Do you want to play the game with a gamepad? If not, the gamepad bindings will be removed to solve an issue with phantom key presses.')" "$TITLE"
# If not, remove gamepad's bindings because of phantom key presses
if [ "$APP_ANSWER" = "FALSE" ]; then
GAME_PATH=$(cd "$(dirname "$(find "$WINEPREFIX" -name "Game.exe")")/../.."; pwd -P)
sed -i "/bind gp_/d" "$GAME_PATH/data/init.cfg"
fi
## End Fix
# Create game shortcut
POL_Shortcut "Game.exe" "$SHORTCUT_NAME"
POL_SetupWindow_Close
exit
Edited by aggelito