-
Notifications
You must be signed in to change notification settings - Fork 1
InnoSetup deployment migration #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
812d904
Initial version
mzagozda 7d3c67c
Fixed build error
mzagozda 71a3929
Improved installer process
mzagozda c05740c
Improved installer process
mzagozda 4e72e20
Improved installer process
mzagozda a2a7a0e
Improved installer process
mzagozda File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,170 @@ | ||
| ; Open Salamander Inno Setup Script | ||
| ; This installer maintains all features from the previous custom installer | ||
|
|
||
| #define MyAppName "Open Salamander" | ||
| #define MyAppVersion "5.0" | ||
| #define MyAppPublisher "Taskscape Ltd" | ||
| #define MyAppURL "https://www.opensalamander.com/" | ||
| #define MyAppExeName "salamand.exe" | ||
|
|
||
| ; Build number will be passed from command line during CI build | ||
| #ifndef BuildNumber | ||
| #define BuildNumber "0" | ||
| #endif | ||
|
|
||
| [Setup] | ||
| ; NOTE: The value of AppId uniquely identifies this application. | ||
| AppId={{F4A1E7D3-8E5C-4B2A-9F6E-3D7C8A5B9E2F} | ||
| AppName={#MyAppName} | ||
| AppVersion={#MyAppVersion}.{#BuildNumber} | ||
| AppVerName={#MyAppName} {#MyAppVersion} | ||
| AppPublisher={#MyAppPublisher} | ||
| AppPublisherURL={#MyAppURL} | ||
| AppSupportURL={#MyAppURL} | ||
| AppUpdatesURL={#MyAppURL} | ||
| DefaultDirName={autopf}\{#MyAppName} | ||
| DefaultGroupName={#MyAppName} | ||
| AllowNoIcons=yes | ||
| LicenseFile=LICENSE | ||
| ; SetupIconFile=..\src\setup\res\setup.ico | ||
| OutputBaseFilename=OpenSalamander_{#MyAppVersion}.{#BuildNumber} | ||
| Compression=lzma2/ultra64 | ||
| SolidCompression=yes | ||
| WizardStyle=modern | ||
| ; 64-bit only installer | ||
| ArchitecturesAllowed=x64compatible | ||
| ArchitecturesInstallIn64BitMode=x64compatible | ||
| ; Minimum Windows version | ||
| MinVersion=10.0.17763 | ||
| ; Uninstaller settings | ||
| UninstallDisplayIcon={app}\{#MyAppExeName} | ||
| UninstallDisplayName={#MyAppName} {#MyAppVersion} | ||
|
|
||
| [Languages] | ||
| Name: "english"; MessagesFile: "compiler:Default.isl" | ||
|
|
||
| [CustomMessages] | ||
| english.LaunchAfterInstall=Launch {#MyAppName} after installation | ||
|
|
||
| [Tasks] | ||
| Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked | ||
| Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 6.1; Check: not IsAdminInstallMode | ||
|
|
||
| [Files] | ||
| ; Main executables | ||
| Source: "{#SourcePath}\salamand.exe"; DestDir: "{app}"; Flags: ignoreversion | ||
| Source: "{#SourcePath}\salmon.exe"; DestDir: "{app}"; Flags: ignoreversion | ||
|
|
||
| ; Shell extensions | ||
| Source: "{#SourcePath}\salextx64.dll"; DestDir: "{app}"; Flags: ignoreversion regserver 64bit | ||
| Source: "{#SourcePath}\salextx86.dll"; DestDir: "{app}"; Flags: ignoreversion regserver 32bit | ||
|
|
||
| ; Utility executables (optional - only if present) | ||
| Source: "{#SourcePath}\salopen.exe"; DestDir: "{app}"; Flags: ignoreversion skipifsourcedoesntexist | ||
| Source: "{#SourcePath}\salspawn.exe"; DestDir: "{app}"; Flags: ignoreversion skipifsourcedoesntexist | ||
| Source: "{#SourcePath}\tserver.exe"; DestDir: "{app}"; Flags: ignoreversion skipifsourcedoesntexist | ||
| Source: "{#SourcePath}\sfx7zip.exe"; DestDir: "{app}"; Flags: ignoreversion skipifsourcedoesntexist | ||
| Source: "{#SourcePath}\zip2sfx.exe"; DestDir: "{app}"; Flags: ignoreversion skipifsourcedoesntexist | ||
| Source: "{#SourcePath}\translator.exe"; DestDir: "{app}"; Flags: ignoreversion skipifsourcedoesntexist | ||
| Source: "{#SourcePath}\salpvenv.exe"; DestDir: "{app}"; Flags: ignoreversion skipifsourcedoesntexist | ||
| Source: "{#SourcePath}\fcremote.exe"; DestDir: "{app}"; Flags: ignoreversion skipifsourcedoesntexist | ||
| Source: "{#SourcePath}\7zwrapper.exe"; DestDir: "{app}"; Flags: ignoreversion skipifsourcedoesntexist | ||
|
|
||
| ; OpenSSL libraries for FTP encryption support | ||
| Source: "{#SourcePath}\utils\libeay32.dll"; DestDir: "{app}\utils"; Flags: ignoreversion skipifsourcedoesntexist | ||
| Source: "{#SourcePath}\utils\ssleay32.dll"; DestDir: "{app}\utils"; Flags: ignoreversion skipifsourcedoesntexist | ||
|
|
||
| ; License file | ||
| Source: "{#SourcePath}\LICENSE"; DestDir: "{app}"; Flags: ignoreversion | ||
|
|
||
| ; Build info for traceability | ||
| Source: "{#SourcePath}\build_info.txt"; DestDir: "{app}"; Flags: ignoreversion skipifsourcedoesntexist | ||
|
|
||
| ; Language files for main application | ||
| Source: "{#SourcePath}\lang\*.slg"; DestDir: "{app}\lang"; Flags: ignoreversion | ||
|
|
||
| ; Toolbar icons | ||
| Source: "{#SourcePath}\toolbars\*.svg"; DestDir: "{app}\toolbars"; Flags: ignoreversion | ||
|
|
||
| ; Convert tables (character encoding tables) | ||
| Source: "{#SourcePath}\convert\centeuro\*"; DestDir: "{app}\convert\centeuro"; Flags: ignoreversion recursesubdirs createallsubdirs skipifsourcedoesntexist | ||
| Source: "{#SourcePath}\convert\cyrillic\*"; DestDir: "{app}\convert\cyrillic"; Flags: ignoreversion recursesubdirs createallsubdirs skipifsourcedoesntexist | ||
| Source: "{#SourcePath}\convert\westeuro\*"; DestDir: "{app}\convert\westeuro"; Flags: ignoreversion recursesubdirs createallsubdirs skipifsourcedoesntexist | ||
|
|
||
| ; Plugins - each plugin in its own directory with optional language files | ||
| Source: "{#SourcePath}\plugins\*"; DestDir: "{app}\plugins"; Flags: ignoreversion recursesubdirs createallsubdirs skipifsourcedoesntexist | ||
|
|
||
| [Icons] | ||
| Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" | ||
| Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" | ||
| Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon | ||
| Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon | ||
|
|
||
| [Run] | ||
| Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchAfterInstall}"; Flags: nowait postinstall skipifsilent | ||
|
|
||
| [Registry] | ||
| ; Add application to App Paths for easier command-line launching | ||
| Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\salamand.exe"; ValueType: string; ValueName: ""; ValueData: "{app}\{#MyAppExeName}"; Flags: uninsdeletekey | ||
| Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\salamand.exe"; ValueType: string; ValueName: "Path"; ValueData: "{app}" | ||
|
|
||
| [UninstallDelete] | ||
| ; Clean up any files created during runtime | ||
| Type: filesandordirs; Name: "{app}\Temporary" | ||
| Type: dirifempty; Name: "{app}\plugins" | ||
| Type: dirifempty; Name: "{app}\lang" | ||
| Type: dirifempty; Name: "{app}\toolbars" | ||
| Type: dirifempty; Name: "{app}\convert" | ||
| Type: dirifempty; Name: "{app}\utils" | ||
| Type: dirifempty; Name: "{app}" | ||
|
|
||
| [Code] | ||
| // Check if Open Salamander is currently running and offer to close it | ||
| function InitializeSetup(): Boolean; | ||
| begin | ||
| Result := True; | ||
|
|
||
| // Check if salamand.exe is running (uses process list mutex from src/tasklist.cpp) | ||
| while CheckForMutexes('TaskscapeLtdSalamander3bProcessListMutex') do | ||
| begin | ||
| if MsgBox('Open Salamander is currently running. Please close it before continuing installation.' + #13#10 + #13#10 + | ||
| 'Click OK to retry or Cancel to exit setup.', mbError, MB_OKCANCEL) = IDCANCEL then | ||
| begin | ||
| Result := False; | ||
| Exit; | ||
| end; | ||
| end; | ||
| end; | ||
|
|
||
| // Check if uninstalling while application is running | ||
| function InitializeUninstall(): Boolean; | ||
| begin | ||
| Result := True; | ||
|
|
||
| if CheckForMutexes('TaskscapeLtdSalamander3bProcessListMutex') then | ||
| begin | ||
| MsgBox('Open Salamander is currently running. Please close it before uninstalling.', mbError, MB_OK); | ||
| Result := False; | ||
| end; | ||
| end; | ||
|
|
||
| // Cleanup old installation if upgrading from custom installer | ||
| procedure CurStepChanged(CurStep: TSetupStep); | ||
| var | ||
| OldUninstallString: String; | ||
| ResultCode: Integer; | ||
| begin | ||
| if CurStep = ssInstall then | ||
| begin | ||
| // Check for old custom uninstaller (remove.exe) | ||
| if FileExists(ExpandConstant('{app}\remove.exe')) then | ||
| begin | ||
| // Run the old uninstaller silently | ||
| if MsgBox('A previous version of Open Salamander was detected. Would you like to uninstall it first?', | ||
| mbConfirmation, MB_YESNO) = IDYES then | ||
| begin | ||
| Exec(ExpandConstant('{app}\remove.exe'), '/S', '', SW_SHOW, ewWaitUntilTerminated, ResultCode); | ||
| end; | ||
| end; | ||
| end; | ||
| end; | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CurStepChanged checks for a legacy uninstaller at '{app}\remove.exe', but DefaultDirName is now '{autopf}\Open Salamander'. If the legacy installer used a different default directory, this detection will miss most upgrades unless the user manually selects the old install folder. Consider detecting/removing the legacy install via its uninstall registry key or by probing the old default path before proceeding.