NeuralPi_Install_Script.iss (7678B)
1 [Setup] 2 AppName=NeuralPi 3 AppVersion=##APPVERSION## 4 DisableWelcomePage=no 5 DisableDirPage=yes 6 DefaultDirName={commoncf64} 7 DefaultGroupName=NeuralPi 8 OutputBaseFilename="NeuralPi-Win-##APPVERSION##" 9 OutputDir=. 10 LicenseFile=../../LICENSE.txt 11 SetupIconFile=../../resources/neuralpi.ico 12 13 [Types] 14 Name: "full"; Description: "Full installation" 15 Name: "custom"; Description: "Custom installation"; Flags: iscustom 16 17 [Tasks] 18 Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; \ 19 GroupDescription: "{cm:AdditionalIcons}" 20 21 [Components] 22 Name: "VST3_64"; Description: "VST3 Plugin 64-bit"; Types: full 23 Name: "VST3_32"; Description: "VST3 Plugin 32-bit"; Types: full 24 Name: "STANDALONE_64"; Description: "Standalone 64-bit"; Types: full 25 Name: "STANDALONE_32"; Description: "Standalone 32-bit"; Types: full 26 ; Name: "AAX"; Description: "AAX Plugin"; Types: full 27 28 [Files] 29 Source: "../../bin/Win64/NeuralPi.vst3"; DestDir: "{code:GetDir|VST3_64}"; Components: VST3_64; Flags: ignoreversion recursesubdirs createallsubdirs 30 Source: "../../bin/Win32/NeuralPi.vst3"; DestDir: "{code:GetDir|VST3_32}"; Components: VST3_32; Flags: ignoreversion recursesubdirs createallsubdirs 31 Source: "../../bin/Win64/NeuralPi.exe"; DestDir: "{code:GetDir|STANDALONE_64}"; Components: STANDALONE_64; Flags: ignoreversion recursesubdirs createallsubdirs 32 Source: "../../bin/Win32/NeuralPi.exe"; DestDir: "{code:GetDir|STANDALONE_32}"; Components: STANDALONE_32; Flags: ignoreversion recursesubdirs createallsubdirs 33 Source: "../../resources/neuralpi.ico"; Components: STANDALONE_64; DestDir: "{pf64}\GuitarML" 34 Source: "../../resources/neuralpi.ico"; Components: STANDALONE_32; DestDir: "{pf32}\GuitarML" 35 36 [Icons] 37 Name: "{userdesktop}\NeuralPi"; Filename: "{pf64}\GuitarML\NeuralPi.exe"; \ 38 IconFilename: "{pf64}\GuitarML\neuralpi.ico"; Tasks: desktopicon; 39 Name: "{userdesktop}\NeuralPi32"; Filename: "{pf32}\GuitarML\NeuralPi.exe"; \ 40 IconFilename: "{pf32}\GuitarML\neuralpi.ico"; Tasks: desktopicon; 41 42 [Code] 43 var 44 AAXDirPage: TInputDirWizardPage; 45 Vst3_64DirPage: TinputDirWizardPage; 46 Vst3_32DirPage: TinputDirWizardPage; 47 Standalone_64DirPage: TinputDirWizardPage; 48 Standalone_32DirPage: TinputDirWizardPage; 49 50 procedure InitializeWizard; 51 begin 52 Log('Initializing extra pages') 53 //AAX Dir Page 54 AAXDirPage := CreateInputDirPage(wpSelectComponents, 55 'Select AAX Install Location', 'Where would you like to install the AAX plugin?', 56 'AAX plugin will be installed in the following folder.'#13#10#13#10 + 57 'To continue, click Next. If you would like to select a different folder, click Browse.', 58 False, 'New Folder'); 59 60 AAXDirPage.add(''); 61 AAXDirPage.values[0] := ExpandConstant('{commoncf64}\Avid\Audio\Plug-Ins'); 62 63 //VST3 64-bit Dir Page 64 Vst3_64DirPage := CreateInputDirPage(AAXDirPage.ID, 65 'Select Install Location for VST3 64-bit', 'Where would you like to install the plugin?', 66 'VST3 64-bit plugin will be installed in the following folder.'#13#10#13#10 + 67 'To continue, click Next. If you would like to select a different folder, click Browse.', 68 False, 'New Folder'); 69 70 Vst3_64DirPage.add(''); 71 Vst3_64DirPage.values[0] := ExpandConstant('{commoncf64}\VST3'); 72 73 74 //VST3 32-bit Dir Page 75 Vst3_32DirPage := CreateInputDirPage(Vst3_64DirPage.ID, 76 'Select Install Location for VST3 32-bit', 'Where would you like to install the plugin?', 77 'VST3 32-bit plugin will be installed in the following folder.'#13#10#13#10 + 78 'To continue, click Next. If you would like to select a different folder, click Browse.', 79 False, 'New Folder'); 80 81 Vst3_32DirPage.add(''); 82 Vst3_32DirPage.values[0] := ExpandConstant('{commoncf32}\VST3'); 83 84 //Standalone 64-bit Dir Page 85 Standalone_64DirPage := CreateInputDirPage(Vst3_32DirPage.ID, 86 'Select Install Location for Standalone 64-bit', 'Where would you like to install the plugin?', 87 'Standalone 64-bit plugin will be installed in the following folder.'#13#10#13#10 + 88 'To continue, click Next. If you would like to select a different folder, click Browse.', 89 False, 'New Folder'); 90 91 Standalone_64DirPage.add(''); 92 Standalone_64DirPage.values[0] := ExpandConstant('{pf64}\GuitarML'); 93 94 95 //Standalone 32-bit Dir Page 96 Standalone_32DirPage := CreateInputDirPage(Standalone_64DirPage.ID, 97 'Select Install Location for Standalone 32-bit', 'Where would you like to install the plugin?', 98 'Standalone 32-bit plugin will be installed in the following folder.'#13#10#13#10 + 99 'To continue, click Next. If you would like to select a different folder, click Browse.', 100 False, 'New Folder'); 101 102 Standalone_32DirPage.add(''); 103 Standalone_32DirPage.values[0] := ExpandConstant('{pf32}\GuitarML'); 104 105 end; 106 107 function IsSelected(Param: String) : Boolean; 108 begin 109 if not (Pos(Param, WizardSelectedComponents(False)) = 0) then // WizardSelectedComponents(False)) then 110 Result := True 111 end; 112 113 function ShouldSkipPage(PageID: Integer): Boolean; 114 begin 115 { Skip pages that shouldn't be shown } 116 Result := False; 117 118 if (PageID = AAXDirPage.ID) then 119 begin 120 Result := True; 121 Log('Selected 1: ' + WizardSelectedComponents(False)); 122 123 if IsSelected ('aax') then 124 begin 125 Log('Not Skipping page'); 126 Result := False; 127 end 128 end 129 130 else if (PageID = Vst3_64DirPage.ID) then 131 begin 132 Result := True; 133 Log('Selected 2: ' + WizardSelectedComponents(False)); 134 135 if IsSelected ('vst3_64') then 136 begin 137 Log('Not Skipping'); 138 Result := False; 139 end 140 end 141 142 else if (PageID = Vst3_32DirPage.ID) then 143 begin 144 Result := True; 145 Log('Selected 3: ' + WizardSelectedComponents(False)); 146 147 if IsSelected ('vst3_32') then 148 begin 149 Log('Not Skipping'); 150 Result := False; 151 end 152 end 153 154 else if (PageID = Standalone_64DirPage.ID) then 155 begin 156 Result := True; 157 Log('Selected 4: ' + WizardSelectedComponents(False)); 158 159 if IsSelected ('standalone_64') then 160 begin 161 Log('Not Skipping'); 162 Result := False; 163 end 164 end 165 166 else if (PageID = Standalone_32DirPage.ID) then 167 begin 168 Result := True; 169 Log('Selected 5: ' + WizardSelectedComponents(False)); 170 171 if IsSelected ('standalone_32') then 172 begin 173 Log('Not Skipping'); 174 Result := False; 175 end 176 end 177 178 end; 179 180 function GetDir(Param: String) : String; 181 begin 182 if (Param = 'AAX') then 183 Result := AAXDirPage.values[0] 184 else if (Param = 'VST3_64') then 185 Result := Vst3_64DirPage.values[0] 186 else if (Param = 'VST3_32') then 187 Result := Vst3_32DirPage.values[0] 188 else if (Param = 'STANDALONE_64') then 189 Result := Standalone_64DirPage.values[0] 190 else if (Param = 'STANDALONE_32') then 191 Result := Standalone_32DirPage.values[0] 192 end; 193 194 function UpdateReadyMemo(Space, NewLine, MemoUserInfoInfo, MemoDirInfo, MemoTypeInfo, 195 MemoComponentsInfo, MemoGroupInfo, MemoTasksInfo: String): String; 196 var 197 S: String; 198 begin 199 { Fill the 'Ready Memo' with the normal settings and the custom settings } 200 S := ''; 201 S := S + MemoTypeInfo + NewLine + NewLine; 202 S := S + MemoComponentsInfo + NewLine + NewLine; 203 S := S + 'Destination Location:' + NewLine; 204 205 if IsSelected('aax') then 206 S := S + Space + GetDir('AAX') + ' (AAX)' + NewLine; 207 208 if IsSelected('vst3_64') then 209 S := S + Space + GetDir('VST3_64') + ' (VST3 64-bit)' + NewLine; 210 211 if IsSelected('vst3_32') then 212 S := S + Space + GetDir('VST3_32') + ' (VST3 32-bit)' + NewLine; 213 214 if IsSelected('standalone_64') then 215 S := S + Space + GetDir('STANDALONE_64') + ' (Standalone 64-bit)' + NewLine; 216 217 if IsSelected('standalone_32') then 218 S := S + Space + GetDir('STANDALONE_32') + ' (Standalone 32-bit)' + NewLine; 219 220 Result := S; 221 end;