Development Environment » History » Version 17
Luke Murphey, 08/14/2010 02:22 PM
1 | 1 | Luke Murphey | h1. Development Environment |
---|---|---|---|
2 | 1 | Luke Murphey | |
3 | 1 | Luke Murphey | Below is information regarding what you'll need if you want to modify or develop NSIA. You can use whatever IDE you like, or you can use a "preconfigured instance of Eclipse":http://ondemand.yoxos.com/geteclipse/rap?profiles=868129468_1269911860683718583. |
4 | 1 | Luke Murphey | |
5 | 1 | Luke Murphey | h2. Compiler Requirements |
6 | 1 | Luke Murphey | |
7 | 1 | Luke Murphey | NSIA requires Java JDK 6 (1.6) in order to compile successfully. It will not compile on earlier versions of Java (including Java 1.5). |
8 | 1 | Luke Murphey | |
9 | 15 | Luke Murphey | h2. Directory Structure |
10 | 15 | Luke Murphey | |
11 | 15 | Luke Murphey | Below is a description of NSIA's source-code directory structure: |
12 | 15 | Luke Murphey | |_.Path |_.Description | |
13 | 15 | Luke Murphey | | bin | The location that the binaries and packages are placed | |
14 | 15 | Luke Murphey | | tmp | The location where temporary files are placed (like Java compiled code) | |
15 | 15 | Luke Murphey | | var | The location where the application database is stored when NSIA is executed (potentially for debugging) | |
16 | 15 | Luke Murphey | | doc | Various documents that are distributed with NSIA | |
17 | 15 | Luke Murphey | | dev | Various related to development that are not source-code | |
18 | 15 | Luke Murphey | | etc | Location for configuration files distributed with NSIA | |
19 | 15 | Luke Murphey | | lib | Libraries distributed with NSIA | |
20 | 15 | Luke Murphey | | src | NSIA source-code | |
21 | 15 | Luke Murphey | |
22 | 1 | Luke Murphey | h2. Libraries |
23 | 1 | Luke Murphey | |
24 | 17 | Luke Murphey | Make sure that the libraries (under the _/lib_ directory) are on the classpath. Additionally, JUnit 3 is required for the unit tests. Note that you will get errors if you link to JUnit 4 as opposed to JUnit 3. |
25 | 17 | Luke Murphey | |
26 | 17 | Luke Murphey | The ant tasks require the following libraries to work (must be added in Eclipse under Window --> Preferences, Ant --> Runtime): |
27 | 17 | Luke Murphey | |
28 | 17 | Luke Murphey | |_.Library |_.Purpose |_.Source | |
29 | 17 | Luke Murphey | |svnant.jar | Used for building the NSIA.jar file (populates the archive with the build info) | http://subclipse.tigris.org/svnant.html | |
30 | 17 | Luke Murphey | |svnClientAdapter.jar | Required by SVN Ant | http://subclipse.tigris.org/svnant.html | |
31 | 17 | Luke Murphey | |deb-0.8.jar | Used to make the Debian packages | http://vafer.org/projects/jdeb/ | |
32 | 17 | Luke Murphey | |commons-compress-1.0.jar | Required by jdeb |http://commons.apache.org/compress/download_compress.cgi | |
33 | 17 | Luke Murphey | |nsisant1.2.jar | Needed to make the Windows installer | http://nsisant.sourceforge.net/ | |
34 | 17 | Luke Murphey | |
35 | 2 | Luke Murphey | |
36 | 6 | Luke Murphey | h2. Build Script |
37 | 6 | Luke Murphey | |
38 | 6 | Luke Murphey | NSIA includes an Ant task for handling various development related functions. You'll need to have the svnbinclean run every time a build occurs so that SVN does not think that the java-bin scratch directory is part of the repository. |
39 | 6 | Luke Murphey | |
40 | 16 | Luke Murphey | h2. Build Properties |
41 | 4 | Luke Murphey | |
42 | 16 | Luke Murphey | The build script uses a local build properties (dev/local.properties) that sets variables that dictate how the build process will be performed. The local properties file overrides the default properties file (in dev/default.properties). Below are the attributes that are can be used: |
43 | 4 | Luke Murphey | |
44 | 5 | Luke Murphey | |_.Property |_.Example |_.Description | |
45 | 1 | Luke Murphey | | value.build.version | 0.9.2 | Current version of the application (used when creating the Debian package) | |
46 | 1 | Luke Murphey | | value.build.debianpackage.directory | build/dpkg | Directory to use as the temporary directory for building the Debian package| |
47 | 5 | Luke Murphey | | value.build.makensis.directory | C:\\Program Files\\NSIS | Directory where makensis exists | |
48 | 16 | Luke Murphey | | value.build.licensekey | 1111-2222-3333-4444-5555 | License key to be used for downloading definitions that will included with the NSIA package (not currently used) | |
49 | 16 | Luke Murphey | | value.test.licensekey | 1111-2222-3333-4444-5555 | License key to be used for the test cases to determine if NSIA can download definitions correctly. | |
50 | 1 | Luke Murphey | |
51 | 11 | Luke Murphey | h2. Creating Packages Using jDeb and NSIS (included as an Ant task) |
52 | 1 | Luke Murphey | |
53 | 11 | Luke Murphey | The project includes a build target for creating Debian packages using jDeb and an Windows installer using NSIS. For the build script to work you must add the jDeb, Apache commpress and the NSISAnt library to the Ant classpath. To do this in Eclipse, go to Window --> Preferences, Ant --> Runtime. Select "Global Entries" in the Classpath tab and then select "Add External JARs...". Add the attachment:jdeb-0.8.jar, "Apache commons compress":http://commons.apache.org/compress/download_compress.cgi (commons-compress-1.0.jar) and "NSIS Ant":http://sourceforge.net/projects/nsisant/files/ Jar files. |
54 | 11 | Luke Murphey | |
55 | 12 | Luke Murphey | Note that you will need to the specify the path to makensis in your sbin/local.properties file, below is an example: |
56 | 11 | Luke Murphey | |
57 | 11 | Luke Murphey | <pre> |
58 | 11 | Luke Murphey | value.build.makensis.directory=C:\\Program Files\\NSIS |
59 | 11 | Luke Murphey | </pre> |
60 | 7 | Luke Murphey | |
61 | 14 | Luke Murphey | Finally, you'll need the NSIS "service control manager plugin":http://nsis.sourceforge.net/NsSCM_plug-in in order to create the NSIS package (since the Windows installer needs to be able to manage services). |
62 | 14 | Luke Murphey | |
63 | 2 | Luke Murphey | h2. "Access restriction: Class is not accessible due to restriction..." |
64 | 2 | Luke Murphey | |
65 | 2 | Luke Murphey | Eclipse may not let NSIA compile giving the message "Access restriction: Class is not accessible due to restriction on required library". This issue is due to an Eclipse setting. To fix it, change the "Forbidden reference" setting to "Ignore"; this setting is under "Errors/Warnings": |
66 | 3 | Luke Murphey | |
67 | 3 | Luke Murphey | !Project_Access_Restriction.png! |