diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3d99bf2..d4f7c40 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 diff --git a/installator.iss b/installator.iss index 4c033e8..f48e834 100644 --- a/installator.iss +++ b/installator.iss @@ -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; \ No newline at end of file