aboutsummaryrefslogtreecommitdiff
path: root/devtools/create_project/scripts/postbuild.cmd
diff options
context:
space:
mode:
authorLittleboy2011-04-26 20:10:46 -0400
committerLittleboy2011-04-27 11:08:45 -0400
commit3f2b25f8790708cfdfd9c357acf7e43b95330077 (patch)
treee5c86ceabd99ab02bbc315234a52b808082bfcef /devtools/create_project/scripts/postbuild.cmd
parent66a319e158a73b06ef8539f4470a21109c6aecda (diff)
downloadscummvm-rg350-3f2b25f8790708cfdfd9c357acf7e43b95330077.tar.gz
scummvm-rg350-3f2b25f8790708cfdfd9c357acf7e43b95330077.tar.bz2
scummvm-rg350-3f2b25f8790708cfdfd9c357acf7e43b95330077.zip
TOOLS: Update create_project to optionally create an installer after a successful build
Diffstat (limited to 'devtools/create_project/scripts/postbuild.cmd')
-rw-r--r--devtools/create_project/scripts/postbuild.cmd41
1 files changed, 32 insertions, 9 deletions
diff --git a/devtools/create_project/scripts/postbuild.cmd b/devtools/create_project/scripts/postbuild.cmd
index 6c062f7ab1..aacf7255d0 100644
--- a/devtools/create_project/scripts/postbuild.cmd
+++ b/devtools/create_project/scripts/postbuild.cmd
@@ -1,34 +1,49 @@
-REM @echo off
+@echo off
REM ---------------------------------------------------------------
REM -- Post-Build Script
REM ---------------------------------------------------------------
REM
REM Copy engine data, themes, translation and required dlls to the
-REM output folder.
+REM output folder and optionnaly create an installer
REM
REM Expected parameters
REM Root folder
REM Output folder
REM Architecture
REM Libs folder
+REM Installer ("1" to build, "0" to skip)
if "%~1"=="" goto error_root
if "%~2"=="" goto error_output
if "%~3"=="" goto error_arch
if "%~4"=="" goto error_libs
+if "%~5"=="" goto error_installer
echo Copying data files
echo.
-REM Copy files
-xcopy /F /Y "%~1/dists/engine-data/*.dat" %~2 > NUL 2>&1
-xcopy /F /Y "%~1/dists/engine-data/*.tbl" %~2 > NUL 2>&1
-xcopy /F /Y "%~1/dists/engine-data/*.cpt" %~2 > NUL 2>&1
-xcopy /F /Y "%~1/dists/engine-data/README" %~2 > NUL 2>&1
-xcopy /F /Y "%~1/gui/themes/*.zip" %~2 > NUL 2>&1
+xcopy /F /Y "%~1/AUTHORS" %~2 > NUL 2>&1
+xcopy /F /Y "%~1/COPYING.GPL" %~2 > NUL 2>&1
+xcopy /F /Y "%~1/COPYING" %~2 > NUL 2>&1
+xcopy /F /Y "%~1/COPYING.LGPL" %~2 > NUL 2>&1
+xcopy /F /Y "%~1/COPYRIGHT" %~2 > NUL 2>&1
+xcopy /F /Y "%~1/NEWS" %~2 > NUL 2>&1
+xcopy /F /Y "%~1/README" %~2 > NUL 2>&1
+
+xcopy /F /Y "%~1/dists/engine-data/*.dat" %~2 > NUL 2>&1
+xcopy /F /Y "%~1/dists/engine-data/*.tbl" %~2 > NUL 2>&1
+xcopy /F /Y "%~1/dists/engine-data/*.cpt" %~2 > NUL 2>&1
+xcopy /F /Y "%~1/gui/themes/*.zip" %~2 > NUL 2>&1
xcopy /F /Y "%~1/gui/themes/translations.dat" %~2 > NUL 2>&1
-xcopy /F /Y "%~4/lib/%~3/SDL.dll" %~2 > NUL 2>&1
+xcopy /F /Y "%~4/lib/%~3/SDL.dll" %~2 > NUL 2>&1
+
+if "%~5"=="0" goto done
+
+echo Running installer script
+echo.
+@call cscript "%~1/devtools/create_project/scripts/installer.vbs" %~1 %~2 1>NUL
+if not %errorlevel% == 0 goto error_script
goto done
:error_root
@@ -47,5 +62,13 @@ goto done
echo Invalid libs folder (%~4)!
goto done
+:error_installer
+echo Invalid installer parameter. Should be "0" or "1" (was %~5)!
+goto done
+
+:error_script:
+echo An error occured while running the installer script!
+goto done
+
:done
exit /B0