diff --git a/ReadMe.txt b/ReadMe.txt index f8729f8..5359ce5 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -5,13 +5,14 @@ Welcome to RX3-Docker/Wine docker image! This is project aims to build a Wine + X11 + Pulse docker image able to run any windows graphic & audio application isolated. Features: - - Curtently based on rx3-docker/x11-pulse:1.2.3-mga9 image. - + - Curtently based on rx3-docker/x11-pulse:1.2.3-mga9 image, + - Support by defaul volatile Wine dir (/tmp/wine) or non volatile (~/.wine). Usage: ./bin/run.sh [-h] [-i] [Args...] + Enjoy it! Your Rx3 Team. diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index 49ae2a1..194b8e0 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -4,7 +4,8 @@ Rx3-Docker/Wine V 1.0.1 - A. GIBERT - 2025/04/14 - Now use rx3-docker/x11-pulse:1.2.3-mga9 image, - Add absolute & relative command path support, -- Add spaces support in Application Dir & Command. +- Add spaces support in Application Dir & Command, +- Add '-n' for non volatile Wine dir. diff --git a/bin/run.sh b/bin/run.sh index 3794cbc..d3a2dfe 100755 --- a/bin/run.sh +++ b/bin/run.sh @@ -8,21 +8,34 @@ APPL_HOME_DIR="$(dirname "$(dirname "$0")")" #------------------------------------------------------------------------------- -if [[ "$1" == "-h" ]] -then - echo "usage: run.sh [-h] [-i] [Args...]" - echo "with -i enabling internet access." - - exit 0 -fi +export APPL_NETWORK="no-internet" +Pre_Cmd="export WINEPREFIX=/tmp/wine; mkdir /tmp/wine;" + + +while [[ "$1" == "-h" || "$1" == "-i" || "$1" == "-n" ]] +do + if [[ "$1" == "-h" ]] + then + echo "usage: run.sh [-h] [-n] [-i] [Args...]" + echo "with -i enabling internet access," + echo "with -n enabling non volatile wine directory." + + exit 0 + fi + + if [[ "$1" == "-i" ]] + then + shift; + export APPL_NETWORK="internet" + fi + + if [[ "$1" == "-n" ]] + then + shift; + Pre_Cmd="" + fi +done -if [[ "$1" == "-i" ]] -then - shift; - export APPL_NETWORK="internet" -else - export APPL_NETWORK="no-internet" -fi export APPL_DIR="$1" shift @@ -43,6 +56,6 @@ cd "${APPL_HOME_DIR}" sbin/docker_mk_env -docker compose run --rm wine /usr/local/sbin/user_add_exec ${USER_ID} ${USER} ${HOME} ${GROUP_ID} ${GROUP_NAME} "${APPL_DIR}" "${APPL_NAME}" "$@" +docker compose run --rm wine /usr/local/sbin/user_add_exec ${USER_ID} ${USER} ${HOME} ${GROUP_ID} ${GROUP_NAME} "${APPL_DIR}" ${Pre_Cmd} "${APPL_NAME}" "$@" docker compose down