echo off

rem --- Default settings ------------------------------------------------------
set project=undefined
set project_title=undefined
set project_url=
set releasedir=.
set releasefiles=*
set exedir=.\
set srcdir=.\
set ext=.exe
set compiler=delphi
set target=x86
set params=
set extralib=
set debug=0
set release=0
set fastmm=0
set upx=0
set map=0
set commit=1
call "info" info
if errorlevel 1 exit 1

rem --- Read command-line parameters ------------------------------------------
call "info" params %*
:params
if "%~1"=="" goto paramend
if /i "%~1"=="-?" goto help
if /i "%~1"=="-h" goto help
if /i "%~1"=="debug" set debug=1
if /i "%~1"=="nodebug" set debug=0
if /i "%~1"=="fastmm" set fastmm=1
if /i "%~1"=="nofastmm" set nofastmm=0
if /i "%~1"=="upx" set upx=1
if /i "%~1"=="noupx" set upx=0
if /i "%~1"=="map" set map=1
if /i "%~1"=="nomap" set map=0
if /i "%~1"=="release" set release=1
if /i "%~1"=="norelease" set release=0
if /i "%~1"=="commit" set commit=1
if /i "%~1"=="nocommit" set commit=0
if /i "%~1"=="fpc" set compiler=fpc
if /i "%~1"=="delphi" set compiler=delphi
if /i "%~1"=="x86" set target=x86
if /i "%~1"=="x32" set target=x86
if /i "%~1"=="x64" set target=x64
call "info" paramloop %1
shift
goto :params

:paramend

