The Dark Mod

Informations

Créateur Messages
b1k3rdude

Information

Cet installateur a été accepté par l'équipe.

Informations

Plate-formes :
Téléchargements : 4980
Wine: 3.0.3

Retours d'expérience

Description

The Dark Mod is a FREE, first-person stealth game inspired by the original Thief series made by Looking Glass Studios. Wikipedia.

This game now (2015 ?) has a Linux and OSX natives releases.

Captures d'écran

Miniature

Code source

#!/bin/bash
# Date : 2015-05-28
# Last revision : see changelog
# Wine version used : 3.0.3
# Distribution used to test : Kubuntu 18.04 amd64
# Author : Freek 'Freyk' Borgerink
# Licence : GPL
#
# CHANGELOG
# [Freek 'Freyk' Borgerink] (2015-05-28)
#   First script.
# [Dadu042] (2019-12-19 11:55)
#   Wine 1.7.16 -> 3.0.3
#   Force architecture to x86
#   Add POL_RequiredVersion "4.2.12"
#   Add shortcut category.

# To do ?:
#   + vcrun2015

# KNOWN ISSUES:
#  - Wine x86 3.0.3, 4.0.3 (+ game v2.07): VC++ runtime installation fail (:err:module:import_dll Library mfc140.dll (which is needed by L"C:\\games\\thedarkmod\\TheDarkMod.exe") not found). Fix? : POL_Call POL_Install_vcrun2015


