ChowTapeModel_Install_Script_32bit.iss (5894B)
1 #define MyAppPublisher "Chowdhury DSP" 2 #define MyAppURL "https://chowdsp.com" 3 #define MyAppName "ChowTapeModel" 4 #define MyAppVersion "##APPVERSION##" 5 6 [Setup] 7 AppName="{#MyAppName} {#MyAppVersion}" 8 AppVersion={#MyAppVersion} 9 AppVerName={#MyAppName} 10 AppPublisher={#MyAppPublisher} 11 AppPublisherURL={#MyAppURL} 12 AppSupportURL={#MyAppURL} 13 AppUpdatesURL={#MyAppURL} 14 DefaultDirName={commonpf32}\Chowdhury DSP\ 15 DefaultGroupName={#MyAppName} 16 DisableProgramGroupPage=yes 17 DisableDirPage=yes 18 DisableWelcomePage=no 19 LicenseFile=../../../LICENSE 20 OutputBaseFilename="ChowTapeModel-Win-32bit-{#MyAppVersion}" 21 OutputDir=. 22 SetupIconFile=chowtape.ico 23 UninstallDisplayIcon=chowtape.ico 24 UninstallFilesDir={commonpf32}\Chowdhury DSP\{#MyAppName} 25 Compression=lzma 26 SolidCompression=yes 27 28 [Types] 29 Name: "full"; Description: "Full installation" 30 Name: "custom"; Description: "Custom installation"; Flags: iscustom 31 32 [Components] 33 Name: "VST3_32"; Description: "VST3 Plugin"; Types: full 34 Name: "VST_32"; Description: "VST Plugin"; Types: full 35 Name: "CLAP_32"; Description: "CLAP Plugin"; Types: full 36 Name: "Standalone"; Description: "Standalone Plugin"; Types: full 37 38 [Files] 39 Source: "../../Bin/Win32/CHOWTapeModel.vst3"; Excludes: "*.aaxplugin,*.clap"; DestDir: "{code:GetDir|VST3_32}"; Components: VST3_32; Flags: ignoreversion recursesubdirs createallsubdirs 40 Source: "../../Bin/Win32/CHOWTapeModel.dll"; Excludes: "*.vst3,*.aaxplugin,*.clap"; DestDir: "{code:GetDir|VST_32}"; Components: VST_32; Flags: ignoreversion recursesubdirs createallsubdirs 41 Source: "../../Bin/Win32/CHOWTapeModel.clap"; Excludes: "*.vst3,*.aaxplugin"; DestDir: "{code:GetDir|CLAP_32}"; Components: CLAP_32; Flags: ignoreversion recursesubdirs createallsubdirs 42 Source: "../../Bin/Win32/CHOWTapeModel.exe"; Excludes: "*.vst3,*.aaxplugin,*.clap"; DestDir: "{code:GetDir|Standalone}"; Components: Standalone; Flags: ignoreversion recursesubdirs createallsubdirs 43 44 [Icons] 45 Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" 46 47 [Code] 48 var 49 Vst3_32DirPage: TinputDirWizardPage; 50 Vst_32DirPage: TinputDirWizardPage; 51 StandaloneDirPage: TinputDirWizardPage; 52 53 procedure InitializeWizard; 54 begin 55 Log('Initializing extra pages') 56 //VST3 32-bit Dir Page 57 Vst3_32DirPage := CreateInputDirPage(wpSelectComponents, 58 'Select Install Location for VST3 32-bit', 'Where would you like to install the plugin?', 59 'VST3 32-bit plugin will be installed in the following folder.'#13#10#13#10 + 60 'To continue, click Next. If you would like to select a different folder, click Browse.', 61 False, 'New Folder'); 62 63 Vst3_32DirPage.add(''); 64 Vst3_32DirPage.values[0] := ExpandConstant('{commoncf32}\VST3'); 65 66 //VST 32-bit Dir Page 67 Vst_32DirPage := CreateInputDirPage(Vst3_32DirPage.ID, 68 'Select Install Location for VST 32-bit', 'Where would you like to install the plugin?', 69 'VST 32-bit plugin will be installed in the following folder.'#13#10#13#10 + 70 'To continue, click Next. If you would like to select a different folder, click Browse.', 71 False, 'New Folder'); 72 73 Vst_32DirPage.add(''); 74 Vst_32DirPage.values[0] := ExpandConstant('{commoncf32}\VST'); 75 76 //Standalone Dir Page 77 StandaloneDirPage := CreateInputDirPage(Vst_32DirPage.ID, 78 'Select Install Location for Standalone', 'Where would you like to install the plugin?', 79 'Standalone plugin will be installed in the following folder.'#13#10#13#10 + 80 'To continue, click Next. If you would like to select a different folder, click Browse.', 81 False, 'New Folder'); 82 StandaloneDirPage.add(''); 83 StandaloneDirPage.values[0] := ExpandConstant('{pf32}\Chowdhury DSP'); 84 end; 85 86 function IsSelected(Param: String) : Boolean; 87 begin 88 if not (Pos(Param, WizardSelectedComponents(False)) = 0) then // WizardSelectedComponents(False)) then 89 Result := True 90 end; 91 92 function ShouldSkipPage(PageID: Integer): Boolean; 93 begin 94 { Skip pages that shouldn't be shown } 95 Result := False; 96 97 if (PageID = Vst3_32DirPage.ID) then 98 begin 99 Result := True; 100 Log('Selected 3: ' + WizardSelectedComponents(False)); 101 102 if IsSelected ('vst3_32') then 103 begin 104 Log('Not Skipping'); 105 Result := False; 106 end 107 end 108 109 else if (PageID = Vst_32DirPage.ID) then 110 begin 111 Result := True; 112 Log('Selected 5: ' + WizardSelectedComponents(False)); 113 114 if IsSelected ('vst_32') then 115 begin 116 Log('Not Skipping'); 117 Result := False; 118 end 119 end 120 121 else if (PageID = StandaloneDirPage.ID) then 122 begin 123 Result := True; 124 Log('Selected 6: ' + WizardSelectedComponents(False)); 125 if IsSelected ('standalone') then 126 begin 127 Log('Not Skipping'); 128 Result := False; 129 end 130 end 131 end; 132 133 function GetDir(Param: String) : String; 134 begin 135 if (Param = 'VST3_32') then 136 Result := Vst3_32DirPage.values[0] 137 else if (Param = 'VST_32') then 138 Result := Vst_32DirPage.values[0] 139 else if (Param = 'Standalone') then 140 Result := StandaloneDirPage.values[0] 141 else if (Param = 'CLAP_32') then 142 Result := ExpandConstant('{commoncf32}\CLAP') 143 end; 144 145 function UpdateReadyMemo(Space, NewLine, MemoUserInfoInfo, MemoDirInfo, MemoTypeInfo, 146 MemoComponentsInfo, MemoGroupInfo, MemoTasksInfo: String): String; 147 var 148 S: String; 149 begin 150 { Fill the 'Ready Memo' with the normal settings and the custom settings } 151 S := ''; 152 S := S + MemoTypeInfo + NewLine + NewLine; 153 S := S + MemoComponentsInfo + NewLine + NewLine; 154 S := S + 'Destination Location:' + NewLine; 155 156 if IsSelected('vst3_32') then 157 S := S + Space + GetDir('VST3_32') + ' (VST3 32-bit)' + NewLine; 158 159 if IsSelected('vst_32') then 160 S := S + Space + GetDir('VST_32') + ' (VST 32-bit)' + NewLine; 161 162 if IsSelected('clap_32') then 163 S := S + Space + GetDir('CLAP_32') + ' (CLAP 32-bit)' + NewLine; 164 165 if IsSelected('standalone') then 166 S := S + Space + GetDir('Standalone') + ' (Standalone)' + NewLine; 167 168 Result := S; 169 end;