Skip to content

Commit

Permalink
Lots of Windows installer improvements (#5793)
Browse files Browse the repository at this point in the history
Cleaner code (used constants more)
Modern installer mode (resizable window and bigger by default)
Added shortcut to standalone in Start menu
Moved standalone to pf/SST/Surge XT instead of pf/SST
Added separately choosable Patches and Wavetables components
Added Minimal installation type
Added commented out constants that define {SURGE_SRC} and {SURGE_BIN} for local installs
Only show paths for relevant selected components on the final installer screen

Closes #5787
  • Loading branch information
mkruselj authored Jan 22, 2022
1 parent 6b42b59 commit d751bb3
Show file tree
Hide file tree
Showing 3 changed files with 172 additions and 79 deletions.
Binary file added scripts/installer_win/empty.bmp
Binary file not shown.
120 changes: 83 additions & 37 deletions scripts/installer_win/surge32.iss
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
#define MyAppPublisher "Surge Synth Team"
#define MyAppURL "http://www.surge-synth-team.org/"
#define MyAppURL "https://www.surge-synth-team.org/"
#define MyAppName "Surge XT"
#define MyAppNameCondensed "SurgeXT"
#define MyAppVersion GetEnv('SURGE_VERSION')
#define MyID "69F3FE96-DEEC-4C7C-B72D-E8957EC8411C"

#if MyAppVersion == ""
#define MyAppVersion "0.0.0"
#endif

; uncomment these two lines if building the installer locally!
;#define SURGE_SRC "..\..\"
;#define SURGE_BIN "..\..\build\"

[Setup]
AppId={#MyID}
AppName="{#MyAppName} {#MyAppVersion}"
Expand All @@ -17,35 +22,42 @@ AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={commoncf32}\VST3\Surge Synth Team\
DefaultGroupName=Surge XT
DefaultDirName={commoncf32}\VST3\{#MyAppPublisher}\
DefaultGroupName={#MyAppName}
DisableProgramGroupPage=yes
DisableDirPage=yes
DisableReadyPage=no
LicenseFile={#SURGE_SRC}\LICENSE
OutputBaseFilename="surge-xt-win32-{#MyAppVersion}-setup"
OutputBaseFilename=surge-xt-win32-{#MyAppVersion}-setup
SetupIconFile={#SURGE_SRC}\scripts\installer_win\surge.ico
UninstallDisplayIcon={uninstallexe}
UsePreviousAppDir=yes
Compression=lzma
SolidCompression=yes
UninstallFilesDir={commonappdata}\Surge XT\uninstall\x86\
CloseApplicationsFilter=*.exe,*.dll,*.vst3,*.ttf
UninstallFilesDir={commonappdata}\{#MyAppName}\uninstall
CloseApplicationsFilter=*.exe,*.vst3,*.ttf
WizardStyle=modern
; replacing that gnarly old blue computer icon in top right with... nothing!
WizardSmallImageFile={#SURGE_SRC}\scripts\installer_win\empty.bmp
WizardImageAlphaFormat=defined

[InstallDelete]
; clean up factory data folders
Type: filesandordirs; Name: "{commonappdata}\Surge XT\fx_presets"
Type: filesandordirs; Name: "{commonappdata}\Surge XT\modulator_presets"
Type: filesandordirs; Name: "{commonappdata}\Surge XT\patches_3rdparty"
Type: filesandordirs; Name: "{commonappdata}\Surge XT\patches_factory"
Type: filesandordirs; Name: "{commonappdata}\Surge XT\skins"
Type: filesandordirs; Name: "{commonappdata}\Surge XT\tuning_library"
Type: filesandordirs; Name: "{commonappdata}\Surge XT\wavetables"
Type: filesandordirs; Name: "{commonappdata}\Surge XT\wavetables_3rdparty"
Type: filesandordirs; Name: "{commonappdata}\{#MyAppName}\fx_presets"
Type: filesandordirs; Name: "{commonappdata}\{#MyAppName}\modulator_presets"
Type: filesandordirs; Name: "{commonappdata}\{#MyAppName}\patches_3rdparty"
Type: filesandordirs; Name: "{commonappdata}\{#MyAppName}\patches_factory"
Type: filesandordirs; Name: "{commonappdata}\{#MyAppName}\skins"
Type: filesandordirs; Name: "{commonappdata}\{#MyAppName}\tuning_library"
Type: filesandordirs; Name: "{commonappdata}\{#MyAppName}\wavetables"
Type: filesandordirs; Name: "{commonappdata}\{#MyAppName}\wavetables_3rdparty"
; clean up the mess from Surge XT 1.0 nightlies prior to PR #5727
Type: filesandordirs; Name: "{commoncf32}\VST3\Surge Synth Team\Contents"
Type: filesandordirs; Name: "{commoncf32}\VST3\Surge Synth Team\desktop.ini"
Type: filesandordirs; Name: "{commoncf32}\VST3\Surge Synth Team\plugin.ico"
Type: filesandordirs; Name: "{commoncf32}\VST3\{#MyAppPublisher}\Contents"
Type: filesandordirs; Name: "{commoncf32}\VST3\{#MyAppPublisher}\desktop.ini"
Type: filesandordirs; Name: "{commoncf32}\VST3\{#MyAppPublisher}\plugin.ico"
; clean up Surge XT 1.0 release stuff
Type: filesandordirs; Name: "{commonpf32}\{#MyAppPublisher}\{#MyAppName}.exe"
Type: filesandordirs; Name: "{group}\{#MyAppName}"

[Components]
Name: VST3; Description: Surge XT VST3 (32-bit); Types: full compact custom; Flags: checkablealone
Expand All @@ -54,29 +66,45 @@ Name: SA; Description: Surge XT Standalone (32-bit); Types: full custom; Flags:
Name: EffectsSA; Description: Surge XT Effects Standalone (32-bit); Types: full custom; Flags: checkablealone
Name: Data; Description: Data Files; Types: full compact custom; Flags: fixed

[Types]
Name: "full"; Description: "Full installation"
Name: "compact"; Description: "Compact installation"
Name: "custom"; Description: "Custom installation"; Flags: iscustom
Name: "minimal"; Description: "Minimal installation"

[Files]
Source: {#SURGE_SRC}\resources\data\*; DestDir: {commonappdata}\Surge XT\; Components: Data; Flags: recursesubdirs; Excludes: "*.git,windows.wt,configuration.xml,paramdocumentation.xml";
Source: {#SURGE_SRC}\resources\fonts\FiraMono-Regular.ttf; DestDir: "{fonts}"; Components: Data; FontInstall: "Fira Mono"; Flags: uninsneveruninstall
Source: {#SURGE_SRC}\resources\fonts\IndieFlower.ttf; DestDir: "{fonts}"; Components: Data; FontInstall: "Indie Flower"; Flags: uninsneveruninstall
Source: {#SURGE_SRC}\resources\fonts\Lato-Regular.ttf; DestDir: "{fonts}"; Components: Data; FontInstall: "Lato"; Flags: uninsneveruninstall
Source: {#SURGE_SRC}\resources\fonts\Lato-Bold.ttf; DestDir: "{fonts}"; Components: Data; FontInstall: "Lato Bold"; Flags: uninsneveruninstall
Source: {#SURGE_SRC}\resources\fonts\Lato-BoldItalic.ttf; DestDir: "{fonts}"; Components: Data; FontInstall: "Lato Bold Italic"; Flags: uninsneveruninstall
Source: {#SURGE_SRC}\resources\fonts\Lato-Italic.ttf; DestDir: "{fonts}"; Components: Data; FontInstall: "Lato Italic"; Flags: uninsneveruninstall
Source: {#SURGE_BIN}\surge_xt_products\Surge XT (32-bit).vst3\*; DestDir: {commoncf32}\VST3\Surge Synth Team\Surge XT (32-bit).vst3\; Components: VST3; Flags: ignoreversion recursesubdirs
Source: {#SURGE_BIN}\surge_xt_products\Surge XT Effects (32-bit).vst3\*; DestDir: {commoncf32}\VST3\Surge Synth Team\Surge XT Effects (32-bit).vst3\; Components: EffectsVST3; Flags: ignoreversion skipifsourcedoesntexist recursesubdirs
Source: {#SURGE_BIN}\surge_xt_products\Surge XT (32-bit).exe; DestDir: {commonpf32}\Surge Synth Team\; Components: SA; Flags: ignoreversion
Source: {#SURGE_BIN}\surge_xt_products\Surge XT Effects (32-bit).exe; DestDir: {commonpf32}\Surge Synth Team\; Components: EffectsSA; Flags: ignoreversion
Source: {#SURGE_SRC}\resources\data\fx_presets\*; DestDir: {commonappdata}\{#MyAppName}\fx_presets\; Components: Data; Flags: recursesubdirs
Source: {#SURGE_SRC}\resources\data\modulator_presets\*; DestDir: {commonappdata}\{#MyAppName}\modulator_presets\; Components: Data; Flags: recursesubdirs
Source: {#SURGE_SRC}\resources\data\skins\*; DestDir: {commonappdata}\{#MyAppName}\skins\; Components: Data; Flags: recursesubdirs
Source: {#SURGE_SRC}\resources\data\tuning_library\*; DestDir: {commonappdata}\{#MyAppName}\tuning_library\; Components: Data; Flags: recursesubdirs
Source: {#SURGE_SRC}\resources\data\patches_factory\Templates\*; DestDir: {commonappdata}\{#MyAppName}\patches_factory\Templates\; Components: Data; Flags: recursesubdirs
Source: {#SURGE_SRC}\resources\data\patches_factory\Tutorials\*; DestDir: {commonappdata}\{#MyAppName}\patches_factory\Tutorials\; Components: Data; Flags: recursesubdirs
Source: {#SURGE_SRC}\resources\data\patches_factory\*; DestDir: {commonappdata}\{#MyAppName}\patches_factory\; Components: Patches; Flags: recursesubdirs
Source: {#SURGE_SRC}\resources\data\patches_3rdparty\*; DestDir: {commonappdata}\{#MyAppName}\patches_3rdparty\; Components: Patches; Flags: recursesubdirs
Source: {#SURGE_SRC}\resources\data\wavetables\*; DestDir: {commonappdata}\{#MyAppName}\wavetables\; Components: Wavetables; Flags: recursesubdirs
Source: {#SURGE_SRC}\resources\data\wavetables_3rdparty\*; DestDir: {commonappdata}\{#MyAppName}\wavetables_3rdparty\; Components: Wavetables; Flags: recursesubdirs
Source: {#SURGE_SRC}\resources\fonts\FiraMono-Regular.ttf; DestDir: "{fonts}"; Components: Data; FontInstall: "Fira Mono"; Flags: onlyifdoesntexist uninsneveruninstall
Source: {#SURGE_SRC}\resources\fonts\IndieFlower.ttf; DestDir: "{fonts}"; Components: Data; FontInstall: "Indie Flower"; Flags: onlyifdoesntexist uninsneveruninstall
Source: {#SURGE_SRC}\resources\fonts\Lato-Regular.ttf; DestDir: "{fonts}"; Components: Data; FontInstall: "Lato"; Flags: onlyifdoesntexist uninsneveruninstall
Source: {#SURGE_SRC}\resources\fonts\Lato-Bold.ttf; DestDir: "{fonts}"; Components: Data; FontInstall: "Lato Bold"; Flags: onlyifdoesntexist uninsneveruninstall
Source: {#SURGE_SRC}\resources\fonts\Lato-BoldItalic.ttf; DestDir: "{fonts}"; Components: Data; FontInstall: "Lato Bold Italic"; Flags: onlyifdoesntexist uninsneveruninstall
Source: {#SURGE_SRC}\resources\fonts\Lato-Italic.ttf; DestDir: "{fonts}"; Components: Data; FontInstall: "Lato Italic"; Flags: onlyifdoesntexist uninsneveruninstall
Source: {#SURGE_BIN}\surge_xt_products\{#MyAppName} (32-bit).vst3\*; DestDir: {commoncf32}\VST3\{#MyAppPublisher}\{#MyAppName} (32-bit).vst3\; Components: VST3; Flags: ignoreversion recursesubdirs
Source: {#SURGE_BIN}\surge_xt_products\{#MyAppName} Effects (32-bit).vst3\*; DestDir: {commoncf32}\VST3\{#MyAppPublisher}\{#MyAppName} Effects (32-bit).vst3\; Components: EffectsVST3; Flags: ignoreversion skipifsourcedoesntexist recursesubdirs
Source: {#SURGE_BIN}\surge_xt_products\{#MyAppName} (32-bit).exe; DestDir: {commonpf32}\{#MyAppPublisher}\{#MyAppName}\; Components: SA; Flags: ignoreversion
Source: {#SURGE_BIN}\surge_xt_products\{#MyAppName} Effects (32-bit).exe; DestDir: {commonpf32}\{#MyAppPublisher}\{#MyAppName}\; Components: EffectsSA; Flags: ignoreversion

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Icons]
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{group}\{#MyAppPublisher}\{#MyAppName}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{group}\{#MyAppPublisher}\{#MyAppName}\{#MyAppName}"; Filename: "{commonpf64}\{#MyAppPublisher}\{#MyAppName}\{#MyAppName} (32-bit).exe"; WorkingDir: "{commonpf64}\{#MyAppPublisher}\{#MyAppName}"

[Run]
Filename: "{cmd}"; \
WorkingDir: "{commoncf32}\VST3"; \
Parameters: "/C mklink /D /J ""{commoncf32}\VST3\Surge Synth Team\SurgeXTData"" ""{commonappdata}\Surge XT"""; \
Parameters: "/C mklink /D /J ""{commoncf32}\VST3\{#MyAppPublisher}\{#MyAppNameCondensed}Data"" ""{commonappdata}\{#MyAppName}"""; \
Flags: runascurrentuser

[Code]
Expand All @@ -85,16 +113,34 @@ begin
if Info <> '' then Memo := Memo + Info + Newline + NewLine;
end;
function UpdateReadyMemo(
Space, NewLine, MemoUserInfoInfo, MemoDirInfo, MemoTypeInfo, MemoComponentsInfo,
MemoGroupInfo, MemoTasksInfo: String): String;
function IsSelected(Param: String) : Boolean;
begin
if not (Pos(Param, WizardSelectedComponents(False)) = 0) then
Result := True
end;
function UpdateReadyMemo(Space, NewLine, MemoUserInfoInfo, MemoDirInfo, MemoTypeInfo, MemoComponentsInfo,
MemoGroupInfo, MemoTasksInfo: String): String;
var
AppData, CF, PF, AppName, AppPublisher, AppNameCondensed : String;
begin
AddToReadyMemo(Result, MemoComponentsInfo, NewLine);
AppData := ExpandConstant('{commonappdata}');
CF := ExpandConstant('{commoncf32}');
PF := ExpandConstant('{commonpf32}');
AppName := ExpandConstant('{#MyAppName}');
AppNameCondensed := ExpandConstant('{#MyAppNameCondensed}');
AppPublisher := ExpandConstant('{#MyAppPublisher}');
Result := Result + 'Installation Locations:' + NewLine
Result := Result + Space + 'Data Files: ' + ExpandConstant( '{commonappdata}' ) + '\Surge XT' + NewLine
Result := Result + Space + 'VST3 Plugins: ' + ExpandConstant( '{commoncf32}' ) + '\VST3\Surge Synth Team' + NewLine
Result := Result + Space + 'Standalone: ' + ExpandConstant( '{commonpf32}' ) + '\Surge Synth Team' + NewLine
Result := Result + Space + 'Portable Junction: ' + ExpandConstant( '{commoncf32}' ) + '\VST3\Surge Synth Team\SurgeXTData' + NewLine
Result := Result + Space + 'Data Files: ' + AppData + '\' + AppName + NewLine
if IsSelected('vst3') or IsSelected('effectsvst3') then
Result := Result + Space + 'VST3: ' + CF + '\VST3\' + AppPublisher + '\' + NewLine;
if IsSelected('sa') or IsSelected('effectssa') then
Result := Result + Space + 'Standalone: ' + PF + '\' + AppPublisher + '\' + AppName + '\' + NewLine;
Result := Result + Space + 'Portable Junction: ' + CF + '\VST3\' + AppPublisher + '\' + AppNameCondensed + 'Data' + NewLine
end;
Loading

0 comments on commit d751bb3

Please sign in to comment.