Mystic-Mirage |
Samedi 24 Octobre 2015 à 0:24
|
Mystic-Mirage
|
Pathologic Classic HD is the Definitive Edition of the original Cult Classic Psychological First-Person Survival game by Ice-pick Lodge. 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.
#!/bin/bash
# Date : (2015-10-27 15-26)
# Last revision : (2015-10-29 10-00)
# Wine version used : 1.7.52
# Distribution used to test : Ubuntu 15.04 x64
# Author : Aleksandr Tishin (aka Mystic-Mirage)
# Program licence : Retail
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
TITLE="Pathologic Classic HD"
PREFIX="pathologic_classic_hd"
STEAM_ID="384110"
WORKING_WINE_VERSION="1.7.52"
# Starting the script
POL_SetupWindow_Init
POL_Debug_Init
POL_SetupWindow_presentation "$TITLE" "Ice-pick Lodge" "http://www.ice-pick.com/" "Mystic-Mirage" "$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
POL_SetupWindow_message "$(eval_gettext 'NOTICE: $TITLE will be installed via Steam. After Steam is installed, uncheck Run Steam, click Finish, and Steam will restart. Sign in and install $TITLE.')" "$TITLE"
POL_Call POL_Install_steam
# Mandatory pre-install fix for steam
POL_Call POL_Install_steam_flags "$STEAM_ID"
# Install the game
POL_SetupWindow_message "$(eval_gettext 'When $TITLE download by Steam is finished,\nDo NOT click on Play.\n\nClose COMPLETELY the Steam interface, \nso that the installation script can continue')" "$TITLE"
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine --ignore-errors "steam.exe" "steam://install/$STEAM_ID"
POL_Wine_WaitExit "$TITLE"
## Fix for this game
# Remove gamepad's bindings because of phantom key presses
GAME_PATH=$(cd "$(dirname "$(find "$WINEPREFIX" -name "Game.exe")")/../.."; pwd -P)
sed -i "/bind gp_/d" "$GAME_PATH/data/init.cfg"
## End Fix
# Make shorcut to game executable because of running it via Steam is not working
POL_Shortcut "Game.exe" "$TITLE"
POL_SetupWindow_Close
exit
Screenshots
http://i.imgur.com/bGMdMno.jpg http://i.imgur.com/wSqo3Ma.jpg
Install resources and images
left -- http://i.imgur.com/oWdg1Wn.png
top -- http://i.imgur.com/eeLPpsu.png
22x22 -- http://i.imgur.com/vOw4Yzp.png
48x48 -- http://i.imgur.com/elLGVXM.png
Edité par Mystic-Mirage
|
petch |
Samedi 24 Octobre 2015 à 2:21
|
petch
|
Hi,
Here's my script review:
POL_SetupWindow_Init
You also need POL_Debug_Init here to enable embedded debugger support
if [ "$POL_LANG" == "ru" ]; then
POL_SetupWindow_message "После установки Steam,\nуберите галочку с \"Запустить Steam\"\nи нажмите \"Готово\"" "$TITLE"
else
POL_SetupWindow_message "$(eval_gettext "When Steam insall is finished,\nuncheck Run Steam\nand press Finish')" "$TITLE"
fi
That's not how gettext works, if you spot a missing or broken translation, you can fix those using https://translations.launchpad.net/playonlinux instead.
Some translations may not work because of typos too (for example insall/install here), be careful to copy the standard texts exactly.
POL_Wine start /unix "steam.exe" "steam://install/$STEAM_ID"
POL_Wine_WaitExit "$TITLE"
My standard answer, also discussed in the Wiki :
start /unix is usually unnecessary, and has a side effects (makes programs started with Wine to run asynchronously, so they aren't killed automatically if the script is aborted), so if should be avoid if possible.
Using both POL_Wine_WaitBefore and POL_Wine_WaitExit around a Wine command should never be necessary, as one is useful for programs running synchronously, and the other for programs running asynchronously. If you manage to get rid of start /unix, POL_Wine_WaitBefore may be sufficient.
## Fix for this game
# Remove gamepad's bindings because of phantom key presses
GAME_PATH=$(cd "$(dirname "$(find "$WINEPREFIX" -name "Game.exe")")/../.."; pwd -P)
sed -i "/bind gp_/d" "$GAME_PATH/data/init.cfg"
## End Fix
This part should be tested under OS X too.
For example I know that BSD's sed does not support -i, but I think PlayOnMac bundles GNU sed, so it may work nonetheless. Testing is the only way to be sure you haven't missed some subtle incompatibility.
|
Mystic-Mirage |
Samedi 24 Octobre 2015 à 16:23
|
Mystic-Mirage
|
Thanks for your review @petch
I updated the script.
About 'sed -i' for OS X. This command works fine. But I made my tests using virtual machine so game not working on it. I don't know it is wine on Mac or 3d via virtualization problem.
|
Mystic-Mirage |
Samedi 24 Octobre 2015 à 16:25
|
Mystic-Mirage
|
One more question. How can I add some text message to PlayOnLinux for it can be translatable?
|
petch |
Mardi 27 Octobre 2015 à 12:48
|
petch
|
PoL/PoM client itself and scripts are periodically parsed for translation keys, so my the next day they should appear in launchpad
|
Mystic-Mirage |
Mardi 27 Octobre 2015 à 12:56
|
Mystic-Mirage
|
The message about "steam download" that present in my script is apeares in pol.pot twice. The dot is the difference. May be that should be unified?
|
petch |
Mardi 27 Octobre 2015 à 13:23
|
petch
|
It's always best to keep the number of different keys down, to lower the amount of work for translators (that also why it's best to use standard texts whenever possible).
|
Mystic-Mirage |
Mardi 27 Octobre 2015 à 14:30
|
Mystic-Mirage
|
Edited the script. Replaced text message found in translations.
|
Mystic-Mirage |
Mercredi 28 Octobre 2015 à 12:26
|
Mystic-Mirage
|
What should I do next to make my script approwed?
I've submit latest version to https://www.playonlinux.com/en/app-2642-Pathologic_Classic_HD.html
I think Mac support should be removed from this page. This was a mistake.
And what about translations? I have made some contribution so when it will be released?
|
petch |
Mercredi 28 Octobre 2015 à 20:15
|
petch
|
I approved the script already.
For Mac / PlayOnMac support, policy is to enable it whenever possible, since the game is not available for OS X either let's enable it unless some incompatibility is found.
About translations I'm not sure, actually I'm trying to get some confirmation that nothing stupid is going on :p
|
Mystic-Mirage |
Mercredi 28 Octobre 2015 à 20:25
|
Mystic-Mirage
|
Thanks! How to get 'top' and 'left' images available in the installation wizard?
|
petch |
Mercredi 28 Octobre 2015 à 20:32
|
petch
|
Right now there's no web interface for uploading those, so put them in some public place and some maintainer (probably me) will take care of uploading them on the server
|
Mystic-Mirage |
Mercredi 28 Octobre 2015 à 20:37
|
Mystic-Mirage
|
put them in some public place
Already there -- see first post
|
Mystic-Mirage |
Mercredi 28 Octobre 2015 à 20:41
|
Mystic-Mirage
|
Updated the script -- fixed quotes (my bad)
|
petch |
Mercredi 28 Octobre 2015 à 22:21
|
petch
|
Ah yes, I missed the resources, should be good now :)
|
Mystic-Mirage |
Mercredi 28 Octobre 2015 à 23:59
|
Mystic-Mirage
|
Thanks again!
And once again about 'start'
With
POL_Wine "steam.exe" "steam://install/$STEAM_ID"
I am getting error during installation about 'exited abnormally'
But when I added start to this line the installer works well without any error.
What should I do?
|
petch |
Jeudi 29 Octobre 2015 à 1:48
|
petch
|
Maybe
POL_Wine --ignore-errors "steam.exe" "steam://install/$STEAM_ID"
|
Mystic-Mirage |
Jeudi 29 Octobre 2015 à 9:01
|
Mystic-Mirage
|
That seems to work. Thanks! Updated the script.
|
petch |
Jeudi 29 Octobre 2015 à 20:13
|
petch
|
It's always best to keep the number of different keys down, to lower the amount of work for translators (that also why it's best to use standard texts whenever possible).
Ok, so what I suspected (and feared) has been confirmed, the translations files are currently sent to the git repository, so they get bundled with the PlayOnLinux/PlayOnMac client.
So only the people using the development version get them in a timely matter, people using our repositories get them with the next release, and people using the release bundled with their distro get them a year or two later :p
There's a plan to change that, but it will probably be for POL v5 now.
Edité par petch
|