fix choco package install

choco package installing, but cant delete toolchain
This commit is contained in:
Егор 2024-11-19 21:33:11 +05:00
parent 1a05d66976
commit 9cd3a05980
6 changed files with 18 additions and 12 deletions

View File

@ -165,6 +165,11 @@ jobs:
- name: Install package
run: choco install ${{ github.workspace }}\build\choco-package.nupkg
- name: Test
run: |
kos32-gcc -v
kos32-g++ -v
- name: Remove package
run: choco uninstall kos32-gcc

3
.gitignore vendored
View File

@ -4,4 +4,5 @@ package/DEBIAN/copyright
package.deb
build/
chocolatey/kos32-gcc*.nupkg
chocolatey/install.ps1
chocolatey/install.ps1
chocolatey/tools/install.ps1

View File

@ -6,10 +6,10 @@
<version>0.1.5</version>
<authors>Egor00f</authors>
<owners>Egor00f</owners>
<summary>__REPLACE__</summary>
<summary>idk</summary>
<description>_KolibriOS gcc toolchain installer. This package installing KolibriOS gcc toolchain by Serge.</description>
<packageSourceUrl>https://github.com/Egor00f/kolibrios-gcc-toolchain/</packageSourceUrl>
<tags>kolibrios toolchain compiler c/C++</tags>
<tags>kolibrios toolchain compiler C/C++</tags>
<copyright></copyright>
<licenseUrl>https://github.com/Egor00f/kolibrios-gcc-toolchain/blob/main/LICENSE</licenseUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>

View File

@ -1,15 +1,14 @@
#NOTE: Please remove any commented lines to tidy up prior to releasing the package, including this one
$packageName = 'kos32-gcc' # arbitrary name for the package, used in messages
$validExitCodes = @(0) #please insert other valid exit codes here, exit codes for ms http://msdn.microsoft.com/en-us/library/aa368542(VS.85).aspx
# main helpers - these have error handling tucked into them already
# installer, will assert administrative rights
Install-ChocolateyPackage "$packageName" -validExitCodes $validExitCodes
$INSTALL_PATH = Read-Host 'Path to install toolchain(Enter - default)'
.\install.ps1 -InstallPath $INSTALL_PATH
C:\ProgramData\Chocolatey\lib\kos32-gcc\tools\install.ps1
Out-File -FilePath C:\ProgramData\Chocolatey\lib\kos32-gcc\install-path -InputObject $INSTALL_PATH
$env:KOS32GCCPATH = $INSTALL_PATH

View File

@ -1,2 +1,4 @@
rm $env:KOS32GCCPATH -r -f
$installPath = Get-Content C:\ProgramData\Chocolatey\lib\kos32-gcc\install-path | Out-String | ConvertFrom-StringData
Remove-Item -LiteralPath $installPath -Force -Recurse

View File

@ -15,17 +15,17 @@ $LIBS_PATH = '$InstallPath\win32\mingw32\lib\'
$LIBS_URL = 'http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/'
Write-Progress -Activity 'Installing toolchain' -Status 'toolchain' -PercentComplete 0 -CurrentOperation 'Create the $InstallPath folder'
Write-Progress -Activity 'Installing toolchain' -Status 'Installing toolchain' -PercentComplete 0 -CurrentOperation 'Create the $InstallPath folder'
mkdir $InstallPath -Force
Write-Progress -Activity 'Installing toolchain' -Status 'toolchain' -PercentComplete 1 -CurrentOperation 'Download the kos32-gcc toolchain'
Write-Progress -Activity 'Installing toolchain' -Status 'Installing toolchain' -PercentComplete 1 -CurrentOperation 'Download the kos32-gcc toolchain'
Invoke-WebRequest http://ftp.kolibrios.org/users/Serge/new/Toolchain/msys-kos32-5.4.0.7z -OutFile $InstallPath\kos32-toolchain.7z
Write-Progress -Activity 'Installing toolchain' -Status 'toolchain' -PercentComplete 20 -CurrentOperation 'Unpacking kos32-gcc toolchain'
Write-Progress -Activity 'Installing toolchain' -Status 'Installing toolchain' -PercentComplete 20 -CurrentOperation 'Unpacking kos32-gcc toolchain'
Expand-7Zip -ArchiveFileName $InstallPath\kos32-toolchain.7z -TargetPath $InstallPath
@ -55,4 +55,3 @@ foreach( $file in $files ) {
Write-Progress -Activity 'Installing toolchain' -Status 'Done!' -PercentComplete 99 -CurrentOperation "end"
$env:Path += ';$InstallPath\win32\bin'