<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">\r
-<!-- saved from url=(0066)https://confab.mit.edu/confluence/display/ISDA/lore-bkw-automation -->\r
-<HTML>\r
- <HEAD>\r
- <TITLE>lore-bkw-automation - Confluence</TITLE>\r
- <META http-equiv="Content-Type" content="text/html; charset=utf-8">\r
- <META http-equiv="Pragma" content="no-cache">\r
- <META http-equiv="Expires" content="-1">\r
- <LINK href="css/main-action.css" type="text/css" rel="stylesheet">\r
- <LINK href="css\main-action(1).css" type="text/css" rel="stylesheet">\r
- <META content="MSHTML 6.00.2900.3059" name="GENERATOR"></HEAD>\r
- <BODY>\r
- <DIV style="MARGIN-LEFT: 10px; MARGIN-RIGHT: 10px" align="left">\r
- <DIV class="wiki-content" style="MARGIN-TOP: 5px; MARGIN-BOTTOM: 5px" align="left">The \r
- Kerberos For Windows build is being automated. This description consists of\r
- </DIV>\r
- <UL>\r
- <LI>\r
- <A href="#lore-bkw-automation-Buildsteps">Build steps</A>\r
- <LI>\r
- <A href="#Script-structure">Script structure</A>\r
- <LI>\r
- <A href="#Configfile">Config file</A>\r
- <LI>\r
- <A href="#Remainingwork">Remaining work / bug list</A>\r
- <LI>\r
- <A href="#Troubleshooting">Troubleshooting</A></LI>\r
- </UL>\r
- <H2><A name="lore-bkw-automation-Buildsteps"></A>Build steps</H2>\r
- <P>Building the complete KfW product consists of these steps:</P>\r
- <UL>\r
- <LI>\r
- Setting up the environment\r
- <LI>\r
- Fetching sources from repositories\r
- <LI>\r
- Building the sources with nmake\r
- <LI>\r
- Setting up the packaging environment\r
- <LI>\r
- Building the two installers -- a msi installer and an exe installer\r
- <LI>\r
- Building other distribution components\r
- <UL>\r
- <LI>\r
- KfW source distribution\r
- <LI>\r
- KfW core binaries\r
- <LI>\r
- KfW SDK\r
- <LI>\r
- Microsoft redistributable components\r
- <LI>\r
- Individual files: release notes, Leash user guide, MSI Deployment Guide.\r
- </LI>\r
- </UL>\r
- </LI>\r
- </UL>\r
- <H2><A name="Script-structure"></A>Script structure</H2>\r
- <P>The build is a perl script controlled by command line switches and an XML \r
- configuration file. The config file is required. Settings in the config file \r
- can be overridden by optional command line switches.</P>\r
- <P>The main steps in the script are</P>\r
- <UL>\r
- <LI>\r
- Setting up the environment\r
- <LI>\r
- Fetching the sources from repositories\r
- <LI>\r
- Building the sources\r
- <LI>\r
- Setting up the packaging environment\r
- <LI>\r
- Building the msi with the package nmake\r
- <LI>\r
- Building the rest of the components\r
- </LI>\r
- </UL>\r
- <P>The usage message shows the available switches:</P>\r
- <P><TT>C:\Projects\KfW>perl bkw.pl /?</TT><BR>\r
- <TT>Usage: bkw.pl (-f --config) config-file [options] NMAKE-options</TT></P>\r
- <P><TT>Options are case insensitive.</TT></P>\r
- <P><TT>Options:</TT><BR>\r
- <TT>/help /? usage information (what you now see)</TT><BR>\r
- <TT>/srcdir dir Source directory to use. Should contain</TT><BR>\r
- <TT> \r
- pismere/athena. If cvstag or svntag is null,</TT><BR>\r
- <TT> \r
- the directory should be prepopulated.</TT><BR>\r
- <TT>/cvstag tag \ For whichever of these tags is specified,</TT><BR>\r
- <TT>/svntag url / a checkout will be done into srcdir</TT><BR>\r
- <TT>/debug Do debug make instead of \r
- release make</TT><BR>\r
- <TT>/outdir dir Directory to be created where build results will go</TT><BR>\r
- <TT>/nomake Skip make step</TT><BR>\r
- <TT>/nopackage Skip packaging step</TT><BR>\r
- <TT>/clean Build clean target</TT><BR>\r
- <TT>/verbose Debug mode - verbose output</TT><BR>\r
- <TT>/vverbose very verbose output</TT><BR>\r
- <TT>/config path Path to config file</TT><BR>\r
- <TT>/logfile path Where to write output. If omitted, ...</TT><BR>\r
- <TT>/srcdir dir Source directory to use. Should contain\r
- <BR>\r
- </TT><TT>pismere/athena. \r
- If cvstag or svntag is null,\r
- <BR>\r
- \r
- the directory should be prepopulated.\r
- <BR>\r
- </TT><TT>/outdir dir Directory to be created where build results will \r
- go\r
- <BR>\r
- /repository checkout | co \ What repository action to take.\r
- <BR>\r
- </TT><TT>update \r
- | up | Options are to checkout, update or<BR>\r
- skip \r
- / take no action [skip].\r
- <BR>\r
- /cvstag tag \ For whichever of these tags is specified,\r
- <BR>\r
- </TT><TT>/svntag url / the repository action will be done into srcdir\r
- <BR>\r
- /debug Do debug make instead of \r
- release make\r
- <BR>\r
- /nomake Skip make step\r
- <BR>\r
- /nopackage Skip packaging step\r
- <BR>\r
- /clean Build clean target\r
- <BR>\r
- /verbose Debug mode - verbose output\r
- <BR>\r
- /config path Path to config file\r
- <BR>\r
- /logfile path Where to write output. If omitted, ...<BR>\r
- </TT><TT>Other:</TT><BR>\r
- <TT>NMAKE-options any options you want to pass to NMAKE, which can be:</TT><BR>\r
- <TT>(note: /nologo is always used)</TT><BR>\r
- <TT>[ nmake options follow ]</TT></P>\r
- <P>Additional controls, not available from the command line:</P>\r
- <P><TT><CVSROOT name=":kserver:cvs.mit.edu:/cvs/pismere" /></TT><BR>\r
- <TT><SVNURL name="" /></TT><BR>\r
- <TT><CopyList><Config><DebugArea value="dbg" /></TT><BR>\r
- <TT> \r
- <ReleaseArea value="rel" /></TT><BR>\r
- <TT> <AlwaysTag \r
- value="%bldtype%" /></TT><BR>\r
- <TT> \r
- <DebugTag value="%debug%" /></TT><BR>\r
- <TT> \r
- <ReleaseTag value="%release%" /></TT><BR>\r
- <TT> \r
- <Files><Include path="copyfiles.xml" /></TT></P>\r
- <P><TT><FONT face="Verdana">The pre-package steps gathers up build results and puts them in \r
- a <FONT face="Courier">target</FONT> area. "target" is hardwired in the \r
- build script.</FONT></TT></P>\r
- <P><TT><FONT face="Verdana">The post-package step zips up various files and then copies the \r
- zips and other files to<FONT face="Courier"><EM>srcdir</EM></FONT>/<FONT face="Courier">public</FONT>. \r
- "public" is hardwired in the build script.</FONT></TT></P>\r
- <H2><A name="#Configfile"></A>Config file</H2>\r
- <H3>\r
- CopyLists</H3>\r
- <P>\r
- CopyLists are used in many places. There is an optional \r
- Configuration section and a required Files section. </P>\r
- <P>The configuration section defines the roots of the from and to paths and can \r
- optionally define path substitutions. \r
- </P>\r
- <P>Internally, the to and from paths are required. They are forced by the \r
- script rather than being set in the config file. Comments in the copyfile \r
- xml indicate this.</P>\r
- <P>The overall build configuration specifies a debug or release build. The \r
- debug and release results are put in different places. File entries can \r
- indicate a variable part of a path with a tag such as %bldtype%. The \r
- script will substitute %bldtype% with either dbg or rel, depending on the build \r
- type. The substitution tags are specified with these declarations:</P>\r
- <P>\r
- <TABLE id="Table1" height="0" cellSpacing="1" cellPadding="1" border="1">\r
- <TR>\r
- <TD>DebugArea</TD>\r
- <TD height="21">Path value used in debug build. Must match what the build \r
- script uses. Typically "dbg."</TD>\r
- </TR>\r
- <TR>\r
- <TD>ReleaseArea</TD>\r
- <TD height="9">Path value used in release build. Must match the build \r
- script. Typically "rel."</TD>\r
- </TR>\r
- <TR>\r
- <TD>AlwaysTag</TD>\r
- <TD height="17">String in file entries which will always be changed to either \r
- DebugArea or ReleaseArea. File is always copied. Typically "%bldtype%."</TD>\r
- </TR>\r
- <TR>\r
- <TD>DebugTag</TD>\r
- <TD>String in file entries which will only be changed to DebugArea during a debug \r
- build. File is only copied in a debug build. Typically "%debug%."</TD>\r
- </TR>\r
- <TR>\r
- <TD>ReleaseTag</TD>\r
- <TD>String in file entries which will only be changed to ReleaseArea during a \r
- release build. File is only copied in a release build. Typically \r
- "%release%."</TD>\r
- </TR>\r
- <TR>\r
- <TD>FileStem</TD>\r
- <TD>%filestem% will always be changed to FileStem. Example: \r
- "kfw-3-2-0." This is used in when building or copying the final build \r
- results.</TD>\r
- </TR>\r
- </TABLE>\r
- </P>\r
- <P><STRONG>Example</STRONG></P>\r
- <P>Each segment of the file's path that comes from a different place is in a \r
- different color.</P>\r
- <P>\r
- Release build. Config file:\r
- </P>\r
- <P>\r
- <TABLE id="Table2" cellSpacing="1" cellPadding="1" border="0">\r
- <TR>\r
- <TD colspan="4"><FONT face="courier"><BKW_Config></FONT></TD>\r
- </TR>\r
- <TR>\r
- <TD width="23"></TD>\r
- <TD colspan="3"><FONT face="courier"><CommandLine></FONT></TD>\r
- </TR>\r
- <TR>\r
- <TD width="23"></TD>\r
- <TD width="20"></TD>\r
- <TD colspan="2"><FONT face="courier"><Directories></FONT></TD>\r
- </TR>\r
- <TR>\r
- <TD width="23"></TD>\r
- <TD width="20"></TD>\r
- <TD width="22"></TD>\r
- <TD><FONT face="courier"><src path ="<FONT color="#000099">C:\projects\Autobuild"</FONT>\r
- /></FONT>\r
- </TD>\r
- </TR>\r
- </TABLE>\r
- </P>\r
- <P>Copylist comments:</P>\r
- <P class="code">\r
- <!-- File from paths are relative to\r
- <src>\<FONT color="#ff00cc">pismere\athena</FONT> --> \r
-<BR> \r
- <!-- File to paths are relative to <src>\<FONT color="#00ff00">pismere\staging</FONT>\r
- -->\r
- </P>\r
- <P>When the script processes this copylist, it will force the from and to paths as \r
- indicated.</P>\r
- <P>This line\r
- </P>\r
- <P class="code"><File name="<FONT color="#00ffff">comerr32.dll</FONT>" from="<FONT color="#ff9933">..\target\bin\i386</FONT>\<FONT color="#ff0000">%bldtype%</FONT>\" \r
- to="\<FONT color="#9966ff">bin\i386</FONT>" /></P>\r
- <P>will result in <FONT face="Courier"><FONT color="#000099">C:\projects\Autobuild</FONT>\<FONT color="#ff00cc">pismere\athena</FONT>\<FONT color="#ff9933">..\target\bin\i386</FONT>\<FONT color="#ff0000">rel</FONT>\<FONT color="#00ffff">comerr32.dll</FONT></FONT></P>\r
- <P>being copied to <FONT face="Courier"><FONT color="#000099">C:\projects\Autobuild</FONT>\<FONT color="#00ff00">pismere\staging</FONT>\<FONT color="#9966ff">bin\i386</FONT>\<FONT color="#00ffff">comerr32.dll</FONT></FONT>.</P>\r
- <TT>\r
- <P>\r
- Other possible attributes in a copylist entry:</P>\r
- <UL>\r
- <LI>\r
- <TT>notrequired</TT>\r
- <LI>\r
- <TT>newname="filename"</TT>\r
- </LI>\r
- </UL>\r
- <P>By default, copylist entries are required and the script will die if they aren't \r
- present. To ignore missing files, add <TT>notrequired</TT>.</P>\r
- <P>To rename the file, set the <TT>newname</TT> attribute.</P>\r
- <P>Lengthy copy lists can be kept in separate files and included with the Include \r
- directive. Example:</P>\r
- <P class="code"><Include path="sdkfiles.xml" /></P>\r
- <H2><FONT face="Verdana"><A name="Remainingwork"></A>Remaining work / bug list</FONT></H2>\r
- <P>This is a work in progress. What's left:</P>\r
- <P>Bugs:</P>\r
- <UL>\r
- <LI>\r
- <FONT face="Verdana">Eliminate need for redundant <TT>/debug debug</TT>. </FONT>\r
- <LI>\r
- <FONT face="Verdana">Handle checkout into non-existant directory.</FONT>\r
- </LI>\r
- </UL>\r
- <H2><FONT face="Verdana"><A name="Troubleshooting"></A>Troubleshooting</FONT>\r
- </TT></H2>\r
- <P><TT><FONT face="Verdana"><STRONG>svn can't create tunnel:<BR>\r
- </STRONG>Make sure environment variable SVN_SSH points to a valid \r
- plink.exe. Path separators must be backslashes and must be doubled.</FONT></TT><TT></P>\r
- </TT>\r
- </DIV>\r
- </BODY>\r
+<!-- saved from url=(0066)https://confab.mit.edu/confluence/display/ISDA/lore-bkw-automation --><HTML><HEAD>\r
+ <TITLE>lore-bkw-automation - Confluence</TITLE>\r
+ <META http-equiv="Content-Type" content="text/html; charset=utf-8">\r
+ <META http-equiv="Pragma" content="no-cache">\r
+ <META http-equiv="Expires" content="-1">\r
+ <LINK href="css/main-action.css" type="text/css" rel="stylesheet">\r
+ <LINK href="css\main-action(1).css" type="text/css" rel="stylesheet">\r
+ <META content="MSHTML 6.00.2900.3059" name="GENERATOR"></HEAD>\r
+ <BODY>\r
+ <DIV style="MARGIN-LEFT: 10px; MARGIN-RIGHT: 10px" align="left">\r
+ <DIV class="wiki-content" style="MARGIN-TOP: 5px; MARGIN-BOTTOM: 5px" align="left">The \r
+ Kerberos for Windows (KfW) build is automated. A script will fetch the \r
+ sources from a repository and then build, sign and package all the KfW \r
+ distribution components.\r
+ </DIV>\r
+ <DIV class="wiki-content" style="MARGIN-TOP: 5px; MARGIN-BOTTOM: 5px" align="left">This \r
+ description consists of\r
+ </DIV>\r
+ <UL>\r
+ <LI>\r
+ <A href="#Environment">Setting up the build environment</A>\r
+ <LI>\r
+ <A href="#Running">Running the script</A>\r
+ <LI>\r
+ <A href="Details">Script internal details</A>\r
+ <LI>\r
+ <A href="#Remainingwork">Remaining work / bug list</A>\r
+ <LI>\r
+ <A href="#Troubleshooting">Troubleshooting</A>\r
+ </LI>\r
+ </UL>\r
+ <H2>Setting Up the Build Environment</H2>\r
+ <P>KfW is built on a Windows PC, in the default Windows shell (cmd.exe). These \r
+ components must be installed:</P>\r
+ <UL>\r
+ <LI>\r
+ Visual Studio 2003<BR>\r
+ Versions of Visual Studio before or after 2003 are not supported.\r
+ <LI>\r
+ A recent release of the\r
+ <SPAN class="nobr">\r
+ <A href="http://www.microsoft.com/downloads/details.aspx?FamilyId=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB&displaylang=en">\r
+ Microsoft Platform SDK</A></SPAN>\r
+ \r
+ <LI>\r
+ <SPAN class="nobr">\r
+ <A title="Visit page outside Confluence" href="http://www.activestate.com" rel="nofollow">\r
+ ActiveState Perl 5.8 or more recent</A></SPAN><BR>\r
+ Build 631 is known to work.\r
+ <LI>\r
+ <SPAN class="nobr">\r
+ <A title="Visit page outside Confluence" href="http://www.doxygen.org/" rel="nofollow">\r
+ Doxygen</A></SPAN>\r
+ <LI>\r
+ sed, awk, cat, rm and find<BR>\r
+ These can be obtained from the\r
+ <SPAN class="nobr">\r
+ <A title="Visit page outside Confluence" href="http://cygwin.com/" rel="nofollow">Cygwin \r
+ distribution</A></SPAN>.\r
+ <BR clear="all">\r
+ <BR clear="all">\r
+ find must be in C:\tools\cygwin\bin, so install Cygwin in C:\tools\cygwin.\r
+ <BR>\r
+ <BR>\r
+ The cygwin awk is a link and the MS shell doesn't deal well with that. <TT>C</TT>\r
+ opy <TT>c:\tools\cygwin\bin\gawk</TT> to <TT>c:\tools\cygwin\bin\awk</TT>.\r
+ <LI>\r
+ <SPAN class="nobr">\r
+ <A title="Visit page outside Confluence" href="http://sourceforge.net/project/showfiles.php?group_id=105970"\r
+ rel="nofollow">Wix</A></SPAN>\r
+ <LI>\r
+ <SPAN class="nobr">\r
+ <A title="Visit page outside Confluence" href="http://nsis.sourceforge.net" rel="nofollow">\r
+ NSIS</A></SPAN></LI></UL>\r
+ <H3>Environment variables</H3>\r
+ <P>\r
+ All the components above must be in PATH. Installing ActivePerl puts perl in \r
+ the PATH. Doxygen, Cygwin, hhc, wix and nsis need to be added.</P>\r
+ <P>perl must be installed so that .pl files are automatically executed with perl. \r
+ The ActivePerl installation will do this for you.</P>\r
+ <P>In the INCLUDE path, the Microsoft Platform SDK must come before the Microsoft \r
+ Visual C++ include files. Using a Platform SDK Build Environment window will \r
+ set this up the right way. </P>\r
+ <P>If you make your path modifications permanent via Control Panel / System / \r
+ Advanced / Environment Variables: If you use a Platform SDK Build \r
+ Environment window, it appears that you need to put your PATH components in the \r
+ System PATH, not the User PATH.</P>\r
+ <P>Visual Studio installs hhc in C:\Program Files\HTML Help Workshop.</P>\r
+ <P>nmake must be in PATH. If you use a Platform SDK build environment window, it is \r
+ already done for you.</P>\r
+ <h2>Running the Script<A name="Running"></A></h2>\r
+ <P>\r
+ The build is a perl script controlled by command line switches and an XML \r
+ configuration file. The config file is required. Settings in the config file \r
+ can be overridden by optional command line switches. </P>\r
+ <P>There are options for controlling most steps of the build process. The \r
+ steps are</P>\r
+ <UL>\r
+ <LI>\r
+ Verifying the environment\r
+ <LI>\r
+ Fetching the sources from repositories\r
+ <LI>\r
+ Building the sources\r
+ <LI>\r
+ Setting up the packaging environment\r
+ <LI>\r
+ Building the installers\r
+ <LI>\r
+ Building the rest of the components\r
+ </LI>\r
+ </UL>\r
+ <P>The usage message shows the switches that control these steps:</P>\r
+ <P><TT>C:\Projects\KfW>perl bkw.pl /?</TT><BR>\r
+ <TT>Usage: bkw.pl [options] NMAKE-options</TT></P>\r
+ <P><TT> Options are case insensitive. </TT>\r
+ </P>\r
+ <P><TT> Options: \r
+ <BR>\r
+ </TT><TT> /help /? \r
+ usage information (what you now see).\r
+ <BR>\r
+ /config /f path Path to config file. Default is \r
+ bkwconfig.xml.\r
+ <BR>\r
+ /src /r dir Source directory to use. \r
+ Should contain\r
+ <BR>\r
+ \r
+ \r
+ pismere/athena. If cvstag or svntag is null,\r
+ <BR>\r
+ \r
+ \r
+ the directory should be prepopulated.\r
+ <BR>\r
+ /out /o dir Directory to be created \r
+ where build results will go\r
+ <BR>\r
+ </TT><TT> /repository checkout | co \ What repository action to take.\r
+ <BR>\r
+ \r
+ update | up ) Options are to checkout, update or\r
+ <BR>\r
+ \r
+ skip / take no \r
+ action [skip].\r
+ <BR>\r
+ /username /u name username used to access svn if checking out.\r
+ <BR>\r
+ /cvstag /c tag use -r <tag>\r
+ <TAG>in cvs \r
+command <BR> /svnbranch /b tag use \r
+/branches/<tag><TAG> instead of /trunk.<BR> /svntag /s tag use \r
+/tags/<tag><TAG> instead of /trunk.<BR> /debug \r
+/d Do debug make instead of \r
+release make. <BR> \r
+/[no]make \r
+Control the make \r
+step. <BR> \r
+/clean Build \r
+clean target. <BR> \r
+/[no]package Control the packaging step. <BR> \r
+/[no]sign Control \r
+signinf \r
+of executable files. <BR> /verbose \r
+/v Debug mode - verbose output. <BR> /logfile /l path Where to write output. \r
+Default is bkw.pl.log. <BR> \r
+ /nolog Don't \r
+ save output. </TT>\r
+ </P>\r
+ <P><TT> Other:\r
+ <BR>\r
+ NMAKE-options any options you want to pass to NMAKE, which \r
+ can be:\r
+ <BR>\r
+ \r
+ (note: /nologo is always used)<BR>\r
+ NODEBUG=1</TT></P>\r
+ <P><TT>NMAKE-options any options you want to pass to NMAKE, which can be:</TT><BR>\r
+ <TT>(note: /nologo is always used)</TT><BR>\r
+ <TT>[ nmake options follow ]</TT></P>\r
+ <P><BR>\r
+ Notes on the script steps:</P>\r
+ <P><STRONG>Verifying the environment</STRONG>: \r
+ <BR>\r
+ The script tests for each program that it needs and warns if the program isn't \r
+ found.</P>\r
+ <P><STRONG>Fetching sources from repositories</STRONG>: \r
+ <BR>\r
+ If building from a source distribution kit, this section does not apply.</P>\r
+ <P>CVSROOT and SVNURL must be specified in the configuration file.</P>\r
+ <P>A source zip file can only be produced if checking out fresh sources from a \r
+ repository. </P>\r
+ <P>If checking out, the entire pismere directory will be deleted. A warning \r
+ message requires that you confirm this action.</P>\r
+ <P><STRONG>Building the sources:</STRONG><BR>\r
+ /DEBUG controls whether a debug or release build is done. /CLEAN will \r
+ build the CLEAN target.</P>\r
+ <P><STRONG>Setting up the packaging environment :<BR>\r
+ </STRONG>The pre-package steps gathers up build results and puts them in a <FONT face="Courier">\r
+ staging</FONT> area. \r
+ </P>\r
+ <P>If /SIGN is specified, <FONT face="Courier">.exe</FONT>s, <FONT face="Courier">.dll</FONT>s \r
+ and <FONT face="Courier">.cpl</FONT>s are signed. The signing command \r
+ template is in the configuration file.</P>\r
+ <P><STRONG>Building the installers:</STRONG><BR>\r
+ The <FONT face="Courier">staging </FONT>area is copied into a fresh area for \r
+ each of the installers. The installer results are copied back to the <FONT face="Courier">\r
+ staging </FONT>area.</P>\r
+ <P><STRONG>Building the rest of the components:</STRONG><BR>\r
+ Zip files are built in temporary areas and copied to <FONT face="Courier">outdir</FONT>. \r
+ The installers and assorted files are copied from <FONT face="Courier">staging</FONT>\r
+ to <FONT face="Courier">outdir</FONT>. If /SIGN is specified, the \r
+ installers will be signed.</P>\r
+ <P> </P>\r
+ <H2><A name="Details"></A>Script Internal Details</H2>\r
+ <H3><A name="Copylists"></A>Copy Lists</H3>\r
+ <P>CopyLists are used in many places. For example, files to be put into \r
+ a .zip are copied to a fresh directory which is then zipped up. There is \r
+ an optional Configuration section and a required Files section. </P>\r
+ <P>The configuration section defines the roots of the from and to paths and can \r
+ optionally define path substitutions. \r
+ </P>\r
+ <P>The to and from paths are forced by the script rather than being set in the \r
+ config file. Comments in the copyfile xml indicate this.</P>\r
+ <P>Lengthy copy lists can be kept in separate files and included with the Include \r
+ directive. Example:</P>\r
+ <P><TT><Include path="sdkfiles.xml" /></TT></P>\r
+ <H3>Substitution tags</H3>\r
+ <P>Filenames in copylists can contain variable 'tags' that are replaced before the \r
+ file is copied. Some configuration files contain substitution tags which \r
+ customize the configuration. The supported tags are</P>\r
+ <P>\r
+ <TABLE id="Table3" height="0" cellSpacing="1" cellPadding="1" border="1">\r
+ <TR>\r
+ <TD width="136">%VERSION_MAJOR%</TD>\r
+ <TD height="21">KfW Version from pismere/athena/include/kerberos.ver.</TD>\r
+ </TR>\r
+ <TR>\r
+ <TD width="136">%VERSION_MINOR%</TD>\r
+ <TD height="9">KfW Version from pismere/athena/include/kerberos.ver.</TD>\r
+ </TR>\r
+ <TR>\r
+ <TD width="136">%VERSION_PATCH%</TD>\r
+ <TD height="17">KfW Version from pismere/athena/include/kerberos.ver.</TD>\r
+ </TR>\r
+ <TR>\r
+ <TD width="136">%filestem%</TD>\r
+ <TD height="17">Defined as kfw-%VERSION_MAJOR%-%VERSION_MINOR%-%VERSION_PATCH%.</TD>\r
+ </TR>\r
+ <TR>\r
+ <TD width="136">%debug%</TD>\r
+ <TD>'dbg.' Only substituted during a debug build. </TD>\r
+ </TR>\r
+ <TR>\r
+ <TD width="136">%release%</TD>\r
+ <TD>'rel.' Only substituted during a release build. \r
+ </TD>\r
+ </TR>\r
+ <TR>\r
+ <TD width="136">%bldtype%</TD>\r
+ <TD>Always substituted, to 'dbg' or 'rel,' depending on the type of build.</TD>\r
+ </TR>\r
+ <TR>\r
+ <TD width="136">%-DEBUG%</TD>\r
+ <TD>'-DEBUG' during a debug build; otherwise empty.</TD>\r
+ </TR>\r
+ <TR>\r
+ <TD width="136">%BUILDDIR%</TD>\r
+ <TD>SRCDIR\pismere. Used in site-local installer configuration files.</TD>\r
+ </TR>\r
+ <TR>\r
+ <TD width="136">%TARGETDIR%</TD>\r
+ <TD>SRCDIR\pismere\staging. Used in site-local installer configuration files.</TD>\r
+ </TR>\r
+ <TR>\r
+ <TD width="136">%CONFIGDIR-WIX%</TD>\r
+ <TD>SRCDIR\pismere\staging\sample. Used in site-local installer configuration \r
+ files.</TD>\r
+ </TR>\r
+ <TR>\r
+ <TD width="136">%CONFIGDIR-NSI%</TD>\r
+ <TD>SRCDIR\pismere\staging. Used in site-local installer configuration files.</TD>\r
+ </TR>\r
+ </TABLE>\r
+ </P>\r
+ <P>The overall build configuration specifies a debug or release build. Debug \r
+ and release results are put in different places. Files whose location \r
+ depend on the build type can use %bldtype% in their names. The script \r
+ will substitute %bldtype% with either dbg or rel, depending on the build \r
+ type. <STRONG></P>\r
+ </DIV>\r
+ <DIV style="MARGIN-LEFT: 10px; MARGIN-RIGHT: 10px" align="left">\r
+ <H3>Example</H3>\r
+ </STRONG>\r
+ <P>Here is a copylist entry. Each segment of the file's path that comes \r
+ from a different place is in a different color.</P>\r
+ <P>Release build. Config file:\r
+ </P>\r
+ <P>\r
+ <TABLE id="Table2" cellSpacing="1" cellPadding="1" border="0">\r
+ <TR>\r
+ <TD colSpan="4"><FONT face="courier"><BKW_Config></FONT></TD>\r
+ </TR>\r
+ <TR>\r
+ <TD width="23"></TD>\r
+ <TD colSpan="3"><FONT face="courier"><CommandLine></FONT></TD>\r
+ </TR>\r
+ <TR>\r
+ <TD width="23"></TD>\r
+ <TD width="20"></TD>\r
+ <TD colSpan="2"><FONT face="courier"><Directories></FONT></TD>\r
+ </TR>\r
+ <TR>\r
+ <TD width="23"></TD>\r
+ <TD width="20"></TD>\r
+ <TD width="22"></TD>\r
+ <TD><FONT face="courier"><src path ="<FONT color="#000099">C:\bkw"</FONT> /></FONT>\r
+ </TD>\r
+ </TR>\r
+ </TABLE>\r
+ </P>\r
+ <P>Copylist comments:</P>\r
+ <P><tt><!-- File from paths are relative to\r
+ <src>\<FONT color="#ff00cc">pismere\athena</FONT> --> <BR><!-- File to paths are relative to <src>\<FONT color="#00ff00">\r
+ pismere\staging</FONT>\r
+ --> </tt>\r
+ </P>\r
+ <P>When the script processes this copylist, it will force the from and to paths as \r
+ indicated.</P>\r
+ <P>This line\r
+ </P>\r
+ <P><tt><File name="<FONT color="#00ffff">comerr32.dll</FONT>" from="<FONT color="#ff9933">..\target\bin\i386</FONT>\<FONT color="#ff0000">%bldtype%</FONT>\" \r
+ to="\<FONT color="#9966ff">bin\i386</FONT>" /></tt></P>\r
+ <P>will result in <FONT face="Courier"><FONT color="#000099">C:\bkw</FONT>\<FONT color="#ff00cc">pismere\athena</FONT>\<FONT color="#ff9933">..\target\bin\i386</FONT>\<FONT color="#ff0000">rel</FONT>\<FONT color="#00ffff">comerr32.dll</FONT></FONT></P>\r
+ <P>being copied to <FONT face="Courier"><FONT color="#000099">C:\bkw</FONT>\<FONT color="#00ff00">pismere\staging</FONT>\<FONT color="#9966ff">bin\i386</FONT>\<FONT color="#00ffff">comerr32.dll</FONT></FONT>.</P>\r
+ <P>Other possible attributes in a copylist entry:</P>\r
+ <UL>\r
+ <LI>\r
+ <TT>notrequired</TT>\r
+ <LI>\r
+ <TT>newname="filename"</TT>\r
+ </LI>\r
+ </UL>\r
+ <P>By default, copylist entries are required and the script will die if they aren't \r
+ present. To ignore missing files, add <TT>notrequired</TT>.</P>\r
+ <P>To rename the file, set the <TT>newname</TT> attribute.</P>\r
+ <H2><FONT face="Verdana"><A name="Remainingwork"></A>Remaining Work / Bug List</FONT></H2>\r
+ <P>Implement RETAIL, OFFICIAL, PRERELEASE, PRIVATE, SPECIAL.</P>\r
+ <P>Figure out what MIT_ONLY, BUILD_KFW, DEBUG_SYMBOL should be.</P>\r
+ <P>TARGET, APPVER.</P>\r
+ <P>NODEBUG=1. Set if release build.</P>\r
+ <H2><FONT face="Verdana"><A name="Troubleshooting"></A>Troubleshooting</FONT>\r
+ </H2>\r
+ <P><STRONG>Can't clean directory; can't delete file or directory</STRONG><BR>\r
+ Make sure a file in the named directory isn't open in another application.</P>\r
+ </DIV>\r
+ </BODY>\r
</HTML>\r
\r
sub usage {\r
print <<USAGE;\r
-Usage: $0 (-f --config) config-file [options] NMAKE-options\r
+Usage: $0 [options] NMAKE-options\r
\r
Options are case insensitive.\r
\r
Options:\r
/help /? usage information (what you now see).\r
- /config /f path Path to config file.\r
+ /config /f path Path to config file. Default is bkwconfig.xml.\r
/srcdir /r dir Source directory to use. Should contain \r
pismere/athena. If cvstag or svntag is null, \r
the directory should be prepopulated.\r
skip / take no action [skip].\r
/username /u name username used to access svn if checking out.\r
/cvstag /c tag use -r <tag> in cvs command\r
- /svnbranch /b tag append /branches/<tag> to svn path.\r
- /svntag /s tag append /tags/<tag> to svn path.\r
+ /svnbranch /b tag use /branches/<tag> instead of /trunk.\r
+ /svntag /s tag use /tags/<tag> instead of /trunk.\r
/debug /d Do debug make instead of release make.\r
- /nomake Skip make step.\r
+ /[no]make Control the make step.\r
/clean Build clean target.\r
- /nopackage Skip packaging step.\r
- /sign Sign files\r
- /nosign Don't sign files\r
+ /[no]package Control the packaging step.\r
+ /[no]sign Control signing of executable files.\r
/verbose /v Debug mode - verbose output.\r
- /logfile /l path Where to write output. Default is bkw.pl.log\r
- /nolog Don't save output\r
+ /logfile /l path Where to write output. Default is bkw.pl.log.\r
+ /nolog Don't save output.\r
Other:\r
NMAKE-options any options you want to pass to NMAKE, which can be:\r
(note: /nologo is always used)\r
}\r
\r
sub main {\r
+ local $cmdline = "bkw.pl";\r
+ foreach $arg (@ARGV) {$cmdline .= " $arg";}\r
+\r
Getopt::Long::Configure('no_bundling', 'no_auto_abbrev',\r
'no_getopt_compat', 'require_order',\r
'ignore_case', 'pass_through',\r
'cvstag|c:s',\r
'svntag|s:s',\r
'svnbranch|b:s',\r
- 'srcdir|r:s',\r
- 'outdir|o:s',\r
+ 'src|r:s',\r
+ 'out|o:s',\r
'debug|d',\r
- 'config|f:s',\r
+ 'nodebug',\r
+ 'config|f=s',\r
'logfile|l:s',\r
'nolog',\r
'repository:s',\r
'username|u:s',\r
'verbose|v',\r
'vverbose',\r
- 'nomake',\r
+ 'make!',\r
'clean',\r
- 'nopackage',\r
- 'sign',\r
- 'nosign',\r
+ 'package!',\r
+ 'sign!',\r
);\r
\r
if ( $OPT->{help} ) {\r
exit(0);\r
}\r
\r
+ delete $OPT->{foo}; \r
+\r
##++ Validate required conditions:\r
\r
- if ($OPT->{config}) {}\r
- else {\r
- print "Fatal -- Configuration file must be specified.\n";\r
+ local $argvsize = @ARGV;\r
+ if ($argvsize > 0) {\r
+ print "Error -- invalid argument: $ARGV[0]\n";\r
usage();\r
- exit(0);\r
+ die;\r
}\r
+ \r
+ if (! exists $OPT->{config}) {$OPT->{config} = "bkwconfig.xml";}\r
\r
# List of programs which must be in PATH:\r
- my @required_list = ('sed', 'awk', 'which', 'cat', 'rm', 'cvs', 'svn', 'doxygen', 'hhc', 'candle', 'light', 'makensis', 'nmake', 'plink');\r
+ my @required_list = ('sed', 'awk', 'which', 'cat', 'rm', 'cvs', 'svn', 'doxygen', \r
+ 'hhc', 'candle', 'light', 'makensis', 'nmake', 'plink', 'filever');\r
my $requirements_met = 1;\r
my $first_missing = 0;\r
my $error_list = "";\r
# Get configuration file:\r
my $xml = new XML::Simple();\r
$config = $xml->XMLin($configfile);\r
-\r
# Set up convenience variables:\r
- my (@switches, @paths, @tags, @fetch);\r
- @switches = $config->{CommandLine}->{Options};\r
- @paths = $config->{CommandLine}->{Directories};\r
- @tags = $config->{CommandLine}->{Tags};\r
- @fetch = $config->{Stages}->{FetchSources}->{Config};\r
-\r
- # Update the configuration with overrides from the command line:\r
- $tags[0]->{cvs}->{value} = $OPT->{cvstag} if exists $OPT->{cvstag};\r
- $tags[0]->{svntag}->{value} = $OPT->{svntag} if exists $OPT->{svntag};\r
- $tags[0]->{svnbranch}->{value} = $OPT->{svnbranch} if exists $OPT->{svnbranch};\r
- $paths[0]->{src}->{path} = $OPT->{srcdir} if exists $OPT->{srcdir};\r
- $paths[0]->{out}->{path} = $OPT->{outdir} if exists $OPT->{outdir};\r
- $switches[0]->{debug}->{value} = $OPT->{debug} if exists $OPT->{debug};\r
- $switches[0]->{clean}->{value} = 1 if exists $OPT->{clean};\r
- $switches[0]->{repository}->{value} = $OPT->{repository} if exists $OPT->{repository};\r
- $fetch[0]->{USERNAME}->{name} = $OPT->{username} if exists $OPT->{username};\r
- $switches[0]->{nomake}->{value} = 1 if exists $OPT->{nomake};\r
- $switches[0]->{nopackage}->{value} = 1 if exists $OPT->{nopackage};\r
- $switches[0]->{verbose}->{value} = $OPT->{verbose} if exists $OPT->{verbose};\r
- $switches[0]->{vverbose}->{value} = $OPT->{verbose} if exists $OPT->{vverbose};\r
- if (exists $OPT->{logfile}) {\r
- $switches[0]->{logfile}->{path} = $OPT->{logfile};\r
- $switches[0]->{logfile}->{value} = 1;\r
- }\r
- if (exists $OPT->{nolog}) {\r
- $switches[0]->{logfile}->{value} = 0;\r
- }\r
- if (exists $OPT->{sign}) {\r
- $switches[0]->{sign}->{timestampserver} = $OPT->{sign};\r
- $switches[0]->{sign}->{value} = 1;\r
- }\r
- if (exists $OPT->{nosign}) {\r
- $switches[0]->{sign}->{value} = 0;\r
+ local $odr = $config->{Config}; ## Options, directories, repository, environment.\r
+\r
+#while ($v = each %$OPT) {print "$v: $OPT->{$v}\n";}\r
+\r
+ # Scan the configuration for switch definitions:\r
+ while (($sw, $val) = each %$odr) {\r
+ next if (! exists $val->{def}); ## ?? Should always exist.\r
+ # If the switch is in the command line, override the stored value:\r
+ if (exists $OPT->{$sw}) {\r
+ if (exists $val->{value}) {\r
+ $val->{value} = $OPT->{$sw}; \r
+ $val->{def} = 1;\r
+ }\r
+ else {\r
+ $val->{def} = $OPT->{$sw}; ## If no<switch>, value will be zero.\r
+ }\r
+ }\r
+ # If the switch can be negated, test that, too:\r
+ if ( ! ($val->{def} =~ /A/)) {\r
+ local $nosw = "no".$sw;\r
+ if (exists $OPT->{$nosw}) {\r
+ $val->{def} = 0;\r
+ }\r
+ }\r
+ \r
+ # For any switch definition with fixed values ("options"), validate:\r
+ if (exists $val->{options}) {\r
+ local $bValid = 0;\r
+ # options can be like value1|syn1 value2|syn2|syn3\r
+ foreach $option (split(/ /, $val->{options})) {\r
+ local $bFirst = 1;\r
+ local $sFirst;\r
+ foreach $opt (split(/\|/, $option)) {\r
+ # opt will be like value2, syn2, syn3\r
+ if ($bFirst) {\r
+ $sFirst = $opt; ## Remember the full name of the option.\r
+ $bFirst = 0;\r
+ }\r
+ if ($val->{value} =~ /$opt/i) {\r
+ $val->{value} = $sFirst; ## Save the full name.\r
+ $bValid = 1;\r
+ }\r
+ }\r
+ }\r
+ if (! $bValid) {\r
+ print "Fatal -- invalid $sw value $val->{value}. Possible values are $val->{options}.\n";\r
+ usage();\r
+ die;\r
+ }\r
+ }\r
}\r
- our $verbose = $config->{CommandLine}->{Options}->{verbose}->{value};\r
- our $vverbose = $config->{CommandLine}->{Options}->{vverbose}->{value};\r
- our $clean = $switches[0]->{clean}->{value};\r
- local $src = $paths[0]->{src}->{path};\r
- local $out = $paths[0]->{out}->{path};\r
\r
- if ($clean && !$switches[0]->{nopackage}->{value}) {\r
+ # Set up convenience variables:\r
+ our $verbose = $odr->{verbose}->{def};\r
+ our $vverbose = $odr->{vverbose}->{def};\r
+ our $clean = $clean->{clean}->{def};\r
+ local $src = $odr->{src}->{value};\r
+ local $out = $odr->{out}->{value};\r
+\r
+ if ($clean && $odr->{package}->{def}) {\r
print "Info -- /clean forces /nopackage.\n";\r
- $switches[0]->{nopackage}->{value} = 1;\r
+ $odr->{package}->{def} = 0;\r
}\r
\r
if ($vverbose) {print "Debug -- Config: ".Dumper($config);}\r
\r
- # Examples of use:\r
- #print "Logfile path: $switches[0]->{log}->{path}\n";\r
- #print "src path: $paths[0]->{src}->{path}\n";\r
- #print "cvs tag: $tags[0]->{cvs}->{value}\n";\r
- #print "CVSROOT: $fetch[0]->{CVSROOT}->{name}\n";\r
-\r
# Test the unix find command:\r
- if (! exists $config->{CommandLine}->{Directories}->{unixfind}->{path}) {\r
- $config->{CommandLine}->{Directories}->{unixfind}->{path} = "C:\\tools\\cygwin\\bin";\r
+ if (! exists $odr->{unixfind}->{value}) {\r
+ $odr->{unixfind}->{value} = "C:\\tools\\cygwin\\bin";\r
}\r
- local $unixfind = $config->{CommandLine}->{Directories}->{unixfind}->{path};\r
+ local $unixfind = $odr->{unixfind}->{value};\r
\r
local $savedPATH = $ENV{PATH};\r
$ENV{PATH} = $unixfind.";".$savedPATH;\r
}\r
\r
# Don't allow /svntag and /svnbranch simultaneously:\r
- if ( (length $tags[0]->{svntag}->{value} > 0) && \r
- (length $tags[0]->{svnbranch}->{value} > 0) ) {\r
+ if ( (length $odr->{svntag}->{value} > 0) && \r
+ (length $odr->{svnbranch}->{value} > 0) ) {\r
die "Fatal -- Can't specify both /SVNTAG and /SVNBRANCH.";\r
}\r
\r
##-- Assemble configuration from config file and command line.\r
\r
- my $sw = $switches[0]->{repository}->{value};\r
- my $rverb;\r
- if ($sw =~ /skip/i) {$rverb = "skip";}\r
- elsif ($sw =~ /update/i) {$rverb = "update";}\r
- elsif ($sw =~ /up/i) {$rverb = "update";}\r
- elsif ($sw =~ /checkout/i) {$rverb = "checkout";}\r
- elsif ($sw =~ /co/i) {$rverb = "checkout";}\r
- else {\r
- print "Fatal -- invalid /repository value.\n";\r
- usage();\r
- die;\r
- }\r
- $switches[0]->{repository}->{value} = $rverb; ## Save canonicalized repository verb.\r
-\r
+ local $rverb = $odr->{repository}->{value};\r
if ( ($rverb =~ /checkout/) && $clean) {\r
print "Warning -- Because sources afe being checked out, make clean will not be run.\n";\r
- $clean = $switches[0]->{clean}->{value} = 0;\r
+ $clean = $odr->{clean}->{def} = 0;\r
}\r
\r
my $wd = $src."\\pismere";\r
\r
if (! ($rverb =~ /skip/)) {\r
local $len = 0;\r
- if (exists $fetch[0]->{USERNAME}->{name}) {\r
- $len = length $fetch[0]->{USERNAME}->{name};\r
+ if (exists $odr->{USERNAME}->{value}) {\r
+ $len = length $odr->{USERNAME}->{value};\r
}\r
if ($len < 1) {\r
die "Fatal -- you won't get far accessing the repository without specifying a username.";\r
\r
# Begin logging:\r
my $l;\r
- if ($switches[0]->{logfile}->{value}) {\r
- print "Info -- logging to $switches[0]->{logfile}->{path}.\n";\r
- $l = new Logger $switches[0]->{logfile}->{path};\r
+ if ($odr->{logfile}->{def}) {\r
+ print "Info -- logging to $odr->{logfile}->{value}.\n";\r
+ $l = new Logger $odr->{logfile}->{value};\r
$l->start;\r
$l->no_die_handler; ## Needed so XML::Simple won't throw exceptions.\r
}\r
\r
+ print "Executing $cmdline\n";\r
+ \r
##++ Begin repository action:\r
if ($rverb =~ /skip/) {print "Info -- *** Skipping repository access.\n" if ($verbose);}\r
else {\r
}\r
\r
# Set up cvs environment variables:\r
- $ENV{CVSROOT} = $fetch[0]->{CVSROOT}->{name};\r
+ $ENV{CVSROOT} = $odr->{CVSROOT}->{value};\r
local $krb5dir = "$wd\\athena\\auth\\krb5";\r
\r
local $cvscmdroot = "cvs $rverb";\r
- if (length $tags[0]->{cvs}->{value} > 0) {\r
- $cvscmdroot .= " -r $tags[0]->{cvs}->{value}";\r
+ if (length $odr->{cvstag}->{value} > 0) {\r
+ $cvscmdroot .= " -r $odr->{cvstag}->{value}";\r
}\r
\r
if ($rverb =~ /checkout/) { \r
my $svncmd = "svn $rverb ";\r
if ($rverb =~ /checkout/) { # Append the rest of the checkout command:\r
chdir("..");\r
- $svncmd .= "svn+ssh://".$fetch[0]->{USERNAME}->{name}."@".$fetch[0]->{SVNURL}->{name}."/krb5/";\r
- if (length $tags[0]->{svntag}->{value} > 0) {\r
- $svncmd .= "tags/$tags[0]->{svntag}->{value}";\r
+ $svncmd .= "svn+ssh://".$odr->{USERNAME}->{value}."@".$odr->{SVNURL}->{value}."/krb5/";\r
+ if (length $odr->{svntag}->{value} > 0) {\r
+ $svncmd .= "tags/$odr->{svntag}->{value}";\r
}\r
- elsif (length $tags[0]->{svnbranch}->{value} > 0) {\r
- $svncmd .= "branches/$tags[0]->{svnbranch}->{value}";\r
+ elsif (length $odr->{svnbranch}->{value} > 0) {\r
+ $svncmd .= "branches/$odr->{svnbranch}->{value}";\r
}\r
else {\r
$svncmd .= "trunk";\r
##-- End repository action, part 2.\r
\r
##++ Make action:\r
- if ( (!$switches[0]->{nomake}->{value}) ) {\r
+ if ( ($odr->{make}->{def}) ) {\r
if ($verbose) {print "Info -- *** Begin preparing for build.\n";}\r
\r
chdir("$wd") or die "Fatal -- couldn't chdir to $wd\n";\r
\r
chdir("$wd\\athena") or die "Fatal -- couldn't chdir to source directory $wd\\athena\n";\r
print "Info -- chdir to ".`cd`."\n" if ($verbose);\r
- local $dbgswitch = ($switches[0]->{debug}->{value}) ? " " : "NODEBUG=1";\r
- !system("perl ../scripts/build.pl --softdirs --nolog $buildtarget $dbgswitch") or die "Fatal -- build $buildtarget failed.";\r
+ local $dbgswitch = ($odr->{debug}->{def}) ? " " : "NODEBUG=1";\r
+ !system("perl ../scripts/build.pl --softdirs --nolog $buildtarget $dbgswitch BUILD_OFFICIAL=1") or die "Fatal -- build $buildtarget failed.";\r
\r
chdir("$wd") or die "Fatal -- couldn't chdir to $wd.";\r
if ($clean) {\r
##-- Make action.\r
\r
##++ Package action:\r
- if ($switches[0]->{nopackage}->{value}) { ## If /clean, nopackage will be set.\r
+ if (! $odr->{package}->{def}) { ## If /clean, nopackage will be set.\r
print "Info -- *** Skipping packaging.\n";\r
if ((-d $out) && ! $bOutputCleaned) {\r
print "Warning -- *** Output directory $out will not be cleaned.\n";\r
# Sign files:\r
chdir($staging) or die "Fatal -- couldn't chdir to $staging\n";\r
print "Info -- chdir to ".`cd`."\n" if ($verbose);\r
- if ($switches[0]->{sign}->{value}) {\r
+ if ($odr->{sign}->{def}) {\r
signFiles($config->{Stages}->{PostPackage}->{Config}->{Signing}, $config);\r
}\r
\r
!system("sed -f ..\\wix\\$tmpfile site-local-tagged.nsi > b.tmp") or die "Fatal -- Couldn't modify site-local.wxi.";\r
!system("rm site-local-tagged.nsi") or die "Fatal -- Couldn't remove site-local-tagged.nsi.";\r
# Add DEBUG or RELEASE:\r
- if ($switches[0]->{debug}->{value}) { ## debug build\r
+ if ($odr->{debug}->{def}) { ## debug build\r
!system("echo !define DEBUG >> b.tmp") or die "Fatal -- Couldn't modify b.tmp."; \r
}\r
else { ## release build\r
copyFiles($config->{Stages}->{PostPackage}->{CopyList}, $config); ## Copy any files\r
\r
print "Info -- chdir to ".`cd`."\n" if ($verbose);\r
- if ($switches[0]->{sign}->{value}) {\r
+ if ($odr->{sign}->{def}) {\r
signFiles($config->{Stages}->{PostPackage}->{Config}->{Signing}, $config);\r
}\r
\r
system("rm -rf $out/ziptemp"); ## Clean up junk.\r
\r
# End logging:\r
- if ($switches[0]->{logfile}->{value}) {$l->stop;}\r
+ if ($odr->{logfile}->{def}) {$l->stop;}\r
\r
return 0;\r
} ## End subroutine main.\r