Commit Graph

13 Commits

Author SHA1 Message Date
ComixHe
ccfb245419 refact: Desktop file parsing process and Application methods to
Properties

Signed-off-by: ComixHe <heyuming@deepin.org>
2023-08-25 18:23:21 +08:00
ComixHe
9f2a8b6798 feat: add property "LastLaunchedTime"
1. reactor some utils implementation.
2. remove constexpr before `decltype(auto)` due to GCC bug.
refer: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102229

Signed-off-by: ComixHe <heyuming@deepin.org>
2023-08-23 17:46:57 +08:00
ComixHe
2bdb9e99ee refact: optimize regular expression initialization
add profiling test.

Signed-off-by: ComixHe <heyuming@deepin.org>
2023-08-22 11:42:13 +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
d49a99d252 feat: add objectManager interface
refact the way to get DBus interface from Qt Meta System

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
2fa74e40e5 refact: change implementation of UpdateApplicationInfo
adjust the way of get XDG_DATA_DIRS.

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
5183716873 refact: apply review suggestions
Signed-off-by: black-desk <me@black-desk.cn>
2023-08-14 13:39:05 +08:00
ComixHe
bc2bdf559e example: add launch application example
fix some bug while testing the example

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
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