mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-27 21:20:29 +08:00
Compare commits
No commits in common. "154e2787d5e06531ff3ea99fd8bdf564d2ef8076" and "877a84dc32cfeb7459f205166e857005a8b8baa1" have entirely different histories.
154e2787d5
...
877a84dc32
@ -1,10 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -e
|
if type update-alternatives 2>/dev/null >&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/mihomo-party' -a -e '/usr/bin/mihomo-party' -a "`readlink '/usr/bin/mihomo-party'`" != '/etc/alternatives/mihomo-party' ]; then
|
||||||
rm -f '/usr/bin/mihomo-party'
|
rm -f '/usr/bin/mihomo-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/mihomo-party' 'mihomo-party' '/opt/mihomo-party/mihomo-party' 100 || ln -sf '/opt/mihomo-party/mihomo-party' '/usr/bin/mihomo-party'
|
||||||
@ -12,11 +10,10 @@ else
|
|||||||
ln -sf '/opt/mihomo-party/mihomo-party' '/usr/bin/mihomo-party'
|
ln -sf '/opt/mihomo-party/mihomo-party' '/usr/bin/mihomo-party'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chmod 4755 '/opt/mihomo-party/chrome-sandbox' 2>/dev/null || true
|
chmod 4755 '/opt/mihomo-party/chrome-sandbox' || true
|
||||||
|
chmod +sx /opt/mihomo-party/resources/sidecar/mihomo
|
||||||
chmod +sx /opt/mihomo-party/resources/sidecar/mihomo 2>/dev/null || true
|
chmod +sx /opt/mihomo-party/resources/sidecar/mihomo-alpha
|
||||||
chmod +sx /opt/mihomo-party/resources/sidecar/mihomo-alpha 2>/dev/null || true
|
chmod +sx /opt/mihomo-party/resources/sidecar/mihomo-smart
|
||||||
chmod +sx /opt/mihomo-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
|
||||||
|
|||||||
@ -1,22 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
remove|purge|0)
|
|
||||||
if type update-alternatives >/dev/null 2>&1; then
|
|
||||||
update-alternatives --remove 'mihomo-party' '/opt/mihomo-party/mihomo-party' 2>/dev/null || true
|
|
||||||
fi
|
|
||||||
|
|
||||||
[ -L '/usr/bin/mihomo-party' ] && rm -f '/usr/bin/mihomo-party'
|
|
||||||
|
|
||||||
if hash update-mime-database 2>/dev/null; then
|
|
||||||
update-mime-database /usr/share/mime || true
|
|
||||||
fi
|
|
||||||
|
|
||||||
if hash update-desktop-database 2>/dev/null; then
|
|
||||||
update-desktop-database /usr/share/applications || true
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
# others
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
@ -68,9 +68,7 @@ linux:
|
|||||||
artifactName: clash-party-linux-${version}-${arch}.${ext}
|
artifactName: clash-party-linux-${version}-${arch}.${ext}
|
||||||
deb:
|
deb:
|
||||||
afterInstall: 'build/linux/postinst'
|
afterInstall: 'build/linux/postinst'
|
||||||
afterRemove: 'build/linux/postuninst'
|
|
||||||
rpm:
|
rpm:
|
||||||
afterInstall: 'build/linux/postinst'
|
afterInstall: 'build/linux/postinst'
|
||||||
afterRemove: 'build/linux/postuninst'
|
|
||||||
npmRebuild: true
|
npmRebuild: true
|
||||||
publish: []
|
publish: []
|
||||||
|
|||||||
@ -36,7 +36,7 @@ const Mihomo: React.FC = () => {
|
|||||||
const {
|
const {
|
||||||
core = 'mihomo',
|
core = 'mihomo',
|
||||||
specificVersion,
|
specificVersion,
|
||||||
enableSmartCore = false,
|
enableSmartCore = true,
|
||||||
enableSmartOverride = true,
|
enableSmartOverride = true,
|
||||||
smartCoreUseLightGBM = false,
|
smartCoreUseLightGBM = false,
|
||||||
smartCoreCollectData = false,
|
smartCoreCollectData = false,
|
||||||
@ -414,7 +414,7 @@ const Mihomo: React.FC = () => {
|
|||||||
</SettingItem>
|
</SettingItem>
|
||||||
|
|
||||||
{/* Smart 覆写开关 */}
|
{/* Smart 覆写开关 */}
|
||||||
{enableSmartCore && core === 'mihomo-smart' && (
|
{enableSmartCore && (
|
||||||
<SettingItem
|
<SettingItem
|
||||||
title={
|
title={
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user