msvc64: enhancements to buildall.bat script

v0.27.3
Robin Mills 15 years ago
parent b091dceb59
commit 12e1ca95b3

@ -10,6 +10,7 @@ However this is sufficiently robust to be in current use by a commercial license
Builds with VS2005, 2008 and 2010. Builds with VS2005, 2008 and 2010.
Supports zlib-1.2.5 or zlib-1.2.3 Supports zlib-1.2.5 or zlib-1.2.3
setbuild.py "doctors" the project files for DevStudio Express 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) runner.py build verification script (and binaries/code for depends{32|64}.exe)
2) TODO (in priority order) 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 (*.vcproj) do notepad %f
for /r %f in (*.sln) 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. 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. 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. Build the Configurations you need. Build time is about 2 minutes/Configuration.
To remove the "memory" of old configurations: To remove the "memory" of old configurations:
setbuild.py all && del/s *.orig setbuild.py reset
(Run this before doing an svn update of the code)
2 Design 2 Design
@ -213,9 +213,13 @@ T A B L E o f C O N T E N T S
4 Batch builds and tests 4 Batch builds and tests
4.1 buildall.bat 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. 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 4.2 runner.py
runner.py [Win32|x64|all] runner.py [Win32|x64|all]

@ -1,12 +1,35 @@
@echo off @echo off
rem ## 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%" 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
)
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% "Debug|Win32"
devenv exiv2.sln %ACTION% "DebugDLL|Win32" devenv exiv2.sln %ACTION% "DebugDLL|Win32"
devenv exiv2.sln %ACTION% "Release|Win32" devenv exiv2.sln %ACTION% "Release|Win32"
@ -16,6 +39,9 @@ devenv exiv2.sln %ACTION% "DebugDLL|x64"
devenv exiv2.sln %ACTION% "Release|x64" devenv exiv2.sln %ACTION% "Release|x64"
devenv exiv2.sln %ACTION% "ReleaseDLL|x64" devenv exiv2.sln %ACTION% "ReleaseDLL|x64"
rem ##
rem cleanup and leave
:jail
endlocal endlocal
rem That's all Folks! rem That's all Folks!

@ -1,35 +1,13 @@
#!/usr/bin/env python #!/usr/bin/env python
# -*- coding: Latin-1 -*- # -*- coding: Latin-1 -*-
""" setbuild - set the build environment you require """
## ##
def syntax(): def syntax():
"syntax - print syntax of setbuild.py " "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 <robin@clanmills.com>"
__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 modules
@ -174,11 +152,15 @@ if __name__ == '__main__':
removes = { 'x64' : 'Win32' removes = { 'x64' : 'Win32'
, 'win32' : 'x64' , 'win32' : 'x64'
, 'all' : None , 'all' : None
, 'reset' : None
} }
syntaxError = not removes.has_key(option) syntaxError = not removes.has_key(option)
if not syntaxError: if not syntaxError:
setbuild(removes[option]) setbuild(removes[option])
if option=='reset':
os.system('del/s *.orig')
if syntaxError: if syntaxError:
syntax() syntax()

Loading…
Cancel
Save