Forums

[script] Jerusalem: The 3 Roads To The Holy Land

Auteur Réponses
marco_g Dimanche 23 Mai 2010 à 10:59
marco_gAnonymous

Here is a script to install Jerusalem: The 3 Roads To The Holy Land.

#!/bin/bash
# Date : (2010-05-24)
# Last revision : (2010-05-29)
# Wine version used : 1.1.44
# Distribution used to test : Ubuntu 9.10
# Author : Marco Gerards
# Licence : GPLv3
# Depend : none

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

TITLE="Jerusalem: The 3 Roads To The Holy Land"
AUTHOR="Marco Gerards"
PREFIX="Jerusalem"
PREFIXDIR="$REPERTOIRE/wineprefix/$PREFIX"
WORKINGWINEVERSION="1.1.44"

POL_SetupWindow_make_icon_for_shortcut()
{
convert "$HOME/.local/share/icons/$2" -geometry 32X32 "$REPERTOIRE/icones/32/$1"
}

wget http://upload.wikimedia.org/wikipedia/en/0/06/Jerusalem-_The_Three_Roads_to_the_Holy_Land.jpg --output-document="$REPERTOIRE/tmp/leftnotscaled.png"
convert "$REPERTOIRE/tmp/leftnotscaled.png" -scale 150x356\\! "$REPERTOIRE/tmp/left.jpeg"
POL_SetupWindow_Init "" "$REPERTOIRE/tmp/left.jpeg"

POL_SetupWindow_presentation "$TITLE" "Cryo" "http://www.cryo.fr" "$AUTHOR" "$PREFIX"
select_prefix "$PREFIXDIR"

# Let the user select a CDROM
POL_SetupWindow_cdrom

# Check if this CDROM is the correct CDROM
POL_SetupWindow_check_cdrom "/Jerusalem.msi"

# To make sure the user has the same environment as the game was
# tested with.
POL_SetupWindow_install_wine "$WORKINGWINEVERSION"

Use_WineVersion "$WORKINGWINEVERSION"

POL_SetupWindow_prefixcreate

Set_OS "win98"

PROGRAMFILES="Program Files" 
POL_LoadVar_PROGRAMFILES

# Run the installer
POL_SetupWindow_wait_next_signal "Installing game..." "$TITLE"
wine msiexec /i "$CDROM/Jerusalem.msi" /q INSTALLDIR="C:\\\\$PROGRAMFILES\\\\Jerusalem"
POL_SetupWindow_detect_exit

wine reboot

# Make a short cut
POL_SetupWindow_make_icon_for_shortcut "$TITLE" "*_jerusalem.0.png"
POL_SetupWindow_make_shortcut "$PREFIX" "$PROGRAMFILES/Jerusalem" "Jerusalem.exe" "" "$TITLE"
Set_WineVersion_Assign "$WORKINGWINEVERSION" "$TITLE"

# Done!
POL_SetupWindow_message "$TITLE installed."

POL_SetupWindow_Close
exit

Edité par marco_g

NSLW Lundi 24 Mai 2010 à 9:15
NSLW

wrestool isn't POL's dependency so it won't work for everyone, but you can use icon from ~/.local/share/icons. You can see how it's done here

You can also use cover of the game from wikipedia. How to do it is also in the same script.

Edité par NSLW

marco_g Lundi 24 Mai 2010 à 12:53
marco_gAnonymous

wrestool isn't POL's dependency so it won't work for everyone, but you can use icon from ~/.local/share/icons. You can see how it's done here

You can also use cover of the game from wikipedia. How to do it is also in the same script.

Quote from NSLW


Ok, here is the updated version:

#!/bin/bash
# Date : (2010-05-23)
# Last revision : (2010-05-23)
# Wine version used : 1.1.38
# Distribution used to test : Ubuntu 9.10
# Author : Marco Gerards
# Licence : GPLv3
# Depend : none

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

TITLE="Jerusalem: The 3 Roads To The Holy Land"
AUTHOR="Marco Gerards"
PREFIX="Jerusalem"
PREFIXDIR="$REPERTOIRE/wineprefix/$PREFIX"
WORKINGWINEVERSION="1.1.38"

POL_SetupWindow_make_icon_for_shortcut()
{
convert "$HOME/.local/share/icons/$2" -geometry 32X32 "$REPERTOIRE/icones/32/$1"
}

wget http://upload.wikimedia.org/wikipedia/en/0/06/Jerusalem-_The_Three_Roads_to_the_Holy_Land.jpg --output-document="$REPERTOIRE/tmp/leftnotscaled.png"
convert "$REPERTOIRE/tmp/leftnotscaled.png" -scale 150x356\\! "$REPERTOIRE/tmp/left.jpeg"
POL_SetupWindow_Init "" "$REPERTOIRE/tmp/left.jpeg"

POL_SetupWindow_presentation "$TITLE" "Cryo" "http://www.cryo.fr" "$AUTHOR" "$PREFIX"
select_prefix "$PREFIXDIR"

# Let the user select a CDROM
POL_SetupWindow_cdrom

# Check if this CDROM is the correct CDROM
POL_SetupWindow_check_cdrom "/Jerusalem.msi"

# To make sure the user has the same environment as the game was
# tested with.
POL_SetupWindow_install_wine "$WORKINGWINEVERSION"

Use_WineVersion "$WORKINGWINEVERSION"

POL_SetupWindow_prefixcreate

Set_OS "win98"

PROGRAMFILES="Program Files" 
POL_LoadVar_PROGRAMFILES

# Run the installer
POL_SetupWindow_wait_next_signal "Installing game..." "$TITLE"
wine msiexec /i "$CDROM/Jerusalem.msi" /q INSTALLDIR="C:\\\\$PROGRAMFILES\\\\Jerusalem"
POL_SetupWindow_detect_exit

wine reboot

# Make a short cut
POL_SetupWindow_make_icon_for_shortcut "$TITLE" "*_jerusalem.0.png"
POL_SetupWindow_make_shortcut "$PREFIX" "$PROGRAMFILES/Jerusalem" "Jerusalem.exe" "" "$TITLE"
Set_WineVersion_Assign "$WORKINGWINEVERSION" "$TITLE"

# Done!
POL_SetupWindow_message "$TITLE installed."

POL_SetupWindow_Close
exit
NSLW Mardi 25 Mai 2010 à 9:21
NSLW

Does the game work with latest Wine?
marco_g Samedi 29 Mai 2010 à 18:32
marco_gAnonymous

Does the game work with latest Wine?

Quote from NSLW


It does, I have update the script.

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 dmcayonlinux.com