Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Tiberian Technologies / Blackhand Studios » Tiberian Technologies Forum » [HowTo] Installing and using Renegade with TT on Linux
[HowTo] Installing and using Renegade with TT on Linux [message #478419] Sun, 06 January 2013 00:37 Go to next message
Veyrdite is currently offline  Veyrdite
Messages: 1471
Registered: August 2006
Location: Australia, Sydney
Karma: 0
General (1 Star)
[align=center]index.php?t=getfile&id=14590&private=0</div>


Update 2017-05

Most of this guide is now useless.  Renegade, TT and online multiplayer all run and install perfectly fine under Wine without any of the hassle shown below.

One exception: player counts and pings in the Advanced game listings are shown incorrectly.  The pings can be fixed via the instructions below.  

If you have any issues: feel free to comment here.  I'm now subscribed to this topic, so I'll (hopefully) get an email if you post.  Even if it's years after the fact.  If not, then track me down at http://halestrom.net


Credits




  • Big thanks to Jonwil for working out why multiplayer was not working.  

  • Another thanks to the rest of the TT team for their wonderful committment

  • Thanks to the Wine project developers for getting Windows compatibility up to where it is today



What the Hell is Linux?

Skip this section if you don't want to read my rant Razz

Linux is technically a kernel, something useless to the average joe.  People have taken Linux and made their own spins of it called 'distributions' or 'distros' for short, such as Ubuntu (once the biggest, still great for newbies), Mint (more popular than Ubuntu now), Fedora, Debian, Arch, PuppyLinux and hundreds of others, including ones made from scratch by individuals just for themselves.  A distribution is the kernel along with a working system, so you can actually use it.

If the last paragraph is completely confusing to you:  Linux is a free alternative to Microsoft Windows.  It has been around since last century, but massive improvements have been made (especially starting around 2007 ) that have brought it to large use.  In every way it is competitive - but most of all transparent.

Anyone in the world can contribute to open source projects such as GNU/Linux.  That's how it is made - everyone has access to the code and can make improvements, then submit them to the maintainers ( or fork the project if they don't like the maintainers ).

Many people might say things about Linux based operating systems, including 'glitchy' and 'not user friendly'.  These people have not touched it since the nineties.  Whilst you still can have complex and not-so-user friendly setups that require a lot of terminal ( think MS-DOS but better ) use, the 'big' distros are completely graphical and easy to use.  Even my parents manage to use it.

A picture speaks a thousand words, so here are a couple:

Picture spoiler - They're not that big, don't worry
Great apologies for wasting your precious bandwidth with images, I hope to encourage a few people more to have a dabble at it and get hooked.  Always some space for advertising.

I could go on writing about how much better package management is than stuipid application installers and uninstallers, and ramble about Linux's flexibility, but that is not really what this topic is about.






What the hell is Wine?

Wine is a compatibility layer that allows you to run Windows applications inside Linux, without a VM or any sort of emulator.  Wine Is Not an Emulator.

The wine project has been around for eons, but has really picked up steam in the last few years.  Quite literally - many steam games work under it because that is a priority of the Wine developers.

Unfortunately when something does not work, you have to start using the terminal to fix it.  That's where this guide comes in - a quick introduction to the terminal and how to fix and install Renegade using Wine.

Regarding performance:  because Wine is not an emulator, expect almost the same performance as in Windows.  Some games have higher framerates, some lower, depending on how they have been written as well as your hardware/driver combo, but in Renegade's case my FPS never drops below my cap of 60.  Don't expect performance issues other than very occasional split-second freezes caused when models are loaded and converted from a DirectX format to an OpenGL one.






Installing Wine
Your distribution should have wine in it's repositories.

For Ubuntu:




  1. Start the 'Ubuntu Software Centre'

    It has this icon in your dock:
    index.php?t=getfile&id=14583&private=0


  2. Search for 'Wine' ( search is on top-right of Window )

  3. Install it

For Mint:




  1. Open up the main menu

  2. Click on 'Software Manager'

  3. Search & install as per Ubuntu

index.php?t=getfile&id=14585&private=0






Setting Up Wine

By default Wine will create a fake 'C:' drive in /home/username/.wine/drive_c/ .   Here the 'username' folder is called your 'home directory', and is sometimes substituted with simple a '~'.  Home ~= My Documents, but applications store information in folders here ( hidden because their names start with a full stop ).

Also note that in Linux filesystems, instead of C:, D:, E: etc drives, everything is under the 'root' folder, represented by a slash '/' before the file/folder address.

The rest of this guide is going to require you to use a terminal, sorry.  In Love   Unless the problems in this guide get fixed in the future, this is how it's going to have to be.


