├── .gitignore ├── Dockerfile ├── README.md ├── VB6.STF ├── install.sh └── vs └── .keep /.gitignore: -------------------------------------------------------------------------------- 1 | vs/ 2 | .*.sw* 3 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM telyn/wine-vcrun6 2 | MAINTAINER telyn 3 | 4 | ARG KEY 5 | ARG STF 6 | 7 | USER wine 8 | ENV HOME /home/wine 9 | ENV WINEPREFIX /home/wine/.wine 10 | ENV WINEARCH win32 11 | WORKDIR /home/wine 12 | 13 | # copy visual studio sources... 14 | COPY vs vs/ 15 | # copy SETUP into root of VS sources (needed for acmsetup) 16 | COPY vs/SETUP vs/ 17 | 18 | # copy the stf (installer template) we're working with 19 | COPY ${STF:-VB6.STF} vs/ACMSETUP.STF 20 | 21 | COPY install.sh . 22 | RUN rm -r /tmp/.wine-1000 23 | RUN ./install.sh $KEY 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This repo provides the recipe for creating a docker image with Visual Studio 6 installed under wine, so you can build vb6 projects in gitlab-ci or whatever. I don't know, whatever purpose you might have for it. 2 | 3 | To use: 4 | 5 | copy your Visual Studio/Visual Basic install media into `vs/`, such that there is a file called `vs/SETUP.EXE` 6 | 7 | Then run docker build as follows, replacing YOURKEY_HERE with the numbers of your product key (o hyphen character. 8 | 9 | docker build --build-arg KEY=YOURKEY_HERE . 10 | 11 | Eg. for the key 123-7890123, run `docker build --build-arg KEY=1237890123 .` 12 | 13 | Cross your fingers. A test is run at the end to check that the VB98 folder exists. If it does, it might work? 14 | 15 | For obvious legal reasons, I'm not providing any prebuilt images of this on docker hub nor anywhere else. 16 | 17 | 18 | If you can't run it as-is with your media you'll probably need to make your own `VB6.STF` file. In your install media, run `SETUP/ACOST.EXE`, then go to File->Open STF File, and open the STF file in the `SETUP/` folder. Tick the things you want to install, untick the things you don't, then File->Save As. Replace `VB6.STF` with your generated STF file and (if you aren't installing VB6) remove the line that checks for VB98's existence at the end of the `install.sh` script. 19 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -ex 3 | 4 | KEY=$1 5 | 6 | wineboot -u 7 | winetricks -q mfc40 8 | 9 | # finally, install vb6 10 | Xvfb :0 -auth ~/.Xauthority -screen 0 1024x768x24 >> ~/xvfb.log 2>&1 & 11 | XVFB_PID=$! 12 | sleep 3; 13 | # convince the installer that the wizard has already been run 14 | DISPLAY=:0 wine regedit.exe /s "vs\\KEY.DAT" 15 | sleep 1; 16 | 17 | DISPLAY=:0 wine "vs\\ACMSETUP.exe" /k $KEY /n Container /o None /qnt 18 | 19 | sleep 15; 20 | kill $XVFB_PID 21 | 22 | ls "/home/wine/.wine/drive_c/Program Files/Microsoft Visual Studio/" | grep VB98 23 | -------------------------------------------------------------------------------- /vs/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telyn/docker-vb6/aebc88469a053c811544849e93a8b6f9702a2c1e/vs/.keep --------------------------------------------------------------------------------