Login / Register  0 items | $0.00 New What is KVR? Submit News Advertise

nsis / innosetup installer scripts

hibrasil
KVRian
 
700 posts since 23 Jun, 2002, from York, UK

Postby hibrasil; Wed Sep 28, 2011 11:42 pm nsis / innosetup installer scripts

i'm working on a new installer for the windows version of endless series

I need to optionally install 32/64bit vst2, vst3, rtas, .exe & manual

I am getting there now with NSIS but i still have a way to go

just feeling lazy & wondered if anyone has any example scripts they could post for complex plugin installers such as this

;-)

thanks,

oli
VirtualCZ | pMix | Endless Series | WDL-OL |Linkedin

Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
sonigen
KVRian
 
546 posts since 23 Nov, 2010

Postby sonigen; Thu Sep 29, 2011 12:28 am

hibrasil wrote:I am getting there now with NSIS but i still have a way to go


I started off using NSIS but after much frustration and unhappiness with the general syntax and strange workings of it I gave InnoSetup a go. I did use NSIS for a couple of months, but it's just got the most idiotic and awful syntax IMO. I get the feeling it was designed backwards, to make it easy to implement and parse, rather than to make it easy to use.

In about 4 hours with InnoSetup I had an Installer that did everything my NSIS one did, was easier to understand, and has proven much easier to maintain.

And if you know Pascal it's really easy to customize InnoSetup too.

The only plus for NSIS is that you get a smaller installer, but it's only about 300k difference i think, which is no big deal if the overall installer size is a couple of megabytes.
Chris Jones
www.sonigen.com
User avatar
discoDSP
KVRAF
 
3269 posts since 17 Jul, 2002

Postby discoDSP; Thu Sep 29, 2011 1:25 am

I'd recommend InnoSetup + IsTool.
discoDSP Plug-Ins | Synths | Sampler | FX
hibrasil
KVRian
 
700 posts since 23 Jun, 2002, from York, UK

Postby hibrasil; Thu Sep 29, 2011 1:32 am

i tried innosetup and it seems much easier to use than NSIS. thanks guys
VirtualCZ | pMix | Endless Series | WDL-OL |Linkedin

Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
User avatar
discoDSP
KVRAF
 
3269 posts since 17 Jul, 2002

Postby discoDSP; Thu Sep 29, 2011 2:00 am

Here it is a small template

Code: Select all
[Setup]
DefaultDirName={reg:HKLM\SOFTWARE\VST,VSTPluginsPath|{pf}\Steinberg\VSTPlugins}\
Compression=lzma2/ultra64
AppName=AppNameHere
AppVerName=AppNameHere
AppPublisher=Publisher
AppPublisherURL=http://www.publisher.com
AppSupportURL=http://www.publisher.com/contact/
AppUpdatesURL=http://www.publisher.com/
AppVersion=1
DefaultGroupName=Publisher
AllowRootDirectory=true
DirExistsWarning=no
OutputDir=./
OutputBaseFilename=SetupAppName
DisableReadyPage=false
ShowLanguageDialog=no
LicenseFile=license.txt
InternalCompressLevel=ultra
SolidCompression=true
VersionInfoVersion=1
VersionInfoCompany=Publisher
VersionInfoDescription=AppNameHere
SetupIconFile=setup.ico
UninstallIconFile=setup.ico
InfoBeforeFile=
AppContact=http://www.publisher.com/contact
WizardImageFile=WizModernImage.bmp
AppID=APPID
WizardSmallImageFile=WizSmall.bmp

[Types]
Name: VST; Description: VST 32 bit
Name: VST64; Description: VST 64 bit
Name: RTAS; Description: RTAS
Name: Custom; Description: Custom Install; Flags: iscustom

[Components]
Name: VST; Description: VST 32 bit; Types: VST; Flags: checkablealone
Name: VST64; Description: VST 64 bit; Types: VST64; Flags: checkablealone
Name: RTAS; Description: RTAS; Types: RTAS; Flags: checkablealone

[Files]
Source: Demo.dll; DestDir: {app}\; Components: VST
Source: 64Demo.dll; DestDir: {app}\; Components: VST64
Source: RTASDemo.dpm; DestDir: {cf}\Digidesign\DAE\Plugins\; Components: RTAS
Source: RTASDemo.dpm.rsr; DestDir: {cf}\Digidesign\DAE\Plugins\; Components: RTAS

[Icons]
Name: {group}\Uninstall AppName; Filename: {uninstallexe}

