From 39c88a812e0598b43ba20884058a26f532ada4c7 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 16 Feb 2016 20:55:52 +0200 Subject: [PATCH] Correct path to NSIS on Win x64. --HG-- branch : develop --- scripts/make_install.bat | 11 ++++++++--- src/app/valentina/valentina.pro | 6 +++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/scripts/make_install.bat b/scripts/make_install.bat index cd0b1cc79..71d9ef8b2 100644 --- a/scripts/make_install.bat +++ b/scripts/make_install.bat @@ -1,7 +1,12 @@ rem script helps create installer -rem Path to NSIS -set nsis_path="C:\Program Files\NSIS\makensisw.exe" +rem find target architecture +reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL && set ARCHITECTURE=32BIT || set ARCHITECTURE=64BIT + +rem Path to NSIS according to architecture +if %ARCHITECTURE%==32BIT set nsis_path="C:\Program Files\NSIS\makensisw.exe" +if %ARCHITECTURE%==64BIT set nsis_path="C:\Program Files (x86)\NSIS\makensisw.exe" + if not exist %nsis_path% ( SET /P promt="Coudn't find NSIS. Do you want to continue?[Y\N]" IF "%promt%" == "Y" GOTO PREPARE @@ -50,4 +55,4 @@ echo Failed to make the first run qmake! exit /b 1 :ONEXIT echo Done! -@pause \ No newline at end of file +@pause diff --git a/src/app/valentina/valentina.pro b/src/app/valentina/valentina.pro index f0645eaeb..a7ce989f4 100644 --- a/src/app/valentina/valentina.pro +++ b/src/app/valentina/valentina.pro @@ -431,7 +431,11 @@ win32:*-g++ { package_printsupport.files += $$[QT_INSTALL_PLUGINS]/printsupport/windowsprintersupport.dll INSTALLS += package_printsupport - NSIS_MAKENSISW = "C:/Program Files/NSIS/makensisw.exe" + contains(QT_ARCH, i386) { + NSIS_MAKENSISW = "C:/Program Files/NSIS/makensisw.exe" + } else { + NSIS_MAKENSISW = "C:/Program Files (x86)/NSIS/makensisw.exe" + } exists($$NSIS_MAKENSISW) { package_nsis.path = $${OUT_PWD}/../../../package