Creating MSI Installer

This is best done on clean install of your target OS, barebones etc, no previous runs of spark.exe

  • Host OS was VirtualBoX VM of XP+SP3
  • Change paths to suit your OS
  • Spark.2.6.3 was used
  1. Download Spark.exe, do not install it
  2. Run AppDeploy, select “Create a MSI…” and point it at the spark.exe you just downloaded, accept the rest of the defaults
  3. Launch Spark.exe from within AppDeploy and run through the installer, at the end of the install do not accept the option to run Spark
  4. Click “Next” to create second snapshot (post-installation), I accept the rest of the defaults, create a shortcut icon, and to cut a long story short, it completes and you have a nice shiny new Spark.msi in C:\Program Files\AppDeploy\Repackager\Packages - at this point all you have done is converted the .exe to a .msi, this is the first stage in customizing your Spark client install.
  5. Now go to C:\Program Files\Spark\lib and use 7zip to open the spark.jar file, some of the major configuration defaults can be found at C:\Program Files\Spark\lib\spark.jar\org\jivesoftware\resource\ - see this guide by Joe (with input from Church) for more info: http://community.igniterealtime.org/docs/DOC-2126#comment-6855
  6. Run AppDeploy again, this time select “Build packages based on existing recipe” and point to the spark.xml file in C:\Program Files\AppDeploy\Repackager\Packages, accept the defaults and click through the wizard, this will now create a new .msi file which contains your modifications.
  7. Test out you new .msi on another machine and check that your changes have stuck.

AppDeploy has other options for modifying your package, I accepted the defaults as a starting point.

I’ve done this process several times now and it works fine, thanks to Joe, Church and others.

2 Likes

I’m trying to reduce the size of my spark.msi, I’ve successfully removed/disabled/modified the following by editing C:\Program Files\Spark\lib\spark.jar\org\jivesoftware\resource\default.properties and I also removed several languages from C:\Program Files\Spark\jre\lib\zi - this got it down to 53MB, is there anything else I can remove (within reason) to reduce the size? Or is the size about as good as it will get?

HOST_NAME - set to our host

ACCOUNT_DISABLED = true

ADVANCED_DISABLED = true

SSO_DISABLED = true

PKI_DISABLED = true

PROXY_DISABLED = true

DISABLE_UPDATES = true

PLUGIN_BLACKLIST = OTR Plugin (I also removed the otr.plugin file for good measure)

PLUGIN_BLACKLIST_CLASS = org.jivesoftware.spark.otrplug.OTRPlugin

Mine is 17.8MB. Not even sure what I got rid of besides what I mentioned above. Seems like your msi is bigger than the original exe.

Yeah, your right, orginal I built from is 40,134KB, how is this possible?

There are two install versions one with the JRE and one without JRE. That could be why its larger.

1 Like

Ahh…that will most likey explain it, JRE is mine I’m sure.

Thats right. Mine was withOUT the JRE. Some workstations ran into issues and the msi silent installer failed due to no java or an old version of it. So I had to help them install the right java version and then run the spark msi again.

I have to mention that I created a nice little installer script that would kill spark if it was currently running, uninstall it, and then install the new spark2.6.3 msi and create a flag file that would prevent the script from running again. worked well - except for those machines with no java.

I also found out that the version of java was specific to spark 2.6.3. For some reason, the highest and best version was java 6.26

If I go down the road of not having JRE in mine it rasies several questions for me.

  1. What version of JRE came bundled with Spark 2.6.3?
  2. The desktop support guys have told me that they mainly use 6.23 (a few have 6.21) - will this be ok with Spark 2.6.3?
  3. If I decide to bundle it with JRE, does this have an impact on the current insatlled version of JRE?
    A sanity check for your installer is really cool, doing that is a bit beyond me at the moment!

Okay, got my build process down now.

  • Host OS was VirtualBoX VM of XP+SP3
  • Change paths to suit your OS
  • Spark.2.6.3_online.exe (without JRE)
  • I will be using Spark with JRE 6.23 - this is what we run in our shop

I wanted to disable quite a few things, we only need the basics, and to rule out as many things as possible that the end user could potentially fiddle with, saving support time…hopefully.

Got the msi down to 18.7MB

I disabled the following plugins and removed them from the plugins folder.

I got the correct name for each plugin by viewing (using 7zip) the plugin.xml in C:\Program Files\Spark\plugins\ this also provided the class names.

Fastpath

org.jivesoftware.fastpath.FastpathPlugin

Jingle Client

org.jivesoftware.sparkplugin.JinglePlugin

OTR Plugin

org.jivesoftware.spark.otrplug.OTRPlugin

Roar!!!

org.jivesoftware.spark.roar.Roar

Phone Client

org.jivesoftware.sparkplugin.SoftPhonePlugin

I then made the following changes to spark.jar

HOST_NAME = hostname

ACCOUNT_DISABLED = true

ADVANCED_DISABLED = true

SSO_DISABLED = true

PKI_DISABLED = true

PROXY_DISABLED = true

DISABLE_UPDATES = true

FILE_TRANSFER_WARNING_SIZE = 10485760

FILE_TRANSFER_MAXIMUM_SIZE = 10485760

HELP_FORUM_DISABLED = true

PLUGIN_REPOSITORY_USE_PROXY = false

INSTALL_PLUGINS_DISABLED = true

