Setting up Visual Studio 6 IDE for MDL- notes
to Step 3. Creating MDL Project
Press OK. Next wizard dialog asks for Command line for DEBUG
configuration. Visual Studio has basically two configuration for running compilation process:
Debug used for debug compilation, and Release, used for final release code.
[[REMOVE THIS: Although you may use them for compilation, I would
recommend to use only one configuration and directly edit batch and make file for
any necessary changes in build process.]]
First, for the "Win32 Debug" setting, delete any content at the Command
line entry and type your project name plus .bat extension (optional), for instance
treexmpl.bat, and add "DEBUG" after it, so it looks like "treexmpl.bat DEBUG". This
will be a batch file for running MicroStation compilation, and using DEBUG as an
argument to the batch file. Then type into the Output your final application
name, e.g. treexmpl.ma, and you may leave Rebuild All Switch as it is (/a). Repeat
this for the "Win32 Release" setting, but use a Command line of "treexmpl.bat
RELEASE". Then Press the Finish button.
Then for your example MDLVARS.BAT (mine is called makeMyMDL.bat), the
lines to process the DEBUG and RELEASE and rebuild all arguments can be like the follow.
Note, it is mostly fluff and comments...for each MDL application I simply change the
very last line to suit the application name.
++++++++++++++++++++ START OF makeMyMDL.bat +++++++++++++++++++++
:: =========== makeMyMDL.bat =============
:: This batch file is meant to be used by a call from the MS Dev Studio
:: but may also be used from regular command line building.
:: Author: Gary Jung, Giffels Associates Ltd. Oct 2001
:: Background info for setting up MDL project in MS Dev
:: Set up a workspace, then set up a project for a 'Makefile'. Set the
:: Debug build to be "makeMyMDL.bat DEBUG", rebuild all option "/a"
:: Release build to be "makeMyMDL.bat RELEASE", rebuild all option "/a"
:: Dev Studio will be set up to send these args:
:: If [Win32 Release]...F7 - regular build - "RELEASE"
:: If [Win32 Release]...Rebuild All - "RELEASE /a"
:: If [Win32 Debug]...F7 - regular build - "DEBUG"
:: If [Win32 Debug]...Rebuild All - "DEBUG /a"
echo %0 [%1] [%2]
:: Careful, DOS batch is case sensitive for args. Add code to
:: test case-insensitive if you wish, for now assume project has
:: been set up with UPPERCASE "RELEASE" and "DEBUG" and "/a"
:: We will test for "RELEASE" or "release" but no others.
:: First, unset debug and buildAll OS ENV VARs, so that we default
:: to building Release and a regular build (not rebuild all).
:: If no %1 arg, assume it's running from cmd line, run as RELEASE
if !%1!==!! goto startMake
:: If we find DEBUG, go set debug OS ENV VAR
if !%1!==!DEBUG! goto setDebug
if !%1!==!debug! goto setDebug
:: If we made it here, it's RELEASE or some other garbage arg,
:: Just run as if RELEASE.
:: Shift args now to test next for /a.
if !%1!==!! goto startMake
if !%1!==!/a! goto setBuildAll
if !%1!==!-a! goto setBuildAll
if !%1!==!-A! goto setBuildAll
if !%1!==!/A! goto setBuildAll
:: ECHO all MS* OS ENV VARs
:: Setup MS VC environment
set BMAKE_OPT=-I%MS%\mdl\include -I%MS%\jmdl\include
bmake %buildAll% myMdl.mke
++++++++++++++++++++ END OF makeMyMDL.bat +++++++++++++++++++++