aboutsummaryrefslogtreecommitdiffstats
path: root/coin/provisioning/common/windows
diff options
context:
space:
mode:
Diffstat (limited to 'coin/provisioning/common/windows')
-rw-r--r--coin/provisioning/common/windows/android.ps110
-rw-r--r--coin/provisioning/common/windows/disable-defragment.ps142
-rw-r--r--coin/provisioning/common/windows/msvc_2015_update3_patch.ps167
-rw-r--r--coin/provisioning/common/windows/mysql.ps14
-rw-r--r--coin/provisioning/common/windows/unset-proxy.ps19
5 files changed, 54 insertions, 78 deletions
diff --git a/coin/provisioning/common/windows/android.ps1 b/coin/provisioning/common/windows/android.ps1
index 1b4dd35d..def09116 100644
--- a/coin/provisioning/common/windows/android.ps1
+++ b/coin/provisioning/common/windows/android.ps1
@@ -40,10 +40,10 @@
# That's why we need to use Andoid-21 API version in Qt 5.9.
# NDK
-$ndkVersion = "r18b"
-$ndkCachedUrl = "\\ci-files01-hki.intra.qt.io\provisioning\android\android-ndk-$ndkVersion-windows-x86.zip"
-$ndkOfficialUrl = "https://dl.google.com/android/repository/android-ndk-$ndkVersion-windows-x86.zip"
-$ndkChecksum = "4b8b6a4edc0fa967b429c1d6d25adf69acc28803"
+$ndkVersion = "r19c"
+$ndkCachedUrl = "\\ci-files01-hki.intra.qt.io\provisioning\android\android-ndk-$ndkVersion-windows-x86_64.zip"
+$ndkOfficialUrl = "https://dl.google.com/android/repository/android-ndk-$ndkVersion-windows-x86_64.zip"
+$ndkChecksum = "c4cd8c0b6e7618ca0a871a5f24102e40c239f6a3"
$ndkFolder = "c:\Utils\Android\android-ndk-$ndkVersion"
$ndkZip = "c:\Windows\Temp\android_ndk_$ndkVersion.zip"
@@ -98,7 +98,7 @@ Out-File -FilePath C:\Utils\Android\licenses\android-sdk-license -Encoding utf8
cd $toolsFolder\bin\
$sdkmanager_args += "platforms;$sdkApiLevel", "platform-tools", "build-tools;$sdkBuildToolsVersion"
$command = 'for($i=0;$i -lt 6;$i++) { $response += "y`n"}; $response | .\sdkmanager.bat @sdkmanager_args'
-iex $command
+Invoke-Expression $command
$command = 'for($i=0;$i -lt 6;$i++) { $response += "y`n"}; $response | .\sdkmanager.bat --licenses'
iex $command
cmd /c "dir C:\Utils\android"
diff --git a/coin/provisioning/common/windows/disable-defragment.ps1 b/coin/provisioning/common/windows/disable-defragment.ps1
index 876938f8..e76f0649 100644
--- a/coin/provisioning/common/windows/disable-defragment.ps1
+++ b/coin/provisioning/common/windows/disable-defragment.ps1
@@ -1,6 +1,6 @@
#############################################################################
##
-## Copyright (C) 2018 The Qt Company Ltd.
+## Copyright (C) 2019 The Qt Company Ltd.
## Contact: http://www.qt.io/licensing/
##
## This file is part of the provisioning scripts of the Qt Toolkit.
@@ -31,4 +31,42 @@
##
#############################################################################
-schtasks /Delete /TN "\Microsoft\Windows\Defrag\ScheduledDefrag" /F
+# Windows 7 does not have Get-ScheduledTask and Unregister-ScheduledTask
+# thus needing its own version.
+Write-Host "Disabling defragmentation"
+$version = Get-CimInstance Win32_OperatingSystem | Select-Object -ExpandProperty Caption
+if ($version -like '*Windows 7*'){
+ $pi = New-Object System.Diagnostics.ProcessStartInfo
+ $pi.FileName = "C:\Windows\System32\schtasks.exe"
+ $pi.RedirectStandardError = $true
+ $pi.UseShellExecute = $false
+ $pi.Arguments = "/Delete /TN `"\Microsoft\Windows\Defrag\ScheduledDefrag`" /F"
+ $prog = New-Object System.Diagnostics.Process
+ $prog.StartInfo = $pi
+ $prog.Start() | Out-Null
+ $err = $prog.StandardError.ReadToEnd()
+ $prog.WaitForExit()
+ if ($prog.ExitCode -eq 0){
+ Write-Host "Scheduled defragmentation removed"
+ } else {
+ if ($err -like '*cannot find the file*'){
+ Write-Host "No scheduled defragmentation task found"
+ exit 0
+ } else {
+ Write-Host "Error while deleting scheduled defragmentation task: $err"
+ }
+ }
+}
+else {
+ try {
+ $state = (Get-ScheduledTask -ErrorAction Stop -TaskName "ScheduledDefrag").State
+ Write-Host "Scheduled defragmentation task found in state: $state"
+ }
+ catch {
+ Write-Host "No scheduled defragmentation task found"
+ exit 0
+ }
+ Write-Host "Unregistering scheduled defragmentation task"
+ Unregister-ScheduledTask -ErrorAction Stop -Confirm:$false -TaskName ScheduledDefrag
+ Write-Host "Scheduled Defragmentation task was cancelled"
+}
diff --git a/coin/provisioning/common/windows/msvc_2015_update3_patch.ps1 b/coin/provisioning/common/windows/msvc_2015_update3_patch.ps1
deleted file mode 100644
index bfbb397a..00000000
--- a/coin/provisioning/common/windows/msvc_2015_update3_patch.ps1
+++ /dev/null
@@ -1,67 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the provisioning scripts of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:LGPL21$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see http://www.qt.io/terms-conditions. For further
-## information use the contact form at http://www.qt.io/contact-us.
-##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 2.1 or version 3 as published by the Free
-## Software Foundation and appearing in the file LICENSE.LGPLv21 and
-## LICENSE.LGPLv3 included in the packaging of this file. Please review the
-## following information to ensure the GNU Lesser General Public License
-## requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-##
-## As a special exception, The Qt Company gives you certain additional
-## rights. These rights are described in The Qt Company LGPL Exception
-## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-. "$PSScriptRoot\helpers.ps1"
-
-# Install Cumulative Servicing Release Visual Studio 2015 update 3
-# Original download page: https://msdn.microsoft.com/en-us/library/mt752379.aspx
-
-$version = "2015 update3 (KB3165756)"
-$packagePath = "C:\Windows\Temp"
-$package = $packagePath + "\vs14-kb3165756.exe"
-$url_cache = "http://ci-files01-hki.intra.qt.io/input/windows/vs14-kb3165756.exe"
-$url_official = "http://go.microsoft.com/fwlink/?LinkID=816878"
-$sha1 = "6a21d9b291ca75d44baad95e278fdc0d05d84c02"
-$preparedPackage = "\\ci-files01-hki.intra.qt.io\provisioning\windows\vs14-kb3165756-update"
-
-if (Test-Path $preparedPackage) {
- # The prepared package contains updated packages so that not everything has to be downloaded
- Write-Host "Using prepared package"
- Copy-Item -Recurse $preparedPackage $packagePath
- # Remove the whole downloaded folder
- $toRemove = $packagePath + "\vs14-kb3165756-update"
- $executable = "$toRemove\vs14-kb3165756.exe"
-} else {
- Write-Host "Fetching patch for Visual Studio $version..."
- Download $url_official $url_cache $package
- $executable = $package
- # Remove the downloaded executable
- $toRemove = $executable
-}
-
-Verify-Checksum $executable $sha1
-Write-Host "Installing patch for Visual Studio $version..."
-Run-Executable $executable "/norestart /passive"
-
-Remove-Item -Force -Recurse -Path $toRemove
-
-Write-Output "Visual Studio = $version" >> ~\versions.txt
diff --git a/coin/provisioning/common/windows/mysql.ps1 b/coin/provisioning/common/windows/mysql.ps1
index 29ce0ab4..8ed91402 100644
--- a/coin/provisioning/common/windows/mysql.ps1
+++ b/coin/provisioning/common/windows/mysql.ps1
@@ -1,6 +1,6 @@
#############################################################################
##
-## Copyright (C) 2017 The Qt Company Ltd.
+## Copyright (C) 2019 The Qt Company Ltd.
## Contact: http://www.qt.io/licensing/
##
## This file is part of the provisioning scripts of the Qt Toolkit.
@@ -36,7 +36,7 @@
# This script installs MySQL $version.
# Both x86 and x64 versions needed when x86 integrations are done on x64 machine
-$version = "5.6.11"
+$version = "5.7.25"
$baseNameX64 = "mysql-$version-winx64"
$packagex64 = "C:\Windows\temp\$baseNameX64.zip"
$baseNameX86 = "mysql-$version-win32"
diff --git a/coin/provisioning/common/windows/unset-proxy.ps1 b/coin/provisioning/common/windows/unset-proxy.ps1
index 9c3dddb3..0b7d761f 100644
--- a/coin/provisioning/common/windows/unset-proxy.ps1
+++ b/coin/provisioning/common/windows/unset-proxy.ps1
@@ -38,6 +38,11 @@ $dcs = (Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\
$dcs[8] = $_ -band 0xF7
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections" -Name DefaultConnectionSettings -Value $dcs
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name ProxyEnable -Value 0
-Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name ProxyServer
-Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name ProxyOverride
+if(Get-ItemProperty -ErrorAction SilentlyContinue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name ProxyServer){
+ Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name ProxyServer
+
+}
+if(Get-ItemProperty -ErrorAction SilentlyContinue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name ProxyOverride){
+ Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name ProxyOverride
+}