Skip to content

Commit 263e3eb

Browse files
committed
docs: 更新 AUR 相关内容;
1 parent 2ea09fa commit 263e3eb

5 files changed

Lines changed: 195 additions & 0 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@
126126
6. 无论以任何为目的,如未获得我作者的授权,不得修改任意程序内指向的网络链接和软件关于信息,比如赞助和关于软件部分的内容等。
127127
7. 不得在安装程序内插入任何含有商业推广的插件。
128128

129+
  如果你是 Windows 用户,你可以到发行版区下载正式版,其他版本请自行编译;对于 Linux ,你可以尝试到发行区下载 run 文件或者自行编译;如果你使用的操作系统是基于 Arch 的,那么你可以安装`winghexexplorer2`这个包,也可以安装`winghexexplorer2-git`来体验日更版最新内容,但最好请不要将日更版应用于日常使用,虽然目前通常是比较稳定的。
130+
129131
### issue 前必读
130132

131133
  如果你有任何形式的建议,在提交 issue 之前,请一定要阅读下面的声明,以免浪费我们双方宝贵的时间:

README_en.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ First of all, I would like to express my sincere tanks for your enthusiastic hel
126126
6. Regardless of the purpose, if you do not obtain the authorization of me, you may not modify any network links pointed to and the ABOUT contents in the program, such as sponsorship and content about the software.
127127
7. You may not insert any plug-in containing commercial promotion in the installation program.
128128

129+
If you are a Windows user, you can download in the release page, or compile other versions by yourself; For Linuxers, you can try to download the RUN file or help yourself; If you are using Arch-based Linux, you can install the `winghexexplorer2` AUR package, or install `winghexexplorer2-git` to try the latest contents, but it is best not to use the nightly builds for daily use, although it is generally stable at present.
130+
129131
### Issue
130132

131133
If you have any suggestions, please be sure to read the following statement before submitting an issue to avoid wasting our precious time:

mkinstaller/AUR/PKGBUILD

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Maintainer: wingsummer <wing-summer@qq.com>
2+
3+
pkgname=winghexexplorer2
4+
pkgver=2.2.3
5+
pkgrel=1
6+
pkgdesc='一个自由强大跨平台的十六进制编辑器 / A free, powerful, cross-platform hex editor'
7+
url="https://github.com/Wing-summer/WingHexExplorer2"
8+
9+
arch=(x86_64 aarch64)
10+
license=(AGPL-3.0-only)
11+
conflicts=(winghexexplorer2-git)
12+
13+
depends=('qt6-base')
14+
makedepends=('git' 'cmake' 'gcc' 'clang' 'qt6-tools' 'qt6-translations')
15+
optdepends=('qt6-translations: translations')
16+
source=("git+$url.git#tag=v$pkgver")
17+
sha256sums=('SKIP')
18+
19+
install=winghexexplorer2.install
20+
21+
prepare() {
22+
cd "$srcdir/WingHexExplorer2"
23+
sed -i 's|git@github.com:|https://github.com/|g' .gitmodules
24+
git submodule sync
25+
git submodule update --init
26+
git submodule foreach --recursive "
27+
if [ -f .gitmodules ]; then
28+
sed -i 's|git@github.com:|https://github.com/|g' .gitmodules
29+
git submodule sync
30+
fi
31+
"
32+
git submodule update --init --recursive
33+
}
34+
35+
build() {
36+
cd "$srcdir/WingHexExplorer2"
37+
local _flags=(
38+
-D CMAKE_INSTALL_PREFIX=/opt
39+
-D CMAKE_BUILD_TYPE=Release
40+
-D WINGHEX_USE_FRAMELESS=ON
41+
-D BUILD_TEST_PLUGIN=OFF
42+
-D BUILD_SHARED_MEM_EXT=OFF
43+
)
44+
cmake -S . -B build "${_flags[@]}"
45+
cmake --build build -- -j"$(nproc)"
46+
}
47+
48+
check() {
49+
true
50+
}
51+
52+
package() {
53+
cd "$srcdir/WingHexExplorer2"
54+
local _optdir="$pkgdir/opt/WingHexExplorer2"
55+
local _mkinst="mkinstaller/pyscript"
56+
57+
mkdir -p "$_optdir"
58+
install -Dm755 build/WingHexExplorer2 "$_optdir/WingHexExplorer2"
59+
install -Dm644 build/WingPlugin/libWingPlugin.so "$_optdir/libWingPlugin.so"
60+
61+
for _sub in plugin scripts aslib; do
62+
mkdir -p "$_optdir/$_sub"
63+
done
64+
65+
cp -a "$_mkinst/share" "build/lang" "$_optdir/"
66+
# install -Dm644 mkinstaller/config.ini "$_optdir/config.ini" // this file is not existed before 2.3.0
67+
68+
for _f in LICENSE authorband.svg licenseband.svg screenshot.png README.md images/author.jpg; do
69+
install -Dm644 "$srcdir/WingHexExplorer2/${_f}" "$_optdir/${_f##*/}"
70+
done
71+
72+
local md5=$(md5sum "$_optdir/WingHexExplorer2" | cut -d' ' -f1 | tr '[:lower:]' '[:upper:]')
73+
echo "$md5" > "$_optdir/md5sums"
74+
75+
install -Dm644 "$_mkinst/com.wingsummer.winghexexplorer2.desktop" "$pkgdir/usr/share/applications/com.wingsummer.winghexexplorer2.desktop"
76+
}

