PDA

View Full Version : HOWTO: Build a Setup from the Command Line



Support
09-27-2002, 03:16 PM
<HTML><HEAD><TITLE>HOWTO: Build a Setup from the Command Line</TITLE></HEAD><BODY><h3>HOWTO: Build a Setup from the Command Line</h3><b>Document ID: IR02014</b><hr>The information in this article applies to:<ul><li>Setup Factory 6.0</li></ul><hr><h3>SUMMARY</h3><p>This article explains how to build a setup from the command line.</p><h3>DISCUSSION</h3><p>Building a setup from the command line or batch file is an easy way to perform daily builds, or to quickly build the most up-to-date version of your application. Setup Factory even supports the passing of an INI file containing design-time constants that your project will use.<br><br>Using this process you could build your commercial and evaluation setups using a batch file. The batch file would have to perform two unattended builds: one that passes the "commercial" INI file, and another that passes the "evaluation" INI file.<br> <br>The following command line options are supported by the Setup Factory design environment:<br><br><b>Unattended Build (/B)</b><br>This performs an unattended build of a project. This allows you to build a setup executable "automatically" from a batch file.<br><br>The syntax for the <b>/B</b> option is:<br><PRE><code>/B:Unattended-build_INI_file</code></PRE>Replace "Unattended-build_INI_file" with the path and filename of an INI file containing the unattended build settings you want Setup Factory to use. (Be sure to put quotes around the entire argument if the path or filename includes any spaces.)<br><br><b>Example:</b><br><PRE><code>SUF60Design.exe D:\foo.sf6 "/B:D:\release build.ini"</code></PRE><b>Note</b>: The full path to the project file should always be passed as the first command line parameter.<br><br>The unattended-build INI file allows you to pass values into your project in the form of design-time constants. You can define as many design-time constants as you want in the INI file, with each constant on a separate line beneath the [Constants] section.<br><br><b>Example:</b><br><PRE><code>[Constants]<br>#OUTPUTDIR#=C:\Output\Foobar 2002\Release<br>#SETUPNAME#=foobar2002setup.exe<br>#BUILD#=release</code></PRE>When you use the <b>/B</b> option, the specified project file is loaded into Setup Factory, the constants described in the specified unattended-build INI file are set, and the setup executable is generated-all without any interaction.<br><br>The SUF60Design.exe process returns an exit code of <b>1</b> if an error occurred during the unattended build, or <b>0</b> if the build was successful. You can use this return code to make your batch files respond to the success or failure of the Setup Factory build process.<br><br><b>Tip</b>: The unattended build option is usually used in conjunction with the Minimize (<b>/M</b>) option.<br><br><b>Minimize (/M)</b><br>This minimizes the Setup Factory design environment when used with the unattended build (<b>/B</b>) option.<br><br><b>Example:</b><br><PRE><code>SUF60Design.exe D:\xyz.sf6 /B:D:\autobuild.ini /M</code></PRE></p><h3>MORE INFORMATION</h3><p>For more information please see the following topics in the Setup Factory 6.0 Help:<br><br><li><b>Command Reference | Actions | Command Line Options</b></li></p><p>KEYWORDS: Setup Factory, Command line, Unattended build</p><hr><FONT SIZE=1>Last reviewed: September 27, 2002<br>Copyright 2002 <A HREF="http://www.indigorose.com" target="blank">Indigo Rose Corporation</a>. All rights reserved.<br></FONT></BODY></HTML>