aboutsummaryrefslogtreecommitdiff
path: root/tools/create_project/scripts
diff options
context:
space:
mode:
authorJulien Templier2010-11-19 14:12:33 +0000
committerJulien Templier2010-11-19 14:12:33 +0000
commitec9ad50c145be10985666b08ee2dbf0f9129c551 (patch)
tree9f84b20270845e23d7a7ee9cfa2a044e523f1ab7 /tools/create_project/scripts
parent6aa770751fbb830436f305d64369b4332cbc8d86 (diff)
downloadscummvm-rg350-ec9ad50c145be10985666b08ee2dbf0f9129c551.tar.gz
scummvm-rg350-ec9ad50c145be10985666b08ee2dbf0f9129c551.tar.bz2
scummvm-rg350-ec9ad50c145be10985666b08ee2dbf0f9129c551.zip
TOOLS: Move Visual Studio pre/post build events scripts to external files
svn-id: r54381
Diffstat (limited to 'tools/create_project/scripts')
-rw-r--r--tools/create_project/scripts/postbuild.cmd45
-rw-r--r--tools/create_project/scripts/prebuild.cmd36
2 files changed, 81 insertions, 0 deletions
diff --git a/tools/create_project/scripts/postbuild.cmd b/tools/create_project/scripts/postbuild.cmd
index e69de29bb2..89062de2de 100644
--- a/tools/create_project/scripts/postbuild.cmd
+++ b/tools/create_project/scripts/postbuild.cmd
@@ -0,0 +1,45 @@
+REM @echo off
+
+REM ---------------------------------------------------------------
+REM -- Post-Build Script
+REM ---------------------------------------------------------------
+REM
+REM Copy engine data, themes, translation and required dlls to the
+REM output folder.
+REM
+REM Expected parameters
+REM Root folder
+REM Output folder
+REM Architecture
+
+if "%~1"=="" goto error_input
+if "%~2"=="" goto error_output
+if "%~3"=="" goto error_arch
+
+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/gui/themes/translations.dat" %~2 > NUL 2>&1
+xcopy /F /Y "%SCUMMVM_LIBS%/lib/%~3/SDL.dll" %~2 > NUL 2>&1
+goto done
+
+:error_output
+@echo Invalid root folder (%~1)!
+goto done
+
+:error_output
+@echo Invalid output folder (%~2)!
+goto done
+
+:error_arch
+@echo Invalid arch parameter (was: %~3, allowed: x86, x64)!
+goto done
+
+:done
+exit /B0
diff --git a/tools/create_project/scripts/prebuild.cmd b/tools/create_project/scripts/prebuild.cmd
index e69de29bb2..0e67b6f228 100644
--- a/tools/create_project/scripts/prebuild.cmd
+++ b/tools/create_project/scripts/prebuild.cmd
@@ -0,0 +1,36 @@
+@echo off
+
+REM ---------------------------------------------------------------
+REM -- Pre-Build Script
+REM ---------------------------------------------------------------
+REM
+REM Generate file with proper revision number
+REM
+REM Expected parameters
+REM Root folder
+
+if "%~1"=="" goto error_input
+
+if not exist "%~1/.svn/" GOTO error_working_copy
+
+echo Generating revision number
+
+SubWCRev.exe "%~1" "%~1/base/internal_version.h.tpl" "%~1/base/internal_version.h"
+
+if not %errorlevel% == 0 goto error_subwcrev
+goto done
+
+:error_output
+@echo Invalid root folder (%~1)!
+goto done
+
+:error_working_copy
+echo Not a working copy, skipping...
+exit /B0
+
+:error_subwcrev
+echo SubWCRev not found or invalid command line, skipping...
+exit /B0
+
+:done
+exit /B0