Skip to content

Commit

Permalink
Merge pull request #25 from Integral-Tech/add-launcher-script
Browse files Browse the repository at this point in the history
Add pkexec launcher script
  • Loading branch information
Inokinoki authored Oct 30, 2024
2 parents 6190136 + 41dc063 commit 645d5ce
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ install(TARGETS QEFIEntryManager
)
# For AppImage
include(GNUInstallDirs)
install(PROGRAMS qefientrymanager-launcher
DESTINATION ${CMAKE_INSTALL_BINDIR}
)
install(PROGRAMS qefientrymanager.desktop
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications
)
Expand Down
16 changes: 16 additions & 0 deletions qefientrymanager-launcher
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

env_array=(
"XDG_CURRENT_DESKTOP=${XDG_CURRENT_DESKTOP}"
"QT_QPA_PLATFORM=${QT_QPA_PLATFORM}"
"QT_QPA_PLATFORMTHEME=${QT_QPA_PLATFORMTHEME}"
"QT_STYLE_OVERRIDE=${QT_STYLE_OVERRIDE}"
)

if [[ -z "${WAYLAND_DISPLAY}" ]]; then
env_array+=("DISPLAY=${DISPLAY}" "XAUTHORITY=${XAUTHORITY}")
else
env_array+=("WAYLAND_DISPLAY=${XDG_RUNTIME_DIR}/${WAYLAND_DISPLAY}")
fi

exec pkexec env "${env_array[@]}" QEFIEntryManager "$@"
2 changes: 1 addition & 1 deletion qefientrymanager.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Name[zh]=EFI 启动管理器
Comment=Manager your EFI boot entries
Comment[x-test]=xxManager your EFI boot entriesxx
Comment[zh]=管理您的 EFI 启动项
Exec=QEFIEntryManager
Exec=qefientrymanager-launcher
Icon=cc.inoki.qefientrymanager
Type=Application
Terminal=false
Expand Down

0 comments on commit 645d5ce

Please sign in to comment.