mirror of
git://code.qt.io/qt/qt5.git
synced 2026-04-18 19:16:21 +08:00
Coin: Add golang & upx to Linux/macOS/Windows
Qt Creator will soon start to rely on go for tools and upx for binary compression. Right now we can't install upx on macOS which we can live with. Leaving the script in for later re-enabling once brew has been fixed. Pick-to: 6.7 6.8 Change-Id: I4fdc67e469153e8a0530efd58ff251629dcabdfa Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
24
coin/provisioning/common/windows/install-golang.ps1
Normal file
24
coin/provisioning/common/windows/install-golang.ps1
Normal file
@@ -0,0 +1,24 @@
|
||||
# Copyright (C) 2022 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
. "$PSScriptRoot\helpers.ps1"
|
||||
|
||||
# Install Git
|
||||
|
||||
$version = "1.22.4"
|
||||
if (Is64BitWinHost) {
|
||||
$arch = "amd64"
|
||||
$sha256 = "3c21105d7b584759b6e266383b777caf6e87142d304a10b539dbc66ab482bb5f"
|
||||
} else {
|
||||
$arch = "386"
|
||||
$sha256 = "5c6446e2ea80bc6a971d2b34446f16e6517e638b0ff8d3ea229228d1931790b0"
|
||||
}
|
||||
$goPackage = "C:\Windows\Temp\Go-" + $version + $arch + ".msi"
|
||||
$url_cache = "\\ci-files01-hki.ci.qt.io\provisioning\windows\Go-" + $version + $arch + ".exe"
|
||||
$url_official = "https://go.dev/dl/go" + $version + ".windows-" + $arch + ".msi"
|
||||
|
||||
Write-Host "Fetching Go $version..."
|
||||
Download $url_official $url_cache $goPackage
|
||||
Verify-Checksum $goPackage $sha256 sha256
|
||||
Write-Host "Installing Go $version..."
|
||||
Run-Executable "msiexec" "/quiet /i $goPackage"
|
||||
Write-Output "Go = $version" >> ~\versions.txt
|
||||
41
coin/provisioning/common/windows/install-upx.ps1
Normal file
41
coin/provisioning/common/windows/install-upx.ps1
Normal file
@@ -0,0 +1,41 @@
|
||||
# Copyright (C) 2019 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
. "$PSScriptRoot\helpers.ps1"
|
||||
|
||||
$majorminorversion = "4.2"
|
||||
$version = "4.2.4"
|
||||
|
||||
$cpu_arch = Get-CpuArchitecture
|
||||
Write-Host "Installing UPX for architecture $cpu_arch"
|
||||
switch ($cpu_arch) {
|
||||
x64 {
|
||||
$arch = "win64"
|
||||
$sha1 = "204ae110a84d0046b242222f97b19cf3f5594f4b"
|
||||
}
|
||||
default {
|
||||
throw "Unknown architecture $cpu_arch"
|
||||
}
|
||||
}
|
||||
|
||||
$filename = "upx-" + $version + "-" + $arch
|
||||
$filename_zip = $filename + ".zip"
|
||||
|
||||
$zip = Get-DownloadLocation ($filename_zip)
|
||||
$officialurl = "https://github.com/upx/upx/releases/download/v" + $version + "/" + $filename_zip
|
||||
$cachedurl = "https://ci-files01-hki.ci.qt.io/input/upx/" + $filename_zip
|
||||
|
||||
Write-Host "Removing old UPX"
|
||||
Remove "C:\UPX"
|
||||
|
||||
Download $officialurl $cachedurl $zip
|
||||
Verify-Checksum $zip $sha1
|
||||
|
||||
Extract-7Zip $zip C:
|
||||
$defaultinstallfolder = "C:\" + $filename
|
||||
Rename-Item $defaultinstallfolder C:\UPX
|
||||
|
||||
Add-Path "C:\UPX"
|
||||
|
||||
Write-Output "UPX = $version" >> ~\versions.txt
|
||||
|
||||
Reference in New Issue
Block a user