代码拉取完成,页面将自动刷新
同步操作将从 Huan/docker-wechat 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/usr/bin/env bash
#
# dochat.sh - Docker WeChat for Linux
#
# Author: Huan (李卓桓) <zixia@zixia.net>
# Copyright (c) 2020-now
#
# License: Apache-2.0
# GitHub: https://github.com/huan/docker-wechat
#
set -eo pipefail
#
# The defeault docker image version which confirmed that most stable.
#
DEFAULT_WECHAT_VERSION=2.7.1.85
#
# Get the image version tag from the env
#
DOCHAT_IMAGE_VERSION="zixia/wechat:${DOCHAT_WECHAT_VERSION:-${DEFAULT_WECHAT_VERSION}}"
function hello () {
cat <<'EOF'
____ ____ _ _
| _ \ ___ / ___| |__ __ _| |_
| | | |/ _ \| | | '_ \ / _` | __|
| |_| | (_) | |___| | | | (_| | |_
|____/ \___/ \____|_| |_|\__,_|\__|
https://github.com/huan/docker-wechat
+--------------+
/| /|
/ | / |
*--+-----------* |
| | | |
| | 盒装 | |
| | 微信 | |
| +-----------+--+
| / | /
|/ |/
*--------------*
DoChat /dɑɑˈtʃæt/ (Docker-weChat) is:
📦 a Docker image
🤐 for running PC Windows WeChat
💻 on your Linux desktop
💖 by one-line of command
EOF
}
function pullUpdate () {
if [ -n "$DOCHAT_SKIP_PULL" ]; then
return
fi
echo '🚀 Pulling the docker image...'
echo
docker pull "$DOCHAT_IMAGE_VERSION"
echo
echo '🚀 Pulling the docker image done.'
}
function main () {
hello
pullUpdate
DEVICE_ARG=()
for DEVICE in /dev/video* /dev/snd; do
DEVICE_ARG+=('--device' "$DEVICE")
done
echo '🚀 Starting DoChat /dɑɑˈtʃæt/ ...'
echo
#
# --privileged: enable sound (/dev/snd/)
# --ipc=host: enable MIT_SHM (XWindows)
#
docker run \
"${DEVICE_ARG[@]}" \
--name DoChat \
--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 /tmp/.X11-unix:/tmp/.X11-unix \
\
-e DISPLAY \
-e DOCHAT_DEBUG \
-e DOCHAT_DPI \
\
-e XMODIFIERS=@im=fcitx \
-e GTK_IM_MODULE=fcitx \
-e QT_IM_MODULE=fcitx \
-e AUDIO_GID="$(getent group audio | cut -d: -f3)" \
-e VIDEO_GID="$(getent group video | cut -d: -f3)" \
-e GID="$(id -g)" \
-e UID="$(id -u)" \
\
--ipc=host \
--privileged \
\
"$DOCHAT_IMAGE_VERSION"
echo
echo "📦 DoChat Exited with code [$?]"
echo
echo '🐞 Bug Report: https://github.com/huan/docker-wechat/issues'
echo
}
main
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。