-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Original subversion repository no longer available.
- Loading branch information
0 parents
commit 3a60811
Showing
22 changed files
with
2,764 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
Zip License | ||
----------- | ||
|
||
Copyright (C) 2001 Gerry Shaw | ||
|
||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
arising from the use of this software. | ||
|
||
Permission is granted to anyone to use this software for any purpose, | ||
including commercial applications, and to alter it and redistribute it | ||
freely, subject to the following restrictions: | ||
|
||
1. The origin of this software must not be misrepresented; you must not | ||
claim that you wrote the original software. If you use this software | ||
in a product, an acknowledgment in the product documentation would be | ||
appreciated but is not required. | ||
2. Altered source versions must be plainly marked as such, and must not be | ||
misrepresented as being the original software. | ||
3. This notice may not be removed or altered from any source distribution. | ||
|
||
Gerry Shaw ([email protected]) | ||
|
||
|
||
zlib License | ||
------------ | ||
|
||
Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler | ||
|
||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
arising from the use of this software. | ||
|
||
Permission is granted to anyone to use this software for any purpose, | ||
including commercial applications, and to alter it and redistribute it | ||
freely, subject to the following restrictions: | ||
|
||
1. The origin of this software must not be misrepresented; you must not | ||
claim that you wrote the original software. If you use this software | ||
in a product, an acknowledgment in the product documentation would be | ||
appreciated but is not required. | ||
2. Altered source versions must be plainly marked as such, and must not be | ||
misrepresented as being the original software. | ||
3. This notice may not be removed or altered from any source distribution. | ||
|
||
Jean-loup Gailly Mark Adler | ||
[email protected] [email protected] | ||
|
||
http://www.gzip.org/zlib/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Zip | ||
|
||
Zip is a free .NET Zip library based on the java.util.zip package. It uses the | ||
freely available zlib library for the compression engine and a contribution | ||
to the zlib library for zip file manipulation. | ||
|
||
Note: This is a very old library and I no longer support it. I'm putting it | ||
up on GitHub for historical and keep safe reasons more than anything. That said | ||
it has been used in may products and continues to be of some value. | ||
|
||
## Authors | ||
|
||
* Gerry Shaw | ||
|
||
### Special Thanks | ||
|
||
* The [zlib](http://www.gzip.org/zlib) developers | ||
* Philip Craig for [NUnit](http://nunit.sourceforge.net) | ||
|
||
## License | ||
|
||
BSD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,183 @@ | ||
<?xml version="1.0" encoding="iso-8859-1"?> | ||
|
||
<project name="Zip" default="build" basedir="."> | ||
<tstamp/> | ||
<property name="debug" value="true"/> | ||
<property name="project.name" value="zip"/> | ||
<property name="project.FormalName" value="Zip"/> | ||
|
||
<property name="bin.dir" value="bin"/> | ||
<property name="src.dir" value="src"/> | ||
<property name="doc.dir" value="doc"/> | ||
<property name="examples.dir" value="examples"/> | ||
<property name="build.dir" value="build"/> | ||
<property name="dist.dir" value="${project.name}"/> | ||
|
||
<!-- Use script task to get this from AssemblyInfo.cs using a regular expression --> | ||
<property name="project.version" value="0.0.1"/> | ||
<script language="C#"> | ||
<code><![CDATA[ | ||
public static void ScriptMain(Project project) { | ||
string sourcePath = Path.Combine(project.BaseDirectory, Path.Combine(project.Properties["src.dir"], project.Properties["project.FormalName"])); | ||
string assemblyInfoFileName = Path.Combine(sourcePath, "AssemblyInfo.cs"); | ||
StreamReader reader = File.OpenText(assemblyInfoFileName); | ||
Regex commentRE = new Regex("^(\\s)*//"); | ||
Regex versionRE = new Regex("(?<=AssemblyVersion(\\s)*\\(\")\\d+\\.\\d+\\.\\d+"); | ||
string line = reader.ReadLine(); | ||
try { | ||
while (line != null) { | ||
// make sure the line has not been commented out | ||
if (!commentRE.Match(line).Success) { | ||
// find version string | ||
Match versionMatch = versionRE.Match(line); | ||
if (versionMatch.Success) { | ||
project.Properties["project.version"] = versionMatch.Value; | ||
break; | ||
} | ||
} | ||
line = reader.ReadLine(); | ||
} | ||
} finally { | ||
// must remember to close the file or the compile may not work | ||
reader.Close(); | ||
} | ||
} | ||
]]></code> | ||
</script> | ||
|
||
<property name="dist.name" value="${project.name}-src-${project.version}.zip"/> | ||
<property name="backup.name" value="..\${project.name}-backup-${nant.dstamp}-${nant.tstamp}.zip" /> | ||
|
||
<echo message="Building ${project.name}-${project.version}"/> | ||
|
||
<target name="debug" depends="clean"> | ||
<property name="debug" value="true"/> | ||
</target> | ||
|
||
<target name="release" depends="clean"> | ||
<property name="debug" value="false"/> | ||
</target> | ||
|
||
<target name="clean"> | ||
<delete dir="${build.dir}" verbose="true" failonerror="false"/> | ||
<delete dir="${dist.dir}" verbose="true" failonerror="false"/> | ||
<delete file="${dist.name}" verbose="true" failonerror="false"/> | ||
<delete file="${doc.dir}\${project.FormalName}.chm" verbose="true" failonerror="false"/> | ||
</target> | ||
|
||
<target name="build"> | ||
<mkdir dir="${build.dir}"/> | ||
<!-- copy the assemblies required to build project to the build folder --> | ||
<copy todir="${build.dir}"> | ||
<fileset basedir="bin"> | ||
<includes name="zlib.dll"/> | ||
<includes name="NUnitCore.dll"/> | ||
</fileset> | ||
</copy> | ||
|
||
<!-- compile main project --> | ||
<csc target="library" output="${build.dir}\${project.FormalName}.dll" debug="${debug}" doc="${build.dir}\${project.FormalName}.xml"> | ||
<sources basedir="${src.dir}\${project.FormalName}"> | ||
<includes name="**/*.cs"/> | ||
</sources> | ||
<arg value="/unsafe"/> | ||
</csc> | ||
|
||
<!-- compile unit tests --> | ||
<csc target="library" output="${build.dir}\${project.FormalName}.Tests.dll" debug="${debug}"> | ||
<sources basedir="${src.dir}\${project.FormalName}.Tests"> | ||
<includes name="*.cs"/> | ||
</sources> | ||
<references> | ||
<includes name="${build.dir}/NUnitCore.dll"/> | ||
<includes name="${build.dir}/${project.FormalName}.dll"/> | ||
</references> | ||
</csc> | ||
|
||
<call target="test"/> | ||
</target> | ||
|
||
<target name="test"> | ||
<!-- | ||
Perform unit tests. If a unit test fails, the build fails. | ||
The base directory is set to the Test directory so that tests can easily | ||
load external data files wihtout having to worry about complicated paths. | ||
--> | ||
|
||
<!-- copy the test data required to test the project to the build folder --> | ||
<copy todir="${build.dir}"> | ||
<fileset basedir="${src.dir}\${project.FormalName}.Tests"> | ||
<includes name="data\*"/> | ||
</fileset> | ||
</copy> | ||
|
||
<!-- perform unit test --> | ||
<nunit basedir="build" verbose="false"> | ||
<test class="OrganicBit.Zip.Tests.AllTests" assembly="build\Zip.Tests.dll" /> | ||
</nunit> | ||
|
||
</target> | ||
|
||
<target name="minizip" depends="build"> | ||
|
||
<csc target="exe" output="${build.dir}\MiniZip.exe" debug="${debug}"> | ||
<sources basedir="examples\MiniZip"> | ||
<includes name="*.cs"/> | ||
</sources> | ||
<references> | ||
<includes name="${build.dir}/${project.FormalName}.dll"/> | ||
</references> | ||
</csc> | ||
<exec basedir="${build.dir}" program="build/MiniZip.exe" commandline="-v data/test.zip" /> | ||
<exec basedir="${build.dir}/data" program="build/MiniZip.exe" commandline="-e test.zip" /> | ||
<exec basedir="${build.dir}" program="build/MiniZip.exe" commandline="-a foobar.zip *.dll *.exe" /> | ||
</target> | ||
|
||
<target name="doc" depends="build"> | ||
<docnet outputDir="${build.dir}\docs" helpName="${project.FormalName}" showMissing="false" showPrivate="false"> | ||
<assemblies basedir="${build.dir}"> | ||
<includes name="${project.FormalName}.dll"/> | ||
</assemblies> | ||
</docnet> | ||
<copy file="${build.dir}/docs/${project.FormalName}.chm" todir="${build.dir}"/> | ||
</target> | ||
|
||
<target name="backup" depends="clean"> | ||
<exec program="bin/zip.exe" commandline="-r -q ${backup.name} *"/> | ||
</target> | ||
|
||
<target name="dist"> | ||
<!-- build a clean release distribution for release --> | ||
<property name="debug" value="false"/> | ||
<echo message="Debug = ${debug}"/> | ||
<call target="build"/> | ||
|
||
<!-- build developer documentation --> | ||
<call target="doc"/> | ||
|
||
<!-- copy files to make distribution --> | ||
<copy todir="${dist.dir}\bin"> | ||
<fileset basedir="${build.dir}"> | ||
<includes name="*"/> | ||
<excludes name="NUnitCore.dll"/> | ||
</fileset> | ||
</copy> | ||
<copy todir="${dist.dir}"> | ||
<fileset> | ||
<includes name="${doc.dir}/**"/> | ||
<includes name="${src.dir}/**"/> | ||
<includes name="${examples.dir}/**"/> | ||
<includes name="${project.FormalName}.build"/> | ||
<includes name="${project.FormalName}.key"/> | ||
<includes name="README.txt"/> | ||
<includes name="COPYING.txt"/> | ||
</fileset> | ||
</copy> | ||
|
||
<!-- create package --> | ||
<delete file="${dist.name}" failonerror="false"/> | ||
<exec program="bin/zip.exe" commandline="-r -q ${dist.name} ${dist.dir}/*"/> | ||
</target> | ||
</project> |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.