Forums

[script] S.T.A.L.K.E.R. - Clear Sky

Auteur Réponses
NSLW Dimanche 10 Mai 2009 à 12:05
NSLW

Hello,
I've made script which installs S.T.A.L.K.E.R. - Clear Sky. It also can patch the game after it's been installed (stkcs-for-pack-efigspcjh-patch-any-9.exe). It works on
Wine version : 1.1.21
Distribution : Fedora
Distribution Version : 10 (32 bit)
Graphics card : Nvidia, GeForce 9xxx
Drivers of the graphics card : 185.18.08
Known Issues
-game won't run with original xrEngine.exe, xrCPU_Pipe.dll, xrGame.dll, xrNetServer.dll, xrRender_R1.dll, xrRender_R2.dll, xrRender_R3.dll

Icon for the game:


For the script go here

Edité par NSLW

NSLW Dimanche 10 Mai 2009 à 14:29
NSLW

Tinou please could you upload dinput.dll.so (size 221,4KB) to your file server. It's patched dinput which solves the problems with mouse. It works with Wine-1.1.21 and may work with newer version. It may also substitute download link here which is already dead.
GNU_Raziel Mercredi 20 Mai 2009 à 14:54
GNU_Raziel
Admin

Script added to repository, thx for your work :)
taboulet Vendredi 10 Juillet 2009 à 15:05
tabouletAnonymous

Hello,
(→ Sorry for the bad english, I usually speak in french)

Thanks for your script NSLW that's helped me a lot :) but it's does'nt work :(

First, at line 114, http://mulx.net/file_pol/D3DX9_XX_dll_(32Bit_All).zip is down.
Then, if I copy these three libraries in the STALKER's directory (S.T.A.L.K.E.R. - Clear Sky/bin), that change nothing. I have to copy that in windows/system32

#coping what has been downloaded
cd "$WINEPREFIX/drive_c/Program Files/Deep Silver/S.T.A.L.K.E.R. - Clear Sky/bin"
cp "$WINEPREFIX/drive_c/windows/temp/d3dx9_31.dll" d3dx9_31.dll
cp "$WINEPREFIX/drive_c/windows/temp/d3dx9_36.dll" d3dx9_36.dll
cp "$WINEPREFIX/drive_c/windows/temp/d3dx9_37.dll" d3dx9_37.dll

Idem with dinput.dll.so, for the mouse, that doesn't work if I don't copy it in windows/system32/dinput.dll (overwrite). But it's right for openal32 and wrap_oal.dll, in S.T.A.L.K.E.R. - Clear Sky/bin :)

I also don't understand why you don't make an unique archive with all the libraries ? It's more easy :)

What's work for me, based on the previous script :
#!/bin/bash
# 

if [ "$PLAYONLINUX" = "" ]; then
	exit 0
fi
source "$PLAYONLINUX/lib/sources"
 
VERSIONWINE=$(wine --version)
TYTUL="S.T.A.L.K.E.R. - Clear Sky"
PREFIX="STALKERCS"
WORKINGWINEVERSION="1.1.25"
 
 
# Procedure for patching stalker
patch_stalker() {
	POL_SetupWindow_browse "Select patch file downloaded from www.stalker-game.com" "$TYTUL" ""
	wine "$APP_ANSWER"
	POL_SetupWindow_wait_next_signal "Installation in progress..." "$TYTUL"
	POL_SetupWindow_detect_exit
	POL_SetupWindow_message "Patch for $TYTUL has been installed successfully" "$TYTUL"
}

download_libraries() {
	cd "$REPERTOIRE/ressources/"
	if [ ! -e $REPERTOIRE/ressources/STALKER_ClearSky.tar.gz ]; then
		POL_SetupWindow_download "Downloading all libraries" "$TYTUL" "http://omploader.org/vMXllaw/STALKER_ClearSky.tar.gz"	# Works fine with 1.1.25
	fi
	tar -xzvf "STALKER_ClearSky.tar.gz"
}
 
prepare_patched_WineVersion() {
	POL_SetupWindow_install_wine "$1"
	cd $REPERTOIRE/WineVersions
	POL_SetupWindow_wait_next_signal "Copying WineVersion" "$TYTUL"
	rm -Rf "$1-$PREFIX"
	cp -R "$1" "$1-$PREFIX"
	rm -Rf "$REPERTOIRE/WineVersions/$1-$PREFIX/usr/lib/wine/dinput.dll.so"
	mv "$REPERTOIRE/ressources/dinput.dll.so" "$REPERTOIRE/WineVersions/$1-$PREFIX/usr/lib/wine/dinput.dll.so"
	POL_SetupWindow_detect_exit
}
 
