Skip to content
Browse files

change version to 0.85.5

  • Loading branch information...
1 parent f721f42 commit 3363dc2d1a00ae6ea56426a6f8371ec92d58a9c7 @jfreilly jfreilly committed
Showing with 346 additions and 346 deletions.
  1. +346 −346 SharpZlib.build
View
692 SharpZlib.build
@@ -1,346 +1,346 @@
-<?xml version="1.0" encoding="utf-8" ?>
-
-<!-- Nant style build file for #ZipLib -->
-
-<!--
- By default, #ziplib will be built targeting the CLR on which NAnt is
- running.
-
- To build #ziplib targeting a specific CLR, pass the identifier of that
- CLR as the -t(argetframework) option.
-
- For example:
- NAnt.exe -t:netcf-1.0, would build #ziplib targeting .NET Compact
- Framework 1.0.
-
- A non-exhaustive list of framework identifiers:
- * net-1.0 .NET Framework 1.0
- * net-1.1 .NET Framework 1.1
- * net-2.0 .NET Framework 2.0
- * netcf-1.0 .NET Compact Framework 1.0
- * netcf-2.0 .NET Compact Framework 2.0
- * mono-1.0 Mono 1.0 profile
- * mono-2.0 Mono 2.0 profile
- -->
-
-
-<project name="#ZipLib" default="build" basedir="." >
-
- <!-- Setup Properties -->
- <property name="debug" value="False"/>
- <property name="optimize" value="True"/>
- <property name="checked" value="False" />
- <property name="version" value="0.85.4"/>
-
- <property name="build.output.dir" value="bin" overwrite="False" />
- <property name="sharpziplib.name" value="ICSharpCode.SharpZipLib" />
- <property name="build.sharpziplib.path" value="${build.output.dir}/${sharpziplib.name}.dll" />
- <property name="build.defines" value="AUTOBUILD" />
-
- <target name="rebuild"
- description="Clean and rebuild"
- depends="clean, build"
- />
-
- <target
- name="clean"
- description="Remove build artefacts"
- >
- <delete verbose="true" >
- <fileset basedir=".">
- <include name="${build.output.dir}/ICSharpCode.SharpZipLib.dll" />
- <include name="${build.output.dir}/ICSharpCode.SharpZipLib.pdb" />
- </fileset>
- </delete>
- <nant buildfile = "samples/cs/samples.build" target="clean" />
- <nant buildfile = "samples/vb/samples.build" target="clean" />
- <nant buildfile = "tests/tests.build" target="clean" />
- </target>
-
- <target name="test" depends="build" description="Run unit tests" >
- <nant buildfile="tests/tests.build" target="test"/>
- </target>
-
- <target name="build" description="Build the current source." depends="setup">
- <call target="build-${framework::get-target-framework()}" />
- <copy todir="bin" overwrite="True" >
- <fileset basedir="${build.output.dir}">
- <include name="${sharpziplib.name}.dll"/>
- </fileset>
- </copy>
- </target>
-
- <target name="build-netcf-1.0" >
- <call target="build-net-1.1" />
- </target>
-
- <target name="build-netcf-2.0" >
- <!-- The compiler for Microsoft .NET Compact Framework 2.0 does not support the /keyfile option. -->
- <call target="build-net-1.1" />
- </target>
-
- <target name="build-net-1.1" >
- <csc
- target="library"
- output="${build.sharpziplib.path}"
- optimize="${optimize}"
- debug="${debug}"
- checked="${checked}"
- define="${build.defines}"
- doc="${build.output.dir}/ICSharpCode.SharpZipLib.xml"
- >
- <sources basedir="src">
- <include name="**/*.cs"/>
- </sources>
- <references>
- <include name="mscorlib.dll" />
- <include name="System.dll" />
- </references>
- </csc>
- </target>
-
-
- <target name="build-net-2.0" >
- <csc
- target="library"
- output="${build.sharpziplib.path}"
- optimize="${optimize}"
- debug="${debug}"
- checked="${checked}"
- define="${build.defines}"
- keyfile="ICSharpCode.SharpZipLib.key"
- doc="${build.output.dir}/ICSharpCode.SharpZipLib.xml"
- >
-
- <sources basedir="src">
- <include name="**/*.cs"/>
- </sources>
- <references>
- <include name="mscorlib.dll" />
- <include name="System.dll" />
- </references>
- </csc>
- </target>
-
- <target name="build-mono-1.0" >
- <fail message="Dont know how to build for Mono 1.0." />
- </target>
-
- <target name="build-mono-2.0" >
- <fail message="Dont know how to build for Mono 2.0." />
- </target>
-
- <target name="build-samples" >
- <nant buildfile = "samples/cs/samples.build" />
- <nant buildfile = "samples/vb/samples.build" />
- </target>
-
- <!-- internal targets -->
- <target name="show-setup" depends="setup">
- <echo message="Current setup"/>
- <echo message="Target framework = '${framework::get-target-framework()}'"/>
- <echo message="build.defines = '${build.defines}'"/>
- <echo message="build.output.dir = '${build.output.dir}'"/>
- </target>
-
- <target name="setup">
- <if test="${target::exists('setup-for-' + framework::get-target-framework())}">
- <call target="setup-for-${framework::get-target-framework()}" />
- </if>
- <mkdir dir="bin" />
- </target>
-
- <target name="setup-for-net-1.0">
- <property name="build.defines" value="AUTOBUILD,NET,NET_1_0" />
- </target>
-
- <target name="setup-for-net-1.1">
- <property name="build.defines" value="AUTOBUILD,NET,NET_1_1" />
- </target>
-
- <target name="setup-for-net-2.0">
- <property name="build.defines" value="AUTOBUILD,NET,NET_2_0" />
- </target>
-
- <target name="setup-for-netcf-1.0">
- <property name="build.defines" value="AUTOBUILD,NETCF,NETCF_1_0" />
- </target>
-
- <target name="setup-for-netcf-2.0">
- <property name="build.defines" value="AUTOBUILD,NETCF,NETCF_2_0" />
- </target>
-
- <!-- Mono has not actually been used or tested please let us know if you use Mono! -->
- <target name="setup-for-mono-1.0">
- <property name="build.defines" value="AUTOBUILD,MONO,MONO_1_0" />
- </target>
-
- <target name="setup-for-mono-2.0">
- <property name="build.defines" value="AUTOBUILD,MONO,MONO_2_0" />
- </target>
-
- <!--
- <target
- name="release.run" >
-
- Speculative notes more than real working build. A lot to sort out.
- Cant do both frameworks AFAIK which is a pain
-
- <call target="preparerelease" />
- <delete dir="${release.output.dir}" if="${directory::exists('${release.output.dir}')}" />
- <mkdir dir="${release.output.dir}" />
- <call target="clean" />
- <call target="build.run.desktop" />
- <zip zipfile="${release.output.dir}/ICSharpCode.SharpZipLib_11.zip" >
- <fileset basedir="${build.output.dir}">
- <include name="${build.target.name}" />
- </fileset>
- </zip>
- <call target="clean" />
-
- <echo message="release building is not working" />
- </target>
--->
-
- <target name="preparerelease" >
-
- <script language="C#">
- <code>
- <![CDATA[
-
- static StringCollection SearchDirectory(string directory, string filemask)
- {
- StringCollection collection = new StringCollection();
- SearchDirectory(directory, filemask, collection);
- return collection;
- }
-
- static void SearchDirectory(string directory, string filemask, StringCollection collection)
- {
- try {
- string[] file = Directory.GetFiles(directory, filemask);
- foreach (string f in file) {
- collection.Add(f);
- }
-
- string[] dir = Directory.GetDirectories(directory);
- foreach (string d in dir) {
- SearchDirectory(d, filemask, collection);
- }
- } catch (Exception) {
- }
- }
-
- static Regex AssemblyVersion = new Regex("AssemblyVersion\\(.*\\)]");
- static void SetVersionInfo(string fileName, string version)
- {
- StreamReader inFile = null;
- string content;
-
- try {
- inFile = new StreamReader(fileName);
- content = inFile.ReadToEnd();
- } catch (Exception e) {
- Console.WriteLine(e);
- return;
- } finally {
- if (inFile != null) {
- inFile.Close();
- }
- }
-
- if (content != null) {
- string newContent = AssemblyVersion.Replace(content, "AssemblyVersion(\"" + version + "\")]");
- StreamWriter outFile = null;
- try {
- outFile = new StreamWriter(fileName);
- outFile.Write(newContent);
- } catch (Exception e) {
- Console.WriteLine(e);
- return;
- } finally {
- if (outFile != null) {
- outFile.Close();
- }
- }
- }
- }
-
- static string revisionNumber = "0";
- static string ReadRevisionFromFile()
- {
- try {
- StreamReader reader = new StreamReader(@"REVISION");
- using (reader) {
- return reader.ReadLine();
- }
- }
- catch (Exception e) {
- Console.WriteLine(e.Message);
- throw new Exception("Cannot read revision number from file: " + e.Message);
- }
- }
- static void RetrieveRevisionNumber()
- {
- try {
- System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo("svn", "info");
- psi.UseShellExecute = false;
- psi.RedirectStandardOutput = true;
-
- try {
- System.Diagnostics.Process process = System.Diagnostics.Process.Start(psi);
- process.WaitForExit();
- string output = process.StandardOutput.ReadToEnd();
-
- Regex r = new Regex(@"Revision:\s+(\d+)");
- Match m = r.Match(output);
- if (m != null && m.Success && m.Groups[1] != null) {
- revisionNumber = m.Groups[1].Value;
- Console.WriteLine("SVN Version '{0}'", revisionNumber);
- }
- if ((revisionNumber == null) || revisionNumber.Equals("") || revisionNumber.Equals("0")) {
- throw new Exception("Could not find revision number in svn output");
- }
- } catch (Exception e) {
- revisionNumber = ReadRevisionFromFile();
- Console.WriteLine("Exception retrieving SVN revision - {0} using revision {1}", e.Message, revisionNumber);
- }
- } catch {
- }
- }
-
- static void SetVersion(string directory, string version)
- {
- StringCollection col = SearchDirectory(directory, "AssemblyInfo.cs");
- string[] dontTouchList = new string[] {
- "samples/HttpCompressionModule/src/AssemblyInfo.cs",
- "samples/DIME/DimeDataSetService/AssemblyInfo.cs",
- "samples/DIME/DimeDataSetServiceConsumer/AssemblyInfo.cs",
- };
- string versionNumber = version + "." + revisionNumber;
- foreach (string fileName in col) {
- bool doSetVersion = true;
- foreach (string dontTouch in dontTouchList) {
- if (fileName.EndsWith(dontTouch.Replace("/", Path.DirectorySeparatorChar.ToString()))) {
- doSetVersion = false;
- break;
- }
- }
- if (doSetVersion) {
- Console.WriteLine("set revision to file : " + fileName + " to " + versionNumber);
- SetVersionInfo(fileName, versionNumber);
- }
- }
- }
-
- public static void ScriptMain(Project project)
- {
- RetrieveRevisionNumber();
- SetVersion(".", project.Properties["version"].ToString());
- }
- ]]>
- </code>
- </script>
- </target>
-
-</project>
+<?xml version="1.0" encoding="utf-8" ?>
+
+<!-- Nant style build file for #ZipLib -->
+
+<!--
+ By default, #ziplib will be built targeting the CLR on which NAnt is
+ running.
+
+ To build #ziplib targeting a specific CLR, pass the identifier of that
+ CLR as the -t(argetframework) option.
+
+ For example:
+ NAnt.exe -t:netcf-1.0, would build #ziplib targeting .NET Compact
+ Framework 1.0.
+
+ A non-exhaustive list of framework identifiers:
+ * net-1.0 .NET Framework 1.0
+ * net-1.1 .NET Framework 1.1
+ * net-2.0 .NET Framework 2.0
+ * netcf-1.0 .NET Compact Framework 1.0
+ * netcf-2.0 .NET Compact Framework 2.0
+ * mono-1.0 Mono 1.0 profile
+ * mono-2.0 Mono 2.0 profile
+ -->
+
+
+<project name="#ZipLib" default="build" basedir="." >
+
+ <!-- Setup Properties -->
+ <property name="debug" value="False"/>
+ <property name="optimize" value="True"/>
+ <property name="checked" value="False" />
+ <property name="version" value="0.85.5"/>
+
+ <property name="build.output.dir" value="bin" overwrite="False" />
+ <property name="sharpziplib.name" value="ICSharpCode.SharpZipLib" />
+ <property name="build.sharpziplib.path" value="${build.output.dir}/${sharpziplib.name}.dll" />
+ <property name="build.defines" value="AUTOBUILD" />
+
+ <target name="rebuild"
+ description="Clean and rebuild"
+ depends="clean, build"
+ />
+
+ <target
+ name="clean"
+ description="Remove build artefacts"
+ >
+ <delete verbose="true" >
+ <fileset basedir=".">
+ <include name="${build.output.dir}/ICSharpCode.SharpZipLib.dll" />
+ <include name="${build.output.dir}/ICSharpCode.SharpZipLib.pdb" />
+ </fileset>
+ </delete>
+ <nant buildfile = "samples/cs/samples.build" target="clean" />
+ <nant buildfile = "samples/vb/samples.build" target="clean" />
+ <nant buildfile = "tests/tests.build" target="clean" />
+ </target>
+
+ <target name="test" depends="build" description="Run unit tests" >
+ <nant buildfile="tests/tests.build" target="test"/>
+ </target>
+
+ <target name="build" description="Build the current source." depends="setup">
+ <call target="build-${framework::get-target-framework()}" />
+ <copy todir="bin" overwrite="True" >
+ <fileset basedir="${build.output.dir}">
+ <include name="${sharpziplib.name}.dll"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="build-netcf-1.0" >
+ <call target="build-net-1.1" />
+ </target>
+
+ <target name="build-netcf-2.0" >
+ <!-- The compiler for Microsoft .NET Compact Framework 2.0 does not support the /keyfile option. -->
+ <call target="build-net-1.1" />
+ </target>
+
+ <target name="build-net-1.1" >
+ <csc
+ target="library"
+ output="${build.sharpziplib.path}"
+ optimize="${optimize}"
+ debug="${debug}"
+ checked="${checked}"
+ define="${build.defines}"
+ doc="${build.output.dir}/ICSharpCode.SharpZipLib.xml"
+ >
+ <sources basedir="src">
+ <include name="**/*.cs"/>
+ </sources>
+ <references>
+ <include name="mscorlib.dll" />
+ <include name="System.dll" />
+ </references>
+ </csc>
+ </target>
+
+
+ <target name="build-net-2.0" >
+ <csc
+ target="library"
+ output="${build.sharpziplib.path}"
+ optimize="${optimize}"
+ debug="${debug}"
+ checked="${checked}"
+ define="${build.defines}"
+ keyfile="ICSharpCode.SharpZipLib.key"
+ doc="${build.output.dir}/ICSharpCode.SharpZipLib.xml"
+ >
+
+ <sources basedir="src">
+ <include name="**/*.cs"/>
+ </sources>
+ <references>
+ <include name="mscorlib.dll" />
+ <include name="System.dll" />
+ </references>
+ </csc>
+ </target>
+
+ <target name="build-mono-1.0" >
+ <fail message="Dont know how to build for Mono 1.0." />
+ </target>
+
+ <target name="build-mono-2.0" >
+ <fail message="Dont know how to build for Mono 2.0." />
+ </target>
+
+ <target name="build-samples" >
+ <nant buildfile = "samples/cs/samples.build" />
+ <nant buildfile = "samples/vb/samples.build" />
+ </target>
+
+ <!-- internal targets -->
+ <target name="show-setup" depends="setup">
+ <echo message="Current setup"/>
+ <echo message="Target framework = '${framework::get-target-framework()}'"/>
+ <echo message="build.defines = '${build.defines}'"/>
+ <echo message="build.output.dir = '${build.output.dir}'"/>
+ </target>
+
+ <target name="setup">
+ <if test="${target::exists('setup-for-' + framework::get-target-framework())}">
+ <call target="setup-for-${framework::get-target-framework()}" />
+ </if>
+ <mkdir dir="bin" />
+ </target>
+
+ <target name="setup-for-net-1.0">
+ <property name="build.defines" value="AUTOBUILD,NET,NET_1_0" />
+ </target>
+
+ <target name="setup-for-net-1.1">
+ <property name="build.defines" value="AUTOBUILD,NET,NET_1_1" />
+ </target>
+
+ <target name="setup-for-net-2.0">
+ <property name="build.defines" value="AUTOBUILD,NET,NET_2_0" />
+ </target>
+
+ <target name="setup-for-netcf-1.0">
+ <property name="build.defines" value="AUTOBUILD,NETCF,NETCF_1_0" />
+ </target>
+
+ <target name="setup-for-netcf-2.0">
+ <property name="build.defines" value="AUTOBUILD,NETCF,NETCF_2_0" />
+ </target>
+
+ <!-- Mono has not actually been used or tested please let us know if you use Mono! -->
+ <target name="setup-for-mono-1.0">
+ <property name="build.defines" value="AUTOBUILD,MONO,MONO_1_0" />
+ </target>
+
+ <target name="setup-for-mono-2.0">
+ <property name="build.defines" value="AUTOBUILD,MONO,MONO_2_0" />
+ </target>
+
+ <!--
+ <target
+ name="release.run" >
+
+ Speculative notes more than real working build. A lot to sort out.
+ Cant do both frameworks AFAIK which is a pain
+
+ <call target="preparerelease" />
+ <delete dir="${release.output.dir}" if="${directory::exists('${release.output.dir}')}" />
+ <mkdir dir="${release.output.dir}" />
+ <call target="clean" />
+ <call target="build.run.desktop" />
+ <zip zipfile="${release.output.dir}/ICSharpCode.SharpZipLib_11.zip" >
+ <fileset basedir="${build.output.dir}">
+ <include name="${build.target.name}" />
+ </fileset>
+ </zip>
+ <call target="clean" />
+
+ <echo message="release building is not working" />
+ </target>
+-->
+
+ <target name="preparerelease" >
+
+ <script language="C#">
+ <code>
+ <![CDATA[
+
+ static StringCollection SearchDirectory(string directory, string filemask)
+ {
+ StringCollection collection = new StringCollection();
+ SearchDirectory(directory, filemask, collection);
+ return collection;
+ }
+
+ static void SearchDirectory(string directory, string filemask, StringCollection collection)
+ {
+ try {
+ string[] file = Directory.GetFiles(directory, filemask);
+ foreach (string f in file) {
+ collection.Add(f);
+ }
+
+ string[] dir = Directory.GetDirectories(directory);
+ foreach (string d in dir) {
+ SearchDirectory(d, filemask, collection);
+ }
+ } catch (Exception) {
+ }
+ }
+
+ static Regex AssemblyVersion = new Regex("AssemblyVersion\\(.*\\)]");
+ static void SetVersionInfo(string fileName, string version)
+ {
+ StreamReader inFile = null;
+ string content;
+
+ try {
+ inFile = new StreamReader(fileName);
+ content = inFile.ReadToEnd();
+ } catch (Exception e) {
+ Console.WriteLine(e);
+ return;
+ } finally {
+ if (inFile != null) {
+ inFile.Close();
+ }
+ }
+
+ if (content != null) {
+ string newContent = AssemblyVersion.Replace(content, "AssemblyVersion(\"" + version + "\")]");
+ StreamWriter outFile = null;
+ try {
+ outFile = new StreamWriter(fileName);
+ outFile.Write(newContent);
+ } catch (Exception e) {
+ Console.WriteLine(e);
+ return;
+ } finally {
+ if (outFile != null) {
+ outFile.Close();
+ }
+ }
+ }
+ }
+
+ static string revisionNumber = "0";
+ static string ReadRevisionFromFile()
+ {
+ try {
+ StreamReader reader = new StreamReader(@"REVISION");
+ using (reader) {
+ return reader.ReadLine();
+ }
+ }
+ catch (Exception e) {
+ Console.WriteLine(e.Message);
+ throw new Exception("Cannot read revision number from file: " + e.Message);
+ }
+ }
+ static void RetrieveRevisionNumber()
+ {
+ try {
+ System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo("svn", "info");
+ psi.UseShellExecute = false;
+ psi.RedirectStandardOutput = true;
+
+ try {
+ System.Diagnostics.Process process = System.Diagnostics.Process.Start(psi);
+ process.WaitForExit();
+ string output = process.StandardOutput.ReadToEnd();
+
+ Regex r = new Regex(@"Revision:\s+(\d+)");
+ Match m = r.Match(output);
+ if (m != null && m.Success && m.Groups[1] != null) {
+ revisionNumber = m.Groups[1].Value;
+ Console.WriteLine("SVN Version '{0}'", revisionNumber);
+ }
+ if ((revisionNumber == null) || revisionNumber.Equals("") || revisionNumber.Equals("0")) {
+ throw new Exception("Could not find revision number in svn output");
+ }
+ } catch (Exception e) {
+ revisionNumber = ReadRevisionFromFile();
+ Console.WriteLine("Exception retrieving SVN revision - {0} using revision {1}", e.Message, revisionNumber);
+ }
+ } catch {
+ }
+ }
+
+ static void SetVersion(string directory, string version)
+ {
+ StringCollection col = SearchDirectory(directory, "AssemblyInfo.cs");
+ string[] dontTouchList = new string[] {
+ "samples/HttpCompressionModule/src/AssemblyInfo.cs",
+ "samples/DIME/DimeDataSetService/AssemblyInfo.cs",
+ "samples/DIME/DimeDataSetServiceConsumer/AssemblyInfo.cs",
+ };
+ string versionNumber = version + "." + revisionNumber;
+ foreach (string fileName in col) {
+ bool doSetVersion = true;
+ foreach (string dontTouch in dontTouchList) {
+ if (fileName.EndsWith(dontTouch.Replace("/", Path.DirectorySeparatorChar.ToString()))) {
+ doSetVersion = false;
+ break;
+ }
+ }
+ if (doSetVersion) {
+ Console.WriteLine("set revision to file : " + fileName + " to " + versionNumber);
+ SetVersionInfo(fileName, versionNumber);
+ }
+ }
+ }
+
+ public static void ScriptMain(Project project)
+ {
+ RetrieveRevisionNumber();
+ SetVersion(".", project.Properties["version"].ToString());
+ }
+ ]]>
+ </code>
+ </script>
+ </target>
+
+</project>

0 comments on commit 3363dc2

Please sign in to comment.
Something went wrong with that request. Please try again.