Updated .in files to use cmake variables.

This commit is contained in:
Alexander Shaduri
2021-02-26 14:01:09 +04:00
parent 8eaef139e9
commit fed79c7de0
12 changed files with 35 additions and 32 deletions
+9 -1
View File
@@ -1,11 +1,19 @@
# Generate files
# Variables for .in files
set(WINDOWS_SUFFIX "win32")
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
set(WINDOWS_SUFFIX "win64")
endif()
configure_file("nsis/distribution.in.txt" "nsis/distribution.txt" ESCAPE_QUOTES @ONLY)
configure_file("nsis/gsmartcontrol.in.nsi" "nsis/gsmartcontrol.nsi" ESCAPE_QUOTES @ONLY)
configure_file("gsmartcontrol.appdata.in.xml" "gsmartcontrol.appdata.xml" ESCAPE_QUOTES @ONLY)
configure_file("gsmartcontrol.in.desktop" "gsmartcontrol.desktop" ESCAPE_QUOTES @ONLY)
configure_file("gsmartcontrol-root.in.sh" "gsmartcontrol-root.sh" ESCAPE_QUOTES @ONLY)
configure_file("org.gsmartcontrol.in.policy" "gsmartcontrol.policy" ESCAPE_QUOTES @ONLY)
configure_file("debian-postinst.in.sh" "${CMAKE_BINARY_DIR}/postinst" ESCAPE_QUOTES @ONLY)
configure_file("debian-postrm.in.sh" "${CMAKE_BINARY_DIR}/postrm" ESCAPE_QUOTES @ONLY)
@@ -41,7 +49,7 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/gsmartcontrol.appdata.xml"
DESTINATION "${CMAKE_INSTALL_DATADIR}/metainfo/")
# PolKit file
install(FILES "org.gsmartcontrol.policy"
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/org.gsmartcontrol.policy"
DESTINATION "${CMAKE_INSTALL_DATADIR}/polkit-1/actions/")
# Man pages
+3 -3
View File
@@ -8,7 +8,7 @@
# Run gsmartcontrol with root, asking for root password first.
# export GSMARTCONTROL_SU to override a su command (e.g. "kdesu -c").
EXEC_BIN="@prefix@/sbin/gsmartcontrol";
EXEC_BIN="@CMAKE_INSTALL_SBINDIR@/gsmartcontrol";
prog_name="gsmartcontrol"
@@ -115,10 +115,10 @@ fi
# Add these directories _before_ existing PATH, so that the user is not
# tricked into running it from some other path (we're running as root with
# the user's env after all).
# Add @prefix@/sbin as well (freebsd seems to require it).
# Add sbindir as well (freebsd seems to require it).
# Note that beesu won't show a GUI login box if /usr/sbin is before /usr/bin,
# so add it first as well.
EXTRA_PATHS="/usr/bin:/usr/sbin:/usr/local/sbin:@prefix@/sbin";
EXTRA_PATHS="/usr/bin:/usr/sbin:/usr/local/sbin:@CMAKE_INSTALL_SBINDIR@";
export PATH="$EXTRA_PATHS:$PATH"
+1 -1
View File
@@ -26,4 +26,4 @@ Icon=gsmartcontrol
#X-KDE-RootOnly=true
# Run with root permissions.
Exec="@prefix@/bin/gsmartcontrol-root"
Exec="@CMAKE_INSTALL_BINDIR@/bin/gsmartcontrol-root"
+3 -3
View File
@@ -1,10 +1,10 @@
GSmartControl - Hard disk drive and SSD health inspection tool
Version @VERSION@
Version @CMAKE_PROJECT_VERSION@
The latest version of this distribution, as well as the source code of
GSmartControl, can be found at
https://gsmartcontrol.sourceforge.io
https://gsmartcontrol.shaduri.dev
and
https://sourceforge.net/projects/gsmartcontrol/files/
@@ -21,4 +21,4 @@ with console output), update-smart-drivedb.exe (drive database updater).
The combined distribution is licensed under GNU GPL version 3.
See LICENSE_gpl3.txt for details.
See LICENSE.txt for details.
+2 -2
View File
@@ -4,11 +4,11 @@
; Compatible with NSIS Unicode 2.45.
; Public Domain
!define PRODUCT_VERSION "@VERSION@"
!define PRODUCT_VERSION "@CMAKE_PROJECT_VERSION@"
!define PRODUCT_NAME "GSmartControl"
!define PRODUCT_NAME_SMALL "gsmartcontrol"
!define PRODUCT_PUBLISHER "Alexander Shaduri"
!define PRODUCT_WEB_SITE "https://gsmartcontrol.sourceforge.io"
!define PRODUCT_WEB_SITE "https://gsmartcontrol.shaduri.dev"
;!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\AppMainExe.exe"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
@@ -12,7 +12,7 @@
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/gsmartcontrol</annotate>
<annotate key="org.freedesktop.policykit.exec.path">@CMAKE_INSTALL_SBINDIR@/gsmartcontrol</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
+2 -2
View File
@@ -1,5 +1,5 @@
gsmartcontrol (@VERSION@+nmu1) unstable; urgency=low
gsmartcontrol (@CMAKE_PROJECT_VERSION@+nmu1) unstable; urgency=low
* Permanently Initial Release.
-- Alexander Shaduri <ashaduriREMOVETHIS@gmail.com> Sat, 15 Nov 2008 00:12:04 +0400
-- Alexander Shaduri <ashaduri@gmail.com> Sat, 15 Nov 2008 00:12:04 +0400
+3
View File
@@ -14,6 +14,9 @@ target_compile_definitions(app_gtkmm_interface
INTERFACE
ENABLE_GLIB=1
ENABLE_GLIBMM=1
# For porting to GTK4
GDK_DISABLE_DEPRECATED=1
GTK_DISABLE_DEPRECATED=1
)
+1 -1
View File
@@ -3,7 +3,7 @@
# Supported distributions: openSUSE, Fedora, CentOS, RHEL.
Name: gsmartcontrol
Version: @VERSION@
Version: @CMAKE_PROJECT_VERSION@
Release: 0
License: GPL-3.0
Url: https://gsmartcontrol.sourceforge.io/
+2 -2
View File
@@ -12,7 +12,7 @@
GETTEXT_MACRO_VERSION = 0.19
PACKAGE = @PACKAGE@
VERSION = @VERSION@
VERSION = @CMAKE_PROJECT_VERSION@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
SED = @SED@
@@ -192,7 +192,7 @@ $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
--files-from=$(srcdir)/POTFILES.in \
--copyright-holder='$(COPYRIGHT_HOLDER)' \
--package-name="$${package_prefix}@PACKAGE@" \
--package-version='@VERSION@' \
--package-version='@CMAKE_PROJECT_VERSION@' \
--msgid-bugs-address="$$msgid_bugs_address" \
;; \
esac
+5 -13
View File
@@ -1,6 +1,11 @@
# Manifest file
if (WIN32)
set(WINDOWS_ARCH "x86")
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
set(WINDOWS_ARCH "amd64")
endif()
configure_file("gsmartcontrol.exe.in.manifest" "${CMAKE_CURRENT_BINARY_DIR}/gsmartcontrol.exe.manifest" ESCAPE_QUOTES @ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/gsmartcontrol.exe.manifest" DESTINATION "${CMAKE_INSTALL_SBINDIR}/")
endif()
@@ -52,19 +57,6 @@ target_link_libraries(gsmartcontrol
install(TARGETS gsmartcontrol DESTINATION "${CMAKE_INSTALL_SBINDIR}/")
# TODO
#target_compile_definitions(gsmartcontrol
# PRIVATE
# -DPACKAGE_PKGDATA_DIR=\"/usr/local/share/gsmartcontrol\"
# -DPACKAGE_SYSCONF_DIR=\"/usr/local/etc\"
# -DPACKAGE_LOCALE_DIR=\"/usr/local/share/locale/gsmartcontrol\"
# -DPACKAGE_DOC_DIR=\"/usr/share/doc/packages/gsmartcontrol\"
# -DTOP_SOURCE_DIR="${CMAKE_SOURCE_DIR}"
# -DHZ_USE_LIBDEBUG=1
# -DHZ_ENABLE_COMPILED_RES_DATA
# -DDEBUG_BUILD
#)
add_subdirectory(build_config)
add_subdirectory(applib)
+3 -3
View File
@@ -12,12 +12,12 @@ BEGIN
BLOCK "04090025"
BEGIN
VALUE "FileDescription", "GSmartControl - Hard disk drive and SSD health inspection tool"
VALUE "FileVersion", "@VERSION@"
VALUE "FileVersion", "@CMAKE_PROJECT_VERSION@"
VALUE "InternalName", "gsmartcontrol.exe"
VALUE "LegalCopyright", "Copyright (C) 2008 - 2018 Alexander Shaduri"
VALUE "LegalCopyright", "Copyright (C) 2008 - 2021 Alexander Shaduri"
VALUE "OriginalFilename", "gsmartcontrol.exe"
VALUE "ProductName", "GSmartControl"
VALUE "ProductVersion", "@VERSION@"
VALUE "ProductVersion", "@CMAKE_PROJECT_VERSION@"
END
END
BLOCK "VarFileInfo"