[Dirs]
Name: {cf}\Digidesign\DAE\Plugins\
discoDSP Plug-Ins | Synths | Sampler | FX
hibrasil
KVRian
 
700 posts since 23 Jun, 2002, from York, UK

Postby hibrasil; Thu Sep 29, 2011 2:43 am

wow, thanks very much, that's very helpful.

I have built a working installer doing the things i mentioned above already with innosetup! wish i'd tried it before NSIS!
i'm going to try and add options for the VST2 plugin path, incase the user wants to put it in a different folder than whats in the registry. will post my finished script here
VirtualCZ | pMix | Endless Series | WDL-OL |Linkedin

Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
hibrasil
KVRian
 
700 posts since 23 Jun, 2002, from York, UK

Postby hibrasil; Thu Sep 29, 2011 1:30 pm

here is my new innosetup script... hope it helps someone else

in the component list the size in MB is only shown for one item. not sure if this is an error on my part or a bug in innosetup


Code: Select all
[Setup]
AppName=IPlugEffect
AppVersion=1.0.0
DefaultDirName={pf}\IPlugEffect
DefaultGroupName=IPlugEffect
Compression=lzma2
SolidCompression=yes
OutputDir=.\
ArchitecturesInstallIn64BitMode=x64
OutputBaseFilename=IPlugEffect Installer
LicenseFile=license.rtf
SetupLogging=yes

[Types]
Name: "full"; Description: "Full installation"
Name: "custom"; Description: "Custom installation"; Flags: iscustom

[Components]
Name: "app"; Description: "Standalone application (.exe)"; Types: full custom;
Name: "vst2_32"; Description: "32-bit VST2 Plugin (.dll)"; Types: full custom;
Name: "vst2_64"; Description: "64-bit VST2 Plugin (.dll)"; Types: full custom; Check: Is64BitInstallMode;
Name: "vst3_32"; Description: "32-bit VST3 Plugin (.vst3)"; Types: full custom;
Name: "vst3_64"; Description: "64-bit VST3 Plugin (.vst3)"; Types: full custom; Check: Is64BitInstallMode;
Name: "rtas_32"; Description: "32-bit RTAS Plugin (.dpm)"; Types: full custom;
Name: "manual"; Description: "User guide"; Types: full custom; Flags: fixed

[Files]
Source: "..\build-win-app\Win32\bin\IPlugEffect.exe"; DestDir: "{app}"; Check: not Is64BitInstallMode; Components:app;
Source: "..\build-win-app\x64\bin\IPlugEffect.exe"; DestDir: "{app}"; Check: Is64BitInstallMode; Components:app;

Source: "..\build-win-vst2\Win32\bin\IPlugEffect.dll"; DestDir: {code:GetVST2Dir_32}; Check: not Is64BitInstallMode; Components:vst2_32;
Source: "..\build-win-vst2\Win32\bin\IPlugEffect.dll"; DestDir: {code:GetVST2Dir_32}; Check: Is64BitInstallMode; Components:vst2_32;
Source: "..\build-win-vst2\x64\bin\IPlugEffect.dll"; DestDir: {code:GetVST2Dir_64}; Check: Is64BitInstallMode; Components:vst2_64;

Source: "..\build-win-vst3\Win32\bin\IPlugEffect.vst3"; DestDir: "{cf}\VST3\"; Check: not Is64BitInstallMode; Components:vst3_32;
Source: "..\build-win-vst3\Win32\bin\IPlugEffect.vst3"; DestDir: "{cf32}\VST3\"; Check: Is64BitInstallMode; Components:vst3_32;
Source: "..\build-win-vst3\x64\bin\IPlugEffect.vst3"; DestDir: "{cf64}\VST3\"; Check: Is64BitInstallMode; Components:vst3_64;

Source: "..\build-win-rtas\bin\IPlugEffect.dpm"; DestDir: "{cf32}\Digidesign\DAE\Plug-Ins\"; Components:rtas_32;
Source: "..\build-win-rtas\bin\IPlugEffect.dpm.rsr"; DestDir: "{cf32}\Digidesign\DAE\Plug-Ins\"; Components:rtas_32;

Source: "..\manual\IPlugEffect_manual.pdf"; DestDir: "{app}"
Source: "changelog.txt"; DestDir: "{app}"
Source: "readmewin.rtf"; DestDir: "{app}"; DestName: "readme.rtf"; Flags: isreadme

