changeset 95:592f7aa40bf1

Add build scripts.
author Jordan Miner <jminer7@gmail.com>
date Tue, 01 May 2012 21:53:58 -0500
parents 3b0c5c599003
children 301e077da540
files build-debug.bat build-debug.sh build-paths.bat build-paths.sh build-release.bat build-run.bat
diffstat 6 files changed, 79 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /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%
+
--- /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
+
--- /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
+
--- /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
+
--- /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%
+
--- /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%
+