From 4850e73dc4d51e5f6744c017e4e3e8202174f02e Mon Sep 17 00:00:00 2001 From: RensDofferhoff <20978635+RensDofferhoff@users.noreply.github.com> Date: Mon, 2 Sep 2024 17:36:43 +0200 Subject: [PATCH] fix ZIP issue and fix some windows build thing (#5649) --- Tools/CMake/Programs.cmake | 11 +++++------ Tools/windows/zip/ZIP.cmd.in | 9 ++++++++- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Tools/CMake/Programs.cmake b/Tools/CMake/Programs.cmake index ca257375f6..bfdc8dc63c 100644 --- a/Tools/CMake/Programs.cmake +++ b/Tools/CMake/Programs.cmake @@ -166,12 +166,11 @@ if(WIN32) ) endif() - set(WIX_PATH - "C:/Program Files (x86)/WiX Toolset v3.11/bin" - CACHE - PATH - "Path to your WIX installation, e.g., C:\\Program Files (x86)\\WiX Toolset v3.11\\bin" - ) + if(DEFINED ENV{WIX}) + set(WIX_PATH "$ENV{WIX}/bin" CACHE PATH "Path to your WIX installation, e.g., C:\\Program Files (x86)\\WiX Toolset v3.11\\bin") + else() + set(WIX_PATH "C:/Program Files (x86)/WiX Toolset v3.11/bin" CACHE PATH "Path to your WIX installation, e.g., C:\\Program Files (x86)\\WiX Toolset v3.11\\bin") + endif() find_program( HEAT_EXECUTABLE diff --git a/Tools/windows/zip/ZIP.cmd.in b/Tools/windows/zip/ZIP.cmd.in index e63f3eaae9..bb1bff0638 100644 --- a/Tools/windows/zip/ZIP.cmd.in +++ b/Tools/windows/zip/ZIP.cmd.in @@ -12,6 +12,13 @@ setlocal EnableDelayedExpansion rem ---------------------- Packing ------------------------------- echo Making zip-version of installer +where /q zip +IF ERRORLEVEL 1 ( powershell Compress-Archive -Update "@JASP_INSTALL_DIR_NATIVE@\*" "@JASP_BINARY_DIR_NATIVE@\JASP\JASP.zip" - +) ELSE ( +pushd . +cd /d "@JASP_INSTALL_DIR_NATIVE@\*" +zip -9 -q -r "@JASP_BINARY_DIR_NATIVE@\JASP\JASP.zip" . +popd +) endlocal \ No newline at end of file