Aterfax / DCS-World-Dedicated-Server-Docker

Modular DCS World Dedicated Server docker.
GNU General Public License v3.0
30 stars 6 forks source link

Adds DCS-Retribution #47

Closed N1v0k closed 3 months ago

N1v0k commented 3 months ago

I thought I'll just show you what I've done. You can tell me how you want to proceed.

My thought was to seperate the script into it'so wn s6 service, I think that would be the cleanest way. What do you think?

N1v0k commented 3 months ago

If you want to try and spin it up, I've built an image for testing: gmentsik/dcs-srv-retribution:v0.1-a

version: '3.3'
services:
  dcs-world-dedicated-server:
    container_name: dcs-world-dedicated-server
    hostname: dcs-world-dedicated-server
    environment:
      - PUID=$PUID
      - PGID=$PGID
      - TZ=$TZ
      - PASSWORD=$VNCPASSWORD
      - DCSAUTOINSTALL=${DCSAUTOINSTALL:-0}
      - DCSMODULES=${DCSMODULES:-}
      - FORCEREINSTALL=${FORCEREINSTALL:-0}
      - AUTOSTART=${AUTOSTART:-0}
      - TIMEOUT=${TIMEOUT:-30}
      - RETRIBUTION_EXPORT_DIR=${RETRIBUTION_EXPORT_DIR}
      - SERVER_BIND_ADDRESS=${SERVER_BIND_ADDRESS}
    ports:
      # Webtop WebGUI ports
      - '3000:3000/tcp' # Webtop HTTP port - TCP only.
      - '3001:3001/tcp' # Webtop HTTPs port - TCP only.
      # DCS server Ports
      - '10308:10308/tcp' # Multiplayer game traffic - TCP.
      - '10308:10308/udp' # Multiplayer game traffic - UDP.
      #- '10309:10309/tcp' # Multiplayer game VOIP traffic - TCP - Uncomment if in game VOIP is desired.
      #- '10309:10309/udp' # Multiplayer game VOIP traffic - UDP - Uncomment if in game VOIP is desired.
      - '8088:8088' # Uncomment to enable remote web control webGUI from the Eagle Dynamics website - TCP only.

      # Tacview ports
      #- '42674:42674/tcp' # Uncomment to enable TacView Real-time Telemetry if in use - TCP only.
      #- '42675:42675/tcp' # Uncomment to enable TacView Remote Control if in use - TCP only.

      # DCS SimpleRadio Standalone (DCS-SRS) ports
      #- '5002:5002/tcp' # Uncomment to enable DCS SimpleRadio Standalone (DCS-SRS) - TCP and UDP.
      #- '5002:5002/udp' # Uncomment to enable DCS SimpleRadio Standalone (DCS-SRS) - TCP and UDP.
    volumes:
      - '${PWD}/data:/config/'
    # Setting seccomp to unconfined with security_opt is necessary if you encounter 'Failed to execute child process "bash": Failed to fdwalk: Operation not permitted' errors.
    # You should not unconfine unless necessary.
    # See also: https://docs.linuxserver.io/images/docker-webtop/#application-setup
    #security_opt:
      #- seccomp=unconfined
    restart: always
    image: gmentsik/dcs-srv-retribution:v0.1-a
VNCPASSWORD=abc123
PUID=1000
PGID=1000
TZ=Europe/Vienna
# DCSAUTOINSTALL should be either 1 or 0 and controls whether the docker container will attempt to automatically install the DCS server.
DCSAUTOINSTALL=1
# The DCSMODULES list should be supplied as a whitespace separated list of modules as per:
# https://forum.dcs.world/topic/324040-eagle-dynamics-modular-dedicated-server-installer/"
DCSMODULES="SUPERCARRIER CAUCASUS_terrain NEVADA_terrain PERSIANGULF_terrain SYRIA_terrain"
# FORCEREINSTALL should be either 1 or 0 and controls whether the installer will forcefully remove existing installations when (re)installing the DCS server.
FORCEREINSTALL=0
# AUTOSTART should be either 1 or 0 and controls whether the DCS Server will autostart.
AUTOSTART=1
# TIMEOUT should be a whole number of seconds and controls the interval between various "liveness" checks.
TIMEOUT=60
# Do not change this, because DCS-Retribution QT-App is ignoring this value and won't find the state.json
RETRIBUTION_EXPORT_DIR="C:\users\abc\Saved Games\dcs-retribution"
# Do not change, otherwise DCS-Retribution tries to bind on an ip adress that is not available in wine
SERVER_BIND_ADDRESS="0.0.0.0"
Aterfax commented 3 months ago

I'll probably need to rework this a little bit into a separate script to get the execution ordering clean while keeping scripts separated / coherent with their purpose.

Can you let me know what the origin of these files is:

If there's a WINE native method for adding the fonts I'd probably opt for that basis.

N1v0k commented 3 months ago

Hi,

yes - refactoring it into its own s6 services would have been my next step, didn't use s6 before so I'll have to dig into the docs first.

fontsmoothing.reg was exported by myself, it's needed because retributions UI is unreadable otherwise.

courbd.ttf is from my windows install, I couldn't find the license or a proper policy. It is unfortunately hard coded into retribution but the dev would be open to change the font into something open source.

Don't know enough about fonts and QT but maybe one can just place an open source font inti the directory with that name, didn't try that yet

N1v0k commented 3 months ago

Hi there!

So I've tried replacing courbd.ttf with an opensource TTF and just naming it coubd.ttf this worked.

Aterfax commented 3 months ago

I think we can probably just use winetricks to install the courier or MS Core fonts to fix the fonts issue given https://learn.microsoft.com/en-us/typography/font-list/courier-new

i.e.

sudo -u abc /usr/bin/winetricks --unattended corefonts 
Aterfax commented 3 months ago

I've added a new PR that I want to do a bit more testing on before making part of the image. See: https://github.com/Aterfax/DCS-World-Dedicated-Server-Docker/pull/56

The use of WINE to install fonts appeared to break the installation process / GUI display for some things and I've not validated if we're avoiding that correctly in the PR yet.

If you could give the PR a test I'd appreciate it, ty!

Aterfax commented 3 months ago

Closing as this was implemented in https://github.com/Aterfax/DCS-World-Dedicated-Server-Docker/pull/56.