mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-04-26 01:10:16 +08:00
feat: 添加PolicyKit权限配置和安装/卸载脚本
This commit is contained in:
@@ -7,6 +7,9 @@ directories:
|
|||||||
files:
|
files:
|
||||||
- "dist"
|
- "dist"
|
||||||
- "dist-electron"
|
- "dist-electron"
|
||||||
|
extraFiles:
|
||||||
|
- from: "extras"
|
||||||
|
to: "extras"
|
||||||
|
|
||||||
linux:
|
linux:
|
||||||
icon: "public/amber-pm-logo.icns"
|
icon: "public/amber-pm-logo.icns"
|
||||||
@@ -25,6 +28,8 @@ linux:
|
|||||||
- "deb"
|
- "deb"
|
||||||
- "rpm"
|
- "rpm"
|
||||||
deb:
|
deb:
|
||||||
|
afterInstall: "scripts/debian-postinst.sh"
|
||||||
|
afterRemove: "scripts/debian-postrm.sh"
|
||||||
depends:
|
depends:
|
||||||
- "libgtk-3-0"
|
- "libgtk-3-0"
|
||||||
- "libnotify4"
|
- "libnotify4"
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
|
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
|
||||||
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
|
"https://specifications.freedesktop.org/PolicyKit/1.0/policyconfig.dtd">
|
||||||
<policyconfig>
|
<policyconfig>
|
||||||
<vendor>AmberPM</vendor>
|
<vendor>AmberPM</vendor>
|
||||||
<icon_name>x-package-repository</icon_name>
|
<icon_name>x-package-repository</icon_name>
|
||||||
<action id="store.spark-app.amber-pm-installer">
|
<action id="store.spark-app.amber-pm-store">
|
||||||
<description>运行amber-pm-installer需要权限</description>
|
<description>运行apm-app-store管理软件需要权限</description>
|
||||||
<message>要使用amber-pm-installer需要权限</message>
|
<message>要使用apm-app-store管理软件需要权限</message>
|
||||||
<defaults>
|
<defaults>
|
||||||
<allow_any>yes</allow_any>
|
<allow_any>yes</allow_any>
|
||||||
<allow_inactive>yes</allow_inactive>
|
<allow_inactive>yes</allow_inactive>
|
||||||
<allow_active>yes</allow_active>
|
<allow_active>yes</allow_active>
|
||||||
</defaults>
|
</defaults>
|
||||||
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/apm-installer</annotate>
|
<annotate key="org.freedesktop.policykit.exec.path">/opt/apm-app-store/extras/apm-installer</annotate>
|
||||||
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
|
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
|
||||||
</action>
|
</action>
|
||||||
</policyconfig>
|
</policyconfig>
|
||||||
3
scripts/debian-postinst.sh
Executable file
3
scripts/debian-postinst.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
cp -fv /opt/apm-app-store/extras/store.spark-app.amber-pm-store.policy /usr/share/polkit-1/actions/store.spark-app.amber-pm-store.policy
|
||||||
3
scripts/debian-postrm.sh
Executable file
3
scripts/debian-postrm.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
rm -fv /usr/share/polkit-1/actions/store.spark-app.amber-pm-store.policy
|
||||||
Reference in New Issue
Block a user