# HG changeset patch # User Jordan Miner # Date 1335927238 18000 # Node ID 592f7aa40bf19f28ee5b87be5d1c5e647b08e684 # Parent 3b0c5c599003d0d61c31f8db1c89e53edf3ab82e Add build scripts. diff -r 3b0c5c599003 -r 592f7aa40bf1 build-debug.bat --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/build-debug.bat Tue May 01 21:53:58 2012 -0500 @@ -0,0 +1,18 @@ +@echo off + +call build-paths + +set ARGS=-DCPATH%DMD_DIR%\bin -T%OUT_FILE% -od%CD%\obj -full -D -Dd%CD%/docs standard.ddoc +set MODE_ARGS=-debug -g -unittest + +@echo on +%BUD_DIR%\bud -Xtango tango-user-dmd.lib %MAIN_FILE% cursors.res %ARGS% %MODE_ARGS% +@echo off +if errorlevel 1 goto end + +rem Any other build tasks go here + +:end +if not "%1" == "-nopause" pause +exit /B %ERRORLEVEL% + diff -r 3b0c5c599003 -r 592f7aa40bf1 build-debug.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/build-debug.sh Tue May 01 21:53:58 2012 -0500 @@ -0,0 +1,19 @@ +#!/bin/bash + +source ./build-paths.sh + +ARGS="-DCPATH$DMD_DIR/bin -T$OUT_FILE -full -clean -op" +MODE_ARGS="-debug -g -unittest" + +echo $BUD_DIR/bud $MAIN_FILE $ARGS $MODE_ARGS + +$BUD_DIR/bud $MAIN_FILE $ARGS $MODE_ARGS + +# have to call bud twice... +# the first time to compile, using the -op switch +# the second time to build docs, without the -op switch + +echo $BUD_DIR/bud $MAIN_FILE -obj -o- -D -Dd$PWD/docs + +$BUD_DIR/bud $MAIN_FILE -obj -o- -D -Dd$PWD/docs + diff -r 3b0c5c599003 -r 592f7aa40bf1 build-paths.bat --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/build-paths.bat Tue May 01 21:53:58 2012 -0500 @@ -0,0 +1,5 @@ +set DMD_DIR=C:\Files\dev\dmd +set BUD_DIR=C:\Files\dev +set MAIN_FILE=tester.d +set OUT_FILE=tester.exe + diff -r 3b0c5c599003 -r 592f7aa40bf1 build-paths.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/build-paths.sh Tue May 01 21:53:58 2012 -0500 @@ -0,0 +1,6 @@ +#!/bin/bash +DMD_DIR=~/dmd +BUD_DIR=~/bin +MAIN_FILE=tester.d +OUT_FILE=tester + diff -r 3b0c5c599003 -r 592f7aa40bf1 build-release.bat --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/build-release.bat Tue May 01 21:53:58 2012 -0500 @@ -0,0 +1,18 @@ +@echo off + +call build-paths + +set ARGS=-DCPATH%DMD_DIR%\bin -T%OUT_FILE% -od%CD%\obj -full -D -Dd%CD%/docs standard.ddoc +set MODE_ARGS=-gui4.0 -release -inline -O + +@echo on +%BUD_DIR%\bud -Xtango tango-user-dmd.lib %MAIN_FILE% cursors.res %ARGS% %MODE_ARGS% +@echo off +if errorlevel 1 goto end + +rem Any other build tasks go here + +:end +if not "%1" == "-nopause" pause +exit /B %ERRORLEVEL% + diff -r 3b0c5c599003 -r 592f7aa40bf1 build-run.bat --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/build-run.bat Tue May 01 21:53:58 2012 -0500 @@ -0,0 +1,13 @@ +@echo off + +call build-debug -nopause +if errorlevel 1 goto end + +@echo on +%OUT_FILE% +@echo off + +:end +if not "%1" == "-nopause" pause +exit /B %ERRORLEVEL% +