From 7cc965d24b9e7c67f54de520504fa5ead0970bd5 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Wed, 11 May 2011 18:13:22 -0400 Subject: CREATE_PROJECT: Only copy necessary data files in postbuild script --- devtools/create_project/scripts/installer.vbs | 2 +- devtools/create_project/scripts/postbuild.cmd | 35 ++++++++++++++------------- 2 files changed, 19 insertions(+), 18 deletions(-) (limited to 'devtools/create_project/scripts') diff --git a/devtools/create_project/scripts/installer.vbs b/devtools/create_project/scripts/installer.vbs index 6bcd794bef..d752355acd 100644 --- a/devtools/create_project/scripts/installer.vbs +++ b/devtools/create_project/scripts/installer.vbs @@ -73,7 +73,7 @@ Sub CreateInstaller() Dim commandLine : commandLine = """" & nsisPath & "\makensis.exe"" /V2" & _ " /Dtop_srcdir=""" & rootFolder & """" & _ " /Dbuild_dir=""" & targetFolder & """" & _ - " /Dtext_dir=""" & targetFolder & """" & _ + " /Dtext_dir=""" & rootFolder & """" & _ " /DARCH=""" & arch & """" & _ " """ & rootFolder & "\dists\nsis\scummvm.nsi""" diff --git a/devtools/create_project/scripts/postbuild.cmd b/devtools/create_project/scripts/postbuild.cmd index e78861463a..75a916db49 100644 --- a/devtools/create_project/scripts/postbuild.cmd +++ b/devtools/create_project/scripts/postbuild.cmd @@ -23,23 +23,24 @@ if "%~5"=="" goto error_installer echo Copying data files echo. -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/README-SDL" %~2 > NUL 2>&1 - -xcopy /F /Y "%~1/backends/vkeybd/packs/vkeybd_default.zip" %~2 > NUL 2>&1 +REM xcopy /F /Y "%~1/AUTHORS" %~2 1>NUL 2>&1 +REM xcopy /F /Y "%~1/COPYING.GPL" %~2 1>NUL 2>&1 +REM xcopy /F /Y "%~1/COPYING" %~2 1>NUL 2>&1 +REM xcopy /F /Y "%~1/COPYING.LGPL" %~2 1>NUL 2>&1 +REM xcopy /F /Y "%~1/COPYRIGHT" %~2 1>NUL 2>&1 +REM xcopy /F /Y "%~1/NEWS" %~2 1>NUL 2>&1 +REM xcopy /F /Y "%~1/README" %~2 1>NUL 2>&1 + +REM xcopy /F /Y "%~1/dists/engine-data/*.dat" %~2 1>NUL 2>&1 +REM xcopy /F /Y "%~1/dists/engine-data/*.tbl" %~2 1>NUL 2>&1 +REM xcopy /F /Y "%~1/dists/engine-data/*.cpt" %~2 1>NUL 2>&1 +REM xcopy /F /Y "%~1/gui/themes/*.zip" %~2 1>NUL 2>&1 +REM xcopy /F /Y "%~1/gui/themes/translations.dat" %~2 1>NUL 2>&1 + +xcopy /F /Y "%~4/lib/%~3/SDL.dll" %~2 1>NUL 2>&1 +xcopy /F /Y "%~4/README-SDL" %~2 1>NUL 2>&1 + +xcopy /F /Y "%~1/backends/vkeybd/packs/vkeybd_default.zip" %~2 1>NUL 2>&1 if "%~5"=="0" goto done -- cgit v1.2.3 From a08158a004425afb89ca984379c6d27fa71e763b Mon Sep 17 00:00:00 2001 From: Littleboy Date: Fri, 13 May 2011 01:26:52 -0400 Subject: CREATE_PROJECT: Generate a default revision header when no revision can be determined --- devtools/create_project/scripts/revision.vbs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'devtools/create_project/scripts') diff --git a/devtools/create_project/scripts/revision.vbs b/devtools/create_project/scripts/revision.vbs index 3e1212521c..e6fef57030 100644 --- a/devtools/create_project/scripts/revision.vbs +++ b/devtools/create_project/scripts/revision.vbs @@ -80,6 +80,7 @@ Sub DetermineRevision() If Not DetermineGitVersion() Then If Not DetermineHgVersion() Then Wscript.StdErr.WriteLine "Could not determine the current revision, skipping..." + OutputRevisionHeader "" Exit Sub End If End If @@ -91,6 +92,7 @@ Sub DetermineRevision() If Not DetermineTortoiseSVNVersion() Then If Not DetermineSVNVersion() Then Wscript.StdErr.WriteLine "Could not determine the current revision, skipping..." + OutputRevisionHeader "" Exit Sub End If End If @@ -121,9 +123,13 @@ Sub DetermineRevision() Wscript.StdErr.WriteLine outputInfo & vbCrLf - ' Output revision header file + OutputRevisionHeader revisionString +End Sub + +' Output revision header file +Sub OutputRevisionHeader(str) FSO.CopyFile rootFolder & "\\base\\internal_revision.h.in", targetFolder & "\\internal_revision.h" - FindReplaceInFile targetFolder & "\\internal_revision.h", "@REVISION@", revisionString + FindReplaceInFile targetFolder & "\\internal_revision.h", "@REVISION@", str End Sub Function DetermineTortoiseSVNVersion() -- cgit v1.2.3 From c24f0775cd262c789f7d17ea0ed461c57e7c5f6e Mon Sep 17 00:00:00 2001 From: Littleboy Date: Fri, 13 May 2011 01:27:27 -0400 Subject: CREATE_PROJECT: Handle paths with spaces in pre/post-build scripts --- devtools/create_project/scripts/postbuild.cmd | 8 ++++---- devtools/create_project/scripts/prebuild.cmd | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'devtools/create_project/scripts') diff --git a/devtools/create_project/scripts/postbuild.cmd b/devtools/create_project/scripts/postbuild.cmd index 75a916db49..a5051d8228 100644 --- a/devtools/create_project/scripts/postbuild.cmd +++ b/devtools/create_project/scripts/postbuild.cmd @@ -37,16 +37,16 @@ REM xcopy /F /Y "%~1/dists/engine-data/*.cpt" %~2 1>NUL 2>&1 REM xcopy /F /Y "%~1/gui/themes/*.zip" %~2 1>NUL 2>&1 REM xcopy /F /Y "%~1/gui/themes/translations.dat" %~2 1>NUL 2>&1 -xcopy /F /Y "%~4/lib/%~3/SDL.dll" %~2 1>NUL 2>&1 -xcopy /F /Y "%~4/README-SDL" %~2 1>NUL 2>&1 +xcopy /F /Y "%~4/lib/%~3/SDL.dll" "%~2" 1>NUL 2>&1 +xcopy /F /Y "%~4/README-SDL" "%~2" 1>NUL 2>&1 -xcopy /F /Y "%~1/backends/vkeybd/packs/vkeybd_default.zip" %~2 1>NUL 2>&1 +xcopy /F /Y "%~1/backends/vkeybd/packs/vkeybd_default.zip" "%~2" 1>NUL 2>&1 if "%~5"=="0" goto done echo Running installer script echo. -@call cscript "%~1/devtools/create_project/scripts/installer.vbs" %~1 %~2 %~3 1>NUL +@call cscript "%~1/devtools/create_project/scripts/installer.vbs" "%~1" "%~2" "%~3" 1>NUL if not %errorlevel% == 0 goto error_script goto done diff --git a/devtools/create_project/scripts/prebuild.cmd b/devtools/create_project/scripts/prebuild.cmd index dd4d12a851..fbab426137 100644 --- a/devtools/create_project/scripts/prebuild.cmd +++ b/devtools/create_project/scripts/prebuild.cmd @@ -14,7 +14,7 @@ if "%~1"=="" goto error_root if "%~2"=="" goto error_target REM Run the revision script -@call cscript "%~1/devtools/create_project/scripts/revision.vbs" %~1 %~2 1>NUL +@call cscript "%~1/devtools/create_project/scripts/revision.vbs" "%~1" "%~2" 1>NUL if not %errorlevel% == 0 goto error_script goto done -- cgit v1.2.3