mirror of
https://github.com/Egor00f/kolibrios-gcc-toolchain.git
synced 2024-11-25 01:53:49 +01:00
fix downloading libraries && add remove package && fix powershell script depends in tests
This commit is contained in:
parent
80198a0692
commit
743ad5a0cd
5
.github/workflows/test.yml
vendored
5
.github/workflows/test.yml
vendored
@ -46,6 +46,11 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install modules
|
||||||
|
run: |
|
||||||
|
Set-PSRepository PSGallery -InstallationPolicy Trusted
|
||||||
|
Install-Module -Name 7Zip4PowerShell
|
||||||
|
|
||||||
- name: Run script
|
- name: Run script
|
||||||
run: ${{ github.workspace }}\install.ps1
|
run: ${{ github.workspace }}\install.ps1
|
||||||
|
|
||||||
|
@ -11,3 +11,5 @@ Install-ChocolateyPackage "$packageName" -validExitCodes $validExitCodes
|
|||||||
$INSTALL_PATH = Read-Host 'Path to install toolchain(Enter - default)'
|
$INSTALL_PATH = Read-Host 'Path to install toolchain(Enter - default)'
|
||||||
|
|
||||||
.\install.ps1 -InstallPath $INSTALL_PATH
|
.\install.ps1 -InstallPath $INSTALL_PATH
|
||||||
|
|
||||||
|
$env:KOS32GCCPATH = $INSTALL_PATH
|
@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
rm $env:KOS32GCCPATH -r -f
|
27
install.ps1
27
install.ps1
@ -1,4 +1,4 @@
|
|||||||
#Requires -RunAsAdministrator
|
#Requires -RunAsAdministrator
|
||||||
|
|
||||||
param(
|
param(
|
||||||
[string]$InstallPath='C:\MinGW\msys\1.0\home\autobuild\tools'
|
[string]$InstallPath='C:\MinGW\msys\1.0\home\autobuild\tools'
|
||||||
@ -11,15 +11,13 @@ else
|
|||||||
Install-Module -Name 7Zip4PowerShell
|
Install-Module -Name 7Zip4PowerShell
|
||||||
}
|
}
|
||||||
|
|
||||||
$URL_TO_LIBS = "http://builds.kolibrios.org/en_US/data/contrib/sdk/lib"
|
$LIBS_PATH = '$InstallPath\win32\mingw32\lib\'
|
||||||
|
$LIBS_URL = 'http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/'
|
||||||
$LIST_OF_LIBS = 'libdll.a', 'libfreetype.a', 'libc.dll.a', 'libSDLn.a', 'libSDL_mixer.a', 'libcurses.a', 'libz.dll.a', 'libogg.a', 'libvorbis.a', 'libopenjpeg.a', 'libopenjpeg.a', 'libsqlite3.dll.a', 'libjbig2dec.a'
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Write-Progress -Activity 'Installing toolchain' -Status 'toolchain' -PercentComplete 0 -CurrentOperation 'Create the $InstallPath folder'
|
Write-Progress -Activity 'Installing toolchain' -Status 'toolchain' -PercentComplete 0 -CurrentOperation 'Create the $InstallPath folder'
|
||||||
|
|
||||||
mkdir $InstallPath
|
mkdir $InstallPath -Force
|
||||||
|
|
||||||
|
|
||||||
Write-Progress -Activity 'Installing toolchain' -Status 'toolchain' -PercentComplete 1 -CurrentOperation 'Download the kos32-gcc toolchain'
|
Write-Progress -Activity 'Installing toolchain' -Status 'toolchain' -PercentComplete 1 -CurrentOperation 'Download the kos32-gcc toolchain'
|
||||||
@ -43,11 +41,18 @@ Expand-7Zip -ArchiveFileName $InstallPath\win32\mingw32\sdk-28-10-16.7z -TargetP
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
for (($i = 0); $i -lt $LIST_OF_LIBS.count; $i++)
|
Write-Progress -Activity 'Installing toolchain' -Status 'Installing libraries' -PercentComplete 60 -CurrentOperation "Download libraries"
|
||||||
{
|
|
||||||
Write-Progress -Activity 'Installing toolchain' -Status 'Installing libraries' -PercentComplete 50+(50 * ($i / $LIST_OF_LIBS.count) ) -CurrentOperation = 'download $($LIST_OF_LIBS[$i])'
|
|
||||||
|
|
||||||
$LINK = "$URL_TO_LIBS/$LIST_OF_LIBS[$i]"
|
|
||||||
|
|
||||||
Invoke-WebRequest $LINK -OutFile $InstallPath\win32\mingw32\lib\$LIST_OF_LIBS[$i]
|
$response = Invoke-WebRequest -Uri $LIBS_URL -Method GET
|
||||||
|
|
||||||
|
$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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Write-Progress -Activity 'Installing toolchain' -Status 'Done!' -PercentComplete 99 -CurrentOperation "end"
|
||||||
|
|
||||||
|
$env:Path += ';$InstallPath\win32\bin'
|
||||||
|
Loading…
Reference in New Issue
Block a user