Skip to content

Commit

Permalink
更新wechat至4.0.0.30版本,使用tint2
Browse files Browse the repository at this point in the history
  • Loading branch information
henry committed Dec 6, 2024
1 parent b26355b commit 01e02a5
Show file tree
Hide file tree
Showing 11 changed files with 895 additions and 54 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG/CHANGELOG-4.0.0.30-tint2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!-- BEGIN MUNGE: GENERATED_TOC -->
- [v4.0.0.30-tint2](#v4.0.0.30-tint2)
- [Changelog since v1.0.0.0](#changelog-since-v1.0.0.0)
- [Other notable changes](#other-notable-changes)
<!-- END MUNGE: GENERATED_TOC -->

<!-- NEW RELEASE NOTES ENTRY -->


# v4.0.0.30-tint2
## Changelog since v1.0.0.0
### Other notable changes
- Wechat版本更新为4.0.0.30
- Fcitx更新为Fcitx5
- 容器默认配置了输入法,不需要用户手动设置,使用`Left Shift`切换中英文
- Wechat拨打语音和视频不会崩溃
3 changes: 3 additions & 0 deletions CHANGELOG/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# CHANGELOGs

- [CHANGELOG-4.0.0.30-tint2.md](./CHANGELOG-4.0.0.30-tint2.md)
46 changes: 13 additions & 33 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,56 +6,36 @@ ENV GTK_IM_MODULE=fcitx
ENV QT_IM_MODULE=fcitx
ENV XMODIFIERS=@im=fcitx

COPY /packages/wechat-beta_1.0.0.145_amd64.deb /tmp/

RUN \
echo "**** add icon ****" && \
curl -o \
/kclient/public/icon.png \
https://open.weixin.qq.com/zh_CN/htmledition/res/assets/res-design-download/icon16_wx_logo.png && \
echo "**** Lift login restrictions ****" && \
curl -L -o /tmp/weixin_2.1.1_amd64.deb http://archive.ubuntukylin.com/software/pool/partner/weixin_2.1.1_amd64.deb && \
dpkg -X /tmp/weixin_2.1.1_amd64.deb /tmp/out && \
cp /tmp/out/usr/lib/libactivation.so /usr/lib/libactivation.so && \
cp /tmp/out/etc/.kyact /etc/.kyact && \
cp /tmp/out/etc/LICENSE /etc/LICENSE && \
echo 'DISTRIB_ID=Kylin\nDISTRIB_RELEASE=V10\nDISTRIB_CODENAME=kylin\nDISTRIB_DESCRIPTION="Kylin V10 SP1"\nDISTRIB_KYLIN_RELEASE=V10\nDISTRIB_VERSION_TYPE=enterprise\nDISTRIB_VERSION_MODE=normal' > /etc/lsb-release && \
echo "**** download packages ****" && \
curl -o /tmp/WeChatLinux_x86_64.deb \
https://dldir1v6.qq.com/weixin/Universal/Linux/WeChatLinux_x86_64.deb && \
echo "**** install packages ****" && \
apt-get update && \
apt-get install --no-install-recommends -y \
libqt5gui5 \
thunar \
tint2 && \
apt-get install -y --no-install-recommends \
libxrandr2 \
libxkbcommon0 \
libxkbcommon-x11-0 \
libxcb-icccm4 \
libxcb-glx0 \
libxcb-randr0 \
libxcb-shm0 \
libxcb-render0 \
libxcb-image0 \
libxcb-xfixes0 \
libxcb-shape0 \
libxcb-sync1 \
libxcb-render-util0 \
libxcb-keysyms1 \
libx11-xcb1 \
libfontconfig1 \
libatomic1 \
libatk1.0-0 \
libxcb-keysyms1 \
libatk-bridge2.0-0 && \
libxkbcommon-x11-dev \
libxcb-icccm4-dev \
libxcb-image0-dev \
libxcb-render-util0-dev \
libxcb-keysyms1-dev && \
apt-get install -y --no-install-recommends \
/tmp/WeChatLinux_x86_64.deb
RUN \
apt-get install -y \
fonts-noto-cjk \
im-config \
zenity \
fcitx \
fcitx-googlepinyin \
fcitx-config-gtk && \
apt-get install -y --no-install-recommends \
/tmp/wechat-beta_1.0.0.145_amd64.deb && \
fcitx5 \
fcitx5-chinese-addons && \
echo "**** openbox tweaks ****" && \
sed -i \
's/NLMC/NLIMC/g' \
Expand Down
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

11 changes: 3 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
```yaml
services:
wechat:
image: sassv/wechat:latest
image: sassv/wechat-tint2:latest
container_name: wechat
security_opt:
- seccomp:unconfined #optional
Expand Down Expand Up @@ -80,7 +80,7 @@ docker run -d \
--device /dev/dri:/dev/dri \
--shm-size="4gb" \
--restart unless-stopped \
sassv/wechat:latest
sassv/wechat-tint2:latest
```
## 参数
容器是通过在运行时传递的参数(如上述所示)进行配置的。这些参数用冒号分隔,并分别表示`< external >:< internal >`。例如,`-p 8080:80` 将使容器内的80端口可以从容器外部的主机 IP 的8080端口上进行访问。
Expand Down Expand Up @@ -137,13 +137,8 @@ server {
}
```
## 输入法
此镜像默认已安装中文语言包、fcitx输入法框架、googlepinyin输入法。但是还需要对输入法进行配置。
- 浏览器打开Web界面[http://yourhost:3000](http://yourhost:3000)
- 激活输入法(点击右一小企鹅图标)
- 配置输入法(点击左一小企鹅图标)
- 在输入法配置界面中全局配置选项卡设置切换激活/非激活输入法的快捷键(建议shift+空格)
此镜像默认已安装中文语言包、fcitx5输入法框架、pinyin输入法, 使用`Left Shift`切换中英文输入法。

## 已知问题
- KasmVNC不能使用启用本地输入法选项
- 微信不能接打语音电话和视频电话(微信会崩溃)

1 change: 0 additions & 1 deletion packages/.gitattributes

This file was deleted.

3 changes: 0 additions & 3 deletions packages/wechat-beta_1.0.0.145_amd64.deb

This file was deleted.

3 changes: 0 additions & 3 deletions packages/weixin_2.1.1_amd64.deb

This file was deleted.

111 changes: 111 additions & 0 deletions root/defaults/autostart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,117 @@ if [ ! -f $HOME/.config/tint2/tint2rc ]; then
cp /defaults/tint2rc $HOME/.config/tint2/tint2rc
fi

# set fcitx5 config
if [ ! -f $HOME/.config/fcitx5/config ];then
mkdir -p $HOME/.config/fcitx5
cat > $HOME/.config/fcitx5/config <<-'EOF'
[Hotkey]
# Enumerate when press trigger key repeatedly
EnumerateWithTriggerKeys=True
# Skip first input method while enumerating
EnumerateSkipFirst=False

[Hotkey/TriggerKeys]
0=Shift+Shift_L
1=Zenkaku_Hankaku
2=Hangul

[Hotkey/AltTriggerKeys]
0=Shift_L

[Hotkey/EnumerateForwardKeys]
0=Control+Shift_L

[Hotkey/EnumerateBackwardKeys]
0=Control+Shift_R

[Hotkey/EnumerateGroupForwardKeys]
0=Super+space

[Hotkey/EnumerateGroupBackwardKeys]
0=Shift+Super+space

[Hotkey/ActivateKeys]
0=Hangul_Hanja

[Hotkey/DeactivateKeys]
0=Hangul_Romaja

[Hotkey/PrevPage]
0=Up

[Hotkey/NextPage]
0=Down

[Hotkey/PrevCandidate]
0=Shift+Tab

[Hotkey/NextCandidate]
0=Tab

[Hotkey/TogglePreedit]
0=Control+Alt+P

[Behavior]
# Active By Default
ActiveByDefault=False
# Share Input State
ShareInputState=No
# Show preedit in application
PreeditEnabledByDefault=True
# Show Input Method Information when switch input method
ShowInputMethodInformation=True
# Show Input Method Information when changing focus
showInputMethodInformationWhenFocusIn=False
# Show compact input method information
CompactInputMethodInformation=True
# Show first input method information
ShowFirstInputMethodInformation=True
# Default page size
DefaultPageSize=5
# Override Xkb Option
OverrideXkbOption=False
# Custom Xkb Option
CustomXkbOption=
# Force Enabled Addons
EnabledAddons=
# Force Disabled Addons
DisabledAddons=
# Preload input method to be used by default
PreloadInputMethod=True
EOF
fi

# set fcitx5 profile
if [ ! -f $HOME/.config/fcitx5/profile ];then
mkdir -p $HOME/.config/fcitx5
cat > $HOME/.config/fcitx5/profile <<-'EOF'
[Groups/0]
# Group Name
Name=Default
# Layout
Default Layout=us
# Default Input Method
DefaultIM=keyboard-us

[Groups/0/Items/0]
# Name
Name=pinyin
# Layout
Layout=

[Groups/0/Items/1]
# Name
Name=keyboard-us
# Layout
Layout=

[GroupOrder]
0=Default
EOF
fi

# Start UI
tint2 &
fcitx5 &
wechat
1 change: 1 addition & 0 deletions root/defaults/menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
<openbox_menu xmlns="http://openbox.org/3.4/menu">
<menu id="root-menu" label="MENU">
<item label="xterm" icon="/usr/share/pixmaps/xterm-color_48x48.xpm"><action name="Execute"><command>/usr/bin/xterm</command></action></item>
<item label="fcitx5" icon="/usr/share/icons/hicolor/48x48/apps/org.fcitx.Fcitx5.png"><action name="Execute"><command>/usr/bin/fcitx5</command></action></item>
</menu>
</openbox_menu>
80 changes: 74 additions & 6 deletions root/defaults/tint2rc
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,73 @@ border_color_hover = #aa7733 100
background_color_pressed = #555555 4
border_color_pressed = #aa7733 100

# Background 5: Tooltip
rounded = 1
border_width = 1
border_sides = TBLR
border_content_tint_weight = 0
background_content_tint_weight = 0
background_color = #222222 100
root@template:/mnt/docker-wechat-tint2/root/defaults# cat tint2rc
#---- Generated by tint2conf edab ----
# See https://gitlab.com/o9000/tint2/wikis/Configure for
# full documentation of the configuration options.
#-------------------------------------
# Gradients
#-------------------------------------
# Backgrounds
# Background 1: Panel
rounded = 0
border_width = 0
border_sides = TBLR
border_content_tint_weight = 0
background_content_tint_weight = 0
background_color = #000000 60
border_color = #000000 30
background_color_hover = #000000 60
border_color_hover = #000000 30
background_color_pressed = #000000 60
border_color_pressed = #000000 30

# Background 2: Default task, Iconified task
rounded = 4
border_width = 1
border_sides = TBLR
border_content_tint_weight = 0
background_content_tint_weight = 0
background_color = #777777 20
border_color = #777777 30
background_color_hover = #aaaaaa 22
border_color_hover = #eaeaea 44
background_color_pressed = #555555 4
border_color_pressed = #eaeaea 44

# Background 3: Active task
rounded = 4
border_width = 1
border_sides = TBLR
border_content_tint_weight = 0
background_content_tint_weight = 0
background_color = #777777 20
border_color = #ffffff 40
background_color_hover = #aaaaaa 22
border_color_hover = #eaeaea 44
background_color_pressed = #555555 4
border_color_pressed = #eaeaea 44

# Background 4: Urgent task
rounded = 4
border_width = 1
border_sides = TBLR
border_content_tint_weight = 0
background_content_tint_weight = 0
background_color = #aa4400 100
border_color = #aa7733 100
background_color_hover = #cc7700 100
border_color_hover = #aa7733 100
background_color_pressed = #555555 4
border_color_pressed = #aa7733 100

# Background 5: Tooltip
rounded = 1
border_width = 1
Expand Down Expand Up @@ -162,13 +229,14 @@ launcher_icon_theme_override = 0
startup_notifications = 1
launcher_tooltip = 1
launcher_item_app = /usr/share/applications/wechat.desktop
#launcher_item_app = /usr/share/applications/chromium.desktop
launcher_item_app = /usr/share/applications/thunar.desktop
launcher_item_app = /usr/share/applications/fcitx-config-gtk3.desktop
launcher_item_app = /usr/share/applications/fcitx-configtool.desktop
launcher_item_app = /usr/share/applications/fcitx.desktop
launcher_item_app = /usr/share/applications/im-config.desktop
launcher_item_app = /usr/share/applications/xdg-desktop-portal-gtk.desktop
#launcher_item_app = /usr/share/applications/fcitx-config-gtk3.desktop
#launcher_item_app = /usr/share/applications/fcitx-configtool.desktop
#launcher_item_app = /usr/share/applications/fcitx.desktop
#launcher_item_app = /usr/share/applications/im-config.desktop
#launcher_item_app = /usr/share/applications/xdg-desktop-portal-gtk.desktop
launcher_item_app = /usr/share/applications/fcitx5-configtool.desktop
launcher_item_app = /usr/share/applications/org.fcitx.Fcitx5.desktop

#-------------------------------------
# Clock
Expand Down

0 comments on commit 01e02a5

Please sign in to comment.