Compile spark question

Hi,

i asked a question on how to compile spark from latest source avaliable, and wroot have point me to the link

http://www.igniterealtime.org/community/docs/DOC-1521

and thanks for his quick response, I know i will need netbean and also source from the /trunk in order to compile the spark myself.

however, i am not sure what files i need from the source svn, is it all filess under

svn-org:/spark/trunk/src/java/org/jivesoftware/spark/

and how i should structure the source files? is there exist any dummy guide? i am not a programmer and never have experience on netbeam, please help.

thanks.

You should source out of SVN with svn client (like TortoiseSVN, RapidSVN). It will create all needed structure. I’m using RapidSVN, so i can give you my instructions which i have written down for myself.

RapidSVN:
Repository > Checkout
URL http://svn.igniterealtime.org/svn/repos/spark/trunk
Destination Directory D:\My Documents\JiveSoftware\Spark
Add to bookmark, Recursive
OK
Close RapidSVN
Open
Double click the bookmark
button - Update selected
OK

Spark + Netbeans (create project before creating Spark dir - rename dir with source Spark to Spark_renamed temporary)
create new Java project with existing source - set folder and project name, dont press Next yet
then rename Spark_renamed to Spark
copy build.xml from build dir to parent
edit build.xml in parent, change basedir="…" to basedir=""
go to Netbeans and press next
press Add folder, choose src folder, Finish
in Netbeans right-click Spark project, choose Properties
click Libraries - Add JAR/Folder
select /Spark/build/lib dir (Absolute path) - OK
now Clean and Build
to launch - /target/build/bin/startup.bat

Hi Wroot,

thanks for your great help, i have followed all the steps and created a build. However, when i double click the startup.bat in /target/build/bin/startup.bat nothing happened? no any spark client appear, do i need to uninstall existing spark client installation first before i click the startup.bat?

please help.

thanks.

To be able to run openfire.bat need to add System variable JAVA_HOME with value C:\Program Files\Java\jdk_version (no trailing slash) (My computer > Advanced > Environment variables)

This probably applies to Spark too. I’m building both, so i never needed this for Spark alone.

Hi Wroot,

i tried to add the system variable “JAVA_HOME” and the value is “C:\Program Files (x86)\Java\jdk1.6.0_20” but is still failed to run, any idea? will this because of i am using windows 7 b4-bit?

many thanks.

ctrlaltdel

I’m building it on XP 32-bit. Not sure about 64-bit OS. Can’t think of any other idea.

Hi Wroot,

I tried to run the startup.bat in a xp 32-bit and it works, thanks, wondering how to get it working at windows 7 64-bit?

one more question, so now i have a working spark build, how can i make it become a working installer version so that i can simply double the installer and let it install and then double click the spark icon and spark will run?

many thanks!

I tried to run the startup.bat in a xp 32-bit and it works, thanks, wondering how to get it working at windows 7 64-bit?
You will need to use JDK for 64-bit Windows i think http://java.sun.com/javase/downloads/widget/jdk6.jsp

one more question, so now i have a working spark build, how can i make it become a working installer version so that i can simply double the installer and let it install and then double click the spark icon and spark will run?
I’m not making installers myself, so i can only give you a link, maybe it will be useful (IzPack) http://www.igniterealtime.org/community/docs/DOC-1767

Hi Wroot,

thanks for the link

I am a bit confuse here, with this izpack installer, will this make the spark.exe? i mean now i am able to run the complied spark with the .bat file, however this definitely not good for end-user. Is there a way to convert the .bat file to spark.exe like what the official spark installer downloaded which will have a spark.exe (and a nice icon) after install? Will that izpack do the job?

many thanks.

ctrlaltdel

It will not make an exe from bat. It will make an exe which is launching spark.jar. Well, it will be different from the original Spark, as original Spark is using commercial installer4j and IzPack is a free alternative. But you can try some experimental installers and see for yourself how these installers can look like. Check spark-installer exe or jar from here:

http://www.igniterealtime.org/community/docs/DOC-1822

Hi Wroot,

i am able to run the startup.bat file at windows7 64-bit, all you need to do is to modify the batch file with the correct path to java

java -Dappdir=… -cp …/lib/jdom.jar;…/lib/log4j.jar;…/lib/lti-civil.jar;…/lib/fmj.jar;…/lib/sta rtup.jar;…/lib/windows/jdic.jar;…/resources;…/lib/windows; -Djava.library.path="…/lib/windows" org.jivesoftware.launcher.Startup

change to

“%JAVA_HOME%\bin\java” -Dappdir=… -cp …/lib/jdom.jar;…/lib/log4j.jar;…/lib/lti-civil.jar;…/lib/fmj.jar;…/lib/sta rtup.jar;…/lib/windows/jdic.jar;…/resources;…/lib/windows; -Djava.library.path="…/lib/windows" org.jivesoftware.launcher.Startup

when i try to make it with izpack and launch4j which you suggested me (http://www.igniterealtime.org/community/docs/DOC-1767), i found out that from the build.xml, the build number is 11392

is this the latest one? from the link you post in the last message (http://www.igniterealtime.org/community/docs/DOC-1822), i see there are build like:

spark_2_6_0_11093_online.msi (11093, doesn’t have some 11362 build’s features or fixes)

spark_2_6_0_11367_online.msi (November 6, 2009 build; SVN revision # 11367)

spark_2_6_0_11427_online.msi (November 27, 2009 build; SVN revision #11427)

which seems having a higher build number (e.g 11427), I fetched the SVN at 25MAY2010 and i thought this is the latest SVN avaliable, please advise.

Many thanks,

ctrlaltdel

Don’t look on that build number in xml. Current SVN is actually at 11706 now.

Hi Wroot,

thanks again for clarifying this, please can you show me how can i know the SVN version?

Also, I tried to replace the installed spark (spark_2_6_0_11427_online version) with the compiled spark (under target/build) by simply replace all the files and directories (bin, documentation, lib, logs, plugins, resources, xtra) and run the spark.exe and it works. will there be any protential problem with this method of update?

I still not able to create a spark.exe with launch4j and also make a installer with IzPack…

thanks.

Depends how are you getting your SVN code. My svn client shows a revision number. Also you can check it online by looking here http://www.igniterealtime.org/fisheye/viewrep/svn-org/spark

Recent Changelog

11706

that’s the current SVN revision.

Hi,

I noticed that the spell checker is not working with the latest build, how can i get it to work? it complaining every word i type.

thanks.

It works for me. What language have you selected?

Hi Wroot,

I haven’t changed any settings and is selected to use “english” which is the default.

I am wondering if it is related to the path of the plugin? in 64-bit os, spark is installed to “C:\Program Files (x86)\Spark”

thanks.

Well i don’t know but it doesn’t seems to me, that this could cause plugin not to work. You can try it on 32-bit OS.

Hi wroot,

i will try and see if it run without problem in 32-bit machine.

I have another problem now, today i go download latest SVN and use the same way to compile and build it but i got a lot of errors when i run clean and build in netbean. Also i see many “!” in those source file which is complaining error parsing file.

from the output panel, there are also some “deprecation” warning, it this related to the java version i use?

Latest SVN is compiling fine for me with 1.6.0_20 JDK and NetBeans 6.9 (32-bit). Synced SVN and compiled just yesterday. 11740 revision.