From f4c34bb42dd0fe8217d4d54a9a4a2eeecdb0f0f4 Mon Sep 17 00:00:00 2001 From: Silvio Date: Thu, 5 Jan 2017 23:37:37 +0100 Subject: vcpkg_apply_patches: add QUIET option --- scripts/cmake/vcpkg_apply_patches.cmake | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_apply_patches.cmake b/scripts/cmake/vcpkg_apply_patches.cmake index cd3026b6a..d509e36ec 100644 --- a/scripts/cmake/vcpkg_apply_patches.cmake +++ b/scripts/cmake/vcpkg_apply_patches.cmake @@ -1,5 +1,26 @@ +#.rst: +# .. command:: vcpkg_apply_patches +# +# Apply a set of patches to a source tree. +# +# :: +# vcpkg_apply_patches(SOURCE_PATH +# PATCHES patch1 [patch ...] +# ) +# +# ``SOURCE_PATH`` +# The source path in which apply the patches. +# ``PATCHES`` +# A list of patches that are applied to the source tree +# ``QUIET`` +# If this option is passed, the warning message when applyng +# a patch failes is not printed. This is convenient for patches +# that are known to fail even on a clean source tree, and for +# which the standard warning message would be confusing for the user. +# + function(vcpkg_apply_patches) - cmake_parse_arguments(_ap "" "SOURCE_PATH" "PATCHES" ${ARGN}) + cmake_parse_arguments(_ap "QUIET" "SOURCE_PATH" "PATCHES" ${ARGN}) find_program(GIT git) set(PATCHNUM 0) @@ -14,7 +35,7 @@ function(vcpkg_apply_patches) RESULT_VARIABLE error_code ) - if(error_code) + if(error_code AND NOT ${_ap_QUIET}) message(STATUS "Applying patch failed. This is expected if this patch was previously applied.") endif() -- cgit v1.2.3 From 1decb1b52c023cc56e475ea05ec533ae65ce3c8a Mon Sep 17 00:00:00 2001 From: Silvio Date: Thu, 5 Jan 2017 23:38:01 +0100 Subject: cmake: add qmake-related helpers function --- scripts/cmake/vcpkg_build_qmake.cmake | 36 ++++++++++++++++++++++++ scripts/cmake/vcpkg_common_functions.cmake | 2 ++ scripts/cmake/vcpkg_configure_qmake.cmake | 44 ++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+) create mode 100644 scripts/cmake/vcpkg_build_qmake.cmake create mode 100644 scripts/cmake/vcpkg_configure_qmake.cmake (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_build_qmake.cmake b/scripts/cmake/vcpkg_build_qmake.cmake new file mode 100644 index 000000000..263200423 --- /dev/null +++ b/scripts/cmake/vcpkg_build_qmake.cmake @@ -0,0 +1,36 @@ +#.rst: +# .. command:: vcpkg_build_qmake +# +# Build a qmake-based project, previously configured using vcpkg_configure_qmake . +# As the CONFIG qmake option is assumed to be "debug_and_release" (the default value on Windows, see [1]), +# both the debug and release libraries are build in the same build tree. +# +# :: +# vcpkg_build_qmake() +# +# +# [1] : http://doc.qt.io/qt-5/qmake-variable-reference.html + +function(vcpkg_build_qmake) + vcpkg_find_acquire_program("JOM") + + if(NOT JOM) + BUILD_ERROR("vcpkg_install_qmake: impossible to find jom.") + endif() + + # Make sure that the linker finds the libraries used + set(ENV_LIB_BACKUP ENV{LIB}) + set(ENV{LIB} "${CURRENT_INSTALLED_DIR}/lib;${CURRENT_INSTALLED_DIR}/debug/lib;$ENV{LIB}") + + message(STATUS "Package ${TARGET_TRIPLET}") + vcpkg_execute_required_process_repeat( + COUNT 2 + COMMAND ${JOM} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET} + LOGNAME package-${TARGET_TRIPLET} + ) + message(STATUS "Package ${TARGET_TRIPLET} done") + + # Restore the original value of ENV{LIB} + set(ENV{LIB} ENV_LIB_BACKUP) +endfunction() diff --git a/scripts/cmake/vcpkg_common_functions.cmake b/scripts/cmake/vcpkg_common_functions.cmake index f1bbdb9e3..ff1fae953 100644 --- a/scripts/cmake/vcpkg_common_functions.cmake +++ b/scripts/cmake/vcpkg_common_functions.cmake @@ -5,7 +5,9 @@ include(vcpkg_execute_required_process_repeat) include(vcpkg_find_acquire_program) include(vcpkg_build_cmake) include(vcpkg_build_msbuild) +include(vcpkg_build_qmake) include(vcpkg_install_cmake) include(vcpkg_configure_cmake) +include(vcpkg_configure_qmake) include(vcpkg_apply_patches) include(vcpkg_copy_pdbs) diff --git a/scripts/cmake/vcpkg_configure_qmake.cmake b/scripts/cmake/vcpkg_configure_qmake.cmake new file mode 100644 index 000000000..f51a2f4fb --- /dev/null +++ b/scripts/cmake/vcpkg_configure_qmake.cmake @@ -0,0 +1,44 @@ +#.rst: +# .. command:: vcpkg_configure_qmake +# +# Configure a qmake-based project. +# It is assume that the qmake project CONFIG variable is +# "debug_and_release" (the default value on Windows, see [1]). +# Using this option, only one Makefile for building both Release and Debug +# libraries is generated, that then can be run using the vcpkg_install_qmake +# command. +# +# :: +# vcpkg_configure_qmake(SOURCE_PATH +# [OPTIONS arg1 [arg2 ...]] +# ) +# +# ``PROJECT_PATH`` +# The path to the *.pro qmake project file. +# ``OPTIONS`` +# The options passed to qmake. +# +# [1] : http://doc.qt.io/qt-5/qmake-variable-reference.html + +function(vcpkg_configure_qmake) + cmake_parse_arguments(_csc "" "SOURCE_PATH" "OPTIONS" ${ARGN}) + + # Find qmake exectuable + find_program(QMAKE_COMMAND NAMES qmake) + + if(NOT QMAKE_COMMAND) + BUILD_ERROR("vcpkg_configure_qmake: impossible to find qmake.") + endif() + + # Cleanup build directories + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) + + message(STATUS "Configuring ${TARGET_TRIPLET}") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) + vcpkg_execute_required_process( + COMMAND ${QMAKE_COMMAND} ${_csc_SOURCE_PATH} ${_csc_OPTIONS} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET} + LOGNAME config-${TARGET_TRIPLET} + ) + message(STATUS "Configuring ${TARGET_TRIPLET} done") +endfunction() \ No newline at end of file -- cgit v1.2.3 From c5dad5306e684972db7456033a7d4b2b920075a3 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 6 Jan 2017 14:57:45 -0800 Subject: [vcpkg_apply_pathces] Fix typo (also trailing whitespace) --- scripts/cmake/vcpkg_apply_patches.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_apply_patches.cmake b/scripts/cmake/vcpkg_apply_patches.cmake index d509e36ec..e17d53b08 100644 --- a/scripts/cmake/vcpkg_apply_patches.cmake +++ b/scripts/cmake/vcpkg_apply_patches.cmake @@ -11,11 +11,11 @@ # ``SOURCE_PATH`` # The source path in which apply the patches. # ``PATCHES`` -# A list of patches that are applied to the source tree -# ``QUIET`` -# If this option is passed, the warning message when applyng -# a patch failes is not printed. This is convenient for patches -# that are known to fail even on a clean source tree, and for +# A list of patches that are applied to the source tree +# ``QUIET`` +# If this option is passed, the warning message when applyng +# a patch fails is not printed. This is convenient for patches +# that are known to fail even on a clean source tree, and for # which the standard warning message would be confusing for the user. # -- cgit v1.2.3 From 4f5f52ff470e83fa041ac4c6797bfa4e61ed2501 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 10 Jan 2017 16:02:53 -0800 Subject: Fix error message when looking for PYTHON2 --- scripts/cmake/vcpkg_find_acquire_program.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index b192bc5d7..83e41fe3b 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -46,8 +46,7 @@ function(vcpkg_find_acquire_program VAR) endif() endif() if(PYTHON2 MATCHES "NOTFOUND") - message(FATAL_ERROR "libuv uses the GYP build system, which requires Python 2.7.\n" - "Python 2.7 was not found in the path or by searching inside C:\\Python27.\n" + message(FATAL_ERROR "Python 2.7 was not found in the path or by searching inside C:\\Python27.\n" "There is no portable redistributable for Python 2.7, so you will need to install the MSI located at:\n" " https://www.python.org/ftp/python/2.7.11/python-2.7.11.amd64.msi\n" ) -- cgit v1.2.3 From 1911fa818225ac02affefd6e85a0626628fcf3e3 Mon Sep 17 00:00:00 2001 From: Albert Ziegenhagel Date: Wed, 11 Jan 2017 11:37:19 +0100 Subject: Acquire 7z Since 7zip is distribute as installer only (no archive) we use msiexec to extract the installer without installing it. msiexec should be available on all windows computers (located in C:/Windows/system32) --- scripts/cmake/vcpkg_find_acquire_program.cmake | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 83e41fe3b..df2f30af5 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -57,6 +57,12 @@ function(vcpkg_find_acquire_program VAR) set(URL "http://download.qt.io/official_releases/jom/jom_1_1_1.zip") set(ARCHIVE "jom_1_1_1.zip") set(HASH 23a26dc7e29979bec5dcd3bfcabf76397b93ace64f5d46f2254d6420158bac5eff1c1a8454e3427e7a2fe2c233c5f2cffc87b376772399e12e40b51be2c065f4) + elseif(VAR MATCHES "7Z") + set(PROGNAME 7z) + set(PATHS ${DOWNLOADS}/tools/7z/Files/7-Zip) + set(URL "http://7-zip.org/a/7z1604.msi") + set(ARCHIVE "7z1604.msi") + set(HASH 556f95f7566fe23704d136239e4cf5e2a26f939ab43b44145c91b70d031a088d553e5c21301f1242a2295dcde3143b356211f0108c68e65eef8572407618326d) else() message(FATAL "unknown tool ${VAR} -- unable to acquire.") endif() @@ -71,10 +77,21 @@ function(vcpkg_find_acquire_program VAR) if(DEFINED NOEXTRACT) file(COPY ${DOWNLOADS}/${ARCHIVE} DESTINATION ${DOWNLOADS}/tools/${PROGNAME}) else() - execute_process( - COMMAND ${CMAKE_COMMAND} -E tar xzf ${DOWNLOADS}/${ARCHIVE} - WORKING_DIRECTORY ${DOWNLOADS}/tools/${PROGNAME} - ) + get_filename_component(ARCHIVE_EXTENSION ${ARCHIVE} EXT) + string(TOLOWER "${ARCHIVE_EXTENSION}" ARCHIVE_EXTENSION) + if(${ARCHIVE_EXTENSION} STREQUAL ".msi") + file(TO_NATIVE_PATH "${DOWNLOADS}/${ARCHIVE}" ARCHIVE_NATIVE_PATH) + file(TO_NATIVE_PATH "${DOWNLOADS}/tools/${PROGNAME}" DESTINATION_NATIVE_PATH) + execute_process( + COMMAND msiexec /a ${ARCHIVE_NATIVE_PATH} /qn TARGETDIR=${DESTINATION_NATIVE_PATH} + WORKING_DIRECTORY ${DOWNLOADS} + ) + else() + execute_process( + COMMAND ${CMAKE_COMMAND} -E tar xzf ${DOWNLOADS}/${ARCHIVE} + WORKING_DIRECTORY ${DOWNLOADS}/tools/${PROGNAME} + ) + endif() endif() find_program(${VAR} ${PROGNAME} PATHS ${PATHS}) -- cgit v1.2.3 From 275a59dd9dc9b6ec324ac9eb5460193bfd53b736 Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 11 Jan 2017 21:20:53 +0100 Subject: Add glib --- scripts/cmake/vcpkg_common_functions.cmake | 1 + scripts/cmake/vcpkg_copy_tool_dependencies.cmake | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 scripts/cmake/vcpkg_copy_tool_dependencies.cmake (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_common_functions.cmake b/scripts/cmake/vcpkg_common_functions.cmake index ff1fae953..6e60bf2bc 100644 --- a/scripts/cmake/vcpkg_common_functions.cmake +++ b/scripts/cmake/vcpkg_common_functions.cmake @@ -11,3 +11,4 @@ include(vcpkg_configure_cmake) include(vcpkg_configure_qmake) include(vcpkg_apply_patches) include(vcpkg_copy_pdbs) +include(vcpkg_copy_tool_dependencies) diff --git a/scripts/cmake/vcpkg_copy_tool_dependencies.cmake b/scripts/cmake/vcpkg_copy_tool_dependencies.cmake new file mode 100644 index 000000000..d8de15207 --- /dev/null +++ b/scripts/cmake/vcpkg_copy_tool_dependencies.cmake @@ -0,0 +1,16 @@ +# Copy dlls for all tools in ${CURRENT_PACKAGES_DIR}/tools + +function(vcpkg_copy_tool_dependencies) + macro(search_for_dependencies PATH_TO_SEARCH) + file(GLOB TOOLS ${CURRENT_PACKAGES_DIR}/tools/*.exe ${CURRENT_PACKAGES_DIR}/tools/*.dll) + foreach(TOOL ${TOOLS}) + execute_process(COMMAND powershell -noprofile -executionpolicy UnRestricted -nologo + -file ${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/applocal.ps1 + -targetBinary ${TOOL} + -installedDir ${PATH_TO_SEARCH} + OUTPUT_VARIABLE OUT) + endforeach() + endmacro() + search_for_dependencies(${CURRENT_PACKAGES_DIR}/bin) + search_for_dependencies(${CURRENT_INSTALLED_DIR}/bin) +endfunction() -- cgit v1.2.3 From f4622dce99378894b71c07e7fe989480981b5d56 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 11 Jan 2017 20:54:25 -0800 Subject: [7zip] Also consider the system version, if available --- scripts/cmake/vcpkg_find_acquire_program.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index df2f30af5..ab0cf1587 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -59,7 +59,7 @@ function(vcpkg_find_acquire_program VAR) set(HASH 23a26dc7e29979bec5dcd3bfcabf76397b93ace64f5d46f2254d6420158bac5eff1c1a8454e3427e7a2fe2c233c5f2cffc87b376772399e12e40b51be2c065f4) elseif(VAR MATCHES "7Z") set(PROGNAME 7z) - set(PATHS ${DOWNLOADS}/tools/7z/Files/7-Zip) + set(PATHS "C:/Program Files/7-Zip" ${DOWNLOADS}/tools/7z/Files/7-Zip) set(URL "http://7-zip.org/a/7z1604.msi") set(ARCHIVE "7z1604.msi") set(HASH 556f95f7566fe23704d136239e4cf5e2a26f939ab43b44145c91b70d031a088d553e5c21301f1242a2295dcde3143b356211f0108c68e65eef8572407618326d) -- cgit v1.2.3 From ccd3e399f023129a39bb9a402324676a9391a970 Mon Sep 17 00:00:00 2001 From: codicodi Date: Sat, 14 Jan 2017 02:15:34 +0100 Subject: [glib] use win_iconv and add subdir for tools --- scripts/cmake/vcpkg_copy_tool_dependencies.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_copy_tool_dependencies.cmake b/scripts/cmake/vcpkg_copy_tool_dependencies.cmake index d8de15207..32c3eba0d 100644 --- a/scripts/cmake/vcpkg_copy_tool_dependencies.cmake +++ b/scripts/cmake/vcpkg_copy_tool_dependencies.cmake @@ -1,8 +1,8 @@ -# Copy dlls for all tools in ${CURRENT_PACKAGES_DIR}/tools +# Copy dlls for all tools in TOOL_DIR -function(vcpkg_copy_tool_dependencies) +function(vcpkg_copy_tool_dependencies TOOL_DIR) macro(search_for_dependencies PATH_TO_SEARCH) - file(GLOB TOOLS ${CURRENT_PACKAGES_DIR}/tools/*.exe ${CURRENT_PACKAGES_DIR}/tools/*.dll) + file(GLOB TOOLS ${TOOL_DIR}/*.exe ${TOOL_DIR}/*.dll) foreach(TOOL ${TOOLS}) execute_process(COMMAND powershell -noprofile -executionpolicy UnRestricted -nologo -file ${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/applocal.ps1 -- cgit v1.2.3 From 2bc4064b1e99b31bd550982011e251f97d5a0aef Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 13 Jan 2017 17:30:48 -0800 Subject: [vcpkg_build_cmake] Add option to specify the 64-bit toolset --- scripts/cmake/vcpkg_build_cmake.cmake | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_build_cmake.cmake b/scripts/cmake/vcpkg_build_cmake.cmake index 8ba4b9fae..eb50222ba 100644 --- a/scripts/cmake/vcpkg_build_cmake.cmake +++ b/scripts/cmake/vcpkg_build_cmake.cmake @@ -1,7 +1,16 @@ function(vcpkg_build_cmake) + cmake_parse_arguments(_bc "MSVC_64_TOOLSET" "" "" ${ARGN}) + + set(MSVC_EXTRA_ARGS) + + # Specifies the architecture of the toolset, NOT the architecture of the produced binary + if (_bc_MSVC_64_TOOLSET) + list(APPEND MSVC_EXTRA_ARGS "/p:PreferredToolArchitecture=x64") + endif() + message(STATUS "Build ${TARGET_TRIPLET}-rel") vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} --build . --config Release -- /p:VCPkgLocalAppDataDisabled=true /m + COMMAND ${CMAKE_COMMAND} --build . --config Release -- /p:VCPkgLocalAppDataDisabled=true /m ${MSVC_EXTRA_ARGS} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel LOGNAME build-${TARGET_TRIPLET}-rel ) @@ -9,7 +18,7 @@ function(vcpkg_build_cmake) message(STATUS "Build ${TARGET_TRIPLET}-dbg") vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} --build . --config Debug -- /p:VCPkgLocalAppDataDisabled=true /m + COMMAND ${CMAKE_COMMAND} --build . --config Debug -- /p:VCPkgLocalAppDataDisabled=true /m ${MSVC_EXTRA_ARGS} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg LOGNAME build-${TARGET_TRIPLET}-dbg ) -- cgit v1.2.3 From da09df713fe7b68d432108802447eb534a7dd555 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 13 Jan 2017 17:39:12 -0800 Subject: [vcpkg integration] Explicitly skip empty entries instead of recursing. Fixes #460. --- scripts/buildsystems/msbuild/applocal.ps1 | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scripts') diff --git a/scripts/buildsystems/msbuild/applocal.ps1 b/scripts/buildsystems/msbuild/applocal.ps1 index ddb4a07f9..46981fad5 100644 --- a/scripts/buildsystems/msbuild/applocal.ps1 +++ b/scripts/buildsystems/msbuild/applocal.ps1 @@ -7,6 +7,9 @@ function resolve($targetBinary) { $a = $(dumpbin /DEPENDENTS $targetBinary | ? { $_ -match "^ [^ ].*\.dll" } | % { $_ -replace "^ ","" }) $a | % { + if ([string]::IsNullOrEmpty($_)) { + continue + } if (Test-Path "$installedDir\$_") { if (Test-Path "$targetBinaryDir\$_") { Write-Verbose "$_ is already present" -- cgit v1.2.3 From eb7ccc1223f568d6d2df21b27eb890be93bc8186 Mon Sep 17 00:00:00 2001 From: codicodi Date: Sat, 14 Jan 2017 02:55:41 +0100 Subject: Revert "[glib] use win_iconv and add subdir for tools" This reverts commit ccd3e399f023129a39bb9a402324676a9391a970. --- scripts/cmake/vcpkg_copy_tool_dependencies.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_copy_tool_dependencies.cmake b/scripts/cmake/vcpkg_copy_tool_dependencies.cmake index 32c3eba0d..d8de15207 100644 --- a/scripts/cmake/vcpkg_copy_tool_dependencies.cmake +++ b/scripts/cmake/vcpkg_copy_tool_dependencies.cmake @@ -1,8 +1,8 @@ -# Copy dlls for all tools in TOOL_DIR +# Copy dlls for all tools in ${CURRENT_PACKAGES_DIR}/tools -function(vcpkg_copy_tool_dependencies TOOL_DIR) +function(vcpkg_copy_tool_dependencies) macro(search_for_dependencies PATH_TO_SEARCH) - file(GLOB TOOLS ${TOOL_DIR}/*.exe ${TOOL_DIR}/*.dll) + file(GLOB TOOLS ${CURRENT_PACKAGES_DIR}/tools/*.exe ${CURRENT_PACKAGES_DIR}/tools/*.dll) foreach(TOOL ${TOOLS}) execute_process(COMMAND powershell -noprofile -executionpolicy UnRestricted -nologo -file ${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/applocal.ps1 -- cgit v1.2.3 From f5a0a64e44b885fae8d17b811ee3d3f623ffac3e Mon Sep 17 00:00:00 2001 From: codicodi Date: Sat, 14 Jan 2017 02:59:41 +0100 Subject: [glib] tooools --- scripts/cmake/vcpkg_copy_tool_dependencies.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_copy_tool_dependencies.cmake b/scripts/cmake/vcpkg_copy_tool_dependencies.cmake index d8de15207..432e3c12a 100644 --- a/scripts/cmake/vcpkg_copy_tool_dependencies.cmake +++ b/scripts/cmake/vcpkg_copy_tool_dependencies.cmake @@ -1,8 +1,8 @@ -# Copy dlls for all tools in ${CURRENT_PACKAGES_DIR}/tools +# Copy dlls for all tools in TOOL_DIR -function(vcpkg_copy_tool_dependencies) +function(vcpkg_copy_tool_dependencies TOOL_DIR) macro(search_for_dependencies PATH_TO_SEARCH) - file(GLOB TOOLS ${CURRENT_PACKAGES_DIR}/tools/*.exe ${CURRENT_PACKAGES_DIR}/tools/*.dll) + file(GLOB TOOLS ${TOOL_DIR}/*.exe ${TOOL_DIR}/*.dll) foreach(TOOL ${TOOLS}) execute_process(COMMAND powershell -noprofile -executionpolicy UnRestricted -nologo -file ${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/applocal.ps1 -- cgit v1.2.3 From fd0adc561dd93c2cdf0762eeefa0438537a6760a Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 13 Jan 2017 19:09:42 -0800 Subject: [vcpkg_build/install_cmake] Add option to disable parallel building --- scripts/cmake/vcpkg_build_cmake.cmake | 10 +++++++--- scripts/cmake/vcpkg_install_cmake.cmake | 17 +++++++++++++++-- 2 files changed, 22 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_build_cmake.cmake b/scripts/cmake/vcpkg_build_cmake.cmake index eb50222ba..6d7cfe643 100644 --- a/scripts/cmake/vcpkg_build_cmake.cmake +++ b/scripts/cmake/vcpkg_build_cmake.cmake @@ -1,5 +1,5 @@ function(vcpkg_build_cmake) - cmake_parse_arguments(_bc "MSVC_64_TOOLSET" "" "" ${ARGN}) + cmake_parse_arguments(_bc "MSVC_64_TOOLSET;DISABLE_PARALLEL" "" "" ${ARGN}) set(MSVC_EXTRA_ARGS) @@ -8,9 +8,13 @@ function(vcpkg_build_cmake) list(APPEND MSVC_EXTRA_ARGS "/p:PreferredToolArchitecture=x64") endif() + if (NOT _bc_DISABLE_PARALLEL) + list(APPEND MSVC_EXTRA_ARGS "/m") + endif() + message(STATUS "Build ${TARGET_TRIPLET}-rel") vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} --build . --config Release -- /p:VCPkgLocalAppDataDisabled=true /m ${MSVC_EXTRA_ARGS} + COMMAND ${CMAKE_COMMAND} --build . --config Release -- /p:VCPkgLocalAppDataDisabled=true ${MSVC_EXTRA_ARGS} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel LOGNAME build-${TARGET_TRIPLET}-rel ) @@ -18,7 +22,7 @@ function(vcpkg_build_cmake) message(STATUS "Build ${TARGET_TRIPLET}-dbg") vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} --build . --config Debug -- /p:VCPkgLocalAppDataDisabled=true /m ${MSVC_EXTRA_ARGS} + COMMAND ${CMAKE_COMMAND} --build . --config Debug -- /p:VCPkgLocalAppDataDisabled=true ${MSVC_EXTRA_ARGS} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg LOGNAME build-${TARGET_TRIPLET}-dbg ) diff --git a/scripts/cmake/vcpkg_install_cmake.cmake b/scripts/cmake/vcpkg_install_cmake.cmake index 30aff0fe1..f29f3ce5d 100644 --- a/scripts/cmake/vcpkg_install_cmake.cmake +++ b/scripts/cmake/vcpkg_install_cmake.cmake @@ -1,7 +1,20 @@ function(vcpkg_install_cmake) + cmake_parse_arguments(_bc "MSVC_64_TOOLSET;DISABLE_PARALLEL" "" "" ${ARGN}) + + set(MSVC_EXTRA_ARGS) + + # Specifies the architecture of the toolset, NOT the architecture of the produced binary + if (_bc_MSVC_64_TOOLSET) + list(APPEND MSVC_EXTRA_ARGS "/p:PreferredToolArchitecture=x64") + endif() + + if (NOT _bc_DISABLE_PARALLEL) + list(APPEND MSVC_EXTRA_ARGS "/m") + endif() + message(STATUS "Package ${TARGET_TRIPLET}-rel") vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} --build . --config Release --target install -- /m + COMMAND ${CMAKE_COMMAND} --build . --config Release --target install -- /p:VCPkgLocalAppDataDisabled=true ${MSVC_EXTRA_ARGS} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel LOGNAME package-${TARGET_TRIPLET}-rel ) @@ -9,7 +22,7 @@ function(vcpkg_install_cmake) message(STATUS "Package ${TARGET_TRIPLET}-dbg") vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} --build . --config Debug --target install -- /m + COMMAND ${CMAKE_COMMAND} --build . --config Debug --target install -- /p:VCPkgLocalAppDataDisabled=true ${MSVC_EXTRA_ARGS} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg LOGNAME package-${TARGET_TRIPLET}-dbg ) -- cgit v1.2.3 From 030ed271179ac57479d4bfec2e64b9457486d4c5 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 19 Jan 2017 17:38:56 -0800 Subject: Fix integration when $(Platform) is empty --- scripts/buildsystems/msbuild/vcpkg.targets | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'scripts') diff --git a/scripts/buildsystems/msbuild/vcpkg.targets b/scripts/buildsystems/msbuild/vcpkg.targets index 0c748c1d6..912cf6b8e 100644 --- a/scripts/buildsystems/msbuild/vcpkg.targets +++ b/scripts/buildsystems/msbuild/vcpkg.targets @@ -9,6 +9,16 @@ x86-uwp + + true + x86-windows + + + + true + x86-uwp + + true x64-windows -- cgit v1.2.3 From bb639bfa9c0b21fd7fa5dac3531657a03fbb2b7b Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 23 Jan 2017 12:53:18 -0800 Subject: [VS2017] Add powershell script to enumerator VS2017 instances --- scripts/findVisualStudioInstallationInstances.ps1 | 41 +++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 scripts/findVisualStudioInstallationInstances.ps1 (limited to 'scripts') diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 new file mode 100644 index 000000000..1cb78fa9e --- /dev/null +++ b/scripts/findVisualStudioInstallationInstances.ps1 @@ -0,0 +1,41 @@ +[CmdletBinding()] +param( + +) + +Import-Module BitsTransfer + +$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition +$vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root + +$downloadsDir = "$vcpkgRootDir\downloads" + +& $scriptsDir\fetchDependency.ps1 "nuget" +$nugetexe = "$downloadsDir\nuget.exe" +$nugetPackageDir = "$downloadsDir\nuget-packages" + +$SetupAPIVersion = "1.3.269-rc" +$url = "https://api.nuget.org/packages/microsoft.visualstudio.setup.configuration.native.$SetupAPIVersion.nupkg" +$downloadName = "microsoft.visualstudio.setup.configuration.native.$SetupAPIVersion.nupkg" +$downloadPath = "$downloadsDir\$downloadName" + +if (!(Test-Path $downloadPath)) +{ + Start-BitsTransfer -Source $url -Destination $downloadPath #-ErrorAction SilentlyContinue +} + +$nugetOutput = & $nugetexe install Microsoft.VisualStudio.Setup.Configuration.Native -Pre -Source $downloadsDir -OutputDirectory $nugetPackageDir 2>&1 + +$SetupConsoleExe = "$nugetPackageDir\Microsoft.VisualStudio.Setup.Configuration.Native.$SetupAPIVersion\tools\x86\Microsoft.VisualStudio.Setup.Configuration.Console.exe" + +if (!(Test-Path $SetupConsoleExe)) +{ + throw $nugetOutput +} + +$consoleOutput = & $SetupConsoleExe 2>&1 + +$key = "InstallationPath = " +$paths = $consoleOutput | Select-String -SimpleMatch $key +$paths = $paths -replace $key, "" +return $paths \ No newline at end of file -- cgit v1.2.3 From e6c127511e213a136cd01a40ced59a2b12015428 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 23 Jan 2017 12:54:03 -0800 Subject: [VS2017] Add powershell script to find any MSBuild with C++ support --- scripts/findAnyMSBuildWithCppPlatformToolset.ps1 | 32 ++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 scripts/findAnyMSBuildWithCppPlatformToolset.ps1 (limited to 'scripts') diff --git a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 new file mode 100644 index 000000000..1be4a4e6d --- /dev/null +++ b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 @@ -0,0 +1,32 @@ +[CmdletBinding()] +param( + +) + +$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition + +# VS2017 +$VisualStudio2017InstallationInstances = & $scriptsDir\findVisualStudioInstallationInstances.ps1 +foreach ($instance in $VisualStudio2017InstallationInstances) +{ + $VCFolder= "$instance\VC\Tools\MSVC\" + + if (Test-Path $VCFolder) + { + return "$instance\MSBuild\15.0\Bin\MSBuild.exe","v141" + } +} + +# VS2015 +$CandidateProgramFiles = "${env:PROGRAMFILES(X86)}", "${env:PROGRAMFILES}" +foreach ($ProgramFiles in $CandidateProgramFiles) +{ + $clExe= "$ProgramFiles\Microsoft Visual Studio 14.0\\VC\bin\cl.exe" + + if (Test-Path $clExe) + { + return "$ProgramFiles\MSBuild\14.0\Bin\MSBuild.exe","v140" + } +} + +throw "Could not find MSBuild with C++ support. VS2015 or above with C++ support need to be installed." \ No newline at end of file -- cgit v1.2.3 From 58aeb684429f107715a1b60500f8e24ea5a95f3c Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 23 Jan 2017 12:54:33 -0800 Subject: [VS2017] Enable building vcpkg itself with VS2017 --- scripts/bootstrap.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index bcb570b39..a37ed99aa 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -23,7 +23,10 @@ if (!(Test-Path $vcpkgSourcesPath)) try{ pushd $vcpkgSourcesPath - cmd /c "$env:VS140COMNTOOLS..\..\VC\vcvarsall.bat" x86 "&" msbuild "/p:VCPKG_VERSION=-$gitHash" "/p:DISABLE_METRICS=$disableMetrics" /p:Configuration=Release /p:Platform=x86 /m + $msbuildExeWithPlatformToolset = & $scriptsDir\findAnyMSBuildWithCppPlatformToolset.ps1 + $msbuildExe = $msbuildExeWithPlatformToolset[0] + $platformToolset = $msbuildExeWithPlatformToolset[1] + & $msbuildExe "/p:VCPKG_VERSION=-$gitHash" "/p:DISABLE_METRICS=$disableMetrics" /p:Configuration=Release /p:Platform=x86 /p:PlatformToolset=$platformToolset /m Write-Verbose("Placing vcpkg.exe in the correct location") -- cgit v1.2.3 From 522b393901638c3abfc89ff63085ec64367c7671 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 23 Jan 2017 17:02:43 -0800 Subject: Bump version of required CMake to 3.7.2 --- scripts/fetchDependency.ps1 | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'scripts') diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 2f3d992ba..7e8e1d32c 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -51,12 +51,12 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) { return } - + $title = "Download " + $Dependency $message = ("No suitable version of " + $Dependency + " was found (requires $requiredVersion or higher). Download portable version?") $yesDescription = "Downloads " + $Dependency + " v" + $downloadVersion +" app-locally." - $noDescription = "Does not download " + $Dependency + "." - + $noDescription = "Does not download " + $Dependency + "." + $userAllowedDownload = promptForDownload $title $message $yesDescription $noDescription if (!$userAllowedDownload) { @@ -86,10 +86,10 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) $ExtractionType_NO_EXTRACTION_REQUIRED = 0 $ExtractionType_ZIP = 1 $ExtractionType_SELF_EXTRACTING_7Z = 2 - - + + # Using this to wait for the execution to finish - function Invoke-Command() + function Invoke-Command() { param ( [string]$program = $(throw "Please specify a program" ), [string]$argumentString = "", @@ -99,7 +99,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) $psi.FileName = $program $psi.Arguments = $argumentString $proc = [Diagnostics.Process]::Start($psi) - if ( $waitForExit ) + if ( $waitForExit ) { $proc.WaitForExit(); } @@ -120,12 +120,12 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) if($Dependency -eq "cmake") { - $requiredVersion = "3.5.0" - $downloadVersion = "3.5.2" - $url = "https://cmake.org/files/v3.5/cmake-3.5.2-win32-x86.zip" - $downloadName = "cmake-3.5.2-win32-x86.zip" - $expectedDownloadedFileHash = "671073aee66b3480a564d0736792e40570a11e861bb34819bb7ae7858bbdfb80" - $executableFromDownload = "$downloadsDir\cmake-3.5.2-win32-x86\bin\cmake.exe" + $requiredVersion = "3.7.2" + $downloadVersion = "3.7.2" + $url = "https://cmake.org/files/v3.7/cmake-3.7.2-win32-x86.zip" + $downloadName = "cmake-3.7.2-win32-x86.zip" + $expectedDownloadedFileHash = "ec5e299d412e0272e01d4de5bf07718f42c96361f83d51cc39f91bf49cc3e5c3" + $executableFromDownload = "$downloadsDir\cmake-3.7.2-win32-x86\bin\cmake.exe" $extractionType = $ExtractionType_ZIP } elseif($Dependency -eq "nuget") @@ -146,7 +146,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) $downloadName = "PortableGit-2.8.3-32-bit.7z.exe" $expectedDownloadedFileHash = "DE52D070219E9C4EC1DB179F2ADBF4B760686C3180608F0382A1F8C7031E72AD" # There is another copy of git.exe in PortableGit\bin. However, an installed version of git add the cmd dir to the PATH. - # Therefore, choosing the cmd dir here as well. + # Therefore, choosing the cmd dir here as well. $executableFromDownload = "$downloadsDir\PortableGit\cmd\git.exe" $extractionType = $ExtractionType_SELF_EXTRACTING_7Z } @@ -186,7 +186,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) if (-not (Test-Path $executableFromDownload)) { Invoke-Command $downloadPath "-y" -waitForExit:$true - } + } } else { -- cgit v1.2.3 From 44810f267d095986f519d8b41592e83e913c2e56 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 23 Jan 2017 18:26:57 -0800 Subject: [vcpkg integrate] Lower verbosity of MSBuild messages. --- scripts/buildsystems/msbuild/vcpkg.targets | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/buildsystems/msbuild/vcpkg.targets b/scripts/buildsystems/msbuild/vcpkg.targets index 912cf6b8e..26a524ca3 100644 --- a/scripts/buildsystems/msbuild/vcpkg.targets +++ b/scripts/buildsystems/msbuild/vcpkg.targets @@ -57,12 +57,14 @@ Lines="^$(OutputPath)$(TargetName).$(OutputType);" Encoding="Unicode"/> + ConsoleToMSBuild="true" + StandardOutputImportance="Normal"> + ConsoleToMSBuild="true" + StandardOutputImportance="Normal"> -- cgit v1.2.3 From 868a7623addee16f19b17718163b7719c4d739e2 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 23 Jan 2017 18:42:34 -0800 Subject: Bump nuget.exe version --- scripts/fetchDependency.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 7e8e1d32c..eedfb15d1 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -130,11 +130,11 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } elseif($Dependency -eq "nuget") { - $requiredVersion = "1.0.0" - $downloadVersion = "3.4.3" - $url = "https://dist.nuget.org/win-x86-commandline/v3.4.3/nuget.exe" + $requiredVersion = "3.3.0" + $downloadVersion = "3.5.0" + $url = "https://dist.nuget.org/win-x86-commandline/v3.5.0/nuget.exe" $downloadName = "nuget.exe" - $expectedDownloadedFileHash = "3B1EA72943968D7AF6BACDB4F2F3A048A25AFD14564EF1D8B1C041FDB09EBB0A" + $expectedDownloadedFileHash = "399ec24c26ed54d6887cde61994bb3d1cada7956c1b19ff880f06f060c039918" $executableFromDownload = "$downloadsDir\nuget.exe" $extractionType = $ExtractionType_NO_EXTRACTION_REQUIRED } -- cgit v1.2.3 From 7c9db95feccf6e9d01d2e1af6c7012685d8e46b6 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 23 Jan 2017 18:47:38 -0800 Subject: Bump downloaded git version --- scripts/fetchDependency.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index eedfb15d1..e1ef184ab 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -141,10 +141,10 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) elseif($Dependency -eq "git") { $requiredVersion = "2.0.0" - $downloadVersion = "2.8.3" - $url = "https://github.com/git-for-windows/git/releases/download/v2.8.3.windows.1/PortableGit-2.8.3-32-bit.7z.exe" # We choose the 32-bit version - $downloadName = "PortableGit-2.8.3-32-bit.7z.exe" - $expectedDownloadedFileHash = "DE52D070219E9C4EC1DB179F2ADBF4B760686C3180608F0382A1F8C7031E72AD" + $downloadVersion = "2.11.0" + $url = "https://github.com/git-for-windows/git/releases/download/v2.11.0.windows.3/PortableGit-2.11.0.3-32-bit.7z.exe" # We choose the 32-bit version + $downloadName = "PortableGit-2.11.0.3-32-bit.7z.exe" + $expectedDownloadedFileHash = "8bf3769c37945e991903dd1b988c6b1d97bbf0f3afc9851508974f38bf94dc01" # There is another copy of git.exe in PortableGit\bin. However, an installed version of git add the cmd dir to the PATH. # Therefore, choosing the cmd dir here as well. $executableFromDownload = "$downloadsDir\PortableGit\cmd\git.exe" -- cgit v1.2.3 From 93c3c0648a782b1fa75bae1f200beca6ba871f9a Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 23 Jan 2017 19:25:47 -0800 Subject: [VS2017] Enable building with v141 toolset --- scripts/cmake/vcpkg_configure_cmake.cmake | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 179703172..128782075 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -4,20 +4,33 @@ function(vcpkg_configure_cmake) if(_csc_GENERATOR) set(GENERATOR ${_csc_GENERATOR}) - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x86") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x64") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015 Win64") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "arm") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015 ARM") # elseif(NOT vcpkg_configure_cmake_NINJA MATCHES "NOTFOUND") # set(GENERATOR "Ninja") - elseif(TRIPLET_SYSTEM_ARCH MATCHES "x86") + elseif(TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015") - elseif(TRIPLET_SYSTEM_ARCH MATCHES "x64") + elseif(TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015 Win64") elseif(TRIPLET_SYSTEM_ARCH MATCHES "arm") - set(GENERATOR "Visual Studio 14 2015 ARM") + set(GENERATOR "Visual Studio 14 2015 ARM" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") + + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + set(GENERATOR "Visual Studio 15 2017") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + set(GENERATOR "Visual Studio 15 2017 Win64") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + set(GENERATOR "Visual Studio 15 2017 ARM") + elseif(TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + set(GENERATOR "Visual Studio 15 2017") + elseif(TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + set(GENERATOR "Visual Studio 15 2017 Win64") + elseif(TRIPLET_SYSTEM_ARCH MATCHES "arm") + set(GENERATOR "Visual Studio 15 2017 ARM" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") endif() file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) @@ -33,7 +46,7 @@ function(vcpkg_configure_cmake) elseif(DEFINED VCPKG_LIBRARY_LINKAGE AND VCPKG_LIBRARY_LINKAGE STREQUAL static) list(APPEND _csc_OPTIONS -DBUILD_SHARED_LIBS=OFF) endif() - + list(APPEND _csc_OPTIONS "-DCMAKE_CXX_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc" -- cgit v1.2.3 From ccda20a8584a9fcc89c4dd631e5ef8d4189f1131 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 24 Jan 2017 12:01:11 -0800 Subject: Remove $downloadName variable --- scripts/fetchDependency.ps1 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index e1ef184ab..9269dba8c 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -123,7 +123,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) $requiredVersion = "3.7.2" $downloadVersion = "3.7.2" $url = "https://cmake.org/files/v3.7/cmake-3.7.2-win32-x86.zip" - $downloadName = "cmake-3.7.2-win32-x86.zip" + $downloadPath = "$downloadsDir\cmake-3.7.2-win32-x86.zip" $expectedDownloadedFileHash = "ec5e299d412e0272e01d4de5bf07718f42c96361f83d51cc39f91bf49cc3e5c3" $executableFromDownload = "$downloadsDir\cmake-3.7.2-win32-x86\bin\cmake.exe" $extractionType = $ExtractionType_ZIP @@ -133,7 +133,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) $requiredVersion = "3.3.0" $downloadVersion = "3.5.0" $url = "https://dist.nuget.org/win-x86-commandline/v3.5.0/nuget.exe" - $downloadName = "nuget.exe" + $downloadPath = "$downloadsDir\nuget.exe" $expectedDownloadedFileHash = "399ec24c26ed54d6887cde61994bb3d1cada7956c1b19ff880f06f060c039918" $executableFromDownload = "$downloadsDir\nuget.exe" $extractionType = $ExtractionType_NO_EXTRACTION_REQUIRED @@ -143,7 +143,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) $requiredVersion = "2.0.0" $downloadVersion = "2.11.0" $url = "https://github.com/git-for-windows/git/releases/download/v2.11.0.windows.3/PortableGit-2.11.0.3-32-bit.7z.exe" # We choose the 32-bit version - $downloadName = "PortableGit-2.11.0.3-32-bit.7z.exe" + $downloadPath = "$downloadsDir\PortableGit-2.11.0.3-32-bit.7z.exe" $expectedDownloadedFileHash = "8bf3769c37945e991903dd1b988c6b1d97bbf0f3afc9851508974f38bf94dc01" # There is another copy of git.exe in PortableGit\bin. However, an installed version of git add the cmd dir to the PATH. # Therefore, choosing the cmd dir here as well. @@ -155,7 +155,6 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) throw "Unknown program requested" } - $downloadPath = "$downloadsDir\$downloadName" performDownload $Dependency $url $downloadsDir $downloadPath $downloadVersion $requiredVersion #calculating the hash -- cgit v1.2.3 From d5e7a501e907f06ad1e8bb4ffdebce9a29179d2d Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 24 Jan 2017 12:30:14 -0800 Subject: Download nuget.exe in a version-including subfolder in Downloads\ --- scripts/fetchDependency.ps1 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 9269dba8c..d05d16bea 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -133,9 +133,9 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) $requiredVersion = "3.3.0" $downloadVersion = "3.5.0" $url = "https://dist.nuget.org/win-x86-commandline/v3.5.0/nuget.exe" - $downloadPath = "$downloadsDir\nuget.exe" + $downloadPath = "$downloadsDir\nuget-3.5.0\nuget.exe" $expectedDownloadedFileHash = "399ec24c26ed54d6887cde61994bb3d1cada7956c1b19ff880f06f060c039918" - $executableFromDownload = "$downloadsDir\nuget.exe" + $executableFromDownload = $downloadPath $extractionType = $ExtractionType_NO_EXTRACTION_REQUIRED } elseif($Dependency -eq "git") @@ -155,6 +155,12 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) throw "Unknown program requested" } + $downloadSubdir = Split-path $downloadPath -Parent + if (!(Test-Path $downloadSubdir)) + { + New-Item -ItemType Directory -Path $downloadSubdir | Out-Null + } + performDownload $Dependency $url $downloadsDir $downloadPath $downloadVersion $requiredVersion #calculating the hash -- cgit v1.2.3 From d96f56736e9696248584506f364ee31acf12ddc3 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 24 Jan 2017 12:32:03 -0800 Subject: Fix path to nuget.exe --- scripts/findVisualStudioInstallationInstances.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 index 1cb78fa9e..241b05bc1 100644 --- a/scripts/findVisualStudioInstallationInstances.ps1 +++ b/scripts/findVisualStudioInstallationInstances.ps1 @@ -11,7 +11,7 @@ $vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root $downloadsDir = "$vcpkgRootDir\downloads" & $scriptsDir\fetchDependency.ps1 "nuget" -$nugetexe = "$downloadsDir\nuget.exe" +$nugetexe = "$downloadsDir\nuget-3.5.0\nuget.exe" $nugetPackageDir = "$downloadsDir\nuget-packages" $SetupAPIVersion = "1.3.269-rc" -- cgit v1.2.3 From f2ac7a32aaf9e0f374cf3025f6f86561780951eb Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 24 Jan 2017 12:36:46 -0800 Subject: FetchDependency.ps1 now returns the downloaded exe's path --- scripts/fetchDependency.ps1 | 2 ++ scripts/findVisualStudioInstallationInstances.ps1 | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index d05d16bea..b56bf1087 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -202,6 +202,8 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) { throw [System.IO.FileNotFoundException] ("Could not detect or download " + $Dependency) } + + return $downloadPath } SelectProgram $Dependency \ No newline at end of file diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 index 241b05bc1..d5faa57d3 100644 --- a/scripts/findVisualStudioInstallationInstances.ps1 +++ b/scripts/findVisualStudioInstallationInstances.ps1 @@ -10,8 +10,7 @@ $vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root $downloadsDir = "$vcpkgRootDir\downloads" -& $scriptsDir\fetchDependency.ps1 "nuget" -$nugetexe = "$downloadsDir\nuget-3.5.0\nuget.exe" +$nugetexe = & $scriptsDir\fetchDependency.ps1 "nuget" $nugetPackageDir = "$downloadsDir\nuget-packages" $SetupAPIVersion = "1.3.269-rc" -- cgit v1.2.3 From 33ce94a4565ce68cd02cacda221fccbd756d3949 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 24 Jan 2017 15:17:45 -0800 Subject: [vcpkg integrate] Exit silently if target cannot be found. --- scripts/buildsystems/msbuild/applocal.ps1 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/buildsystems/msbuild/applocal.ps1 b/scripts/buildsystems/msbuild/applocal.ps1 index 46981fad5..55680c1f6 100644 --- a/scripts/buildsystems/msbuild/applocal.ps1 +++ b/scripts/buildsystems/msbuild/applocal.ps1 @@ -2,7 +2,14 @@ param([string]$targetBinary, [string]$installedDir, [string]$tlogFile) function resolve($targetBinary) { - $targetBinaryPath = Resolve-Path $targetBinary + try + { + $targetBinaryPath = Resolve-Path $targetBinary -erroraction stop + } + catch [System.Management.Automation.ItemNotFoundException] + { + return + } $targetBinaryDir = Split-Path $targetBinaryPath -parent $a = $(dumpbin /DEPENDENTS $targetBinary | ? { $_ -match "^ [^ ].*\.dll" } | % { $_ -replace "^ ","" }) -- cgit v1.2.3 From af0727cbc000ff2b9d3d7489c417d69170fc3a5f Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 24 Jan 2017 17:51:45 -0800 Subject: Improve detection of VS installation instances --- scripts/findVisualStudioInstallationInstances.ps1 | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 index d5faa57d3..a2ce66522 100644 --- a/scripts/findVisualStudioInstallationInstances.ps1 +++ b/scripts/findVisualStudioInstallationInstances.ps1 @@ -32,9 +32,12 @@ if (!(Test-Path $SetupConsoleExe)) throw $nugetOutput } -$consoleOutput = & $SetupConsoleExe 2>&1 +$instances = & $SetupConsoleExe -nologo -value InstallationPath 2>&1 +$instanceCount = $instances.Length +# The last item can be empty +if ($instances[$entryCount - 1] -eq "") +{ + $instances = $instances[0..($instanceCount - 2)] +} -$key = "InstallationPath = " -$paths = $consoleOutput | Select-String -SimpleMatch $key -$paths = $paths -replace $key, "" -return $paths \ No newline at end of file +return $instances -- cgit v1.2.3 From 318d32e870f8ee25bdf71c8012115ebb9bc38361 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 24 Jan 2017 18:55:41 -0800 Subject: [vcpkg] Add user-facing notification to prompt rebuilding vcpkg.exe in face of cmake changes. --- scripts/cmake/vcpkg_configure_cmake.cmake | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 128782075..5db9b5d05 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -2,6 +2,10 @@ find_program(vcpkg_configure_cmake_NINJA ninja) function(vcpkg_configure_cmake) cmake_parse_arguments(_csc "" "SOURCE_PATH;GENERATOR" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" ${ARGN}) + if(NOT VCPKG_PLATFORM_TOOLSET) + message(FATAL_ERROR "Vcpkg has been updated with VS2017 support, however you need to rebuild vcpkg.exe by re-running bootstrap.ps1\n powershell -exec bypass scripts\\bootstrap.ps1\n") + endif() + if(_csc_GENERATOR) set(GENERATOR ${_csc_GENERATOR}) elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") -- cgit v1.2.3 From d04e78815a82b52af8b36d14fd68703936199ce3 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 25 Jan 2017 15:05:30 -0800 Subject: [vcpkg] Do not build tests when running scripts\bootstrap.ps1. --- scripts/bootstrap.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index a37ed99aa..98ccb40ad 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -26,7 +26,7 @@ try{ $msbuildExeWithPlatformToolset = & $scriptsDir\findAnyMSBuildWithCppPlatformToolset.ps1 $msbuildExe = $msbuildExeWithPlatformToolset[0] $platformToolset = $msbuildExeWithPlatformToolset[1] - & $msbuildExe "/p:VCPKG_VERSION=-$gitHash" "/p:DISABLE_METRICS=$disableMetrics" /p:Configuration=Release /p:Platform=x86 /p:PlatformToolset=$platformToolset /m + & $msbuildExe "/p:VCPKG_VERSION=-$gitHash" "/p:DISABLE_METRICS=$disableMetrics" /p:Configuration=Release /p:Platform=x86 /p:PlatformToolset=$platformToolset /m dirs.proj Write-Verbose("Placing vcpkg.exe in the correct location") -- cgit v1.2.3 From 8b602f97c83613862837d842263a17850828e953 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 25 Jan 2017 18:32:24 -0800 Subject: [vcpkg_copy_pdbs] Force output to be in en-us. Resolves #587 --- scripts/cmake/vcpkg_copy_pdbs.cmake | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_copy_pdbs.cmake b/scripts/cmake/vcpkg_copy_pdbs.cmake index 10cd1b2d3..61ad97728 100644 --- a/scripts/cmake/vcpkg_copy_pdbs.cmake +++ b/scripts/cmake/vcpkg_copy_pdbs.cmake @@ -13,6 +13,9 @@ function(vcpkg_copy_pdbs) set(DLLS_WITHOUT_MATCHING_PDBS) + set(PREVIOUS_VSLANG $ENV{VSLANG}) + set(ENV{VSLANG} 1033) + foreach(DLL ${DLLS}) execute_process(COMMAND dumpbin /PDBPATH ${DLL} COMMAND findstr PDB @@ -31,6 +34,8 @@ function(vcpkg_copy_pdbs) endif() endforeach() + set(ENV{VSLANG} ${PREVIOUS_VSLANG}) + list(LENGTH DLLS_WITHOUT_MATCHING_PDBS UNMATCHED_DLLS_LENGTH) if(UNMATCHED_DLLS_LENGTH GREATER 0) merge_filelist(MSG DLLS_WITHOUT_MATCHING_PDBS) -- cgit v1.2.3 From 872332df343cf01a5b6309a41b1f9c84bcca1bf0 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 30 Jan 2017 18:13:58 -0800 Subject: Remove doVcpkgRelease.ps1 --- scripts/doVcpkgRelease.ps1 | 84 ---------------------------------------------- 1 file changed, 84 deletions(-) delete mode 100644 scripts/doVcpkgRelease.ps1 (limited to 'scripts') diff --git a/scripts/doVcpkgRelease.ps1 b/scripts/doVcpkgRelease.ps1 deleted file mode 100644 index fb964d0c3..000000000 --- a/scripts/doVcpkgRelease.ps1 +++ /dev/null @@ -1,84 +0,0 @@ -[CmdletBinding()] -param( - -) -$ErrorActionPreference = "Stop" -$version = git show HEAD:toolsrc/VERSION.txt -#Remove the quotes from the string -$version = $version.Substring(1, $version.length - 2) -$versionRegex = '^\d+\.\d+\.\d+$' -if (!($version -match $versionRegex)) -{ - throw [System.ArgumentException] ("Expected version in the form d.d.d but was " + $version) -} - -Write-Verbose("New version is " + $version) -$gitTagString = "v$version" - -# Intentionally doesn't have ^ (=starts with) to match remote tags as well -$matchingTags = git tag | Where-Object {$_ -match "$gitTagString$"} -if ($matchingTags.Length -gt 0) -{ - throw [System.ArgumentException] ("Git tag matches existing tags: " + $matchingTags) -} - -$gitHash = git rev-parse HEAD -Write-Verbose("Git hash is " + $gitHash) - -$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition -$vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root -$gitStartOfHash = $gitHash.substring(0,6) -$versionWithStartOfHash = "$version-$gitStartOfHash" -$buildPath = "$vcpkgRootDir\build-$versionWithStartOfHash" -$releasePath = "$vcpkgRootDir\release-$versionWithStartOfHash" -Write-Verbose("Build Path " + $buildPath) -Write-Verbose("Release Path " + $releasePath) - -# 0 is metrics disabled, 1 is metrics enabled -for ($disableMetrics = 0; $disableMetrics -le 1; $disableMetrics++) -{ - - if (!(Test-Path $buildPath)) - { - New-Item -ItemType directory -Path $buildPath -force | Out-Null - } - - if (!(Test-Path $releasePath)) - { - New-Item -ItemType directory -Path $releasePath -force | Out-Null - } - - # Partial checkout for building vcpkg - $dotGitDir = "$vcpkgRootDir\.git" - $workTreeForBuildOnly = "$buildPath" - $checkoutForBuildOnly = ".\scripts",".\toolsrc",".vcpkg-root" # Must be relative to the root of the repository - Write-Verbose("Creating partial temporary checkout: $buildPath") - git --git-dir="$dotGitDir" --work-tree="$workTreeForBuildOnly" checkout $gitHash -f -q -- $checkoutForBuildOnly - git reset - - & "$buildPath\scripts\bootstrap.ps1" -disableMetrics $disableMetrics - - # Full checkout which will be a zip along with the executables from the previous step - $workTree = "$releasePath" - $checkoutThisDir = ".\" # Must be relative to the root of the repository - Write-Verbose("Creating temporary checkout: $releasePath") - git --git-dir=$dotGitDir --work-tree=$workTree checkout $gitHash -f -q -- $checkoutThisDir - git reset - - Copy-Item $buildPath\vcpkg.exe $releasePath\vcpkg.exe | Out-Null - Copy-Item $buildPath\scripts\vcpkgmetricsuploader.exe $releasePath\scripts\vcpkgmetricsuploader.exe | Out-Null - - Write-Verbose("Archiving") - $outputArchive = "$vcpkgRootDir\vcpkg-$versionWithStartOfHash.zip" - if ($disableMetrics -ne 0) - { - $outputArchive = "$vcpkgRootDir\vcpkg-$versionWithStartOfHash-external.zip" - } - Compress-Archive -Path "$releasePath\*" -CompressionLevel Optimal -DestinationPath $outputArchive -Force | Out-Null - - Write-Verbose("Removing temporary checkouts: $releasePath") - Remove-Item -recurse $buildPath | Out-Null - Remove-Item -recurse $releasePath | Out-Null - - Write-Verbose("Redistributable archive is: $outputArchive") -} \ No newline at end of file -- cgit v1.2.3 From 8b219333675e42edf21f6c528fe7760d6d465460 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 31 Jan 2017 17:53:08 -0800 Subject: [vcpkg-msbuild] Add troubleshooting message to MSBuild projects with Importance=Normal --- scripts/buildsystems/msbuild/vcpkg.targets | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts') diff --git a/scripts/buildsystems/msbuild/vcpkg.targets b/scripts/buildsystems/msbuild/vcpkg.targets index 26a524ca3..d1d804e94 100644 --- a/scripts/buildsystems/msbuild/vcpkg.targets +++ b/scripts/buildsystems/msbuild/vcpkg.targets @@ -51,6 +51,11 @@ + + + + + Date: Wed, 1 Feb 2017 11:38:58 -0800 Subject: Download 32-bit perl instead of 64-bit. Resolves #620 --- scripts/cmake/vcpkg_find_acquire_program.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index ab0cf1587..cd4a554f4 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -8,9 +8,9 @@ function(vcpkg_find_acquire_program VAR) if(VAR MATCHES "PERL") set(PROGNAME perl) set(PATHS ${DOWNLOADS}/tools/perl/perl/bin) - set(URL "http://strawberryperl.com/download/5.20.2.1/strawberry-perl-5.20.2.1-64bit-portable.zip") - set(ARCHIVE "strawberry-perl-5.20.2.1-64bit-portable.zip") - set(HASH 6e14e5580e52da5d35f29b67a52ef9db0e021af1575b4bbd84ebdbf18580522287890bdc21c0d21ddc1b2529d888f8e159dcaa017a3ff06d8fd23d16901bcc8b) + set(URL "http://strawberryperl.com/download/5.24.1.1/strawberry-perl-5.24.1.1-32bit-portable.zip") + set(ARCHIVE "strawberry-perl-5.24.1.1-32bit-portable.zip") + set(HASH a6e685ea24376f50db5f06c5b46075f1d3be25168fa1f27fa9b02e2ac017826cee62a2b43562f9b6c989337a231ba914416c110075457764de2d11f99d5e0f26) elseif(VAR MATCHES "NASM") set(PROGNAME nasm) set(PATHS ${DOWNLOADS}/tools/nasm/nasm-2.11.08) -- cgit v1.2.3 From cd0b7d644b2ba61618b70ae58f50d2e880dbe509 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 31 Jan 2017 18:31:19 -0800 Subject: Add PolicyDLLsWithoutLIBs policy --- scripts/ports.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/ports.cmake b/scripts/ports.cmake index 4e28cbb67..cc01a0619 100644 --- a/scripts/ports.cmake +++ b/scripts/ports.cmake @@ -74,7 +74,11 @@ if(CMD MATCHES "^BUILD$") set(BUILD_INFO_FILE_PATH ${CURRENT_PACKAGES_DIR}/BUILD_INFO) file(WRITE ${BUILD_INFO_FILE_PATH} "CRTLinkage: ${VCPKG_CRT_LINKAGE}\n") - file(APPEND ${BUILD_INFO_FILE_PATH} "LibraryLinkage: ${VCPKG_LIBRARY_LINKAGE}") + file(APPEND ${BUILD_INFO_FILE_PATH} "LibraryLinkage: ${VCPKG_LIBRARY_LINKAGE}\n") + + if (DEFINED VCPKG_POLICY_DLLS_WITHOUT_LIBS) + file(APPEND ${BUILD_INFO_FILE_PATH} "PolicyDLLsWithoutLIBs: ${VCPKG_POLICY_DLLS_WITHOUT_LIBS}\n") + endif() elseif(CMD MATCHES "^CREATE$") file(TO_NATIVE_PATH ${VCPKG_ROOT_DIR} NATIVE_VCPKG_ROOT_DIR) file(TO_NATIVE_PATH ${DOWNLOADS} NATIVE_DOWNLOADS) -- cgit v1.2.3 From a3eaed8f1faacc03dc5abb56d2117096d3413735 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 1 Feb 2017 16:19:27 -0800 Subject: [vcpkg] Add /MP to base compilation flags, enabling parallel builds. --- scripts/cmake/vcpkg_configure_cmake.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 5db9b5d05..c524d12ed 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -53,8 +53,8 @@ function(vcpkg_configure_cmake) list(APPEND _csc_OPTIONS - "-DCMAKE_CXX_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc" - "-DCMAKE_C_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8" + "-DCMAKE_CXX_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP" + "-DCMAKE_C_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8 /MP" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" -- cgit v1.2.3 From b2b2c9136918ed3ef85961c5c2885b9562d07d1d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 2 Feb 2017 15:41:20 -0800 Subject: [vcpkg] Override Boost_COMPILER setting for all packages and toolchain to enable mixing VS2015 and VS2017 --- scripts/buildsystems/vcpkg.cmake | 2 ++ scripts/cmake/vcpkg_configure_cmake.cmake | 1 + 2 files changed, 3 insertions(+) (limited to 'scripts') diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 7be93e54d..e7b2b20db 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -57,6 +57,8 @@ if(NOT VCPKG_TOOLCHAIN) ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/manual-link ) + set(Boost_COMPILER "-vc140") + set(CMAKE_PROGRAM_PATH ${CMAKE_PROGRAM_PATH} ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools) option(VCPKG_APPLOCAL_DEPS "Automatically copy dependencies into the output directory for executables." ON) diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index c524d12ed..fbebe13a4 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -58,6 +58,7 @@ function(vcpkg_configure_cmake) "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" + "-DBoost_COMPILER=-vc140" ) if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL dynamic) list(APPEND _csc_OPTIONS_DEBUG -- cgit v1.2.3 From ce9927f7327bc71ade246108a7d984deda6293fd Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 2 Feb 2017 16:00:30 -0800 Subject: Improve error handling if BITS transfer fails --- scripts/fetchDependency.ps1 | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'scripts') diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index b56bf1087..8d31b0edb 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -70,15 +70,21 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) if ($Dependency -ne "git") # git fails with BITS { - Start-BitsTransfer -Source $url -Destination $downloadPath -ErrorAction SilentlyContinue + try { + Start-BitsTransfer -Source $url -Destination $downloadPath -ErrorAction Stop + } + catch [System.Exception] { + # If BITS fails for any reason, delete any potentially partially downloaded files and continue + if (Test-Path $downloadPath) + { + Remove-Item $downloadPath + } + } } - else + if (!(Test-Path $downloadPath)) { - if (!(Test-Path $downloadPath)) - { - Write-Host("Downloading $Dependency...") - (New-Object System.Net.WebClient).DownloadFile($url, $downloadPath) - } + Write-Host("Downloading $Dependency...") + (New-Object System.Net.WebClient).DownloadFile($url, $downloadPath) } } -- cgit v1.2.3 From 95af9aac7c39765d1524b7c9c39dc283e9f0facf Mon Sep 17 00:00:00 2001 From: codicodi Date: Fri, 3 Feb 2017 17:16:13 +0100 Subject: Add Ninja support --- scripts/cmake/vcpkg_build_cmake.cmake | 12 +++++++++--- scripts/cmake/vcpkg_configure_cmake.cmake | 14 ++++++++++---- scripts/cmake/vcpkg_find_acquire_program.cmake | 16 ++++++++++++---- scripts/cmake/vcpkg_install_cmake.cmake | 12 +++++++++--- scripts/templates/portfile.in.cmake | 1 + 5 files changed, 41 insertions(+), 14 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_build_cmake.cmake b/scripts/cmake/vcpkg_build_cmake.cmake index 6d7cfe643..2e73a72d6 100644 --- a/scripts/cmake/vcpkg_build_cmake.cmake +++ b/scripts/cmake/vcpkg_build_cmake.cmake @@ -1,7 +1,7 @@ function(vcpkg_build_cmake) cmake_parse_arguments(_bc "MSVC_64_TOOLSET;DISABLE_PARALLEL" "" "" ${ARGN}) - set(MSVC_EXTRA_ARGS) + set(MSVC_EXTRA_ARGS /p:VCPkgLocalAppDataDisabled=true) # Specifies the architecture of the toolset, NOT the architecture of the produced binary if (_bc_MSVC_64_TOOLSET) @@ -12,9 +12,15 @@ function(vcpkg_build_cmake) list(APPEND MSVC_EXTRA_ARGS "/m") endif() + if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/build.ninja) + set(BUILD_ARGS -v) # verbose output + else() + set(BUILD_ARGS ${MSVC_EXTRA_ARGS}) + endif() + message(STATUS "Build ${TARGET_TRIPLET}-rel") vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} --build . --config Release -- /p:VCPkgLocalAppDataDisabled=true ${MSVC_EXTRA_ARGS} + COMMAND ${CMAKE_COMMAND} --build . --config Release -- ${BUILD_ARGS} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel LOGNAME build-${TARGET_TRIPLET}-rel ) @@ -22,7 +28,7 @@ function(vcpkg_build_cmake) message(STATUS "Build ${TARGET_TRIPLET}-dbg") vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} --build . --config Debug -- /p:VCPkgLocalAppDataDisabled=true ${MSVC_EXTRA_ARGS} + COMMAND ${CMAKE_COMMAND} --build . --config Debug -- ${BUILD_ARGS} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg LOGNAME build-${TARGET_TRIPLET}-dbg ) diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index fbebe13a4..42570226f 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -1,6 +1,5 @@ -find_program(vcpkg_configure_cmake_NINJA ninja) function(vcpkg_configure_cmake) - cmake_parse_arguments(_csc "" "SOURCE_PATH;GENERATOR" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" ${ARGN}) + cmake_parse_arguments(_csc "PREFER_NINJA" "SOURCE_PATH;GENERATOR" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" ${ARGN}) if(NOT VCPKG_PLATFORM_TOOLSET) message(FATAL_ERROR "Vcpkg has been updated with VS2017 support, however you need to rebuild vcpkg.exe by re-running bootstrap.ps1\n powershell -exec bypass scripts\\bootstrap.ps1\n") @@ -8,14 +7,14 @@ function(vcpkg_configure_cmake) if(_csc_GENERATOR) set(GENERATOR ${_csc_GENERATOR}) + elseif(_csc_PREFER_NINJA AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(GENERATOR "Ninja") elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015") elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015 Win64") elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015 ARM") - # elseif(NOT vcpkg_configure_cmake_NINJA MATCHES "NOTFOUND") - # set(GENERATOR "Ninja") elseif(TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015") elseif(TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") @@ -36,6 +35,13 @@ function(vcpkg_configure_cmake) elseif(TRIPLET_SYSTEM_ARCH MATCHES "arm") set(GENERATOR "Visual Studio 15 2017 ARM" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") endif() + + # If we use Ninja, make sure it's on PATH + if(GENERATOR STREQUAL "Ninja") + vcpkg_find_acquire_program(NINJA) + get_filename_component(NINJA_PATH ${NINJA} DIRECTORY) + set(ENV{PATH} "${NINJA_PATH};$ENV{PATH}") + endif() file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index cd4a554f4..044291382 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -4,6 +4,7 @@ function(vcpkg_find_acquire_program VAR) endif() unset(NOEXTRACT) + unset(SUBDIR) if(VAR MATCHES "PERL") set(PROGNAME perl) @@ -63,6 +64,13 @@ function(vcpkg_find_acquire_program VAR) set(URL "http://7-zip.org/a/7z1604.msi") set(ARCHIVE "7z1604.msi") set(HASH 556f95f7566fe23704d136239e4cf5e2a26f939ab43b44145c91b70d031a088d553e5c21301f1242a2295dcde3143b356211f0108c68e65eef8572407618326d) + elseif(VAR MATCHES "NINJA") + set(PROGNAME ninja) + set(SUBDIR "ninja-1.7.2") + set(PATHS ${DOWNLOADS}/tools/ninja/${SUBDIR}) + set(URL "https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-win.zip") + set(ARCHIVE "ninja-win.zip") + set(HASH cccab9281b274c564f9ad77a2115be1f19be67d7b2ee14a55d1db1b27f3b68db8e76076e4f804b61eb8e573e26a8ecc9985675a8dcf03fd7a77b7f57234f1393) else() message(FATAL "unknown tool ${VAR} -- unable to acquire.") endif() @@ -73,15 +81,15 @@ function(vcpkg_find_acquire_program VAR) EXPECTED_HASH SHA512=${HASH} SHOW_PROGRESS ) - file(MAKE_DIRECTORY ${DOWNLOADS}/tools/${PROGNAME}) + file(MAKE_DIRECTORY ${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}) if(DEFINED NOEXTRACT) - file(COPY ${DOWNLOADS}/${ARCHIVE} DESTINATION ${DOWNLOADS}/tools/${PROGNAME}) + file(COPY ${DOWNLOADS}/${ARCHIVE} DESTINATION ${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}) else() get_filename_component(ARCHIVE_EXTENSION ${ARCHIVE} EXT) string(TOLOWER "${ARCHIVE_EXTENSION}" ARCHIVE_EXTENSION) if(${ARCHIVE_EXTENSION} STREQUAL ".msi") file(TO_NATIVE_PATH "${DOWNLOADS}/${ARCHIVE}" ARCHIVE_NATIVE_PATH) - file(TO_NATIVE_PATH "${DOWNLOADS}/tools/${PROGNAME}" DESTINATION_NATIVE_PATH) + file(TO_NATIVE_PATH "${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}" DESTINATION_NATIVE_PATH) execute_process( COMMAND msiexec /a ${ARCHIVE_NATIVE_PATH} /qn TARGETDIR=${DESTINATION_NATIVE_PATH} WORKING_DIRECTORY ${DOWNLOADS} @@ -89,7 +97,7 @@ function(vcpkg_find_acquire_program VAR) else() execute_process( COMMAND ${CMAKE_COMMAND} -E tar xzf ${DOWNLOADS}/${ARCHIVE} - WORKING_DIRECTORY ${DOWNLOADS}/tools/${PROGNAME} + WORKING_DIRECTORY ${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR} ) endif() endif() diff --git a/scripts/cmake/vcpkg_install_cmake.cmake b/scripts/cmake/vcpkg_install_cmake.cmake index f29f3ce5d..5997fa764 100644 --- a/scripts/cmake/vcpkg_install_cmake.cmake +++ b/scripts/cmake/vcpkg_install_cmake.cmake @@ -1,7 +1,7 @@ function(vcpkg_install_cmake) cmake_parse_arguments(_bc "MSVC_64_TOOLSET;DISABLE_PARALLEL" "" "" ${ARGN}) - set(MSVC_EXTRA_ARGS) + set(MSVC_EXTRA_ARGS /p:VCPkgLocalAppDataDisabled=true) # Specifies the architecture of the toolset, NOT the architecture of the produced binary if (_bc_MSVC_64_TOOLSET) @@ -11,10 +11,16 @@ function(vcpkg_install_cmake) if (NOT _bc_DISABLE_PARALLEL) list(APPEND MSVC_EXTRA_ARGS "/m") endif() + + if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/build.ninja) + set(BUILD_ARGS -v) # verbose output + else() + set(BUILD_ARGS ${MSVC_EXTRA_ARGS}) + endif() message(STATUS "Package ${TARGET_TRIPLET}-rel") vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} --build . --config Release --target install -- /p:VCPkgLocalAppDataDisabled=true ${MSVC_EXTRA_ARGS} + COMMAND ${CMAKE_COMMAND} --build . --config Release --target install -- ${BUILD_ARGS} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel LOGNAME package-${TARGET_TRIPLET}-rel ) @@ -22,7 +28,7 @@ function(vcpkg_install_cmake) message(STATUS "Package ${TARGET_TRIPLET}-dbg") vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} --build . --config Debug --target install -- /p:VCPkgLocalAppDataDisabled=true ${MSVC_EXTRA_ARGS} + COMMAND ${CMAKE_COMMAND} --build . --config Debug --target install -- ${BUILD_ARGS} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg LOGNAME package-${TARGET_TRIPLET}-dbg ) diff --git a/scripts/templates/portfile.in.cmake b/scripts/templates/portfile.in.cmake index c848b6445..ef72431ff 100644 --- a/scripts/templates/portfile.in.cmake +++ b/scripts/templates/portfile.in.cmake @@ -17,6 +17,7 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 # OPTIONS_RELEASE -DOPTIMIZE=1 # OPTIONS_DEBUG -DDEBUGGABLE=1 -- cgit v1.2.3 From f7dcbe97fffdb5e4a005de7513816fc476aeef81 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 3 Feb 2017 17:46:09 -0800 Subject: [vcpkg] Disable Intel MKL for all internal builds. Fixes #609. --- scripts/cmake/vcpkg_build_cmake.cmake | 11 ++++++++--- scripts/cmake/vcpkg_build_msbuild.cmake | 2 ++ 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_build_cmake.cmake b/scripts/cmake/vcpkg_build_cmake.cmake index 6d7cfe643..3e8363a2c 100644 --- a/scripts/cmake/vcpkg_build_cmake.cmake +++ b/scripts/cmake/vcpkg_build_cmake.cmake @@ -1,9 +1,14 @@ function(vcpkg_build_cmake) cmake_parse_arguments(_bc "MSVC_64_TOOLSET;DISABLE_PARALLEL" "" "" ${ARGN}) - set(MSVC_EXTRA_ARGS) + set(MSVC_EXTRA_ARGS + "/p:VCPkgLocalAppDataDisabled=true" + "/p:UseIntelMKL=No" + ) # Specifies the architecture of the toolset, NOT the architecture of the produced binary + # This can help libraries that cause the linker to run out of memory. + # https://support.microsoft.com/en-us/help/2891057/linker-fatal-error-lnk1102-out-of-memory if (_bc_MSVC_64_TOOLSET) list(APPEND MSVC_EXTRA_ARGS "/p:PreferredToolArchitecture=x64") endif() @@ -14,7 +19,7 @@ function(vcpkg_build_cmake) message(STATUS "Build ${TARGET_TRIPLET}-rel") vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} --build . --config Release -- /p:VCPkgLocalAppDataDisabled=true ${MSVC_EXTRA_ARGS} + COMMAND ${CMAKE_COMMAND} --build . --config Release -- ${MSVC_EXTRA_ARGS} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel LOGNAME build-${TARGET_TRIPLET}-rel ) @@ -22,7 +27,7 @@ function(vcpkg_build_cmake) message(STATUS "Build ${TARGET_TRIPLET}-dbg") vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} --build . --config Debug -- /p:VCPkgLocalAppDataDisabled=true ${MSVC_EXTRA_ARGS} + COMMAND ${CMAKE_COMMAND} --build . --config Debug -- ${MSVC_EXTRA_ARGS} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg LOGNAME build-${TARGET_TRIPLET}-dbg ) diff --git a/scripts/cmake/vcpkg_build_msbuild.cmake b/scripts/cmake/vcpkg_build_msbuild.cmake index df255c745..f4a809e7f 100644 --- a/scripts/cmake/vcpkg_build_msbuild.cmake +++ b/scripts/cmake/vcpkg_build_msbuild.cmake @@ -55,6 +55,7 @@ function(vcpkg_build_msbuild) /p:Configuration=${_csc_RELEASE_CONFIGURATION} /p:Platform=${_csc_PLATFORM} /p:VCPkgLocalAppDataDisabled=true + /p:UseIntelMKL=No /m WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel LOGNAME build-${TARGET_TRIPLET}-rel @@ -67,6 +68,7 @@ function(vcpkg_build_msbuild) /p:Configuration=${_csc_DEBUG_CONFIGURATION} /p:Platform=${_csc_PLATFORM} /p:VCPkgLocalAppDataDisabled=true + /p:UseIntelMKL=No /m WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg LOGNAME build-${TARGET_TRIPLET}-dbg -- cgit v1.2.3 From 504545d2c864623ebddf169b1e402326bfe136f4 Mon Sep 17 00:00:00 2001 From: Ben Harper Date: Mon, 6 Feb 2017 14:44:59 +0200 Subject: Add a workaround for another BITS code path The fix from last week (ce9927f7327bc71ade246108a7d984deda6293fd) worked for downloading most dependencies, but there is still one BITS transfer code path, which this fix addresses. --- scripts/findVisualStudioInstallationInstances.ps1 | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 index a2ce66522..9d54990a2 100644 --- a/scripts/findVisualStudioInstallationInstances.ps1 +++ b/scripts/findVisualStudioInstallationInstances.ps1 @@ -20,7 +20,21 @@ $downloadPath = "$downloadsDir\$downloadName" if (!(Test-Path $downloadPath)) { - Start-BitsTransfer -Source $url -Destination $downloadPath #-ErrorAction SilentlyContinue + try { + Start-BitsTransfer -Source $url -Destination $downloadPath -ErrorAction Stop + } + catch [System.Exception] { + # If BITS fails for any reason, delete any potentially partially downloaded files and continue + if (Test-Path $downloadPath) + { + Remove-Item $downloadPath + } + } +} +if (!(Test-Path $downloadPath)) +{ + Write-Host("Downloading $downloadName...") + (New-Object System.Net.WebClient).DownloadFile($url, $downloadPath) } $nugetOutput = & $nugetexe install Microsoft.VisualStudio.Setup.Configuration.Native -Pre -Source $downloadsDir -OutputDirectory $nugetPackageDir 2>&1 -- cgit v1.2.3 From 7207316ed405c334be1ac507d76dd45a5979903d Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 6 Feb 2017 15:26:35 -0800 Subject: Don't download nupkg. nuget.exe auto-downloads it --- scripts/findVisualStudioInstallationInstances.ps1 | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'scripts') diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 index 9d54990a2..2c42ef420 100644 --- a/scripts/findVisualStudioInstallationInstances.ps1 +++ b/scripts/findVisualStudioInstallationInstances.ps1 @@ -14,29 +14,6 @@ $nugetexe = & $scriptsDir\fetchDependency.ps1 "nuget" $nugetPackageDir = "$downloadsDir\nuget-packages" $SetupAPIVersion = "1.3.269-rc" -$url = "https://api.nuget.org/packages/microsoft.visualstudio.setup.configuration.native.$SetupAPIVersion.nupkg" -$downloadName = "microsoft.visualstudio.setup.configuration.native.$SetupAPIVersion.nupkg" -$downloadPath = "$downloadsDir\$downloadName" - -if (!(Test-Path $downloadPath)) -{ - try { - Start-BitsTransfer -Source $url -Destination $downloadPath -ErrorAction Stop - } - catch [System.Exception] { - # If BITS fails for any reason, delete any potentially partially downloaded files and continue - if (Test-Path $downloadPath) - { - Remove-Item $downloadPath - } - } -} -if (!(Test-Path $downloadPath)) -{ - Write-Host("Downloading $downloadName...") - (New-Object System.Net.WebClient).DownloadFile($url, $downloadPath) -} - $nugetOutput = & $nugetexe install Microsoft.VisualStudio.Setup.Configuration.Native -Pre -Source $downloadsDir -OutputDirectory $nugetPackageDir 2>&1 $SetupConsoleExe = "$nugetPackageDir\Microsoft.VisualStudio.Setup.Configuration.Native.$SetupAPIVersion\tools\x86\Microsoft.VisualStudio.Setup.Configuration.Console.exe" -- cgit v1.2.3 From acc669e86942dd569884d5241b023a91eed61908 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 6 Feb 2017 15:55:39 -0800 Subject: Update SetupAPI version. Explicitly specify version. Use -nocache --- scripts/findVisualStudioInstallationInstances.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 index 2c42ef420..260ee73fe 100644 --- a/scripts/findVisualStudioInstallationInstances.ps1 +++ b/scripts/findVisualStudioInstallationInstances.ps1 @@ -13,8 +13,8 @@ $downloadsDir = "$vcpkgRootDir\downloads" $nugetexe = & $scriptsDir\fetchDependency.ps1 "nuget" $nugetPackageDir = "$downloadsDir\nuget-packages" -$SetupAPIVersion = "1.3.269-rc" -$nugetOutput = & $nugetexe install Microsoft.VisualStudio.Setup.Configuration.Native -Pre -Source $downloadsDir -OutputDirectory $nugetPackageDir 2>&1 +$SetupAPIVersion = "1.5.125-rc" +$nugetOutput = & $nugetexe install Microsoft.VisualStudio.Setup.Configuration.Native -Version $SetupAPIVersion -OutputDirectory $nugetPackageDir -nocache 2>&1 $SetupConsoleExe = "$nugetPackageDir\Microsoft.VisualStudio.Setup.Configuration.Native.$SetupAPIVersion\tools\x86\Microsoft.VisualStudio.Setup.Configuration.Console.exe" -- cgit v1.2.3 From f9616c6994ccf66e2a64e2d62e6a1408694c190c Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 7 Feb 2017 17:02:57 -0800 Subject: Add new Policy: Empty Package --- scripts/ports.cmake | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scripts') diff --git a/scripts/ports.cmake b/scripts/ports.cmake index cc01a0619..c03b005ea 100644 --- a/scripts/ports.cmake +++ b/scripts/ports.cmake @@ -79,6 +79,9 @@ if(CMD MATCHES "^BUILD$") if (DEFINED VCPKG_POLICY_DLLS_WITHOUT_LIBS) file(APPEND ${BUILD_INFO_FILE_PATH} "PolicyDLLsWithoutLIBs: ${VCPKG_POLICY_DLLS_WITHOUT_LIBS}\n") endif() + if (DEFINED VCPKG_POLICY_EMPTY_PACKAGE) + file(APPEND ${BUILD_INFO_FILE_PATH} "PolicyEmptyPackage: ${VCPKG_POLICY_EMPTY_PACKAGE}\n") + endif() elseif(CMD MATCHES "^CREATE$") file(TO_NATIVE_PATH ${VCPKG_ROOT_DIR} NATIVE_VCPKG_ROOT_DIR) file(TO_NATIVE_PATH ${DOWNLOADS} NATIVE_DOWNLOADS) -- cgit v1.2.3 From e1aea256b84d2c1ac5c29db0e5e40ed536e3157f Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 8 Feb 2017 02:07:53 -0800 Subject: Fix variable name and guard against 0 instances --- scripts/findVisualStudioInstallationInstances.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 index 260ee73fe..951975758 100644 --- a/scripts/findVisualStudioInstallationInstances.ps1 +++ b/scripts/findVisualStudioInstallationInstances.ps1 @@ -25,8 +25,9 @@ if (!(Test-Path $SetupConsoleExe)) $instances = & $SetupConsoleExe -nologo -value InstallationPath 2>&1 $instanceCount = $instances.Length + # The last item can be empty -if ($instances[$entryCount - 1] -eq "") +if ($instanceCount -gt 0 -and $instances[$instanceCount - 1] -eq "") { $instances = $instances[0..($instanceCount - 2)] } -- cgit v1.2.3 From 116b1b8c66afbe11719c42d03d342bb6fe5d58b0 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 8 Feb 2017 17:39:31 -0800 Subject: Reorder path alterations to generally append instead of prepend. This solves the issue where some software bundles (git) provide multiple executables in the same folder, which can override other desired programs (link.exe). --- scripts/cmake/vcpkg_configure_cmake.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 42570226f..85a67a401 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -40,7 +40,7 @@ function(vcpkg_configure_cmake) if(GENERATOR STREQUAL "Ninja") vcpkg_find_acquire_program(NINJA) get_filename_component(NINJA_PATH ${NINJA} DIRECTORY) - set(ENV{PATH} "${NINJA_PATH};$ENV{PATH}") + set(ENV{PATH} "$ENV{PATH};${NINJA_PATH}") endif() file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) -- cgit v1.2.3 From b6b69025c3c5d64f73faa3445fa3f17c967a8337 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 8 Feb 2017 19:34:19 -0800 Subject: bootstrap.ps1 now detects the available Windows SDKs --- scripts/bootstrap.ps1 | 3 ++- scripts/findTargetPlatformVersion.ps1 | 43 +++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 scripts/findTargetPlatformVersion.ps1 (limited to 'scripts') diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index 98ccb40ad..9907e31fb 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -26,7 +26,8 @@ try{ $msbuildExeWithPlatformToolset = & $scriptsDir\findAnyMSBuildWithCppPlatformToolset.ps1 $msbuildExe = $msbuildExeWithPlatformToolset[0] $platformToolset = $msbuildExeWithPlatformToolset[1] - & $msbuildExe "/p:VCPKG_VERSION=-$gitHash" "/p:DISABLE_METRICS=$disableMetrics" /p:Configuration=Release /p:Platform=x86 /p:PlatformToolset=$platformToolset /m dirs.proj + $targetPlatformVersion = & $scriptsDir\findTargetPlatformVersion.ps1 + & $msbuildExe "/p:VCPKG_VERSION=-$gitHash" "/p:DISABLE_METRICS=$disableMetrics" /p:Configuration=Release /p:Platform=x86 /p:PlatformToolset=$platformToolset /p:TargetPlatformVersion=$targetPlatformVersion /m dirs.proj Write-Verbose("Placing vcpkg.exe in the correct location") diff --git a/scripts/findTargetPlatformVersion.ps1 b/scripts/findTargetPlatformVersion.ps1 new file mode 100644 index 000000000..5bc6cf854 --- /dev/null +++ b/scripts/findTargetPlatformVersion.ps1 @@ -0,0 +1,43 @@ +[CmdletBinding()] +param( + +) + +Import-Module BitsTransfer + +$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition +$CandidateProgramFiles = "${env:PROGRAMFILES(X86)}", "${env:PROGRAMFILES}" + +# Windows 10 SDK +foreach ($ProgramFiles in $CandidateProgramFiles) +{ + $folder = "$ProgramFiles\Windows Kits\10\Include" + if (!(Test-Path $folder)) + { + continue + } + + $win10sdkVersions = Get-ChildItem $folder | Where-Object {$_.Name -match "^10"} | Sort-Object + $win10sdkVersionCount = $win10sdkVersions.Length + + if ($win10sdkVersionCount -eq 0) + { + continue + } + + return $win10sdkVersions[$win10sdkVersionCount - 1].ToString() +} + + + +# Windows 8.1 SDK +foreach ($ProgramFiles in $CandidateProgramFiles) +{ + $folder = "$ProgramFiles\Windows Kits\8.1\Include" + if (Test-Path $folder) + { + return "8.1" + } +} + +throw "Could not detect a Windows SDK / TargetPlatformVersion" \ No newline at end of file -- cgit v1.2.3 From 4f8e4af36321708ee0ac98a77cdc45926ad44a58 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 8 Feb 2017 22:31:04 -0800 Subject: Remove unneeded Import-Module --- scripts/findTargetPlatformVersion.ps1 | 4 ---- 1 file changed, 4 deletions(-) (limited to 'scripts') diff --git a/scripts/findTargetPlatformVersion.ps1 b/scripts/findTargetPlatformVersion.ps1 index 5bc6cf854..e9d676724 100644 --- a/scripts/findTargetPlatformVersion.ps1 +++ b/scripts/findTargetPlatformVersion.ps1 @@ -3,8 +3,6 @@ param( ) -Import-Module BitsTransfer - $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition $CandidateProgramFiles = "${env:PROGRAMFILES(X86)}", "${env:PROGRAMFILES}" @@ -28,8 +26,6 @@ foreach ($ProgramFiles in $CandidateProgramFiles) return $win10sdkVersions[$win10sdkVersionCount - 1].ToString() } - - # Windows 8.1 SDK foreach ($ProgramFiles in $CandidateProgramFiles) { -- cgit v1.2.3 From 6ca475a5b47e0a49e2cdd4e65f3c51913a431328 Mon Sep 17 00:00:00 2001 From: codicodi Date: Thu, 9 Feb 2017 18:13:52 +0100 Subject: add libepoxy --- scripts/cmake/vcpkg_common_functions.cmake | 2 + scripts/cmake/vcpkg_configure_meson.cmake | 72 ++++++++++++++++++++++++++ scripts/cmake/vcpkg_find_acquire_program.cmake | 25 +++++++-- scripts/cmake/vcpkg_install_meson.cmake | 23 ++++++++ 4 files changed, 119 insertions(+), 3 deletions(-) create mode 100644 scripts/cmake/vcpkg_configure_meson.cmake create mode 100644 scripts/cmake/vcpkg_install_meson.cmake (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_common_functions.cmake b/scripts/cmake/vcpkg_common_functions.cmake index 6e60bf2bc..fb626efe8 100644 --- a/scripts/cmake/vcpkg_common_functions.cmake +++ b/scripts/cmake/vcpkg_common_functions.cmake @@ -7,7 +7,9 @@ include(vcpkg_build_cmake) include(vcpkg_build_msbuild) include(vcpkg_build_qmake) include(vcpkg_install_cmake) +include(vcpkg_install_meson) include(vcpkg_configure_cmake) +include(vcpkg_configure_meson) include(vcpkg_configure_qmake) include(vcpkg_apply_patches) include(vcpkg_copy_pdbs) diff --git a/scripts/cmake/vcpkg_configure_meson.cmake b/scripts/cmake/vcpkg_configure_meson.cmake new file mode 100644 index 000000000..277f91e11 --- /dev/null +++ b/scripts/cmake/vcpkg_configure_meson.cmake @@ -0,0 +1,72 @@ +function(vcpkg_configure_meson) + cmake_parse_arguments(_vcm "" "SOURCE_PATH" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" ${ARGN}) + + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + + # use the same compiler options as in vcpkg_configure_cmake + set(MESON_COMMON_CFLAGS "${MESON_COMMON_CFLAGS} /DWIN32 /D_WINDOWS /W3 /utf-8") + set(MESON_COMMON_CXXFLAGS "${MESON_COMMON_CXXFLAGS} /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc") + + if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL dynamic) + set(MESON_DEBUG_CFLAGS "${MESON_DEBUG_CFLAGS} /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1") + set(MESON_DEBUG_CXXFLAGS "${MESON_DEBUG_CXXFLAGS} /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1") + + set(MESON_RELEASE_CFLAGS "${MESON_RELEASE_CFLAGS} /MD /O2 /Oi /Gy /DNDEBUG /Zi") + set(MESON_RELEASE_CXXFLAGS "${MESON_RELEASE_CXXFLAGS} /MD /O2 /Oi /Gy /DNDEBUG /Zi") + elseif(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL static) + set(MESON_DEBUG_CFLAGS "${MESON_DEBUG_CFLAGS} /D_DEBUG /MTd /Zi /Ob0 /Od /RTC1") + set(MESON_DEBUG_CXXFLAGS "${MESON_DEBUG_CXXFLAGS} /D_DEBUG /MTd /Zi /Ob0 /Od /RTC1") + + set(MESON_RELEASE_CFLAGS "${MESON_RELEASE_CFLAGS} /MT /O2 /Oi /Gy /DNDEBUG /Zi") + set(MESON_RELEASE_CXXFLAGS "${MESON_RELEASE_CXXFLAGS} /MT /O2 /Oi /Gy /DNDEBUG /Zi") + endif() + + set(MESON_COMMON_LDFLAGS "${MESON_COMMON_LDFLAGS} /DEBUG") + set(MESON_RELEASE_LDFLAGS "${MESON_RELEASE_LDFLAGS} /INCREMENTAL:NO /OPT:REF /OPT:ICF") + + # select meson cmd-line options + list(APPEND _vcm_OPTIONS --buildtype plain --backend ninja) + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + list(APPEND _vcm_OPTIONS --default-library shared) + else() + list(APPEND _vcm_OPTIONS --default-library static) + endif() + + list(APPEND _vcm_OPTIONS_DEBUG --prefix ${CURRENT_PACKAGES_DIR}/debug --includedir ../include) + list(APPEND _vcm_OPTIONS_RELEASE --prefix ${CURRENT_PACKAGES_DIR}) + + vcpkg_find_acquire_program(MESON) + vcpkg_find_acquire_program(NINJA) + get_filename_component(NINJA_PATH ${NINJA} DIRECTORY) + set(ENV{PATH} "$ENV{PATH};${NINJA_PATH}") + + # configure release + message(STATUS "Configuring ${TARGET_TRIPLET}-rel") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + set(ENV{CFLAGS} "${MESON_COMMON_CFLAGS} ${MESON_RELEASE_CFLAGS}") + set(ENV{CXXFLAGS} "${MESON_COMMON_CXXFLAGS} ${MESON_RELEASE_CXXFLAGS}") + set(ENV{LDFLAGS} "${MESON_COMMON_LDFLAGS} ${MESON_RELEASE_LDFLAGS}") + set(ENV{CPPFLAGS} "${MESON_COMMON_CPPFLAGS} ${MESON_RELEASE_CPPFLAGS}") + vcpkg_execute_required_process( + COMMAND ${MESON} ${_vcm_OPTIONS} ${_vcm_OPTIONS_RELEASE} ${_vcm_SOURCE_PATH} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME config-${TARGET_TRIPLET}-rel + ) + message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") + + # configure debug + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + set(ENV{CFLAGS} "${MESON_COMMON_CFLAGS} ${MESON_DEBUG_CFLAGS}") + set(ENV{CXXFLAGS} "${MESON_COMMON_CXXFLAGS} ${MESON_DEBUG_CXXFLAGS}") + set(ENV{LDFLAGS} "${MESON_COMMON_LDFLAGS} ${MESON_DEBUG_LDFLAGS}") + set(ENV{CPPFLAGS} "${MESON_COMMON_CPPFLAGS} ${MESON_DEBUG_CPPFLAGS}") + vcpkg_execute_required_process( + COMMAND ${MESON} ${_vcm_OPTIONS} ${_vcm_OPTIONS_DEBUG} ${_vcm_SOURCE_PATH} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME config-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") + +endfunction() diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 044291382..b9a397fcc 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -5,6 +5,7 @@ function(vcpkg_find_acquire_program VAR) unset(NOEXTRACT) unset(SUBDIR) + unset(REQUIRED_INTERPRETER) if(VAR MATCHES "PERL") set(PROGNAME perl) @@ -70,12 +71,30 @@ function(vcpkg_find_acquire_program VAR) set(PATHS ${DOWNLOADS}/tools/ninja/${SUBDIR}) set(URL "https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-win.zip") set(ARCHIVE "ninja-win.zip") - set(HASH cccab9281b274c564f9ad77a2115be1f19be67d7b2ee14a55d1db1b27f3b68db8e76076e4f804b61eb8e573e26a8ecc9985675a8dcf03fd7a77b7f57234f1393) + set(HASH cccab9281b274c564f9ad77a2115be1f19be67d7b2ee14a55d1db1b27f3b68db8e76076e4f804b61eb8e573e26a8ecc9985675a8dcf03fd7a77b7f57234f1393) + elseif(VAR MATCHES "MESON") + set(PROGNAME meson) + set(REQUIRED_INTERPRETER PYTHON3) + set(SCRIPTNAME meson.py) + set(PATHS ${DOWNLOADS}/tools/meson/meson-0.38.1) + set(URL "https://github.com/mesonbuild/meson/archive/0.38.1.zip") + set(ARCHIVE "meson-0.38.1.zip") + set(HASH 89642b1d976af7e29e9ca2b1a378510ce286ebd90a8234e898f3dd9dd7151538fdfc61fba770681605dad843b77b344fee94f992f18328655669d5f603c7fee5) else() message(FATAL "unknown tool ${VAR} -- unable to acquire.") endif() - find_program(${VAR} ${PROGNAME} PATHS ${PATHS}) + macro(do_find) + if(NOT DEFINED REQUIRED_INTERPRETER) + find_program(${VAR} ${PROGNAME} PATHS ${PATHS}) + else() + vcpkg_find_acquire_program(${REQUIRED_INTERPRETER}) + find_file(SCIRPT ${SCRIPTNAME} PATHS ${PATHS}) + set(${VAR} ${${REQUIRED_INTERPRETER}} ${SCIRPT}) + endif() + endmacro() + + do_find() if(${VAR} MATCHES "-NOTFOUND") file(DOWNLOAD ${URL} ${DOWNLOADS}/${ARCHIVE} EXPECTED_HASH SHA512=${HASH} @@ -102,7 +121,7 @@ function(vcpkg_find_acquire_program VAR) endif() endif() - find_program(${VAR} ${PROGNAME} PATHS ${PATHS}) + do_find() endif() set(${VAR} ${${VAR}} PARENT_SCOPE) diff --git a/scripts/cmake/vcpkg_install_meson.cmake b/scripts/cmake/vcpkg_install_meson.cmake new file mode 100644 index 000000000..21737bdc9 --- /dev/null +++ b/scripts/cmake/vcpkg_install_meson.cmake @@ -0,0 +1,23 @@ +function(vcpkg_install_meson) + + vcpkg_find_acquire_program(NINJA) + + unset(ENV{DESTDIR}) # installation directory was already specified with '--prefix' option + + message(STATUS "Package ${TARGET_TRIPLET}-rel") + vcpkg_execute_required_process( + COMMAND ${NINJA} install -v + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME package-${TARGET_TRIPLET}-rel + ) + message(STATUS "Package ${TARGET_TRIPLET}-rel done") + + message(STATUS "Package ${TARGET_TRIPLET}-dbg") + vcpkg_execute_required_process( + COMMAND ${NINJA} install -v + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME package-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Package ${TARGET_TRIPLET}-dbg done") + +endfunction() -- cgit v1.2.3 From b65ae7c27793d2837881412f609ee08974c14f82 Mon Sep 17 00:00:00 2001 From: codicodi Date: Thu, 9 Feb 2017 18:15:57 +0100 Subject: tabs to spaces --- scripts/cmake/vcpkg_install_meson.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_install_meson.cmake b/scripts/cmake/vcpkg_install_meson.cmake index 21737bdc9..f6d49288c 100644 --- a/scripts/cmake/vcpkg_install_meson.cmake +++ b/scripts/cmake/vcpkg_install_meson.cmake @@ -1,9 +1,9 @@ function(vcpkg_install_meson) - + vcpkg_find_acquire_program(NINJA) - - unset(ENV{DESTDIR}) # installation directory was already specified with '--prefix' option - + + unset(ENV{DESTDIR}) # installation directory was already specified with '--prefix' option + message(STATUS "Package ${TARGET_TRIPLET}-rel") vcpkg_execute_required_process( COMMAND ${NINJA} install -v @@ -11,7 +11,7 @@ function(vcpkg_install_meson) LOGNAME package-${TARGET_TRIPLET}-rel ) message(STATUS "Package ${TARGET_TRIPLET}-rel done") - + message(STATUS "Package ${TARGET_TRIPLET}-dbg") vcpkg_execute_required_process( COMMAND ${NINJA} install -v -- cgit v1.2.3 From cfd5adaf135ccfe2ade3bce43a00d27abd007b0a Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 9 Feb 2017 15:26:40 -0800 Subject: Improve WinSDK detection --- scripts/findTargetPlatformVersion.ps1 | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'scripts') diff --git a/scripts/findTargetPlatformVersion.ps1 b/scripts/findTargetPlatformVersion.ps1 index e9d676724..d3dba73f1 100644 --- a/scripts/findTargetPlatformVersion.ps1 +++ b/scripts/findTargetPlatformVersion.ps1 @@ -15,15 +15,16 @@ foreach ($ProgramFiles in $CandidateProgramFiles) continue } - $win10sdkVersions = Get-ChildItem $folder | Where-Object {$_.Name -match "^10"} | Sort-Object - $win10sdkVersionCount = $win10sdkVersions.Length + $win10sdkVersions = @(Get-ChildItem $folder | Where-Object {$_.Name -match "^10"} | Sort-Object) + [array]::Reverse($win10sdkVersions) # Newest SDK first - if ($win10sdkVersionCount -eq 0) + foreach ($win10sdkV in $win10sdkVersions) { - continue + if (Test-Path "$folder\$win10sdkV\um\windows.h") + { + return $win10sdkV.ToString() + } } - - return $win10sdkVersions[$win10sdkVersionCount - 1].ToString() } # Windows 8.1 SDK -- cgit v1.2.3 From 4cef21b894b5ce8507447c6c63fb0f00228b75ec Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 11 Feb 2017 09:51:02 -0800 Subject: [bootstrap] Specify NuGet Source to avoid impact from user config. --- scripts/findVisualStudioInstallationInstances.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 index 951975758..9034ddfa8 100644 --- a/scripts/findVisualStudioInstallationInstances.ps1 +++ b/scripts/findVisualStudioInstallationInstances.ps1 @@ -14,7 +14,7 @@ $nugetexe = & $scriptsDir\fetchDependency.ps1 "nuget" $nugetPackageDir = "$downloadsDir\nuget-packages" $SetupAPIVersion = "1.5.125-rc" -$nugetOutput = & $nugetexe install Microsoft.VisualStudio.Setup.Configuration.Native -Version $SetupAPIVersion -OutputDirectory $nugetPackageDir -nocache 2>&1 +$nugetOutput = & $nugetexe install Microsoft.VisualStudio.Setup.Configuration.Native -Version $SetupAPIVersion -OutputDirectory $nugetPackageDir -Source "https://api.nuget.org/v3/index.json" -nocache 2>&1 $SetupConsoleExe = "$nugetPackageDir\Microsoft.VisualStudio.Setup.Configuration.Native.$SetupAPIVersion\tools\x86\Microsoft.VisualStudio.Setup.Configuration.Console.exe" -- cgit v1.2.3 From 444f28dd24f4bffa3e0ee450e8fbbe30340086b4 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 14 Feb 2017 16:53:29 -0800 Subject: Add functions to find Program Files folders on the powershell side --- scripts/findAnyMSBuildWithCppPlatformToolset.ps1 | 4 +++- scripts/findTargetPlatformVersion.ps1 | 4 +++- scripts/getProgramFiles32bit.ps1 | 11 +++++++++++ scripts/getProgramFilesPlatformBitness.ps1 | 11 +++++++++++ 4 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 scripts/getProgramFiles32bit.ps1 create mode 100644 scripts/getProgramFilesPlatformBitness.ps1 (limited to 'scripts') diff --git a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 index 1be4a4e6d..d160aea12 100644 --- a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 +++ b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 @@ -18,7 +18,9 @@ foreach ($instance in $VisualStudio2017InstallationInstances) } # VS2015 -$CandidateProgramFiles = "${env:PROGRAMFILES(X86)}", "${env:PROGRAMFILES}" +$programFiles32 = & $scriptsDir\getProgramFiles32bit.ps1 +$programFilesP = & $scriptsDir\getProgramFilesPlatformBitness.ps1 +$CandidateProgramFiles = $programFiles32, $programFilesP foreach ($ProgramFiles in $CandidateProgramFiles) { $clExe= "$ProgramFiles\Microsoft Visual Studio 14.0\\VC\bin\cl.exe" diff --git a/scripts/findTargetPlatformVersion.ps1 b/scripts/findTargetPlatformVersion.ps1 index d3dba73f1..650e0b4ed 100644 --- a/scripts/findTargetPlatformVersion.ps1 +++ b/scripts/findTargetPlatformVersion.ps1 @@ -4,7 +4,9 @@ param( ) $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition -$CandidateProgramFiles = "${env:PROGRAMFILES(X86)}", "${env:PROGRAMFILES}" +$programFiles32 = & $scriptsDir\getProgramFiles32bit.ps1 +$programFilesP = & $scriptsDir\getProgramFilesPlatformBitness.ps1 +$CandidateProgramFiles = $programFiles32, $programFilesP # Windows 10 SDK foreach ($ProgramFiles in $CandidateProgramFiles) diff --git a/scripts/getProgramFiles32bit.ps1 b/scripts/getProgramFiles32bit.ps1 new file mode 100644 index 000000000..fd7167191 --- /dev/null +++ b/scripts/getProgramFiles32bit.ps1 @@ -0,0 +1,11 @@ +[CmdletBinding()] +param( + +) + +if (Test-Path env:PROGRAMFILES`(X86`)) +{ + return ${env:PROGRAMFILES(X86)} +} + +return ${env:PROGRAMFILES} \ No newline at end of file diff --git a/scripts/getProgramFilesPlatformBitness.ps1 b/scripts/getProgramFilesPlatformBitness.ps1 new file mode 100644 index 000000000..6d0a513ca --- /dev/null +++ b/scripts/getProgramFilesPlatformBitness.ps1 @@ -0,0 +1,11 @@ +[CmdletBinding()] +param( + +) + +if (Test-Path env:ProgramW6432) +{ + return ${env:ProgramW6432} +} + +return ${env:PROGRAMFILES} \ No newline at end of file -- cgit v1.2.3 From da26d097165b5d06b77e7dcb13bf1b8a8c9c079e Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 14 Feb 2017 17:29:47 -0800 Subject: Add functions to find Program Files folders on the CMake side --- scripts/cmake/vcpkg_common_functions.cmake | 2 ++ scripts/cmake/vcpkg_find_acquire_program.cmake | 5 ++++- scripts/cmake/vcpkg_get_program_files_32_bit.cmake | 7 +++++++ scripts/cmake/vcpkg_get_program_files_platform_bitness.cmake | 7 +++++++ 4 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 scripts/cmake/vcpkg_get_program_files_32_bit.cmake create mode 100644 scripts/cmake/vcpkg_get_program_files_platform_bitness.cmake (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_common_functions.cmake b/scripts/cmake/vcpkg_common_functions.cmake index fb626efe8..50c4ed2dc 100644 --- a/scripts/cmake/vcpkg_common_functions.cmake +++ b/scripts/cmake/vcpkg_common_functions.cmake @@ -14,3 +14,5 @@ include(vcpkg_configure_qmake) include(vcpkg_apply_patches) include(vcpkg_copy_pdbs) include(vcpkg_copy_tool_dependencies) +include(vcpkg_get_program_files_32_bit) +include(vcpkg_get_program_files_platform_bitness) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index b9a397fcc..44e347e04 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -7,6 +7,9 @@ function(vcpkg_find_acquire_program VAR) unset(SUBDIR) unset(REQUIRED_INTERPRETER) + vcpkg_get_program_files_platform_bitness(PROGRAM_FILES_PLATFORM_BITNESS) + vcpkg_get_program_files_32_bit(PROGRAM_FILES_32_BIT) + if(VAR MATCHES "PERL") set(PROGNAME perl) set(PATHS ${DOWNLOADS}/tools/perl/perl/bin) @@ -61,7 +64,7 @@ function(vcpkg_find_acquire_program VAR) set(HASH 23a26dc7e29979bec5dcd3bfcabf76397b93ace64f5d46f2254d6420158bac5eff1c1a8454e3427e7a2fe2c233c5f2cffc87b376772399e12e40b51be2c065f4) elseif(VAR MATCHES "7Z") set(PROGNAME 7z) - set(PATHS "C:/Program Files/7-Zip" ${DOWNLOADS}/tools/7z/Files/7-Zip) + set(PATHS "${PROGRAM_FILES_PLATFORM_BITNESS}/7-Zip" "${PROGRAM_FILES_32_BIT}/7-Zip" ${DOWNLOADS}/tools/7z/Files/7-Zip) set(URL "http://7-zip.org/a/7z1604.msi") set(ARCHIVE "7z1604.msi") set(HASH 556f95f7566fe23704d136239e4cf5e2a26f939ab43b44145c91b70d031a088d553e5c21301f1242a2295dcde3143b356211f0108c68e65eef8572407618326d) diff --git a/scripts/cmake/vcpkg_get_program_files_32_bit.cmake b/scripts/cmake/vcpkg_get_program_files_32_bit.cmake new file mode 100644 index 000000000..386e59c75 --- /dev/null +++ b/scripts/cmake/vcpkg_get_program_files_32_bit.cmake @@ -0,0 +1,7 @@ +function(vcpkg_get_program_files_32_bit ret) + if(DEFINED ENV{ProgramFiles\(X86\)}) + set(${ret} $ENV{ProgramFiles\(X86\)} PARENT_SCOPE) + else() + set(${ret} $ENV{PROGRAMFILES} PARENT_SCOPE) + endif() +endfunction() \ No newline at end of file diff --git a/scripts/cmake/vcpkg_get_program_files_platform_bitness.cmake b/scripts/cmake/vcpkg_get_program_files_platform_bitness.cmake new file mode 100644 index 000000000..44fba4d62 --- /dev/null +++ b/scripts/cmake/vcpkg_get_program_files_platform_bitness.cmake @@ -0,0 +1,7 @@ +function(vcpkg_get_program_files_platform_bitness ret) + if(DEFINED ENV{ProgramW6432}) + set(${ret} $ENV{ProgramW6432} PARENT_SCOPE) + else() + set(${ret} $ENV{PROGRAMFILES} PARENT_SCOPE) + endif() +endfunction() \ No newline at end of file -- cgit v1.2.3 From edec017ecec2e2a8ad57a0b5ee660b59a9479aac Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 14 Feb 2017 19:20:13 -0800 Subject: Fix download of nasm. Resolves libjpeg-turbo build error --- scripts/cmake/vcpkg_find_acquire_program.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 44e347e04..7e4f1ba9c 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -18,10 +18,10 @@ function(vcpkg_find_acquire_program VAR) set(HASH a6e685ea24376f50db5f06c5b46075f1d3be25168fa1f27fa9b02e2ac017826cee62a2b43562f9b6c989337a231ba914416c110075457764de2d11f99d5e0f26) elseif(VAR MATCHES "NASM") set(PROGNAME nasm) - set(PATHS ${DOWNLOADS}/tools/nasm/nasm-2.11.08) - set(URL "http://www.nasm.us/pub/nasm/releasebuilds/2.11.08/win32/nasm-2.11.08-win32.zip") - set(ARCHIVE "nasm-2.11.08-win32.zip") - set(HASH cd80b540530d3995d15dc636e97673f1d34f471baadf1dac993165232c61efefe7f8ec10625f8f718fc89f0dd3dcb6a4595e0cf40c5fd7cbac1b71672b644d2d) + set(PATHS ${DOWNLOADS}/tools/nasm/nasm-2.12.02) + set(URL "http://www.nasm.us/pub/nasm/releasebuilds/2.12.02/win32/nasm-2.12.02-win32.zip") + set(ARCHIVE "nasm-2.12.02-win32.zip") + set(HASH df7aaba094e17832688c88993997612a2e2c96cc3dc14ca3e8347b44c7762115f5a7fc6d7f20be402553aaa4c9e43ddfcf6228f581cfe89289bae550de151b36) elseif(VAR MATCHES "YASM") set(PROGNAME yasm) set(PATHS ${DOWNLOADS}/tools/yasm) -- cgit v1.2.3 From 03b65486536fc36889a9225fb8dc9de10f823ac6 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 15 Feb 2017 16:35:51 -0800 Subject: Use MinGit instead of PortableGit. Resolves #662 --- scripts/fetchDependency.ps1 | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'scripts') diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 8d31b0edb..1faf5b165 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -113,8 +113,11 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) function Expand-ZIPFile($file, $destination) { - Write-Host($file) - Write-Host($destination) + if (!(Test-Path $destination)) + { + New-Item -ItemType Directory -Path $destination | Out-Null + } + $shell = new-object -com shell.application $zip = $shell.NameSpace($file) foreach($item in $zip.items()) @@ -133,6 +136,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) $expectedDownloadedFileHash = "ec5e299d412e0272e01d4de5bf07718f42c96361f83d51cc39f91bf49cc3e5c3" $executableFromDownload = "$downloadsDir\cmake-3.7.2-win32-x86\bin\cmake.exe" $extractionType = $ExtractionType_ZIP + $extractionFolder = $downloadsDir } elseif($Dependency -eq "nuget") { @@ -147,14 +151,15 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) elseif($Dependency -eq "git") { $requiredVersion = "2.0.0" - $downloadVersion = "2.11.0" - $url = "https://github.com/git-for-windows/git/releases/download/v2.11.0.windows.3/PortableGit-2.11.0.3-32-bit.7z.exe" # We choose the 32-bit version - $downloadPath = "$downloadsDir\PortableGit-2.11.0.3-32-bit.7z.exe" - $expectedDownloadedFileHash = "8bf3769c37945e991903dd1b988c6b1d97bbf0f3afc9851508974f38bf94dc01" - # There is another copy of git.exe in PortableGit\bin. However, an installed version of git add the cmd dir to the PATH. + $downloadVersion = "2.11.1" + $url = "https://github.com/git-for-windows/git/releases/download/v2.11.1.windows.1/MinGit-2.11.1-32-bit.zip" # We choose the 32-bit version + $downloadPath = "$downloadsDir\MinGit-2.11.1-32-bit.zip" + $expectedDownloadedFileHash = "6ca79af09015625f350ef4ad74a75cfb001b340aec095b6963be9d45becb3bba" + # There is another copy of git.exe in MinGit\bin. However, an installed version of git add the cmd dir to the PATH. # Therefore, choosing the cmd dir here as well. - $executableFromDownload = "$downloadsDir\PortableGit\cmd\git.exe" - $extractionType = $ExtractionType_SELF_EXTRACTING_7Z + $executableFromDownload = "$downloadsDir\MinGit-2.11.1-32-bit\cmd\git.exe" + $extractionType = $ExtractionType_ZIP + $extractionFolder = "$downloadsDir\MinGit-2.11.1-32-bit" } else { @@ -188,8 +193,8 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) { if (-not (Test-Path $executableFromDownload)) # consider renaming the extraction folder to make sure the extraction finished { - # Expand-Archive $downloadPath -dest "$downloadsDir" -Force # Requires powershell 5+ - Expand-ZIPFile -File $downloadPath -Destination $downloadsDir + # Expand-Archive $downloadPath -dest "$extractionFolder" -Force # Requires powershell 5+ + Expand-ZIPFile -File $downloadPath -Destination $extractionFolder } } elseif($extractionType -eq $ExtractionType_SELF_EXTRACTING_7Z) -- cgit v1.2.3 From 66cc4eed685f586cea4c36c1088632d6bf5feb9c Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 16 Feb 2017 18:02:16 -0800 Subject: CMake: Bump version to 3.8.0 to resolve VS2017 UWP build issues --- scripts/fetchDependency.ps1 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'scripts') diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 1faf5b165..71f9e1089 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -129,12 +129,12 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) if($Dependency -eq "cmake") { - $requiredVersion = "3.7.2" - $downloadVersion = "3.7.2" - $url = "https://cmake.org/files/v3.7/cmake-3.7.2-win32-x86.zip" - $downloadPath = "$downloadsDir\cmake-3.7.2-win32-x86.zip" - $expectedDownloadedFileHash = "ec5e299d412e0272e01d4de5bf07718f42c96361f83d51cc39f91bf49cc3e5c3" - $executableFromDownload = "$downloadsDir\cmake-3.7.2-win32-x86\bin\cmake.exe" + $requiredVersion = "3.8.0" + $downloadVersion = "3.8.0" + $url = "https://cmake.org/files/v3.8/cmake-3.8.0-rc1-win32-x86.zip" + $downloadPath = "$downloadsDir\cmake-3.8.0-rc1-win32-x86.zip" + $expectedDownloadedFileHash = "ccdbd92fbfb548aa35a545e4e45ff19fd6d13c88c90370acdf940c3cf464e9c9" + $executableFromDownload = "$downloadsDir\cmake-3.8.0-rc1-win32-x86\bin\cmake.exe" $extractionType = $ExtractionType_ZIP $extractionFolder = $downloadsDir } -- cgit v1.2.3 From 7b4cae57be4e42113b70fd755988623236a95bd7 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 16 Feb 2017 18:48:14 -0800 Subject: fetchDependency.ps1: add option to override prompting for download --- scripts/fetchDependency.ps1 | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 71f9e1089..6a40c9758 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -1,8 +1,14 @@ [CmdletBinding()] param( - [string]$Dependency + [string]$Dependency, + [ValidateNotNullOrEmpty()] + [string]$downloadPromptOverride = "0" ) +$downloadPromptOverride_NO_OVERRIDE= 0 +$downloadPromptOverride_DO_NOT_PROMPT = 1 +$downloadPromptOverride_ALWAYS_PROMPT = 2 + Import-Module BitsTransfer $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition @@ -12,9 +18,13 @@ $downloadsDir = "$vcpkgRootDir\downloads" function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) { - function promptForDownload([string]$title, [string]$message, [string]$yesDescription, [string]$noDescription) + function promptForDownload([string]$title, [string]$message, [string]$yesDescription, [string]$noDescription, [string]$downloadPromptOverride) { - if ((Test-Path "$downloadsDir\AlwaysAllowEverything") -Or (Test-Path "$downloadsDir\AlwaysAllowDownloads")) + $do_not_prompt = ($downloadPromptOverride -eq $downloadPromptOverride_DO_NOT_PROMPT) -Or + (Test-Path "$downloadsDir\AlwaysAllowEverything") -Or + (Test-Path "$downloadsDir\AlwaysAllowDownloads") + + if (($downloadPromptOverride -ne $downloadPromptOverride_ALWAYS_PROMPT) -And $do_not_prompt) { return $true } @@ -57,7 +67,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) $yesDescription = "Downloads " + $Dependency + " v" + $downloadVersion +" app-locally." $noDescription = "Does not download " + $Dependency + "." - $userAllowedDownload = promptForDownload $title $message $yesDescription $noDescription + $userAllowedDownload = promptForDownload $title $message $yesDescription $noDescription $downloadPromptOverride if (!$userAllowedDownload) { throw [System.IO.FileNotFoundException] ("Could not detect suitable version of " + $Dependency + " and download not allowed") -- cgit v1.2.3 From d36b292ae2b7bfb92d7c03d6aa44bb2a74311c36 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 16 Feb 2017 19:13:10 -0800 Subject: Don't prompt for downloading nuget when finding VS instances This means bootstrap no longer prompts --- scripts/findVisualStudioInstallationInstances.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 index 9034ddfa8..8937c6fed 100644 --- a/scripts/findVisualStudioInstallationInstances.ps1 +++ b/scripts/findVisualStudioInstallationInstances.ps1 @@ -10,7 +10,7 @@ $vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root $downloadsDir = "$vcpkgRootDir\downloads" -$nugetexe = & $scriptsDir\fetchDependency.ps1 "nuget" +$nugetexe = & $scriptsDir\fetchDependency.ps1 "nuget" 1 $nugetPackageDir = "$downloadsDir\nuget-packages" $SetupAPIVersion = "1.5.125-rc" -- cgit v1.2.3 From cf537a2623efa6c892afce3301ffb98ad46a6b1e Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sun, 12 Feb 2017 22:18:09 -0800 Subject: [vcpkg] Use the Registry to find VS2015 --- scripts/findAnyMSBuildWithCppPlatformToolset.ps1 | 58 +++++++++++++++++------- 1 file changed, 42 insertions(+), 16 deletions(-) (limited to 'scripts') diff --git a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 index d160aea12..15234a2f8 100644 --- a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 +++ b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 @@ -1,34 +1,60 @@ [CmdletBinding()] param( + [Parameter(Mandatory=$False)] + [switch]$DisableVS2017 = $False, + [Parameter(Mandatory=$False)] + [switch]$DisableVS2015 = $False ) $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition -# VS2017 -$VisualStudio2017InstallationInstances = & $scriptsDir\findVisualStudioInstallationInstances.ps1 -foreach ($instance in $VisualStudio2017InstallationInstances) +if (-not $DisableVS2017) { - $VCFolder= "$instance\VC\Tools\MSVC\" - - if (Test-Path $VCFolder) + # VS2017 + $VisualStudio2017InstallationInstances = & $scriptsDir\findVisualStudioInstallationInstances.ps1 + foreach ($instance in $VisualStudio2017InstallationInstances) { - return "$instance\MSBuild\15.0\Bin\MSBuild.exe","v141" + $VCFolder= "$instance\VC\Tools\MSVC\" + + if (Test-Path $VCFolder) + { + return "$instance\MSBuild\15.0\Bin\MSBuild.exe","v141" + } } } -# VS2015 -$programFiles32 = & $scriptsDir\getProgramFiles32bit.ps1 -$programFilesP = & $scriptsDir\getProgramFilesPlatformBitness.ps1 -$CandidateProgramFiles = $programFiles32, $programFilesP -foreach ($ProgramFiles in $CandidateProgramFiles) +if (-not $DisableVS2015) { - $clExe= "$ProgramFiles\Microsoft Visual Studio 14.0\\VC\bin\cl.exe" + # Try to locate VS2015 through the Registry + try + { + # First ensure the compiler was installed (optional in 2015) + # In 64-bit systems, this is under the Wow6432Node. + try + { + $VS14InstallDir = $(gp Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\visualstudio\14.0 InstallDir -erroraction Stop | % InstallDir) + Write-Verbose "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\visualstudio\14.0 - Found" + } + catch + { + $VS14InstallDir = $(gp Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\visualstudio\14.0 InstallDir -erroraction Stop | % InstallDir) + Write-Verbose "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\visualstudio\14.0 - Found" + } + if (!(Test-Path "${VS14InstallDir}..\..\VC\bin\cl.exe")) { throw } + Write-Verbose "${VS14InstallDir}..\..\VC\bin\cl.exe - Found" - if (Test-Path $clExe) + $MSBuild14 = $(gp Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\msbuild\toolsversions\14.0 MSBuildToolsPath -erroraction Stop | % MSBuildToolsPath) + Write-Verbose "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\msbuild\toolsversions\14.0 - Found" + if (!(Test-Path "${MSBuild14}MSBuild.exe")) { throw } + Write-Verbose "${MSBuild14}MSBuild.exe - Found" + + return "${MSBuild14}MSBuild.exe","v140" + } + catch { - return "$ProgramFiles\MSBuild\14.0\Bin\MSBuild.exe","v140" + Write-Verbose "Unable to locate a VS2015 installation with C++ support" } } -throw "Could not find MSBuild with C++ support. VS2015 or above with C++ support need to be installed." \ No newline at end of file +throw "Could not find MSBuild version with C++ support. VS2015 or VS2017 (with C++) needs to be installed." \ No newline at end of file -- cgit v1.2.3 From 0dbc59da7a582612171fbc7985f71470265062b9 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 16 Feb 2017 20:00:00 -0800 Subject: Fix script for powershell in Win7 --- scripts/findAnyMSBuildWithCppPlatformToolset.ps1 | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 index 15234a2f8..72155b4f5 100644 --- a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 +++ b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 @@ -33,19 +33,28 @@ if (-not $DisableVS2015) # In 64-bit systems, this is under the Wow6432Node. try { - $VS14InstallDir = $(gp Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\visualstudio\14.0 InstallDir -erroraction Stop | % InstallDir) + $VS14InstallDir = $(gp Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\visualstudio\14.0 InstallDir -erroraction Stop | % { $_.InstallDir }) Write-Verbose "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\visualstudio\14.0 - Found" } catch { - $VS14InstallDir = $(gp Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\visualstudio\14.0 InstallDir -erroraction Stop | % InstallDir) + $VS14InstallDir = $(gp Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\visualstudio\14.0 InstallDir -erroraction Stop | % { $_.InstallDir }) Write-Verbose "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\visualstudio\14.0 - Found" } if (!(Test-Path "${VS14InstallDir}..\..\VC\bin\cl.exe")) { throw } Write-Verbose "${VS14InstallDir}..\..\VC\bin\cl.exe - Found" - $MSBuild14 = $(gp Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\msbuild\toolsversions\14.0 MSBuildToolsPath -erroraction Stop | % MSBuildToolsPath) - Write-Verbose "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\msbuild\toolsversions\14.0 - Found" + + try + { + $MSBuild14 = $(gp Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\msbuild\toolsversions\14.0 MSBuildToolsPath -erroraction Stop | % { $_.MSBuildToolsPath }) + Write-Verbose "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\msbuild\toolsversions\14.0 - Found" + } + catch + { + $MSBuild14 = $(gp Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\msbuild\toolsversions\14.0 MSBuildToolsPath -erroraction Stop | % { $_.MSBuildToolsPath }) + Write-Verbose "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\msbuild\toolsversions\14.0 - Found" + } if (!(Test-Path "${MSBuild14}MSBuild.exe")) { throw } Write-Verbose "${MSBuild14}MSBuild.exe - Found" -- cgit v1.2.3 From 9aa7c944f21b8adec37b1da04145708ff621dcd7 Mon Sep 17 00:00:00 2001 From: pravic Date: Tue, 21 Feb 2017 08:24:14 +0300 Subject: Allow to use git.cmd in addition to git.exe In respect of #682 and https://cmake.org/Bug/bug_relationship_graph.php?bug_id=9879. --- scripts/cmake/vcpkg_apply_patches.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_apply_patches.cmake b/scripts/cmake/vcpkg_apply_patches.cmake index e17d53b08..1ef138a1e 100644 --- a/scripts/cmake/vcpkg_apply_patches.cmake +++ b/scripts/cmake/vcpkg_apply_patches.cmake @@ -22,7 +22,7 @@ function(vcpkg_apply_patches) cmake_parse_arguments(_ap "QUIET" "SOURCE_PATH" "PATCHES" ${ARGN}) - find_program(GIT git) + find_program(GIT NAMES git git.cmd) set(PATCHNUM 0) foreach(PATCH ${_ap_PATCHES}) message(STATUS "Applying patch ${PATCH}") -- cgit v1.2.3 From a2cebceafec8341fcab0236a3c81a27f935aeb38 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 21 Feb 2017 17:42:39 -0800 Subject: Rename findTargetPlatformVersion to getWindowsSDK --- scripts/bootstrap.ps1 | 4 ++-- scripts/findTargetPlatformVersion.ps1 | 42 ----------------------------------- scripts/getWindowsSDK.ps1 | 42 +++++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 44 deletions(-) delete mode 100644 scripts/findTargetPlatformVersion.ps1 create mode 100644 scripts/getWindowsSDK.ps1 (limited to 'scripts') diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index 9907e31fb..fea05964b 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -26,8 +26,8 @@ try{ $msbuildExeWithPlatformToolset = & $scriptsDir\findAnyMSBuildWithCppPlatformToolset.ps1 $msbuildExe = $msbuildExeWithPlatformToolset[0] $platformToolset = $msbuildExeWithPlatformToolset[1] - $targetPlatformVersion = & $scriptsDir\findTargetPlatformVersion.ps1 - & $msbuildExe "/p:VCPKG_VERSION=-$gitHash" "/p:DISABLE_METRICS=$disableMetrics" /p:Configuration=Release /p:Platform=x86 /p:PlatformToolset=$platformToolset /p:TargetPlatformVersion=$targetPlatformVersion /m dirs.proj + $windowsSDK = & $scriptsDir\getWindowsSDK.ps1 + & $msbuildExe "/p:VCPKG_VERSION=-$gitHash" "/p:DISABLE_METRICS=$disableMetrics" /p:Configuration=Release /p:Platform=x86 /p:PlatformToolset=$platformToolset /p:TargetPlatformVersion=$windowsSDK /m dirs.proj Write-Verbose("Placing vcpkg.exe in the correct location") diff --git a/scripts/findTargetPlatformVersion.ps1 b/scripts/findTargetPlatformVersion.ps1 deleted file mode 100644 index 650e0b4ed..000000000 --- a/scripts/findTargetPlatformVersion.ps1 +++ /dev/null @@ -1,42 +0,0 @@ -[CmdletBinding()] -param( - -) - -$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition -$programFiles32 = & $scriptsDir\getProgramFiles32bit.ps1 -$programFilesP = & $scriptsDir\getProgramFilesPlatformBitness.ps1 -$CandidateProgramFiles = $programFiles32, $programFilesP - -# Windows 10 SDK -foreach ($ProgramFiles in $CandidateProgramFiles) -{ - $folder = "$ProgramFiles\Windows Kits\10\Include" - if (!(Test-Path $folder)) - { - continue - } - - $win10sdkVersions = @(Get-ChildItem $folder | Where-Object {$_.Name -match "^10"} | Sort-Object) - [array]::Reverse($win10sdkVersions) # Newest SDK first - - foreach ($win10sdkV in $win10sdkVersions) - { - if (Test-Path "$folder\$win10sdkV\um\windows.h") - { - return $win10sdkV.ToString() - } - } -} - -# Windows 8.1 SDK -foreach ($ProgramFiles in $CandidateProgramFiles) -{ - $folder = "$ProgramFiles\Windows Kits\8.1\Include" - if (Test-Path $folder) - { - return "8.1" - } -} - -throw "Could not detect a Windows SDK / TargetPlatformVersion" \ No newline at end of file diff --git a/scripts/getWindowsSDK.ps1 b/scripts/getWindowsSDK.ps1 new file mode 100644 index 000000000..650e0b4ed --- /dev/null +++ b/scripts/getWindowsSDK.ps1 @@ -0,0 +1,42 @@ +[CmdletBinding()] +param( + +) + +$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition +$programFiles32 = & $scriptsDir\getProgramFiles32bit.ps1 +$programFilesP = & $scriptsDir\getProgramFilesPlatformBitness.ps1 +$CandidateProgramFiles = $programFiles32, $programFilesP + +# Windows 10 SDK +foreach ($ProgramFiles in $CandidateProgramFiles) +{ + $folder = "$ProgramFiles\Windows Kits\10\Include" + if (!(Test-Path $folder)) + { + continue + } + + $win10sdkVersions = @(Get-ChildItem $folder | Where-Object {$_.Name -match "^10"} | Sort-Object) + [array]::Reverse($win10sdkVersions) # Newest SDK first + + foreach ($win10sdkV in $win10sdkVersions) + { + if (Test-Path "$folder\$win10sdkV\um\windows.h") + { + return $win10sdkV.ToString() + } + } +} + +# Windows 8.1 SDK +foreach ($ProgramFiles in $CandidateProgramFiles) +{ + $folder = "$ProgramFiles\Windows Kits\8.1\Include" + if (Test-Path $folder) + { + return "8.1" + } +} + +throw "Could not detect a Windows SDK / TargetPlatformVersion" \ No newline at end of file -- cgit v1.2.3 From c44c085e8ba5b3129126a9765132c1d756323c52 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 21 Feb 2017 18:09:32 -0800 Subject: Add vcpkg_get_windows_sdk.cmake --- scripts/cmake/vcpkg_common_functions.cmake | 1 + scripts/cmake/vcpkg_get_windows_sdk.cmake | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 scripts/cmake/vcpkg_get_windows_sdk.cmake (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_common_functions.cmake b/scripts/cmake/vcpkg_common_functions.cmake index 50c4ed2dc..44278ebba 100644 --- a/scripts/cmake/vcpkg_common_functions.cmake +++ b/scripts/cmake/vcpkg_common_functions.cmake @@ -16,3 +16,4 @@ include(vcpkg_copy_pdbs) include(vcpkg_copy_tool_dependencies) include(vcpkg_get_program_files_32_bit) include(vcpkg_get_program_files_platform_bitness) +include(vcpkg_get_windows_sdk) diff --git a/scripts/cmake/vcpkg_get_windows_sdk.cmake b/scripts/cmake/vcpkg_get_windows_sdk.cmake new file mode 100644 index 000000000..6dde6f0c7 --- /dev/null +++ b/scripts/cmake/vcpkg_get_windows_sdk.cmake @@ -0,0 +1,15 @@ +function(vcpkg_get_windows_sdk ret) + execute_process( + COMMAND powershell.exe ${VCPKG_ROOT_DIR}/scripts/getWindowsSDK.ps1 + OUTPUT_VARIABLE WINDOWS_SDK + RESULT_VARIABLE error_code) + + if (${error_code}) + message(FATAL_ERROR "Could not find Windows SDK") + endif() + + # Remove trailing newline + string(REGEX REPLACE "\n$" "" WINDOWS_SDK "${WINDOWS_SDK}") + + set(${ret} ${WINDOWS_SDK} PARENT_SCOPE) +endfunction() \ No newline at end of file -- cgit v1.2.3 From 4dc8f546f6a9aa3b182de33907c4c0744ca61c83 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 21 Feb 2017 19:31:52 -0800 Subject: [find/acquire python] Use 32-bit versions and bump to latest patch version --- scripts/cmake/vcpkg_find_acquire_program.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 7e4f1ba9c..da909c619 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -32,9 +32,9 @@ function(vcpkg_find_acquire_program VAR) elseif(VAR MATCHES "PYTHON3") set(PROGNAME python) set(PATHS ${DOWNLOADS}/tools/python) - set(URL "https://www.python.org/ftp/python/3.5.2/python-3.5.2-embed-amd64.zip") - set(ARCHIVE "python-3.5.2-embed-amd64.zip") - set(HASH 48bdcb6f94c993acad6782ee33ad4a07a0ea3b9b1bfcdeadf446d459a9224336837e2e7b518d54d8d99c5c3f4e9f8877ea1789cae513fa2eda2a3cad9e4dfd8f) + set(URL "https://www.python.org/ftp/python/3.5.3/python-3.5.3-embed-win32.zip") + set(ARCHIVE "python-3.5.3-embed-win32.zip") + set(HASH c8cfdc09d052dc27e4380e8e4bf0d32a4c0def7e03896c1fa6cabc26dde78bb74dbb04e3673cc36e3e307d65a1ef284d69174f0cc80008c83bc6178f192ac5cf) elseif(VAR MATCHES "PYTHON2") find_program(PYTHON2 NAMES python2 python PATHS C:/python27 ENV PYTHON) if(NOT PYTHON2 MATCHES "NOTFOUND") @@ -53,7 +53,7 @@ function(vcpkg_find_acquire_program VAR) if(PYTHON2 MATCHES "NOTFOUND") message(FATAL_ERROR "Python 2.7 was not found in the path or by searching inside C:\\Python27.\n" "There is no portable redistributable for Python 2.7, so you will need to install the MSI located at:\n" - " https://www.python.org/ftp/python/2.7.11/python-2.7.11.amd64.msi\n" + " https://www.python.org/ftp/python/2.7.13/python-2.7.13.msi\n" ) endif() elseif(VAR MATCHES "JOM") -- cgit v1.2.3 From b831a7d9ee5f97df506b14058d5fc970260d692a Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 21 Feb 2017 19:39:53 -0800 Subject: [find/acquire python] Update to v1.1.2 from v1.1.1 --- scripts/cmake/vcpkg_find_acquire_program.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index da909c619..c81779ef3 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -59,9 +59,9 @@ function(vcpkg_find_acquire_program VAR) elseif(VAR MATCHES "JOM") set(PROGNAME jom) set(PATHS ${DOWNLOADS}/tools/jom) - set(URL "http://download.qt.io/official_releases/jom/jom_1_1_1.zip") - set(ARCHIVE "jom_1_1_1.zip") - set(HASH 23a26dc7e29979bec5dcd3bfcabf76397b93ace64f5d46f2254d6420158bac5eff1c1a8454e3427e7a2fe2c233c5f2cffc87b376772399e12e40b51be2c065f4) + set(URL "http://download.qt.io/official_releases/jom/jom_1_1_2.zip") + set(ARCHIVE "jom_1_1_2.zip") + set(HASH 830cd94ed6518fbe4604a0f5a3322671b4674b87d25a71349c745500d38e85c0fac4f6995242fc5521eb048e3966bb5ec2a96a06b041343ed8da9bba78124f34) elseif(VAR MATCHES "7Z") set(PROGNAME 7z) set(PATHS "${PROGRAM_FILES_PLATFORM_BITNESS}/7-Zip" "${PROGRAM_FILES_32_BIT}/7-Zip" ${DOWNLOADS}/tools/7z/Files/7-Zip) -- cgit v1.2.3 From fa3f9dd9628ebafd3ba65fb3abde6c1d6f0448fc Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 21 Feb 2017 23:22:56 -0800 Subject: [opengl] Add -ExecutionPolicy Bypass when invoking powershell as a child process. --- scripts/cmake/vcpkg_get_windows_sdk.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_get_windows_sdk.cmake b/scripts/cmake/vcpkg_get_windows_sdk.cmake index 6dde6f0c7..7a8014eb2 100644 --- a/scripts/cmake/vcpkg_get_windows_sdk.cmake +++ b/scripts/cmake/vcpkg_get_windows_sdk.cmake @@ -1,6 +1,6 @@ function(vcpkg_get_windows_sdk ret) execute_process( - COMMAND powershell.exe ${VCPKG_ROOT_DIR}/scripts/getWindowsSDK.ps1 + COMMAND powershell.exe -ExecutionPolicy Bypass ${VCPKG_ROOT_DIR}/scripts/getWindowsSDK.ps1 OUTPUT_VARIABLE WINDOWS_SDK RESULT_VARIABLE error_code) -- cgit v1.2.3 From 42ac9bbe1e6440dd9e84b6fdd28a4f61792a73f3 Mon Sep 17 00:00:00 2001 From: Mikhail Klimenko Date: Wed, 22 Feb 2017 14:51:05 +0300 Subject: Add proxy credential support --- scripts/fetchDependency.ps1 | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'scripts') diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 6a40c9758..7c5c2a989 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -81,6 +81,14 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) if ($Dependency -ne "git") # git fails with BITS { try { + $WC = New-Object System.Net.WebClient + $ProxyAuth = !$WC.Proxy.IsBypassed($url) + If($ProxyAuth){ + $ProxyCred = Get-Credential -Message "Enter credentials for Proxy Authentication" + $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyAuthentication","Basic") + $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyCredential",$ProxyCred) + } + Start-BitsTransfer -Source $url -Destination $downloadPath -ErrorAction Stop } catch [System.Exception] { -- cgit v1.2.3 From 7dd7490468019b696859331f1f686890d8aaf556 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 23 Feb 2017 03:29:25 -0800 Subject: [vcpkg] Force JOM to be updated to 1.1.2 --- scripts/cmake/vcpkg_find_acquire_program.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index c81779ef3..d6bd34b21 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -58,7 +58,8 @@ function(vcpkg_find_acquire_program VAR) endif() elseif(VAR MATCHES "JOM") set(PROGNAME jom) - set(PATHS ${DOWNLOADS}/tools/jom) + set(SUBDIR "jom-1.1.2") + set(PATHS ${DOWNLOADS}/tools/jom/${SUBDIR}) set(URL "http://download.qt.io/official_releases/jom/jom_1_1_2.zip") set(ARCHIVE "jom_1_1_2.zip") set(HASH 830cd94ed6518fbe4604a0f5a3322671b4674b87d25a71349c745500d38e85c0fac4f6995242fc5521eb048e3966bb5ec2a96a06b041343ed8da9bba78124f34) -- cgit v1.2.3 From b5dc358d49a31269a5b0648acdaf6c015e609387 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 23 Feb 2017 15:50:28 -0800 Subject: Remove unneeded Import-Module directive --- scripts/findVisualStudioInstallationInstances.ps1 | 2 -- 1 file changed, 2 deletions(-) (limited to 'scripts') diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 index 8937c6fed..e572b6097 100644 --- a/scripts/findVisualStudioInstallationInstances.ps1 +++ b/scripts/findVisualStudioInstallationInstances.ps1 @@ -3,8 +3,6 @@ param( ) -Import-Module BitsTransfer - $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition $vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root -- cgit v1.2.3 From 6367924964403b32f7c562ababcec0ff42b17f24 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 23 Feb 2017 15:50:52 -0800 Subject: Disable Verbose-level messages for imported module --- scripts/fetchDependency.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 6a40c9758..4f1799d0b 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -9,7 +9,7 @@ $downloadPromptOverride_NO_OVERRIDE= 0 $downloadPromptOverride_DO_NOT_PROMPT = 1 $downloadPromptOverride_ALWAYS_PROMPT = 2 -Import-Module BitsTransfer +Import-Module BitsTransfer -Verbose:$false $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition $vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root -- cgit v1.2.3 From 984f710c3f4fc8a5a54a17fe7c7992ef5c7ed0ff Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 23 Feb 2017 15:57:22 -0800 Subject: Tweak Verbose messages --- scripts/findFileRecursivelyUp.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/findFileRecursivelyUp.ps1 b/scripts/findFileRecursivelyUp.ps1 index 788adbf08..4b6409e8c 100644 --- a/scripts/findFileRecursivelyUp.ps1 +++ b/scripts/findFileRecursivelyUp.ps1 @@ -11,8 +11,8 @@ $currentDir = $startingDir while (!($currentDir -eq "") -and !(Test-Path "$currentDir\$filename")) { - Write-Verbose "Examining: $currentDir" + Write-Verbose "Examining $currentDir for $filename" $currentDir = Split-path $currentDir -Parent } -Write-Verbose "Found: $currentDir" +Write-Verbose "Examining $currentDir for $filename - Found" return $currentDir \ No newline at end of file -- cgit v1.2.3 From 60e67651c32060ada2a2bfd0d52366cf91ef86cb Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 24 Feb 2017 14:30:56 -0800 Subject: Improve functions that detect ProgramFiles in powershell --- scripts/getProgramFiles32bit.ps1 | 12 +++++++++--- scripts/getProgramFilesPlatformBitness.ps1 | 12 +++++++++--- 2 files changed, 18 insertions(+), 6 deletions(-) (limited to 'scripts') diff --git a/scripts/getProgramFiles32bit.ps1 b/scripts/getProgramFiles32bit.ps1 index fd7167191..6b71915b1 100644 --- a/scripts/getProgramFiles32bit.ps1 +++ b/scripts/getProgramFiles32bit.ps1 @@ -3,9 +3,15 @@ param( ) -if (Test-Path env:PROGRAMFILES`(X86`)) +$out = ${env:PROGRAMFILES(X86)} +if ($out -eq $null) { - return ${env:PROGRAMFILES(X86)} + $out = ${env:PROGRAMFILES} } -return ${env:PROGRAMFILES} \ No newline at end of file +if ($out -eq $null) +{ + throw "Could not find [Program Files 32-bit]" +} + +return $out \ No newline at end of file diff --git a/scripts/getProgramFilesPlatformBitness.ps1 b/scripts/getProgramFilesPlatformBitness.ps1 index 6d0a513ca..2be4c1137 100644 --- a/scripts/getProgramFilesPlatformBitness.ps1 +++ b/scripts/getProgramFilesPlatformBitness.ps1 @@ -3,9 +3,15 @@ param( ) -if (Test-Path env:ProgramW6432) +$out = ${env:ProgramW6432} +if ($out -eq $null) { - return ${env:ProgramW6432} + $out = ${env:PROGRAMFILES} } -return ${env:PROGRAMFILES} \ No newline at end of file +if ($out -eq $null) +{ + throw "Could not find [Program Files Platform Bitness]" +} + +return $out \ No newline at end of file -- cgit v1.2.3 From beb1250fe486cfdd11ee003cb9a2d7faeb4bf9da Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 24 Feb 2017 15:02:10 -0800 Subject: Improve functions that detect ProgramFiles in CMake --- scripts/cmake/vcpkg_get_program_files_32_bit.cmake | 11 +++++++---- scripts/cmake/vcpkg_get_program_files_platform_bitness.cmake | 11 +++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_get_program_files_32_bit.cmake b/scripts/cmake/vcpkg_get_program_files_32_bit.cmake index 386e59c75..6f4345473 100644 --- a/scripts/cmake/vcpkg_get_program_files_32_bit.cmake +++ b/scripts/cmake/vcpkg_get_program_files_32_bit.cmake @@ -1,7 +1,10 @@ function(vcpkg_get_program_files_32_bit ret) - if(DEFINED ENV{ProgramFiles\(X86\)}) - set(${ret} $ENV{ProgramFiles\(X86\)} PARENT_SCOPE) - else() - set(${ret} $ENV{PROGRAMFILES} PARENT_SCOPE) + + set(ret_temp $ENV{ProgramFiles\(X86\)}) + if (NOT DEFINED ret_temp) + set(ret_temp $ENV{PROGRAMFILES}) endif() + + set(${ret} ${ret_temp} PARENT_SCOPE) + endfunction() \ No newline at end of file diff --git a/scripts/cmake/vcpkg_get_program_files_platform_bitness.cmake b/scripts/cmake/vcpkg_get_program_files_platform_bitness.cmake index 44fba4d62..ed51b7401 100644 --- a/scripts/cmake/vcpkg_get_program_files_platform_bitness.cmake +++ b/scripts/cmake/vcpkg_get_program_files_platform_bitness.cmake @@ -1,7 +1,10 @@ function(vcpkg_get_program_files_platform_bitness ret) - if(DEFINED ENV{ProgramW6432}) - set(${ret} $ENV{ProgramW6432} PARENT_SCOPE) - else() - set(${ret} $ENV{PROGRAMFILES} PARENT_SCOPE) + + set(ret_temp $ENV{ProgramW6432}) + if (NOT DEFINED ret_temp) + set(ret_temp $ENV{PROGRAMFILES}) endif() + + set(${ret} ${ret_temp} PARENT_SCOPE) + endfunction() \ No newline at end of file -- cgit v1.2.3 From 8f89f41a065902222b1d349fcdf307c2223ba094 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 24 Feb 2017 15:17:18 -0800 Subject: Inline variables --- scripts/getWindowsSDK.ps1 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/getWindowsSDK.ps1 b/scripts/getWindowsSDK.ps1 index 650e0b4ed..7aeb532b5 100644 --- a/scripts/getWindowsSDK.ps1 +++ b/scripts/getWindowsSDK.ps1 @@ -4,9 +4,7 @@ param( ) $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition -$programFiles32 = & $scriptsDir\getProgramFiles32bit.ps1 -$programFilesP = & $scriptsDir\getProgramFilesPlatformBitness.ps1 -$CandidateProgramFiles = $programFiles32, $programFilesP +$CandidateProgramFiles = $(& $scriptsDir\getProgramFiles32bit.ps1), $(& $scriptsDir\getProgramFilesPlatformBitness.ps1) # Windows 10 SDK foreach ($ProgramFiles in $CandidateProgramFiles) -- cgit v1.2.3 From c81edf75928e01d11bbffbec3ec549e903c37fef Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 24 Feb 2017 16:11:48 -0800 Subject: Rewrite MSBuild detection Add -Verbose messages. Look for VS2015 in Program files as well as registry --- scripts/findAnyMSBuildWithCppPlatformToolset.ps1 | 177 +++++++++++++++++------ 1 file changed, 135 insertions(+), 42 deletions(-) (limited to 'scripts') diff --git a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 index 72155b4f5..6ee368a54 100644 --- a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 +++ b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 @@ -7,63 +7,156 @@ param( [switch]$DisableVS2015 = $False ) +if ($DisableVS2017 -and $DisableVS2015) +{ + throw "Both VS2015 and VS2017 were disabled." +} + +function New-MSBuildInstance() +{ + param ($msbuildExePath, $toolsetVersion) + + $instance = new-object PSObject + $instance | add-member -type NoteProperty -Name msbuildExePath -Value $msbuildExePath + $instance | add-member -type NoteProperty -Name toolsetVersion -Value $toolsetVersion + + return $instance +} + +Write-Verbose "Executing $($MyInvocation.MyCommand.Name) with DisableVS2017=$DisableVS2017, DisableVS2015=$DisableVS2015" $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition -if (-not $DisableVS2017) +$validInstances = New-Object System.Collections.ArrayList + +# VS2017 +Write-Verbose "`n`n" +Write-Verbose "Checking for MSBuild from VS2017 instances..." +$VisualStudio2017InstallationInstances = & $scriptsDir\findVisualStudioInstallationInstances.ps1 +Write-Verbose "VS2017 Candidates: $([system.String]::Join(',', $VisualStudio2017InstallationInstances))" +foreach ($instanceCandidate in $VisualStudio2017InstallationInstances) { - # VS2017 - $VisualStudio2017InstallationInstances = & $scriptsDir\findVisualStudioInstallationInstances.ps1 - foreach ($instance in $VisualStudio2017InstallationInstances) + $VCFolder= "$instanceCandidate\VC\Tools\MSVC\" + + if (Test-Path $VCFolder) { - $VCFolder= "$instance\VC\Tools\MSVC\" + $instance = New-MSBuildInstance "$instanceCandidate\MSBuild\15.0\Bin\MSBuild.exe" "v141" + Write-Verbose "Found $instance" + $validInstances.Add($instance) > $null + } +} - if (Test-Path $VCFolder) - { - return "$instance\MSBuild\15.0\Bin\MSBuild.exe","v141" - } +# VS2015 - in Program Files +Write-Verbose "`n`n" +Write-Verbose "Checking for MSBuild from VS2015 in Program Files..." +$CandidateProgramFiles = $(& $scriptsDir\getProgramFiles32bit.ps1), $(& $scriptsDir\getProgramFilesPlatformBitness.ps1) +Write-Verbose "Program Files Candidate locations: $([system.String]::Join(',', $CandidateProgramFiles))" +foreach ($ProgramFiles in $CandidateProgramFiles) +{ + $clExe= "$ProgramFiles\Microsoft Visual Studio 14.0\VC\bin\cl.exe" + + if (Test-Path $clExe) + { + $instance = New-MSBuildInstance "$ProgramFiles\MSBuild\14.0\Bin\MSBuild.exe" "v140" + Write-Verbose "Found $instance" + $validInstances.Add($instance) > $null } } -if (-not $DisableVS2015) +# VS2015 - through the registry +function NewCppRegistryPair() +{ + param ($visualStudioEntry, $msBuildEntry) + + $instance = new-object PSObject + $instance | add-member -type NoteProperty -Name visualStudioEntry -Value $visualStudioEntry + $instance | add-member -type NoteProperty -Name msBuildEntry -Value $msBuildEntry + + return $instance +} + +Write-Verbose "`n`n" +Write-Verbose "Checking for MSBuild from VS2015 through the registry..." + +$registryPairs = +$(NewCppRegistryPair "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\visualstudio\14.0" "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\msbuild\toolsversions\14.0"), +$(NewCppRegistryPair "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\visualstudio\14.0" "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\msbuild\toolsversions\14.0") + +foreach ($pair in $registryPairs) { - # Try to locate VS2015 through the Registry + $vsEntry = $pair.visualStudioEntry + Write-Verbose "$vsEntry - Checking" + try + { + $VS14InstallDir = $(gp $vsEntry InstallDir -erroraction Stop | % { $_.InstallDir }) + Write-Verbose "$vsEntry - Found" + } + catch + { + Write-Verbose "$vsEntry - Not Found" + continue + } + + Write-Verbose "$VS14InstallDir - Obtained from registry" + # We want "${VS14InstallDir}..\..\VC\bin\cl.exe" + # Doing Split-path to avoid the ..\.. from appearing in the output + $clExePath = Split-path $VS14InstallDir -Parent + $clExePath = Split-path $clExePath -Parent + $clExePath = "$clExePath\VC\bin\cl.exe" + + if (!(Test-Path $clExePath)) + { + Write-Verbose "$clExePath - Not Found" + continue + } + + Write-Verbose "$clExePath - Found" + + $msbuildEntry = $pair.msBuildEntry + Write-Verbose "$msbuildEntry - Checking" try { - # First ensure the compiler was installed (optional in 2015) - # In 64-bit systems, this is under the Wow6432Node. - try - { - $VS14InstallDir = $(gp Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\visualstudio\14.0 InstallDir -erroraction Stop | % { $_.InstallDir }) - Write-Verbose "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\visualstudio\14.0 - Found" - } - catch - { - $VS14InstallDir = $(gp Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\visualstudio\14.0 InstallDir -erroraction Stop | % { $_.InstallDir }) - Write-Verbose "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\visualstudio\14.0 - Found" - } - if (!(Test-Path "${VS14InstallDir}..\..\VC\bin\cl.exe")) { throw } - Write-Verbose "${VS14InstallDir}..\..\VC\bin\cl.exe - Found" - - - try - { - $MSBuild14 = $(gp Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\msbuild\toolsversions\14.0 MSBuildToolsPath -erroraction Stop | % { $_.MSBuildToolsPath }) - Write-Verbose "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\msbuild\toolsversions\14.0 - Found" - } - catch - { - $MSBuild14 = $(gp Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\msbuild\toolsversions\14.0 MSBuildToolsPath -erroraction Stop | % { $_.MSBuildToolsPath }) - Write-Verbose "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\msbuild\toolsversions\14.0 - Found" - } - if (!(Test-Path "${MSBuild14}MSBuild.exe")) { throw } - Write-Verbose "${MSBuild14}MSBuild.exe - Found" - - return "${MSBuild14}MSBuild.exe","v140" + $MSBuild14 = $(gp $msbuildEntry MSBuildToolsPath -erroraction Stop | % { $_.MSBuildToolsPath }) + Write-Verbose "$msbuildEntry - Found" } catch { - Write-Verbose "Unable to locate a VS2015 installation with C++ support" + Write-Verbose "$msbuildEntry - Not Found" + continue + } + + Write-Verbose "${MSBuild14} - Obtained from registry" + $msbuildPath = "${MSBuild14}MSBuild.exe" + if (!(Test-Path $msbuildPath)) + { + Write-Verbose "$msbuildPath - Not Found" + continue } + + $instance = New-MSBuildInstance $msbuildPath "v140" + Write-Verbose "Found $instance" + $validInstances.Add($instance) > $null } +Write-Verbose "`n`n`n" +Write-Verbose "The following MSBuild instances were found:" +foreach ($instance in $validInstances) +{ + Write-Verbose $instance +} + +# Selecting +foreach ($instance in $validInstances) +{ + if (!$DisableVS2017 -and $instance.toolsetVersion -eq "v141") + { + return $instance.msbuildExePath, $instance.toolsetVersion + } + + if (!$DisableVS2015 -and $instance.toolsetVersion -eq "v140") + { + return $instance.msbuildExePath, $instance.toolsetVersion + } +} + + throw "Could not find MSBuild version with C++ support. VS2015 or VS2017 (with C++) needs to be installed." \ No newline at end of file -- cgit v1.2.3 From 789f26c741b1a02d4fc2a6ed5a3910b2853f6e3a Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 24 Feb 2017 16:27:53 -0800 Subject: Rewrite WindowsSDK detection --- scripts/getWindowsSDK.ps1 | 65 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 61 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/getWindowsSDK.ps1 b/scripts/getWindowsSDK.ps1 index 7aeb532b5..cc2188653 100644 --- a/scripts/getWindowsSDK.ps1 +++ b/scripts/getWindowsSDK.ps1 @@ -1,39 +1,96 @@ [CmdletBinding()] param( + [Parameter(Mandatory=$False)] + [switch]$DisableWin10SDK = $False, + [Parameter(Mandatory=$False)] + [switch]$DisableWin81SDK = $False ) +if ($DisableWin10SDK -and $DisableWin81SDK) +{ + throw "Both Win10SDK and Win81SDK were disabled." +} + +Write-Verbose "Executing $($MyInvocation.MyCommand.Name)" $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition + +$validInstances = New-Object System.Collections.ArrayList + $CandidateProgramFiles = $(& $scriptsDir\getProgramFiles32bit.ps1), $(& $scriptsDir\getProgramFilesPlatformBitness.ps1) +Write-Verbose "Program Files Candidate locations: $([system.String]::Join(',', $CandidateProgramFiles))" # Windows 10 SDK +Write-Verbose "`n" +Write-Verbose "Looking for Windows 10 SDK" foreach ($ProgramFiles in $CandidateProgramFiles) { $folder = "$ProgramFiles\Windows Kits\10\Include" + Write-Verbose "$folder - Checking" if (!(Test-Path $folder)) { + Write-Verbose "$folder - Not Found" continue } + Write-Verbose "$folder - Found" $win10sdkVersions = @(Get-ChildItem $folder | Where-Object {$_.Name -match "^10"} | Sort-Object) [array]::Reverse($win10sdkVersions) # Newest SDK first foreach ($win10sdkV in $win10sdkVersions) { - if (Test-Path "$folder\$win10sdkV\um\windows.h") + $windowsheader = "$folder\$win10sdkV\um\windows.h" + Write-Verbose "$windowsheader - Checking" + if (!(Test-Path $windowsheader)) { - return $win10sdkV.ToString() + Write-Verbose "$windowsheader - Not Found" + continue } + + Write-Verbose "$windowsheader - Found" + $win10sdkVersionString = $win10sdkV.ToString() + Write-Verbose "Found $win10sdkVersionString" + $validInstances.Add($win10sdkVersionString) > $null } } # Windows 8.1 SDK +Write-Verbose "`n" +Write-Verbose "Looking for Windows 8.1 SDK" foreach ($ProgramFiles in $CandidateProgramFiles) { $folder = "$ProgramFiles\Windows Kits\8.1\Include" - if (Test-Path $folder) + Write-Verbose "$folder - Checking" + if (!(Test-Path $folder)) + { + Write-Verbose "$folder - Not Found" + continue + } + + Write-Verbose "$folder - Found" + $win81sdkVersionString = "8.1" + Write-Verbose "Found $win81sdkVersionString" + $validInstances.Add($win81sdkVersionString) > $null +} + +Write-Verbose "`n`n`n" +Write-Verbose "The following Windows SDKs were found:" +foreach ($instance in $validInstances) +{ + Write-Verbose $instance +} + +# Selecting +foreach ($instance in $validInstances) +{ + if (!$DisableWin10SDK -and $instance -match "10.") + { + return $instance + } + + if (!$DisableWin81SDK -and $instance -match "8.1") { - return "8.1" + return $instance } } -- cgit v1.2.3 From 58002f62392f15a42a8b30352aa007bbd82e74a9 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 24 Feb 2017 16:36:10 -0800 Subject: Tweak -Verbose messages --- scripts/findAnyMSBuildWithCppPlatformToolset.ps1 | 14 ++++++++------ scripts/getWindowsSDK.ps1 | 3 --- 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'scripts') diff --git a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 index 6ee368a54..f1ef1ae6b 100644 --- a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 +++ b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 @@ -54,12 +54,16 @@ foreach ($ProgramFiles in $CandidateProgramFiles) { $clExe= "$ProgramFiles\Microsoft Visual Studio 14.0\VC\bin\cl.exe" - if (Test-Path $clExe) + if (!(Test-Path $clExe)) { - $instance = New-MSBuildInstance "$ProgramFiles\MSBuild\14.0\Bin\MSBuild.exe" "v140" - Write-Verbose "Found $instance" - $validInstances.Add($instance) > $null + Write-Verbose "$clExe - Not Found" + continue } + + Write-Verbose "$clExe - Found" + $instance = New-MSBuildInstance "$ProgramFiles\MSBuild\14.0\Bin\MSBuild.exe" "v140" + Write-Verbose "Found $instance" + $validInstances.Add($instance) > $null } # VS2015 - through the registry @@ -84,7 +88,6 @@ $(NewCppRegistryPair "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\visualstud foreach ($pair in $registryPairs) { $vsEntry = $pair.visualStudioEntry - Write-Verbose "$vsEntry - Checking" try { $VS14InstallDir = $(gp $vsEntry InstallDir -erroraction Stop | % { $_.InstallDir }) @@ -112,7 +115,6 @@ foreach ($pair in $registryPairs) Write-Verbose "$clExePath - Found" $msbuildEntry = $pair.msBuildEntry - Write-Verbose "$msbuildEntry - Checking" try { $MSBuild14 = $(gp $msbuildEntry MSBuildToolsPath -erroraction Stop | % { $_.MSBuildToolsPath }) diff --git a/scripts/getWindowsSDK.ps1 b/scripts/getWindowsSDK.ps1 index cc2188653..90ca1b06b 100644 --- a/scripts/getWindowsSDK.ps1 +++ b/scripts/getWindowsSDK.ps1 @@ -26,7 +26,6 @@ Write-Verbose "Looking for Windows 10 SDK" foreach ($ProgramFiles in $CandidateProgramFiles) { $folder = "$ProgramFiles\Windows Kits\10\Include" - Write-Verbose "$folder - Checking" if (!(Test-Path $folder)) { Write-Verbose "$folder - Not Found" @@ -40,7 +39,6 @@ foreach ($ProgramFiles in $CandidateProgramFiles) foreach ($win10sdkV in $win10sdkVersions) { $windowsheader = "$folder\$win10sdkV\um\windows.h" - Write-Verbose "$windowsheader - Checking" if (!(Test-Path $windowsheader)) { Write-Verbose "$windowsheader - Not Found" @@ -60,7 +58,6 @@ Write-Verbose "Looking for Windows 8.1 SDK" foreach ($ProgramFiles in $CandidateProgramFiles) { $folder = "$ProgramFiles\Windows Kits\8.1\Include" - Write-Verbose "$folder - Checking" if (!(Test-Path $folder)) { Write-Verbose "$folder - Not Found" -- cgit v1.2.3 From 2f8d8d8b18f8a6dd7dad6e3290074dc6044395ce Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 2 Mar 2017 07:29:00 -0800 Subject: [ffmpeg] Initial commit of version 3.2.4 --- scripts/cmake/vcpkg_acquire_msys.cmake | 30 ++++++++++++++++++++++++++++++ scripts/cmake/vcpkg_common_functions.cmake | 3 ++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 scripts/cmake/vcpkg_acquire_msys.cmake (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_acquire_msys.cmake b/scripts/cmake/vcpkg_acquire_msys.cmake new file mode 100644 index 000000000..20e249c8b --- /dev/null +++ b/scripts/cmake/vcpkg_acquire_msys.cmake @@ -0,0 +1,30 @@ +function(vcpkg_acquire_msys PATH_TO_ROOT_OUT) + set(TOOLPATH ${DOWNLOADS}/tools/msys2) + set(TOOLSUBPATH msys32) + set(URL "https://sourceforge.net/projects/msys2/files/Base/i686/msys2-base-i686-20161025.tar.xz/download") + set(ARCHIVE "msys2-base-i686-20161025.tar.xz") + set(HASH c9260a38e0c6bf963adeaea098c4e376449c1dd0afe07480741d6583a1ac4c138951ccb0c5388bd148e04255a5c1a23bf5ee2d58dcd6607c14f1eaa5639a7c85) + + set(PATH_TO_ROOT ${TOOLPATH}/${TOOLSUBPATH}) + + if(NOT EXISTS "${TOOLPATH}/initialized-msys2.stamp") + message(STATUS "Acquiring MSYS2...") + file(DOWNLOAD ${URL} ${DOWNLOADS}/${ARCHIVE} + EXPECTED_HASH SHA512=${HASH} + ) + file(REMOVE_RECURSE ${TOOLPATH}) + file(MAKE_DIRECTORY ${TOOLPATH}) + execute_process( + COMMAND ${CMAKE_COMMAND} -E tar xzf ${DOWNLOADS}/${ARCHIVE} + WORKING_DIRECTORY ${TOOLPATH} + ) + execute_process( + COMMAND ${PATH_TO_ROOT}/usr/bin/bash.exe --noprofile --norc -c "PATH=/usr/bin:\$PATH;pacman-key --init;pacman-key --populate" + WORKING_DIRECTORY ${TOOLPATH} + ) + file(WRITE "${TOOLPATH}/initialized-msys2.stamp" "0") + message(STATUS "Acquiring MSYS2... OK") + endif() + + set(${PATH_TO_ROOT_OUT} ${PATH_TO_ROOT} PARENT_SCOPE) +endfunction() \ No newline at end of file diff --git a/scripts/cmake/vcpkg_common_functions.cmake b/scripts/cmake/vcpkg_common_functions.cmake index 44278ebba..a003548d5 100644 --- a/scripts/cmake/vcpkg_common_functions.cmake +++ b/scripts/cmake/vcpkg_common_functions.cmake @@ -1,3 +1,4 @@ +include(vcpkg_acquire_msys) include(vcpkg_download_distfile) include(vcpkg_extract_source_archive) include(vcpkg_execute_required_process) @@ -16,4 +17,4 @@ include(vcpkg_copy_pdbs) include(vcpkg_copy_tool_dependencies) include(vcpkg_get_program_files_32_bit) include(vcpkg_get_program_files_platform_bitness) -include(vcpkg_get_windows_sdk) +include(vcpkg_get_windows_sdk) \ No newline at end of file -- cgit v1.2.3 From c2a368976dcd42640290a6ef30c5a4fc8a4a825d Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 3 Mar 2017 19:00:48 -0800 Subject: Add policy: NoDebugBinaries --- scripts/ports.cmake | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scripts') diff --git a/scripts/ports.cmake b/scripts/ports.cmake index c03b005ea..dbc547676 100644 --- a/scripts/ports.cmake +++ b/scripts/ports.cmake @@ -82,6 +82,9 @@ if(CMD MATCHES "^BUILD$") if (DEFINED VCPKG_POLICY_EMPTY_PACKAGE) file(APPEND ${BUILD_INFO_FILE_PATH} "PolicyEmptyPackage: ${VCPKG_POLICY_EMPTY_PACKAGE}\n") endif() + if (DEFINED VCPKG_POLICY_NO_DEBUG_BINARIES) + file(APPEND ${BUILD_INFO_FILE_PATH} "PolicyNoDebugBinaries: ${VCPKG_POLICY_NO_DEBUG_BINARIES}\n") + endif() elseif(CMD MATCHES "^CREATE$") file(TO_NATIVE_PATH ${VCPKG_ROOT_DIR} NATIVE_VCPKG_ROOT_DIR) file(TO_NATIVE_PATH ${DOWNLOADS} NATIVE_DOWNLOADS) -- cgit v1.2.3 From b03b578ffc27a9f0d4d9c7a8edc8edeea487dce3 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 3 Mar 2017 19:09:24 -0800 Subject: Rename policy to OnlyReleaseCRT --- scripts/ports.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/ports.cmake b/scripts/ports.cmake index dbc547676..e83b83d88 100644 --- a/scripts/ports.cmake +++ b/scripts/ports.cmake @@ -82,8 +82,8 @@ if(CMD MATCHES "^BUILD$") if (DEFINED VCPKG_POLICY_EMPTY_PACKAGE) file(APPEND ${BUILD_INFO_FILE_PATH} "PolicyEmptyPackage: ${VCPKG_POLICY_EMPTY_PACKAGE}\n") endif() - if (DEFINED VCPKG_POLICY_NO_DEBUG_BINARIES) - file(APPEND ${BUILD_INFO_FILE_PATH} "PolicyNoDebugBinaries: ${VCPKG_POLICY_NO_DEBUG_BINARIES}\n") + if (DEFINED VCPKG_POLICY_ONLY_RELEASE_CRT) + file(APPEND ${BUILD_INFO_FILE_PATH} "PolicyOnlyReleaseCRT: ${VCPKG_POLICY_ONLY_RELEASE_CRT}\n") endif() elseif(CMD MATCHES "^CREATE$") file(TO_NATIVE_PATH ${VCPKG_ROOT_DIR} NATIVE_VCPKG_ROOT_DIR) -- cgit v1.2.3 From 883b865f8e8e15877b83f22797ed347ad36beeb1 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 6 Mar 2017 10:35:03 -0800 Subject: [vcpkg-configure-cmake] Alwasy set CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP to TRUE --- scripts/cmake/vcpkg_configure_cmake.cmake | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 85a67a401..daf9dfd6f 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -65,6 +65,9 @@ function(vcpkg_configure_cmake) "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DBoost_COMPILER=-vc140" + "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" + "-DCMAKE_VERBOSE_MAKEFILE=ON" + "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TRIPLET_FILE}" ) if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL dynamic) list(APPEND _csc_OPTIONS_DEBUG @@ -95,9 +98,7 @@ function(vcpkg_configure_cmake) vcpkg_execute_required_process( COMMAND ${CMAKE_COMMAND} ${_csc_SOURCE_PATH} ${_csc_OPTIONS} ${_csc_OPTIONS_RELEASE} -G ${GENERATOR} - -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Release - -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TRIPLET_FILE} -DCMAKE_PREFIX_PATH=${CURRENT_INSTALLED_DIR} -DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel @@ -110,9 +111,7 @@ function(vcpkg_configure_cmake) vcpkg_execute_required_process( COMMAND ${CMAKE_COMMAND} ${_csc_SOURCE_PATH} ${_csc_OPTIONS} ${_csc_OPTIONS_DEBUG} -G ${GENERATOR} - -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Debug - -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TRIPLET_FILE} -DCMAKE_PREFIX_PATH=${CURRENT_INSTALLED_DIR}/debug\\\\\\\;${CURRENT_INSTALLED_DIR} -DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}/debug WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg -- cgit v1.2.3 From bfa5812a6bd9dd108317491111bbdb68d4d2c9a8 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 10 Mar 2017 14:10:14 -0800 Subject: Update version of VS SetupAPI nuget package --- scripts/findVisualStudioInstallationInstances.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 index e572b6097..0f685c6a9 100644 --- a/scripts/findVisualStudioInstallationInstances.ps1 +++ b/scripts/findVisualStudioInstallationInstances.ps1 @@ -11,7 +11,7 @@ $downloadsDir = "$vcpkgRootDir\downloads" $nugetexe = & $scriptsDir\fetchDependency.ps1 "nuget" 1 $nugetPackageDir = "$downloadsDir\nuget-packages" -$SetupAPIVersion = "1.5.125-rc" +$SetupAPIVersion = "1.8.24" $nugetOutput = & $nugetexe install Microsoft.VisualStudio.Setup.Configuration.Native -Version $SetupAPIVersion -OutputDirectory $nugetPackageDir -Source "https://api.nuget.org/v3/index.json" -nocache 2>&1 $SetupConsoleExe = "$nugetPackageDir\Microsoft.VisualStudio.Setup.Configuration.Native.$SetupAPIVersion\tools\x86\Microsoft.VisualStudio.Setup.Configuration.Console.exe" -- cgit v1.2.3 From a2a558bd0359f9bbc8be713315a00c948c4d77bd Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 11 Mar 2017 19:08:16 -0800 Subject: [vcpkg] Fix regression in 7b14894d. Fixes #772. --- scripts/fetchDependency.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 712993ca5..3c98f7247 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -232,7 +232,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) throw [System.IO.FileNotFoundException] ("Could not detect or download " + $Dependency) } - return $downloadPath + return $executableFromDownload } SelectProgram $Dependency \ No newline at end of file -- cgit v1.2.3