fix: change deb/rpm install path from "mihomo-party" to "clash-party" (#1303)

* fix: incorrect linux install path

* fix: synchronously modify the Linux postinst/uninst script
This commit is contained in:
Moon 2025-10-21 11:41:02 +08:00 committed by GitHub
parent 154e2787d5
commit b02d794092
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 11 deletions

View File

@ -266,7 +266,7 @@ jobs:
run: | run: |
pnpm install pnpm install
pnpm add @mihomo-party/sysproxy-linux-${{ matrix.arch }}-gnu pnpm add @mihomo-party/sysproxy-linux-${{ matrix.arch }}-gnu
sed -i "s/productName: Clash Party/productName: mihomo-party/" electron-builder.yml sed -i "s/productName: Clash Party/productName: clash-party/" electron-builder.yml
- name: Update Version for Dev Build - name: Update Version for Dev Build
if: github.event_name == 'workflow_dispatch' if: github.event_name == 'workflow_dispatch'
env: env:

View File

@ -4,19 +4,19 @@ set -e
if type update-alternatives >/dev/null 2>&1; then if type update-alternatives >/dev/null 2>&1; then
# Remove previous link if it doesn't use update-alternatives # Remove previous link if it doesn't use update-alternatives
if [ -L '/usr/bin/mihomo-party' ] && [ -e '/usr/bin/mihomo-party' ] && [ "$(readlink '/usr/bin/mihomo-party')" != '/etc/alternatives/mihomo-party' ]; then if [ -L '/usr/bin/clash-party' ] && [ -e '/usr/bin/clash-party' ] && [ "$(readlink '/usr/bin/clash-party')" != '/etc/alternatives/clash-party' ]; then
rm -f '/usr/bin/mihomo-party' rm -f '/usr/bin/clash-party'
fi fi
update-alternatives --install '/usr/bin/mihomo-party' 'mihomo-party' '/opt/mihomo-party/mihomo-party' 100 || ln -sf '/opt/mihomo-party/mihomo-party' '/usr/bin/mihomo-party' update-alternatives --install '/usr/bin/clash-party' 'clash-party' '/opt/clash-party/mihomo-party' 100 || ln -sf '/opt/clash-party/mihomo-party' '/usr/bin/clash-party'
else else
ln -sf '/opt/mihomo-party/mihomo-party' '/usr/bin/mihomo-party' ln -sf '/opt/clash-party/mihomo-party' '/usr/bin/clash-party'
fi fi
chmod 4755 '/opt/mihomo-party/chrome-sandbox' 2>/dev/null || true chmod 4755 '/opt/clash-party/chrome-sandbox' 2>/dev/null || true
chmod +sx /opt/mihomo-party/resources/sidecar/mihomo 2>/dev/null || true chmod +sx /opt/clash-party/resources/sidecar/mihomo 2>/dev/null || true
chmod +sx /opt/mihomo-party/resources/sidecar/mihomo-alpha 2>/dev/null || true chmod +sx /opt/clash-party/resources/sidecar/mihomo-alpha 2>/dev/null || true
chmod +sx /opt/mihomo-party/resources/sidecar/mihomo-smart 2>/dev/null || true chmod +sx /opt/clash-party/resources/sidecar/mihomo-smart 2>/dev/null || true
if hash update-mime-database 2>/dev/null; then if hash update-mime-database 2>/dev/null; then
update-mime-database /usr/share/mime || true update-mime-database /usr/share/mime || true

View File

@ -3,10 +3,10 @@
case "$1" in case "$1" in
remove|purge|0) remove|purge|0)
if type update-alternatives >/dev/null 2>&1; then if type update-alternatives >/dev/null 2>&1; then
update-alternatives --remove 'mihomo-party' '/opt/mihomo-party/mihomo-party' 2>/dev/null || true update-alternatives --remove 'clash-party' '/opt/clash-party/mihomo-party' 2>/dev/null || true
fi fi
[ -L '/usr/bin/mihomo-party' ] && rm -f '/usr/bin/mihomo-party' [ -L '/usr/bin/clash-party' ] && rm -f '/usr/bin/clash-party'
if hash update-mime-database 2>/dev/null; then if hash update-mime-database 2>/dev/null; then
update-mime-database /usr/share/mime || true update-mime-database /usr/share/mime || true