Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Can anyone point me to instructions on building netbeans from scratch?

Reply
Thread Tools

Can anyone point me to instructions on building netbeans from scratch?

 
 
Joseph Daniel Zukiger
Guest
Posts: n/a
 
      09-27-2004
(Hope no one minds the crosspost too much. Searching c.l.j.* for
"build netbeans source" brought these two groups up.)

Anyway, yes, I'm insane. But I really do think I want to build
netbeans from source. I've unpacked the tarball for the source, and in
netbeans-src/nbbuild are build.properties and build.xml.

I'm tempted to just run ant and see how it goes. (I assume netbeans
will install it's own ant and no one will be the wiser.) I looked for
a README, but I couldn't find anything that gave me more than the
"what's changed" kind of info. (Yeah, I'm sure I am not looking in the
right place.)

I'm going to try running ant in ~/nb/netbeans-src/nbbuild in a
non-admin account and see what happens tonight. Hopefully, I can get
some clues.

(Oh. Here's the license dialogue. Maybe I'm on to something. I'm sure
I should set some environment variables, however. Java and ant are
both in my shell path variables at this point, but I wonder if it will
see xerces and those guys. We'll see.)

And if anyone wants to hit me over the head with a clue stick
overnight, that would be appreciated, too.

JDZ
 
Reply With Quote
 
 
 
 
carlo dainese
Guest
Posts: n/a
 
      09-27-2004
Joseph Daniel Zukiger wrote:
> (Hope no one minds the crosspost too much. Searching c.l.j.* for
> "build netbeans source" brought these two groups up.)
>
> Anyway, yes, I'm insane. But I really do think I want to build
> netbeans from source. I've unpacked the tarball for the source, and in
> netbeans-src/nbbuild are build.properties and build.xml.
>
> I'm tempted to just run ant and see how it goes. (I assume netbeans
> will install it's own ant and no one will be the wiser.) I looked for
> a README, but I couldn't find anything that gave me more than the
> "what's changed" kind of info. (Yeah, I'm sure I am not looking in the
> right place.)
>
> I'm going to try running ant in ~/nb/netbeans-src/nbbuild in a
> non-admin account and see what happens tonight. Hopefully, I can get
> some clues.
>
> (Oh. Here's the license dialogue. Maybe I'm on to something. I'm sure
> I should set some environment variables, however. Java and ant are
> both in my shell path variables at this point, but I wonder if it will
> see xerces and those guys. We'll see.)
>
> And if anyone wants to hit me over the head with a clue stick
> overnight, that would be appreciated, too.
>
> JDZ


from: http://www.netbeans.org/kb/articles/...Run.html#build

hope this helps
Carlo

Building Your Application on the NetBeans Platform

There are two ways to build an application on the NetBeans Platform:

* Building from Source
The traditional way to build an application on the NetBeans
Platform is to build from source, but there will be more documentation
on using the new platform binary distribution soon.

Advantages:
You have all of the source code to the platform - this is useful
for debugging purposes, and also to find out how something works if you
have a problem. You can easily control the set of modules to include in
your build.

Disadvantages:
Requires some knowledge of CVS and Ant.

* Using the Platform binary

Advantages:
Easier to get started.

Disadvantages:
Harder to debug without the sources. May be more complicated to
add further modules from netbeans.org.

Note: If you are new to working with the NetBeans Platform, we strongly
encourage you to join the platform related mailing lists, so you have
someplace to go if you have questions.
Building from Source

Building from source basically involves:

1. Downloading the NetBeans sources or, better yet, checking them
out from CVS

* The sources of latest builds are available here (the
platform is built from the IDE sources, there is no platform-specific
source download)
* We recommend that you get the sources via CVS. That way it
is much easier to keep the sources up-to date.
There are basically two ways to work with CVS. Either use
the support in the IDE or use the CVS command line or OS native client.
For more info on both ways, please go to the CVS Access document.
However what you need to do to be able to build the
platform in any CVS client is equivalent to the following command:

cvs checkout -r release36 -P openide core nbbuild
autoupdate xml/external text

(note that that to get the sources for the standard
distribution of the IDE, you can use cvs checkout stable_nowww).

By running this command, you check out the openide, core,
nbbuild, autoupdate, and text modules, and extra binaries (such as Ant
extensions) needed to complete the build.

2. Downloading the extra binaries required (for Release 3.4 and
older sources only!)

Skip this step unless you are intentionally building old (3.4 or
older) sources! For sources post-Release 3.4, these extra binaries are
included in CVS, and the source snaphshots, and this step is not required.

* You can download them from the release archive page.
* Create a directory in the parent of the directory where the
sources are checked out (which is the one that contains subdirectories
openide, core, etc.
* Uzip/untargz the archive into the nbextra directory.

3. Building the sources with Ant (included with the sources) to
compile your own code against

* Information about the Ant build system can be found here.
* To build the platform you just need to go into nbbuild
folder and type the command:

ant -Dmoduleconfig=platform

4.0 note: in NetBeans 4.0 the above apparently no longer
works. Instead, use

ant build-platform

* After building the platform you can immediately run it using:

ant -Dmoduleconfig=platform tryme

Note that the first time you do a build, you will be asked
to agree to the licenses of various third party binaries (such as
JavaHelp) that are used by NetBeans and included with the sources.

4. Customizing the platform

There are several ways to customize the platform.

* Branding - described below
* Changing the system filesytem using XML layers. For more
information on layering please read the Using installation layer section
in the Modules API documentation. It's also a good idea to consult some
of the existing layers as examples.
* Removing some core modules from the platform
When you build or download the platform you will be able to
find the following files in the netbeans/modules directory: core-ui.jar,
autoupdate.jar, and text.jar. It should be possible to remove some of
these .jars to make your app smaller and to get rid of some unneeded
menu/toolbar actions, windows, etc.
Basically, when you remove one of these JARs, its XML layer
and some classes are removed. If you look at a module's XML layer, you
can get an overview of what will happen to the platform when the module
is removed.

5. Adding modules

It is very likely that your application will contain some of the
NetBeans modules plus one or more of your modules
* You can get some info about existing modules by looking at
the existing modules list.
* Check out the modules you will need and add directories for
your own modules with a similar structure. It is good idea to take
inspiration for your module build script from an existing module.
Modifying existing build.xml scripts should be a matter of search & replace.
* For example you might decide to check out the Editor module
and the HTML (HTML data loader) module. (This will create an application
which recognizes HTML files on your disk and allows you to edit the
files). To build such an app, go to nb_all directory and type:

cvs checkout -P editor html

or take whatever action is needed in your CVS client to
check out the modules.
* Of course you need to do some coding to add desired
functionality to you app. A lot of useful links about writing modules
and using the Open APIs can be found in the documentation list section.
A very brief overview of writing modules can also be found in the
Getting started section

6. Branding

Branding is a process of modifying resources in the platform to
provide your own look for the app.
The first candidate for branding is usually the splash screen,
but there are many others.
For a demo of a branded app please download Jesse's
toy-branded-app-demo example.
Branding is done in a way similar to localization. Again, for
more info please consult links in the documentation list section.

7. Doing a build of the platform and your modules, which will result
in a packaged application

To get a zipped distribution of your app it should be enough to type:

ant -Dmoduleconfig=platform
-Dmodules=autoupdate,core/settings,core/javahelp,text,editor,html,{LIST
OF YOUR MODULES}

in the nbbuild directory.

8. Testing your application

* Automated testing can significantly help you keep the
quality of the application at an acceptable level
Feel free to reuse some of the NetBeans testing infrastructure:
-JUnit module
-Xtest module

Building Modules and Adding Them to the Platform

There is not yet detailed documentation for working with the new
Platform binary builds - we are working on it! Basically this involves:

1. Downloading the Platform binary and unpacking it to a directory

You can do so here

2. Developing your modules

See corresponding section in Build From Source

3. Copying the module .jar files to the modules/ subdirectory of the
Platform directory

4. Copying any libraries required by your modules to the appropriate
lib/ or modules/ext/ subdirectories of the Platform directory
5. Doing any needed customizations of the Platform

See corresponding section in Build from Source

6. Branding

See corresponding section in Build from Source.

7. Packaging the Platform with your modules either as a zip file or
with a custom installer

8. Testing your application

See corresponding section in Build from Source.

Recommended reading

CVS access
This document will teach you how to get access to the sources
stored in the CVS repository. You can learn how to access the sources
either using CVS support in NetBeans or using CVS on the command line.
(Includes info about firewalls and SSH tunneling).

Structure of the sources in CVS
Read more about how the source is organized in the CVS
repository using tags, branches, labels, modules, etc.

CVS branches
Sometimes it is useful to create your personal working space
(branch) in the CVS repository or access such a branch that is created
by another developer. Information about how to work with branches can be
found here.

Building with Ant
Here you will find the "Quick Start with Ant" document and
detailed information about using the Ant build system. The page also
links to a document describing how to make your module build script an
integral part of the IDE build and how to maintain your build script.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Share-Point-2010 ,Share-Point -2010 Training , Share-point-2010Hyderabad , Share-point-2010 Institute Saraswati lakki ASP .Net 0 01-06-2012 06:39 AM
Scenario 5: IS-IS routing on Frame Relay Multi-point and Point-to-Point David Sudjiman Cisco 0 06-08-2006 09:11 AM
Anyone can give some instructions on the function of this asm? changs@iastate.edu C Programming 7 03-04-2006 08:41 PM
Can anyone suggest reasons NOT to follow these instructions? Tom Betz Firefox 11 01-12-2005 03:52 AM
Building a GUI using NetBeans platform (not Netbeans IDE !) Pimousse Java 2 04-21-2004 07:22 AM



Advertisments