Spark with Innosetup

Hello,

Ive compiled spark succesfully, but now Im getting a hard time to pack it into installer for windows.

I was able to pack with install4j and advanced installer, but just using the trial version of both, what is not a viable alternative to me.

When tried to pack with innosetup (spark.iss), I got a error popup:

Line 17:

Source file C:…\target\build\Spark.exe does not exist

I already found something about also to use launch4j, but have no idea about how to combine innosetup + launch4j.

Is there some guide, or can you put in few lines how to do it?

Thank you very much!

Can’t help with Inno setup. What about using Izpack? http://community.igniterealtime.org/docs/DOC-1767

1 Like

install launch4j and innosetup

edit the build.properties file to match your install path of launch4j

edit the build.properties file to match your instal path of innosetup

run “ant installer.innosetup” in terminal or eclipse or whatever

1 Like

Perfect!

Both instructions worked.

For work with innosetup I had to edit build.xml replacing the temp dir on lines 408 and 840 with C:\temp.

Thank you very much!

With inno setup I also had trouble with the sound files being picked up as well as the windows64 library. You can add these via the spark.iss file in build>installer directory.

Here is my eclipse patch for spark.iss:

Index: build/installer/spark.iss

===================================================================

— build/installer/spark.iss (revision 12218)

+++ build/installer/spark.iss (working copy)

@@ -5,25 +5,44 @@

[Setup]

AppName=Spark

-AppVerName=Spark Version 2.6.0

+AppVerName=Spark 2.6

+AppVersion=2.6.0.12218

DefaultDirName={pf}\Spark

DefaultGroupName=Spark

UninstallDisplayIcon={app}\Spark.exe

+UsePreviousAppDir=yes

+UsePreviousGroup=yes

+UsePreviousSetupType=yes

+UsePreviousTasks=yes

Compression=lzma

SolidCompression=yes

OutputDir=userdocs:Spark Setup

+PrivilegesRequired=poweruser

+[Tasks]

+Name: desktopicon; Description: “Create a &desktop icon”;

+Name: desktopicon\common; Description: “For all users”; Flags: exclusive

+Name: desktopicon\user; Description: “For the current user only”; Flags: exclusive unchecked

+Name: quicklaunchicon; Description: “Create a &Quick Launch icon”; Flags: unchecked

[Files]

Source: “…\target\build\Spark.exe”; DestDir: “{app}”

Source: “…\target\build\starter.exe”; DestDir: “{app}”

-Source: “…\target\build\lib*”; DestDir: “{app}\lib”

+Source: “…\target\build\lib*”; DestDir: “{app}\lib”

Source: “…\target\build\lib\windows*”; DestDir: “{app}\lib\windows”

+Source: “…\target\build\lib\windows64*”; DestDir: “{app}\lib\windows64”

Source: “…\target\build\plugins*”; DestDir: “{app}\plugins”

Source: “…\target\build\resources*”; DestDir: “{app}\resources”

+Source: “…\target\build\resources\sounds*”; DestDir: “{app}\resources\sounds”

Source: “…\target\build\xtra\emoticons*”; DestDir: “{app}\xtra\emoticons”

[Icons]

Name: “{group}\Spark”; Filename: “{app}\Spark.exe”

+Name: “{group}\Uninstall”; Filename: “{uninstallexe}”

+Name: “{commondesktop}\Spark”; Filename: “{app}\Spark.exe”; Tasks: desktopicon\common

+Name: “{userdesktop}\Spark”; Filename: “{app}\Spark.exe”; Tasks: desktopicon\user

+Name: “{userappdata}\Microsoft\Internet Explorer\Quick Launch\Spark”; Filename: “{app}\Spark.exe”; Tasks: quicklaunchicon

[Registry]

Root: HKCR; Subkey: “Applications\Spark.exe”; ValueName: “TaskbarGroupIcon”; ValueData: “{app}\resources\spark.ico”

``

Thank you gashmore,

I had no problems with sound files and windows64 library (at least did not detect it until now), anyway, your comment is very welcome. I will keep a eye on it.

About .iss script, I need yet tune up it, the installer is not creating the desktop icon neither the uninstaller menu item. I don`t use eclipe, so can you send me the full new .iss?

Thank you,

Tom

Here is the full iss file I use. Make sure to update the version to the correct build number.

spark.iss

Very good.

I`ve used some of your changes (unisntaller menu item and desktop icon) and translated to portuguese.

It got perfect, thank you!

