summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authortaotieren2021-06-11 18:20:06 +0800
committertaotieren2021-06-11 18:20:06 +0800
commit1cf056c50a121f75520a3782070b558f893fe8a9 (patch)
treeffbcfb15628ae222c14381476e3a5149173d4d44
parentf8f92f1db788c58553919c50507b3563d07c0b56 (diff)
downloadaur-1cf056c50a121f75520a3782070b558f893fe8a9.tar.gz
Update icon
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD90
-rw-r--r--h7toolpc-bin.install8
-rw-r--r--icons.tar.gzbin0 -> 3888 bytes
4 files changed, 85 insertions, 23 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6b3f000602cb..fb4a321042ee 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,22 +1,26 @@
pkgbase = h7toolpc-bin
pkgdesc = H7-TOOL 的 PC 上位机,支持串口、CAN、示波器、CMSIS-DAP、DS18B20、RTT Viewer、脱机烧录等
pkgver = 2.0.5
- pkgrel = 1
+ pkgrel = 2
url = http://www.armbbs.cn/forum.php?mod=viewthread&tid=95468
install = h7toolpc-bin.install
arch = x86_64
- license = MIT
+ license = unknow
makedepends = unarchiver
+ makedepends = wqy-zenhei
depends = wine
optdepends = wine-mono-gecko-version-fix: Fix the version numbers of wine-mono and wine-gecko files to solve the dialog box that pops up when starting wine.
provides = h7toolpc-bin
conflicts = h7toolpc-bin
conflicts = h7toolpc
noextract = h7toolPC_release.zip
+ noextract = icons.tar.gz
options = !strip
source = h7toolPC_release.zip::http://www.armfly.com/download/H7-TOOL/h7toolPC_release(V2.0.5).zip
+ source = icons.tar.gz
source = h7toolpc-bin.install
sha256sums = 13A02CB749BC6E5C69986EE231E0647ED829C5D5247BD77D4509A91093F7E121
- sha256sums = SKIP
+ sha256sums = 6823224b5699dc17c41efdcbc8465554f007cb62cadea0aad9b67c08c5698142
+ sha256sums = 603fafa9b8d21a6a686dd1be47c15853c5fe5966ed49b3ccfb0be665bf78e39e
pkgname = h7toolpc-bin
diff --git a/PKGBUILD b/PKGBUILD
index 717e93f3b8f7..fba1fb39b9b2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,25 +2,28 @@
pkgname=h7toolpc-bin
pkgver=2.0.5
-pkgrel=1
+pkgrel=2
pkgdesc="H7-TOOL 的 PC 上位机,支持串口、CAN、示波器、CMSIS-DAP、DS18B20、RTT Viewer、脱机烧录等"
arch=('x86_64')
url="http://www.armbbs.cn/forum.php?mod=viewthread&tid=95468"
-license=('MIT')
+license=('unknow')
provides=(${pkgname})
conflicts=(${pkgname} ${pkgname%-bin})
#replaces=(${pkgname})
depends=('wine')
optdepends=("wine-mono-gecko-version-fix: Fix the version numbers of wine-mono and wine-gecko files to solve the dialog box that pops up when starting wine.")
-makedepends=('unarchiver')
+makedepends=('unarchiver' 'wqy-zenhei')
backup=()
options=('!strip')
install=${pkgname}.install
source=("${pkgname/pc-bin/PC_release}.zip::http://www.armfly.com/download/H7-TOOL/${pkgname/pc-bin/PC_release}(V${pkgver}).zip"
+ "icons.tar.gz"
"${pkgname}.install")
sha256sums=('13A02CB749BC6E5C69986EE231E0647ED829C5D5247BD77D4509A91093F7E121'
- 'SKIP')
-noextract=("${pkgname/pc-bin/PC_release}.zip")
+ '6823224b5699dc17c41efdcbc8465554f007cb62cadea0aad9b67c08c5698142'
+ '10ebc665ba27ab7b38659e4b8fc9b88f45af0600aa6039ff3f563c5272988b99')
+noextract=("${pkgname/pc-bin/PC_release}.zip"
+ "icons.tar.gz")
prepare() {
@@ -33,28 +36,55 @@ package() {
install -dm0755 "${pkgdir}/${armfly}/${pkgname%-bin}"
cp -ra ${srcdir}/${pkgname/pc-bin/PC_release}/* "${pkgdir}/${armfly}/${pkgname%-bin}"
# cd "${srcdir}/${pkgname/pc-bin/PC_release}"
+ rm -rf "${pkgdir}/${armfly}/${pkgname%-bin}/Driver"
+
find "${pkgdir}/${armfly}" -type f -exec chmod 644 "{}" \;
find "${pkgdir}/${armfly}" -type d -exec chmod 755 "{}" \;
-# install -Dm0755 "${srcdir}/${pkgname/pc-bin/PC_release}/${pkgname/pc-bin/PC}.exe" "${pkgdir}/${armfly}/${pkgname%-bin}/${pkgname%-bin}.exe"
-# install -Dm0644 "${srcdir}/${pkgname%-bin}/LICENSE" "${pkgdir}/${armfly}/licenses/${pkgname%-bin}/LICENSE"
-# install -Dm0644 "${srcdir}/${pkgname%-bin}/developments/logo/xboot-logo.svg" "${pkgdir}/${armfly}/pixmaps/${pkgname%-bin}.svg"
-# install -Dm0644 "${srcdir}/${pkgname%-bin}/developments/logo/xboot-logo.svg" "${pkgdir}/${armfly}/icons/hicolor/scalable/mimetypes/application-x-${pkgname%-bin}.svg"
+
+ _ttffont="wqy-zenhei.ttc"
+
+ install -Dm0644 /dev/stdin "${pkgdir}/${armfly}/${pkgname%-bin}/font.patch" << EOF
+--- wine/system.reg.orig 2021-06-11 16:55:17.989624488 +0800
++++ wine/system.reg 2021-06-11 17:02:25.742581014 +0800
+@@ -37724,9 +37724,17 @@
+
+ [Software\\Microsoft\\Windows NT\\CurrentVersion\\FontLink\\SystemLink] 1623401646
+ #time=1d75e9f5615584c
+-"Lucida Sans Unicode"=str(7):"SIMSUN.TTC,SimSun\0MINGLIU.TTC,PMingLiu\0MSGOTHIC.TTC,MS UI Gothic\0BATANG.TTC,Batang\0"
+-"Microsoft Sans Serif"=str(7):"SIMSUN.TTC,SimSun\0MINGLIU.TTC,PMingLiu\0MSGOTHIC.TTC,MS UI Gothic\0BATANG.TTC,Batang\0"
+-"Tahoma"=str(7):"SIMSUN.TTC,SimSun\0MINGLIU.TTC,PMingLiu\0MSGOTHIC.TTC,MS UI Gothic\0BATANG.TTC,Batang\0"
++"Lucida Sans Unicode"="${_ttffont}"
++"Microsoft Sans Serif"="${_ttffont}"
++"MS Sans Serif"="${_ttffont}"
++"Tahoma"="${_ttffont}"
++"Tahoma Bold"="${_ttffont}"
++"SimSun"="${_ttffont}"
++"Arial"="${_ttffont}"
++"Arial Black"="${_ttffont}"
++"Lucida Sans Unicode"=str(7):"${_ttffont}"
++"Microsoft Sans Serif"=str(7):"${_ttffont}"
++"Tahoma"=str(7):"${_ttffont}"
+
+ [Software\\Microsoft\\Windows NT\\CurrentVersion\\FontMapper] 1623401670
+ #time=1d75e9f64384ca4
+EOF
+
install -Dm0755 /dev/stdin "${pkgdir}/usr/bin/${pkgname%-bin}" << EOF
#!/bin/bash
+export LC_CTYPE="zh_CN.UTF-8"
export WINEARCH=win32 WINEPREFIX="$HOME/.${pkgname%-bin}/wine"
if [ ! -d "$HOME"/.${pkgname%-bin} ] ; then
mkdir -p "$HOME"/.${pkgname%-bin}/wine || exit 1
- #Each user will have its app.ini, we copy the default file since ${pkgname%-bin}
- #needs to write here.
+
cp -r /${armfly}/${pkgname%-bin}/app.ini "$HOME"/.${pkgname%-bin} || exit 1
cp -r /${armfly}/${pkgname%-bin}/Backup "$HOME"/.${pkgname%-bin} || exit 1
cp -r /${armfly}/${pkgname%-bin}/Readback "$HOME"/.${pkgname%-bin} || exit 1
cp -r /${armfly}/${pkgname%-bin}/ini "$HOME"/.${pkgname%-bin} || exit 1
cp -r /${armfly}/${pkgname%-bin}/log "$HOME"/.${pkgname%-bin} || exit 1
cp -r /${armfly}/${pkgname%-bin}/*.lua "$HOME"/.${pkgname%-bin} || exit 1
+ cp -r /${armfly}/${pkgname%-bin}/font.patch "$HOME"/.${pkgname%-bin} || exit 1
- #We symlink the files emule needs to read to work
ln -s /${armfly}/${pkgname%-bin}/${pkgname/pc-bin/PC}.exe "$HOME"/.${pkgname%-bin}/${pkgname%-bin} || exit 1
ln -s -T /${armfly}/${pkgname%-bin}/EMMC "$HOME"/.${pkgname%-bin}/EMMC || exit 1
ln -s -T /${armfly}/${pkgname%-bin}/Help "$HOME"/.${pkgname%-bin}/Help || exit 1
@@ -75,26 +105,26 @@ Exec=${pkgname%-bin} %f
Type=Application
Categories=Development;Tool;
Terminal=false
-Icon=${pkgname%-bin}
+Icon=${pkgname%-bin}.png
Version=${pkgver}
EOF
install -Dm0755 /dev/stdin "${pkgdir}/usr/bin/${pkgname/-bin/-old}" << EOF
#!/bin/bash
+export LC_CTYPE="zh_CN.UTF-8"
export WINEARCH=win32 WINEPREFIX="$HOME/.${pkgname%-bin}/wine"
if [ ! -d "$HOME"/.${pkgname%-bin} ] ; then
mkdir -p "$HOME"/.${pkgname%-bin}/wine || exit 1
- #Each user will have its app.ini, we copy the default file since ${pkgname%-bin}
- #needs to write here.
+
cp -r /${armfly}/${pkgname%-bin}/app.ini "$HOME"/.${pkgname%-bin} || exit 1
cp -r /${armfly}/${pkgname%-bin}/Backup "$HOME"/.${pkgname%-bin} || exit 1
cp -r /${armfly}/${pkgname%-bin}/Readback "$HOME"/.${pkgname%-bin} || exit 1
cp -r /${armfly}/${pkgname%-bin}/ini "$HOME"/.${pkgname%-bin} || exit 1
cp -r /${armfly}/${pkgname%-bin}/log "$HOME"/.${pkgname%-bin} || exit 1
cp -r /${armfly}/${pkgname%-bin}/*.lua "$HOME"/.${pkgname%-bin} || exit 1
+ cp -r /${armfly}/${pkgname%-bin}/font.patch "$HOME"/.${pkgname%-bin} || exit 1
- #We symlink the files emule needs to read to work
ln -s /${armfly}/${pkgname%-bin}/${pkgname/pc-bin/PC(PC V1.44 用于升级V2.00前的固件)}.exe "$HOME"/.${pkgname%-bin}/${pkgname/-bin/-old} || exit 1
ln -s -T /${armfly}/${pkgname%-bin}/EMMC "$HOME"/.${pkgname%-bin}/EMMC || exit 1
ln -s -T /${armfly}/${pkgname%-bin}/Help "$HOME"/.${pkgname%-bin}/Help || exit 1
@@ -115,8 +145,32 @@ Exec=${pkgname/-bin/-old} %f
Type=Application
Categories=Development;Tool;
Terminal=false
-Icon=${pkgname%-bin}
-Version=${pkgver}
+Icon=${pkgname%-bin}.png
+Version=1.44
+EOF
+
+ install -Dm644 /dev/stdin "${pkgdir}/usr/lib/udev/rules.d/99-h7tool.rules" << EOF
+# Copy this file to /etc/udev/rules.d/ or /usr/lib/udev/rules.d/
+# If rules fail to reload automatically, you can refresh udev rules
+# with the command "sudo udevadm control --reload"
+
+ACTION!="add|change", GOTO="h7tool_rules_end"
+
+SUBSYSTEM=="gpio", MODE="0660", GROUP="plugdev", TAG+="uaccess"
+
+SUBSYSTEM!="usb|tty|hidraw", GOTO="h7tool_rules_end"
+
+# Please keep this list sorted by VID:PID
+
+# H7-tool
+ATTRS{idVendor}=="C251", ATTRS{idProduct}=="F00A", MODE="666", GROUP="plugdev", TAG+="uaccess"
+
+# CMSIS-DAP compatible adapters
+ATTRS{product}=="*CMSIS-DAP*", MODE="666", GROUP="plugdev", TAG+="uaccess"
+
+LABEL="h7tool_rules_end"
EOF
+ tar -xf "${srcdir}/icons.tar.gz" -C "${pkgdir}/usr/share"
+# install -Dm0644 "${srcdir}/${pkgname%-bin}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname%-bin}/LICENSE"
}
diff --git a/h7toolpc-bin.install b/h7toolpc-bin.install
index a75dde7f0730..758315e1fdf8 100644
--- a/h7toolpc-bin.install
+++ b/h7toolpc-bin.install
@@ -1,11 +1,15 @@
info() {
- echo "test"
+ echo -e "Run h7toolpc once to install the wine environment,\r
+ and then run the following command to fix the font display"
+ echo -e "Install fonts patch"
+ echo -e "cd ~/.h7toolpc && patch -p0 < font.patch"
}
post_install() {
info
}
post_upgrade() {
- find /home -maxdepth 2 -name ".h7toolpc" -exec rm -f {} \;
+ echo "deleting the h7toolpc bottle..."
+ find /home -maxdepth 2 -name ".h7toolpc" -exec rm -rf {} \;
info
}
pre_remove() {
diff --git a/icons.tar.gz b/icons.tar.gz
new file mode 100644
index 000000000000..663542894d7c
--- /dev/null
+++ b/icons.tar.gz
Binary files differ