mirror of
https://github.com/Egor00f/kolibrios-gcc-toolchain.git
synced 2024-11-21 17:03:48 +01:00
fix installator and windows install script
This commit is contained in:
parent
23d7d8064d
commit
41474060b3
9
.github/workflows/test.yml
vendored
9
.github/workflows/test.yml
vendored
@ -40,15 +40,6 @@ jobs:
|
||||
- name: Run script
|
||||
run: ${{ github.workspace }}/install.bat
|
||||
|
||||
- name: Add toolchain to path
|
||||
run: echo "C:\MinGW\msys\1.0\home\autobuild\tools\win32\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
|
||||
- name: Test run
|
||||
run: |
|
||||
kos32-g++ -v
|
||||
kos32-gcc -v
|
||||
shell: cmd
|
||||
|
||||
#Test Windows Installer
|
||||
build-Installer:
|
||||
runs-on: windows-latest
|
||||
|
@ -16,7 +16,8 @@ AppVersion={#MyAppVersion}
|
||||
AppPublisher={#MyAppPublisher}
|
||||
AppPublisherURL={#MyAppURL}
|
||||
AppSupportURL={#MyAppURL}
|
||||
AppUpdatesURL={#MyAppURL}
|
||||
AppUpdatesURL={#MyAppURL}\releases
|
||||
AppReadmeFile=.\README.md
|
||||
DefaultDirName=C:\MinGW\msys\1.0\home\autobuild\tools
|
||||
DefaultGroupName={#MyAppName}
|
||||
AllowNoIcons=yes
|
||||
@ -57,8 +58,39 @@ Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"
|
||||
Name: "turkish"; MessagesFile: "compiler:Languages\Turkish.isl"
|
||||
Name: "ukrainian"; MessagesFile: "compiler:Languages\Ukrainian.isl"
|
||||
|
||||
|
||||
[Registry]
|
||||
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; \
|
||||
ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}\win32\bin"; \
|
||||
Check: NeedsAddPath('{app}\win32\bin')
|
||||
|
||||
[Files]
|
||||
Source: ".\install.bat"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
||||
|
||||
[Run]
|
||||
Filename: "{app}\install.bat"; description: "install script"; StatusMsg: "Installing toolchain"; Parameters: "{app}"; Flags: runhidden logoutput
|
||||
|
||||
[Icons]
|
||||
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"
|
||||
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
|
||||
|
||||
[UninstallDelete]
|
||||
Type: files; Name: "{app}\*"
|
||||
|
||||
[Code]
|
||||
function NeedsAddPath(Param: string): boolean;
|
||||
var
|
||||
OrigPath: string;
|
||||
begin
|
||||
if not RegQueryStringValue(HKEY_LOCAL_MACHINE,
|
||||
'SYSTEM\CurrentControlSet\Control\Session Manager\Environment',
|
||||
'Path', OrigPath)
|
||||
then begin
|
||||
Result := True;
|
||||
exit;
|
||||
end;
|
||||
{ look for the path with leading and trailing semicolon }
|
||||
{ Pos() returns 0 if not found }
|
||||
Result := Pos(';' + Param + ';', ';' + OrigPath + ';') = 0;
|
||||
end;
|
Loading…
Reference in New Issue
Block a user