Forums

[Script] [i]CommandAndConquerTibSun.pol[/i]

Command & Conquer: Tiberian Sun

Auteur Réponses
m1k3 Mercredi 30 Aoüt 2017 à 12:37
m1k3Anonymous

I hope I am doing this right because its my first post in this forum but I really wanted share this.

Content:

Command & Conquer: Tiberian Sun is a real-time strategy video game developed by Westwood Studios and released in 1999. The main storyline follows the second major war between the Global Defense Initiative of the United Nations, and the global terrorist organization known as the Brotherhood of Nod. The story takes place 30 years after the GDI had won the First Tiberium War in Command & Conquer. Source:wikipedia.org

 

Note:

This scripts installs the classic Command And Conquer Tiberian Sun and its expansion Firestorm, by downloading and extracting the rar-archive released by EA Games as an abandoned game.

 

Requirement:

To extract the archive contents, p7zip needs to be installed.

 

Script:

 

#!/bin/bash
# Date : (2017-01-10 17-44)
# Last revision : (2017-08-30 12-36)
# Wine version used : 2.10
# Distribution used to test : ManjaroLinux
# Author : m1k3
# Script licence : GPLv3
# Program licence : Abandoned shareware
# Depend : p7zip
# WineHQ : https://appdb.winehq.org/objectManager.php?sClass=application&iId=176
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

PREFIX="CnC_TibSun"
TITLE="Command and Conquer : Tiberian Sun"
DOWNLOADLINK="http://dl.4players.de/f1/pc2/sonstiges/OfficialCnCTiberianSun.rar"
CHECKSUM="c42d739487169d51d15e0c79c256cc5c"
#WORKING_WINE_VERSION="1.9.10"    # select last as platinum known version according to wineHQ
WORKING_WINE_VERSION="2.10"    # 1.9.10 is somewhat broken by one of the last POL updates (font error results in 0x0 pixel windows)
# ALTERNATIVEDOWNLOADLINK="http://download.fileplanet.com/ftp1/022010/OfficialCnCTiberianSun.rar"
# ALTERNATIVEDOWNLOADLINK="http://www.cncforums.com/new/user_uploads/OfficialCnCTiberianSun.rar" # different checksum

POL_Debug_Init
POL_SetupWindow_Init

#check_one "p7zip" "p7zip"
#POL_SetupWindow_missing #<< functions not available anymore?!?

POL_SetupWindow_presentation "$TITLE" "Westwood Studios" "http://www.cncworld.org/index.php?page=games/tiberiansun" "m1k3" "$PREFIX"

POL_System_TmpCreate "$PREFIX" # temp prefix is only used for downloading the archive

POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD"
if [ "$INSTALL_METHOD" = "LOCAL" ]
then
    cd "$HOME" || exit
    # select the downloaded rar archive fo runpacking to the wine prefix
    POL_SetupWindow_browse "$(eval_gettext 'Please select the downloaded archive to extract.')" "$TITLE" "Rar Archive (*.rar)|*.rar;*.RAR"
    ARCHIVE="$APP_ANSWER" # save the path for extracting
elif [ "$INSTALL_METHOD" = "DOWNLOAD" ]
then
    cd "$POL_System_TmpDir"
    POL_Debug_Message "Download file $DOWNLOADLINK to temp directory."
    POL_Download "$DOWNLOADLINK" "$CHECKSUM" # download the file from 4players.de to temp prefix and crosscheck with known checksum
    ARCHIVE="$POL_System_TmpDir/OfficialCnCTiberianSun.rar" # save the path for extracting
fi

POL_Wine_SelectPrefix "$PREFIX"    # create wine prefix
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"    # select last as platinum known version according to wineHQ

# Adapt Screen resolution
Set_Desktop "On" "800" "600" # preset resolution to 800*600 because game doesnt work well streched or fullscreen
POL_SetupWindow_message "$(eval_gettext 'The window resolution is hard set to 800*600.\n If you want a different resolution go to the game directory in: \n\n\t$WINEPREFIX/drive_c/EA Games/Command & Conquer The First Decade/Command & Conquer(tm) Tiberian Sun(tm)/SUN/\n\n and adapt the SUN.ini according to the resolution, but keep in mind that the game cant handle aspect ratios other then 4:3.')" "$TITLE"

# according to wineHQ following options increase performence
POL_Wine_Direct3D "DirectDrawRenderer" "opengl"
POL_Wine_Direct3D "RenderTargetModeLock" "readtex" # wineHQ recomends to setting "RenderTargetLockMode" but this doesn't work Words Lock and Mode seams changed

POL_SetupWindow_wait_next_signal "$(eval_gettext 'Please wait while $TITLE is installed.')" "$TITLE"
7z x "$ARCHIVE" -o"$WINEPREFIX/drive_c/."

POL_Shortcut "SUN.exe" "$TITLE"

POL_SetupWindow_message "The setup is completed, have fun playing the game!" "$TITLE"

POL_System_TmpDelete

POL_SetupWindow_Close
exit

 

Resorces:

Command and Conquer : Tiberian Sun-22x22.png - http://i.imgur.com/niT9Rf6.png

Command and Conquer : Tiberian Sun-48x48.png - http://i.imgur.com/lQk1MnL.png
left.png - http://i.imgur.com/lx8PJiB.png

top.png - http://i.imgur.com/uLvqLcW.png

 

 

Edité par m1k3

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