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:
|
||||
- "dist"
|
||||
- "dist-electron"
|
||||
extraFiles:
|
||||
- from: "extras"
|
||||
to: "extras"
|
||||
|
||||
linux:
|
||||
icon: "public/amber-pm-logo.icns"
|
||||
@@ -25,6 +28,8 @@ linux:
|
||||
- "deb"
|
||||
- "rpm"
|
||||
deb:
|
||||
afterInstall: "scripts/debian-postinst.sh"
|
||||
afterRemove: "scripts/debian-postrm.sh"
|
||||
depends:
|
||||
- "libgtk-3-0"
|
||||
- "libnotify4"
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!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>
|
||||
<vendor>AmberPM</vendor>
|
||||
<icon_name>x-package-repository</icon_name>
|
||||
<action id="store.spark-app.amber-pm-installer">
|
||||
<description>运行amber-pm-installer需要权限</description>
|
||||
<message>要使用amber-pm-installer需要权限</message>
|
||||
<action id="store.spark-app.amber-pm-store">
|
||||
<description>运行apm-app-store管理软件需要权限</description>
|
||||
<message>要使用apm-app-store管理软件需要权限</message>
|
||||
<defaults>
|
||||
<allow_any>yes</allow_any>
|
||||
<allow_inactive>yes</allow_inactive>
|
||||
<allow_active>yes</allow_active>
|
||||
</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>
|
||||
</action>
|
||||
</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