mirror of
https://github.com/ashaduri/gsmartcontrol.git
synced 2026-09-25 21:35:33 +00:00
Add AppImage support with rDNS format and portable paths
Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com>
This commit is contained in:
co-authored by
ashaduri
parent
73af50dc9d
commit
8d95e6e90c
+20
-5
@@ -7,7 +7,13 @@
|
||||
|
||||
# Generate files
|
||||
configure_file("gsmartcontrol.appdata.in.xml" "gsmartcontrol.appdata.xml" ESCAPE_QUOTES @ONLY)
|
||||
configure_file("gsmartcontrol.in.desktop" "gsmartcontrol.desktop" ESCAPE_QUOTES @ONLY)
|
||||
if (APP_BUILD_APPIMAGE)
|
||||
set(APPIMAGE_EXEC_LINE "Exec=\"@CMAKE_INSTALL_FULL_BINDIR@/gsmartcontrol\"")
|
||||
configure_file("gsmartcontrol.in.desktop" "dev.shaduri.gsmartcontrol.desktop" ESCAPE_QUOTES @ONLY)
|
||||
else()
|
||||
set(APPIMAGE_EXEC_LINE "Exec=\"@CMAKE_INSTALL_FULL_BINDIR@/gsmartcontrol-root\"")
|
||||
configure_file("gsmartcontrol.in.desktop" "gsmartcontrol.desktop" ESCAPE_QUOTES @ONLY)
|
||||
endif()
|
||||
configure_file("gsmartcontrol-root.in.sh" "gsmartcontrol-root.sh" ESCAPE_QUOTES @ONLY)
|
||||
configure_file("org.gsmartcontrol.in.policy" "org.gsmartcontrol.policy" ESCAPE_QUOTES @ONLY)
|
||||
|
||||
@@ -42,8 +48,13 @@ endif()
|
||||
|
||||
# Desktop file
|
||||
if (NOT WIN32)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/gsmartcontrol.desktop"
|
||||
DESTINATION "${CMAKE_INSTALL_DATADIR}/applications/")
|
||||
if (APP_BUILD_APPIMAGE)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/dev.shaduri.gsmartcontrol.desktop"
|
||||
DESTINATION "${CMAKE_INSTALL_DATADIR}/applications/")
|
||||
else()
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/gsmartcontrol.desktop"
|
||||
DESTINATION "${CMAKE_INSTALL_DATADIR}/applications/")
|
||||
endif()
|
||||
|
||||
# Appdata file
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/gsmartcontrol.appdata.xml"
|
||||
@@ -55,9 +66,13 @@ if (NOT WIN32)
|
||||
|
||||
# Man pages
|
||||
install(FILES "man1/gsmartcontrol.1" DESTINATION "${CMAKE_INSTALL_MANDIR}/man1")
|
||||
install(FILES "man1/gsmartcontrol.1" DESTINATION "${CMAKE_INSTALL_MANDIR}/man1" RENAME "gsmartcontrol-root.1")
|
||||
if (NOT APP_BUILD_APPIMAGE)
|
||||
install(FILES "man1/gsmartcontrol.1" DESTINATION "${CMAKE_INSTALL_MANDIR}/man1" RENAME "gsmartcontrol-root.1")
|
||||
endif()
|
||||
|
||||
# Scripts (this goes to bin, not sbin, as it doesn't require root privileges before running)
|
||||
install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/gsmartcontrol-root.sh" TYPE BIN RENAME "gsmartcontrol-root")
|
||||
if (NOT APP_BUILD_APPIMAGE)
|
||||
install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/gsmartcontrol-root.sh" TYPE BIN RENAME "gsmartcontrol-root")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component type="desktop">
|
||||
<id>gsmartcontrol</id>
|
||||
<id>dev.shaduri.gsmartcontrol</id>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<project_license>GPL-3.0</project_license>
|
||||
<name>GSmartControl</name>
|
||||
@@ -14,7 +14,7 @@
|
||||
on it.
|
||||
</p>
|
||||
</description>
|
||||
<launchable type="desktop-id">gsmartcontrol.desktop</launchable>
|
||||
<launchable type="desktop-id">dev.shaduri.gsmartcontrol.desktop</launchable>
|
||||
<url type="homepage">https://gsmartcontrol.shaduri.dev</url>
|
||||
<screenshots>
|
||||
<screenshot type="default">
|
||||
|
||||
@@ -63,4 +63,5 @@ Icon=gsmartcontrol
|
||||
#X-KDE-RootOnly=true
|
||||
|
||||
# Run with root permissions.
|
||||
Exec="@CMAKE_INSTALL_FULL_BINDIR@/gsmartcontrol-root"
|
||||
# For AppImage builds, execute the binary directly (AppImage does not support embedded sudo scripts)
|
||||
@APPIMAGE_EXEC_LINE@
|
||||
|
||||
Reference in New Issue
Block a user