Commit Graph

13 Commits

Author SHA1 Message Date
ck
50a0ad53ec feat: add app extra/unset env config
to fix #8667 you can
- subpath:"/FoxitReader" appExtraEnvironments : "QT_QPA_PLATFORM=xcb"
- subpath:"/FoxitReader" appEnvironmentsBlacklist : "QT_QPA_PLATFORM"

```
dde-dconfig set -a org.deepin.dde.application-manager -r org.deepin.dde.application-manager -k appExtraEnvironments -s "/FoxitReader" -v "[\"QT_QPA_PLATFORM=xcb\"]"
dde-dconfig set -a org.deepin.dde.application-manager -r org.deepin.dde.application-manager -k appEnvironmentsBlacklist -s "/FoxitReader" -v "[\"QT_QPA_PLATFORM\"]"
```

Issue: https://github.com/linuxdeepin/developer-center/issues/8667
2024-06-13 11:32:10 +08:00
ComixHe
1b4fb5551d feat: add GIO_LAUNCHED_DESKTOP_FILE to runtime envs
add hooks for dde-dock

Signed-off-by: ComixHe <heyuming@deepin.org>
2024-03-11 16:44:58 +08:00
ComixHe
34c995d992 feat: set systemd.unit's property CollectMode to failed-or-inactive
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-03-11 16:44:58 +08:00
ComixHe
9d2cee79fe refact: suppress warnings and standardize project
Signed-off-by: ComixHe <heyuming@deepin.org>
2024-02-20 11:45:45 +08:00
ComixHe
aca0531e85 fix: support ExecSearchPath to prevent systemd from not finding binaries
In NixOS, maintainer used a patch to modify the DEFAULT_PATH macro of systemd.
However, systemd can only find its own binaries under that path.
At this point, if you take the relative path of the binary as a parameter to StartTransientUnit,
systemd will use DEFAULT_PATH to look for the binary, which will cause systemd to not find it.

There may be other Linux distributions that change this path,
so add ExecSearchPath to prevent systemd from not finding the binary.

Signed-off-by: ComixHe <heyuming@deepin.org>
2024-02-02 17:58:43 +08:00
ComixHe
8970298ad0 feat: support set application's working directory
Signed-off-by: ComixHe <heyuming@deepin.org>
2023-10-08 14:44:31 +08:00
ComixHe
3a9973c772 refact: improve method of launcher helper append variant value
Signed-off-by: ComixHe <heyuming@deepin.org>
2023-09-06 10:59:58 +08:00
black-desk
65b6c9eaf0 fix(launchHelper): set ExitType to cgroup
ExitType defaults to `main`, which means systemd will kill all processes
in the application cgroup when the "main" process exited.

This default behavior make applications like vscode which will always
daemonlize itself killed immediately by systemd, so we should set this
property to `cgroup` instead.

refer to https://www.freedesktop.org/software/systemd/man/systemd.service.html#ExitType=

Signed-off-by: black-desk <me@black-desk.cn>
2023-08-22 11:42:13 +08:00
ComixHe
920594d6e5 refact: ApplicationService ctor and some member functions
Signed-off-by: ComixHe <heyuming@deepin.org>
2023-08-22 11:42:13 +08:00
ComixHe
a3dd315e33 test: add identify test
fix some bugs found in testing

Signed-off-by: ComixHe <heyuming@deepin.org>
2023-08-16 17:54:42 +08:00
ComixHe
722d0666d3 feat: add impl of updateApplicationInfo
1. change the way to traverse files
2. refact some code

Signed-off-by: ComixHe <heyuming@deepin.org>
Signed-off-by: black-desk <me@black-desk.cn>
2023-08-14 13:39:05 +08:00
ComixHe
799100436c feat: watch systemd unit new and remove to sync state
add default values to XDG_DATA_DIRS if it dosen't set

Signed-off-by: ComixHe <heyuming@deepin.org>
Signed-off-by: black-desk <me@black-desk.cn>
2023-08-14 13:39:05 +08:00
black-desk
4687265e65 refact: restructure project
1. adjust project structure;
2. use config.h to locate app-launch-helper binary.
2023-08-07 16:46:57 +08:00