docs: 更新 AUR 相关内容;

This commit is contained in:
寂静的羽夏 2025-07-27 19:46:59 +08:00
parent 2ea09fa7eb
commit 263e3eb7e2
5 changed files with 195 additions and 0 deletions

View File

@ -126,6 +126,8 @@
6. 无论以任何为目的,如未获得我作者的授权,不得修改任意程序内指向的网络链接和软件关于信息,比如赞助和关于软件部分的内容等。 6. 无论以任何为目的,如未获得我作者的授权,不得修改任意程序内指向的网络链接和软件关于信息,比如赞助和关于软件部分的内容等。
7. 不得在安装程序内插入任何含有商业推广的插件。 7. 不得在安装程序内插入任何含有商业推广的插件。
  如果你是 Windows 用户,你可以到发行版区下载正式版,其他版本请自行编译;对于 Linux ,你可以尝试到发行区下载 run 文件或者自行编译;如果你使用的操作系统是基于 Arch 的,那么你可以安装`winghexexplorer2`这个包,也可以安装`winghexexplorer2-git`来体验日更版最新内容,但最好请不要将日更版应用于日常使用,虽然目前通常是比较稳定的。
### issue 前必读 ### issue 前必读
  如果你有任何形式的建议,在提交 issue 之前,请一定要阅读下面的声明,以免浪费我们双方宝贵的时间:   如果你有任何形式的建议,在提交 issue 之前,请一定要阅读下面的声明,以免浪费我们双方宝贵的时间:

View File

@ -126,6 +126,8 @@ First of all, I would like to express my sincere tanks for your enthusiastic hel
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. 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.
7. You may not insert any plug-in containing commercial promotion in the installation program. 7. You may not insert any plug-in containing commercial promotion in the installation program.
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.
### Issue ### Issue
If you have any suggestions, please be sure to read the following statement before submitting an issue to avoid wasting our precious time: If you have any suggestions, please be sure to read the following statement before submitting an issue to avoid wasting our precious time:

76
mkinstaller/AUR/PKGBUILD Normal file
View File

@ -0,0 +1,76 @@
# Maintainer: wingsummer <wing-summer@qq.com>
pkgname=winghexexplorer2
pkgver=2.2.3
pkgrel=1
pkgdesc='一个自由强大跨平台的十六进制编辑器 / A free, powerful, cross-platform hex editor'
url="https://github.com/Wing-summer/WingHexExplorer2"
arch=(x86_64 aarch64)
license=(AGPL-3.0-only)
conflicts=(winghexexplorer2-git)
depends=('qt6-base')
makedepends=('git' 'cmake' 'gcc' 'clang' 'qt6-tools' 'qt6-translations')
optdepends=('qt6-translations: translations')
source=("git+$url.git#tag=v$pkgver")
sha256sums=('SKIP')
install=winghexexplorer2.install
prepare() {
cd "$srcdir/WingHexExplorer2"
sed -i 's|git@github.com:|https://github.com/|g' .gitmodules
git submodule sync
git submodule update --init
git submodule foreach --recursive "
if [ -f .gitmodules ]; then
sed -i 's|git@github.com:|https://github.com/|g' .gitmodules
git submodule sync
fi
"
git submodule update --init --recursive
}
build() {
cd "$srcdir/WingHexExplorer2"
local _flags=(
-D CMAKE_INSTALL_PREFIX=/opt
-D CMAKE_BUILD_TYPE=Release
-D WINGHEX_USE_FRAMELESS=ON
-D BUILD_TEST_PLUGIN=OFF
-D BUILD_SHARED_MEM_EXT=OFF
)
cmake -S . -B build "${_flags[@]}"
cmake --build build -- -j"$(nproc)"
}
check() {
true
}
package() {
cd "$srcdir/WingHexExplorer2"
local _optdir="$pkgdir/opt/WingHexExplorer2"
local _mkinst="mkinstaller/pyscript"
mkdir -p "$_optdir"
install -Dm755 build/WingHexExplorer2 "$_optdir/WingHexExplorer2"
install -Dm644 build/WingPlugin/libWingPlugin.so "$_optdir/libWingPlugin.so"
for _sub in plugin scripts aslib; do
mkdir -p "$_optdir/$_sub"
done
cp -a "$_mkinst/share" "build/lang" "$_optdir/"
# install -Dm644 mkinstaller/config.ini "$_optdir/config.ini" // this file is not existed before 2.3.0
for _f in LICENSE authorband.svg licenseband.svg screenshot.png README.md images/author.jpg; do
install -Dm644 "$srcdir/WingHexExplorer2/${_f}" "$_optdir/${_f##*/}"
done
local md5=$(md5sum "$_optdir/WingHexExplorer2" | cut -d' ' -f1 | tr '[:lower:]' '[:upper:]')
echo "$md5" > "$_optdir/md5sums"
install -Dm644 "$_mkinst/com.wingsummer.winghexexplorer2.desktop" "$pkgdir/usr/share/applications/com.wingsummer.winghexexplorer2.desktop"
}

