EN – A very basic Setup Guide for compiling Elekdra from Sources

Hi Everyone

This page is basically identical with the SourceForge Page “A very basic Setup Guide for compiling Elekdra from Sources ” – only a bit better formatted. The functionality of the Sourceforge Wiki is relativly poor…
I will write this in English because of the “E” in Fremo ;o) !!!
Please keep in mind, that all steps will be done by you at your own risk – I am not responsible if you mess up anything on you Computer!
Have Fun!

Steps to perform to reproduce a successfull elekdra build:
1) Download NetBeans IDE (actual Version 8.0) and install it.
https://netbeans.org/downloads/
I choosed the smalest Java SE Version.
2) You will need a Java JDK (you could also use the bundle NetBeans plus JAVA)
http://www.oracle.com/technetwork/java/javase/downloads/index.html
I used the 32bit Version for Windows on my 64Bit Windows 7 Notebook.

These are the “Needs” before the next steps.
3) Use a CVS Client ( http://www.tortoisecvs.org/download.shtml) of your choice to download the sources of elekdra or the possibility to get the whole package as TAR (kind of ZIP) File from the Sourceforge Website ( http://fremo-stw.cvs.sourceforge.net/viewvc/fremo-stw/software/?view=tar )
TAR is from the UNIX World. You can use 7ZIP to open and unpack.

I placed everthing under “C:\FremoDev\software” on my local machine – If you choose different directories please adopt all pathes according your needs… .

4) Now it is time to start NetBeans. You will get a nice splash screen. You can close this Tab. To create a new Project from existing (elekdra) sources please go to:
File Menu >>> New Project
A window pops up.
Java as Categorie is preselected. Choose on the right in the tree “Java Project with Existing Sources”.
Choose NEXT Button
For the Project Name choose “elekdra” – For the Project Folder please choose (in my case)
C:\FremoDev\software\elekdra (go NOT into SRC or TEST)
Choose NEXT Button
For Source Packages choose: C:\FremoDev\software\elekdra\src
For Test Packages choose: C:\FremoDev\software\elekdra\test
Press FINISH Button

Than NetBeans IDE begins to digest the Soruces – you will end up with lots errors indicated by lots of red overlay Icons on top of your packages.
5) To clean up this errors you need to download Stefans Locnet Library and unpack it somewhere:
C:\FremoDev\software\loconetovertcp-svn-153-javaclients-LocoNetLibrary-trunk
6) Than you need to copy some JAR Files from your existing ELEKDRA installation. I created a “LIB” Folder for all these files.
Mine (C:\FremoDev\software\lib) contains:
16.04.2014 09:20 489’884 log4j-1.2.17.jar
23.02.2014 18:55 59’464 RXTXcomm.jar
23.02.2014 18:55 24’956 xpp3_min-1.1.4c.jar
16.04.2014 09:38 431’406 xstream-1.3.1.jar
7) Now you must make NetBeans aware of the sources… .
To do so please select the “elekdra” Project on the left side view in the Projects Tab. Than click the Right Mouse Button and choose Properties (last option).
Another Window pops up.
Fist Select the Sources option. Than add the following folder:
C:\FremoDev\software\loconetovertcp-svn-153-javaclients-LocoNetLibrary-trunk\src
C:\FremoDev\software\ElekdraTypesLibrary\src
C:\FremoDev\software\ZNF800Library\src
C:\FremoDev\software\ConfigurationLoadLibrary\src
C:\FremoDev\software\ElekdraBlockLibrary\src
C:\FremoDev\software\ElekdraUserInterfaceLibrary\src
C:\FremoDev\software\DataStoreLibrary\src

Than switch to the Library Option and add
..lib/log4j-1.2.17.jar
..lib/RXTXcomm.jar
..lib/xpp3_min-1.1.4c.jar
..lib/xstream-1.3.1.jar

Choose the OK Button. NetBean IDE re-digest all the sources and now the errors and red overlay Icons should disapear. Only in TestPackages some will be left over.

8) Now the BIG Moment comes – Hit the “HAMMER” Icon or F11 – NetBeans should build your elecdra.jar file underneath C:\FremoDev\software\elekdra\build

On my machine this took 9 Seconds.
My result after the first attempt for documentation was:

Created dir: C:\FremoDev\software\elekdra\build
Updating property file: C:\FremoDev\software\elekdra\build\built-jar.properties
Created dir: C:\FremoDev\software\elekdra\build\classes
Created dir: C:\FremoDev\software\elekdra\build\empty
Created dir: C:\FremoDev\software\elekdra\build\generated-sources\ap-source-output
Compiling 403 source files to C:\FremoDev\software\elekdra\build\classes
C:\FremoDev\software\ElekdraBlockLibrary\src\elekdraBlock\AbstractBlock.java:13: warning: NotImplementedException is internal proprietary API and may be removed in a future release
import sun.reflect.generics.reflectiveObjects.NotImplementedException;
C:\FremoDev\software\ElekdraBlockLibrary\src\elekdraBlock\AbstractBlock.java:125: warning: NotImplementedException is internal proprietary API and may be removed in a future release
throw new NotImplementedException();
Note: C:\FremoDev\software\ZNF800Library\src\znf800\icu\InputControlUnit.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 warnings
Copying 30 files to C:\FremoDev\software\elekdra\build\classes
compile:
Created dir: C:\FremoDev\software\elekdra\dist
Copying 1 file to C:\FremoDev\software\elekdra\build
Copy libraries to C:\FremoDev\software\elekdra\dist\lib.
Building jar: C:\FremoDev\software\elekdra\dist\elekdra.jar
To run this application from the command line without Ant, try:
java -jar “C:\FremoDev\software\elekdra\dist\elekdra.jar”
jar:
BUILD SUCCESSFUL (total time: 9 seconds)

9) I dublicated my existing elekdra folder form Thomas/Stefans distribution and copied my “new” JAR over the dublicated Folder. Than I adopted my startup-batch and Version 10.1.0 starts with Felix Rufwil Files.

THANKS Felix for RUFWIL and Stefan for the Hints needed.

A BETTER Version of this Kick-Start Guide needs to be done with Screenshots. Could someone explain me the wiki – how to upload Images? Thxs.

Best Regards,
Axel

Comments are closed.