[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
  
TITLE="The Dark Mod"
PREFIX="TheDarkMod"
EDITOR="Broken Glass Studios"
GAME_URL="http://www.thedarkmod.com"
AUTHOR="Freek 'Freyk' Borgerink"
WORKING_WINE_VERSION="3.0.3"
 
#md5hash of tdm_update_win.zip from the thedarkmod.com site
TDMWINUPDATERDOWNLOADLOCATION="http://www.fidcal.com/darkuser/tdm_update_win.zip"
#$TDMWINUPDATERHASH="ff1b6d10c65970422206133e923cf36d"
 
 
################################
 
#function to run the updater
function fncRunUpdater {
        POL_SetupWindow_message "$(eval_gettext 'Going to run the updater. In the updater click only on Continue or Ok.\n\nIf the updater fails, close all the windows and run the updater again from the shortcut.')" "$TITLE"
        cd "$WINEPREFIX/drive_c/games/thedarkmod"
         POL_SetupWindow_wait_next_signal "The Dark Mod Updater in progress." "$TITLE"
        #POL_Wine_WaitBefore "$TITLE"
        POL_Wine "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
         #POL_SetupWindow_detect_exit
         POL_Wine_WaitExit "$TITLE"
}
 
#function to check if the dark mod executable is present
function fncFilePresenceCheck {
        FILE="$WINEPREFIX/drive_c/games/thedarkmod/TheDarkMod.exe"
        #POL_SetupWindow_message "$(eval_gettext 'Going to check the file presence of $FILE ')" "$TITLE"
        if [ -f $FILE ]; then
                #POL_SetupWindow_message "$(eval_gettext 'The Dark Mod Executable is present')" "$TITLE"
                POL_Shortcut "TheDarkMod.exe" "The Dark Mod" "" "" "Game;"
        else
                POL_SetupWindow_message "$(eval_gettext 'The Dark Mod Executable is not present on your system\nPlease rerun the updater using the shortcut\nand create the shortcut mannualy')" "$TITLE"
        fi
}
 
#Starting the script
POL_SetupWindow_Init
  
#Starting debugging API
POL_Debug_Init
  
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"

POL_RequiredVersion "4.2.12" || POL_Debug_Fatal "$APPLICATION_TITLE $VERSION is required to install $TITLE"

#Select the download method.
#cant use POL_SetupWindow_InstallMethod, because there are more installation methods
POL_SetupWindow_menu "$(eval_gettext 'How would you like to install The Dark Mod?')" "Install Method" "Online|Local updater zip|Local Standonlone zip" "|"
INSTALLMETHOD="$APP_ANSWER"

#create prefix folder
POL_Wine_SelectPrefix "$PREFIX"

# Determine Architecture
# POL_System_SetArch "amd64"
POL_System_SetArch "x86"

POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"

# POL_Call POL_Install_vcrun2015

if [ "$INSTALLMETHOD" = "Online" ]
then
        mkdir -p "$WINEPREFIX/drive_c/games/thedarkmod"
    cd "$WINEPREFIX/drive_c/games/thedarkmod"
        #Download tdm updater
        POL_Download "$TDMWINUPDATERDOWNLOADLOCATION" #"$TDMWINUPDATERHASH"
        #Unpack the zipfile
        POL_System_ExtractSingleFile "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update_win.zip" "tdm_update.exe" "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
    rm "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update_win.zip"
    #Create shortcut for updater
        POL_Shortcut "tdm_update.exe" "The Dark Mod Updater"
        fncRunUpdater
        fncFilePresenceCheck 
fi
 
if [ "$INSTALLMETHOD" = "Local updater zip" ]
then
        #create prefix folder
    POL_SetupWindow_message "$(eval_gettext 'Please download the darkmod updater zip file from \n$GAME_URL')" "$TITLE"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the darkmod updater zip file to run.\nIt must have the name tdm_update_win.zip')" "$TITLE"
    mkdir -p "$WINEPREFIX/drive_c/games/thedarkmod"
    #Unpack the zipfile
        POL_System_ExtractSingleFile "$APP_ANSWER" "tdm_update.exe" "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
        #Create the shortcuts
        POL_Shortcut "tdm_update.exe" "The Dark Mod Updater"
        fncRunUpdater
        fncFilePresenceCheck        
fi
 
if [ "$INSTALLMETHOD" = "Local Standalone zip" ]
then
        POL_SetupWindow_message "$(eval_gettext 'Please download first The Dark Mod standalone release zip-file:\n\nTHE DARK MOD Version 2.0 - Standalone Release\n\nFrom sites like: \n$GAME_URL\nhttp://www.moddb.com\nhttp://www.google.com')" "$TITLE"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the darkmod standalone release zip file to run.')" "$TITLE"
    mkdir -p "$WINEPREFIX/drive_c/games/"
    #Unpack the zipfile
    cd "$WINEPREFIX/drive_c/games/"
        POL_System_unzip "$APP_ANSWER"
        #rename folder
        mv "$WINEPREFIX/drive_c/games/THE DARK MOD Version 2.0 - Standalone Release/" "$WINEPREFIX/drive_c/games/thedarkmod"
        #Set permissions
        chmod -R ug+rw "$WINEPREFIX/drive_c/games/thedarkmod"
        #set shortcut
        POL_Shortcut "TheDarkMod.exe" "The Dark Mod" "" "" "Game;"
        POL_Shortcut "tdm_update.exe" "The Dark Mod Updater"
        POL_SetupWindow_menu "$(eval_gettext 'The 2.0 updater doesnt run on $WORKING_WINE_VERSION.\nWould you like that I download a newer version of the the updater\nand then update the files?')" "Run Updater" "Yes|No" "|"
        if [ "$APP_ANSWER" = "Yes" ]
        then
                POL_SetupWindow_message "$(eval_gettext 'Going Online to update the updater and run it.')" "$TITLE"
                cd "$WINEPREFIX/drive_c/games/thedarkmod"
                #Download tdm updater
                POL_Download "$TDMWINUPDATERDOWNLOADLOCATION" #"$TDMWINUPDATERHASH"
                #remove old updater
                rm "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
                rm "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.log"
                #Unpack the zipfile
                POL_System_ExtractSingleFile "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update_win.zip" "tdm_update.exe" "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
            rm "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update_win.zip"
                fncRunUpdater
        fi       
fi
 
#Setting wine stuff
Set_OS "win7"
 
#send end message  
POL_SetupWindow_message "$(eval_gettext 'This is the end of the $TITLE installation script. \n\nFor more info, visit $GAME_URL')" "end"
POL_SetupWindow_Close
exit 0

Contributions

Filters:

Contribuer
Membre Messages
Dadu042 Jeudi 19 Décembre 2019 à 11:58
Dadu042
Modérateur

Information

Cette mise à jour a été acceptée par l'équipe

Messages

Disable vcrun2015.

Differences

@@ -87,7 +87,7 @@
 
 POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
 
-POL_Call POL_Install_vcrun2015
+# POL_Call POL_Install_vcrun2015
 
 if [ "$INSTALLMETHOD" = "Online" ]
 then

Nouveau code source

#!/bin/bash
# Date : 2015-05-28
# Last revision : see changelog
# Wine version used : 3.0.3
# Distribution used to test : Kubuntu 18.04 amd64
# Author : Freek 'Freyk' Borgerink
# Licence : GPL
#
# CHANGELOG
# [Freek 'Freyk' Borgerink] (2015-05-28)
#   First script.
# [Dadu042] (2019-12-19 11:55)
#   Wine 1.7.16 -> 3.0.3
#   Force architecture to x86
#   Add POL_RequiredVersion "4.2.12"
#   Add shortcut category.

# To do ?:
#   + vcrun2015

# KNOWN ISSUES:
#  - Wine x86 3.0.3, 4.0.3 (+ game v2.07): VC++ runtime installation fail (:err:module:import_dll Library mfc140.dll (which is needed by L"C:\\games\\thedarkmod\\TheDarkMod.exe") not found). Fix? : POL_Call POL_Install_vcrun2015


[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
  
TITLE="The Dark Mod"
PREFIX="TheDarkMod"
EDITOR="Broken Glass Studios"
GAME_URL="http://www.thedarkmod.com"
AUTHOR="Freek 'Freyk' Borgerink"
WORKING_WINE_VERSION="3.0.3"
 
#md5hash of tdm_update_win.zip from the thedarkmod.com site
TDMWINUPDATERDOWNLOADLOCATION="http://www.fidcal.com/darkuser/tdm_update_win.zip"
#$TDMWINUPDATERHASH="ff1b6d10c65970422206133e923cf36d"
 
 
################################
 
#function to run the updater
function fncRunUpdater {
        POL_SetupWindow_message "$(eval_gettext 'Going to run the updater. In the updater click only on Continue or Ok.\n\nIf the updater fails, close all the windows and run the updater again from the shortcut.')" "$TITLE"
        cd "$WINEPREFIX/drive_c/games/thedarkmod"
         POL_SetupWindow_wait_next_signal "The Dark Mod Updater in progress." "$TITLE"
        #POL_Wine_WaitBefore "$TITLE"
        POL_Wine "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
         #POL_SetupWindow_detect_exit
         POL_Wine_WaitExit "$TITLE"
}
 
#function to check if the dark mod executable is present
function fncFilePresenceCheck {
        FILE="$WINEPREFIX/drive_c/games/thedarkmod/TheDarkMod.exe"
        #POL_SetupWindow_message "$(eval_gettext 'Going to check the file presence of $FILE ')" "$TITLE"
        if [ -f $FILE ]; then
                #POL_SetupWindow_message "$(eval_gettext 'The Dark Mod Executable is present')" "$TITLE"
                POL_Shortcut "TheDarkMod.exe" "The Dark Mod" "" "" "Game;"
        else
                POL_SetupWindow_message "$(eval_gettext 'The Dark Mod Executable is not present on your system\nPlease rerun the updater using the shortcut\nand create the shortcut mannualy')" "$TITLE"
        fi
}
 
#Starting the script
POL_SetupWindow_Init
  
#Starting debugging API
POL_Debug_Init
  
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"

POL_RequiredVersion "4.2.12" || POL_Debug_Fatal "$APPLICATION_TITLE $VERSION is required to install $TITLE"

#Select the download method.
#cant use POL_SetupWindow_InstallMethod, because there are more installation methods
POL_SetupWindow_menu "$(eval_gettext 'How would you like to install The Dark Mod?')" "Install Method" "Online|Local updater zip|Local Standonlone zip" "|"
INSTALLMETHOD="$APP_ANSWER"

#create prefix folder
POL_Wine_SelectPrefix "$PREFIX"

# Determine Architecture
# POL_System_SetArch "amd64"
POL_System_SetArch "x86"

POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"

# POL_Call POL_Install_vcrun2015

if [ "$INSTALLMETHOD" = "Online" ]
then
        mkdir -p "$WINEPREFIX/drive_c/games/thedarkmod"
    cd "$WINEPREFIX/drive_c/games/thedarkmod"
        #Download tdm updater
        POL_Download "$TDMWINUPDATERDOWNLOADLOCATION" #"$TDMWINUPDATERHASH"
        #Unpack the zipfile
        POL_System_ExtractSingleFile "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update_win.zip" "tdm_update.exe" "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
    rm "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update_win.zip"
    #Create shortcut for updater
        POL_Shortcut "tdm_update.exe" "The Dark Mod Updater"
        fncRunUpdater
        fncFilePresenceCheck 
fi
 
if [ "$INSTALLMETHOD" = "Local updater zip" ]
then
        #create prefix folder
    POL_SetupWindow_message "$(eval_gettext 'Please download the darkmod updater zip file from \n$GAME_URL')" "$TITLE"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the darkmod updater zip file to run.\nIt must have the name tdm_update_win.zip')" "$TITLE"
    mkdir -p "$WINEPREFIX/drive_c/games/thedarkmod"
    #Unpack the zipfile
        POL_System_ExtractSingleFile "$APP_ANSWER" "tdm_update.exe" "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
        #Create the shortcuts
        POL_Shortcut "tdm_update.exe" "The Dark Mod Updater"
        fncRunUpdater
        fncFilePresenceCheck        
fi
 
if [ "$INSTALLMETHOD" = "Local Standalone zip" ]
then
        POL_SetupWindow_message "$(eval_gettext 'Please download first The Dark Mod standalone release zip-file:\n\nTHE DARK MOD Version 2.0 - Standalone Release\n\nFrom sites like: \n$GAME_URL\nhttp://www.moddb.com\nhttp://www.google.com')" "$TITLE"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the darkmod standalone release zip file to run.')" "$TITLE"
    mkdir -p "$WINEPREFIX/drive_c/games/"
    #Unpack the zipfile
    cd "$WINEPREFIX/drive_c/games/"
        POL_System_unzip "$APP_ANSWER"
        #rename folder
        mv "$WINEPREFIX/drive_c/games/THE DARK MOD Version 2.0 - Standalone Release/" "$WINEPREFIX/drive_c/games/thedarkmod"
        #Set permissions
        chmod -R ug+rw "$WINEPREFIX/drive_c/games/thedarkmod"
        #set shortcut
        POL_Shortcut "TheDarkMod.exe" "The Dark Mod" "" "" "Game;"
        POL_Shortcut "tdm_update.exe" "The Dark Mod Updater"
        POL_SetupWindow_menu "$(eval_gettext 'The 2.0 updater doesnt run on $WORKING_WINE_VERSION.\nWould you like that I download a newer version of the the updater\nand then update the files?')" "Run Updater" "Yes|No" "|"
        if [ "$APP_ANSWER" = "Yes" ]
        then
                POL_SetupWindow_message "$(eval_gettext 'Going Online to update the updater and run it.')" "$TITLE"
                cd "$WINEPREFIX/drive_c/games/thedarkmod"
                #Download tdm updater
                POL_Download "$TDMWINUPDATERDOWNLOADLOCATION" #"$TDMWINUPDATERHASH"
                #remove old updater
                rm "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
                rm "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.log"
                #Unpack the zipfile
                POL_System_ExtractSingleFile "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update_win.zip" "tdm_update.exe" "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
            rm "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update_win.zip"
                fncRunUpdater
        fi       
fi
 
#Setting wine stuff
Set_OS "win7"
 
#send end message  
POL_SetupWindow_message "$(eval_gettext 'This is the end of the $TITLE installation script. \n\nFor more info, visit $GAME_URL')" "end"
POL_SetupWindow_Close
exit 0

Réponses

Jeudi 19 Décembre 2019 à 12:21
I'm stuck because POL_Install_vcrun2015 (not required years ago) is break.
Jeudi 19 Décembre 2019 à 12:56
Ta, would you lile me to test this on my macpro?
Vendredi 20 Décembre 2019 à 4:00
Not yet, I'm trying to find help about vcrun2015.
Samedi 21 Mars 2020 à 22:44
vcrun2015 is fixed.
Dadu042 Jeudi 19 Décembre 2019 à 11:57
Dadu042
Modérateur

Warning

Cette mise à jour n'a pas été approuvée par l'équipe.
Utilisez-la à vos risques et périls

Differences

@@ -1,139 +1,159 @@
 #!/bin/bash
 # Date : 2015-05-28
-# Last revision : 2015-06-07
-# Wine version used : 1.7.16
-# Distribution used to test : Mac OS 10.9.5 
+# Last revision : see changelog
+# Wine version used : 3.0.3
+# Distribution used to test : Kubuntu 18.04 amd64
 # Author : Freek 'Freyk' Borgerink
 # Licence : GPL
- 
+#
+# CHANGELOG
+# [Freek 'Freyk' Borgerink] (2015-05-28)
+#   First script.
+# [Dadu042] (2019-12-19 11:55)
+#   Wine 1.7.16 -> 3.0.3
+#   Force architecture to x86
+#   Add POL_RequiredVersion "4.2.12"
+#   Add shortcut category.
+
+# To do ?:
+#   + vcrun2015
+
+# KNOWN ISSUES:
+#  - Wine x86 3.0.3, 4.0.3 (+ game v2.07): VC++ runtime installation fail (:err:module:import_dll Library mfc140.dll (which is needed by L"C:\\games\\thedarkmod\\TheDarkMod.exe") not found). Fix? : POL_Call POL_Install_vcrun2015
+
+
 [ "$PLAYONLINUX" = "" ] && exit 0
 source "$PLAYONLINUX/lib/sources"
-
  
+  
 TITLE="The Dark Mod"
 PREFIX="TheDarkMod"
 EDITOR="Broken Glass Studios"
 GAME_URL="http://www.thedarkmod.com"
 AUTHOR="Freek 'Freyk' Borgerink"
-WORKING_WINE_VERSION="1.7.16"
-
+WORKING_WINE_VERSION="3.0.3"
+ 
 #md5hash of tdm_update_win.zip from the thedarkmod.com site
 TDMWINUPDATERDOWNLOADLOCATION="http://www.fidcal.com/darkuser/tdm_update_win.zip"
 #$TDMWINUPDATERHASH="ff1b6d10c65970422206133e923cf36d"
-
-
+ 
+ 
 ################################
-
+ 
 #function to run the updater
 function fncRunUpdater {
-	POL_SetupWindow_message "$(eval_gettext 'Going to run the updater. In the updater click only on continue or ok.\nIf the updater fails, close all the windows and run the updater again with the shortcut.')" "$TITLE"
-	cd "$WINEPREFIX/drive_c/games/thedarkmod"
- 	POL_SetupWindow_wait_next_signal "The Dark Mod Updater in progress." "$TITLE"
-	#POL_Wine_WaitBefore "$TITLE"
-	POL_Wine "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
- 	#POL_SetupWindow_detect_exit
- 	POL_Wine_WaitExit "$TITLE"
+        POL_SetupWindow_message "$(eval_gettext 'Going to run the updater. In the updater click only on Continue or Ok.\n\nIf the updater fails, close all the windows and run the updater again from the shortcut.')" "$TITLE"
+        cd "$WINEPREFIX/drive_c/games/thedarkmod"
+         POL_SetupWindow_wait_next_signal "The Dark Mod Updater in progress." "$TITLE"
+        #POL_Wine_WaitBefore "$TITLE"
+        POL_Wine "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
+         #POL_SetupWindow_detect_exit
+         POL_Wine_WaitExit "$TITLE"
 }
-
+ 
 #function to check if the dark mod executable is present
 function fncFilePresenceCheck {
-	FILE="$WINEPREFIX/drive_c/games/thedarkmod/TheDarkMod.exe"
-	#POL_SetupWindow_message "$(eval_gettext 'Going to check the file presence of $FILE ')" "$TITLE"
-	if [ -f $FILE ]; then
-		#POL_SetupWindow_message "$(eval_gettext 'The Dark Mod Executable is present')" "$TITLE"
-		POL_Shortcut "TheDarkMod.exe" "The Dark Mod"
-	else
-		POL_SetupWindow_message "$(eval_gettext 'The Dark Mod Executable is not present on your system\nPlease rerun the updater using the shortcut\nand create the shortcut mannualy')" "$TITLE"
-	fi
+        FILE="$WINEPREFIX/drive_c/games/thedarkmod/TheDarkMod.exe"
+        #POL_SetupWindow_message "$(eval_gettext 'Going to check the file presence of $FILE ')" "$TITLE"
+        if [ -f $FILE ]; then
+                #POL_SetupWindow_message "$(eval_gettext 'The Dark Mod Executable is present')" "$TITLE"
+                POL_Shortcut "TheDarkMod.exe" "The Dark Mod" "" "" "Game;"
+        else
+                POL_SetupWindow_message "$(eval_gettext 'The Dark Mod Executable is not present on your system\nPlease rerun the updater using the shortcut\nand create the shortcut mannualy')" "$TITLE"
+        fi
 }
-
+ 
 #Starting the script
 POL_SetupWindow_Init
- 
+  
 #Starting debugging API
 POL_Debug_Init
- 
+  
 POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
 
+POL_RequiredVersion "4.2.12" || POL_Debug_Fatal "$APPLICATION_TITLE $VERSION is required to install $TITLE"
+
 #Select the download method.
 #cant use POL_SetupWindow_InstallMethod, because there are more installation methods
 POL_SetupWindow_menu "$(eval_gettext 'How would you like to install The Dark Mod?')" "Install Method" "Online|Local updater zip|Local Standonlone zip" "|"
 INSTALLMETHOD="$APP_ANSWER"
 
+#create prefix folder
+POL_Wine_SelectPrefix "$PREFIX"
+
+# Determine Architecture
+# POL_System_SetArch "amd64"
+POL_System_SetArch "x86"
+
+POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
+
+POL_Call POL_Install_vcrun2015
+
 if [ "$INSTALLMETHOD" = "Online" ]
 then
-	#create prefix folder
-	POL_Wine_SelectPrefix "$PREFIX"
-	POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
-	mkdir -p "$WINEPREFIX/drive_c/games/thedarkmod"
+        mkdir -p "$WINEPREFIX/drive_c/games/thedarkmod"
     cd "$WINEPREFIX/drive_c/games/thedarkmod"
-	#Download tdm updater
-	POL_Download "$TDMWINUPDATERDOWNLOADLOCATION" #"$TDMWINUPDATERHASH"
-	#Unpack the zipfile
-	POL_System_ExtractSingleFile "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update_win.zip" "tdm_update.exe" "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
+        #Download tdm updater
+        POL_Download "$TDMWINUPDATERDOWNLOADLOCATION" #"$TDMWINUPDATERHASH"
+        #Unpack the zipfile
+        POL_System_ExtractSingleFile "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update_win.zip" "tdm_update.exe" "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
     rm "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update_win.zip"
     #Create shortcut for updater
-	POL_Shortcut "tdm_update.exe" "The Dark Mod Updater"
-	fncRunUpdater
-	fncFilePresenceCheck 
+        POL_Shortcut "tdm_update.exe" "The Dark Mod Updater"
+        fncRunUpdater
+        fncFilePresenceCheck 
 fi
-
+ 
 if [ "$INSTALLMETHOD" = "Local updater zip" ]
 then
-	#create prefix folder
+        #create prefix folder
     POL_SetupWindow_message "$(eval_gettext 'Please download the darkmod updater zip file from \n$GAME_URL')" "$TITLE"
-	POL_SetupWindow_browse "$(eval_gettext 'Please select the darkmod updater zip file to run.\nIt must have the name tdm_update_win.zip')" "$TITLE"
-	# Setting prefix
-	POL_Wine_SelectPrefix "$PREFIX"
-	POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
+        POL_SetupWindow_browse "$(eval_gettext 'Please select the darkmod updater zip file to run.\nIt must have the name tdm_update_win.zip')" "$TITLE"
     mkdir -p "$WINEPREFIX/drive_c/games/thedarkmod"
     #Unpack the zipfile
-	POL_System_ExtractSingleFile "$APP_ANSWER" "tdm_update.exe" "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
-	#Create the shortcuts
-	POL_Shortcut "tdm_update.exe" "The Dark Mod Updater"
-	fncRunUpdater
-	fncFilePresenceCheck	
+        POL_System_ExtractSingleFile "$APP_ANSWER" "tdm_update.exe" "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
+        #Create the shortcuts
+        POL_Shortcut "tdm_update.exe" "The Dark Mod Updater"
+        fncRunUpdater
+        fncFilePresenceCheck        
 fi
-
-if [ "$INSTALLMETHOD" = "Local Standonlone zip" ]
+ 
+if [ "$INSTALLMETHOD" = "Local Standalone zip" ]
 then
-	POL_SetupWindow_message "$(eval_gettext 'Please download first The Dark Mod standalone release zip-file:\n\nTHE DARK MOD Version 2.0 - Standalone Release\n\nFrom sites like: \n$GAME_URL\nhttp://www.moddb.com\nhttp://www.google.com')" "$TITLE"
-	POL_SetupWindow_browse "$(eval_gettext 'Please select the darkmod standalone release zip file to run.')" "$TITLE"
-	#create prefix folder
-	POL_Wine_SelectPrefix "$PREFIX"
-	POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
+        POL_SetupWindow_message "$(eval_gettext 'Please download first The Dark Mod standalone release zip-file:\n\nTHE DARK MOD Version 2.0 - Standalone Release\n\nFrom sites like: \n$GAME_URL\nhttp://www.moddb.com\nhttp://www.google.com')" "$TITLE"
+        POL_SetupWindow_browse "$(eval_gettext 'Please select the darkmod standalone release zip file to run.')" "$TITLE"
     mkdir -p "$WINEPREFIX/drive_c/games/"
     #Unpack the zipfile
     cd "$WINEPREFIX/drive_c/games/"
-	POL_System_unzip "$APP_ANSWER"
-	#rename folder
-	mv "$WINEPREFIX/drive_c/games/THE DARK MOD Version 2.0 - Standalone Release/" "$WINEPREFIX/drive_c/games/thedarkmod"
-	#Set permissions
-	chmod -R ug+rw "$WINEPREFIX/drive_c/games/thedarkmod"
-	#set shortcut
-	POL_Shortcut "TheDarkMod.exe" "The Dark Mod"
-	POL_Shortcut "tdm_update.exe" "The Dark Mod Updater"
-	POL_SetupWindow_menu "$(eval_gettext 'The 2.0 updater doesnt run on $WORKING_WINE_VERSION.\nWould you like that I download a newer version of the the updater\nand then update the files?')" "Run Updater" "Yes|No" "|"
-	if [ "$APP_ANSWER" = "Yes" ]
-	then
-		POL_SetupWindow_message "$(eval_gettext 'Going Online to update the updater and run it.')" "$TITLE" 
-		cd "$WINEPREFIX/drive_c/games/thedarkmod"
-		#Download tdm updater
-		POL_Download "$TDMWINUPDATERDOWNLOADLOCATION" #"$TDMWINUPDATERHASH"
-		#remove old updater
-		rm "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
-		rm "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.log"
-		#Unpack the zipfile
-		POL_System_ExtractSingleFile "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update_win.zip" "tdm_update.exe" "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
-    	rm "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update_win.zip"
-		fncRunUpdater
-	fi	
+        POL_System_unzip "$APP_ANSWER"
+        #rename folder
+        mv "$WINEPREFIX/drive_c/games/THE DARK MOD Version 2.0 - Standalone Release/" "$WINEPREFIX/drive_c/games/thedarkmod"
+        #Set permissions
+        chmod -R ug+rw "$WINEPREFIX/drive_c/games/thedarkmod"
+        #set shortcut
+        POL_Shortcut "TheDarkMod.exe" "The Dark Mod" "" "" "Game;"
+        POL_Shortcut "tdm_update.exe" "The Dark Mod Updater"
+        POL_SetupWindow_menu "$(eval_gettext 'The 2.0 updater doesnt run on $WORKING_WINE_VERSION.\nWould you like that I download a newer version of the the updater\nand then update the files?')" "Run Updater" "Yes|No" "|"
+        if [ "$APP_ANSWER" = "Yes" ]
+        then
+                POL_SetupWindow_message "$(eval_gettext 'Going Online to update the updater and run it.')" "$TITLE"
+                cd "$WINEPREFIX/drive_c/games/thedarkmod"
+                #Download tdm updater
+                POL_Download "$TDMWINUPDATERDOWNLOADLOCATION" #"$TDMWINUPDATERHASH"
+                #remove old updater
+                rm "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
+                rm "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.log"
+                #Unpack the zipfile
+                POL_System_ExtractSingleFile "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update_win.zip" "tdm_update.exe" "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
+            rm "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update_win.zip"
+                fncRunUpdater
+        fi       
 fi
-
+ 
 #Setting wine stuff
 Set_OS "win7"
-
+ 
 #send end message  
-POL_SetupWindow_message "$(eval_gettext 'This is the end of the $TITLE installation script. \n\nFor more info, visit $GAME_URL')" "end" 
+POL_SetupWindow_message "$(eval_gettext 'This is the end of the $TITLE installation script. \n\nFor more info, visit $GAME_URL')" "end"
 POL_SetupWindow_Close
 exit 0

Nouveau code source

#!/bin/bash
# Date : 2015-05-28
# Last revision : see changelog
# Wine version used : 3.0.3
# Distribution used to test : Kubuntu 18.04 amd64
# Author : Freek 'Freyk' Borgerink
# Licence : GPL
#
# CHANGELOG
# [Freek 'Freyk' Borgerink] (2015-05-28)
#   First script.
# [Dadu042] (2019-12-19 11:55)
#   Wine 1.7.16 -> 3.0.3
#   Force architecture to x86
#   Add POL_RequiredVersion "4.2.12"
#   Add shortcut category.

# To do ?:
#   + vcrun2015

# KNOWN ISSUES:
#  - Wine x86 3.0.3, 4.0.3 (+ game v2.07): VC++ runtime installation fail (:err:module:import_dll Library mfc140.dll (which is needed by L"C:\\games\\thedarkmod\\TheDarkMod.exe") not found). Fix? : POL_Call POL_Install_vcrun2015


[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
  
TITLE="The Dark Mod"
PREFIX="TheDarkMod"
EDITOR="Broken Glass Studios"
GAME_URL="http://www.thedarkmod.com"
AUTHOR="Freek 'Freyk' Borgerink"
WORKING_WINE_VERSION="3.0.3"
 
#md5hash of tdm_update_win.zip from the thedarkmod.com site
TDMWINUPDATERDOWNLOADLOCATION="http://www.fidcal.com/darkuser/tdm_update_win.zip"
#$TDMWINUPDATERHASH="ff1b6d10c65970422206133e923cf36d"
 
 
################################
 
#function to run the updater
function fncRunUpdater {
        POL_SetupWindow_message "$(eval_gettext 'Going to run the updater. In the updater click only on Continue or Ok.\n\nIf the updater fails, close all the windows and run the updater again from the shortcut.')" "$TITLE"
        cd "$WINEPREFIX/drive_c/games/thedarkmod"
         POL_SetupWindow_wait_next_signal "The Dark Mod Updater in progress." "$TITLE"
        #POL_Wine_WaitBefore "$TITLE"
        POL_Wine "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
         #POL_SetupWindow_detect_exit
         POL_Wine_WaitExit "$TITLE"
}
 
#function to check if the dark mod executable is present
function fncFilePresenceCheck {
        FILE="$WINEPREFIX/drive_c/games/thedarkmod/TheDarkMod.exe"
        #POL_SetupWindow_message "$(eval_gettext 'Going to check the file presence of $FILE ')" "$TITLE"
        if [ -f $FILE ]; then
                #POL_SetupWindow_message "$(eval_gettext 'The Dark Mod Executable is present')" "$TITLE"
                POL_Shortcut "TheDarkMod.exe" "The Dark Mod" "" "" "Game;"
        else
                POL_SetupWindow_message "$(eval_gettext 'The Dark Mod Executable is not present on your system\nPlease rerun the updater using the shortcut\nand create the shortcut mannualy')" "$TITLE"
        fi
}
 
#Starting the script
POL_SetupWindow_Init
  
#Starting debugging API
POL_Debug_Init
  
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"

POL_RequiredVersion "4.2.12" || POL_Debug_Fatal "$APPLICATION_TITLE $VERSION is required to install $TITLE"

#Select the download method.
#cant use POL_SetupWindow_InstallMethod, because there are more installation methods
POL_SetupWindow_menu "$(eval_gettext 'How would you like to install The Dark Mod?')" "Install Method" "Online|Local updater zip|Local Standonlone zip" "|"
INSTALLMETHOD="$APP_ANSWER"

#create prefix folder
POL_Wine_SelectPrefix "$PREFIX"

# Determine Architecture
# POL_System_SetArch "amd64"
POL_System_SetArch "x86"

POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"

POL_Call POL_Install_vcrun2015

if [ "$INSTALLMETHOD" = "Online" ]
then
        mkdir -p "$WINEPREFIX/drive_c/games/thedarkmod"
    cd "$WINEPREFIX/drive_c/games/thedarkmod"
        #Download tdm updater
        POL_Download "$TDMWINUPDATERDOWNLOADLOCATION" #"$TDMWINUPDATERHASH"
        #Unpack the zipfile
        POL_System_ExtractSingleFile "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update_win.zip" "tdm_update.exe" "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
    rm "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update_win.zip"
    #Create shortcut for updater
        POL_Shortcut "tdm_update.exe" "The Dark Mod Updater"
        fncRunUpdater
        fncFilePresenceCheck 
fi
 
if [ "$INSTALLMETHOD" = "Local updater zip" ]
then
        #create prefix folder
    POL_SetupWindow_message "$(eval_gettext 'Please download the darkmod updater zip file from \n$GAME_URL')" "$TITLE"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the darkmod updater zip file to run.\nIt must have the name tdm_update_win.zip')" "$TITLE"
    mkdir -p "$WINEPREFIX/drive_c/games/thedarkmod"
    #Unpack the zipfile
        POL_System_ExtractSingleFile "$APP_ANSWER" "tdm_update.exe" "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
        #Create the shortcuts
        POL_Shortcut "tdm_update.exe" "The Dark Mod Updater"
        fncRunUpdater
        fncFilePresenceCheck        
fi
 
if [ "$INSTALLMETHOD" = "Local Standalone zip" ]
then
        POL_SetupWindow_message "$(eval_gettext 'Please download first The Dark Mod standalone release zip-file:\n\nTHE DARK MOD Version 2.0 - Standalone Release\n\nFrom sites like: \n$GAME_URL\nhttp://www.moddb.com\nhttp://www.google.com')" "$TITLE"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the darkmod standalone release zip file to run.')" "$TITLE"
    mkdir -p "$WINEPREFIX/drive_c/games/"
    #Unpack the zipfile
    cd "$WINEPREFIX/drive_c/games/"
        POL_System_unzip "$APP_ANSWER"
        #rename folder
        mv "$WINEPREFIX/drive_c/games/THE DARK MOD Version 2.0 - Standalone Release/" "$WINEPREFIX/drive_c/games/thedarkmod"
        #Set permissions
        chmod -R ug+rw "$WINEPREFIX/drive_c/games/thedarkmod"
        #set shortcut
        POL_Shortcut "TheDarkMod.exe" "The Dark Mod" "" "" "Game;"
        POL_Shortcut "tdm_update.exe" "The Dark Mod Updater"
        POL_SetupWindow_menu "$(eval_gettext 'The 2.0 updater doesnt run on $WORKING_WINE_VERSION.\nWould you like that I download a newer version of the the updater\nand then update the files?')" "Run Updater" "Yes|No" "|"
        if [ "$APP_ANSWER" = "Yes" ]
        then
                POL_SetupWindow_message "$(eval_gettext 'Going Online to update the updater and run it.')" "$TITLE"
                cd "$WINEPREFIX/drive_c/games/thedarkmod"
                #Download tdm updater
                POL_Download "$TDMWINUPDATERDOWNLOADLOCATION" #"$TDMWINUPDATERHASH"
                #remove old updater
                rm "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
                rm "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.log"
                #Unpack the zipfile
                POL_System_ExtractSingleFile "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update_win.zip" "tdm_update.exe" "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
            rm "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update_win.zip"
                fncRunUpdater
        fi       
fi
 
#Setting wine stuff
Set_OS "win7"
 
#send end message  
POL_SetupWindow_message "$(eval_gettext 'This is the end of the $TITLE installation script. \n\nFor more info, visit $GAME_URL')" "end"
POL_SetupWindow_Close
exit 0

Réponses

b1k3rdude Dimanche 16 Aoüt 2015 à 23:04
b1k3rdude

Messages

Installed PoM on OSX 10.10.1, clicked on every default install option it prompted with for PoM and The Darkmod game. The Darkmod PC installed ran flawlessly as did the game .EXE.

 

 

 

Réponses

Lundi 17 Aoüt 2015 à 9:49
@polteam, b1k3rdude uses version of the installation script of 7th june. Please aprove this one, because the approved version of 30 may doesnt work .
Lundi 17 Aoüt 2015 à 12:49
Done
freyk Dimanche 7 Juin 2015 à 14:12
freyk

Warning

Cette mise à jour n'a pas été approuvée par l'équipe.
Utilisez-la à vos risques et périls

Messages

Added shortcuts, filechecks and more information

Differences

@@ -1,6 +1,6 @@
 #!/bin/bash
 # Date : 2015-05-28
-# Last revision : 2015-05-28
+# Last revision : 2015-06-07
 # Wine version used : 1.7.16
 # Distribution used to test : Mac OS 10.9.5 
 # Author : Freek 'Freyk' Borgerink
@@ -18,99 +18,122 @@
 WORKING_WINE_VERSION="1.7.16"
 
 #md5hash of tdm_update_win.zip from the thedarkmod.com site
-TDMWINUPDATEHASH="ff1b6d10c65970422206133e923cf36d"
+TDMWINUPDATERDOWNLOADLOCATION="http://www.fidcal.com/darkuser/tdm_update_win.zip"
+#$TDMWINUPDATERHASH="ff1b6d10c65970422206133e923cf36d"
+
 
 ################################
-#clear script vars
-RUNUPDATER="0"
 
- # Starting the script
+#function to run the updater
+function fncRunUpdater {
+	POL_SetupWindow_message "$(eval_gettext 'Going to run the updater. In the updater click only on continue or ok.\nIf the updater fails, close all the windows and run the updater again with the shortcut.')" "$TITLE"
+	cd "$WINEPREFIX/drive_c/games/thedarkmod"
+ 	POL_SetupWindow_wait_next_signal "The Dark Mod Updater in progress." "$TITLE"
+	#POL_Wine_WaitBefore "$TITLE"
+	POL_Wine "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
+ 	#POL_SetupWindow_detect_exit
+ 	POL_Wine_WaitExit "$TITLE"
+}
+
+#function to check if the dark mod executable is present
+function fncFilePresenceCheck {
+	FILE="$WINEPREFIX/drive_c/games/thedarkmod/TheDarkMod.exe"
+	#POL_SetupWindow_message "$(eval_gettext 'Going to check the file presence of $FILE ')" "$TITLE"
+	if [ -f $FILE ]; then
+		#POL_SetupWindow_message "$(eval_gettext 'The Dark Mod Executable is present')" "$TITLE"
+		POL_Shortcut "TheDarkMod.exe" "The Dark Mod"
+	else
+		POL_SetupWindow_message "$(eval_gettext 'The Dark Mod Executable is not present on your system\nPlease rerun the updater using the shortcut\nand create the shortcut mannualy')" "$TITLE"
+	fi
+}
+
+#Starting the script
 POL_SetupWindow_Init
  
-# Starting debugging API
+#Starting debugging API
 POL_Debug_Init
  
 POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
 
-#Select the download method
-POL_SetupWindow_menu "How would you like to install The Dark Mod?" "Install Method" "Online|Local updater zip|Local Standonlone zip" "|"
+#Select the download method.
+#cant use POL_SetupWindow_InstallMethod, because there are more installation methods
+POL_SetupWindow_menu "$(eval_gettext 'How would you like to install The Dark Mod?')" "Install Method" "Online|Local updater zip|Local Standonlone zip" "|"
 INSTALLMETHOD="$APP_ANSWER"
 
-
 if [ "$INSTALLMETHOD" = "Online" ]
 then
 	#create prefix folder
 	POL_Wine_SelectPrefix "$PREFIX"
-	POL_Wine_PrefixCreate #"$WORKING_WINE_VERSION"
-	Set_OS "win7"
+	POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
 	mkdir -p "$WINEPREFIX/drive_c/games/thedarkmod"
     cd "$WINEPREFIX/drive_c/games/thedarkmod"
 	#Download tdm updater
-	POL_Download "http://www.fidcal.com/darkuser/tdm_update_win.zip" "$TDMWINUPDATEHASH"
+	POL_Download "$TDMWINUPDATERDOWNLOADLOCATION" #"$TDMWINUPDATERHASH"
 	#Unpack the zipfile
 	POL_System_ExtractSingleFile "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update_win.zip" "tdm_update.exe" "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
     rm "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update_win.zip"
     #Create shortcut for updater
 	POL_Shortcut "tdm_update.exe" "The Dark Mod Updater"
-	RUNUPDATER="1" 
+	fncRunUpdater
+	fncFilePresenceCheck 
 fi
 
 if [ "$INSTALLMETHOD" = "Local updater zip" ]
 then
 	#create prefix folder
-    POL_SetupWindow_message "Please download the darkmod updater executable from www.thedarkmod.com" "$TITLE installation"
-	POL_SetupWindow_browse "Please select the darkmod updater executable to run." "$TITLE installation"
+    POL_SetupWindow_message "$(eval_gettext 'Please download the darkmod updater zip file from \n$GAME_URL')" "$TITLE"
+	POL_SetupWindow_browse "$(eval_gettext 'Please select the darkmod updater zip file to run.\nIt must have the name tdm_update_win.zip')" "$TITLE"
 	# Setting prefix
 	POL_Wine_SelectPrefix "$PREFIX"
-	POL_Wine_PrefixCreate #"$WORKING_WINE_VERSION"
+	POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
     mkdir -p "$WINEPREFIX/drive_c/games/thedarkmod"
     #Unpack the zipfile
 	POL_System_ExtractSingleFile "$APP_ANSWER" "tdm_update.exe" "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
-	#Create the shortcut for the updater
+	#Create the shortcuts
 	POL_Shortcut "tdm_update.exe" "The Dark Mod Updater"
-	POL_SetupWindow_message "running updater" "Going to run the updater to download the files" 
-	RUNUPDATER="1"	
+	fncRunUpdater
+	fncFilePresenceCheck	
 fi
 
 if [ "$INSTALLMETHOD" = "Local Standonlone zip" ]
 then
+	POL_SetupWindow_message "$(eval_gettext 'Please download first The Dark Mod standalone release zip-file:\n\nTHE DARK MOD Version 2.0 - Standalone Release\n\nFrom sites like: \n$GAME_URL\nhttp://www.moddb.com\nhttp://www.google.com')" "$TITLE"
+	POL_SetupWindow_browse "$(eval_gettext 'Please select the darkmod standalone release zip file to run.')" "$TITLE"
 	#create prefix folder
-    POL_SetupWindow_message "Please download the darkmod zip from www.thedarkmod.com" "$TITLE installation"
-	POL_SetupWindow_browse "Please select the darkmod standaonline zip file to run." "$TITLE installation"
-	# Setting prefix
 	POL_Wine_SelectPrefix "$PREFIX"
-	POL_Wine_PrefixCreate #"$WORKING_WINE_VERSION"
-    mkdir -p "$WINEPREFIX/drive_c/games/thedarkmod"
-    
+	POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
+    mkdir -p "$WINEPREFIX/drive_c/games/"
     #Unpack the zipfile
-    cd "$WINEPREFIX/drive_c/games/thedarkmod/"
+    cd "$WINEPREFIX/drive_c/games/"
 	POL_System_unzip "$APP_ANSWER"
-	
-	#Create the shortcuts
+	#rename folder
+	mv "$WINEPREFIX/drive_c/games/THE DARK MOD Version 2.0 - Standalone Release/" "$WINEPREFIX/drive_c/games/thedarkmod"
+	#Set permissions
+	chmod -R ug+rw "$WINEPREFIX/drive_c/games/thedarkmod"
+	#set shortcut
+	POL_Shortcut "TheDarkMod.exe" "The Dark Mod"
 	POL_Shortcut "tdm_update.exe" "The Dark Mod Updater"
-	POL_Shortcut "tdm.exe" "The Dark Mod" 
-	POL_SetupWindow_menu "Run the updater to update the files?" "Run Updater" "Yes|No" "|"
+	POL_SetupWindow_menu "$(eval_gettext 'The 2.0 updater doesnt run on $WORKING_WINE_VERSION.\nWould you like that I download a newer version of the the updater\nand then update the files?')" "Run Updater" "Yes|No" "|"
 	if [ "$APP_ANSWER" = "Yes" ]
 	then
-		RUNUPDATER="1"
-	else
-		RUNUPDATER="0"	
-	fi
+		POL_SetupWindow_message "$(eval_gettext 'Going Online to update the updater and run it.')" "$TITLE" 
+		cd "$WINEPREFIX/drive_c/games/thedarkmod"
+		#Download tdm updater
+		POL_Download "$TDMWINUPDATERDOWNLOADLOCATION" #"$TDMWINUPDATERHASH"
+		#remove old updater
+		rm "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
+		rm "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.log"
+		#Unpack the zipfile
+		POL_System_ExtractSingleFile "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update_win.zip" "tdm_update.exe" "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
+    	rm "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update_win.zip"
+		fncRunUpdater
+	fi	
 fi
 
 #Setting wine stuff
 Set_OS "win7"
- 
-if [ "$RUNUPDATER" = "1" ] 
-then
-	POL_SetupWindow_message "Going to run the updater. In the updater click only on 'continue' or 'ok'. If the updater fails, close all the windows and run the updater again with the shortcut" "running updater"
- 	#Run the updater
-	POL_SetupWindow_wait "The Dark Mod Updater in progress." "The Dark Mod Updater"
-	POL_Wine start /unix "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
-	POL_Wine_WaitExit "The Dark Mod Updater"
-fi
- 
-POL_SetupWindow_message "end" "end"
- 
+
+#send end message  
+POL_SetupWindow_message "$(eval_gettext 'This is the end of the $TITLE installation script. \n\nFor more info, visit $GAME_URL')" "end" 
 POL_SetupWindow_Close
 exit 0

Nouveau code source

#!/bin/bash
# Date : 2015-05-28
# Last revision : 2015-06-07
# Wine version used : 1.7.16
# Distribution used to test : Mac OS 10.9.5 
# Author : Freek 'Freyk' Borgerink
# Licence : GPL
 
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

 
TITLE="The Dark Mod"
PREFIX="TheDarkMod"
EDITOR="Broken Glass Studios"
GAME_URL="http://www.thedarkmod.com"
AUTHOR="Freek 'Freyk' Borgerink"
WORKING_WINE_VERSION="1.7.16"

#md5hash of tdm_update_win.zip from the thedarkmod.com site
TDMWINUPDATERDOWNLOADLOCATION="http://www.fidcal.com/darkuser/tdm_update_win.zip"
#$TDMWINUPDATERHASH="ff1b6d10c65970422206133e923cf36d"


################################

#function to run the updater
function fncRunUpdater {
        POL_SetupWindow_message "$(eval_gettext 'Going to run the updater. In the updater click only on continue or ok.\nIf the updater fails, close all the windows and run the updater again with the shortcut.')" "$TITLE"
        cd "$WINEPREFIX/drive_c/games/thedarkmod"
         POL_SetupWindow_wait_next_signal "The Dark Mod Updater in progress." "$TITLE"
        #POL_Wine_WaitBefore "$TITLE"
        POL_Wine "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
         #POL_SetupWindow_detect_exit
         POL_Wine_WaitExit "$TITLE"
}

#function to check if the dark mod executable is present
function fncFilePresenceCheck {
        FILE="$WINEPREFIX/drive_c/games/thedarkmod/TheDarkMod.exe"
        #POL_SetupWindow_message "$(eval_gettext 'Going to check the file presence of $FILE ')" "$TITLE"
        if [ -f $FILE ]; then
                #POL_SetupWindow_message "$(eval_gettext 'The Dark Mod Executable is present')" "$TITLE"
                POL_Shortcut "TheDarkMod.exe" "The Dark Mod"
        else
                POL_SetupWindow_message "$(eval_gettext 'The Dark Mod Executable is not present on your system\nPlease rerun the updater using the shortcut\nand create the shortcut mannualy')" "$TITLE"
        fi
}

#Starting the script
POL_SetupWindow_Init
 
#Starting debugging API
POL_Debug_Init
 
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"

#Select the download method.
#cant use POL_SetupWindow_InstallMethod, because there are more installation methods
POL_SetupWindow_menu "$(eval_gettext 'How would you like to install The Dark Mod?')" "Install Method" "Online|Local updater zip|Local Standonlone zip" "|"
INSTALLMETHOD="$APP_ANSWER"

if [ "$INSTALLMETHOD" = "Online" ]
then
        #create prefix folder
        POL_Wine_SelectPrefix "$PREFIX"
        POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
        mkdir -p "$WINEPREFIX/drive_c/games/thedarkmod"
    cd "$WINEPREFIX/drive_c/games/thedarkmod"
        #Download tdm updater
        POL_Download "$TDMWINUPDATERDOWNLOADLOCATION" #"$TDMWINUPDATERHASH"
        #Unpack the zipfile
        POL_System_ExtractSingleFile "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update_win.zip" "tdm_update.exe" "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
    rm "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update_win.zip"
    #Create shortcut for updater
        POL_Shortcut "tdm_update.exe" "The Dark Mod Updater"
        fncRunUpdater
        fncFilePresenceCheck 
fi

if [ "$INSTALLMETHOD" = "Local updater zip" ]
then
        #create prefix folder
    POL_SetupWindow_message "$(eval_gettext 'Please download the darkmod updater zip file from \n$GAME_URL')" "$TITLE"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the darkmod updater zip file to run.\nIt must have the name tdm_update_win.zip')" "$TITLE"
        # Setting prefix
        POL_Wine_SelectPrefix "$PREFIX"
        POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
    mkdir -p "$WINEPREFIX/drive_c/games/thedarkmod"
    #Unpack the zipfile
        POL_System_ExtractSingleFile "$APP_ANSWER" "tdm_update.exe" "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
        #Create the shortcuts
        POL_Shortcut "tdm_update.exe" "The Dark Mod Updater"
        fncRunUpdater
        fncFilePresenceCheck        
fi

if [ "$INSTALLMETHOD" = "Local Standonlone zip" ]
then
        POL_SetupWindow_message "$(eval_gettext 'Please download first The Dark Mod standalone release zip-file:\n\nTHE DARK MOD Version 2.0 - Standalone Release\n\nFrom sites like: \n$GAME_URL\nhttp://www.moddb.com\nhttp://www.google.com')" "$TITLE"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the darkmod standalone release zip file to run.')" "$TITLE"
        #create prefix folder
        POL_Wine_SelectPrefix "$PREFIX"
        POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
    mkdir -p "$WINEPREFIX/drive_c/games/"
    #Unpack the zipfile
    cd "$WINEPREFIX/drive_c/games/"
        POL_System_unzip "$APP_ANSWER"
        #rename folder
        mv "$WINEPREFIX/drive_c/games/THE DARK MOD Version 2.0 - Standalone Release/" "$WINEPREFIX/drive_c/games/thedarkmod"
        #Set permissions
        chmod -R ug+rw "$WINEPREFIX/drive_c/games/thedarkmod"
        #set shortcut
        POL_Shortcut "TheDarkMod.exe" "The Dark Mod"
        POL_Shortcut "tdm_update.exe" "The Dark Mod Updater"
        POL_SetupWindow_menu "$(eval_gettext 'The 2.0 updater doesnt run on $WORKING_WINE_VERSION.\nWould you like that I download a newer version of the the updater\nand then update the files?')" "Run Updater" "Yes|No" "|"
        if [ "$APP_ANSWER" = "Yes" ]
        then
                POL_SetupWindow_message "$(eval_gettext 'Going Online to update the updater and run it.')" "$TITLE" 
                cd "$WINEPREFIX/drive_c/games/thedarkmod"
                #Download tdm updater
                POL_Download "$TDMWINUPDATERDOWNLOADLOCATION" #"$TDMWINUPDATERHASH"
                #remove old updater
                rm "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
                rm "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.log"
                #Unpack the zipfile
                POL_System_ExtractSingleFile "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update_win.zip" "tdm_update.exe" "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
            rm "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update_win.zip"
                fncRunUpdater
        fi        
fi

#Setting wine stuff
Set_OS "win7"

#send end message  
POL_SetupWindow_message "$(eval_gettext 'This is the end of the $TITLE installation script. \n\nFor more info, visit $GAME_URL')" "end" 
POL_SetupWindow_Close
exit 0

Réponses

freyk Samedi 30 Mai 2015 à 17:09
freyk

Warning

Cette mise à jour n'a pas été approuvée par l'équipe.
Utilisez-la à vos risques et périls

Messages

Here is a newer version of the code.

Differences

@@ -0,0 +1,116 @@
+#!/bin/bash
+# Date : 2015-05-28
+# Last revision : 2015-05-28
+# Wine version used : 1.7.16
+# Distribution used to test : Mac OS 10.9.5 
+# Author : Freek 'Freyk' Borgerink
+# Licence : GPL
+ 
+[ "$PLAYONLINUX" = "" ] && exit 0
+source "$PLAYONLINUX/lib/sources"
+
+ 
+TITLE="The Dark Mod"
+PREFIX="TheDarkMod"
+EDITOR="Broken Glass Studios"
+GAME_URL="http://www.thedarkmod.com"
+AUTHOR="Freek 'Freyk' Borgerink"
+WORKING_WINE_VERSION="1.7.16"
+
+#md5hash of tdm_update_win.zip from the thedarkmod.com site
+TDMWINUPDATEHASH="ff1b6d10c65970422206133e923cf36d"
+
+################################
+#clear script vars
+RUNUPDATER="0"
+
+ # Starting the script
+POL_SetupWindow_Init
+ 
+# Starting debugging API
+POL_Debug_Init
+ 
+POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
+
+#Select the download method
+POL_SetupWindow_menu "How would you like to install The Dark Mod?" "Install Method" "Online|Local updater zip|Local Standonlone zip" "|"
+INSTALLMETHOD="$APP_ANSWER"
+
+
+if [ "$INSTALLMETHOD" = "Online" ]
+then
+	#create prefix folder
+	POL_Wine_SelectPrefix "$PREFIX"
+	POL_Wine_PrefixCreate #"$WORKING_WINE_VERSION"
+	Set_OS "win7"
+	mkdir -p "$WINEPREFIX/drive_c/games/thedarkmod"
+    cd "$WINEPREFIX/drive_c/games/thedarkmod"
+	#Download tdm updater
+	POL_Download "http://www.fidcal.com/darkuser/tdm_update_win.zip" "$TDMWINUPDATEHASH"
+	#Unpack the zipfile
+	POL_System_ExtractSingleFile "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update_win.zip" "tdm_update.exe" "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
+    rm "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update_win.zip"
+    #Create shortcut for updater
+	POL_Shortcut "tdm_update.exe" "The Dark Mod Updater"
+	RUNUPDATER="1" 
+fi
+
+if [ "$INSTALLMETHOD" = "Local updater zip" ]
+then
+	#create prefix folder
+    POL_SetupWindow_message "Please download the darkmod updater executable from www.thedarkmod.com" "$TITLE installation"
+	POL_SetupWindow_browse "Please select the darkmod updater executable to run." "$TITLE installation"
+	# Setting prefix
+	POL_Wine_SelectPrefix "$PREFIX"
+	POL_Wine_PrefixCreate #"$WORKING_WINE_VERSION"
+    mkdir -p "$WINEPREFIX/drive_c/games/thedarkmod"
+    #Unpack the zipfile
+	POL_System_ExtractSingleFile "$APP_ANSWER" "tdm_update.exe" "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
+	#Create the shortcut for the updater
+	POL_Shortcut "tdm_update.exe" "The Dark Mod Updater"
+	POL_SetupWindow_message "running updater" "Going to run the updater to download the files" 
+	RUNUPDATER="1"	
+fi
+
+if [ "$INSTALLMETHOD" = "Local Standonlone zip" ]
+then
+	#create prefix folder
+    POL_SetupWindow_message "Please download the darkmod zip from www.thedarkmod.com" "$TITLE installation"
+	POL_SetupWindow_browse "Please select the darkmod standaonline zip file to run." "$TITLE installation"
+	# Setting prefix
+	POL_Wine_SelectPrefix "$PREFIX"
+	POL_Wine_PrefixCreate #"$WORKING_WINE_VERSION"
+    mkdir -p "$WINEPREFIX/drive_c/games/thedarkmod"
+    
+    #Unpack the zipfile
+    cd "$WINEPREFIX/drive_c/games/thedarkmod/"
+	POL_System_unzip "$APP_ANSWER"
+	
+	#Create the shortcuts
+	POL_Shortcut "tdm_update.exe" "The Dark Mod Updater"
+	POL_Shortcut "tdm.exe" "The Dark Mod" 
+	POL_SetupWindow_menu "Run the updater to update the files?" "Run Updater" "Yes|No" "|"
+	if [ "$APP_ANSWER" = "Yes" ]
+	then
+		RUNUPDATER="1"
+	else
+		RUNUPDATER="0"	
+	fi
+fi
+
+#Setting wine stuff
+Set_OS "win7"
+ 
+if [ "$RUNUPDATER" = "1" ] 
+then
+	POL_SetupWindow_message "Going to run the updater. In the updater click only on 'continue' or 'ok'. If the updater fails, close all the windows and run the updater again with the shortcut" "running updater"
+ 	#Run the updater
+	POL_SetupWindow_wait "The Dark Mod Updater in progress." "The Dark Mod Updater"
+	POL_Wine start /unix "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
+	POL_Wine_WaitExit "The Dark Mod Updater"
+fi
+ 
+POL_SetupWindow_message "end" "end"
+ 
+POL_SetupWindow_Close
+exit 0

Nouveau code source

#!/bin/bash
# Date : 2015-05-28
# Last revision : 2015-05-28
# Wine version used : 1.7.16
# Distribution used to test : Mac OS 10.9.5 
# Author : Freek 'Freyk' Borgerink
# Licence : GPL
 
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

 
TITLE="The Dark Mod"
PREFIX="TheDarkMod"
EDITOR="Broken Glass Studios"
GAME_URL="http://www.thedarkmod.com"
AUTHOR="Freek 'Freyk' Borgerink"
WORKING_WINE_VERSION="1.7.16"

#md5hash of tdm_update_win.zip from the thedarkmod.com site
TDMWINUPDATEHASH="ff1b6d10c65970422206133e923cf36d"

################################
#clear script vars
RUNUPDATER="0"

 # Starting the script
POL_SetupWindow_Init
 
# Starting debugging API
POL_Debug_Init
 
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"

#Select the download method
POL_SetupWindow_menu "How would you like to install The Dark Mod?" "Install Method" "Online|Local updater zip|Local Standonlone zip" "|"
INSTALLMETHOD="$APP_ANSWER"


if [ "$INSTALLMETHOD" = "Online" ]
then
        #create prefix folder
        POL_Wine_SelectPrefix "$PREFIX"
        POL_Wine_PrefixCreate #"$WORKING_WINE_VERSION"
        Set_OS "win7"
        mkdir -p "$WINEPREFIX/drive_c/games/thedarkmod"
    cd "$WINEPREFIX/drive_c/games/thedarkmod"
        #Download tdm updater
        POL_Download "http://www.fidcal.com/darkuser/tdm_update_win.zip" "$TDMWINUPDATEHASH"
        #Unpack the zipfile
        POL_System_ExtractSingleFile "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update_win.zip" "tdm_update.exe" "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
    rm "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update_win.zip"
    #Create shortcut for updater
        POL_Shortcut "tdm_update.exe" "The Dark Mod Updater"
        RUNUPDATER="1" 
fi

if [ "$INSTALLMETHOD" = "Local updater zip" ]
then
        #create prefix folder
    POL_SetupWindow_message "Please download the darkmod updater executable from www.thedarkmod.com" "$TITLE installation"
        POL_SetupWindow_browse "Please select the darkmod updater executable to run." "$TITLE installation"
        # Setting prefix
        POL_Wine_SelectPrefix "$PREFIX"
        POL_Wine_PrefixCreate #"$WORKING_WINE_VERSION"
    mkdir -p "$WINEPREFIX/drive_c/games/thedarkmod"
    #Unpack the zipfile
        POL_System_ExtractSingleFile "$APP_ANSWER" "tdm_update.exe" "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
        #Create the shortcut for the updater
        POL_Shortcut "tdm_update.exe" "The Dark Mod Updater"
        POL_SetupWindow_message "running updater" "Going to run the updater to download the files" 
        RUNUPDATER="1"        
fi

if [ "$INSTALLMETHOD" = "Local Standonlone zip" ]
then
        #create prefix folder
    POL_SetupWindow_message "Please download the darkmod zip from www.thedarkmod.com" "$TITLE installation"
        POL_SetupWindow_browse "Please select the darkmod standaonline zip file to run." "$TITLE installation"
        # Setting prefix
        POL_Wine_SelectPrefix "$PREFIX"
        POL_Wine_PrefixCreate #"$WORKING_WINE_VERSION"
    mkdir -p "$WINEPREFIX/drive_c/games/thedarkmod"
    
    #Unpack the zipfile
    cd "$WINEPREFIX/drive_c/games/thedarkmod/"
        POL_System_unzip "$APP_ANSWER"
        
        #Create the shortcuts
        POL_Shortcut "tdm_update.exe" "The Dark Mod Updater"
        POL_Shortcut "tdm.exe" "The Dark Mod" 
        POL_SetupWindow_menu "Run the updater to update the files?" "Run Updater" "Yes|No" "|"
        if [ "$APP_ANSWER" = "Yes" ]
        then
                RUNUPDATER="1"
        else
                RUNUPDATER="0"        
        fi
fi

#Setting wine stuff
Set_OS "win7"
 
if [ "$RUNUPDATER" = "1" ] 
then
        POL_SetupWindow_message "Going to run the updater. In the updater click only on 'continue' or 'ok'. If the updater fails, close all the windows and run the updater again with the shortcut" "running updater"
         #Run the updater
        POL_SetupWindow_wait "The Dark Mod Updater in progress." "The Dark Mod Updater"
        POL_Wine start /unix "$WINEPREFIX/drive_c/games/thedarkmod/tdm_update.exe"
        POL_Wine_WaitExit "The Dark Mod Updater"
fi
 
POL_SetupWindow_message "end" "end"
 
POL_SetupWindow_Close
exit 0

Réponses

Samedi 30 Mai 2015 à 23:36
Thank you for working on this mister!
Mardi 2 Juin 2015 à 21:17
Can you take into account the comment here and submit another version of your script? https://www.playonlinux.com/en/topic-13160-script_The_Darkmod.html
Many thanks!
b1k3rdude Vendredi 29 Mai 2015 à 14:30
b1k3rdude

Messages

With the help of a fellow TDM member freyk, we have got this working well.

Réponses

lahtis Jeudi 11 Décembre 2014 à 2:07
lahtis

Messages

where is a source?

Réponses

Vendredi 29 Mai 2015 à 14:22
Hello Lahtis - http://www.thedarkmod.com/downloads/
Vendredi 29 Mai 2015 à 14:28
Ah sorry, did you mean the source code for the link above? if so how do I add it as clicking on the link does nothing.