Results 1 to 10 of 125

  Click here to go to the first Developer post in this thread.  

Thread: ARMA2/OA/CO/Demo/Free/TOH on WINE/Linux!

Threaded View

  1. #1

    Exclamation ARMA2/OA/CO/Demo/Free/TOH on WINE/Linux!

    Hi guys, I've managed to get most of the current Bohemia Interactive games working well with WINE. You have 2 options:


    (Full-sized image is >2MB!)

    WINE:
    WINE is a compatibility library that allows users to run Windows software on Linux. It's not Windows, nor is it an emulator or virtual environment like VMWare or Xen - it's a set of libraries that translate Windows function calls to their equivalent Linux versions.

    You can install WINE using your distribution's package manager. For example, on Ubuntu use:

    (Ubuntu users must install the WINE Team's PPA repository to provide them with up-to-date versions of WINE)
    Code:
    sudo add-apt-repository ppa:ubuntu-wine/ppa
    sudo apt-get update
    Then simply install the packages:

    Code:
    sudo apt-get install wine1.5 winetricks
    or search for 'wine' and 'winetricks' on the Ubuntu Software Center and install them. Once you've done this, open a terminal and type 'winetricks --no-isolate steam' then when Steam has been installed and you've downloaded the game, 'winetricks strictdrawordering=enabled'. Look to the 'Notes/Troubleshooting' section for further information on known bugs and workarounds.

    PlayOnLinux:
    1. Download PlayOnLinux by following the directions on the PlayOnLinux website.
    2. Install the latest version of WINE - at least 1.5.13 - choose 'Tools' -> 'Manage WINE versions' then select either amd64 or x86 (either is fine) and '>' to install it.
    3. Install Steam or ARMA II. Choose 'Install' then 'Install a non-listed program' in the bottom left. Choose to 'Install a program in a new virtual drive', call it whatever you like. Tick the first option and select the version of WINE installed earlier. Choose the ARMA II or Steam installer and follow the prompts - remember that you can move your old installation to the new prefix, look in .PlayOnLinux/wineprefix/PREFIXNAME/drive_c for your virtual 'C drive'.
    4. Install required libraries and fixes. Click 'Configure' and select your new prefix, under 'Install Packages' choose to install 'xact'. Under 'Display', set 'Strict Draw Ordering' to 'enabled' and 'Video memory size' to your videocard's memory size.
    5. Play! Double-click the Steam or ARMA II icon in the PlayOnLinux menu and play the game.


    Manual build and install:

    If you're comfortable with managing multiple WINE versions and compiling your own software, here's the information you need:

    • WINE version 1.5.13 from WineHQ website or git
    • StrictDrawOrdering enabled in registry


    Example:
    Code:
    git clone git://source.winehq.org/git/wine.git ~/wine-git
    cd ~/wine-git
    git checkout wine-1.5.13
    mkdir ../wine-build
    cd ../wine-build
    ../wine-git/configure
    This is where you should check everything, to make sure all the features you need are included with the build of WINE you're going to be compiling. You may need to install some libraries to satisfy dependencies, here, for example any warning about xinput or opengl is bad juju!

    Code:
    make -j3
    make prefix="~/altwine" install
    Note that 'make -j3' is for a dual-core processor - your value should be the amount of cores your processor has +1 (ie, a 6-core processor should be -j7). This speeds up compiling!

    Combined Operations

    Some people have reported difficulties running ARMA II: CO from Steam - there are two ways to get around this: the easiest is to right-click on OA in Steam, go into Properties and Launcher Options and add '-mod=C:\Program Files (x86)\Steam\steamapps\common\arma 2;EXPANSION;ca' or similar (pointing to your original ARMA II folder). Next time you choose 'Play Game' and click OK it'll be CO. An alternative - especially if you want to use the latest beta version of ARMA II - is to use a bash wrapper script. You could use a few case statements for different mod combinations or servers and create a menu, even.

    Mods

    Unfortunately, the current version of SIX Updater doesn't work at all under WINE due to it's dependency on .NET 4.0. Since many mod updates are delivered exclusively over SIX Updater, this is a problem for WINE users. SIX Updater Legacy does support Linux, but both the git versions and ruby gems are woefully out-of-date, crashing with every version of ruby and gem dependencies that I tried.

    One solution is using a web interface developed by Banshee for ARMA 2 servers. This has various tools for downloading mods, starting and stopping servers and other basic administration tasks.

    Alternatively, I've modified an old script made for Linux server users by Dr. Pulp that works just fine for clients. It's pretty easy to use - simply download the script, edit the ARMA_DIR directory to point to your WINE's ARMA II or OA directory and ARMA_SYNC_DIR to point to a storage directory in which you are happy keeping copies of the mods and either edit the list of mods in the MODS variable or pass each mod through as an option ('./arma2rsync ace acex acex_ru acex_usnavy' for example).

    You'll need to make sure that you have rsync, gunzip and convmv installed through your package manager.

    View the script here, or download it here, copy it to a folder of your choice and rename it to 'something.sh', the 'something' being entirely up to you. Make it executable (either chmod +x something.sh in the console or right-click, properties and allow execute permissions), edit the variables then execute in the terminal as above.

    It wouldn't be difficult to create a Mono/GTK/Qt4 wrapper or launcher to do all this from a GUI (and even launching the game or/and connecting to servers. SIX updater-ish but lite+Linux?). If there's any demand, I'll look at freeing up some time to do so.

    Success Stories

    Endotic
    GeForce GTX 550 Ti, ArchLinux Testing (amd64), NVIDIA 290.10
    • Wine 1.3.34 + Wine 1.3.36 (w/raw3)

    FreeBSD 9 (amd64)
    • Wine 1.5.1 (w/raw3)

    Funtoo (amd64), NVIDIA 302.17
    • Wine 1.5.9 (w/raw3)

    AMD Radeon 6990, Funtoo (amd64), Catalyst 12.6
    • Wine 1.5.10 (w/raw3)
    • Wine 1.5.13

    (Tentative success on the Radeon, still trying to track down some performance issues)

    Operated
    GeForce GTX 560 Ti, Slackware x86 w/PAE, Nvidia 285.05.09
    • Wine 1.3.32-1.3.36

    GeForce GTX 560 Ti, Slackware x86 w/PAE, 3.1.7-zen kernel, NVIDIA 290.10
    • Wine 1.3.37


    Notes/troubleshooting

    There are a few issues with ARMA II and WINE at the moment, these are pretty much universal across BiStudio's current generation games:
    • BattlEye doesn't work anymore - due to BattlEye relying on a function as yet unimplemented on WINE (KiUserExceptionDispatcher), you are unable to join servers that have the BattlEye software enabled.
    • LoD issues - objects flicker and disappear, and textures decrease and increase in quality apparently at random. It might occasionally throw you off a little.
    • Muzzle flashes leave an afterburn effect and the area around your weapon is generally messed up if you don't enable StrictDrawOrdering in the WINE registry. You can do this via winetricks, the script does it automatically.
    • Shadow quality settings above or below 'medium' seem to only render gun shadows. You need to set shadows to 'medium' quality to get character shadows.
    • The player profile options screen flickers, but it's still perfectly usable. Fixed? Report here
    • Don't move your mouse during loading screens or the game may crash. Fixed
    • Sometimes the mission map entities will flicker and sometimes you lose the ability to click briefly in menus - just use the keyboard (RETURN and TAB) to navigate, and it will be fixed in the next screen. It's not bugged out on me ingame yet. Fixed
    • On ARMAII and non-beta OA, antialiasing must be set to at least 'Low' or no textures will appear and everything will go grey. Fixed
    • Sound issues Sound seems fine, use winetricks to install xact and override x3daudio1_6 under winecfg -> Libraries if there are any issues.
    • If you have other problems, try adding a 'VideoMemorySize' string set to your memory in MB (eg. 2048) in HKEY_CURRENT_USER/Software/Wine/Direct3D (create the key if it does not exist) in the WINE registry. 'wine regedit' or winetricks will work if you've installed the patched version of WINE system-wide.
    • Be sure to use the propriety graphics drivers for running games under WINE if you're looking for top performance - check with 'lsmod' that either 'nvidia', 'intel' or 'fglrx' are listed as their free and open source counterparts 'nouveau' and 'radeon' tend to lack certain features required for rendering modern 3D games (though they perform excellently for 2D applications).
    • If you have any other problems, just leave me a message here - I'll get back to you. I tested this on the systems listed under 'Endotic' above.
    • You may need to use WINE version 1.3.32 to install and patch ARMA II retail (without Steam). (Thanks Operated!)
    • On the newest WINE git builds, you may need to remove the ARMA2_OGG.cmd scripts in the arma 2/OA/BFC/PMC installation directories or it could forkbomb you by attempting to use explorer to open a web page repeatedly. If you notice any sudden slowdown during 'Installing Official Game Group, try 'killall cmd.exe' in a terminal. Fixed
    • If you're looking for absolute top performance, try editing the Makefile included with the WINE sources - do some research on CFLAGS and CXXFLAGS for your particular processor. Secondly, use a performance-optimized kernel such as the pf or ck patchsets. Thirdly, try out the BFQ scheduler. Finally, look at using schedtool to switch the application's scheduling policy to SCHED_ISO (pf and ck) or SCHED_FIFO - test them both and see which works best for your use case.


    Run the Windows Server Software via WINE

    As a bonus, here's a bash script to install a minimal version of WINE to a server for running the latest ARMA 2 OA, TOH or Iron Front server application. The current ARMA II Linux dedicated server application is still in development, as the devs have noted that several library and dependency updates need to be made. It works with Ubuntu, CentOS and Debian, I'll make a version for any other Linux distro if there's any demand. Note that you must run it as a non-root user - not only is this good security practise, WINE will bug out if you try to run it as root.

    Known issue: the script can't currently su properly. If you don't have sudo and don't want it, add quotes like this: '' around all $(sudoequiv) commands.
    Code:
    Example:
      $(sudoequiv) apt-get install build-essential ia32-libs ia32-libs-dev lib32z1-dev libc6-dev-i386 libncurses5-dev libncurses5-dev libfreetype6-dev libx11-dev lib32ncurses5-dev  libxcursor-dev flex bison prelink libjpeg62-dev libpng12-dev
           BECOMES
      $(sudoequiv) 'apt-get install build-essential ia32-libs ia32-libs-dev lib32z1-dev libc6-dev-i386 libncurses5-dev libncurses5-dev libfreetype6-dev libx11-dev lib32ncurses5-dev  libxcursor-dev flex bison prelink libjpeg62-dev libpng12-dev'
    Please be patient until I resolve this

    Note that it uses Xvfb to run the server application 'headlessly' - ie. without a true x server. You can also use X11 forwarding over SSH (though this would neccessitate being constantly connected to the server) or setup x11vnc to create a VNC server that the application would run on (which would let you see errors and output). Xdotool will send keypresses to the fake X server (and any real X servers you have open) - it's used to 'OK' a possible error message concerning a missing profile file if you run the server with the wrong working directory (you should be cd'ed into the server's main directory if you run the server manually, if you didn't you'll need to kill the server process and try again, the best way to do this cleanly is 'wineserver -k') - the return keypress should not do any harm if it's not required, but you may wish to remove this part if you have another Xserver running.

    To check that the ARMA II dedicated server is running use 'ps aux | grep arma' or 'netstat -pant | grep arma' - you should see a 'wine arma2oaserver.exe ...' process running and the arma2oaserver listening on a network port.

    Note that it seems to work best with -malloc=system. On Iron Front, the -malloc switch is apparently disabled, so you can rename or remove the Dll directory instead.

    If you're looking for absolute top performance, try editing the Makefile included with the WINE sources - do some research on CFLAGS and CXXFLAGS for your particular processor. Secondly, use a performance-optimized kernel such as the pf or ck patchsets. Thirdly, try out different IO schedulers - noop, as and deadline can all perform well, noop especially if you use a ramdisk or RAID array to store your working files (note that CFQ, the default, and BFQ are unsuitable for servers). Finally - and perhaps most importantly, for high load servers, look at using schedtool to switch the server application scheduling policy to SCHED_ISO (pf and ck) or SCHED_FIFO - test them both and see which works best for your use case. Remember that these tweaks will allocate a lot of resources to the server process, possibly causing resource exhaustion or server instability if you take them too far.

    Footnote
    You can try getting PlayOnMac, downloading the latest WINE git version and updating your X11.app via XQuartz if you'd like to try on Mac OSX. No news whether this works or not.
    Last edited by Kindling; Mar 20 2013 at 00:06. Reason: Maintenance

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •