init
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Simon Bruder 2020-01-26 16:23:54 +00:00
commit 596af5d082
No known key found for this signature in database
GPG key ID: 6F03E0000CC5B62F
6 changed files with 84 additions and 0 deletions

13
.drone.yml Normal file
View file

@ -0,0 +1,13 @@
kind: pipeline
name: default
steps:
- name: docker
image: plugins/docker
settings:
registry: r.sbruder.de
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: r.sbruder.de/ade

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
config
data

44
Dockerfile Normal file
View file

@ -0,0 +1,44 @@
FROM tianon/wine
RUN apt-get update \
&& apt-get -y install \
cabextract \
wget \
xvfb \
&& rm -rf /var/lib/apt/lists/*
RUN wget -nv -O /usr/local/bin/winetricks https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks \
&& chmod +x /usr/local/bin/winetricks
RUN adduser --gecos '' --disabled-password wine
ENV WINEARCH=win32
USER wine
RUN wineboot \
&& sh -c ' \
Xvfb :0 & \
export DISPLAY=:0 \
&& winetricks -q corefonts \
&& winetricks -q windowscodecs' \
&& rm -rf /home/wine/.cache/winetricks/
RUN sh -c ' \
Xvfb :0 & \
DISPLAY=:0 winetricks -q dotnet35sp1' \
&& rm -rf /home/wine/.cache/winetricks/
# headless instalation does not work → manual intallation and copying of
# installed files
#
#RUN cd /tmp \
# && wget -nv 'https://download.adobe.com/pub/adobe/digitaleditions/ADE_2.0_Installer.exe' \
# && wine ADE_2.0_Installer.exe \
# && rm ADE_2.0_Installer.exe
ADD ["ade.tar.xz", "/home/wine/.wine/drive_c/Program Files/Adobe/"]
RUN cp /home/wine/.wine/user.reg /home/wine/.wine/user.reg.factory
COPY entrypoint.sh /
ENTRYPOINT ["/entrypoint.sh"]

BIN
ade.tar.xz Normal file

Binary file not shown.

7
entrypoint.sh Executable file
View file

@ -0,0 +1,7 @@
#!/bin/sh
if ! [ -s "$HOME/.wine/reg/user.reg" ]; then
cp "$HOME/.wine/user.reg.factory" "$HOME/.wine/reg/user.reg"
fi
rm "$HOME/.wine/user.reg"
ln -s "$HOME/.wine/reg/user.reg" "$HOME/.wine/user.reg"
wine "$HOME/.wine/drive_c/Program Files/Adobe/Adobe Digital Editions 2.0/DigitalEditions.exe"

18
run.sh Executable file
View file

@ -0,0 +1,18 @@
#!/bin/sh
root_dir="$(dirname $(realpath $0))"
mkdir -p \
"$root_dir/config/ade/" \
"$root_dir/config/reg/" \
"$root_dir/data/"
docker run \
--rm \
-it \
-e DISPLAY \
-v $PWD:/data:ro \
-v /tmp/.X11-unix/:/tmp/.X11-unix/ \
-v "$root_dir/config/ade/:/home/wine/.wine/drive_c/users/wine/Local Settings/Application Data/Adobe_Systems_Incorporate" \
-v "$root_dir/config/reg:/home/wine/.wine/reg" \
-v "$root_dir/data/:/home/wine/My Digital Editions/" \
r.sbruder.de/ade