aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/VcpkgPowershellUtils.ps123
-rw-r--r--scripts/cmake/vcpkg_find_acquire_program.cmake8
-rw-r--r--scripts/fetchDependency.ps15
3 files changed, 26 insertions, 10 deletions
diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1
index 12eacec96..0b1a35262 100644
--- a/scripts/VcpkgPowershellUtils.ps1
+++ b/scripts/VcpkgPowershellUtils.ps1
@@ -141,11 +141,13 @@ function vcpkgDownloadFile( [Parameter(Mandatory=$true)][string]$url,
}
function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$file,
- [Parameter(Mandatory=$true)][string]$destination)
+ [Parameter(Mandatory=$true)][string]$destinationDir)
{
- vcpkgCreateDirectory $destination
- $baseName = (Get-ChildItem .\downloads\cmake-3.9.5-win32-x86.zip).BaseName
- $destinationPartial = "$destination\$baseName-partially_extracted"
+ $parentPath = split-path -parent $destinationDir
+ vcpkgCreateDirectory $parentPath
+ $baseName = (Get-ChildItem $file).BaseName
+ $destinationPartial = "$destinationDir\$baseName-partially_extracted"
+
vcpkgRemoveDirectory $destinationPartial
vcpkgCreateDirectory $destinationPartial
@@ -171,8 +173,17 @@ function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$file,
}
}
- Move-Item -Path "$destinationPartial\*" -Destination $destination
- vcpkgRemoveDirectory $destinationPartial
+ $hasASingleItem = (Get-ChildItem $destinationPartial | Measure-Object).Count -eq 1;
+
+ if ($hasASingleItem)
+ {
+ Move-Item -Path "$destinationPartial\*" -Destination $destinationDir
+ vcpkgRemoveDirectory $destinationPartial
+ }
+ else
+ {
+ Rename-Item -Path $destinationPartial -NewName $baseName
+ }
}
function vcpkgInvokeCommand()
diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake
index e6a37e328..066126e6c 100644
--- a/scripts/cmake/vcpkg_find_acquire_program.cmake
+++ b/scripts/cmake/vcpkg_find_acquire_program.cmake
@@ -148,6 +148,14 @@ function(vcpkg_find_acquire_program VAR)
set(URL "https://github.com/wixtoolset/wix3/releases/download/wix311rtm/wix311-binaries.zip")
set(ARCHIVE "wix311-binaries.zip")
set(HASH 74f0fa29b5991ca655e34a9d1000d47d4272e071113fada86727ee943d913177ae96dc3d435eaf494d2158f37560cd4c2c5274176946ebdb17bf2354ced1c516)
+ elseif(VAR MATCHES "SCONS")
+ set(PROGNAME scons)
+ set(REQUIRED_INTERPRETER PYTHON2)
+ set(SCRIPTNAME "scons.py")
+ set(PATHS ${DOWNLOADS}/tools/scons)
+ set(URL "https://sourceforge.net/projects/scons/files/scons-local-3.0.1.zip/download")
+ set(ARCHIVE "scons-local-3.0.1.zip")
+ set(HASH fe121b67b979a4e9580c7f62cfdbe0c243eba62a05b560d6d513ac7f35816d439b26d92fc2d7b7d7241c9ce2a49ea7949455a17587ef53c04a5f5125ac635727)
else()
message(FATAL "unknown tool ${VAR} -- unable to acquire.")
endif()
diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1
index 2cc782feb..596845acb 100644
--- a/scripts/fetchDependency.ps1
+++ b/scripts/fetchDependency.ps1
@@ -27,7 +27,6 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency)
$expectedDownloadedFileHash = "dd3e183254c12f7c338d3edfa642f1ac84a763b8b9a2feabb4ad5fccece5dff9"
$executableFromDownload = "$downloadsDir\cmake-3.9.5-win32-x86\bin\cmake.exe"
$extractionType = $ExtractionType_ZIP
- $extractionFolder = $downloadsDir
}
elseif($Dependency -eq "nuget")
{
@@ -60,7 +59,6 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency)
# Therefore, choosing the cmd dir here as well.
$executableFromDownload = "$downloadsDir\MinGit-2.15.0-32-bit\cmd\git.exe"
$extractionType = $ExtractionType_ZIP
- $extractionFolder = "$downloadsDir\MinGit-2.15.0-32-bit"
}
elseif($Dependency -eq "installerbase")
{
@@ -71,7 +69,6 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency)
$expectedDownloadedFileHash = "f2ce23cf5cf9fc7ce409bdca49328e09a070c0026d3c8a04e4dfde7b05b83fe8"
$executableFromDownload = "$downloadsDir\QtInstallerFramework-win-x86\bin\installerbase.exe"
$extractionType = $ExtractionType_ZIP
- $extractionFolder = $downloadsDir
}
else
{
@@ -91,7 +88,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency)
{
if (-not (Test-Path $executableFromDownload))
{
- vcpkgExtractFile -File $downloadPath -Destination $extractionFolder
+ vcpkgExtractFile -File $downloadPath -DestinationDir $downloadsDir
}
}
elseif($extractionType -eq $ExtractionType_SELF_EXTRACTING_7Z)