feat: excel, powerpoint, word bin

This commit is contained in:
AngeD 2023-10-15 23:03:27 +02:00
parent d907c088a1
commit 358c514d5b
6 changed files with 66 additions and 10 deletions

View File

@ -6,7 +6,7 @@ RUN apt-get update \
&& apt-get install -y --no-install-recommends \ && apt-get install -y --no-install-recommends \
ca-certificates \ ca-certificates \
curl \ curl \
locales \ locales \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
ARG URL='https://media.codeweavers.com/pub/crossover/cxlinux/demo/crossover_23.5.0-1.deb' ARG URL='https://media.codeweavers.com/pub/crossover/cxlinux/demo/crossover_23.5.0-1.deb'
RUN curl -o /co.deb "$URL" RUN curl -o /co.deb "$URL"
@ -57,5 +57,5 @@ RUN passwd -d root && useradd -md /app/ app
USER app USER app
ENV NO_AT_BRIDGE=1 \ ENV NO_AT_BRIDGE=1 \
LANG=fr_FR.UTF-8 \ LANG=fr_FR.UTF-8 \
PATH="/opt/cxoffice/bin/:$PATH" PATH="/app/bin/:/opt/cxoffice/bin/:$PATH"
CMD ["/opt/cxoffice/bin/crossover"] CMD ["crossover"]

View File

@ -1,7 +1,11 @@
#!/bin/bash -e #!/bin/bash -e
cat <<EOF >> "$HOME/.bashrc" su - -c "chown app: '$HOME'"
export FAKETIME='$(date '+%Y-%m-%d 00:00:00')' #cat <<EOF >> "$HOME/.bashrc"
EOF #export FAKETIME='$(date '+%Y-%m-%d 00:00:00')'
#EOF
ln -sf /app/.cxoffice/Microsoft_Office_2016/desktopdata/cxmenu/Shortcuts/cxoffice-fe00-*-1697392954.excel /app/bin/excel
ln -sf /app/.cxoffice/Microsoft_Office_2016/desktopdata/cxmenu/Shortcuts/cxoffice-fe00-*-1697392954.powerpnt /app/bin/powerpoint
ln -sf /app/.cxoffice/Microsoft_Office_2016/desktopdata/cxmenu/Shortcuts/cxoffice-fe00-*-1697392954.winword /app/bin/word
exec "$@" exec "$@"

View File

@ -14,7 +14,6 @@ fi
"${CRI[@]}" run --rm --name office \ "${CRI[@]}" run --rm --name office \
"${CRI_OPT[@]}" \ "${CRI_OPT[@]}" \
--network=none \ --network=none \
--userns=keep-id \
--ipc=host \ --ipc=host \
--device /dev/dri/ \ --device /dev/dri/ \
-e DISPLAY \ -e DISPLAY \
@ -25,4 +24,4 @@ fi
-v "$PWD:/mnt/:ro" \ -v "$PWD:/mnt/:ro" \
-v office:/app/ \ -v office:/app/ \
office \ office \
/opt/cxoffice/bin/crossover excel

View File

@ -18,7 +18,6 @@ fi
"${CRI[@]}" build -t office . "${CRI[@]}" build -t office .
"${CRI[@]}" run --rm --name office \ "${CRI[@]}" run --rm --name office \
"${CRI_OPT[@]}" \ "${CRI_OPT[@]}" \
--userns=keep-id \
--ipc=host \ --ipc=host \
--device /dev/dri/ \ --device /dev/dri/ \
-e DISPLAY \ -e DISPLAY \
@ -27,7 +26,7 @@ fi
-v "$XDG_RUNTIME_DIR:$XDG_RUNTIME_DIR" \ -v "$XDG_RUNTIME_DIR:$XDG_RUNTIME_DIR" \
-v /usr/share/fonts/:/usr/share/fonts/:ro \ -v /usr/share/fonts/:/usr/share/fonts/:ro \
-v "$PWD:/mnt/:ro" \ -v "$PWD:/mnt/:ro" \
-v office:/home/app/ \ -v office://app/ \
--entrypoint install.sh \ --entrypoint install.sh \
office \ office \
/opt/cxoffice/bin/cxinstaller /opt/cxoffice/bin/cxinstaller

27
powerpoint Executable file
View File

@ -0,0 +1,27 @@
#!/bin/bash -e
CRI=(podman)
CRI_OPT=()
if [ -z "$WAYLAND_DISPLAY" ]; then
CRI_OPT+=(
-e XAUTHORITY=/app/.Xauthority
-v "$XAUTHORITY:/app/.Xauthority:ro"
)
fi
"${CRI[@]}" build -t office .
"${CRI[@]}" run --rm --name office \
"${CRI_OPT[@]}" \
--network=none \
--ipc=host \
--device /dev/dri/ \
-e DISPLAY \
-e XDG_RUNTIME_DIR \
-v /tmp/.X11-unix/:/tmp/.X11-unix \
-v "$XDG_RUNTIME_DIR:$XDG_RUNTIME_DIR" \
-v /usr/share/fonts/:/usr/share/fonts/:ro \
-v "$PWD:/mnt/:ro" \
-v office:/app/ \
office \
powerpoint

27
word Executable file
View File

@ -0,0 +1,27 @@
#!/bin/bash -e
CRI=(podman)
CRI_OPT=()
if [ -z "$WAYLAND_DISPLAY" ]; then
CRI_OPT+=(
-e XAUTHORITY=/app/.Xauthority
-v "$XAUTHORITY:/app/.Xauthority:ro"
)
fi
"${CRI[@]}" build -t office .
"${CRI[@]}" run --rm --name office \
"${CRI_OPT[@]}" \
--network=none \
--ipc=host \
--device /dev/dri/ \
-e DISPLAY \
-e XDG_RUNTIME_DIR \
-v /tmp/.X11-unix/:/tmp/.X11-unix \
-v "$XDG_RUNTIME_DIR:$XDG_RUNTIME_DIR" \
-v /usr/share/fonts/:/usr/share/fonts/:ro \
-v "$PWD:/mnt/:ro" \
-v office:/app/ \
office \
word