Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add the possibility of repackaging everything with version informatio…

…n after the fact
  • Loading branch information...
commit fd1ea479c631653823323ed013c4d459bc4a7aaf 1 parent 9047037
Ola Bini authored
1  .gitignore
View
@@ -8,6 +8,7 @@ bin/Ioke.Lang.Parser.Functional.dll
bin/Ioke.Lang.Parser.Functional.dll.mdb
bin/Ioke.Math.dll
bin/Ioke.Math.dll.mdb
+bin/Ioke.Lang.Version.dll
bin/ioke.exe
bin/ioke.exe.mdb
bin/ispec.exe
BIN  bin/ILRepack.exe
View
Binary file not shown
19 build.xml
View
@@ -33,6 +33,25 @@
<exec executable="ruby" input="generate_filter_data.rb" failonerror="false" failifexecutionfails="false"/>
</target>
+ <target name="generate_version_data" depends="generate_filters" description="Generates version data">
+ <filter filtersfile="version_data.properties"/>
+ <filter token="VERSION" value="${VERSION_NAME}"/>
+ <filter token="VERSION_RUNTIME" value="${VERSION_NUMBER}${VERSION_ADDITION}"/>
+ <filter token="VERSION_STRING" value="Ioke ${VERSION_NAME} ikj ${VERSION_NUMBER}${VERSION_ADDITION}"/>
+
+ <copy todir="${classes.dir}" filtering="true" overwrite="true">
+ <fileset dir="${src.dir}" includes="**/*.properties"/>
+ </copy>
+ </target>
+
+ <target name="add_new_version_file" depends="generate_version_data" description="Adds a new version property file to an existing jar-file">
+ <jar destfile="${lib.dir}/ioke.jar" update="true">
+ <fileset dir="${classes.dir}">
+ <include name="**/*.properties"/>
+ </fileset>
+ </jar>
+ </target>
+
<target name="gen-pom" description="Creates new pom.xml files based on the current version configuration. This should be run before doing any Maven stuff">
<filter token="VERSION_NAME" value="${VERSION_NAME}"/>
<filter token="VERSION_NUMBER" value="${VERSION_NUMBER}"/>
44 ioke-ikc.build
View
@@ -51,19 +51,21 @@
</exec>
</target>
- <target name="compile" depends="generate_filters" description="Compile the source files for the project.">
- <csc target="library" output="${bin.dir}/Ioke.Math.dll" debug="true">
- <sources>
- <include name="${src.dir}/Ioke.Math/**/*.cs" />
- </sources>
- </csc>
-
+ <target name="generate_version_data" depends="generate_filters" description="Generates version data">
<echo file="${build.filtered.dir}/Ioke.Lang.version.properties">ioke.build.version=${VERSION_NAME}
ioke.build.runtimeVersion=${VERSION_NUMBER}${VERSION_ADDITION}
ioke.build.versionString=Ioke ${VERSION_NAME} ikc ${VERSION_NUMBER}${VERSION_ADDITION}
ioke.build.date=${version::extract-property('DATE', 'version_data.properties')}
ioke.build.commit=${version::extract-property('COMMIT', 'version_data.properties')}
</echo>
+ </target>
+
+ <target name="compile" depends="generate_version_data" description="Compile the source files for the project.">
+ <csc target="library" output="${bin.dir}/Ioke.Math.dll" debug="true">
+ <sources>
+ <include name="${src.dir}/Ioke.Math/**/*.cs" />
+ </sources>
+ </csc>
<csc target="library" output="${bin.dir}/Ioke.Lang.dll" debug="true">
<sources>
@@ -74,8 +76,8 @@ ioke.build.commit=${version::extract-property('COMMIT', 'version_data.properties
<exclude name="${src.dir}/Ioke.Lang/DokgenMain.cs"/>
</sources>
<references basedir="${bin.dir}">
- <include name="*.dll" />
- <exclude name="Ioke.Lang.dll" />
+ <include name="Ioke.Math.dll" />
+ <include name="NRegex.dll" />
</references>
<resources basedir="${src.raw.dir}" dynamicprefix="true">
<include name="builtin/**/*.ik" />
@@ -116,6 +118,22 @@ ioke.build.commit=${version::extract-property('COMMIT', 'version_data.properties
</csc>
</target>
+ <target name="compile-version" depends="generate_version_data" description="Compiles a version DLL">
+ <al output="${bin.dir}/Ioke.Lang.Version.dll" target="lib">
+ <sources basedir="${build.filtered.dir}" defaultexcludes="true">
+ <include name="*.properties" />
+ </sources>
+ </al>
+ </target>
+
+ <target name="add-new-version-file" depends="compile-version" description="Adds a version DLL to the original DLL">
+ <move file="${bin.dir}/Ioke.Lang.dll" tofile="${bin.dir}/Ioke.Lang.Org.dll"/>
+ <exec managed="true" program="bin/ILRepack.exe">
+ <arg line="/out:${bin.dir}/Ioke.Lang.dll ${bin.dir}/Ioke.Lang.Org.dll ${bin.dir}/Ioke.Lang.Version.dll"/>
+ </exec>
+ <delete file="${bin.dir}/Ioke.Lang.Org.dll"/>
+ </target>
+
<target name="test" depends="compile" description="Runs all ISpec tests">
<exec managed="true" program="bin/ispec.exe">
<arg line="test -fs"/>
@@ -124,7 +142,7 @@ ioke.build.commit=${version::extract-property('COMMIT', 'version_data.properties
<target name="ci-test" description="Runs all ISpec tests">
<exec managed="true" program="bin/ispec.exe">
- <arg line="test -fx to: ${test.results.dir}"/>
+ <arg line="test -fx to: ${test.results.dir}"/>
</exec>
</target>
@@ -138,6 +156,9 @@ ioke.build.commit=${version::extract-property('COMMIT', 'version_data.properties
<include name="bin/*.exe"/>
<include name="bin/ispec"/>
<include name="bin/dokgen"/>
+ <exclude name="bin/Ioke.Lang.Org.dll"/>
+ <exclude name="bin/Ioke.Lang.Version.dll"/>
+ <exclude name="bin/ILRepack.exe"/>
</fileset>
<fileset basedir="." prefix="ioke">
@@ -158,6 +179,9 @@ ioke.build.commit=${version::extract-property('COMMIT', 'version_data.properties
<include name="bin/*.exe"/>
<include name="bin/ispec"/>
<include name="bin/dokgen"/>
+ <exclude name="bin/Ioke.Lang.Org.dll"/>
+ <exclude name="bin/Ioke.Lang.Version.dll"/>
+ <exclude name="bin/ILRepack.exe"/>
</fileset>
<fileset basedir="." prefix="ioke">
Please sign in to comment.
Something went wrong with that request. Please try again.