Page 1 of 1

Building a C# Solution From Within Zeus

Posted: Mon Aug 20, 2007 4:45 am
by jussij
Note: The latest version of Zeus can directly import and build solution files so this tip is now obsolete ;)


Given a C# solution file, it is possible to ave Zeus run the build.

For example, assuming a MySolution.sln solution file, to setup Zeus to run the build do the following:

Step 1: Create the following build.cmd file to the Zeus install directory:

Code: Select all

@echo off

rem
rem Usage: build.cmd MySolution.sln /build debug
rem

rem Name a file to capture the errors
set ErrorFile=BuildErrors.out

rem Delete the error file if it exists
if exist %ErrorFile% del %ErrorFile%

rem Run the build
rem %1 = Solution file
rem %2 = Build Action (i.e. /build /clean /rebuild)
rem %2 = Type of build (i.e. debug or release)
"d:\program files\Microsoft Visual Studio 8\Common7\IDE\devenv.exe" %1 %2 %3 /out %ErrorFile%

rem Display any errors produced
if exist %ErrorFile% type %ErrorFile%

rem Delete the error file
if exist %ErrorFile% del %ErrorFile%
Step 2: Create a Zeus Workspace in the same directory location as the MySolution.sln file and in the Debug section of the Project panel define the the following command lines:
  • Make Command Line:"$zd\build.cmd" /build debug MySolution.sln
  • Rebuild All Command Line:"$zd\build.cmd" /rebuild debug MySolution.sln
  • Clean Command Line:"$zd\build.cmd" /clean debug MySolution.sln
Step 3: Use the Workspace, Project menus to run the different builds.

Cheers Jussi