Mephi00 / v-rising-wine-docker-image

MIT License
53 stars 31 forks source link

Trying to get BepInEx working. No success so far. #12

Open CJGuirao opened 2 years ago

CJGuirao commented 2 years ago

I'd like to enable this docker file to support optionally installing BepInEx and some mods. So as a first step I modified the example docker-compose.yml to be able to access the critical file locations to add it manually. (To after that work in autmating the download an installation from a mods.txt file) To archive that I had to create some named volumes so the steam folder is the same between layers and ends up with the game files where I can inject the files for a futher restart.

version: '3'
services:
  vrising:
    image: mephi00/v-rising-wine
    #build: ./v-rising-wine-docker-image/.
    container_name: v-rising
    restart: unless-stopped
    ports:
      - "9876-9877/udp"
    volumes:
      - steam:/home/steam/Steam/steamapps/common/VRisingDedicatedServer
      - saves:/saves
volumes:
  steam:
    driver: local
    driver_opts:
      type: none
      o: bind
      device: /home/myuser/vrising/steam
  saves:
    driver: local
    driver_opts:
      type: none
      o: bind
      device: /home/myuser/vrising/saves

This config allowed me to access the saves (and saves/settings) aswell to a "steam" folder where the vrising server folder is exposed. After that I just followed the instalation instructions of BepInEx (be sure that you use a Bleeding edge build).

After a few restarts and entering to the shell in the machine I can confirm that the files are were they should but nothing is working. The mod is ommited entirely.

I read in the issue tracker of BepInEx that some windows servers omit the files because there no vcrun2015 redistributable installed So I cloned the repo used the commented line in the already shared compose and proceed to modify the Dockerfile to have it avaliable.

diff --git a/Dockerfile b/Dockerfile
index a227604..46264cb 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -22,8 +22,21 @@ ENV DISPLAY=:99

 RUN winecfg

+#VCrun2015 redistributables for bepinex support
+RUN apt install -y binutils
+
+RUN curl http://ftp.de.debian.org/debian/pool/contrib/w/winetricks/winetricks_0.0+20210206-2_all.deb -o winetricks.deb
+
+RUN dpkg -i winetricks.deb
+
+RUN rm winetricks.deb
+
+##
+
 USER steam

+RUN Xvfb :0 -screen 0 1024x768x16 & DISPLAY=:0.0 winetricks -q vcrun2015
+
 RUN ./steamcmd.sh +@sSteamCmdForcePlatformType windows +login anonymous +app_update 1829350 validate +quit

 ENV V_RISING_MAX_HEALTH_MOD=1.0

I can confirm that this unorthodoxous way of installing it worked to have the 2015 redistributable in the system. but still no luck. VRsisingServer.exe still ignores the files.

do anyone know which other libraries may be needed? thoughts?

My final intention is to have a optional modding autoation just the ones in minecraft docker containers where you just set up a list of zip files to be installed.

PS: The reason I install binutils is because winetricks dependencies. The reason behind downloading winetricks from the repo with curl is because the base debian image doesn't have it in the main repo. The reason behind launching the Xvfb when installing winetricks is because weirdly winetricks requires it even with the headless -q option.

Mephi00 commented 2 years ago

Have you had any success lately or is it still not working?

CJGuirao commented 2 years ago

I was pointed to a working image of ich777 where it works. It seems that it needs an override for winhttp export WINEDLLOVERRIDES="winhttp=n,b"

You can check how they manage the mod installation here in line 57: https://github.com/ich777/docker-steamcmd-server/blob/vrising/scripts/start-server.sh