summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD17
-rw-r--r--README.md2
-rwxr-xr-xclean.sh2
-rwxr-xr-xex.sh5
-rwxr-xr-xgen.sh74
-rw-r--r--reg.patch58
-rw-r--r--reg_files.tar.bz2bin119319 -> 0 bytes
-rwxr-xr-xtar.sh18
-rw-r--r--update.policy33
10 files changed, 141 insertions, 76 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1ee0caf9671..8653ba944c9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = deepin-wine-wechat
pkgdesc = Tencent WeChat (com.wechat) on Deepin Wine For Archlinux
pkgver = 2.6.7.57
- pkgrel = 1
+ pkgrel = 2
url = https://weixin.qq.com/
install = deepin-wine-wechat.install
arch = x86_64
@@ -22,13 +22,11 @@ pkgbase = deepin-wine-wechat
source = https://mirrors.ustc.edu.cn/deepin/pool/non-free/d/deepin.com.wechat/deepin.com.wechat_2.6.2.31deepin0_i386.deb
source = https://dlglobal.qq.com/weixin/Windows/WeChat_C1022.exe
source = run.sh
- source = reg_files.tar.bz2
- source = update.policy
+ source = reg.patch
md5sums = c66a173fe6817afd898e0061d9eaf42e
md5sums = dbadd15d78384c68d33b19819eaaa9fe
md5sums = 1470529573bf3f5721e22e91beb0218c
- md5sums = 33809717e8c3d128b4925df060041e82
- md5sums = a66646b473a3fbad243ac1afd64da07a
+ md5sums = 9c9d51ff585ff630473ce827159a8230
pkgname = deepin-wine-wechat
diff --git a/PKGBUILD b/PKGBUILD
index 1e2f1426f3e..af85874a1cc 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@ pkgname=deepin-wine-wechat
pkgver=2.6.7.57
wechat_installer=WeChat_C1022
deepinwechatver=2.6.2.31deepin0
-pkgrel=1
+pkgrel=2
pkgdesc="Tencent WeChat (com.wechat) on Deepin Wine For Archlinux"
arch=("x86_64")
url="https://weixin.qq.com/"
@@ -16,13 +16,11 @@ _mirror="https://mirrors.ustc.edu.cn/deepin"
source=("$_mirror/pool/non-free/d/deepin.com.wechat/deepin.com.wechat_${deepinwechatver}_i386.deb"
"https://dlglobal.qq.com/weixin/Windows/${wechat_installer}.exe"
"run.sh"
- "reg_files.tar.bz2"
- "update.policy")
+ "reg.patch")
md5sums=('c66a173fe6817afd898e0061d9eaf42e'
'dbadd15d78384c68d33b19819eaaa9fe'
'1470529573bf3f5721e22e91beb0218c'
- '33809717e8c3d128b4925df060041e82'
- 'a66646b473a3fbad243ac1afd64da07a')
+ '9c9d51ff585ff630473ce827159a8230')
build() {
msg "Extracting DPKG package ..."
@@ -33,12 +31,9 @@ build() {
7z x -aoa "${srcdir}/dpkgdir/opt/deepinwine/apps/Deepin-WeChat/files.7z" -o"${srcdir}/deepinwechatdir"
msg "Removing original outdated WeChat directory ..."
rm -r "${srcdir}/deepinwechatdir/drive_c/Program Files/Tencent/WeChat"
- msg "Adding config files and fonts"
- tar -jxvf reg_files.tar.bz2 -C "${srcdir}/"
- cp userdef.reg "${srcdir}/deepinwechatdir/userdef.reg"
- cp system.reg "${srcdir}/deepinwechatdir/system.reg"
- cp update.policy "${srcdir}/deepinwechatdir/update.policy"
- cp user.reg "${srcdir}/deepinwechatdir/user.reg"
+ 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 "Repackaging app archive ..."
7z a -t7z -r "${srcdir}/files.7z" "${srcdir}/deepinwechatdir/*"
diff --git a/README.md b/README.md
index c63590cdc66..2746496e980 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@
</a>
</p>
-Deepin打包的微信(WeChat)容器移植到Archlinux,微信安装包替换为官方最新
+Deepin打包的微信(WeChat)容器移植到Archlinux,不依赖`deepin-wine`,微信安装包替换为官方最新
- [安装](#安装)
- [常见问题](#常见问题)
diff --git a/clean.sh b/clean.sh
deleted file mode 100755
index eed5376fa00..00000000000
--- a/clean.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-git clean -xfd
diff --git a/ex.sh b/ex.sh
deleted file mode 100755
index 15ebaeb2619..00000000000
--- a/ex.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-rm -rf reg_tmp && \
- mkdir reg_tmp && \
- tar xvjf reg_files.tar.bz2 -C reg_tmp
diff --git a/gen.sh b/gen.sh
index 8c19586bb6e..7b840fbf21f 100755
--- a/gen.sh
+++ b/gen.sh
@@ -1,2 +1,74 @@
#!/bin/sh
-makepkg --printsrcinfo > .SRCINFO
+
+GenPatch()
+{
+ diff -ruN reg_tmp/ reg_tmp_fixed/ > reg.patch
+}
+
+Extract()
+{
+ rm -rf reg_tmp_fixed && \
+ mkdir reg_tmp_fixed && \
+ tar xvjf reg_files.tar.bz2 -C reg_tmp_fixed
+}
+
+GenSrcInfo()
+{
+ makepkg --printsrcinfo > .SRCINFO
+}
+
+Clean()
+{
+ git clean -xfd
+}
+
+Tar()
+{
+ cd reg_tmp && \
+ tar -cvjSf reg_files.tar.bz2 * && \
+ mv reg_files.tar.bz2 ../ && \
+ cd ../
+}
+
+HelpApp()
+{
+ echo " Extra Commands:"
+ echo " -p/--patch Generate patch files between reg_tmp/ and reg_tmp_fixed/"
+ echo " -e/--extract Extract reg files from reg_files.tar.bz2 to dir reg_tmp_fixed/"
+ echo " -g/--gen Generate AUR package info to .SRCINFO"
+ echo " -c/--clean Clean files which not track by git"
+ echo " -t/--tar Package reg files and modify the md5 value in PKGBUILD"
+ echo " -h/--help Show program help info"
+}
+
+if [ -z $1 ]; then
+ # Default generate AUR package info
+ GenSrcInfo
+ exit 0
+fi
+case $1 in
+ "-p" | "--patch")
+ GenPatch
+ ;;
+ "-e" | "--extract")
+ Extract
+ ;;
+ "-g" | "--gen")
+ GenSrcInfo
+ ;;
+ "-c" | "--clean")
+ Clean
+ ;;
+ "-t" | "--tar")
+ Tar
+ ;;
+ "-h" | "--help")
+ HelpApp
+ ;;
+ *)
+ echo -e "\033[31mgen: unrecognized option '$1' \033[0m"
+ echo "Use -h|--help to get help"
+ exit 1
+ ;;
+esac
+exit 0
diff --git a/reg.patch b/reg.patch
new file mode 100644
index 00000000000..aa8fe6d20a4
--- /dev/null
+++ b/reg.patch
@@ -0,0 +1,58 @@
+diff -ruN reg_tmp/system.reg reg_tmp_fixed/system.reg
+--- reg_tmp/system.reg 2018-04-03 13:53:26.000000000 +0800
++++ reg_tmp_fixed/system.reg 2019-04-03 21:34:07.000000000 +0800
+@@ -30955,15 +30955,16 @@
+ [Software\\Microsoft\\Windows\\CurrentVersion\\Winlogon] 1486457887
+ #time=1d281204c9b71e0
+
+-[Software\\Microsoft\\Windows NT\\CurrentVersion] 1507795882
+-#time=1d34331b1382cd2
+-"CSDVersion"="Service Pack 3"
+-"CurrentBuildNumber"="2600"
++[Software\\Microsoft\\Windows NT\\CurrentVersion] 1553355758
++#time=1d4e18f0af44402
++"CSDVersion"=""
++"CurrentBuild"="17134"
++"CurrentBuildNumber"="17134"
+ "CurrentType"="Uniprocessor Free"
+-"CurrentVersion"="5.1"
++"CurrentVersion"="10.0"
+ "InstallDate"=dword:4be5019a
+ "ProductId"="12345-oem-0000001-54321"
+-"ProductName"="Microsoft Windows XP"
++"ProductName"="Microsoft Windows 10"
+ "RegisteredOrganization"=""
+ "RegisteredOwner"=""
+ "SystemRoot"="C:\\windows"
+diff -ruN reg_tmp/update.policy reg_tmp_fixed/update.policy
+--- reg_tmp/update.policy 2018-04-03 13:53:26.000000000 +0800
++++ reg_tmp_fixed/update.policy 2018-02-23 20:31:32.000000000 +0800
+@@ -8,15 +8,14 @@
+ ;; Ingore - Ingore file when copy.
+
+ ;; Ingore update.policy itself.
+-;; "^update.policy$" = "Ingore"
++"^update.policy$" = "Ingore"
+ "^.update-timestamp$" = "Ingore"
+
+ ;; System registry files.
+ "^(system|userdef|user).reg$" = "Registry"
+
+ ;; Addtional assist files.
+-"^drive_c/deepin" = "Keep"
+-"^drive_c/deepin/EnvInit.sh" = "Keep"
++"^drive_c/Deepin" = "Keep"
+
+ ;; Microsoft Office files.
+ "^drive_c/Windows/(?:control\.ini|hh\.dat|mapiuid\.ini|Reg Save Log\.txt)$" = "Override"
+diff -ruN reg_tmp/user.reg reg_tmp_fixed/user.reg
+--- reg_tmp/user.reg 2018-04-03 13:53:26.000000000 +0800
++++ reg_tmp_fixed/user.reg 2019-04-03 21:35:35.000000000 +0800
+@@ -815,6 +815,7 @@
+ "androidassist"=""
+ "mlang"="native,builtin"
+ "msls31"="native,builtin"
++"ntoskrnl.exe"=""
+ "riched20"="native,builtin"
+ "txplatform.exe"=""
+ "txupd.exe"=""
diff --git a/reg_files.tar.bz2 b/reg_files.tar.bz2
deleted file mode 100644
index 6e224b8abc7..00000000000
--- a/reg_files.tar.bz2
+++ /dev/null
Binary files differ
diff --git a/tar.sh b/tar.sh
deleted file mode 100755
index d282d2322fa..00000000000
--- a/tar.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-
-pre_reg_md5=`md5sum reg_files.tar.bz2|cut -d ' ' -f1`
-
-cd reg_tmp && \
- tar -cvjSf reg_files.tar.bz2 * && \
- mv reg_files.tar.bz2 ../ && \
- cd ../
-
-new_reg_md5=`md5sum reg_files.tar.bz2|cut -d ' ' -f1`
-
-if [ "$pre_reg_md5" = "$new_reg_md5" ];
-then
- echo -e "\033[33mReg files have not changed\033[0m"
-else
- sed -i "s#$pre_reg_md5#$new_reg_md5#" PKGBUILD
- echo Done
-fi
diff --git a/update.policy b/update.policy
deleted file mode 100644
index 75535d3e8b1..00000000000
--- a/update.policy
+++ /dev/null
@@ -1,33 +0,0 @@
-[File]
-;;=============================================================
-;; Registry - Mask this file is a registry file.
-;; Keep - Default. Use template file.
-;; Override - Use file in current prefix.
-;; Replace - If it's different type in current prefix and
-;; in template, use template one to replace it.
-;; Ingore - Ingore file when copy.
-
-;; Ingore update.policy itself.
-"^update.policy$" = "Ingore"
-"^.update-timestamp$" = "Ingore"
-
-;; System registry files.
-"^(system|userdef|user).reg$" = "Registry"
-
-;; Addtional assist files.
-"^drive_c/Deepin" = "Keep"
-
-;; Microsoft Office files.
-"^drive_c/Windows/(?:control\.ini|hh\.dat|mapiuid\.ini|Reg Save Log\.txt)$" = "Override"
-
-
-
-[Registry]
-;;=============================================================
-;; Keep - Use template key section
-;; Override - Use user current key section
-;; Merge - Default. Merge two section, user current values
- override template
-
-"^Software\\Wine\\DllOverrides$" = "Keep"
-"^Software\\Wine\\Fonts\\Replacements$" = "Keep"