From 32be2d38e9d95a2929b6e1806f6de1990ef3473c Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 7 Jan 2021 07:36:31 +0100 Subject: [PATCH] Generate NSIS files only on win. --- .../desktop/com.github.rssguard.appdata.xml | 2 +- src/rssguard/rssguard.pro | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/resources/desktop/com.github.rssguard.appdata.xml b/resources/desktop/com.github.rssguard.appdata.xml index 95a19dc19..28fe819e6 100644 --- a/resources/desktop/com.github.rssguard.appdata.xml +++ b/resources/desktop/com.github.rssguard.appdata.xml @@ -30,7 +30,7 @@ https://martinrotter.github.io/donate/ - + none diff --git a/src/rssguard/rssguard.pro b/src/rssguard/rssguard.pro index e6242f6c0..c31b157fd 100644 --- a/src/rssguard/rssguard.pro +++ b/src/rssguard/rssguard.pro @@ -50,15 +50,16 @@ DEPENDPATH += $$PWD/../librssguard win32: LIBS += -L$$OUT_PWD/../librssguard/ -llibrssguard unix: LIBS += -L$$OUT_PWD/../librssguard/ -lrssguard -# Prepare files for NSIS. -SEDREPLACE = "s|@APP_VERSION@|$$APP_VERSION|g; s|@APP_WIN_ARCH@|$$APP_WIN_ARCH|g; s|@APP_REVISION@|$$APP_REVISION|g; s|@APP_NAME@|$$APP_NAME|g; s|@APP_LOW_NAME@|$$APP_LOW_NAME|g; s|@EXE_NAME@|$${APP_LOW_NAME}.exe|g; s|@PWD@|$$replace(PWD, /, \\\\)|g; s|@OUT_PWD@|$$replace(OUT_PWD, /, \\\\)|g" -message($$MSG_PREFIX: Sed replace string: \"$$SEDREPLACE\") +win32 { + # Prepare files for NSIS. + SEDREPLACE = "s|@APP_VERSION@|$$APP_VERSION|g; s|@APP_WIN_ARCH@|$$APP_WIN_ARCH|g; s|@APP_REVISION@|$$APP_REVISION|g; s|@APP_NAME@|$$APP_NAME|g; s|@APP_LOW_NAME@|$$APP_LOW_NAME|g; s|@EXE_NAME@|$${APP_LOW_NAME}.exe|g; s|@PWD@|$$replace(PWD, /, \\\\)|g; s|@OUT_PWD@|$$replace(OUT_PWD, /, \\\\)|g" + message($$MSG_PREFIX: Sed replace string: \"$$SEDREPLACE\") -FULLSEDCMD = "$$shell_path($$shell_quote($$PWD/../../resources/scripts/sed/sed.exe)) -e \"$$SEDREPLACE\" \"$$shell_path($$shell_quote($$PWD/../../resources/nsis/NSIS.definitions.nsh.in))\" > \"$$shell_path($$shell_quote($$OUT_PWD/NSIS.definitions.nsh))\"" -message($$MSG_PREFIX: Full sed command: $$FULLSEDCMD) + FULLSEDCMD = "$$shell_path($$shell_quote($$PWD/../../resources/scripts/sed/sed.exe)) -e \"$$SEDREPLACE\" \"$$shell_path($$shell_quote($$PWD/../../resources/nsis/NSIS.definitions.nsh.in))\" > \"$$shell_path($$shell_quote($$OUT_PWD/NSIS.definitions.nsh))\"" + message($$MSG_PREFIX: Full sed command: $$FULLSEDCMD) -system(xcopy /Y $$shell_path($$shell_quote($$PWD/../../resources/nsis/NSIS.template.in)) $$shell_path($$shell_quote($$OUT_PWD/))) - -system($$FULLSEDCMD) + system(xcopy /Y $$shell_path($$shell_quote($$PWD/../../resources/nsis/NSIS.template.in)) $$shell_path($$shell_quote($$OUT_PWD/))) + system($$FULLSEDCMD) +} include(../../pri/install.pri)