diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..bb20efb --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +.git/ +.gitignore diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..898b14b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,28 @@ +FROM tianon/wine:32 + +MAINTAINER Devan Lai + +RUN apt-get -y update && apt-get install -y xvfb + +COPY bin/* /tmp/bin/ + +ENV WINEDLLOVERRIDES="mscoree,mshtml=" +RUN if [ ! -d ${WINEPREFIX:-~/.wine/} ]; then \ +xvfb-run -a wine winecfg /D && \ +/tmp/bin/waitfor.sh wineserver; \ +fi + +RUN wine reg ADD "HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion" \ +/v "ProductName" /t REG_SZ /d "Microsoft Windows Vista"; + +COPY exe/*.exe /tmp/exe/ + + +RUN xvfb-run -a wine \ +/tmp/exe/dipfree_en.exe /silent /hide; \ +/tmp/bin/waitfor.sh wineserver; \ +test -f "`winepath 'C:\\Program Files\\DipTrace\\Schematic.exe'`" && \ +test -f "`winepath 'C:\\Program Files\\DipTrace\\Pcb.exe'`"; + +RUN rm -rf /tmp/exe/ +RUN rm -rf /tmp/bin/ \ No newline at end of file diff --git a/bin/waitfor.sh b/bin/waitfor.sh new file mode 100755 index 0000000..06a5ed0 --- /dev/null +++ b/bin/waitfor.sh @@ -0,0 +1,9 @@ +#!/bin/sh +PID=`pgrep $1` +if [ -n "$PID" ]; then + while ps -p $PID > /dev/null; + do sleep 1; + done; +else + >&2 echo "Could not find process \"$1\""; +fi diff --git a/exe/dipfree_en.exe b/exe/dipfree_en.exe new file mode 100644 index 0000000..2f8b604 Binary files /dev/null and b/exe/dipfree_en.exe differ