Initial commit into GIT.

Signed-off-by: default avatard.miller@cablelabs.com <d.miller@CableLabs.com>
parents
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0034)http://www.cryptix.org/LICENSE.TXT --><HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 6.00.2900.3132" name=GENERATOR></HEAD>
<BODY><PRE>Cryptix General License
Copyright (c) 1995-2005 The Cryptix Foundation Limited.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
THIS SOFTWARE IS PROVIDED BY THE CRYPTIX FOUNDATION LIMITED AND
CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE CRYPTIX FOUNDATION LIMITED OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</PRE></BODY></HTML>
This diff is collapsed.
This diff is collapsed.
* How to setup your environment to use Ant (Windows)
** Lets assume you have installed Java under c:\jdk\jdk6
** Lets assume you have installed Ant under c:\apache-ant
** Lets assume you have checked out source at c:\code\cfe
** Open cmd.exe (Windows Command Processor), and inside cmd, do the following
** set ANT_HOME=c:\apache-ant
** set JAVA_HOME=c:\jdk\jdk6
** set PATH=%ANT_HOME%\bin;%JAVA_HOME%\bin;%PATH%
* How to build/release using ant
** Please setup your Ant environment on Windows/Linux
** edit build.props for appropriate version, e.g
-- build.props --
cfeversion=1.3.6
** at the command prompt goto (change directory) to your source-code directory
c:\> cd c:\code\cfe
** now run
c:\code\cfe> ant
* How to start a fresh build
** Make sure you have commited any source code changes
** At command prompt run
ant clean
* Notes on Files
** build.props
contains build props that are read by ant file
It also contain the CFE's version number
** build.xml
This is main build XML developed by CableLabs.
You should be using this, it works with NetBeans, except for 'compile-single'.
** build-nb.xml
This file was called build.xml before.
This was auto-generated by NetBeans IDE.
It internally calls nbproject/build-impl.xml
** release/*
Contains files used to produce a release. The MANIFEST.MF file is copied
to src/META-INF for building ConfigFileEditor.jar, the remaining files
are copied to dist to build the installation .exe and .jar files.
Following files are patched by build.xml with version number specified
in build.props
MANIFEST.MF
install.xml
CableLabsCFE.jsmooth
create.bat
** create.bat
Although ant's build patches this file, its not being used by ant.
It directly uses IZPack's Java libraries through Ant-Task to do the job.
** version.txt
This file is generated by ant build. Its used by Version.java to read
the version information. You may use Version.getVersion inside JVM
to get the version information.
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<project name="ConfigFileEditor" default="default" basedir=".">
<description>Builds, tests, and runs the project ConfigFileEditor.</description>
<import file="nbproject/build-impl.xml"/>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-jar: called before JAR building
-post-jar: called after JAR building
-post-clean: called after cleaning build products
(Targets beginning with '-' are not intended to be called on their own.)
Example of inserting an obfuscator after compilation could look like this:
<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Another way to customize the build is by overriding existing main targets.
The targets of interest are:
-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
-init-macrodef-debug: defines macro for class debugging
-init-macrodef-java: defines macro for class execution
-do-jar-with-manifest: JAR building (if you are using a manifest)
-do-jar-without-manifest: JAR building (if you are not using a manifest)
run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation
An example of overriding the target for project execution could look like this:
<target name="run" depends="ConfigFileEditor-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>
Notice that the overridden target depends on the jar target and not only on
the compile target as the regular run target does. Again, for a list of available
properties which you can use, check the target you are overriding in the
nbproject/build-impl.xml file.
-->
</project>
cfeversion=1.1.14
currentyear=2015
<project name="ConfigFileEditor" default="release" basedir=".">
<!-- we want to use the existing project properties -->
<property file="nbproject/project.properties"/>
<!-- uncomment to get compile-single, etc. for NetBeans
<import file="nbproject/build-impl.xml"/>
-->
<target name="init">
<property name="deprecation" value="yes"/>
<property name="debug" value="yes"/>
<property name="optimize" value="no"/>
<property file="build.props"/>
<property name="resources.dir" value="resources"/>
<property name="lib.dir" value="lib"/>
<property name="release_dir" value="release"/>
<property name="dist.lib.dir" value="${dist.dir}/lib"/>
<property name="dist.resources.dir" value="${dist.dir}/resources"/>
<property name="aboutfile" value="${src.views.dir}/AboutTEIKACE.java"/>
<property name="mainfile" value="${src.views.dir}/TeikaceMainWindowForm.java"/>
<property name="cfe_mf" value="MANIFEST.MF"/>
<property name="dist.jsfile" value="${dist.dir}/CableLabsCFE.jsmooth"/>
<property name="dist.install.exe" value="${dist.dir}/CableLabsCFE-${cfeversion}.exe"/>
<property name="izpack_install_xml" value="${dist.dir}/install.xml"/>
<property name="dist.install.jar"
value="${dist.dir}/CableLabsCFE-${cfeversion}.jar"/>
<!-- setclasspath to external libs -->
<path id="cfe_classpath">
<pathelement location="${build.classes.dir}"/>
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
</path>
</target>
<target name="jar" depends="init,compile">
<jar destfile="${dist.jar}" manifest="${src.dir}/META-INF/${cfe_mf}" compress="yes">
<fileset dir="${build.classes.dir}">
<include name="com/cablelabs/**/*.class"/>
</fileset>
<fileset dir="${src.dir}">
<include name="images/**"/>
</fileset>
</jar>
</target>
<target name="jsmooth_cfe" depends="init,jar,init_js_iz">
<taskdef name="jsmoothgen"
classpath="${jsant_jar}"
classname="net.charabia.jsmoothgen.ant.JSmoothGen"/>
<taskdef name="izpack"
classpath="${izant_jar}"
classname="com.izforge.izpack.ant.IzPackTask"/>
<izpack input="${izpack_install_xml}"
output="${dist.install.jar}"
basedir="${dist.dir}"/>
<jsmoothgen project="${dist.jsfile}"
skeletonroot="${jshome}/skeletons"/>
</target>
<target name="compile" depends="init,xml,copyfiles">
<echo message="Compiling sources ... "/>
<copy file="${aboutfile}" toFile="${aboutfile}.bak" preservelastmodified="true"/>
<copy file="${mainfile}" toFile="${mainfile}.bak" preservelastmodified="true"/>
<replace file="${aboutfile}">
<replacefilter token="CFE_VERSION" value="${cfeversion}"/>
<replacefilter token="CFE_YEAR" value="${currentyear}"/>
</replace>
<replace file="${mainfile}" token="CFE_YEAR" value="${currentyear}"/>
<javac srcdir="${basedir}" destdir="${build.classes.dir}"
debug="${debug}" optimize="${optimize}"
deprecation="${deprecation}">
<include name="src/**/*.java"/>
<include name="MMH/**/*.java"/>
<classpath refid="cfe_classpath"/>
</javac>
<move file="${aboutfile}.bak" tofile="${aboutfile}"/>
<move file="${mainfile}.bak" tofile="${mainfile}"/>
</target>
<target name="xml" depends="init">
<property name="xjchome" value="external/jaxb-ri-2.2.7"/>
<taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask">
<classpath>
<fileset dir="${xjchome}/lib" includes="*.jar" excludes="ant.jar"/>
<!-- <fileset dir="../../..">
<include name="jaxp/**/*.jar"/>
<include name="jwsdp-shared/lib/**/*.jar"/>
</fileset>
-->
</classpath>
</taskdef>
<xjc destdir="${src.dir}" removeOldOutput="yes" package="com.cablelabs.cfgeditor.models.xml">
<schema dir="${src.models.dir}" includes="CableLabs.xsd"/>
<produces dir="${src.xml.dir}" includes="**/*"/>
</xjc>
</target>
<target name="copyfiles" depends="init,release.version">
<echo message="Creating directories ..."/>
<mkdir dir="${dist.resources.dir}"/>
<mkdir dir="${dist.lib.dir}"/>
<mkdir dir="${build.classes.dir}"/>
<echo message="Copying files ..."/>
<copy todir="${dist.resources.dir}" overwrite="true">
<fileset dir="${resources.dir}">
<include name="**/*"/>
<exclude name="**/.svn/**"/>
</fileset>
</copy>
<copy todir="${dist.lib.dir}" overwrite="true">
<fileset dir="${lib.dir}">
<include name="**/*"/>
<exclude name="**/.svn/**"/>
</fileset>
</copy>
<copy todir="${dist.dir}" overwrite="true">
<fileset dir="${release_dir}">
<include name="**/*"/>
<exclude name="**/.svn/**"/>
<exclude name="**/${cfe_mf}"/>
</fileset>
</copy>
<copy todir="${src.dir}/META-INF" overwrite="true">
<fileset dir="${release_dir}">
<include name="**/${cfe_mf}"/>
</fileset>
</copy>
<echo message="Patching files ..."/>
<replace file="${dist.dir}/install.xml" token="CFE_VERSION" value="${cfeversion}"/>
<replace file="${dist.dir}/create.bat" token="CFE_VERSION" value="${cfeversion}"/>
<replace file="${dist.jsfile}" token="CFE_VERSION" value="${cfeversion}"/>
<replace file="${src.dir}/META-INF/${cfe_mf}" token="CFE_VERSION" value="${cfeversion}"/>
</target>
<target name="init_js_iz" depends="init">
<property name="jshome" value="external/js0.9.9-7"/>
<property name="jsant_jar" value="${jshome}/lib/jsmoothgen-ant.jar"/>
<property name="izant_jar" value="${basedir}/external/standalone-compiler.jar"/>
</target>
<target name="release.version" depends="init">
<taskdef name="svn" classname="org.tigris.subversion.svnant.SvnTask">
<classpath>
<fileset dir="${basedir}/external/svn">
<include name="*.jar"/>
</fileset>
</classpath>
</taskdef>
<fail message="Please provide release version, either edit build.props or run ant as 'ant -Dcfeversion=1.3.0'"
unless="cfeversion"/>
<echo message="Building release version ${cfeversion}"/>
</target>
<target name="clean" depends="init">
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
<delete dir="${src.xml.dir}"/>
<move file="${aboutfile}.bak" tofile="${aboutfile}" quiet="true" failonerror="false"/>
<move file="${mainfile}.bak" tofile="${mainfile}" quiet="true" failonerror="false"/>
</target>
<target name="release" depends="init,jar,jsmooth_cfe"/>
</project>
This diff is collapsed.
This diff is collapsed.