Changeset 0764e19


Ignore:
Timestamp:
Apr 7, 2009 5:55:59 PM (11 years ago)
Author:
mathiasdm <mathiasdm@…>
Branches:
master
Children:
bf50695
Parents:
2f1d9375
Message:

New build file for desktopgui. Should work fine for anyone using java 1.6.

Location:
apps/desktopgui
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • apps/desktopgui/build.xml

    r2f1d9375 r0764e19  
    1 <?xml version="1.0" encoding="UTF-8"?>
    2 <!-- You may freely edit this file. See commented blocks below for -->
    3 <!-- some examples of how to customize the build. -->
    4 <!-- (If you delete it and reopen the project it will be recreated.) -->
    5 <!-- By default, only the Clean and Build commands use this build script. -->
    6 <!-- Commands such as Run, Debug, and Test only use this build script if -->
    7 <!-- the Compile on Save feature is turned off for the project. -->
    8 <!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
    9 <!-- in the project's Project Properties dialog box.-->
    10 <project name="desktopgui" default="default" basedir=".">
    11     <description>Builds, tests, and runs the project desktopgui.</description>
    12     <import file="nbproject/build-impl.xml"/>
    13     <!--
     1<project name="desktopgui" default="compile" basedir=".">
     2    <description>
     3        A desktopgui for I2P
     4    </description>
     5  <!-- set global properties for this build -->
     6  <property name="src" location="src"/>
     7  <property name="bin" location="bin"/>
     8  <property name="dist" location="dist"/>
     9  <property name="lib" location="lib"/>
     10  <property name="i2pref" location="../../build"/>
     11       
     12  <path id="classpath">
     13    <fileset dir="${lib}" includes="**/*.jar"/>
     14    <fileset dir="${i2pref}" includes="**/*.jar"/>
     15  </path>
    1416
    15     There exist several targets which are by default empty and which can be
    16     used for execution of your tasks. These targets are usually executed
    17     before and after some main targets. They are:
     17       
     18  <target name="init">
     19    <!-- Create the time stamp -->
     20    <tstamp/>
     21        <mkdir dir="${dist}"/>
     22        <mkdir dir="${bin}"/>
     23  </target>
    1824
    19       -pre-init:                 called before initialization of project properties
    20       -post-init:                called after initialization of project properties
    21       -pre-compile:              called before javac compilation
    22       -post-compile:             called after javac compilation
    23       -pre-compile-single:       called before javac compilation of single file
    24       -post-compile-single:      called after javac compilation of single file
    25       -pre-compile-test:         called before javac compilation of JUnit tests
    26       -post-compile-test:        called after javac compilation of JUnit tests
    27       -pre-compile-test-single:  called before javac compilation of single JUnit test
    28       -post-compile-test-single: called after javac compilation of single JUunit test
    29       -pre-jar:                  called before JAR building
    30       -post-jar:                 called after JAR building
    31       -post-clean:               called after cleaning build products
     25  <target name="compile" depends="init"
     26        description="compile the source " >
     27    <!-- Compile the java code from ${src} into ${bin} -->
     28    <javac srcdir="${src}" destdir="${bin}"  classpathref="classpath"/>
     29        <copy todir="${bin}">
     30          <fileset dir="${src}">
     31                  <exclude name="**/*.java"/>
     32          </fileset>
     33        </copy>
     34  </target>
    3235
    33     (Targets beginning with '-' are not intended to be called on their own.)
     36  <target name="jar" depends="compile"
     37        description="generate the distribution" >
     38    <!-- Create the distribution directory -->
     39    <mkdir dir="${dist}/lib"/>
    3440
    35     Example of inserting an obfuscator after compilation could look like this:
     41    <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
     42    <zip destfile="${dist}/desktopgui.jar" basedir="${bin}" />
     43  </target>
    3644
    37         <target name="-post-compile">
    38             <obfuscate>
    39                 <fileset dir="${build.classes.dir}"/>
    40             </obfuscate>
    41         </target>
    42 
    43     For list of available properties check the imported
    44     nbproject/build-impl.xml file.
    45 
    46 
    47     Another way to customize the build is by overriding existing main targets.
    48     The targets of interest are:
    49 
    50       -init-macrodef-javac:     defines macro for javac compilation
    51       -init-macrodef-junit:     defines macro for junit execution
    52       -init-macrodef-debug:     defines macro for class debugging
    53       -init-macrodef-java:      defines macro for class execution
    54       -do-jar-with-manifest:    JAR building (if you are using a manifest)
    55       -do-jar-without-manifest: JAR building (if you are not using a manifest)
    56       run:                      execution of project
    57       -javadoc-build:           Javadoc generation
    58       test-report:              JUnit report generation
    59 
    60     An example of overriding the target for project execution could look like this:
    61 
    62         <target name="run" depends="desktopgui-impl.jar">
    63             <exec dir="bin" executable="launcher.exe">
    64                 <arg file="${dist.jar}"/>
    65             </exec>
    66         </target>
    67 
    68     Notice that the overridden target depends on the jar target and not only on
    69     the compile target as the regular run target does. Again, for a list of available
    70     properties which you can use, check the target you are overriding in the
    71     nbproject/build-impl.xml file.
    72 
    73     -->
     45  <target name="clean"
     46        description="clean up" >
     47    <!-- Delete the ${build} and ${dist} directory trees -->
     48    <delete dir="${bin}"/>
     49    <delete dir="${dist}"/>
     50  </target>
    7451</project>
  • apps/desktopgui/nbproject/build-impl.xml

    r2f1d9375 r0764e19  
    153153            <attribute default="${excludes}" name="excludes"/>
    154154            <attribute default="${javac.debug}" name="debug"/>
    155             <attribute default="/does/not/exist" name="sourcepath"/>
     155            <attribute default="" name="sourcepath"/>
    156156            <element name="customize" optional="true"/>
    157157            <sequential>
     
    219219        </macrodef>
    220220    </target>
    221     <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
     221    <target name="-init-macrodef-nbjpda">
    222222        <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
    223223            <attribute default="${main.class}" name="name"/>
     
    225225            <attribute default="" name="stopclassname"/>
    226226            <sequential>
    227                 <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
     227                <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
    228228                    <classpath>
    229229                        <path path="@{classpath}"/>
     
    256256            <istrue value="${have-jdk-older-than-1.4}"/>
    257257        </condition>
    258         <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
    259             <os family="windows"/>
    260         </condition>
    261         <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
    262             <isset property="debug.transport"/>
    263         </condition>
    264258    </target>
    265259    <target depends="-init-debug-args" name="-init-macrodef-debug">
     
    271265                <java classname="@{classname}" dir="${work.dir}" fork="true">
    272266                    <jvmarg line="${debug-args-line}"/>
    273                     <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
     267                    <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
    274268                    <jvmarg line="${run.jvmargs}"/>
    275269                    <classpath>
     
    318312            -->
    319313    <target depends="init" name="deps-jar" unless="no.deps"/>
    320     <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
    321     <target depends="init" name="-check-automatic-build">
    322         <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
    323     </target>
    324     <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
    325         <antcall target="clean"/>
    326     </target>
    327314    <target depends="init,deps-jar" name="-pre-pre-compile">
    328315        <mkdir dir="${build.classes.dir}"/>
     
    345332        <!-- You can override this target in the ../build.xml file. -->
    346333    </target>
    347     <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
     334    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
    348335    <target name="-pre-compile-single">
    349336        <!-- Empty placeholder for easier customization. -->
     
    359346        <!-- You can override this target in the ../build.xml file. -->
    360347    </target>
    361     <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
     348    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
    362349    <!--
    363350                ====================
  • apps/desktopgui/nbproject/genfiles.properties

    r2f1d9375 r0764e19  
    11build.xml.data.CRC32=c4b345cd
    2 build.xml.script.CRC32=9c13114f
    3 build.xml.stylesheet.CRC32=958a1d3e
     2build.xml.script.CRC32=9785bb9a
     3build.xml.stylesheet.CRC32=be360661
    44# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
    55# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
    66nbproject/build-impl.xml.data.CRC32=c4b345cd
    7 nbproject/build-impl.xml.script.CRC32=8c02c081
    8 nbproject/build-impl.xml.stylesheet.CRC32=65b8de21
     7nbproject/build-impl.xml.script.CRC32=74d3fda2
     8nbproject/build-impl.xml.stylesheet.CRC32=487672f9
  • apps/desktopgui/nbproject/project.properties

    r2f1d9375 r0764e19  
    2121dist.javadoc.dir=${dist.dir}/javadoc
    2222excludes=
     23file.reference.appframework.jar=lib/appframework.jar
    2324file.reference.i2p.jar=../../core/java/build/i2p.jar
    2425file.reference.router.jar=../../router/java/build/router.jar
     26file.reference.swing-worker.jar=lib/swing-worker.jar
    2527includes=**
    2628jar.compress=false
    2729javac.classpath=\
    2830    ${file.reference.router.jar}:\
    29     ${file.reference.i2p.jar}:\
    30     ${libs.swing-app-framework.classpath}
     31    ${file.reference.appframework.jar}:\
     32    ${file.reference.swing-worker.jar}:\
     33    ${file.reference.i2p.jar}
    3134# Space-separated list of extra javac options
    3235javac.compilerargs=
    3336javac.deprecation=false
    34 javac.source=1.5
    35 javac.target=1.5
     37javac.source=1.6
     38javac.target=1.6
    3639javac.test.classpath=\
    3740    ${javac.classpath}:\
     
    5053javadoc.version=false
    5154javadoc.windowtitle=
     55jnlp.codebase.type=local
     56jnlp.enabled=false
     57jnlp.offline-allowed=false
     58jnlp.signed=false
    5259main.class=desktopgui.Main
    5360manifest.file=manifest.mf
  • apps/desktopgui/src/desktopgui/resources/Main.properties

    r2f1d9375 r0764e19  
    88Application.description = An anonymous communication network.
    99Application.vendorId = I2P
    10 Application.id = ${Application.name}
     10Application.id = desktopgui
    1111Application.lookAndFeel = system
Note: See TracChangeset for help on using the changeset viewer.