diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/bootstrap.ps1 | 14 | ||||
| -rw-r--r-- | scripts/buildsystems/vcpkg.cmake | 4 | ||||
| -rw-r--r-- | scripts/cmake/vcpkg_acquire_msys.cmake | 8 | ||||
| -rw-r--r-- | scripts/cmake/vcpkg_build_cmake.cmake | 6 | ||||
| -rw-r--r-- | scripts/cmake/vcpkg_configure_meson.cmake | 2 | ||||
| -rw-r--r-- | scripts/cmake/vcpkg_find_acquire_program.cmake | 10 | ||||
| -rw-r--r-- | scripts/cmake/vcpkg_from_github.cmake | 2 |
7 files changed, 31 insertions, 15 deletions
diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index 07a9fcbaa..b195cc605 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -339,10 +339,9 @@ if ($disableMetrics) $platform = "x86" $vcpkgReleaseDir = "$vcpkgSourcesPath\msbuild.x86.release" - +$architecture=(Get-WmiObject win32_operatingsystem | Select-Object osarchitecture).osarchitecture if ($win64) { - $architecture=(Get-WmiObject win32_operatingsystem | Select-Object osarchitecture).osarchitecture if (-not $architecture -like "*64*") { throw "Cannot build 64-bit on non-64-bit system" @@ -352,6 +351,15 @@ if ($win64) $vcpkgReleaseDir = "$vcpkgSourcesPath\msbuild.x64.release" } +if ($architecture -like "*64*") +{ + $PreferredToolArchitecture = "x64" +} +else +{ + $PreferredToolArchitecture = "x86" +} + $arguments = ( "`"/p:VCPKG_VERSION=-nohash`"", "`"/p:DISABLE_METRICS=$disableMetricsValue`"", @@ -359,7 +367,7 @@ $arguments = ( "/p:Platform=$platform", "/p:PlatformToolset=$platformToolset", "/p:TargetPlatformVersion=$windowsSDK", -"/p:PreferredToolArchitecture=x64", +"/p:PreferredToolArchitecture=$PreferredToolArchitecture", "/verbosity:minimal", "/m", "/nologo", diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 2844db884..f657e2710 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -107,7 +107,7 @@ if(NOT EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" AND NOT _CMAKE_I message(WARNING "There are no libraries installed for the Vcpkg triplet ${VCPKG_TARGET_TRIPLET}.") endif() -if(CMAKE_BUILD_TYPE MATCHES "^Debug$" OR NOT DEFINED CMAKE_BUILD_TYPE) #Debug build: Put Debug paths before Release paths. +if(CMAKE_BUILD_TYPE MATCHES "^[Dd][Ee][Bb][Uu][Gg]$" OR NOT DEFINED CMAKE_BUILD_TYPE) #Debug build: Put Debug paths before Release paths. list(APPEND CMAKE_PREFIX_PATH ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} ) @@ -171,7 +171,7 @@ function(add_executable name) list(FIND ARGV "ALIAS" ALIAS_IDX) list(FIND ARGV "MACOSX_BUNDLE" MACOSX_BUNDLE_IDX) if(IMPORTED_IDX EQUAL -1 AND ALIAS_IDX EQUAL -1) - if(VCPKG_APPLOCAL_DEPS) + if(VCPKG_APPLOCAL_DEPS) if(_VCPKG_TARGET_TRIPLET_PLAT MATCHES "windows|uwp") add_custom_command(TARGET ${name} POST_BUILD COMMAND powershell -noprofile -executionpolicy Bypass -file ${_VCPKG_TOOLCHAIN_DIR}/msbuild/applocal.ps1 diff --git a/scripts/cmake/vcpkg_acquire_msys.cmake b/scripts/cmake/vcpkg_acquire_msys.cmake index adbd58ca5..09090db68 100644 --- a/scripts/cmake/vcpkg_acquire_msys.cmake +++ b/scripts/cmake/vcpkg_acquire_msys.cmake @@ -113,5 +113,13 @@ function(vcpkg_acquire_msys PATH_TO_ROOT_OUT) message(STATUS "Acquiring MSYS Packages... OK") endif() + # Deal with a stale process created by MSYS + if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + vcpkg_execute_required_process( + COMMAND TASKKILL /F /IM gpg-agent.exe /fi "memusage gt 2" + WORKING_DIRECTORY ${SOURCE_PATH} + ) + endif() + set(${PATH_TO_ROOT_OUT} ${PATH_TO_ROOT} PARENT_SCOPE) endfunction() diff --git a/scripts/cmake/vcpkg_build_cmake.cmake b/scripts/cmake/vcpkg_build_cmake.cmake index e86632c7e..3db6597b4 100644 --- a/scripts/cmake/vcpkg_build_cmake.cmake +++ b/scripts/cmake/vcpkg_build_cmake.cmake @@ -162,14 +162,14 @@ function(vcpkg_build_cmake) endif() endwhile() endif() - elseif(out_contents MATCHES "mt : general error c101008d: ") + elseif(out_contents MATCHES "mt : general error c101008d: " OR out_contents MATCHES "mt.exe : general error c101008d: ") # Antivirus workaround - occasionally files are locked and cause mt.exe to fail set(ITERATION 0) - while (ITERATION LESS 3 AND out_contents MATCHES "mt : general error c101008d: ") + while (ITERATION LESS 3 AND (out_contents MATCHES "mt : general error c101008d: " OR out_contents MATCHES "mt.exe : general error c101008d: ")) MATH(EXPR ITERATION "${ITERATION}+1") message(STATUS "Restarting Build ${TARGET_TRIPLET}-${SHORT_BUILDTYPE} because of mt.exe file locking issue. Iteration: ${ITERATION}") execute_process( - COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG} ${TARGET_PARAM} -- ${BUILD_ARGS} + COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG} ${TARGET_PARAM} -- ${BUILD_ARGS} ${PARALLEL_ARG} OUTPUT_FILE "${LOGPREFIX}-out-${ITERATION}.log" ERROR_FILE "${LOGPREFIX}-err-${ITERATION}.log" RESULT_VARIABLE error_code diff --git a/scripts/cmake/vcpkg_configure_meson.cmake b/scripts/cmake/vcpkg_configure_meson.cmake index 3c6903c9d..f1ae0e65f 100644 --- a/scripts/cmake/vcpkg_configure_meson.cmake +++ b/scripts/cmake/vcpkg_configure_meson.cmake @@ -26,7 +26,7 @@ function(vcpkg_configure_meson) 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) + list(APPEND _vcm_OPTIONS --buildtype plain --backend ninja --wrap-mode nodownload) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) list(APPEND _vcm_OPTIONS --default-library shared) else() diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index d5e95eb4b..4a77b4b8e 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -202,9 +202,9 @@ function(vcpkg_find_acquire_program VAR) set(REQUIRED_INTERPRETER PERL) set(SCRIPTNAME "gas-preprocessor.pl") set(PATHS ${DOWNLOADS}/tools/gas-preprocessor) - set(URL "https://raw.githubusercontent.com/FFmpeg/gas-preprocessor/36bacb4cba27003c572e5bf7a9c4dfe3c9a8d40d/gas-preprocessor.pl") + set(URL "https://raw.githubusercontent.com/FFmpeg/gas-preprocessor/cbe88474ec196370161032a3863ec65050f70ba4/gas-preprocessor.pl") set(ARCHIVE "gas-preprocessor.pl") - set(HASH a25caadccd1457a0fd2abb5a0da9aca1713b2c351d76daf87a4141e52021f51aa09e95a62942c6f0764f79cc1fa65bf71584955b09e62ee7da067b5c82baf6b3) + set(HASH f6965875608bf2a3ee337e00c3f16e06cd9b5d10013da600d2a70887e47a7b4668af87b3524acf73dd122475712af831495a613a2128c1adb5fe0b4a11d96cd3) elseif(VAR MATCHES "DARK") set(PROGNAME dark) set(SUBDIR "wix311-binaries") @@ -223,9 +223,9 @@ function(vcpkg_find_acquire_program VAR) elseif(VAR MATCHES "DOXYGEN") set(PROGNAME doxygen) set(PATHS ${DOWNLOADS}/tools/doxygen) - set(URL "http://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.14.windows.bin.zip") - set(ARCHIVE "doxygen-1.8.14.windows.bin.zip") - set(HASH d0d706501e7112045b1f401f22d12a2c8d9b7728edee9ad1975a17dff914c16494ae48a70beab6f6304643779935843f268c7afed3b9da7d403b5cb11cac0c50) + set(URL "http://doxygen.nl/files/doxygen-1.8.15.windows.bin.zip") + set(ARCHIVE "doxygen-1.8.15.windows.bin.zip") + set(HASH 89482dcb1863d381d47812c985593e736d703931d49994e09c7c03ef67e064115d0222b8de1563a7930404c9bc2d3be323f3d13a01ef18861be584db3d5a953c) # Download Tools elseif(VAR MATCHES "ARIA2") set(PROGNAME aria2c) diff --git a/scripts/cmake/vcpkg_from_github.cmake b/scripts/cmake/vcpkg_from_github.cmake index 48bfd828a..c0d657bbc 100644 --- a/scripts/cmake/vcpkg_from_github.cmake +++ b/scripts/cmake/vcpkg_from_github.cmake @@ -161,7 +161,7 @@ function(vcpkg_from_github) # Parse the github refs response with regex. # TODO: use some JSON swiss-army-knife utility instead. - file(READ "${ARCHIVE_VERSION}" _contents) + file(READ "${downloaded_file_path}.version" _contents) string(REGEX MATCH "\"sha\": \"[a-f0-9]+\"" x "${_contents}") string(REGEX REPLACE "\"sha\": \"([a-f0-9]+)\"" "\\1" _version ${x}) |
