The forum

[script] Unreal Tournament 3

Author Replies
NSLW Monday 18 May 2009 at 20:49
NSLW

Hello,
I wrote script which installs Unreal Tournament 3. It also can patch the game after it's been installed

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
Comments
-do not patch the game to the latest version
-very poor performance

Icon for the game:



#!/bin/bash
# Date : (2010-03-04 18-00)
# Last revision : (2010-03-05 16-00)
# Wine version used : -
# Distribution used to test : -
# Author : NSLW
# Licence : Retail
# Depend : ImageMagick

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

TYTUL="Unreal Tournament 3"
PREFIX="UT3"
WORKINGWINEVERSION="1.1.43"

#procedure for patching UT3
patch_ut3()
{
POL_SetupWindow_browse "Select patch file downloaded from www.unrealtournament3.com" "$TYTUL" ""
wine "$APP_ANSWER"
POL_SetupWindow_message "Patch for $TYTUL has been installed successfully" "$TYTUL"
}
 
download_dinput()
{
cd "$REPERTOIRE/ressources/"
if [ ! -e $REPERTOIRE/ressources/$WORKINGWINEVERSION-mod.zip ]; then
POL_SetupWindow_download "Downloading dinput patch" "$TYTUL" "http://s2.sigmirror.com/files/63363_sssrl/$WORKINGWINEVERSION-mod.zip"
fi
cd "$WINEPREFIX/drive_c/windows/temp/"
unzip "$REPERTOIRE/ressources/$WORKINGWINEVERSION-mod.zip"
./$WORKINGWINEVERSION-mod -y
cp dinput/* ./
}

Create_Patched_Wine_Version()
{
POL_SetupWindow_install_wine "$1"
cd "$REPERTOIRE/WineVersions"
POL_SetupWindow_wait_next_signal "Removing old patched Wine" "$TYTUL"
rm -fr "$1-$2"
POL_SetupWindow_detect_exit
 
POL_SetupWindow_wait_next_signal "Copying Wine $1" "$TYTUL"
cp -r "$1" "$1-$2"
POL_SetupWindow_detect_exit

POL_SetupWindow_wait_next_signal "Patching Wine $1 with $2" "$TYTUL"
rm -fr "$REPERTOIRE/WineVersions/$1-$2/usr/lib/wine/dinput.dll.so"
cp "$WINEPREFIX/drive_c/windows/temp/dinput.dll.so" "$REPERTOIRE/WineVersions/$1-$2/usr/lib/wine/dinput.dll.so"
POL_SetupWindow_detect_exit
}

#starting the script
wget http://upload.wikimedia.org/wikipedia/en/d/d9/Unreal_Tournament_3.jpg --output-document="$REPERTOIRE/tmp/leftnotscaled.jpeg"
convert "$REPERTOIRE/tmp/leftnotscaled.jpeg" -scale 150x356\\! "$REPERTOIRE/tmp/left.jpeg"
POL_SetupWindow_Init "" "$REPERTOIRE/tmp/left.jpeg"

POL_SetupWindow_presentation "$TYTUL" "Epic Games" "N/A" "NSLW" "$PREFIX" 
 
select_prefix "$REPERTOIRE/wineprefix/$PREFIX"

#asking about patching
if [ -e "$REPERTOIRE/configurations/installed/$TYTUL" ]; then
POL_SetupWindow_menu "What do you want to do?" "Actions" "Patch game" "~"

if [ "$APP_ANSWER" == "Patch game" ]; then
patch_ut3
fi

POL_SetupWindow_Close
exit
fi

#creating application's own prefix
POL_SetupWindow_prefixcreate

download_dinput
Create_Patched_Wine_Version "$WORKINGWINEVERSION" "dinput"
CHOSENWINEVERSION="$WORKINGWINEVERSION-dinput"
Use_WineVersion "$CHOSENWINEVERSION"

#fetching PROGRAMFILES environmental variable
PROGRAMFILES="Program Files" 
POL_LoadVar_PROGRAMFILES

mkdir "$HOME/.winetrickscache"
cd "$HOME/.winetrickscache"
# checking if gecko is in wine tricks cache if not then download
if [ ! -e "wine_gecko-1.0.0-x86.cab" ]
then
POL_SetupWindow_download "PlayOnLinux is downloading Gecko HTML Engine" "Gecko HTML Engine" "http://downloads.sourceforge.net/wine/wine_gecko-1.0.0-x86.cab"
fi

cd "$REPERTOIRE/ressources/"
#downloading winetricks
if [ "`sha1sum < winetricks | sed 's/ .*//'`" != "1bc6af44c8584f01d8e3db0abce6ae869b55e1e4" ]; then
wget http://winezeug.googlecode.com/svn/trunk/winetricks --output-document=winetricks
fi

#installing gecko
POL_SetupWindow_wait_next_signal "Installing Gecko HTML" "$TYTUL"
bash winetricks -q gecko
POL_SetupWindow_detect_exit

#asking for CDROM and checking if it's correct one
POL_SetupWindow_message "Please insert $TYTUL media into your disk drive."
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "SetupUT3.exe"

#adding CD-ROM as drive e: to winecfg
cd "$WINEPREFIX/dosdevices"
ln -s "$CDROM" e:

cd "$WINEPREFIX/drive_c/windows/temp/"
echo "[HKEY_LOCAL_MACHINE\\\\Software\\\\Wine\\\\Drives]" > cdrom.reg
echo "\\"e:\\"=\\"cdrom\\"" >> cdrom.reg
regedit cdrom.reg
sleep 5

#starting installation
wine start /unix "$CDROM/SetupUT3.exe"
POL_SetupWindow_message "Click \\"Next\\" when installation will finish." "$TYTUL"
 
cd "$WINEPREFIX/drive_c/windows/temp/"
#setting MouseWarpOverride to force
echo "[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\DirectInput]" > mwo.reg
echo "\\"MouseWarpOverride\\"=\\"force\\"" >> mwo.reg
regedit mwo.reg

#asking about memory size of graphic card
POL_SetupWindow_menu_list "How much memory do your graphic card have got?" "$TYTUL" "32-64-128-256-384-512-768-890-1024-2048" "-" "256"
VMS="$APP_ANSWER"
 
echo "[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\Direct3D]" > vms.reg
echo "\\"VideoMemorySize\\"=\\"$VMS\\"" >> vms.reg
echo "\\"Multisampling\\"=\\"enabled\\"" >> vms.reg
regedit vms.reg

cd  "$WINEPREFIX/drive_c/windows/temp/"
convert "$CDROM/Unreal.ico" -geometry 32X32 "Unreal.png"
cp "Unreal.png" "$REPERTOIRE/icones/32/$TYTUL"
 
#cleaning temp
cd "$WINEPREFIX/drive_c/windows/temp/"
rm -rf *
 
#making shortcut
POL_SetupWindow_make_shortcut "$PREFIX" "$PROGRAMFILES/Unreal Tournament 3/Binaries" "UT3.exe" "" "$TYTUL" "" ""
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_ut3
fi
 
POL_SetupWindow_Close
exit

Edited by NSLW

GNU_Raziel Wednesday 20 May 2009 at 14:53
GNU_Raziel

Too low fps for this game, it cannot be added to the repository now.
neofox Monday 9 January 2012 at 12:27
neofoxAnonymous

i have Install UT3 white the script and get now this Problem:
krotow Sunday 5 January 2020 at 19:42
krotowAnonymous

Had to install Unreal Tournament 3 Black Edition under two Linux computers to get some Linux folks into local LAN party entertainment :)  One computer is laptop with i3-6100U CPU, 4 GB RAM and GeForce 930M GPU. Second one is desktop with i5-750 CPU, 8 GB RAM, SSD drive, RTX 2060 Super GPU and have outdated Dell 19" monitor with 1280x1024 resolution. Both have Linux Mint 19.3 installed and game is installed in PlayOnLinux wineprefix with Wine 4.21. On mentioned laptop with minimal graphic settings UT3 run fine enough with 35-62 FPS (45 FPS average). But what is weird - on second i5 computer UT3 is not much faster. This computer hadware definitely is more than capable to run UT3 very fast with max graphic detail on mentioned resolution and it works really fast when launched under Windows 10 in dualboot. Seems something is not good in Wine configuration or I don't know how to improve it. Any ideas?

This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmca-notice@playonlinux.com