copy_libraries() {
	# DirectX
	cd "$WINEPREFIX/drive_c/windows/system32/"
	mv "$REPERTOIRE/ressources/d3dx9_31.dll" d3dx9_31.dll
	mv "$REPERTOIRE/ressources/d3dx9_36.dll" d3dx9_36.dll
	mv "$REPERTOIRE/ressources/d3dx9_37.dll" d3dx9_37.dll
	mv "$REPERTOIRE/ressources/dinput.dll" dinput.dll
	# Sound (openal)
	cp "$REPERTOIRE/ressources/openal32.dll" openal32.dll
	cp "$REPERTOIRE/ressources/wrap_oal.dll" wrap_oal.dll
	cd "$WINEPREFIX/drive_c/Program Files/Deep Silver/S.T.A.L.K.E.R. - Clear Sky/bin"
	mv "$REPERTOIRE/ressources/openal32.dll" openal32.dll
	mv "$REPERTOIRE/ressources/wrap_oal.dll" wrap_oal.dll
}

# Main script
POL_SetupWindow_Init
POL_SetupWindow_presentation "$TYTUL" "Deep Silver" "N/A" "NSLW" "$PREFIX" 
 
select_prefixe "$REPERTOIRE/wineprefix/$PREFIX"
 
# Asking about patching
POL_SetupWindow_menu "What do you want to do?" "Actions" "Install the game:Patch your game" ":"
if [ "$APP_ANSWER" == "Patch your game" ]; then
	if [ -e "$REPERTOIRE/wineprefix/$PREFIX" ]; then
		patch_stalker
	fi

	POL_SetupWindow_Close
fi

POL_SetupWindow_prefixcreate
 
 
# Asking about WineVersion
POL_SetupWindow_menu "What Wineversion would you like to use?" "WineVersions" "Patched $WORKINGWINEVERSION version (recommended):Patched latest version (untested):Unpatched version" ":"

# Downloading libraries
download_libraries

# Downloading tested Wine
if [ "$APP_ANSWER" == "Patched $WORKINGWINEVERSION version (recommended)" ]; then
 
	CHOSENWINEVERSION=$WORKINGWINEVERSION-$PREFIX
	prepare_patched_WineVersion "$WORKINGWINEVERSION"
 
# Downloading untested Wine
elif [ "$APP_ANSWER" == "Patched latest version (untested)" ]; then
	cd "$WINEPREFIX/drive_c/windows/temp"
	# Determining which Version is the latest
	wget http://mulx.playonlinux.com/wine/linux-i386/LIST
	cat LIST | sed -e 's/\\.//g' | cut -d';' -f2 | sort -n | tail -n1 >& LatestVersion.txt
 
	x=`cat LatestVersion.txt | cut -c1-1`
	y=`cat LatestVersion.txt | cut -c2-2`
	z=`cat LatestVersion.txt | cut -c3-4`
 
	LATESTVERSION=$x.$y.$z
	CHOSENWINEVERSION=$LATESTVERSION-$PREFIX
	prepare_patched_WineVersion "$LATESTVERSION"

# Unpatched version
else 
	CHOSENWINEVERSION=$VERSIONWINE
fi
 
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "setup.exe"
 
# Adding CD-ROM as drive d: to winecfg
cd $WINEPREFIX/dosdevices
ln -s $CDROM d:
 
echo "[HKEY_LOCAL_MACHINE\\\\Software\\\\Wine\\\\Drives]" > $REPERTOIRE/tmp/cdrom.reg
echo "\\"d:\\"=\\"cdrom\\"" >> $REPERTOIRE/tmp/cdrom.reg
regedit "$REPERTOIRE/tmp/cdrom.reg"

POL_SetupWindow_message "Wait 5 seconds then click next. Please install the game in the default directory." "$TYTUL"
cd $REPERTOIRE/ressources/
 
# Starting installation
POL_SetupWindow_wait_next_signal "Installation in progress..." "$TYTUL"
cd $CDROM
wine $CDROM/setup.exe
POL_SetupWindow_detect_exit
 
# Asking about memory size
POL_SetupWindow_menu_list "How much memory do your graphic card have got ?" "$TYTUL" "32-64-128-256-384-512-640-768-896-1024-2048" "-" "256"
VMS="$APP_ANSWER"

