diff --git a/.gitea/workflows/build-image.yaml b/.gitea/workflows/build-image.yaml index 36015ee..26fd1b7 100644 --- a/.gitea/workflows/build-image.yaml +++ b/.gitea/workflows/build-image.yaml @@ -28,12 +28,29 @@ jobs: WECHAT_URL=https://github.com/tom-snow/wechat-windows-versions/releases/download/v3.9.8.25/WeChatSetup-3.9.8.25.exe WXHELPER_URL=https://github.com/ttttupup/wxhelper/releases/download/3.9.8.25-v2/wxhelper.dll + - name: Build 3.9.8.25 version with noVNC + uses: docker/build-push-action@v2 + with: + push: true + tags: lxh01/wxhelper-docker:3.9.8.25-v2 + file: Dockerfile.novnc + build-args: | + WECHAT_URL=https://github.com/tom-snow/wechat-windows-versions/releases/download/v3.9.8.25/WeChatSetup-3.9.8.25.exe + WXHELPER_URL=https://github.com/ttttupup/wxhelper/releases/download/3.9.8.25-v2/wxhelper.dll + - name: Build 3.9.5.81 version uses: docker/build-push-action@v2 with: push: true tags: lxh01/wxhelper-docker:3.9.5.81-v11 + - name: Build 3.9.5.81 version with noVNC + uses: docker/build-push-action@v2 + with: + push: true + tags: lxh01/wxhelper-docker:3.9.5.81-v11 + file: Dockerfile.novnc + - name: Build 3.9.8.25 version uses: docker/build-push-action@v2 with: @@ -42,3 +59,13 @@ jobs: build-args: | WECHAT_URL=https://github.com/tom-snow/wechat-windows-versions/releases/download/v3.9.2.23/WeChatSetup-3.9.2.23.exe WXHELPER_URL=https://github.com/ttttupup/wxhelper/releases/download/3.9.2.23-v9/wxhelper.dll + + - name: Build 3.9.8.25 version with noVNC + uses: docker/build-push-action@v2 + with: + push: true + tags: lxh01/wxhelper-docker:3.9.2.23-v9 + file: Dockerfile.novnc + build-args: | + WECHAT_URL=https://github.com/tom-snow/wechat-windows-versions/releases/download/v3.9.2.23/WeChatSetup-3.9.2.23.exe + WXHELPER_URL=https://github.com/ttttupup/wxhelper/releases/download/3.9.2.23-v9/wxhelper.dll diff --git a/Dockerfile b/Dockerfile index 8d16ab4..ac308d3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,8 +23,6 @@ RUN sudo chown app:app WeChatSetup.exe && sudo chmod a+x WeChatSetup.exe ADD ${WXHELPER_URL} wxhelper.dll RUN sudo chown app:app wxhelper.dll -RUN ls -lah - # 安装微信 COPY install-wechat.sh install-wechat.sh RUN sudo chmod a+x install-wechat.sh && ./install-wechat.sh diff --git a/Dockerfile-novnc b/Dockerfile-novnc new file mode 100644 index 0000000..508f5e4 --- /dev/null +++ b/Dockerfile-novnc @@ -0,0 +1,37 @@ +FROM furacas/wine-vnc-box:latest + +ENV WINEDEBUG=fixme-all + +# 根据传入参数安装微信和wxhelper.dll +ARG WECHAT_URL=https://github.com/tom-snow/wechat-windows-versions/releases/download/v3.9.5.81/WeChatSetup-3.9.5.81.exe +ARG WXHELPER_URL=https://github.com/ttttupup/wxhelper/releases/download/3.9.5.81-v11/wxhelper.dll + +WORKDIR /home/app/.wine/drive_c + +# 加载注入器 +ADD https://github.com/furacas/DllInjector/releases/download/v1.4.0/DllInjector64.exe DllInjector.exe +RUN sudo chown app:app DllInjector.exe && sudo chmod a+x DllInjector.exe + +# 下载微信 +ADD ${WECHAT_URL} WeChatSetup.exe +RUN sudo chown app:app WeChatSetup.exe && sudo chmod a+x WeChatSetup.exe + +# 下载wxhelper.dll +ADD ${WXHELPER_URL} wxhelper.dll +RUN sudo chown app:app wxhelper.dll + +RUN ls -lah + +# 安装微信 +COPY install-wechat.sh install-wechat.sh +RUN sudo chmod a+x install-wechat.sh && ./install-wechat.sh +RUN rm -rf WeChatSetup.exe && rm -rf install-wechat.sh + +# 处理中文字体 +RUN sudo apt install -y winetricks && winetricks cjkfonts + +EXPOSE 8080 19088 + +COPY cmd.sh /cmd.sh +RUN sudo chmod +x /cmd.sh +CMD ["/cmd.sh"] \ No newline at end of file diff --git a/cmd.sh b/cmd.sh index 03517ba..931a5af 100644 --- a/cmd.sh +++ b/cmd.sh @@ -28,9 +28,10 @@ if [ $NOTIFY_URL ];then echo "HOOK 疑似注入失败,19088 端口未监听,请手动检查是否注入成功" status = "fail" fi - curl -X POST $NOTIFY_URL -H 'Content-Type: application/json' -d '{"status": "'"$status"'", "robot": "'"$REMARK"'"}' + curl -X POST $NOTIFY_URL -H 'Content-Type: application/json' -d '{"status": "'"$status"'", "robot": "'"$REMARK"'", "apiHost": "'"$API"'"}' else echo "未配置回调通知地址,跳过通知消息发送" + echo "如果需要,请配置NOTIFY_URL、REMARK、API三个环境变量,它们分别是通知地址、机器人备注、外部请求机器人的API地址" fi wait \ No newline at end of file