Forums

[Script] GOG.com - Pathologic Classic HD

Auteur Réponses
aggelito Mardi 19 Janvier 2016 à 22:17
aggelito

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

 

 

 

 

 

Edité par aggelito

petch Jeudi 21 Janvier 2016 à 4:31
petch

Hi aggelito,

> * 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?

The parameter is the script number in the scripts repository, it will appear in the URL when the entry is created. When POL_SetupWindow_SetID is used, the installation wizard will have an additional information button ⓘ that when clicked will open the script's page in the repository, nothing too fancy.

> * 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?

MD5 hash is MD5 hash, md5sum is fine.

POL_SetupWindow_message "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"

All user oriented messages must support localization
http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_10:_Script_Translation

 

aggelito Jeudi 21 Janvier 2016 à 18:41
aggelito

Thanks for your answer, and I think I have solved the localization bit and the updated script should be the script posted in the original post.

I also tried submitting the script, but I found the submission form a bit confusing. I found no place to post my code when submitting, only box for writing the description. Should I have posted the code in there? Because of this, the submission was posted without a script. I posted the script as a contribution to the original submission instead.

 

petch Jeudi 21 Janvier 2016 à 19:18
petch

aggelito Jeudi 21 Janvier 2016 à 19:34
aggelito

Post removed

Edité par aggelito

aggelito Jeudi 21 Janvier 2016 à 19:47
aggelito

Also, in the submission form there is one checkbox for "PlayOnLinux testing?" and one for "PlayOnMac testing?". What do these mean? I find these really unclear and I can't really figure out if I should have checked them or not. Maybe the descriptions should be updated to something a bit clearer, or maybe atleast update the wiki page with information on what these mean?

aggelito Dimanche 24 Janvier 2016 à 19:40
aggelito

I have now added screenshots and an icon to the original post.

petch Dimanche 24 Janvier 2016 à 20:56
petch

Graphic resources should be fine now.

"Testing" status is up to the script author/maintainer, main effect is that at the start of installation users are asked to give feedback about their results. Since they don't report much either way, it doesn't matter much.
 

This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmca-notice@playonlinux.com