summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorHui Yiqun2018-06-03 11:27:46 +0800
committerHui Yiqun2018-06-03 11:27:46 +0800
commit46c7639b3bafbaec43a80eb47864385cc6128f17 (patch)
treec86a26bf8386903ef8d3050fa853d99b835f5329
parent2cba05a109fd71b5c6fc101d2f448f08018b6a5e (diff)
downloadaur-46c7639b3bafbaec43a80eb47864385cc6128f17.tar.gz
workaround the launch issue
-rw-r--r--.SRCINFO4
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD12
-rwxr-xr-xrun.sh15
4 files changed, 30 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3289463c019f..3a0ff3171d37 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,16 @@
pkgbase = deepin-wxwork
pkgdesc = Tencent Weixin Work Client on Deepin Wine
pkgver = 2.4.16.1347deepin0
- pkgrel = 1
+ pkgrel = 2
url = http://www.deepin.com/
arch = x86_64
license = custom
depends = p7zip
depends = wine
source = https://mirrors.tuna.tsinghua.edu.cn/deepin/pool/non-free/d/deepin.com.weixin.work/deepin.com.weixin.work_2.4.16.1347deepin0_i386.deb
+ source = run.sh
md5sums = dc47977f4799a11ec0b8d437185f5404
+ md5sums = abafc528b0bc36910ea50c12ee4b0c3f
pkgname = deepin-wxwork
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..3d2df910b696
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*.tar.xz
+deepin.com.weixin.work_*_i386.deb
+pkg/
+src/
diff --git a/PKGBUILD b/PKGBUILD
index f85226dffa4e..d1e6042eccd6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,19 +1,23 @@
pkgname=deepin-wxwork
pkgver=2.4.16.1347deepin0
-pkgrel=1
+pkgrel=2
pkgdesc="Tencent Weixin Work Client on Deepin Wine"
arch=("x86_64")
url="http://www.deepin.com/"
license=('custom')
depends=('p7zip' 'wine')
_mirror="https://mirrors.tuna.tsinghua.edu.cn/deepin"
-source=("$_mirror/pool/non-free/d/deepin.com.weixin.work/deepin.com.weixin.work_${pkgver}_i386.deb")
-md5sums=('dc47977f4799a11ec0b8d437185f5404')
+source=(
+ "$_mirror/pool/non-free/d/deepin.com.weixin.work/deepin.com.weixin.work_${pkgver}_i386.deb"
+ run.sh
+)
+md5sums=('dc47977f4799a11ec0b8d437185f5404'
+ 'abafc528b0bc36910ea50c12ee4b0c3f')
package() {
cd ${srcdir}
tar -xvf data.tar.xz -C ${pkgdir}
cd ${pkgdir}
chmod -x usr/share/applications/deepin.com.weixin.work.desktop
- sed '30a\sed -i "s/deepin-wine/LANG=zh_CN.UTF-8 wine/" $1/drive_c/deepin/EnvInit.sh' -i opt/deepinwine/apps/Deepin-WXWork/run.sh
+ mv $srcdir/run.sh opt/deepinwine/apps/Deepin-WXWork/run.sh
}
diff --git a/run.sh b/run.sh
new file mode 100755
index 000000000000..6cbeb1e5e9e8
--- /dev/null
+++ b/run.sh
@@ -0,0 +1,15 @@
+WINEPREFIX="$HOME/.deepinwine/Deepin-WXWork"
+APPDIR="/opt/deepinwine/apps/Deepin-WXWork"
+APPVER="2.4.16.1347deepin0-1"
+APPTAR="files.7z"
+PACKAGENAME="deepin.com.wxwork"
+
+if [ ! -d "$WINEPREFIX" ]; then
+ mkdir -p $WINEPREFIX
+ 7z x "$APPDIR/$APPTAR" -o"$WINEPREFIX"
+ mv "$WINEPREFIX/drive_c/users/"{@current_user@,$USER}
+ sed -i "s#@current_user@#$USER#" $WINEPREFIX/*.reg
+fi
+
+export WINEPREFIX
+LANG=zh_CN.UTF-8 wine "$WINEPREFIX/drive_c/Program Files/WXWork/WXWork.exe"