Copy the following lines to make.bat in project's root directory (i.e. directory with cnc-studio.sln file)

@echo off
rem Instructions: Copy this content to make.bat file inside the folder that contains cnc-studio.sln and run make.bat
rem Warning: Not following the instructions or changing some variables can delete files you don't want to be deleted. Use at your own risk.
set MSBUILD="%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe"

rem If you want to build with .NET 3.5 change the MSBUILD variable.
rem Changing MSBUILD to .NET 3.5 requires additional changes in .csproj.
rem Open .csproj file and change ToolsVersion to 3.5 under root Project node.
rem set MSBUILD="%windir%\Microsoft.NET\Framework\v3.5\MSBuild.exe"

rem /v:<verbosity> - q[uiet], m[inimal], n[ormal], d[etailed], diag[nostic]

rem CPU_CORE_COUNT - Number of CPU cores for faster builds

rem Name of a solution file
set SOLUTION=cnc-studio.sln

if not exist %SOLUTION% goto error-solution-missing
echo --------------------------------------------------------------------------------
echo Building '%SOLUTION%'...

set CSPROJ_PATH=client\cnc-studio.csproj
set CSPROJ_REL=..\

rem NOTE: This is very important to have a folder name otherwise it can delete all files!!!
set OUT_DIR=bin

rem Remove previous built files if exist
if exist "%OUT_DIR%" rmdir /S /Q "%OUT_DIR%"

rem Actual build command
%MSBUILD% %CSPROJ_PATH% /t:Rebuild /p:OutDir=%CSPROJ_REL%%OUT_DIR%\ /p:OutputPath=%CSPROJ_REL%%OUT_DIR%\ /p:WarningLevel=1;Configuration=Release;Platform="Any CPU" /v:%VERBOSE% /m:%CPU_CORE_COUNT% /nologo

rem Debug files and files for generating documentation are not needed now
del /S /F /Q %OUT_DIR%\*.pdb
del /F /Q %OUT_DIR%\*.xml

goto end

echo Error: Cannot find %SOLUTION%
echo Search location: %CD%
echo Tip: copy this script to the solution directory
goto end


Last edited Jan 15, 2011 at 12:57 PM by papnkukn, version 1


No comments yet.