deepin.startdde: 6.0.10 -> 6.0.13

This commit is contained in:
rewine
2024-03-08 18:33:23 +08:00
committed by rewine
parent 69cfd69c54
commit b3c5ae3428
2 changed files with 5 additions and 70 deletions
@@ -1,61 +0,0 @@
diff --git a/misc/auto_launch/chinese.json b/misc/auto_launch/chinese.json
index 14b8bff..2b2c412 100644
--- a/misc/auto_launch/chinese.json
+++ b/misc/auto_launch/chinese.json
@@ -3,7 +3,7 @@
"Priority": 9,
"Group": [
{
- "Command": "/usr/bin/dde-file-manager",
+ "Command": "dde-file-manager",
"Wait": false,
"Args": [
"-d"
@@ -25,7 +25,7 @@
"Priority": 7,
"Group": [
{
- "Command": "/usr/bin/dde-shutdown",
+ "Command": "dde-shutdown",
"Wait": false,
"Args": [
"-d"
diff --git a/session.go b/session.go
index da76626..bf9a2c4 100644
--- a/session.go
+++ b/session.go
@@ -14,6 +14,7 @@ import (
"sync"
"syscall"
"time"
+ "strings"
"github.com/adrg/xdg"
"github.com/godbus/dbus/v5"
@@ -85,7 +86,7 @@ type SessionManager struct {
}
const (
- cmdShutdown = "/usr/bin/dde-shutdown"
+ cmdShutdown = "dde-shutdown"
lockFrontDest = "org.deepin.dde.LockFront1"
lockFrontIfc = lockFrontDest
lockFrontObjPath = "/org/deepin/dde/LockFront1"
@@ -458,7 +459,7 @@ func (m *SessionManager) SetLocked(sender dbus.Sender, value bool) *dbus.Error {
return dbusutil.ToError(err)
}
- if exe == "/usr/bin/dde-lock" {
+ if strings.Contains(exe, "dde-lock") {
m.setLocked(value)
return nil
}
@@ -478,7 +479,7 @@ func (m *SessionManager) SetLocked(sender dbus.Sender, value bool) *dbus.Error {
return dbusutil.ToError(fmt.Errorf("desktop file %q is invalid", desktopFile))
}
exe = info.GetExecutable()
- if exe != "/usr/bin/dde-lock" {
+ if strings.Contains(exe, "dde-lock") {
return dbusutil.ToError(fmt.Errorf("exe %q of desktop file %q is invalid", exe, desktopFile))
}
@@ -19,29 +19,25 @@
buildGoModule rec {
pname = "startdde";
version = "6.0.10";
version = "6.0.13";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
hash = "sha256-B2B8QlA1Ps/ybVzionngtwDwTLd7H02RKJwcXymGlJM=";
hash = "sha256-sftPQq4cSyCTuvVtvjT8YJDLQOpSbmnXEVzFwFFaU4U=";
};
patches = [
./0001-avoid-use-hardcode-path.patch
];
vendorHash = "sha256-5BEOazAygYL1N+CaGAbUwdpHZ1EiHr6yNW27/bXNdZg=";
vendorHash = "sha256-Y81p3yPQayXbvyUI7N6PvFDO3hSU3SL0AuUKxvZkZNE=";
postPatch = ''
substituteInPlace display/manager.go session.go \
substituteInPlace display/manager.go \
--replace "/bin/bash" "${runtimeShell}"
substituteInPlace misc/systemd_task/dde-display-task-refresh-brightness.service \
--replace "/usr/bin/dbus-send" "${dbus}/bin/dbus-send"
substituteInPlace display/manager.go utils.go session.go \
substituteInPlace display/manager.go \
--replace "/usr/lib/deepin-daemon" "/run/current-system/sw/lib/deepin-daemon"
substituteInPlace misc/lightdm.conf --replace "/usr" "$out"