# Copying *.dll
copy_libraries

# Set base register
cd "$WINEPREFIX/drive_c/windows/temp/"
# Setting memory size 
 echo "[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\Direct3D]" > vms.reg
 echo "\\"VideoMemorySize\\"=\\"$VMS\\"" >> vms.reg
 regedit vms.reg
# Overriding d3dx9_31.dll ; d3dx9_36.dll ; d3dx9_37.dll
 echo "[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\DllOverrides]" > override.reg
 echo "\\"d3dx9_31.dll\\"=\\"native\\"" >> override.reg
 echo "\\"d3dx9_36.dll\\"=\\"native\\"" >> override.reg
 echo "\\"d3dx9_37.dll\\"=\\"native\\"" >> override.reg
 regedit override.reg
# Setting OffscreenRenderingMode to fbo
 echo "[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\Direct3D]" > fbo.reg
 echo "\\"OffscreenRenderingMode\\"=\\"fbo\\"" >> fbo.reg
 regedit fbo.reg
# Setting MouseWarpOverride to force
 echo "[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\DirectInput]" > mwo.reg
 echo "\\"MouseWarpOverride\\"=\\"force\\"" >> mwo.reg
 regedit mwo.reg
  
# Cleaning windows/temp
cd "$WINEPREFIX/drive_c/windows/temp/"
rm -Rf *
 
# Making shortcut
cp "$CDROM/stalker.ico" "$REPERTOIRE/icones/32/$TYTUL"
POL_SetupWindow_make_shortcut "$PREFIX" "Program Files/Deep Silver/S.T.A.L.K.E.R. - Clear Sky" "bin/xrEngine.exe" "" "$TYTUL" "" "-i"
Set_WineVersion_Assign "$CHOSENWINEVERSION" "$TYTUL"
 
POL_SetupWindow_message "$TYTUL has been installed successfully" "$TYTUL"
 
# Asking about patching
POL_SetupWindow_question "Do you want to patch your game?" "$TYTUL"
if [ "$APP_ANSWER" == "TRUE" ] ;then
	patch_stalker
fi

# Exit
POL_SetupWindow_Close
exit

Thans for attention


(@NSLW : how can u run the game with the 1.5.09 patch ? I haven't found nodvd for this patch :(

Edité par taboulet

NSLW Vendredi 10 Juillet 2009 à 15:44
NSLW

First, at line 114, http://mulx.net/file_pol/D3DX9_XX_dll_(32Bit_All).zip is down.

Quote from taboulet

Corrected

Then, if I copy these three libraries in the STALKER's directory (S.T.A.L.K.E.R. - Clear Sky/bin), that change nothing. I have to copy that in windows/system32

Quote from taboulet

I leaved them in bin directory. The problem was that they were wrongly overridden. there shouldn't be
echo "\\"d3dx9_31.dll\\"=\\"native\\"" >> override.reg
but
echo "\\"d3dx9_31\\"=\\"native\\"" >> override.reg

Idem with dinput.dll.so, for the mouse, that doesn't work if I don't copy it in windows/system32/dinput.dll (overwrite).

Quote from taboulet

This file was an modification to Wine version and not for wineprefix and it'll work if you use that version and set MouseWarpOverride to force, which is done automatically in script.

But it's right for openal32 and wrap_oal.dll, in S.T.A.L.K.E.R. - Clear Sky/bin :)

Quote from taboulet

Why openal32? There was no need to override this library.


I also don't understand why you don't make an unique archive with all the libraries ? It's more easy :)

Quote from taboulet

It's an archive with files which were modified with patches from Bugzilla. They resolve some issues with games like the one with mouse movement.

Thanks for pointing me all this out. I revised this script and made corrections :)

BTW. You should be basing on the script in script database and not on this on forum because it's outdated.


(@NSLW : how can u run the game with the 1.5.09 patch ? I haven't found nodvd for this patch :(

Quote from taboulet

Use the latest known which was 1.5.07 for me, but AFAIK there is 1.5.10 patch and nodvd also exist for this specific version.

Edité par NSLW

taboulet Vendredi 10 Juillet 2009 à 16:34
tabouletAnonymous

Ok, thanks for your answer.
Without openal32 the game won't run for me °_°

Hope that'll help people :)

Edité par taboulet

NSLW Vendredi 10 Juillet 2009 à 17:00
NSLW

Without openal32 the game won't run for me °_°

Quote from taboulet

Ok, I'll investigate that but for now I won't have got time.