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 previous message
Veyrdite is currently offline  Veyrdite
Messages: 1458
Registered: August 2006
Location: Australia, Sydney
Karma:
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 )





A proud user of Renegade with TT on Linux, unemulated thanks to the Wine project
WOL: Veyrdite Previously: Dthdealer ( a long time ago )

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

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Scripts 4.8 is now available
Next Topic: Scripts 4.8 Update 2 is now available
Goto Forum:
  


Current Time: Thu Mar 28 12:58:47 MST 2024

Total time taken to generate the page: 0.00771 seconds