From 4c35ea83d0db6cc6999f18790ce371a7b0087923 Mon Sep 17 00:00:00 2001 From: natureh 510 Date: Mon, 29 Jul 2013 23:00:33 +0200 Subject: [PATCH] Issue 1904: "Setup script for Windows", removing the restriction preventing a 32 bits build to be installed on a 64 bit (WinXP) system --- rtdata/CMakeLists.txt | 10 ++++++++-- rtdata/win/InnoSetup/WindowsInnoSetup.iss.in | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/rtdata/CMakeLists.txt b/rtdata/CMakeLists.txt index fdbda3a2a..d82e639f9 100644 --- a/rtdata/CMakeLists.txt +++ b/rtdata/CMakeLists.txt @@ -30,10 +30,16 @@ if (WIN32) if (CMAKE_SIZEOF_VOID_P EQUAL 4) set(BUILD_BIT_DEPTH 32) - set(ARCHITECTURE_ALLOWED x86) + # 32 bits builds has to be installable on 64 bits system, to support WinXP/64. + set(ARCHITECTURE_ALLOWED "x86 x64 ia64") + # installing in 32 bits mode even on 64 bits OS and architecture + set(INSTALL_MODE "") elseif (CMAKE_SIZEOF_VOID_P EQUAL 8) set(BUILD_BIT_DEPTH 64) - set(ARCHITECTURE_ALLOWED x64) + # Restricting the 64 bits builds to 64 bits systems only + set(ARCHITECTURE_ALLOWED "x64 ia64") + # installing in 64 bits mode for all 64 bits processors, even for itanium architecture + set(INSTALL_MODE "x64 ia64") endif (CMAKE_SIZEOF_VOID_P EQUAL 4) configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/win/InnoSetup/WindowsInnoSetup.iss.in" "${CMAKE_CURRENT_BINARY_DIR}/WindowsInnoSetup.iss") install (FILES "${CMAKE_CURRENT_BINARY_DIR}/WindowsInnoSetup.iss" DESTINATION ${BINDIR}) diff --git a/rtdata/win/InnoSetup/WindowsInnoSetup.iss.in b/rtdata/win/InnoSetup/WindowsInnoSetup.iss.in index a5a142491..d15846097 100644 --- a/rtdata/win/InnoSetup/WindowsInnoSetup.iss.in +++ b/rtdata/win/InnoSetup/WindowsInnoSetup.iss.in @@ -32,6 +32,7 @@ #define MySourceBasePath "${PROJECT_SOURCE_DIR}" #define MyBitDepth "${BUILD_BIT_DEPTH}" #define MyTargetArchitecture "${ARCHITECTURE_ALLOWED}" +#define MyInstallMode "${INSTALL_MODE}" [Setup] ; NOTE: The value of AppId uniquely identifies this application. @@ -58,7 +59,7 @@ WizardImageBackColor=$2A2A2A Compression=lzma SolidCompression=yes ArchitecturesAllowed={#MyTargetArchitecture} -ArchitecturesInstallIn64BitMode=x64 +ArchitecturesInstallIn64BitMode={#MyInstallMode} [Languages] Name: "english"; MessagesFile: "compiler:Default.isl"