diff --git a/icon.ico b/icon.ico new file mode 100644 index 0000000..9a5269c Binary files /dev/null and b/icon.ico differ diff --git a/install-32.iss b/install-32.iss new file mode 100644 index 0000000..0bd2bd6 --- /dev/null +++ b/install-32.iss @@ -0,0 +1,85 @@ +; Script generated by the Inno Script Studio Wizard. +; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! + +#define MyAppName "Amiga GCC" +#define MyAppVersion "6.4.1" +#define MyAppPublisher "Stephen Moody" +#define MyAppURL "https://github.com/SteveMoody73/" +#define MinGWFolder "D:\Dev\Shell\msys64" + +[Setup] +; NOTE: The value of AppId uniquely identifies this application. +; Do not use the same AppId value in installers for other applications. +; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) +AppId={{A2A32C01-A3FB-4AC6-9D9E-648DF42F756E} +AppName={#MyAppName} +AppVersion={#MyAppVersion} +;AppVerName={#MyAppName} {#MyAppVersion} +AppPublisher={#MyAppPublisher} +AppPublisherURL={#MyAppURL} +AppSupportURL={#MyAppURL} +AppUpdatesURL={#MyAppURL} +DefaultDirName=C:\amiga-gcc +DefaultGroupName={#MyAppName} +OutputBaseFilename=setup-amiga-gcc-{#MyAppVersion}-32 +Compression=lzma +SolidCompression=yes +ChangesEnvironment=yes +DisableDirPage=no +SetupIconFile=icon.ico + +[Languages] +Name: "english"; MessagesFile: "compiler:Default.isl" + +[Icons] +Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" + +[Files] +Source: "{#MinGWFolder}\opt\amiga-gcc-32\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "{#MinGWFolder}\mingw32\bin\libwinpthread-1.dll"; DestDir: "{app}\bin"; Flags: ignoreversion +Source: "{#MinGWFolder}\mingw32\bin\libwinpthread-1.dll"; DestDir: "{app}\libexec\gcc\m68k-amigaos\8.1.0"; Flags: ignoreversion +Source: "{#MinGWFolder}\mingw32\bin\libwinpthread-1.dll"; DestDir: "{app}\m68k-amigaos\bin"; Flags: ignoreversion + +[Registry] +Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; \ + ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}"; \ + Check: NeedsAddPath(ExpandConstant('{app}')) + +[Code] +var + OptionPage: TInputOptionWizardPage; + +procedure InitializeWizard; +begin + OptionPage := CreateInputOptionPage(wpSelectDir, 'Add to PATH?', '', '', False, False); + OptionPage.Add('Add CGG m68k elf tools to PATH?'); + + OptionPage.Values[0] := True; +end; + +function IsAddToPathSelected: Boolean; +begin + Result := OptionPage.Values[0]; +end; + +function NeedsAddPath(Param: string): boolean; +var + OrigPath: string; +begin + if IsAddToPathSelected = True then + 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(';' + UpperCase(Param) + ';', ';' + UpperCase(OrigPath) + ';') = 0) and + (Pos(';' + UpperCase(Param) + '\;', ';' + UpperCase(OrigPath) + ';') = 0); + end; +end; diff --git a/install-64.iss b/install-64.iss new file mode 100644 index 0000000..b15a63e --- /dev/null +++ b/install-64.iss @@ -0,0 +1,87 @@ +; Script generated by the Inno Script Studio Wizard. +; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! + +#define MyAppName "Amiga GCC" +#define MyAppVersion "6.4.1" +#define MyAppPublisher "Stephen Moody" +#define MyAppURL "https://github.com/SteveMoody73/" +#define MinGWFolder "D:\Dev\Shell\msys64" + +[Setup] +; NOTE: The value of AppId uniquely identifies this application. +; Do not use the same AppId value in installers for other applications. +; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) +AppId={{A2A32C01-A3FB-4AC6-9D9E-648DF42F756E} +AppName={#MyAppName} +AppVersion={#MyAppVersion} +;AppVerName={#MyAppName} {#MyAppVersion} +AppPublisher={#MyAppPublisher} +AppPublisherURL={#MyAppURL} +AppSupportURL={#MyAppURL} +AppUpdatesURL={#MyAppURL} +DefaultDirName=C:\amiga-gcc +DefaultGroupName={#MyAppName} +OutputBaseFilename=setup-amiga-gcc-{#MyAppVersion}-64 +Compression=lzma +SolidCompression=yes +ChangesEnvironment=yes +DisableDirPage=no +SetupIconFile=icon.ico +ArchitecturesAllowed=x64 +ArchitecturesInstallIn64BitMode=x64 + +[Languages] +Name: "english"; MessagesFile: "compiler:Default.isl" + +[Icons] +Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" + +[Files] +Source: "{#MinGWFolder}\opt\amiga-gcc-64\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "{#MinGWFolder}\mingw64\bin\libwinpthread-1.dll"; DestDir: "{app}\bin"; Flags: ignoreversion +Source: "{#MinGWFolder}\mingw64\bin\libwinpthread-1.dll"; DestDir: "{app}\libexec\gcc\m68k-amigaos\8.1.0"; Flags: ignoreversion +Source: "{#MinGWFolder}\mingw64\bin\libwinpthread-1.dll"; DestDir: "{app}\m68k-amigaos\bin"; Flags: ignoreversion + +[Registry] +Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; \ + ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}"; \ + Check: NeedsAddPath(ExpandConstant('{app}')) + +[Code] +var + OptionPage: TInputOptionWizardPage; + +procedure InitializeWizard; +begin + OptionPage := CreateInputOptionPage(wpSelectDir, 'Add to PATH?', '', '', False, False); + OptionPage.Add('Add CGG m68k elf tools to PATH?'); + + OptionPage.Values[0] := True; +end; + +function IsAddToPathSelected: Boolean; +begin + Result := OptionPage.Values[0]; +end; + +function NeedsAddPath(Param: string): boolean; +var + OrigPath: string; +begin + if IsAddToPathSelected = True then + 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(';' + UpperCase(Param) + ';', ';' + UpperCase(OrigPath) + ';') = 0) and + (Pos(';' + UpperCase(Param) + '\;', ';' + UpperCase(OrigPath) + ';') = 0); + end; +end;