Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,21 @@ curl -sL https://raw.githubusercontent.com/huan/docker-wechat/master/dochat.sh \
| DOCHAT_WECHAT_VERSION=3.3.0.115 bash
```

### `DOCHAT_MOUNT_HOME`

Mount user's home directory to container path `/home/user/home`, which is accessable from the Choose File Dialog -> My Documents -> home.

```sh
curl -sL https://raw.githubusercontent.com/huan/docker-wechat/master/dochat.sh \
| DOCHAT_MOUNT_HOME=true bash
```

Or in case you have downloaded `dochat.sh`:

```sh
DOCHAT_MOUNT_HOME=true ./dochat.sh
```

## For Hackers

If you want to control everything by yourself, for example, open multiple WeChat PC client on your desktop; then, you might want to inspect the [dochat.sh](https://github.com/huan/docker-wechat/blob/master/dochat.sh) in our repository and try the following docker command:
Expand Down
15 changes: 11 additions & 4 deletions dochat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ function main () {
echo '🚀 Starting DoChat /dɑɑˈtʃæt/ ...'
echo

VOLUME_ARG=()

# Issue #111 - https://github.com/huan/docker-wechat/issues/111
rm -f "$HOME/DoChat/Applcation Data/Tencent/WeChat/All Users/config/configEx.ini"

Expand All @@ -103,6 +105,14 @@ function main () {
mkdir "$HOST_DIR_HOME_DOCHAT_WECHAT_FILES" -p
mkdir "$HOST_DIR_HOME_DOCHAT_APPLICATION_DATA" -p

VOLUME_ARG+=('-v' "$HOST_DIR_HOME_DOCHAT_WECHAT_FILES":'/home/user/WeChat Files/')
VOLUME_ARG+=('-v' "$HOST_DIR_HOME_DOCHAT_APPLICATION_DATA":'/home/user/.wine/drive_c/users/user/Application Data/')
VOLUME_ARG+=('-v' '/tmp/.X11-unix:/tmp/.X11-unix')
VOLUME_ARG+=('-v' "/run/user/$(id -u)/pulse":'/run/pulse')
if [ -n "$DOCHAT_MOUNT_HOME" ]; then
VOLUME_ARG+=('-v' "$HOME":'/home/user/home')
fi

#
# --privileged: enable sound (/dev/snd/)
# --ipc=host: enable MIT_SHM (XWindows)
Expand All @@ -113,10 +123,7 @@ function main () {
--rm \
-i \
\
-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 \
-v "/run/user/$(id -u)/pulse":"/run/pulse" \
"${VOLUME_ARG[@]}" \
\
-e DISPLAY \
-e DOCHAT_DEBUG \
Expand Down