If it interest to someone more, I`ve attached my spark.iss.
spark.iss.zip (942 Bytes)

I am trying to download George’s ISS file but I am unauthorized?

There is no document with such ID in the system anymore (error is a misleading). It wasn’t deleted by admin. In such case it would be still in the system available for restoring. So, either he deleted it himself or some other glitch occurred. Maybe George will see this thread and post it again. He has last logged into this site Oct 29, 2013, pretty recently. You can also try sending him a private message or email.

Looks like something must have broken with my account over time. I can no longer upload documents and all my existing ones are gone. The file isn’t that long so I will paste it below:

; – Spark.iss –

; Demonstrates copying 3 files and creating an icon.

; SEE THE DOCUMENTATION FOR DETAILS ON CREATING .ISS SCRIPT FILES!

[Setup]

AppName=Spark

AppVerName=Spark 2.6.4 Build 13738

AppVersion=2.6.4.13738

DefaultDirName={pf}\Spark

DefaultGroupName=Spark

UninstallDisplayIcon={app}\Spark.exe

UsePreviousAppDir=yes

UsePreviousGroup=yes

UsePreviousSetupType=yes

UsePreviousTasks=yes

Compression=lzma

SolidCompression=yes

OutputDir=userdocs:Spark Setup

PrivilegesRequired=poweruser

VersionInfoVersion=2.6.4.13738

[Tasks]

Name: desktopicon; Description: “Desktop Icon”; GroupDescription: “Desktop Icon:”;

Name: desktopicon\common; Description: “Add for all users”; GroupDescription: “Desktop Icon:”; Flags: exclusive

Name: desktopicon\user; Description: “Add for the current user only”; GroupDescription: “Desktop Icon:”; Flags: exclusive unchecked

Name: quicklaunchicon; Description: “Add Quick Launch Icon”; GroupDescription: “Quick Launch Icon:”; Flags: unchecked

Name: startupicon; Description: “Start When Windows Starts”; GroupDescription: “Startup Icon:”; Flags: unchecked

Name: removeappdata; Description: “Remove All Setttings”; GroupDescription: “Application Data:”; Flags: unchecked

[InstallDelete]

Type: filesandordirs; Name: “{app}.install4j”;

Type: filesandordirs; Name: “{app}\bin”;

Type: filesandordirs; Name: “{app}\documentation”;

Type: filesandordirs; Name: “{app}\lib”

Type: filesandordirs; Name: “{app}\logs”;

Type: filesandordirs; Name: “{app}\plugins”;

Type: filesandordirs; Name: “{app}\resources”;

Type: filesandordirs; Name: “{app}\xtra”;

Type: files; Name: “{app}\Spark.exe”;

Type: files; Name: “{app}\starter.exe”;

Type: files; Name: “{app}\uninstall.exe”;

Type: files; Name: “{app}\unins000.dat”;

Type: files; Name: “{app}\unins000.exe”;

Type: dirifempty; Name: “{app}”;

Type: filesandordirs; Name: “{userappdata}\Spark\logs”;

Type: filesandordirs; Name: “{userappdata}\Spark\plugins”;

Type: filesandordirs; Name: “{userappdata}\Spark”; Tasks: removeappdata

[Files]

Source: “…\target\build\Spark.exe”; DestDir: “{app}”

Source: “…\target\build\starter.exe”; DestDir: “{app}”

Source: “…\target\build\lib*”; DestDir: “{app}\lib”

Source: “…\target\build\lib\windows*”; DestDir: “{app}\lib\windows”

Source: “…\target\build\lib\windows64*”; DestDir: “{app}\lib\windows64”

Source: “…\target\build\plugins*”; DestDir: “{app}\plugins”

Source: “…\target\build\resources*”; DestDir: “{app}\resources”

Source: “…\target\build\resources\sounds*”; DestDir: “{app}\resources\sounds”

Source: “…\target\build\xtra\emoticons*”; DestDir: “{app}\xtra\emoticons”

[Icons]

Name: “{group}\Spark”; Filename: “{app}\Spark.exe”

Name: “{group}\Uninstall”; Filename: “{uninstallexe}”

Name: “{commondesktop}\Spark”; Filename: “{app}\Spark.exe”; Tasks: desktopicon\common

Name: “{userdesktop}\Spark”; Filename: “{app}\Spark.exe”; Tasks: desktopicon\user

Name: “{userappdata}\Microsoft\Internet Explorer\Quick Launch\Spark”; Filename: “{app}\Spark.exe”; Tasks: quicklaunchicon

Name: “{userstartup}\Spark”; Filename: “{app}\Spark.exe”; Tasks: startupicon

[Registry]

Root: HKCR; Subkey: “Applications\Spark.exe”; ValueName: “TaskbarGroupIcon”; ValueData: “{app}\resources\spark.ico”

[UninstallDelete]

Type: dirifempty; Name: “{app}”;

Type: files; Name: “{userappdata}\Microsoft\Internet Explorer\Quick Launch\Spark”;

Type: files; Name: “{userstartup}\Spark”;

[Run]

Filename: “{app}\Spark.exe”; Description: “Run Spark”; Flags: postinstall skipifsilent nowait

Thanks George,

I am very thankful for you posting this, I tested and I can successfully use this .ISS. Thanks for taking the time to come back and posting this. Glad you still used the same email and got the notification.