Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. BO2 Server Hosting Support
  3. Linux/Wine server install tips

Linux/Wine server install tips

Scheduled Pinned Locked Moved BO2 Server Hosting Support
11 Posts 4 Posters 1.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • chacha18undefined Offline
    chacha18undefined Offline
    chacha18
    wrote on last edited by
    #1

    1/ Intro:

    This post is not a guide / nor a tutorial (yet) but a memory of what I personally did to make plutonium work on Linux/Debian.
    I hope it will help you guys configuring a COD BO2/MW3 server using recent WINE version with ESYNC patch (better performances)
    This technic can be applied to other games with few modifications, including others plutonium flavors
    (However, ESYNC is not going to help all games, you have to make benchmarks.)
    If you follow those steps and find issues feel free to post them here, and I will try to make corrections.

    2/ Preparation:

    Let's start, assuming you have a computer / VM running an updated Linux version (tested with current Debian stable here).
    It will be easier with GUI as a starting point.
    I suggest making it work with a GUI VM/PC and then port it to a headless machine (or make the current one headless) when it's working well.

    Install distro version of wine (to get required deps):

    su -
    dpkg --add-architecture i386
    apt update
    apt install wine wine32 wine64 libwine libwine:i386 fonts-wine
    

    create an account for your gameserver:

    adduser codbo2server
    

    Now, logon to your new account with graphics.

    3/ Installing last Wine:

    Download wine tkg from GITHUB:
    https://github.com/Kron4ek/Wine-Builds/releases
    For instance: wine-6.0-rc5-staging-tkg-amd64.tar.xz
    extract to ~/.local/share/wine/wine-6.0-rc5-staging-tkg-amd64

    install your new prefix:

    WINEARCH=win32 WINEPREFIX=~/.local/share/wineprefix/CODBBO2 ~/.local/share/wine/wine-6.0-rc5-staging-tkg-amd64/bin/wineboot
    

    4/ Installing .NET:

    Download last winetricks script from GITHUB:
    https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
    install dotnet472:

    chmod +x ./winetricks
    WINE=~/.local/share/wine/wine-6.0-rc5-staging-tkg-amd64/bin/wine WINEARCH=win32 WINEPREFIX=~/.local/share/wineprefix/CODBBO2 ./winetricks --force dotnet472 corefonts
    

    Note: this step will take a while and will ask you for multiple confirmation in the installation process
    Note2: if it fails (sometime install script can get broken...:-/) please search a little bit on Google before asking here...
    Note3: when installer ask for reboot, do not reboot

    restart your wine prefix:

    WINEARCH=win32 WINEPREFIX=~/.local/share/wineprefix/CODBBO2 ~/.local/share/wine/wine-6.0-rc5-staging-tkg-amd64/bin/wineboot
    

    Note++: There is a free replacement of .NET : MONO , you can try it but for that you will have to use another clean wineprefix.

    5/ The game:

    Put your game in your new created prefix.
    Personnaly I created a CODBO2/CODMW3 folder in the prefix dir
    According to previous steps, put game files in:
    ~/.local/share/wineprefix/CODBBO2/drive_c/CODBO2

    Now you have to put plutonium files in the game directory.
    While it is possible to use the launcher update feature, I personally end up copying files from my PC because I had problems running the plutonium launcher GUI inside wine.
    It launches and download files, but the GUI was not displaying correctly and it instant-crashes if I click.

    I assume you now have all the files from Game and Plutonium in the game directory.

    Now, download required configuration files:
    https://github.com/ChxseH/COD-Dedicated-Server-Configs/tree/master/T6
    Put them in the game directory (.bat files are not needed)

    6/ Launch:
    You can now try to launch the gameserver with a script like this:

    WINEPATH=~/.local/share/wine/wine-6.0-rc5-staging-tkg-amd64
    export WINEARCH=win32 
    export WINEPREFIX=~/.local/share/wineprefix/CODBBO2
    export WINEESYNC=1
    KEY=<YOURKEY>
    CFG=dedicated.cfg
    PORT=27116
    
    $WINEPATH/bin/wine $WINEPREFIX/bin/plutonium-bootstratper-win32.exe t6mp 'C:\\CODBO2' +set key '$KEY' -dedicated +set sv_config $CFG +set net_port $PORT
    

    If it works, congratulation you have your working proof of concept :).
    Server is running on last wine / ms dotnet / esync enabled

    Note that wine/dotnet is very memory hungry, idle server take 500MB+ ram and it will keep growing while players get connected.

    7/ Further work:

    Next you can Google :

    • screen: to allow it to run in a convenient headless context
    • systemd: to make it start at boot
    • alotofotherstuff : tons of other cool possible features 🙂 (autorestart/autoupgrade for instance)
    1 Reply Last reply
    1
    • Minamiundefined Offline
      Minamiundefined Offline
      Minami Contributor
      wrote on last edited by
      #2

      It's really good, it will help Linux beginners 👍

      1 Reply Last reply
      0
      • chacha18undefined Offline
        chacha18undefined Offline
        chacha18
        wrote on last edited by chacha18
        #3

        8/ Update 09/01/2021 :
        In order to lauch the plutonium built-in updater you need those things:

        • install dotnet48 :
        WINE=~/.local/share/wine/wine-6.0-rc5-staging-tkg-amd64/bin/wine WINEARCH=win32 WINEPREFIX=~/.local/share/wineprefix/CODBBO2 ./winetricks --force dotnet48
        
        • install d3dcompiler_47 (native):
        WINE=~/.local/share/wine/wine-6.0-rc5-staging-tkg-amd64/bin/wine WINEARCH=win32 WINEPREFIX=~/.local/share/wineprefix/CODBBO2 ./winetricks d3dcompiler_47
        
        • install vcrun2005 and vcrun2019 (native):
        WINE=~/.local/share/wine/wine-6.0-rc5-staging-tkg-amd64/bin/wine WINEARCH=win32 WINEPREFIX=~/.local/share/wineprefix/CODBBO2 ./winetricks vcrun2005 vcrun2019
        

        GUI will launch correctly and start update process without crashing when you click on it. But when the update is finished it may crash if you have no 3D accel (it is the case for me because i'm running it on a VM).

        Still not very usable for automation because the GUI is still showing, even with "-update-only" because at the end of the process it stay opened. maybe a good idea for an update ? 😄 A silent/terminal option would be a great feature ...

        PS: Devs, pls tell me if I missed something..

        1 Reply Last reply
        1
        • Xerxesundefined Offline
          Xerxesundefined Offline
          Xerxes Plutonium Staff
          wrote on last edited by
          #4

          You could try to register ping.exe as debugger for the launcher, that's what I did on windows to get rid of the launcher.

          chacha18undefined 1 Reply Last reply
          0
          • chacha18undefined Offline
            chacha18undefined Offline
            chacha18
            replied to Xerxes on last edited by
            #5

            Xerxes How did you do that ? I know how to attach gdb but how do you attach another exe ? is it a non-documented plutonium feature ?

            1 Reply Last reply
            0
            • Xerxesundefined Offline
              Xerxesundefined Offline
              Xerxes Plutonium Staff
              wrote on last edited by
              #6

              It's a windows feature that with a bit of luck works with wine too.

              1 Reply Last reply
              0
              • chacha18undefined Offline
                chacha18undefined Offline
                chacha18
                wrote on last edited by
                #7

                Finally, I ended up with another solution:

                • launching plutonium.exe in a xvfb screen (so no more display)
                • monitoring tcp/http connection of plutonium.exe with lsof to catch end of download

                It seems to work atm !

                1 Reply Last reply
                0
                • Xerxesundefined Offline
                  Xerxesundefined Offline
                  Xerxes Plutonium Staff
                  wrote on last edited by
                  #8

                  That seems a bit over complicated considering the updater and launcher are 2 different executables, so starting the updater and then waiting until the launcher starts would work too.

                  But good job as long as it works!

                  chacha18undefined 1 Reply Last reply
                  0
                  • chacha18undefined Offline
                    chacha18undefined Offline
                    chacha18
                    replied to Xerxes on last edited by
                    #9

                    Xerxes

                    Problem is that at the end of the update process, the update windows stay opened waiting for confirmation so i dont think I had other choice...

                    Anyway, the trick is pretty easy (exports from previous script needed):

                    Xvfb :99 -ac &
                    pid=$!
                    DISPLAY=:99 $WINEPATH/bin/wine $WINEPREFIX/plutonium.exe -install-dir 'C:\\CODBO2'  -update-only
                    while [ ! "$(lsof -i | grep plutonium)" ]; do sleep 1; done
                    sleep 30
                    while [  "$(lsof -i | grep plutonium)" ]; do sleep 1; done
                    
                    killall plutonium.exe
                    kill -9 $pid
                    

                    Note1: you may need to install killall :

                    apt install killall
                    

                    Note2: you may need to launch the script in root to have the right to execute xvfb (not sure), but updater need to be executed by user, so you can add (in front of wine command) :

                    su <user> -c <command line ...>
                    
                    1 Reply Last reply
                    0
                    • Jimoundefined Offline
                      Jimoundefined Offline
                      Jimo
                      wrote on last edited by
                      #10

                      chacha18 said in Linux/Wine server install tips:

                      WINE=~/.local/share/wine/wine-6.0-rc5-staging-tkg-amd64/bin/wine WINEARCH=win32 WINEPREFIX=~/.local/share/wineprefix/CODBBO2 ./winetricks --force dotnet48

                      none of this shit work

                      chacha18undefined 1 Reply Last reply
                      0
                      • chacha18undefined Offline
                        chacha18undefined Offline
                        chacha18
                        replied to Jimo on last edited by
                        #11

                        Jimo very helpful coment...

                        1 Reply Last reply
                        0

                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Donate