To start a terminal, look for it in the menus (of eg Mint, Xubuntu, etc) or by clicking the top-left icon of Ubuntu's dash and searching for 'terminal'.

index.php?t=getfile&id=14587&private=0

You will see a prompt perhaps a little like this:
 username@hostname ~ $ 
The '~' is your current directory - home.  If you were to change directory, it will change:
username@hostname ~ $ cd Desktop   (hit enter)
username@hostname ~/Desktop $ 
'cd' stands for change directory.  To see what's in your current directory, type 'ls' ( stands for list )
username@hostname ~/Desktop $ cd ..
username@hostname ~ $ ls
Desktop  Documents  Downloads  Music  Pictures  Public  Templates  Videos
username@hostname ~ $  
Other things you will need to remember:  'cd ~' will take you back to your home directory, and 'cd ..' will take you to the directory above the current one.

Well done for surviving your crash course in using bash!  ( Bash is the program handling your input in the terminal ).



The first thing we need to do is make sure our installation CD is inserted into the computer and mounted.  Removable devices are mounted to directories in Linux, unlike drive names such as E:\ and F:\ in Windows.  The easiest way to mount a drive is to try and access it in your file browser, which will automatically mount it for you.

Doubling clicking the icon of the CD on your Desktop, or navigating to it in your file-browser will achieve this.

NB Your file-manager will probably not look exactly like this, but you will see the same files.  

index.php?t=getfile&id=14591&private=0

Now we need to make sure wine has noticed this.  In your terminal, run 'winecfg': ( stands for wine config )
username@hostname ~ $  winecfg         (hit enter)
Wine will take a moment to set itself up, and possibly ask you if you want to install something that probably isn't necessary for Renegade, depending on your distro and how you installed Wine.

Now navigate to the 'Drives' tab of winecfg.  If a D:\ drive is not listed here, or does not point to anywhere, hitting the 'autodetect' button should fix this.  If nothing is changed, make sure you have mounted the CD ( and therefore can look at the files on it ).   Although Linux filesystems don't have D:\ drives, we need Wine to know what the equivalent is so it knows what to do if a Windows application (eg the Renegade Installer) wants access to a CD.

index.php?t=getfile&id=14586&private=0

If you want to, tick the 'emulate a virtual desktop' checkbox on the 'Graphics' tab.  The Renegade Installer likes to be fullscreen, and I hate it stealing my entire screen, but this forces it to be inside of a window.  Make sure to turn this off afterwards, else your game will also be forced into a small window!


Hit OK.






Installing Renegade

Double click on 'setup.exe' ( on the CD ) with your file-browser.  It will run as per usual.  

Voila.  But we still need to install TT and fix multiplayer!

Also, I recommend copying all of the movies from your data disc into a folder Renegade/Data/Movies so that you can watch them in-game without the disc.





Preparing for and installing TT

Start downloading the TT installer.  It's exact location will change as new versions are release, so locate it yourself on the TT website.  Make sure to save it inside of your C drive, else Wine might complain when you try to run it later.  

Important note:  You won't see the hidden .wine folder in your ~ unless you press Ctrl+H in your save dialog.

index.php?t=getfile&id=14588&private=0

Apologies for the bad wording in the above screenshot  Big Grin .  I mean to say that next time you want to save something, having to scroll through the dot-folders and dot-files is a pain if you don't care about them.

While that's downloading, we need to install vcrun6, a bunch of libraries that the official 1.037 Renegade patcher requires to run.  A script called winetricks will help out here.

Follow my steps in your terminal, line by line:

cd ~/.wine ( or just 'cd .wine' if you are already in ~ )
wget http://winetricks.org/winetricks
chmod u+x winetricks
./winetricks vcrun6
Explanation of each line:


  1. Change directory to wine's drive C:\

  2. Download the winetricks script using a tool called 'wget'

  3. Permit the now downloaded file 'winetricks' to be run as a program ('x' as in execute) by it's owner ('u', as in 'you')

  4. Run winetricks, telling it we want to install vcrun6 ( the preceding './' is necessary, but in some shells you can just type 'winetricks' instead of './winetricks' )

This will chug away for a while, unless you have run it before and winetricks has already downloaded the vcrun6 installer.

index.php?t=getfile&id=14589&private=0

Right!  Now wait for TT to finish downloading, and then run the installer.  It should do everything automatically from here on.

If it appears to have frozen, don't worry -- it is just downloading multiplayer maps for you, and will take a few minutes.




At this point everything par the Multiplayer section of Renegade will work.





Fixing Multiplayer
The first thing you need to do is permit wine to create ICMP packets and send them over the internet.  In simple English:  it needs to ping servers, and without extra permissions the Linux kernel forbids it to do so ( for security reasons ).

If you do not do this, all of the servers in your Advanced Games listings will appear to have a really high ping ( but in-game you will be fine ).  Unfortunately every time Wine updates these changes are reverted, so you will have to repeat them to get realistic pings.

The following line can be copied and pasted into your terminal.  It should work on most systems, and ignore all errors it may spit out unless they have the words 'not found' in them.
for file in /usr/bin/*wine*; do sudo setcap "cap_net_raw+epi cap_net_admin+epi cap_net_bind_service+epi" "$file"; done
English explanation:  For every file in the folder /usr/bin that has the word 'wine' somewhere in it, grant it the various network capabilities (permissions).

Technically not all of the permissions in the above script, nor all of the wine executables ( wine-preloader and wineserver should be enough ) need to be done, but it is far easier and more foolproof for me to tell you to do so. I'm lazy, and this might make these instructions a little more future-proof Smile

Security consideration:  now any program you run with wine also has these permissions and can do evil things.  Keep in mind however you don't need any special permissions to do these things in Windows Razz


The second thing you need to do is overwrite Westwood's WOLAPI.DLL with TT's one.  A thank you to JonWil for finding this out.

In C:\Westwood\Renegade\Internet\ ( ~/.wine/drive_c/Westwood/Renegade/Internet ) is the original WOLAPI.DLL that came with the game.  TT installed a new version in ...../Westwood/Renegade  .  Wine for some reason prefers to load the old one, which causes your serial to be sent to XWIS incorrectly, leading to the Advanced Game Listings being blank.

Fix: overwrite the Internet\ one with the correct one:
cp ~/.wine/drive_c/Westwood/Renegade/WOLAPI.dll ~/.wine/drive_c/Westwood/Internet/WOLAPI.dll




Enjoy

Please post any problems, errors or suggestions here!  If your installation succeeds either by these instructions or otherwise, I would like to know.  Expect this guide to evolve as things change or better (easier) fixes are discovered.

Known issues:




  • Desktop is left at the wrong gamma setting after Renegade exits.
    This problem has existed all of Renegade's life AFAIK, and is fixable after the game with this in the terminal:
    xgamma -gamma 1
  • Water shaders look goofy (ie pink & purple)
    If someone finds a solution, please do share.  I don't think it's really important however, and will probably change between different hardware & driver configs.

    Other things that work:

    • Renegade Public tools ( have not tried exporting )

    • Gmax & Renx ( I have not tried exporting a model ->W3D, but I assume it works )





WOL: Veyrdite Previously: Dthdealer ( a long time ago )

[Updated on: Sun, 25 February 2024 14:18] by Moderator

Report message to a moderator

Re: [HowTo] Installing and using Renegade with TT on Linux [message #478433 is a reply to message #478419] Sun, 06 January 2013 05:44 Go to previous messageGo to next message
EvilWhiteDragon is currently offline  EvilWhiteDragon
Messages: 3751
Registered: October 2005
Location: The Netherlands
Karma: 0
General (3 Stars)

Stickied.

http://www.blackintel.org/usr/evilwhitedragon/pointfix.gif
BlackIntel admin/founder/PR dude (not a coder)
Please visit http://www.blackintel.org/

V, V for Vendetta

People should not be afraid of their governments.
Governments should be afraid of their people.
Re: [HowTo] Installing and using Renegade with TT on Linux [message #478434 is a reply to message #478419] Sun, 06 January 2013 07:23 Go to previous messageGo to next message
Omar007 is currently offline  Omar007
Messages: 1711
Registered: December 2007
Location: Amsterdam
Karma: 0
General (1 Star)
Nice Thumbs Up

http://tiberiumredux.omarpakker.nl/Old Unused Parts/Plaatjes/PromoteBanner_Hades_small.jpg
Re: [HowTo] Installing and using Renegade with TT on Linux [message #478435 is a reply to message #478419] Sun, 06 January 2013 09:16 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3555
Registered: February 2003
Karma: 0
General (3 Stars)

ok, so it turns out WINE does not support registration-free COM which is why on WINE you need to manually copy the wolapi.dll across.


Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
Re: [HowTo] Installing and using Renegade with TT on Linux [message #478452 is a reply to message #478419] Sun, 06 January 2013 17:53 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
Will it run on my Pi? Rocked Over That's my only Linux install at the moment (well, only one that actually works Razz I broke my desktop Ubuntu install by trying to convince it that graphics cards have multiple DVI ports.... >.< )

http://steamsignature.com/card/1/76561197975867233.png

[Updated on: Sun, 06 January 2013 17:54]

Report message to a moderator

Re: [HowTo] Installing and using Renegade with TT on Linux [message #478457 is a reply to message #478419] Sun, 06 January 2013 21:18 Go to previous messageGo to next message
Veyrdite is currently offline  Veyrdite
Messages: 1471
Registered: August 2006
Location: Australia, Sydney
Karma: 0
General (1 Star)
EvilWhiteDragon wrote on Sun, 06 January 2013 23:44

Stickied.


Thank you EvilWhiteDragon.

danpaul88 wrote on Mon, 07 January 2013 11:53

Will it run on my Pi? Rocked Over That's my only Linux install at the moment (well, only one that actually works Razz I broke my desktop Ubuntu install by trying to convince it that graphics cards have multiple DVI ports.... >.< )


Unfortunately no - Pi's are ARM based, not i686, so the Renegade executables are simply in the wrong format to run ( as are all other applications not compiled for ARM ).

You won't have much luck playing the game in a VM either -- with 3D graphics passthrough on my decently modern box the framerate was awful, so it won't be amazing on a Pi.

Kudos for owning a Pi (what do you use it for?), but sorry none the less Sad

Regarding your broken Linux install: boot off a live CD and then deleting /etc/X11/xorg.conf should fix that ( assuming that's what you edited ). Most likely only Xorg is broken ( xorg being the 'server' for the graphical environment ).

Regards, William


WOL: Veyrdite Previously: Dthdealer ( a long time ago )
Re: [HowTo] Installing and using Renegade with TT on Linux [message #478462 is a reply to message #478457] Mon, 07 January 2013 01:26 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
Veyrdite wrote on Mon, 07 January 2013 04:18

danpaul88 wrote on Mon, 07 January 2013 11:53

Will it run on my Pi? Rocked Over That's my only Linux install at the moment (well, only one that actually works Razz I broke my desktop Ubuntu install by trying to convince it that graphics cards have multiple DVI ports.... >.< )


Unfortunately no - Pi's are ARM based, not i686, so the Renegade executables are simply in the wrong format to run ( as are all other applications not compiled for ARM ).

You won't have much luck playing the game in a VM either -- with 3D graphics passthrough on my decently modern box the framerate was awful, so it won't be amazing on a Pi.

Kudos for owning a Pi (what do you use it for?), but sorry none the less Sad

Regarding your broken Linux install: boot off a live CD and then deleting /etc/X11/xorg.conf should fix that ( assuming that's what you edited ). Most likely only Xorg is broken ( xorg being the 'server' for the graphical environment ).

Regards, William



The whole thing about running it off a Pi was a bit of a joke tbh, your topic reminded me of the whole "Will it run Minecraft" thing (which, incidentally, it can... a cut down version of it anyway). As a software developer myself I know that x86 machine code won't run on ARM and, even if it did, the Pi has nowhere near enough grunt to actually run the W3D engine...

I use my Pi as a server for all sorts of random things, currently off the top of my head it's running SVN, HTTP, SFTP, MySQL, a few Perl scripts and it also has a bunch of cron jobs to download backup copies of websites I maintain, tar.gz them and dump them on my NAS. Considering I know next to nothing about Linux I'm quite pleased I managed to set all of that up using only the command line via SSH.

My Ubuntu install is a few versions out of date now anyway, I only used it for dabbling with Linux and I have my Pi for that now so odds are I will just erase it and setup a new VM with Mint or something.


http://steamsignature.com/card/1/76561197975867233.png

[Updated on: Mon, 07 January 2013 01:27]

Report message to a moderator

Re: [HowTo] Installing and using Renegade with TT on Linux [message #480307 is a reply to message #478462] Wed, 03 April 2013 23:00 Go to previous messageGo to next message
sla.ro(master) is currently offline  sla.ro(master)
Messages: 610
Registered: September 2010
Location: Romania
Karma: 0
Colonel
i played few hours renegade on Ubuntu 12, but the rendering is slow (is a emulator of course), but is playable.

Creator of Mutant Co-Op
Developer of LuaTT
Re: [HowTo] Installing and using Renegade with TT on Linux [message #480722 is a reply to message #478419] Sat, 11 May 2013 22:32 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3555
Registered: February 2003
Karma: 0
General (3 Stars)

You should not need to install vcrun6 or the official 1.037 patch. The TT installer automatically installs the 1.037 patch files (those that it itself doesn't update with newer versions)



Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
Re: [HowTo] Installing and using Renegade with TT on Linux [message #483229 is a reply to message #478419] Sun, 25 August 2013 10:34 Go to previous messageGo to next message
iRANian is currently offline  iRANian
Messages: 4299
Registered: April 2011
Karma: 0
General (4 Stars)
I had to help at least two people recently to get 4.0 running, they had to install 4.0 after installing 1.037, they were getting "version mismatch" error messages because they didn't. I know a year ago or so it worked without having to install 1.037.

Long time and well respected Renegade community member, programmer, modder and tester.

Scripts 4.0 private beta tester since May 2011.

My Renegade server plugins releases
Re: [HowTo] Installing and using Renegade with TT on Linux [message #490898 is a reply to message #478419] Sat, 25 July 2015 01:40 Go to previous messageGo to next message
Veyrdite is currently offline  Veyrdite
Messages: 1471
Registered: August 2006
Location: Australia, Sydney
Karma: 0
General (1 Star)
mixcheck.exe crashes for me. What is it using to extract its data?

WOL: Veyrdite Previously: Dthdealer ( a long time ago )
Re: [HowTo] Installing and using Renegade with TT on Linux [message #490900 is a reply to message #478419] Sat, 25 July 2015 07:20 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3555
Registered: February 2003
Karma: 0
General (3 Stars)

Its using a statically linked copy of the zlib library.


Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
Re: [HowTo] Installing and using Renegade with TT on Linux [message #491838 is a reply to message #478419] Mon, 05 December 2016 07:47 Go to previous messageGo to next message
WNxTilly is currently offline  WNxTilly
Messages: 113
Registered: February 2003
Location: Sheffield, UK
Karma: 0
Recruit
Hi,

I was able to install Ren and play using Mint Linux and Wine. When I tried to install the 4.2 installer I get the following error on my machine.
index.php?t=getfile&id=15325&private=0

Any ideas what this is? I followed the instructions above but nothing I seem to do stop this. (I tried installed vcredist_86.exe (vcrun6, vcrun2010) separately but I've no idea what version this is using)

I tried using Ubuntu (16.04) and Mint (17) on the same machine but got the exact same error. I've tried about 20 times in total but nothing seems to work.

Any help would be great.

Thanks

Tilly


Warrior Nation Number One Gaming Clan In The World Very Happy
http://www.warriornation.net
XWIS Nick : WNxTilly

CABAL did steal my sig Razz

[Updated on: Mon, 05 December 2016 07:52]

Report message to a moderator

Re: [HowTo] Installing and using Renegade with TT on Linux [message #492364 is a reply to message #478419] Sat, 13 May 2017 21:36 Go to previous messageGo to next message
Veyrdite is currently offline  Veyrdite
Messages: 1471
Registered: August 2006
Location: Australia, Sydney
Karma: 0
General (1 Star)
As of today: TT and Renegade are installing and working without problems under Wine. Version: Wine 2.7 (staging)

WOL: Veyrdite Previously: Dthdealer ( a long time ago )
Re: [HowTo] Installing and using Renegade with TT on Linux [message #492366 is a reply to message #478419] Sun, 14 May 2017 01:10 Go to previous messageGo to next message
Veyrdite is currently offline  Veyrdite
Messages: 1471
Registered: August 2006
Location: Australia, Sydney
Karma: 0
General (1 Star)
(Test post to see if forum subscriptions work)

WOL: Veyrdite Previously: Dthdealer ( a long time ago )
Re: [HowTo] Installing and using Renegade with TT on Linux [message #493226 is a reply to message #478419] Sun, 25 February 2024 15:11 Go to previous message
Junglized is currently offline  Junglized
Messages: 1
Registered: February 2024
Karma: 1
Recruit
I recently decided to play Renegade out of nostalgia. I'm on Linux mint 21.3 with Lutris 0.5.16 as my game library. Initially I set up 32bit Wine prefix within Lutris with WinXP. Unpatched game worked but I couldn't install scripts-4.8.1 due to A1 error. It appears that at least Win7 needs to be set in Wine config in order to successfully go through scripts set-up (MS Windows Desktop Runtime, which is part of scripts-4.8.1 installation process, apparently can be only installed on Win7 and up). After going from Xp to Win7 it worked. But then out of curiosity I deleted the game entirely and installed it again, this time using 64bit Win10 prefix. Unpatched game didn't want to launch but I could install scripts-4.8.1 (same as with 32 bit Win7) and after that successfully start the game. YAAAAY!  :bigups:
Previous Topic: Scripts 4.8 is now available
Next Topic: Scripts 4.8 Update 2 is now available
Goto Forum:
  


Current Time: Thu May 23 05:07:22 MST 2024

Total time taken to generate the page: 4.41317 seconds