diff --git a/msvc64/ReadMe.txt b/msvc64/ReadMe.txt index dd51d80a..097a6803 100644 --- a/msvc64/ReadMe.txt +++ b/msvc64/ReadMe.txt @@ -10,6 +10,7 @@ However this is sufficiently robust to be in current use by a commercial license Builds with VS2005, 2008 and 2010. Supports zlib-1.2.5 or zlib-1.2.3 setbuild.py "doctors" the project files for DevStudio Express + buildall.bat batch building script runner.py build verification script (and binaries/code for depends{32|64}.exe) 2) TODO (in priority order) @@ -127,7 +128,7 @@ T A B L E o f C O N T E N T S for /r %f in (*.vcproj) do notepad %f for /r %f in (*.sln) do notepad %f - I personally don't recomment notepad for any purpose at all. + I personally don't recommend notepad for any purpose at all. I use TextPad http://www.textpad.com/ Notepad++ is also good. DevStudio Express 2010 (and presumably 2005 and 2008) do not have the "Batch Build" feature. @@ -136,8 +137,7 @@ T A B L E o f C O N T E N T S Build the Configurations you need. Build time is about 2 minutes/Configuration. To remove the "memory" of old configurations: - setbuild.py all && del/s *.orig - (Run this before doing an svn update of the code) + setbuild.py reset 2 Design @@ -213,8 +213,12 @@ T A B L E o f C O N T E N T S 4 Batch builds and tests 4.1 buildall.bat - This is a real "throw away" kind of script. + This was intended to be a "throw away" kind of script and it's grown to be quite useful. You will have to run vcvars32.bat for the compiler you intend to use to ensure devenv is on your path. + + It doesn't know anything about building only x64 or only Win32. Change the script if you want something special. + + I'll probably combine buildall.bat and setbuild.py into a single script one day. 4.2 runner.py runner.py [Win32|x64|all] diff --git a/msvc64/buildall.bat b/msvc64/buildall.bat index 19fc334c..d78ac45f 100644 --- a/msvc64/buildall.bat +++ b/msvc64/buildall.bat @@ -1,13 +1,36 @@ @echo off rem ## -rem buildall [/rebuild] +rem buildall - wee script for building from the command line -setlocal +setlocal ENABLEEXTENSIONS +set "SYNTAX=buildall [ /build ^| /rebuild ^| /clean ^| /upgrade ]" + +rem ## +rem test arguments set "ACTION=%1%" -if NOT DEFINED ACTION set "ACTION=/build" +if NOT DEFINED ACTION ( + echo %SYNTAX% + goto jail +) + +rem ## +rem execute /upgrade +if %ACTION%==/upgrade ( + devenv /upgrade exiv2.sln + goto jail +) -devenv exiv2.sln %ACTION% "Debug|Win32" +rem ## +rem cleanup the bin if necessary +set DELBIN=0 +if %ACTION%==/rebuild set DELBIN=1 +if %ACTION%==/clean set DELBIN=1 +if %DELBIN%==1 if EXIST bin rmdir/s/q bin + +rem ## +rem the main build activity +devenv exiv2.sln %ACTION% "Debug|Win32" devenv exiv2.sln %ACTION% "DebugDLL|Win32" devenv exiv2.sln %ACTION% "Release|Win32" devenv exiv2.sln %ACTION% "ReleaseDLL|Win32" @@ -16,6 +39,9 @@ devenv exiv2.sln %ACTION% "DebugDLL|x64" devenv exiv2.sln %ACTION% "Release|x64" devenv exiv2.sln %ACTION% "ReleaseDLL|x64" +rem ## +rem cleanup and leave +:jail endlocal rem That's all Folks! diff --git a/msvc64/setbuild.py b/msvc64/setbuild.py index 3459c5df..dae2ebd7 100644 --- a/msvc64/setbuild.py +++ b/msvc64/setbuild.py @@ -1,36 +1,14 @@ #!/usr/bin/env python # -*- coding: Latin-1 -*- +""" setbuild - set the build environment you require """ + ## def syntax(): "syntax - print syntax of setbuild.py " - print "syntax: python setbuild.py Win32|x64|all" + print "syntax: python setbuild.py Win32|x64|all|reset" ## -r"""setbuild - set the build environment you require - --------------------- -Revision information: -Rev: $Id$: -Header: $Header$: -Date: $Date$: -DateTime: $DateTime$: -Change: $Change$: -File: $File$: -Revision: $Revision$: -Author: $Author$: --------------------- -""" - -__author__ = "Robin Mills " -__date__ = "$Date$:" -__version__ = "$Id$:" -__credits__ = """Everybody who contributed to Python. -Especially: Guido van Rossum for creating the language. -And: Mark Lutz (and David Ascher) for the O'Reilly Books which explain it. -""" - - ## # import modules import os.path @@ -174,10 +152,14 @@ if __name__ == '__main__': removes = { 'x64' : 'Win32' , 'win32' : 'x64' , 'all' : None + , 'reset' : None } syntaxError = not removes.has_key(option) if not syntaxError: setbuild(removes[option]) + + if option=='reset': + os.system('del/s *.orig') if syntaxError: syntax()