The forum

[Script] Silent Hunter III

Author Replies
Dadu042 Saturday 23 February 2019 at 8:04
Dadu042
Moderator

This script does install the game but the installer crash at the end (however I know that the game can work, without the copy protection of course).

 

Question : the issue is that the upgrade process that I have write ('Install latest patch') does not run (it seems to not download), and I do not why. Any idea ?

 

#!/usr/bin/env playonlinux-bash
[ -z "$PLAYONLINUX" ] && exit 0
source "$PLAYONLINUX/lib/sources"

# Date : (2019-02-22 23-56)
# Last revision : (2019-02-23 08-23)
# Wine version used : 4.2
# Distribution used to test : Ubuntu 18.10 x64
# Script licence : GPL3
# Program licence : Retail
#
# Playonlinux version used : 4.3.4
#
# The DVD used (game version v1.0) is English + Deutch, EMEA edition (Europe).
# Date of Setup.exe is february 27th 2005.
# Note that on the DVD label the date printed is '2005'.
#
# Not tested: online game.

TITLE="Silent Hunter III"
PREFIX="silent_hunter_III"
WORKING_WINE_VERSION="4.2"
AUTHOR="Dadu042"
EDITOR="Ubisoft"
GAME_URL="https://en.wikipedia.org/wiki/Silent_Hunter_III"

Set_OS "winxp"

POL_SetupWindow_Init
POL_Debug_Init
 
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
 
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x86"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
POL_System_TmpCreate "$TITLE"

###############
# Please note #
###############

POL_SetupWindow_message  "Please note: This game will install but will not run because of the copy protection (as of 2019-02, Wine 4.2. Even with latest patch 1.4b applied).\nWithout that, it would run and work.\n" "$TITLE"

POL_SetupWindow_message  "Please note: This script game was not tested for online play (as of 2018).\n\nFiles TO NOT INSTALL when asked:\n- Adobe acrobat Reader.\n- Windows Media 9 Codecs\n- GameShadow (click Cancel)." "$TITLE"

POL_SetupWindow_InstallMethod "LOCAL,CD,STEAM"

if [ "$INSTALL_METHOD" == "LOCAL" ]; then
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
        POL_Wine start /unix "$SETUP_EXE"
        POL_Wine_WaitExit "$TITLE"
        cd "$POL_System_TmpDir"
 
elif [ "$INSTALL_METHOD" == "STEAM" ];then
        POL_Call POL_Install_steam
        cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
        POL_Wine "steam.exe" steam://install/15210
        POL_Wine_WaitBefore "$TITLE"
else
        POL_SetupWindow_cdrom
        POL_SetupWindow_check_cdrom "SH3Autorun.cfg"
        POL_Wine start /unix "$CDROM/setup.exe"
        POL_Wine_WaitExit "setup.exe"
        cd "$POL_System_TmpDir"
fi
 
if [ "$INSTALL_METHOD" == "STEAM" ]; then
        POL_Shortcut "steam.exe" "$TITLE" "" "steam://rungameid/15210"
else
        POL_Shortcut "sh3.exe" "$TITLE" ""
fi

POL_Shortcut_Document "$TITLE" "SH3_MANUAL_EN.pdf"

##########################
# Install latest patch ? #
##########################
POL_SetupWindow_menu "Do you want to download and install the latest patch (v1.4b) ?" "$QUESTIONPATCH" "Yes~No" "~"

if [ "$QUESTIONPATCH" == "Yes" ]; then
    POL_SetupWindow_menu "What region code is your game edition ?" "$QUESTIONREGIONCODE" "EMEA~US" "~"

if [ "$QUESTIONREGIONCODE" == "EMEA" ]; then
        POL_Download "http://patches.ubi.com/silent_hunter_3/silent_hunter_3_dvd_1.4b_emea.exe"
        POL_Wine start /unix "silent_hunter_3_dvd_1.4b_emea.exe"
        POL_Wine_WaitExit "silent_hunter_3_dvd_1.4b_emea.exe"
else
        POL_Download "http://patches.ubi.com/silent_hunter_3/silent_hunter_3_dvd_1.4b_us.exe"
        POL_Wine start /unix "silent_hunter_3_dvd_1.4b_us.exe"
        POL_Wine_WaitExit "silent_hunter_3_dvd_1.4b_us.exe"
fi

fi
 
POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

 

 

Edited by Dadu042