From b17869683013e35f7de2bec691c8b8839a278df2 Mon Sep 17 00:00:00 2001 From: etoyz Date: Thu, 20 Jul 2023 11:57:49 +0800 Subject: [PATCH 1/4] Create persistent directorys before mounting --- dochat.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dochat.sh b/dochat.sh index 692aff0..e7c9e9c 100755 --- a/dochat.sh +++ b/dochat.sh @@ -89,6 +89,10 @@ function main () { # Issue #111 - https://github.com/huan/docker-wechat/issues/111 rm -f "$HOME/DoChat/Applcation Data/Tencent/WeChat/All Users/config/configEx.ini" + # Issue #165 - https://github.com/huan/docker-wechat/issues/165#issuecomment-1643063633 + mkdir $HOME/DoChat/"WeChat Files"/ -p + mkdir $HOME/DoChat/"Applcation Data"/ + # # --privileged: enable sound (/dev/snd/) # --ipc=host: enable MIT_SHM (XWindows) @@ -100,7 +104,7 @@ function main () { -i \ \ -v "$HOME/DoChat/WeChat Files/":'/home/user/WeChat Files/' \ - -v "$HOME/DoChat/Applcation Data":'/home/user/.wine/drive_c/users/user/Application Data/' \ + -v "$HOME/DoChat/Applcation Data/":'/home/user/.wine/drive_c/users/user/Application Data/' \ -v /tmp/.X11-unix:/tmp/.X11-unix \ \ -e DISPLAY \ From 4de297a6b847585dd6bc8b8732c29165a369c5fa Mon Sep 17 00:00:00 2001 From: etoyz <2905226519@qq.com> Date: Tue, 24 Oct 2023 11:03:55 +0800 Subject: [PATCH 2/4] Fixed the shellcheck warnings --- dochat.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dochat.sh b/dochat.sh index 7ba1385..9c65340 100755 --- a/dochat.sh +++ b/dochat.sh @@ -98,8 +98,9 @@ function main () { rm -f "$HOME/DoChat/Applcation Data/Tencent/WeChat/All Users/config/configEx.ini" # Issue #165 - https://github.com/huan/docker-wechat/issues/165#issuecomment-1643063633 - mkdir $HOME/DoChat/"WeChat Files"/ -p - mkdir $HOME/DoChat/"Applcation Data"/ + HOST_DIR_HOME_DOCHAT_WECHAT_FILES = "$HOME/DoChat/WeChat Files/" + mkdir "$HOST_DIR_HOME_DOCHAT_WECHAT_FILES" -p + mkdir "$HOME"/DoChat/"Applcation Data"/ # # --privileged: enable sound (/dev/snd/) From 26d588f0909601712033f0d3213f95843db4eabc Mon Sep 17 00:00:00 2001 From: etoyz <2905226519@qq.com> Date: Tue, 24 Oct 2023 12:04:34 +0800 Subject: [PATCH 3/4] Ensure consistency --- dochat.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dochat.sh b/dochat.sh index 9c65340..014bbaf 100755 --- a/dochat.sh +++ b/dochat.sh @@ -99,8 +99,9 @@ function main () { # Issue #165 - https://github.com/huan/docker-wechat/issues/165#issuecomment-1643063633 HOST_DIR_HOME_DOCHAT_WECHAT_FILES = "$HOME/DoChat/WeChat Files/" + HOST_DIR_HOME_DOCHAT_APPLICATION_DATA = "$HOME/DoChat/Applcation Data/" mkdir "$HOST_DIR_HOME_DOCHAT_WECHAT_FILES" -p - mkdir "$HOME"/DoChat/"Applcation Data"/ + mkdir "$HOST_DIR_HOME_DOCHAT_APPLICATION_DATA" -p # # --privileged: enable sound (/dev/snd/) @@ -112,8 +113,8 @@ function main () { --rm \ -i \ \ - -v "$HOME/DoChat/WeChat Files/":'/home/user/WeChat Files/' \ - -v "$HOME/DoChat/Applcation Data/":'/home/user/.wine/drive_c/users/user/Application Data/' \ + -v "$HOST_DIR_HOME_DOCHAT_WECHAT_FILES":'/home/user/WeChat Files/' \ + -v "$HOST_DIR_HOME_DOCHAT_APPLICATION_DATA":'/home/user/.wine/drive_c/users/user/Application Data/' \ -v /tmp/.X11-unix:/tmp/.X11-unix \ \ -e DISPLAY \ From e1bdc5bd5f7ccc418ec747aecd1ef3a7f8a29e35 Mon Sep 17 00:00:00 2001 From: etoyz <2905226519@qq.com> Date: Tue, 24 Oct 2023 13:58:01 +0800 Subject: [PATCH 4/4] Fixed the shellcheck warnings --- dochat.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dochat.sh b/dochat.sh index 014bbaf..f74b26c 100755 --- a/dochat.sh +++ b/dochat.sh @@ -98,8 +98,8 @@ function main () { rm -f "$HOME/DoChat/Applcation Data/Tencent/WeChat/All Users/config/configEx.ini" # Issue #165 - https://github.com/huan/docker-wechat/issues/165#issuecomment-1643063633 - HOST_DIR_HOME_DOCHAT_WECHAT_FILES = "$HOME/DoChat/WeChat Files/" - HOST_DIR_HOME_DOCHAT_APPLICATION_DATA = "$HOME/DoChat/Applcation Data/" + HOST_DIR_HOME_DOCHAT_WECHAT_FILES="$HOME/DoChat/WeChat Files/" + HOST_DIR_HOME_DOCHAT_APPLICATION_DATA="$HOME/DoChat/Applcation Data/" mkdir "$HOST_DIR_HOME_DOCHAT_WECHAT_FILES" -p mkdir "$HOST_DIR_HOME_DOCHAT_APPLICATION_DATA" -p