mkinstaller/AUR/PKGBUILD-git

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Maintainer: wingsummer <wing-summer@qq.com>
2+
3+
pkgname=winghexexplorer2-git
4+
pkgver=2.2.3.r16.g2ea09fa
5+
pkgrel=1
6+
pkgdesc='一个自由强大跨平台的十六进制编辑器(每日构建版) / A free, powerful, cross-platform hex editor (Nightly Builds)'
7+
url="https://github.com/Wing-summer/WingHexExplorer2"
8+
9+
arch=(x86_64 aarch64)
10+
license=(AGPL-3.0-only)
11+
conflicts=(winghexexplorer2)
12+
13+
depends=('qt6-base')
14+
makedepends=('git' 'cmake' 'gcc' 'clang' 'qt6-tools' 'qt6-translations')
15+
optdepends=('qt6-translations: translations')
16+
source=("git+$url.git#branch=main")
17+
sha256sums=('SKIP')
18+
19+
install=winghexexplorer2.install
20+
21+
pkgver() {
22+
cd "$srcdir/WingHexExplorer2"
23+
git describe --long --tags --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
24+
}
25+
26+
prepare() {
27+
cd "$srcdir/WingHexExplorer2"
28+
sed -i 's|git@github.com:|https://github.com/|g' .gitmodules
29+
git submodule sync
30+
git submodule update --init
31+
git submodule foreach --recursive "
32+
if [ -f .gitmodules ]; then
33+
sed -i 's|git@github.com:|https://github.com/|g' .gitmodules
34+
git submodule sync
35+
fi
36+
"
37+
git submodule update --init --recursive
38+
}
39+
40+
build() {
41+
cd "$srcdir/WingHexExplorer2"
42+
local _flags=(
43+
-D CMAKE_INSTALL_PREFIX=/opt
44+
-D CMAKE_BUILD_TYPE=Release
45+
-D WINGHEX_USE_FRAMELESS=ON
46+
-D BUILD_TEST_PLUGIN=OFF
47+
-D BUILD_SHARED_MEM_EXT=OFF
48+
)
49+
cmake -S . -B build "${_flags[@]}"
50+
cmake --build build -- -j"$(nproc)"
51+
}
52+
53+
check() {
54+
true
55+
}
56+
57+
package() {
58+
cd "$srcdir/WingHexExplorer2"
59+
local _optdir="$pkgdir/opt/WingHexExplorer2"
60+
local _mkinst="mkinstaller/pyscript"
61+
62+
mkdir -p "$_optdir"
63+
install -Dm755 build/WingHexExplorer2 "$_optdir/WingHexExplorer2"
64+
install -Dm644 build/WingPlugin/libWingPlugin.so "$_optdir/libWingPlugin.so"
65+
66+
for _sub in plugin scripts aslib; do
67+
mkdir -p "$_optdir/$_sub"
68+
done
69+
70+
cp -a "$_mkinst/share" "build/lang" "$_optdir/"
71+
install -Dm644 mkinstaller/config.ini "$_optdir/config.ini"
72+
73+
for _f in LICENSE authorband.svg licenseband.svg screenshot.png README.md images/author.jpg; do
74+
install -Dm644 "$srcdir/WingHexExplorer2/${_f}" "$_optdir/${_f##*/}"
75+
done
76+
77+
local md5=$(md5sum "$_optdir/WingHexExplorer2" | cut -d' ' -f1 | tr '[:lower:]' '[:upper:]')
78+
echo "$md5" > "$_optdir/md5sums"
79+
80+
install -Dm644 "$_mkinst/com.wingsummer.winghexexplorer2.desktop" "$pkgdir/usr/share/applications/com.wingsummer.winghexexplorer2.desktop"
81+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
post_install() {
2+
echo "Updating MIME database and icon cache..."
3+
4+
xdg-mime install /opt/WingHexExplorer2/share/x-winghex.xml
5+
xdg-mime default com.wingsummer.winghexexplorer2.desktop application/x-winghex
6+
7+
xdg-icon-resource install --context mimetypes --size 32 /opt/WingHexExplorer2/share/winghexpro32.png application-x-winghex
8+
xdg-icon-resource install --context mimetypes --size 64 /opt/WingHexExplorer2/share/winghexpro64.png application-x-winghex
9+
xdg-icon-resource install --context mimetypes --size 128 /opt/WingHexExplorer2/share/winghexpro128.png application-x-winghex
10+
11+
update-mime-database /usr/share/mime
12+
xdg-icon-resource forceupdate
13+
gtk-update-icon-cache /usr/share/icons/hicolor
14+
update-desktop-database /usr/share/applications
15+
}
16+
17+
post_upgrade() {
18+
post_install
19+
}
20+
21+
pre_remove() {
22+
echo "Cleaning MIME database and icon cache..."
23+
24+
xdg-mime uninstall /opt/WingHexExplorer2/share/x-winghex.xml
25+
26+
xdg-icon-resource uninstall --context mimetypes --size 32 application-x-winghex
27+
xdg-icon-resource uninstall --context mimetypes --size 64 application-x-winghex
28+
xdg-icon-resource uninstall --context mimetypes --size 128 application-x-winghex
29+
30+
update-mime-database /usr/share/mime
31+
xdg-icon-resource forceupdate
32+
gtk-update-icon-cache /usr/share/icons/hicolor
33+
update-desktop-database /usr/share/applications
34+
}

0 commit comments

Comments
 (0)