[Icons]
Name: "{group}\IPlugEffect"; Filename: "{app}\IPlugEffect.exe"
Name: "{group}\User guide"; Filename: "{app}\IPlugEffect_manual.pdf"
Name: "{group}\Changelog"; Filename: "{app}\changelog.txt"
;Name: "{group}\readme"; Filename: "{app}\readme.rtf"
Name: "{group}\Un-install IPlugEffect"; Filename: "{app}\unins000.exe"

[code]
var
  OkToCopyLog : Boolean;
  VST2DirPage_32: TInputDirWizardPage;
  VST2DirPage_64: TInputDirWizardPage;

procedure InitializeWizard;
begin
  if IsWin64 then begin
    VST2DirPage_64 := CreateInputDirPage(wpSelectDir,
    'Confirm 64-Bit VST2 Plugin Directory', '',
    'Select the folder in which setup should install the 64-bit VST2 Plugin, then click Next.',
    False, '');
    VST2DirPage_64.Add('');
    VST2DirPage_64.Values[0] := ExpandConstant('{reg:HKLM\SOFTWARE\VST,VSTPluginsPath|{pf}\Steinberg\VSTPlugins}\');

    VST2DirPage_32 := CreateInputDirPage(wpSelectDir,
      'Confirm 32-Bit VST2 Plugin Directory', '',
      'Select the folder in which setup should install the 32-bit VST2 Plugin, then click Next.',
      False, '');
    VST2DirPage_32.Add('');
    VST2DirPage_32.Values[0] := ExpandConstant('{reg:HKLM\SOFTWARE\WOW6432NODE\VST,VSTPluginsPath|{pf32}\Steinberg\VSTPlugins}\');
  end else begin
    VST2DirPage_32 := CreateInputDirPage(wpSelectDir,
      'Confirm 32-Bit VST2 Plugin Directory', '',
      'Select the folder in which setup should install the 32-bit VST2 Plugin, then click Next.',
      False, '');
    VST2DirPage_32.Add('');
    VST2DirPage_32.Values[0] := ExpandConstant('{reg:HKLM\SOFTWARE\VST,VSTPluginsPath|{pf}\Steinberg\VSTPlugins}\');
  end;
end;

function GetVST2Dir_32(Param: String): String;
begin
  Result := VST2DirPage_32.Values[0]
end;

function GetVST2Dir_64(Param: String): String;
begin
  Result := VST2DirPage_64.Values[0]
end;

procedure CurStepChanged(CurStep: TSetupStep);
begin
  if CurStep = ssDone then
    OkToCopyLog := True;
end;

procedure DeinitializeSetup();
begin
  if OkToCopyLog then
    FileCopy (ExpandConstant ('{log}'), ExpandConstant ('{app}\InstallationLogFile.log'), FALSE);
  RestartReplace (ExpandConstant ('{log}'), '');
end;

[UninstallDelete]
Type: files; Name: "{app}\InstallationLogFile.log"
[/code]
VirtualCZ | pMix | Endless Series | WDL-OL |Linkedin

Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
User avatar
andy-cytomic
KVRAF
 
1851 posts since 3 Dec, 2008

Postby andy-cytomic; Mon Nov 17, 2014 6:11 pm Re: nsis / innosetup installer scripts

I'm only just getting around to writing installers after around 5 years of just offering a .zip file with the plugins in it. Thanks for everyone sharing your scripts, this is going to save me days of work, very much appreciated!
The Glue, The Drop - www.cytomic.com
User avatar
andy-cytomic
KVRAF
 
1851 posts since 3 Dec, 2008

Postby andy-cytomic; Mon Nov 17, 2014 7:51 pm Re: nsis / innosetup installer scripts

For those using hibrasil's script a couple of edits that may help:

If your .dpm is just a renamed 32-bit vst .dll then you can do this to make your installer smaller:

Code: Select all
Source: "..\build-win-vst2\Win32\bin\IPlugEffect.dll"; DestDir: "{cf32}\Digidesign\DAE\Plug-Ins\"; DestName: "IPlugEffect.dpm"; Components:rtas_32;


and you also have to move the [UninstallDelete] section before (or anywhere out of) the [ code ] [ /code ] section
The Glue, The Drop - www.cytomic.com
joshb
KVRist
 
51 posts since 13 Apr, 2016

Postby joshb; Tue Mar 14, 2017 8:40 pm Re: nsis / innosetup installer scripts

Wow...being a Mac guy developing a cross platform plugin and knowing nothing about Windows installers, this thread and example script saved me TONS of time.

Thank you so much.

Moderator: Moderators (Main)

Return to DSP and Plug-in Development