DEINSTALL_PLUGINS_DISABLED = true

PLUGIN_BLACKLIST = Fastpath,Jingle Client,OTR Plugin,Roar!!!,Phone Client

PLUGIN_BLACKLIST_CLASS =org.jivesoftware.fastpath.FastpathPlugin,org.jivesoftware.sparkplugin.JinglePl ugin,org.jivesoftware.spark.otrplug.OTRPlugin,org.jivesoftware.spark.roar.Roar,o rg.jivesoftware.sparkplugin.SoftPhonePlugin

It works fine, might not suit everybody, but offer it up.

Thanx! It works great. And that “AppDeploy Repackager” is free for use.

But java-style windows look strange on my W7 :slight_smile:

May be it’s because of Spark_2.6.0.11392.xml file i used (from here)?

http://new.tinygrab.com/3d98ceed3ddcf8ea3029456e02bbc1792c72acb26d.png

ragenkagen wrote:

This was really helpful Joe, thanks for this! I edited the 2.6.0 build.xml file to work with 2.6.3 and it worked great.

Hi Community and Ragenkagen. as you had mentioned on your msg. years back is this still working now? I mean the workarounds? I’m planning to try this as a push installations to the clients from my windows server 2008.

Thanks.

fishface wrote:

This is best done on clean install of your target OS, barebones etc, no previous runs of spark.exe

  • Host OS was VirtualBoX VM of XP+SP3
  • Change paths to suit your OS
  • Spark.2.6.3 was used
  1. Download Spark.exe, do not install it
  2. Run AppDeploy, select “Create a MSI…” and point it at the spark.exe you just downloaded, accept the rest of the defaults
  3. Launch Spark.exe from within AppDeploy and run through the installer, at the end of the install do not accept the option to run Spark
  4. Click “Next” to create second snapshot (post-installation), I accept the rest of the defaults, create a shortcut icon, and to cut a long story short, it completes and you have a nice shiny new Spark.msi in C:\Program Files\AppDeploy\Repackager\Packages - at this point all you have done is converted the .exe to a .msi, this is the first stage in customizing your Spark client install.
  5. Now go to C:\Program Files\Spark\lib and use 7zip to open the spark.jar file, some of the major configuration defaults can be found at C:\Program Files\Spark\lib\spark.jar\org\jivesoftware\resource\ - see this guide by Joe (with input from Church) for more info: http://community.igniterealtime.org/docs/DOC-2126#comment-6855
  6. Run AppDeploy again, this time select “Build packages based on existing recipe” and point to the spark.xml file in C:\Program Files\AppDeploy\Repackager\Packages, accept the defaults and click through the wizard, this will now create a new .msi file which contains your modifications.
  7. Test out you new .msi on another machine and check that your changes have stuck.

AppDeploy has other options for modifying your package, I accepted the defaults as a starting point.

I’ve done this process several times now and it works fine, thanks to Joe, Church and others.

Sounds promissing I will test this soon.

Thank you very much.

I tried doing this, and I just want a default install of spark 2.6.3 and I get an error when trying to run the MSI, something about invalid install package please contact software vendor to verify package. I am not sure what it is that I am doing wrong.

great job !

I created an xml file for spark 2_7_0_669, it may be useful can be found here:

http://www.fast-files.com/getfile.aspx?file=89957

Hi folks,
Maybe new instructions how to make tiny msi file for new 2.9.2 version of the Spark? :slight_smile:
I will be gratefull :slight_smile:

Why?you can run the installer with a key for silent installation.

start /wait c:\drv\spark_2_9_2.exe -q

Ok, that’s true but I mean tiny so without unnecessary files with own default.properties settings :wink:

Is there any chance to get new .xml file for the new version of Spark and an instruction what exactly delete from trunk to get ~20MB installation file?
I’ll be grateful :wink:

I can’t imagine that msi = 20MB.
Without java it is about 50MB …

MSI does not make sense, if you use Active Directory then it is easier for you to write a script. And if you have SCCM then you can install exe.

this script install for Windows x64

IF EXIST "C:\Program Files (x86)\Spark\spark_2_9_2.txt" GOTO END

taskkill /F /IM Spark.exe
"C:\Program Files (x86)\Spark\uninstall.exe" -q
rmdir "C:\Program Files (x86)\Spark" /s /q
mkdir c:\drv
xcopy "\\srv-it\app\Spark2.9.2\spark_2_9_2.exe" "C:\drv" /Y
start /wait c:\drv\spark_2_9_2.exe -q
xcopy "\\srv-it\app\Spark2.9.2\spark.jar" "C:\Program Files (x86)\Spark\lib\spark.jar" /Y
xcopy "\\srv-it\app\Spark2.9.2\Spark.lnk" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup" /Y
copy /Y nul "C:\Program Files (x86)\Spark\spark_2_9_2.txt"

:END
1 Like

Read above - they wrote 17-18MB instalation file, but now it’s useless :wink:
Thanks for quick solution!
‘spark.jar’ in new version is ‘spark-core-2.9.2.jar’ so I must change default.properties in that file yes?

Exactly. I haven’t switched to the new version of Spark 2.9.2 yet, because there are a couple of very critical bugs there:
https://issues.igniterealtime.org/browse/SPARK-2143
https://issues.igniterealtime.org/browse/SPARK-2064