Generate NSIS files only on win.

This commit is contained in:
Martin Rotter 2021-01-07 07:36:31 +01:00
parent dd03c78361
commit 32be2d38e9
2 changed files with 10 additions and 9 deletions

View File

@ -30,7 +30,7 @@
<url type="donation">https://martinrotter.github.io/donate/</url>
<content_rating type="oars-1.1" />
<releases>
<release version="3.8.4" date="2021-01-06"/>
<release version="3.8.4" date="2021-01-07"/>
</releases>
<content_rating type="oars-1.0">
<content_attribute id="violence-cartoon">none</content_attribute>

View File

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