diff options
author | Vufa | 2022-12-01 14:20:41 +0800 |
---|---|---|
committer | Vufa | 2022-12-01 14:20:41 +0800 |
commit | be7b0d2f70894965ae452c3ef44563b7d8b961f7 (patch) | |
tree | 3d8b4560217b9aa5cd641f042cede49bed654a54 | |
parent | 062e1a8fa815b454f7d168075eb8fb25cb9851a8 (diff) | |
download | aur-be7b0d2f70894965ae452c3ef44563b7d8b961f7.tar.gz |
wechatplayer work
Signed-off-by: Vufa <countstarlight@gmail.com>
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 8 | ||||
-rw-r--r-- | README.md | 4 | ||||
-rwxr-xr-x | run.sh | 100 |
4 files changed, 52 insertions, 64 deletions
@@ -1,7 +1,7 @@ pkgbase = deepin-wine-wechat pkgdesc = Tencent WeChat on Deepin Wine(com.qq.weixin.deepin) For Archlinux pkgver = 3.8.0.41 - pkgrel = 1 + pkgrel = 2 url = https://weixin.qq.com/ install = deepin-wine-wechat.install arch = x86_64 @@ -30,7 +30,7 @@ pkgbase = deepin-wine-wechat md5sums = d841406c6a892707904029953266ad41 md5sums = cf87ad9db0bf279ddf9e5c1dce64a716 md5sums = 89b10711889f52ab0a386f37b4eb3212 - md5sums = 18dd3e7fca1533923d87cdb0a1b29bbd + md5sums = 8ff0cb8e9c126641593ee8d31b94042b md5sums = 05b05416ef1fa4e1baaf64736e15a057 pkgname = deepin-wine-wechat @@ -5,7 +5,7 @@ pkgver=3.8.0.41 wechat_installer=WeChatSetup deepinwechatver=3.4.0.38deepin6 debpkgname="com.qq.weixin.deepin" -pkgrel=1 +pkgrel=2 pkgdesc="Tencent WeChat on Deepin Wine(${debpkgname}) For Archlinux" arch=("x86_64") url="https://weixin.qq.com/" @@ -27,7 +27,7 @@ md5sums=('6c4edb108a0593bab7a556a6c9e8a012' 'd841406c6a892707904029953266ad41' 'cf87ad9db0bf279ddf9e5c1dce64a716' '89b10711889f52ab0a386f37b4eb3212' - '18dd3e7fca1533923d87cdb0a1b29bbd' + '8ff0cb8e9c126641593ee8d31b94042b' '05b05416ef1fa4e1baaf64736e15a057') build() { @@ -46,8 +46,8 @@ build() { 7z x -aoa "${srcdir}/dpkgdir/opt/apps/${debpkgname}/files/files.7z" -o"${srcdir}/deepinwechatdir" msg "Cleaning up the original package directory ..." rm -r "${srcdir}/deepinwechatdir/drive_c/Program Files/Tencent/WeChat" - msg "Patching reg files ..." - patch -p1 -d "${srcdir}/deepinwechatdir/" < "${srcdir}/reg.patch" + #msg "Patching reg files ..." + #patch -p1 -d "${srcdir}/deepinwechatdir/" < "${srcdir}/reg.patch" msg "Creating font file link ..." ln -sf "/usr/share/fonts/wenquanyi/wqy-microhei/wqy-microhei.ttc" "${srcdir}/deepinwechatdir/drive_c/windows/Fonts/wqy-microhei.ttc" msg "Copying latest WeChat installer to ${srcdir}/deepinwechatdir/drive_c/Program Files/Tencent/ ..." diff --git a/README.md b/README.md index 69e12826f85f..3eb8450f773a 100644 --- a/README.md +++ b/README.md @@ -221,7 +221,7 @@ yay -S noto-fonts-sc > 根据 [deepin-wine-wechat-arch#173](https://github.com/vufa/deepin-wine-wechat-arch/issues/173),由[abcfy2](https://github.com/abcfy2)提供的方法 -编辑 `~/.pam_environment`,添加: +编辑 `/etc/environment`,添加: ``` DEEPIN_WINE_SCALE=1.25 @@ -245,7 +245,7 @@ DEEPIN_WINE_SCALE=1.25 /opt/apps/com.qq.weixin.deepin/files/run.sh -w ``` -可以参考 [deepin-wine-wechat-arch#263](https://github.com/vufa/deepin-wine-wechat-arch/issues/263) 将该命令存入脚本并添加到全局快捷键中,方便使用 +可以参考 [deepin-wine-wechat-arch#96](https://github.com/vufa/deepin-wine-wechat-arch/issues/96) 和 [deepin-wine-wechat-arch#263](https://github.com/vufa/deepin-wine-wechat-arch/issues/263) 将该命令存入脚本并添加到全局快捷键中,方便使用 ## 感谢 @@ -25,7 +25,7 @@ export APPRUN_CMD="deepin-wine6-stable" DISABLE_ATTACH_FILE_DIALOG="" EXPORT_ENVS="" -export SPECIFY_SHELL_DIR=`dirname $START_SHELL_PATH` +export SPECIFY_SHELL_DIR=$(dirname $START_SHELL_PATH) ARCHIVE_FILE_DIR="/opt/apps/$DEB_PACKAGE_NAME/files" @@ -35,22 +35,19 @@ export LD_LIBRARY_PATH=/opt/apps/$DEB_PACKAGE_NAME/files/lib32 export WINEPREDLL="$ARCHIVE_FILE_DIR/dlls" -msg() -{ - ECHO_LEVEL=("\033[1;32m==> " "\033[1;31m==> ERROR: ") - echo -e "${ECHO_LEVEL[$1]}\033[1;37m$2\033[0m" +msg() { + ECHO_LEVEL=("\033[1;32m==> " "\033[1;31m==> ERROR: ") + echo -e "${ECHO_LEVEL[$1]}\033[1;37m$2\033[0m" } -OpenWinecfg() -{ +OpenWinecfg() { msg 0 "Launching winecfg with $APPRUN_CMD in $WINEPREFIX ..." env WINEPREFIX=$WINEPREFIX $APPRUN_CMD winecfg } -DeployApp() -{ +DeployApp() { # backup fonts - if [ -d "$WECHAT_FONTS" ];then + if [ -d "$WECHAT_FONTS" ]; then msg 0 "Backing up fonts ..." mkdir -p $HOME/.deepinwine/.wechat_tmp cp $WECHAT_FONTS/* $HOME/.deepinwine/.wechat_tmp/ @@ -64,81 +61,72 @@ DeployApp() env WINEDLLOVERRIDES="winemenubuilder.exe=d" $START_SHELL_PATH $BOTTLENAME $APPVER "$WECHAT_INSTALLER_PATH" "$@" # restore fonts - if [ -d "$HOME/.deepinwine/.wechat_tmp" ];then + if [ -d "$HOME/.deepinwine/.wechat_tmp" ]; then msg 0 "Restoring fonts ..." cp -n $HOME/.deepinwine/.wechat_tmp/* $WECHAT_FONTS/ rm -rf "$HOME/.deepinwine/.wechat_tmp" fi touch $WINEPREFIX/reinstalled msg 0 "Creating $WINEPREFIX/PACKAGE_VERSION ..." - cat /opt/apps/$DEB_PACKAGE_NAME/files/files.md5sum > $WINEPREFIX/PACKAGE_VERSION + cat /opt/apps/$DEB_PACKAGE_NAME/files/files.md5sum >$WINEPREFIX/PACKAGE_VERSION } -WakeApp() -{ +WakeApp() { env WINEPREDLL="$ARCHIVE_FILE_DIR/dlls" \ - WINEDLLPATH=/opt/$APPRUN_CMD/lib:/opt/$APPRUN_CMD/lib64 \ - WINEPREFIX=$WINEPREFIX $APPRUN_CMD /opt/deepinwine/tools/sendkeys.exe w + WINEDLLPATH=/opt/$APPRUN_CMD/lib:/opt/$APPRUN_CMD/lib64 \ + WINEPREFIX=$WINEPREFIX $APPRUN_CMD /opt/deepinwine/tools/sendkeys.exe w } -Run() -{ - if [ -z "$DISABLE_ATTACH_FILE_DIALOG" ];then +Run() { + if [ -z "$DISABLE_ATTACH_FILE_DIALOG" ]; then export ATTACH_FILE_DIALOG=1 fi - if [ -n "$EXPORT_ENVS" ];then + if [ -n "$EXPORT_ENVS" ]; then export $EXPORT_ENVS fi - if [ -n "$EXEC_PATH" ];then - if [ ! -f "$WINEPREFIX/reinstalled" ];then + if [ -n "$EXEC_PATH" ]; then + if [ ! -f "$WINEPREFIX/reinstalled" ] || [ ! -f "$EXEC_FILE" ]; then DeployApp + exit 0 + fi + + if [ -z "${EXEC_PATH##*.lnk*}" ]; then + msg 0 "Launching $EXEC_PATH lnk file ..." + $START_SHELL_PATH $BOTTLENAME $APPVER "C:/windows/command/start.exe" "/Unix" "$EXEC_PATH" "$@" else - # missing exec file - if [ ! -f "$EXEC_FILE" ];then - msg 1 "Missing $EXEC_FILE, re-deploying ..." - DeployApp - exit 0 - fi - - if [ -z "${EXEC_PATH##*.lnk*}" ];then - msg 0 "Launching $EXEC_PATH lnk file ..." - $START_SHELL_PATH $BOTTLENAME $APPVER "C:/windows/command/start.exe" "/Unix" "$EXEC_PATH" "$@" - else - msg 0 "Launching $EXEC_PATH ..." - $START_SHELL_PATH $BOTTLENAME $APPVER "$EXEC_PATH" "$@" - fi + msg 0 "Launching $EXEC_PATH ..." + $START_SHELL_PATH $BOTTLENAME $APPVER "$EXEC_PATH" "$@" fi else $START_SHELL_PATH $BOTTLENAME $APPVER "uninstaller.exe" "$@" fi } -HelpApp() -{ - echo " Extra Commands:" - echo " winecfg Open winecfg" - echo " -w/--wake Wake up background program" - echo " -h/--help Show program help info" +HelpApp() { + echo " Extra Commands:" + echo " winecfg Open winecfg" + echo " -w/--wake Wake up background program" + echo " -h/--help Show program help info" } if [ -z $1 ]; then - Run "$@" - exit 0 + Run "$@" + exit 0 fi case $1 in - "winecfg") - OpenWinecfg - ;; - "-w" | "--wake") - WakeApp - ;; - "-h" | "--help") - HelpApp - ;; - *) - Run "$@" - ;; +"winecfg") + OpenWinecfg + ;; +"-w" | "--wake") + WakeApp + ;; +"-h" | "--help") + HelpApp + ;; +*) + Run "$@" + ;; esac exit 0 |