mirror of
git://code.qt.io/qt/qt5.git
synced 2026-02-24 16:05:36 +08:00
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
Change-Id: I4fdc67e469153e8a0530efd58ff251629dcabdfa
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
(cherry picked from commit 337206334e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
42 lines
1.1 KiB
PowerShell
42 lines
1.1 KiB
PowerShell
# 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
|
|
|