From edd2edb6e5ec4935531fc1599f96e3293a761c78 Mon Sep 17 00:00:00 2001 From: James Nugent Date: Mon, 12 Aug 2013 20:16:35 +0100 Subject: [PATCH] Move and rename XML documentation Documentation is now generated into /lib rather than /doc Documentation is now named as per the assembly --- README.markdown | 2 ++ build.bat | 5 ++--- build.sh | 46 +++++++++++++++++++--------------------------- 3 files changed, 23 insertions(+), 30 deletions(-) diff --git a/README.markdown b/README.markdown index 3afb5b9..210c121 100644 --- a/README.markdown +++ b/README.markdown @@ -4,6 +4,8 @@ This is a GitHub mirror of the `Novell.Directory.LDAP` library which is primaril This mirror hosts the sources for v2.1.11 for convenience, since it is otherwise necessary to use FTP to obtain the source code. +Minor modifications have been made to the build script to output XML documentation files with more appropriate names. + `Mono.Security.dll` is also included, taken unmodified from the v2.10 Windows binary release of Mono. The sources for this binary are available [here](https://github.com/mono/mono/tree/mono-2-10). It is necessary to include the `Mono.Security.dll` assembly when running on .NET on Windows. diff --git a/build.bat b/build.bat index abe9d8e..cd6a998 100644 --- a/build.bat +++ b/build.bat @@ -1,7 +1,6 @@ @echo off if not exist lib md lib -if not exist doc md doc if exist lib\Novell.Directory.Ldap.dll del lib\Novell.Directory.Ldap.dll @@ -12,7 +11,7 @@ resgen Novell.Directory.Ldap\Novell.Directory.Ldap.UtilClass\ExceptionMessages.t echo "Generating lib\Novell.Directory.Ldap.dll.." -csc /noconfig /w:1 /r:System.dll /target:library /resource:lib\ResultCodeMessages.resources /resource:lib\ExceptionMessages.resources /doc:doc\comments.xml /out:lib\Novell.Directory.Ldap.dll /recurse:Novell.Directory.Ldap\*.cs +csc /noconfig /w:1 /r:System.dll /target:library /resource:lib\ResultCodeMessages.resources /resource:lib\ExceptionMessages.resources /doc:lib\Novell.Directory.Ldap.xml /out:lib\Novell.Directory.Ldap.dll /recurse:Novell.Directory.Ldap\*.cs del lib\ResultCodeMessages.resources -del lib\ExceptionMessages.resources \ No newline at end of file +del lib\ExceptionMessages.resources diff --git a/build.sh b/build.sh index 08c3688..cfeb94d 100644 --- a/build.sh +++ b/build.sh @@ -2,20 +2,13 @@ which mcs > /dev/null 2>&1 if [ $? != 0 ] then - echo "Unable to find C# compiler i.e mcs in the PATH." - exit -1; + echo "Unable to find C# compiler i.e mcs in the PATH." + exit -1; fi if [ -d `pwd`/lib ] then - if [ -d `pwd`/doc ] - then - echo "" - else - mkdir -p `pwd`/doc - fi - - echo -n "Checking for Old dll...." + echo -n "Checking for Old dll...." if [ -f `pwd`/lib/Novell.Directory.Ldap.dll ] then echo "" @@ -27,32 +20,31 @@ then else echo "Creating `pwd`/lib directory " mkdir -p `pwd`/lib - mkdir -p `pwd`/doc fi echo "Building resources..." echo "" - resgen Novell.Directory.Ldap/Novell.Directory.Ldap.Utilclass/ResultCodeMessages.txt lib/ResultCodeMessages.resources - - resgen Novell.Directory.Ldap/Novell.Directory.Ldap.Utilclass/ExceptionMessages.txt lib/ExceptionMessages.resources +resgen Novell.Directory.Ldap/Novell.Directory.Ldap.Utilclass/ResultCodeMessages.txt lib/ResultCodeMessages.resources - echo "Building Novell.Directory.Ldap.dll..." - echo "" -mcs -g /noconfig /target:library /r:mscorlib.dll /r:System.dll -resource:`pwd`/lib/ResultCodeMessages.resources -resource:`pwd`/lib/ExceptionMessages.resources -nowarn:0219,1570,1572,1574,1587 /doc:`pwd`/doc/comments.xml /out:`pwd`/lib/Novell.Directory.Ldap.dll @Novell.Directory.Ldap.dll.sources +resgen Novell.Directory.Ldap/Novell.Directory.Ldap.Utilclass/ExceptionMessages.txt lib/ExceptionMessages.resources + +echo "Building Novell.Directory.Ldap.dll..." +echo "" +mcs -g /noconfig /target:library /r:mscorlib.dll /r:System.dll -resource:`pwd`/lib/ResultCodeMessages.resources -resource:`pwd`/lib/ExceptionMessages.resources -nowarn:0219,1570,1572,1574,1587 /doc:`pwd`/lib/Novell.Directory.Ldap.xml /out:`pwd`/lib/Novell.Directory.Ldap.dll @Novell.Directory.Ldap.dll.sources if [ $? -ne 0 ] then -echo " **************************************************************" -echo " If the error is \"Cannot find assembly mscorlib.dll\"" -echo " It may be possible that you have installed an older version of mono" -echo " In older version of mono mscorlib.dll was named as corlib.dll" -echo " To solve this problem:" -echo " Replace /r:mscorlib.dll in script with /r:corlib.dll and execute" -echo " the build script once again" -echo " **************************************************************" + echo " **************************************************************" + echo " If the error is \"Cannot find assembly mscorlib.dll\"" + echo " It may be possible that you have installed an older version of mono" + echo " In older version of mono mscorlib.dll was named as corlib.dll" + echo " To solve this problem:" + echo " Replace /r:mscorlib.dll in script with /r:corlib.dll and execute" + echo " the build script once again" + echo " **************************************************************" else -echo "" -echo "Novell.Directory.Ldap.dll generated in `pwd`/lib" + echo "" + echo "Novell.Directory.Ldap.dll generated in `pwd`/lib" fi rm `pwd`/lib/ResultCodeMessages.resources