Forums

[Script] Stronghold

Auteur Réponses
ManuelV Jeudi 9 Mai 2013 à 21:52
ManuelVAnonymous

Stronghold is a real time strategy game. Its basically about building a castle, defending it against enemys and invading other castles. It also contains some non-combat missions.

This script works without any additional modifications

[code language=playonlinux]
#!/bin/bash
# Date : (2013-05-09 18-45)
# Last revision : (2013-05-09 20-45)
# Distribution used to test : Ubuntu 12.10 using Unity and Gnome
# Author : Manuel Vögele
# Script licence : GPLv3
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
POL_SetupWindow_Init

TITLE="Stronghold"
WORKING_WINE_VERSION="1.4.1"
WINEPREFIX="Stronghold"
CD_FILE_TO_CHECK="disk1/Stronghold.exe"
CD_INSTALL_FILE="disk1/Setup.exe"

POL_SetupWindow_presentation "Stronghold" "Firefly Studios" "http://www.fireflyworlds.com/" "Manuel Vögele" "$WINEPREFIX"

POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "$CD_FILE_TO_CHECK"

POL_Wine_SelectPrefix "$WINEPREFIX"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"

# Check the disc again since the user could have removed it at this point
POL_SetupWindow_check_cdrom "$CD_FILE_TO_CHECK"
POL_Wine start /unix "$CDROM/$CD_INSTALL_FILE"
POL_Wine_WaitExit

POL_Shortcut "Stronghold.exe" "Stronghold"

POL_SetupWindow_Close
exit
[/code]


22x22 icon








Edité par ManuelV

petch Jeudi 9 Mai 2013 à 21:56
petch

Hi,
See remarks on the other thread about POL_Debug_Init and start /unix.
ManuelV Jeudi 9 Mai 2013 à 22:07
ManuelVAnonymous

Hi, thanks for your review.

I've applied changes to the Script.
petch Jeudi 9 Mai 2013 à 22:17
petch

No problem :)
Thinking of it, there's another remaining issue, debugging support requires that the $TITLE variable must be defined, and its content match the name of the script (when it will be added to the scripts repository). It's used to push the automated bug reports to the bug tracker.
So you need to have both $WINEPREFIX and $TITLE, even if in this particular case they contain the same value.

ManuelV Jeudi 9 Mai 2013 à 22:48
ManuelVAnonymous

Added the $TITLE variable to the script.

Can I commit the script to the repository now or do I have to do something else before / wait for somethig to happen?
petch Jeudi 9 Mai 2013 à 22:52
petch

I can't think of anything else...

If it still works feel free to submit it for signing :)
petch Jeudi 9 Mai 2013 à 23:23
petch

Script validated.
I renamed $WINEPREFIX to $PREFIX because $WINEPREFIX is a variable reserved by Wine (contains the full path of the prefix, not just its name), so I'm not sure what the consequences could be.

Also, the "Tests" field is used to write functional tests (in Bash), like checking that download URL are working, etc, so just keep it blank.
I moved the testing remarks to comments in the script, just in case.

Edité par petch

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