2024-11-17 12:28:13 +01:00
|
|
|
#Requires -RunAsAdministrator
|
2024-11-16 15:45:39 +01:00
|
|
|
|
|
|
|
param(
|
|
|
|
[string]$InstallPath='C:\MinGW\msys\1.0\home\autobuild\tools'
|
|
|
|
)
|
2024-11-14 17:26:34 +01:00
|
|
|
|
2024-11-16 12:21:10 +01:00
|
|
|
if (Get-Module -ListAvailable -Name 7Zip4PowerShell)
|
|
|
|
{}
|
|
|
|
else
|
2024-11-15 17:45:10 +01:00
|
|
|
{
|
|
|
|
Install-Module -Name 7Zip4PowerShell
|
2024-11-16 12:21:10 +01:00
|
|
|
}
|
2024-11-15 17:45:10 +01:00
|
|
|
|
2024-11-17 12:28:13 +01:00
|
|
|
$LIBS_PATH = '$InstallPath\win32\mingw32\lib\'
|
|
|
|
$LIBS_URL = 'http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/'
|
2024-11-14 17:26:34 +01:00
|
|
|
|
|
|
|
|
2024-11-16 12:21:10 +01:00
|
|
|
Write-Progress -Activity 'Installing toolchain' -Status 'toolchain' -PercentComplete 0 -CurrentOperation 'Create the $InstallPath folder'
|
2024-11-14 17:26:34 +01:00
|
|
|
|
2024-11-17 12:28:13 +01:00
|
|
|
mkdir $InstallPath -Force
|
2024-11-14 17:26:34 +01:00
|
|
|
|
|
|
|
|
2024-11-16 12:21:10 +01:00
|
|
|
Write-Progress -Activity 'Installing toolchain' -Status 'toolchain' -PercentComplete 1 -CurrentOperation 'Download the kos32-gcc toolchain'
|
2024-11-14 17:26:34 +01:00
|
|
|
|
2024-11-15 17:45:10 +01:00
|
|
|
Invoke-WebRequest http://ftp.kolibrios.org/users/Serge/new/Toolchain/msys-kos32-5.4.0.7z -OutFile $InstallPath\kos32-toolchain.7z
|
2024-11-14 17:26:34 +01:00
|
|
|
|
2024-11-16 12:21:10 +01:00
|
|
|
|
|
|
|
Write-Progress -Activity 'Installing toolchain' -Status 'toolchain' -PercentComplete 20 -CurrentOperation 'Unpacking kos32-gcc toolchain'
|
2024-11-14 17:26:34 +01:00
|
|
|
|
2024-11-15 17:45:10 +01:00
|
|
|
Expand-7Zip -ArchiveFileName $InstallPath\kos32-toolchain.7z -TargetPath $InstallPath
|
2024-11-14 17:26:34 +01:00
|
|
|
|
|
|
|
|
2024-11-16 12:21:10 +01:00
|
|
|
Write-Progress -Activity 'Installing toolchain' -Status 'Installing libraries' -PercentComplete 40 -CurrentOperation 'Downloading libraries'
|
2024-11-14 17:26:34 +01:00
|
|
|
|
2024-11-15 17:45:10 +01:00
|
|
|
Invoke-WebRequest http://ftp.kolibrios.org/users/Serge/new/Toolchain/sdk-28-10-16.7z -OutFile $InstallPath\win32\mingw32\sdk-28-10-16.7z
|
2024-11-14 17:26:34 +01:00
|
|
|
|
2024-11-16 12:21:10 +01:00
|
|
|
|
|
|
|
Write-Progress -Activity 'Installing toolchain' -Status 'Installing libraries' -PercentComplete 50 -CurrentOperation 'Unpacking libraries'
|
2024-11-14 17:26:34 +01:00
|
|
|
|
2024-11-15 17:45:10 +01:00
|
|
|
Expand-7Zip -ArchiveFileName $InstallPath\win32\mingw32\sdk-28-10-16.7z -TargetPath $InstallPath\win32\mingw32\
|
2024-11-14 17:26:34 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
2024-11-17 12:28:13 +01:00
|
|
|
Write-Progress -Activity 'Installing toolchain' -Status 'Installing libraries' -PercentComplete 60 -CurrentOperation "Download libraries"
|
|
|
|
|
2024-11-14 17:26:34 +01:00
|
|
|
|
2024-11-17 12:28:13 +01:00
|
|
|
$response = Invoke-WebRequest -Uri $LIBS_URL -Method GET
|
2024-11-14 17:26:34 +01:00
|
|
|
|
2024-11-17 12:28:13 +01:00
|
|
|
$files = @( $response.Content -split [environment]::NewLine | ? { $_ -like '*tageswerte*.zip*' } | % { $_ -replace '^(.*>)(tages.*\.zip)<.*', '$2' } )
|
|
|
|
|
|
|
|
foreach( $file in $files ) {
|
|
|
|
|
|
|
|
Invoke-WebRequest -Uri ($LIBS_URL + $file) -Method GET -OutFile ($LIBS_PATH + $file)
|
2024-11-14 17:26:34 +01:00
|
|
|
}
|
2024-11-17 12:28:13 +01:00
|
|
|
|
|
|
|
Write-Progress -Activity 'Installing toolchain' -Status 'Done!' -PercentComplete 99 -CurrentOperation "end"
|
|
|
|
|
|
|
|
$env:Path += ';$InstallPath\win32\bin'
|