Difference between revisions of "Development"

From Angry IP Scanner

Jump to: navigation, search
(That battalion of credit debt understands fred. , http://www.condonskelly.com/members/gukar/member-blog.blog2/items/Home-Equity-Loan-Rat.php home equity loan, xxe,)
(Contributing)
 
(46 intermediate revisions by 13 users not shown)
Line 1: Line 1:
That battalion of credit debt understands fred. ,  http://www.condonskelly.com/members/gukar/member-blog.blog2/items/Home-Equity-Loan-Rat.php home equity loanxxe,
+
= Writing plugins =
 +
 
 +
See [[FAQ: Plugins]]
 +
 
 +
= Contributing =
 +
 
 +
Angry IP Scanner's source code is hosted is now hosted on [https://github.com/angryziber/ipscan Github]. Forking and pull-requests are very welcome! If you want to get an idea of what to do, check the [https://sourceforge.net/p/ipscan/bugs/ bug reports].
 +
 
 +
In order to get the source code, the following command must be run (make sure you have git-core installed):
 +
 
 +
  git clone git://github.com/angryziber/ipscan.git
 +
 
 +
This command will fetch the current source code of the program with full history into local directory named 'ipscan'.
 +
Or just [https://github.com/angryziber/ipscan browse the code repository on Github]. 
 +
 
 +
If the source of particular release is required, then you can later switch to particular tag using:
 +
git checkout tag-name
 +
where tag-name is the released version number (eg 3.0-beta4), for full list of available tags use:
 +
git tag
 +
 
 +
Then, in order to build the binaries, you need only to run 'ant' in the 'ipscan' directory. Ant will use the standard build.xml script there and compile, test, and package the program for all platforms. Note: some packaging features were tested only on Linux.
 +
 
 +
The source code tree also includes the preconfigured Eclipse project for convenience. With Eclipse, you may use the 3rd-party [http://git.or.cz/gitwiki/EclipsePlugin Git plugin] in addition to command-line git client. After opening the project from Eclipse, make sure you add to the build path the appropriate directory from <tt>src-platform</tt> according to the OS you are currently using as well as the correct swt jar file from <tt>ext/swt</tt>. Then, it can be run using the <tt>net.azib.ipscan.Main</tt> class.
 +
 
 +
After you have made you changes, you can send patches by email generated using the appropriate git command:
 +
git format-patch origin/master
 +
or publish your own git repository, sending its URL and the branch name to pull the changes from.
 +
 
 +
== Translations ==
 +
 
 +
If you know some language other than English well, then please help translating Angry IP Scanner into that language.
 +
 
 +
For that, you need to take the latest <tt>[http://ipscan.git.sourceforge.net/git/gitweb.cgi?p=ipscan;a=blob_plain;f=resources/messages.properties resources/messages.properties]</tt> file, copy it with the ISO 2-letter language suffix (eg <tt>messages_et.properties</tt>), translate all the messages and send to me by email (or through the git).
 +
 
 +
To test your translations, run Angry IP Scanner from the command-line (assuming that the translated file is in the same directory as the original jar or exe):
 +
  java -cp . -jar ipscan-xxx.jar
 +
 
 +
= Source structure =
 +
 
 +
== Directories ==
 +
 
 +
* <tt>src</tt> - the main subdirectory of the project tree, which contains the Java package structure of the source (<tt>net.azib.ipscan</tt> and its sub packages). All the source code, needed for running the program is stored there.
 +
 
 +
* <tt>src-platform</tt> - platform-specific source code. Use the appropriate subdirectory for your OS (linux, linux64, mac or win32) when compiling/running.
 +
 
 +
* <tt>test</tt> - contains exactly the same Java package structure as <tt>src</tt> does, but is intended for unit tests and other classes, which are not needed for running Angry IP Scanner itself. Each test case Java class should have the same name as the original class under test, but with the Test suffix, for example, Feeder and FeederTest.
 +
 
 +
* <tt>ext</tt> - for external libraries. The contents of each library's directory will depend on the original structure of that library, however, not all the original files may be included.
 +
 
 +
* <tt>resources</tt> - textual and graphical resources to be packaged with the program.
 +
 
 +
== Java packages ==
 +
 
 +
Angry IP Scanner source code is in the <tt>net.azib.ipscan</tt> Java package.
 +
 
 +
* <tt>[http://ipscan.git.sourceforge.net/git/gitweb.cgi?p=ipscan;a=tree;f=src/net/azib/ipscan/config net.azib.ipscan.config]</tt> - classes, related to configuration
 +
* <tt>[http://ipscan.git.sourceforge.net/git/gitweb.cgi?p=ipscan;a=tree;f=src/net/azib/ipscan/core net.azib.ipscan.core]</tt> - core scanner classes
 +
* <tt>[http://ipscan.git.sourceforge.net/git/gitweb.cgi?p=ipscan;a=tree;f=src/net/azib/ipscan/state net.azib.ipscan.core.state]</tt> - scanner's state machine implementation
 +
* <tt>[http://ipscan.git.sourceforge.net/git/gitweb.cgi?p=ipscan;a=tree;f=src/net/azib/ipscan/feeders net.azib.ipscan.feeders]</tt> - all [[Documentation#Feeders|feeder]] implementations
 +
* <tt>[http://ipscan.git.sourceforge.net/git/gitweb.cgi?p=ipscan;a=tree;f=src/net/azib/ipscan/fetchers net.azib.ipscan.fetchers]</tt> - all [[Documentation#Fetchers|fetcher]] implementations
 +
* <tt>[http://ipscan.git.sourceforge.net/git/gitweb.cgi?p=ipscan;a=tree;f=src/net/azib/ipscan/exporters net.azib.ipscan.exporters]</tt> - all [[Documentation#Exporters|exporter]] implementations
 +
* <tt>[http://ipscan.git.sourceforge.net/git/gitweb.cgi?p=ipscan;a=tree;f=src/net/azib/ipscan/gui net.azib.ipscan.gui]</tt> - for GUI packages and classes (which are separate from the core functionality)
 +
* <tt>[http://ipscan.git.sourceforge.net/git/gitweb.cgi?p=ipscan;a=tree;f=src/net/azib/ipscan/gui/actions net.azib.ipscan.gui.actions]</tt> - most GUI listeners, such as menu item and button handlers
 +
 
 +
== Dependency injection ==
 +
 
 +
Angry IP Scanner uses [http://en.wikipedia.org/wiki/Dependency_injection dependency injection pattern] in its design, provided by the [http://www.picocontainer.org/ PicoContainer library], which was chosen for its lightweightness (adds about 60 kb).
 +
 
 +
PicoContainer encourages constructor injection, i.e. classes declare all required dependencies in their constrcutors, and container then resolves these dependencies (mostly) automatically, so that the classes themselves don't have to worry where these dependencies come from. This eases both development and unit testing of the code. Components are registered in the [http://ipscan.git.sourceforge.net/git/gitweb.cgi?p=ipscan;a=blob;f=src/net/azib/ipscan/config/ComponentRegistry.java ComponentRegistry] class.

Latest revision as of 18:32, 16 September 2012

Contents

[edit] Writing plugins

See FAQ: Plugins

[edit] Contributing

Angry IP Scanner's source code is hosted is now hosted on Github. Forking and pull-requests are very welcome! If you want to get an idea of what to do, check the bug reports.

In order to get the source code, the following command must be run (make sure you have git-core installed):

git clone git://github.com/angryziber/ipscan.git

This command will fetch the current source code of the program with full history into local directory named 'ipscan'. Or just browse the code repository on Github.

If the source of particular release is required, then you can later switch to particular tag using:

git checkout tag-name

where tag-name is the released version number (eg 3.0-beta4), for full list of available tags use:

git tag

Then, in order to build the binaries, you need only to run 'ant' in the 'ipscan' directory. Ant will use the standard build.xml script there and compile, test, and package the program for all platforms. Note: some packaging features were tested only on Linux.

The source code tree also includes the preconfigured Eclipse project for convenience. With Eclipse, you may use the 3rd-party Git plugin in addition to command-line git client. After opening the project from Eclipse, make sure you add to the build path the appropriate directory from src-platform according to the OS you are currently using as well as the correct swt jar file from ext/swt. Then, it can be run using the net.azib.ipscan.Main class.

After you have made you changes, you can send patches by email generated using the appropriate git command:

git format-patch origin/master 

or publish your own git repository, sending its URL and the branch name to pull the changes from.

[edit] Translations

If you know some language other than English well, then please help translating Angry IP Scanner into that language.

For that, you need to take the latest resources/messages.properties file, copy it with the ISO 2-letter language suffix (eg messages_et.properties), translate all the messages and send to me by email (or through the git).

To test your translations, run Angry IP Scanner from the command-line (assuming that the translated file is in the same directory as the original jar or exe):

java -cp . -jar ipscan-xxx.jar

[edit] Source structure

[edit] Directories

  • src - the main subdirectory of the project tree, which contains the Java package structure of the source (net.azib.ipscan and its sub packages). All the source code, needed for running the program is stored there.
  • src-platform - platform-specific source code. Use the appropriate subdirectory for your OS (linux, linux64, mac or win32) when compiling/running.
  • test - contains exactly the same Java package structure as src does, but is intended for unit tests and other classes, which are not needed for running Angry IP Scanner itself. Each test case Java class should have the same name as the original class under test, but with the Test suffix, for example, Feeder and FeederTest.
  • ext - for external libraries. The contents of each library's directory will depend on the original structure of that library, however, not all the original files may be included.
  • resources - textual and graphical resources to be packaged with the program.

[edit] Java packages

Angry IP Scanner source code is in the net.azib.ipscan Java package.

[edit] Dependency injection

Angry IP Scanner uses dependency injection pattern in its design, provided by the PicoContainer library, which was chosen for its lightweightness (adds about 60 kb).

PicoContainer encourages constructor injection, i.e. classes declare all required dependencies in their constrcutors, and container then resolves these dependencies (mostly) automatically, so that the classes themselves don't have to worry where these dependencies come from. This eases both development and unit testing of the code. Components are registered in the ComponentRegistry class.



Personal tools