View File

@ -0,0 +1,81 @@
# Maintainer: wingsummer <wing-summer@qq.com>
pkgname=winghexexplorer2-git
pkgver=2.2.3.r16.g2ea09fa
pkgrel=1
pkgdesc='一个自由强大跨平台的十六进制编辑器(每日构建版) / A free, powerful, cross-platform hex editor (Nightly Builds)'
url="https://github.com/Wing-summer/WingHexExplorer2"
arch=(x86_64 aarch64)
license=(AGPL-3.0-only)
conflicts=(winghexexplorer2)
depends=('qt6-base')
makedepends=('git' 'cmake' 'gcc' 'clang' 'qt6-tools' 'qt6-translations')
optdepends=('qt6-translations: translations')
source=("git+$url.git#branch=main")
sha256sums=('SKIP')
install=winghexexplorer2.install
pkgver() {
cd "$srcdir/WingHexExplorer2"
git describe --long --tags --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
cd "$srcdir/WingHexExplorer2"
sed -i 's|git@github.com:|https://github.com/|g' .gitmodules
git submodule sync
git submodule update --init
git submodule foreach --recursive "
if [ -f .gitmodules ]; then
sed -i 's|git@github.com:|https://github.com/|g' .gitmodules
git submodule sync
fi
"
git submodule update --init --recursive
}
build() {
cd "$srcdir/WingHexExplorer2"
local _flags=(
-D CMAKE_INSTALL_PREFIX=/opt
-D CMAKE_BUILD_TYPE=Release
-D WINGHEX_USE_FRAMELESS=ON
-D BUILD_TEST_PLUGIN=OFF
-D BUILD_SHARED_MEM_EXT=OFF
)
cmake -S . -B build "${_flags[@]}"
cmake --build build -- -j"$(nproc)"
}
check() {
true
}
package() {
cd "$srcdir/WingHexExplorer2"
local _optdir="$pkgdir/opt/WingHexExplorer2"
local _mkinst="mkinstaller/pyscript"
mkdir -p "$_optdir"
install -Dm755 build/WingHexExplorer2 "$_optdir/WingHexExplorer2"
install -Dm644 build/WingPlugin/libWingPlugin.so "$_optdir/libWingPlugin.so"
for _sub in plugin scripts aslib; do
mkdir -p "$_optdir/$_sub"
done
cp -a "$_mkinst/share" "build/lang" "$_optdir/"
install -Dm644 mkinstaller/config.ini "$_optdir/config.ini"
for _f in LICENSE authorband.svg licenseband.svg screenshot.png README.md images/author.jpg; do
install -Dm644 "$srcdir/WingHexExplorer2/${_f}" "$_optdir/${_f##*/}"
done
local md5=$(md5sum "$_optdir/WingHexExplorer2" | cut -d' ' -f1 | tr '[:lower:]' '[:upper:]')
echo "$md5" > "$_optdir/md5sums"
install -Dm644 "$_mkinst/com.wingsummer.winghexexplorer2.desktop" "$pkgdir/usr/share/applications/com.wingsummer.winghexexplorer2.desktop"
}

View File

@ -0,0 +1,34 @@
post_install() {
echo "Updating MIME database and icon cache..."
xdg-mime install /opt/WingHexExplorer2/share/x-winghex.xml
xdg-mime default com.wingsummer.winghexexplorer2.desktop application/x-winghex
xdg-icon-resource install --context mimetypes --size 32 /opt/WingHexExplorer2/share/winghexpro32.png application-x-winghex
xdg-icon-resource install --context mimetypes --size 64 /opt/WingHexExplorer2/share/winghexpro64.png application-x-winghex
xdg-icon-resource install --context mimetypes --size 128 /opt/WingHexExplorer2/share/winghexpro128.png application-x-winghex
update-mime-database /usr/share/mime
xdg-icon-resource forceupdate
gtk-update-icon-cache /usr/share/icons/hicolor
update-desktop-database /usr/share/applications
}
post_upgrade() {
post_install
}
pre_remove() {
echo "Cleaning MIME database and icon cache..."
xdg-mime uninstall /opt/WingHexExplorer2/share/x-winghex.xml
xdg-icon-resource uninstall --context mimetypes --size 32 application-x-winghex
xdg-icon-resource uninstall --context mimetypes --size 64 application-x-winghex
xdg-icon-resource uninstall --context mimetypes --size 128 application-x-winghex
update-mime-database /usr/share/mime
xdg-icon-resource forceupdate
gtk-update-icon-cache /usr/share/icons/hicolor
update-desktop-database /usr/share/applications
}