You are here    Supported software    The Darkmod fr

The Darkmod

Informations

Creator Message
b1k3rdude

Warning

This installer is a beta script. It means that it might not work as expected

Informations

Platforms:
Downloads: 1848
Wine: 1.7.16

Feedbacks

Description

The Dark Mod is a FREE, first-person stealth game inspired by the original Thief series by Looking Glass Studios. In it you play a hooded figure slinking through the shadows of a gothic steampunk city, hunting priceless valuables while avoiding the swords and arrows of those hired to stop you.

The Dark Mod was originally released Oct. 17th, 2009. The standalone version, TDM 2.0, launched in Oct. 2013.

Source code

#!/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

Contributions

Filters:

Contribute
Member Message
b1k3rdude Sunday 16 August 2015 at 23:04
b1k3rdude

Message

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.

 

 

 

Replies

Monday 17 August 2015 at 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 .
Monday 17 August 2015 at 12:49 -
Done
freyk Sunday 7 June 2015 at 14:12
freyk

Information

This update has been approved by the team.

Message

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

New source code

#!/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

Replies

freyk Saturday 30 May 2015 at 17:09
freyk

Warning

This update has not been approved yet by the team.
Use it at your own risk

Message

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

New source code

#!/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

Replies

Saturday 30 May 2015 at 23:36 -
Thank you for working on this mister!
Tuesday 2 June 2015 at 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 Friday 29 May 2015 at 14:30
b1k3rdude

Message

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

Replies

lahtis Thursday 11 December 2014 at 2:07
lahtis Anonymous

Message

where is a source?

Replies

Friday 29 May 2015 at 14:22 -
Hello Lahtis - http://www.thedarkmod.com/downloads/
Friday 29 May 2015 at 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.