Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: MapleStory v62 part 2

  1. #1
    Join Date
    Jul 2018
    Beans
    12

    MapleStory v62 part 2

    Hello.

    I want to resurface this problem here https://ubuntuforums.org/showthread.php?t=2396397

    I am able to get it working on a Mint 18.3 VM. See the screenshots.

    https://i.imgur.com/zRZGMsb.png

    https://i.imgur.com/zRZGMsb.png

    https://i.imgur.com/FT6XtKP.png

    https://i.imgur.com/FT6XtKP.png


    Essentially I just do
    Code:
    sudo apt-get update
    sudo apt-get install -y wine
    And the wine version is 1.6.2.

    Then I get the MapleStory files and also the ws2 DLLs into the .wine directory. Then I do
    Code:
    wine Clean_Localhost_v62.exe 172.17.0.3 8484
    But as it is possible to run GUI applications using docker, I have tried to replicate it with no success. The Dockerfile is as follows

    Code:
    FROM linuxmintd/mint18-i386
    
    RUN apt-get update
    RUN apt-get install -y wine
    
    COPY MapleStory MapleStory
    COPY Clean_Localhost_v62.exe MapleStory/Clean_Localhost_v62.exe
    It will install Mint 18.3 and also wine 1.6.2. Now to run it, the commands are as follows.

    Host:
    Code:
    docker run -it -e DISPLAY=$DISPLAY -e USER_UID=1000 -e USER_GID=1000 -e USER_NAME=foobar -e PULSE_SERVER=/run/pulse/native -v /tmp/.X11-unix:/tmp/.X11-unix -v /run/user/1000/pulse:/run/pulse --rm foo bash
    Container:
    Code:
    groupadd -f -g $USER_GID $USER_NAME
    adduser --disabled-login --uid $USER_UID --gid $USER_GID --gecos '' $USER_NAME
    sudo -HEu $USER_NAME winecfg
    Windows 98 is selected

    https://i.imgur.com/eNkXamV.png

    https://i.imgur.com/eNkXamV.png


    Host (to get the 2 DLLs into the container)
    Code:
    docker cp ws2_32.dll $CID:/home/foobar/.wine/drive_c/windows/system32/
    docker cp ws2help.dll $CID:/home/foobar/.wine/drive_c/windows/system32/
    Then finally in the container
    Code:
    cd MapleStory
    sudo -HEu $USER_NAME wine Clean_Localhost_v62.exe 172.17.0.3 8484
    And this is where the error comes up

    https://i.imgur.com/DhG0xK5.png

    https://i.imgur.com/DhG0xK5.png


    Is there something that I'm missing? It is totally possible to run GUIs on docker (even with audio), see: https://github.com/sameersbn/docker-browser-box
    Any help is appreciated.
    Last edited by DuckHook; September 1st, 2019 at 04:34 AM. Reason: Convert large images to links

  2. #2
    Join Date
    Jul 2018
    Beans
    12

    Re: MapleStory v62 part 2

    The VM solution curiously seems to work with only Mint 18.3 with wine 1.6.2. I've tried VMs using the latest Ubuntus as of the time of this writing (18.04 LTS and 19.04) with wine 4, but both cases lead to the runtime error.

  3. #3
    Join Date
    Jul 2018
    Beans
    12

    Re: MapleStory v62 part 2

    This is a log file that's auto-generated by wine. I'm not sure how to proceed.

    Code:
    ==== 2019/12/29 20:59:15.151 ==============================
    PID(8), TID(9)
    Exception code: E06D7363 
    Fault Address:  7B43E06C 01:0001D06C
    Module: C:\windows\system32\KERNEL32.dll
    
    Registers:
    EAX:7B42A621
    EBX:00000008
    ECX:0032FD60
    EDX:0032FDF0
    ESI:0032FE20
    EDI:0032FDFC
    CS:EIP:320023:7B43E06C
    SS:ESP:F40E002B:0032FD34  EBP:0032FDB8
    DS:7C76002B  ES:F7D2002B  FS:E3F90063  GS:7C32006B
    Flags:00000212
    DBGHELP.DLL or its exported functions not found
    
    Call stack:
    Address   Frame     Logical addr  Module
    7B43E06C  0032FDB8  0001:0001D06C C:\windows\system32\KERNEL32.dll
    00879C0B  0032FDFC  0001:00478C0B Z:\home\a\Desktop\MapleStory\Clean_Localhost_v62.exe
    00473C31  0032FE14  0001:00072C31 Z:\home\a\Desktop\MapleStory\Clean_Localhost_v62.exe
    006449EF  0032FEC0  0001:002439EF Z:\home\a\Desktop\MapleStory\Clean_Localhost_v62.exe
    7B4637D2  0032FED8  0001:000427D2 C:\windows\system32\KERNEL32.dll
    7B465A8E  0032FFD8  0001:00044A8E C:\windows\system32\KERNEL32.dll
    7B4637DE  0032FFEC  0001:000427DE C:\windows\system32\KERNEL32.dll

  4. #4
    Join Date
    Jul 2018
    Beans
    12

    Re: MapleStory v62 part 2

    I tried again with ubuntu 19.10 and the latest wine stable (5.0) as of this writing. It still doesn't work. The stack trace is similiar to last time.

    Code:
    ==== 2020/1/31 16:46:43.402 ==============================
    PID(8), TID(9)
    Exception code: E06D7363 
    Fault Address:  7B00DEB2 01:0000CEB2
    Module: C:\windows\system32\kernelbase.dll
    
    Registers:
    EAX:0032FDD4
    EBX:0032FE90
    ECX:0032FE60
    EDX:00000008
    ESI:008F3EB8
    EDI:0032FE6C
    CS:EIP:7BC70023:7B00DEB2
    SS:ESP:32002B:0032FDC8  EBP:0032FE6C
    DS:F7BA002B  ES:F7C5002B  FS:960063  GS:CCFF006B
    Flags:00000246
    DBGHELP.DLL or its exported functions not found
    
    Call stack:
    Address   Frame     Logical addr  Module
    7B00DEB2  0032FE6C  0001:0000CEB2 C:\windows\system32\kernelbase.dll
    00473C31  0032FE84  0001:00072C31 Z:\home\a\Desktop\MapleStory\Clean_Localhost_v62.exe
    006449EF  0032FF30  0001:002439EF Z:\home\a\Desktop\MapleStory\Clean_Localhost_v62.exe
    7B454892  0032FF48  0001:00033892 C:\windows\system32\kernel32.dll
    7B454D0C  0032FFD8  0001:00033D0C C:\windows\system32\kernel32.dll
    7B45489E  0032FFEC  0001:0003389E C:\windows\system32\kernel32.dll

  5. #5
    Join Date
    Jul 2018
    Beans
    12

    Re: MapleStory v62 part 2

    Any takers? I've tried using debian buster and wine 5.14 today. Same problem. To install wine is a bit more complicated, so here is the Dockerfile for that:

    Code:
    FROM debian:buster
    
    RUN apt-get update && apt-get install -y --install-recommends wget gnupg2
    RUN dpkg --add-architecture i386
    RUN wget -nc https://dl.winehq.org/wine-builds/winehq.key
    RUN apt-key add winehq.key
    RUN echo "deb https://dl.winehq.org/wine-builds/debian/ buster main" >> /etc/apt/sources.list
    RUN apt-get update
    RUN wget https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/Debian_10/amd64/libfaudio0_20.01-0~buster_amd64.deb
    RUN apt-get install -y --install-recommends libavcodec58 libsdl2-2.0-0 libstb0
    RUN dpkg -i libfaudio0_20.01-0~buster_amd64.deb
    RUN wget https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/Debian_10/i386/libfaudio0_20.01-0~buster_i386.deb
    RUN apt-get install -y --install-recommends libavcodec58:i386 libsdl2-2.0-0:i386 libstb0:i386
    RUN dpkg -i libfaudio0_20.01-0~buster_i386.deb
    RUN apt-get install -y --install-recommends wine-devel
    RUN apt-get install -y --install-recommends winehq-devel

  6. #6
    Join Date
    Jul 2018
    Beans
    12

    Re: MapleStory v62 part 2

    Out of curiousity I tried the latest stable release of wine (6.0 as I write this).

    On a brand new Debian 10.7 install in a VM, I was able to get the game running with a critical step.

    Install stable wine by following these steps https://wiki.winehq.org/Debian
    WINEARCH=win32 winecfg to initialize the ~/.wine directory and choose Windows Version to be Windows 98 as before https://i.imgur.com/kj1lNJQ.png
    The critical step here is to also check the Emulate a virtual desktop flag. Without this, wine with maplestory won't work https://i.imgur.com/5QTOKf4.png
    Copy ws2help.dll and ws2_32.dll into ~/.wine/drive_c/windows/system32/
    Execute the exe with WINEARCH=win32 wine <your exe> <server ip> <server port>. In my case, I had a localhost v62 server running on a LAN server. https://i.imgur.com/lVD0D3u.png

    I tried to replicate these VM steps in a docker container and although the C++ runtime error doesn't happen anymore, the game still doesn't work.


    Dockerfile:

    Code:
    FROM debian:buster
    
    ARG USER_UID
    ARG USER_GID
    ARG USER_NAME
    
    RUN apt-get update \
      && apt-get install -y --install-recommends curl \
        ca-certificates \
        libgtk-3-0 \
        libx11-xcb-dev \
        libdbus-glib-1-dev \
        libxt-dev \
        pulseaudio \
        libcanberra-gtk3-module \
        gnupg2 \
      && dpkg --add-architecture i386 \
      && curl -fsSLO https://dl.winehq.org/wine-builds/winehq.key \
      && apt-key add winehq.key \
      && rm winehq.key \
      && echo "deb https://dl.winehq.org/wine-builds/debian/ buster main" >> /etc/apt/sources.list \
      && apt-get update \
      && apt-get install -y --install-recommends \
        libavcodec58:i386 \
        libsdl2-2.0-0:i386 \
        libstb0:i386 \
        libavcodec58 \
        libsdl2-2.0-0 \
        libstb0 \
      && curl -fsSLO https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/Debian_10/i386/libfaudio0_20.01-0~buster_i386.deb \
      && dpkg -i libfaudio0_20.01-0~buster_i386.deb \
      && rm libfaudio0_20.01-0~buster_i386.deb \
      && curl -fsSLO https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/Debian_10/amd64/libfaudio0_20.01-0~buster_amd64.deb \
      && dpkg -i libfaudio0_20.01-0~buster_amd64.deb \
      && rm libfaudio0_20.01-0~buster_amd64.deb \
      && apt-get install -y --install-recommends \
        wine-stable-i386 \
        wine-stable-amd64 \
        wine-stable \
        winehq-stable \
      && rm -rf /var/lib/apt/lists/*
    
    RUN groupadd --gid $USER_GID $USER_NAME \
      && useradd --uid $USER_UID --gid $USER_GID --shell /bin/bash --create-home $USER_NAME
    
    USER $USER_NAME
    WORKDIR /home/$USER_NAME
    To build it, populate the 3 args

    Code:
    docker build \
      --build-arg USER_UID=`id -u` \
      --build-arg USER_GID=`id -g` \
      --build-arg USER_NAME=`whoami` \
      -t wine .
    And to run the image

    Code:
    #!/usr/bin/env bash
    
    USER_NAME=`whoami`
    USER_UID=`id -u`
    docker run -it \
      -e DISPLAY=$DISPLAY \
      -e PULSE_SERVER=/run/pulse/native \
      -v /tmp/.X11-unix:/tmp/.X11-unix \
      -v /run/user/$USER_UID/pulse:/run/pulse \
      -v `pwd`/MapleStory:/home/$USER_NAME/MapleStory \
      --rm wine bash
    Once inside the container, do the same setup as in the VM

    Code:
    WINEARCH=win32 winecfg
    Choose Windows 98, and Emulate a virtual desktop
    Copy the 2 dlls into the container path ~/.wine/drive_c/windows/system32/ using docker cp
    WINEARCH=win32 wine <your exe> <server ip> <server port>
    I was hopeful that this would work, as it finally gets past the C++ runtime error, but there is still an error in the docker container https://i.imgur.com/7XDNyfM.png

    Code:
    libGL error: No matching fbConfigs or visuals found
    libGL error: failed to load driver: swrast
    X Error of failed request:  BadValue (integer parameter out of range for operation)
      Major opcode of failed request:  151 (GLX)
      Minor opcode of failed request:  3 (X_GLXCreateContext)
      Value in failed request:  0x0
      Serial number of failed request:  250
      Current serial number in output stream:  254

  7. #7
    Join Date
    Jul 2018
    Beans
    12

    Re: MapleStory v62 part 2

    Success!

    I managed to get a completely dockerized v62 setup, although with a major downside.

    Huge props to https://github.com/fcwu/docker-ubuntu-vnc-desktop for making this possible.

    Dockerfile:

    Code:
    FROM dorowu/ubuntu-desktop-lxde-vnc:bionic-lxqt
    
    RUN dpkg --add-architecture i386 && \
      apt-get update && \
      apt-get install -y \
        gnupg \
        wget \
        libc6 \
        libc6:i386 \
        libsdl2-2.0-0 \
        libsdl2-2.0-0:i386
    
    RUN wget -nc https://dl.winehq.org/wine-builds/winehq.key && \
      wget https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/amd64/libfaudio0_19.07-0~bionic_amd64.deb && \
      wget https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/i386/libfaudio0_19.07-0~bionic_i386.deb && \
      dpkg -i libfaudio0_19.07-0~bionic_amd64.deb libfaudio0_19.07-0~bionic_i386.deb && \
      apt-key add winehq.key && \
      rm \
        libfaudio0_19.07-0~bionic_amd64.deb \
        libfaudio0_19.07-0~bionic_i386.deb \
        winehq.key && \
      add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main' && \
      apt-get install -y --install-recommends winehq-stable && \
      rm -rf /var/lib/apt/lists/*
    Build it:

    Code:
    DOCKER_BUILDKIT=1 docker build -t test .
    Run it:

    Code:
    docker run -it -p 8000:80 -e USER=doro -e PASSWORD=password --rm test

    Open localhost:8000 in a web browser.

    Open a terminal and run

    Code:
    WINEARCH=win32 winecfg
    https://i.imgur.com/tiwm72s.png

    Choose Windows 98
    https://i.imgur.com/c9fDR4J.png

    Check Emulate a virtual desktop
    https://i.imgur.com/5Q5wcsG.png

    Copy the MapleStory v62 client into the container. I had the directory on my host, so it was a simple docker cp command, e.g.

    Code:
    docker cp v62 $CONTAINER_ID:/home/doro
    Do the same for ws2_32.dll and ws2help.dll

    Code:
    docker cp ws2_32.dll $CONTAINER_ID:/home/doro/.wine/drive_c/windows/system32/
    docker cp ws2help.dll $CONTAINER_ID:/home/doro/.wine/drive_c/windows/system32/
    Back in the terminal (I had a dockerized instance of the v62 server running on the host), run

    Code:
    WINEARCH=win32 wine $V62_CLIENT_EXE $SERVER_IP 8484
    https://i.imgur.com/q7uAXEc.png


    Voila

    https://i.imgur.com/xrpOflT.png

    The wine version is 6.0 as I write this

    https://i.imgur.com/QtXETKF.png



    The major downside of this is that the docker image is almost 3GiB in size; that's because the base image dorowu/ubuntu-desktop-lxde-vnc:bionic-lxqt itself is a heavyweight, owing to the fact that it runs a system with a desktop envrionment and also a web server. A major improvement would be to cut out this bulky base image and run wine via a simple docker run, but I've tried on and off for a long time with zero success.


    References:

    Extending the base image with wine installed: https://github.com/fcwu/docker-ubunt...ment-530693871
    Sourcing libfaudio0 so that wine can be installed: https://askubuntu.com/a/1145491

  8. #8
    Join Date
    Jul 2018
    Beans
    12

    Re: MapleStory v62 part 2

    Out of curiousity, has anybody used Lutris before? It looks somewhat promising.

  9. #9
    Join Date
    Jul 2018
    Beans
    12

    Re: MapleStory v62 part 2

    Unfortunately, lutris didn't succeed.

    Dockerfile:
    Code:
    FROM debian:bullseye
    
    ARG USER_UID
    ARG USER_GID
    ARG USER_NAME
    
    RUN dpkg --add-architecture i386
    RUN apt-get update \
      && apt-get install -y --no-install-recommends curl \
        ca-certificates \
        gnupg2 \
      && rm -rf /var/lib/apt/lists/*
    RUN curl -fsSLO https://dl.winehq.org/wine-builds/winehq.key \
      && apt-key add winehq.key \
      && rm winehq.key \
      && echo "deb https://dl.winehq.org/wine-builds/debian/ bullseye main" >> /etc/apt/sources.list \
      && echo "deb http://download.opensuse.org/repositories/home:/strycore/Debian_10/ ./" >> /etc/apt/sources.list.d/lutris.list \
      && curl -fsSLO https://download.opensuse.org/repositories/home:/strycore/Debian_10/Release.key \
      && apt-key add Release.key \
      && rm Release.key \
      && apt-get update \
      && apt-get install -y --install-recommends winehq-stable lutris \
      && rm -rf /var/lib/apt/lists/*
    
    RUN groupadd --gid $USER_GID $USER_NAME \
      && useradd --uid $USER_UID --gid $USER_GID --shell /bin/bash --create-home $USER_NAME
    
    USER $USER_NAME
    WORKDIR /home/$USER_NAME
    Build command:
    Code:
    #!/usr/bin/env bash
    
    DOCKER_BUILDKIT=1 docker build \
      --build-arg USER_UID=`id -u` \
      --build-arg USER_GID=`id -g` \
      --build-arg USER_NAME=`whoami` \
      -t wine .
    Run it:
    Code:
    #!/usr/bin/env bash
    
    USER_NAME=`whoami`
    USER_UID=`id -u`
    docker run -it \
      --name foo \
      -e DISPLAY=$DISPLAY \
      -e PULSE_SERVER=/run/pulse/native \
      -v /tmp/.X11-unix:/tmp/.X11-unix \
      -v /run/user/$USER_UID/pulse:/run/pulse \
      -v `pwd`/maple:/home/$USER_NAME/maple \
      --rm \
      wine bash
    Once inside the container, run lutris
    Code:
    /usr/games/lutris
    Set up a game by clicking the top-left icon
    https://i.imgur.com/BmYJB9j.png

    Enter a name and choose wine as the runner
    https://i.imgur.com/gx38Vrh.png

    In game options, set Executable to be the full path of the v62 localhost, server IP and 8484 as CLI arguments, working directory as parent directory of localhost.exe, and prefix architecture as 32 bit
    https://i.imgur.com/WRbItFb.png

    Click save, then click the Games icon, then double-click maplestory to launch the game. A gibberish error will come up
    https://i.imgur.com/S8vnGRD.png

  10. #10
    Join Date
    Jul 2018
    Beans
    12

    Re: MapleStory v62 part 2

    I'm curious to know what would happen if I were to run a windows VM inside a docker container and then try running the game from that VM. Will give it a try and report back.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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