Is it possible to create a custom version of the Spark Messenger using the process in this posting that would allow me to restrict various end user functions? I need to remove all features from Spark Messenger so that user can only use the IM portion and not have access to any of the preferences.
Buildfile: C:\Documents and Settings\eadeleye.DELANEYRAD\workspace\spark\build\build.xml
[checkstyle] Running Checkstyle 5.3 on 338 files
[echo] Apache Ant version 1.7.1 compiled on June 27 2008
[echo] Java Version: 1.6
Total time: 7 seconds
****** End of Results from Build Spark ******
I am unsure as to how to proceed further to edit the MainWindow.java. Do I edit Line 409 in MainWindow.java using “Eclipse for IDE for Java Developers”? Once I successfully edit the file, how do I create the .exe file for installing the custom build of Spark on workstations and computers on my network?
You will need to compile Spark from svn and set the options that you want disabled.
An MSI can be made to restrict user functions. I just did it using this procedure, but my own recipe file. I just editted the spark.jar file (using spark 2.6.2) and included it in my msi package. It hardcodes the host (server name), adds a branded logo to the contact list, disables some plugins, and sets the default theme to Windows. It works really nice.
@church - can you describe how you managed to do this?
I can edit the default.properties within the spark.jar, on an existing install of spark, I simply removed the stock spark.jar file and replaced it with custom version and the changes are there, which is all well and good, but how do I add this new spark.jar file using AppDeploy? It seems AppDeploy uses the stock spark.exe, so obviously misses out my new one.
I assume you have to compile in your new spark.jar and create a new spark.exe, and then use AppDeploy - is that right?
@fishface - you’re right. I used appldeploy to create the MSI. It will want to know what you want to do, scan the current config of your system, and what to install and then it will install it. then I used 7zip to open the spark.jar file and make my changes. I also edit the default.properties file. also, using 7zip, I deleted a bunch of stuff I didn’t want, like plugins, languages, and documentation. then I reopen appdeploy, loaded the appdeploy config file I created originally, and then created the msi.
I am looking to do this process AGAIN now that spark 2.7 is on the horizon. If you need help with it, send me a private message and I can walk you though it. I used the process outlined above so with my help and this post, you should be able to do it.
I just created the following post, and then saw your newer post, but I’ll post it here as it outlines the process, seemingly pointless process!
Thanks for the offer of help…I suspect I’m going to need it, but I’ll give another try and let you know.
I’ll try it again with the updated info you have provided, I was certain I had tried that, but may have missed a step.
Okay, I’m confused now, so here is what I’m doing.
I download spark.exe
I install spark so I can edit the default.properties within the spark.jar (I use 7zip)
I now have my custom version of the spark.jar which I save someplace else for now
I uninstall spark.exe and clean-up
I run AppDeploy, select “Create a MSI…” and point it at the spark.exe I downloaded, which obviously still has the stock spark.jar, so I already starting wonder how this going to work.
I click “Next” and then was hoping to see something that would allow me to add in my spark.jar file (I’ve tried Advanced etc), I see no option for this so except the defaults
I then launch spark.exe from within AppDeploy and run through the installer, and as the installer is running I can see it extracting the various files…spark.jar etc etc…hmmm…I think to myself, this is not going to work as that is the original spark.jar compiled into spark.exe
Click “Next” to create second snapshot, I accept the defaults, and to cut a long story short, it completes and I have a nice spark.msi, unfortunately just as I suspect, it does not have my spark.jar in it.
I have tried various differnet options and approaches and cannot get it to do what I need…and this makes me believe I have to compile my spark.jar into a new spark.exe…I’m obviously missing something, as Church seems to have used AppDeploy to do this.
Do not install Spark. Let Appdeploy do that. You should really try to so this procedure on a bare bones PC where Spark was not previously installed and where there are no other programs running. Make the PC as minimal as possible to avoid having AD detect a false positive.
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
Download Spark.exe, do not install it
Run AppDeploy, select “Create a MSI…” and point it at the spark.exe you just downloaded, accept the rest of the defaults
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
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.
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
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.
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.
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)