From 1c3a4f37352f9fe619c07df3998bd0ab6212d4fa Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 14 Apr 2011 20:48:16 +1000 Subject: CREDITS: Added TsAGE engine credits --- devtools/credits.pl | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'devtools') diff --git a/devtools/credits.pl b/devtools/credits.pl index 075d7b03db..648b0c0a5b 100755 --- a/devtools/credits.pl +++ b/devtools/credits.pl @@ -695,6 +695,11 @@ begin_credits("Credits"); add_person("Gregory Montoir", "cyx", ""); end_section(); + begin_section("TsAGE"); + add_person("Paul Gilbert", "dreammaster", ""); + add_person("Arnaud Boutonné", "Strangerke", ""); + end_section(); + begin_section("Tucker"); add_person("Gregory Montoir", "cyx", ""); end_section(); -- cgit v1.2.3 From 84184aabc00251374a181fe296487619afa779ed Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 14 Apr 2011 14:12:27 +0200 Subject: ALL: colour -> color --- devtools/create_lure/create_lure_dat.cpp | 2 +- devtools/create_lure/create_lure_dat.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'devtools') diff --git a/devtools/create_lure/create_lure_dat.cpp b/devtools/create_lure/create_lure_dat.cpp index ad883b808f..4964b26903 100644 --- a/devtools/create_lure/create_lure_dat.cpp +++ b/devtools/create_lure/create_lure_dat.cpp @@ -503,7 +503,7 @@ void read_hotspot_data(byte *&data, uint16 &totalSize) { r->tickSequenceOffset = entry.tickSequenceOffset; r->layer = entry.layer; - r->colourOffset = entry.colourOffset; + r->colorOffset = entry.colorOffset; r->hotspotScriptOffset = entry.hotspotScriptOffset; r->talkScriptOffset = entry.talkScriptOffset; r->flags = entry.flags; diff --git a/devtools/create_lure/create_lure_dat.h b/devtools/create_lure/create_lure_dat.h index 4743f6ac3f..23090072bd 100644 --- a/devtools/create_lure/create_lure_dat.h +++ b/devtools/create_lure/create_lure_dat.h @@ -125,7 +125,7 @@ struct HotspotResource { uint16 yCorrection; uint16 tickTimeout; uint16 animOffset; - byte colourOffset; + byte colorOffset; uint16 hotspotScriptOffset; byte unused1[7]; uint16 talkScriptOffset; @@ -166,7 +166,7 @@ struct HotspotResourceOutput { uint16 walkY; int8 talkX; int8 talkY; - uint16 colourOffset; + uint16 colorOffset; uint16 animRecordId; uint16 hotspotScriptOffset; uint16 talkScriptOffset; -- cgit v1.2.3 From ca7d1550e9afa16a36f7c6f8e6dd759e16277e24 Mon Sep 17 00:00:00 2001 From: strangerke Date: Sat, 16 Apr 2011 20:32:49 +0200 Subject: HUGO: Fix the typo in the PL file too... --- devtools/credits.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'devtools') diff --git a/devtools/credits.pl b/devtools/credits.pl index 648b0c0a5b..fc10f50bfb 100755 --- a/devtools/credits.pl +++ b/devtools/credits.pl @@ -1118,7 +1118,7 @@ begin_credits("Credits"); "freewaring the game."); add_paragraph( - "David P. Gray from Gray Design Associate for sharing the source code ". + "David P. Gray from Gray Design Associates for sharing the source code ". "of the Hugo trilogy."); add_paragraph( -- cgit v1.2.3 From 886ea29bbfe5556729843d97637ea9f691382ddc Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 17 Apr 2011 13:46:58 +0300 Subject: SCUMM: Add md5 from bug #3264965 for fbpack --- devtools/scumm-md5.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'devtools') diff --git a/devtools/scumm-md5.txt b/devtools/scumm-md5.txt index 60fc615057..e9e155925e 100644 --- a/devtools/scumm-md5.txt +++ b/devtools/scumm-md5.txt @@ -466,6 +466,7 @@ fbear Fatty Bear's Birthday Surprise fbpack Fatty Bear's Fun Pack e01acc8c12ef44e8f778fe87e5f90f4e -1 en 3DO - - - sev c9717ee6059f1e43b768b464493d2fba -1 jp 3DO - - - clone2727 + 4cfd3fda4a4e6e64a1fc488eba973b7a -1 en DOS - - - velocity37 f06e66fd45b2f8b0f4a2833ff4476050 -1 he DOS - - - sev freddi Freddi Fish 1: The Case of the Missing Kelp Seeds -- cgit v1.2.3 From 9990ae6aa0bca8e9713018dff83827d5f27c6a60 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 17 Apr 2011 14:21:49 +0100 Subject: CREDITS: Add buildbot skin to billwashere crontibutions --- devtools/credits.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'devtools') diff --git a/devtools/credits.pl b/devtools/credits.pl index fc10f50bfb..94f72617af 100755 --- a/devtools/credits.pl +++ b/devtools/credits.pl @@ -977,7 +977,7 @@ begin_credits("Credits"); add_person("David Jensen", "Tyst", "SVG logo conversion"); add_person("Jean Marc Gimenez", "", "ScummVM logo"); add_person("", "Raina", "ScummVM forum buttons"); - add_person("William Claydon", "billwashere", "Skins for doxygen and wiki"); + add_person("William Claydon", "billwashere", "Skins for doxygen, buildbot and wiki"); end_persons(); end_section(); -- cgit v1.2.3 From 1f660237a4c5b4e80af6515848e6cf0bcd7c74bc Mon Sep 17 00:00:00 2001 From: Littleboy Date: Fri, 22 Apr 2011 14:10:14 -0400 Subject: CREATE_PROJECT: Change build events to also be run in release builds Unofficial builds using MSVC in release mode will benefit from having a revision number available --- devtools/create_project/msbuild.cpp | 11 ++++------- devtools/create_project/visualstudio.cpp | 34 ++++++++++++++++++-------------- 2 files changed, 23 insertions(+), 22 deletions(-) (limited to 'devtools') diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp index 73511218b4..070d7fea60 100644 --- a/devtools/create_project/msbuild.cpp +++ b/devtools/create_project/msbuild.cpp @@ -267,13 +267,10 @@ void MSBuildProvider::outputProjectSettings(std::ofstream &project, const std::s "\t\t\n"; if (setup.runBuildEvents) { - // Only generate revision number in debug builds - if (!isRelease) { - project << "\t\t\n" - "\t\t\tGenerate internal_version.h\n" - "\t\t\t" << getPreBuildEvent() << "\n" - "\t\t\n"; - } + project << "\t\t\n" + "\t\t\tGenerate internal_version_build.h\n" + "\t\t\t" << getPreBuildEvent() << "\n" + "\t\t\n"; // Copy data files to the build folder project << "\t\t\n" diff --git a/devtools/create_project/visualstudio.cpp b/devtools/create_project/visualstudio.cpp index 2b7c8908cb..390d0fba1f 100644 --- a/devtools/create_project/visualstudio.cpp +++ b/devtools/create_project/visualstudio.cpp @@ -57,13 +57,24 @@ int VisualStudioProvider::getVisualStudioVersion() { error("Unsupported version passed to createScummVMSolution"); } -#define OUTPUT_CONFIGURATION_SCUMMVM(config, platform, props) { \ +#define OUTPUT_BUILD_EVENTS(isWin32) \ + if (setup.runBuildEvents) { \ + project << "\t\t\t\n" \ + "\t\t\t\n"; \ + } + +#define OUTPUT_CONFIGURATION_SCUMMVM(config, platform, props, isWin32) { \ project << "\t\t\n" \ "\t\t\t\n" \ "\t\t\t\n" \ - "\t\t\n"; \ + "\t\t\t/>\n"; \ + OUTPUT_BUILD_EVENTS(isWin32) \ + project << "\t\t\n"; \ } #define OUTPUT_CONFIGURATION_SCUMMVM_DEBUG(config, platform, props, isWin32) { \ @@ -72,14 +83,7 @@ int VisualStudioProvider::getVisualStudioVersion() { "\t\t\t\n"; \ - if (setup.runBuildEvents) { \ - project << "\t\t\t\n" \ - "\t\t\t\n"; \ - } \ + OUTPUT_BUILD_EVENTS(isWin32) \ project << "\t\t\n"; \ } @@ -127,15 +131,15 @@ void VisualStudioProvider::createProjectFile(const std::string &name, const std: // Win32 OUTPUT_CONFIGURATION_SCUMMVM_DEBUG("Debug", "Win32", "", true); OUTPUT_CONFIGURATION_SCUMMVM_DEBUG("Analysis", "Win32", "", true); - OUTPUT_CONFIGURATION_SCUMMVM("Release", "Win32", ""); + OUTPUT_CONFIGURATION_SCUMMVM("Release", "Win32", "", true); // x64 // For 'x64' we must disable NASM support. Usually we would need to disable the "nasm" feature for that and // re-create the library list, BUT since NASM doesn't link any additional libraries, we can just use the // libraries list created for IA-32. If that changes in the future, we need to adjust this part! - OUTPUT_CONFIGURATION_SCUMMVM_DEBUG("Debug", "x64", "64", true); - OUTPUT_CONFIGURATION_SCUMMVM_DEBUG("Analysis", "x64", "64", true); - OUTPUT_CONFIGURATION_SCUMMVM("Release", "x64", "64"); + OUTPUT_CONFIGURATION_SCUMMVM_DEBUG("Debug", "x64", "64", false); + OUTPUT_CONFIGURATION_SCUMMVM_DEBUG("Analysis", "x64", "64", false); + OUTPUT_CONFIGURATION_SCUMMVM("Release", "x64", "64", false); } else { std::string warnings = ""; -- cgit v1.2.3 From bfe0b5f41d048da2eb555aad2b6eece1bca82397 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 24 Apr 2011 14:35:12 +0100 Subject: DRASCULA: Update German subtitles for Von Braun cutscene. The first string of the old subtitles was too long. --- devtools/create_drascula/staticdata.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'devtools') diff --git a/devtools/create_drascula/staticdata.h b/devtools/create_drascula/staticdata.h index 51ed995884..f45af487b1 100644 --- a/devtools/create_drascula/staticdata.h +++ b/devtools/create_drascula/staticdata.h @@ -6041,7 +6041,7 @@ const char *_texthis[NUM_LANGS][NUM_TEXTHIS] = { }, { "", - "Vor einer langen Zeit scheint Drascula Von Brauns Frau getoetet zu haben und als Von Braun sich dann den Grafen vorknoepfen wollte, begann er damit, alles, was er ueber Vampire finden konnte, in Erfahrung zu bringen.", + "Vor langer Zeit scheint Drascula Von Brauns Frau getoetet zu haben. Um sich den Grafen vorzuknoepfen, fing Von Braun an, alles, was er ueber Vampire finden konnte, in Erfahrung zu bringen.", "Als er glaubte, er sei bereit, ging er hoch zum Schloss und hatte eine aeusserst gewaltsame Auseinandersetzung mit Drascula.", "Niemand weiss, was genau dort passierte. Obwohl Von Braun verlor, konnte Drascula ihn nicht toeten.", "Von Braun fuehlte sich durch seine Niederlage gedemuetigt. Er rannte vom Schloss fort und wagte es nie wieder, Drascula gegenueberzutreten." -- cgit v1.2.3 From 11b907ebf45f5a0707c2748b8f7413b2910976a8 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Sun, 24 Apr 2011 12:34:57 -0400 Subject: CREATE_PROJECT: Update revision number support (fixes bug #3280881) Replace existing environment variable based revision number support by a file-based method - Generate a special header file in the build output folder with the current revision number - Include the new header file from internal_version.h when a specific define is set - Update create_project to define SCUMMVM_INTERNAL_REVISION as needed and add the build output folder to the include path - Remove support for git-svn clones in the revision script (not useful anymore after the switch to git) --- devtools/create_project/msbuild.cpp | 11 +++-- devtools/create_project/msbuild.h | 2 +- devtools/create_project/msvc.cpp | 6 +-- devtools/create_project/msvc.h | 3 +- devtools/create_project/scripts/postbuild.cmd | 4 +- devtools/create_project/scripts/prebuild.cmd | 16 +++++-- devtools/create_project/scripts/revision.vbs | 69 ++++++++++++++------------- devtools/create_project/visualstudio.cpp | 8 +++- devtools/create_project/visualstudio.h | 2 +- 9 files changed, 68 insertions(+), 53 deletions(-) (limited to 'devtools') diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp index 070d7fea60..1198ff9a09 100644 --- a/devtools/create_project/msbuild.cpp +++ b/devtools/create_project/msbuild.cpp @@ -283,7 +283,7 @@ void MSBuildProvider::outputProjectSettings(std::ofstream &project, const std::s project << "\t\n"; } -void MSBuildProvider::outputGlobalPropFile(std::ofstream &properties, int bits, const StringList &defines, const std::string &prefix) { +void MSBuildProvider::outputGlobalPropFile(std::ofstream &properties, int bits, const StringList &defines, const std::string &prefix, bool runBuildEvents) { std::string warnings; for (StringList::const_iterator i = _globalWarnings.begin(); i != _globalWarnings.end(); ++i) @@ -293,6 +293,10 @@ void MSBuildProvider::outputGlobalPropFile(std::ofstream &properties, int bits, for (StringList::const_iterator i = defines.begin(); i != defines.end(); ++i) definesList += *i + ';'; + // Add define to include revision header + if (runBuildEvents) + definesList += "SCUMMVM_INTERNAL_REVISION;"; + properties << "\n" "\n" "\t\n" @@ -308,7 +312,7 @@ void MSBuildProvider::outputGlobalPropFile(std::ofstream &properties, int bits, "\t\t\n" "\t\t\ttrue\n" "\t\t\t" << warnings << ";%(DisableSpecificWarnings)\n" - "\t\t\t$(SCUMMVM_LIBS)\\include;" << prefix << ";" << prefix << "\\engines;%(AdditionalIncludeDirectories)\n" + "\t\t\t$(SCUMMVM_LIBS)\\include;" << prefix << ";" << prefix << "\\engines;$(TargetDir);%(AdditionalIncludeDirectories)\n" "\t\t\t" << definesList << "%(PreprocessorDefinitions)\n" "\t\t\t\n" "\t\t\tfalse\n" @@ -436,9 +440,6 @@ void MSBuildProvider::writeFileListToProject(const FileNode &dir, std::ofstream projectFile << "\t\t\n" "\t\t\t$(IntDir)" << (*entry).prefix << "%(Filename).obj\n"; - if (hasEnding((*entry).path, "base\\version.cpp")) - projectFile << "\t\t\tSCUMMVM_REVISION#" $(SCUMMVM_REVISION_STRING)";%(PreprocessorDefinitions)\n"; - projectFile << "\t\t\n"; } else { projectFile << "\t\t\n"; diff --git a/devtools/create_project/msbuild.h b/devtools/create_project/msbuild.h index fa5311734b..cc545e4755 100644 --- a/devtools/create_project/msbuild.h +++ b/devtools/create_project/msbuild.h @@ -45,7 +45,7 @@ protected: void writeReferences(std::ofstream &output); - void outputGlobalPropFile(std::ofstream &properties, int bits, const StringList &defines, const std::string &prefix); + void outputGlobalPropFile(std::ofstream &properties, int bits, const StringList &defines, const std::string &prefix, bool runBuildEvents); void createBuildProp(const BuildSetup &setup, bool isRelease, bool isWin32, bool enableAnalysis); diff --git a/devtools/create_project/msvc.cpp b/devtools/create_project/msvc.cpp index e2fff59c46..ccdf4ac82b 100644 --- a/devtools/create_project/msvc.cpp +++ b/devtools/create_project/msvc.cpp @@ -124,7 +124,7 @@ void MSVCProvider::createGlobalProp(const BuildSetup &setup) { if (!properties) error("Could not open \"" + setup.outputDir + '/' + "ScummVM_Global" + getPropertiesExtension() + "\" for writing"); - outputGlobalPropFile(properties, 32, setup.defines, convertPathToWin(setup.filePrefix)); + outputGlobalPropFile(properties, 32, setup.defines, convertPathToWin(setup.filePrefix), setup.runBuildEvents); properties.close(); properties.open((setup.outputDir + '/' + "ScummVM_Global64" + getPropertiesExtension()).c_str()); @@ -143,7 +143,7 @@ void MSVCProvider::createGlobalProp(const BuildSetup &setup) { x64Defines.push_back("WIN32"); x64Defines.push_back("SDL_BACKEND"); - outputGlobalPropFile(properties, 64, x64Defines, convertPathToWin(setup.filePrefix)); + outputGlobalPropFile(properties, 64, x64Defines, convertPathToWin(setup.filePrefix), setup.runBuildEvents); } std::string MSVCProvider::getPreBuildEvent() const { @@ -152,7 +152,7 @@ std::string MSVCProvider::getPreBuildEvent() const { cmdLine = "@echo off\n" "echo Executing Pre-Build script...\n" "echo.\n" - "@call "$(SolutionDir)../../devtools/create_project/scripts/prebuild.cmd" "$(SolutionDir)/../.."\n" + "@call "$(SolutionDir)../../devtools/create_project/scripts/prebuild.cmd" "$(SolutionDir)/../.." "$(TargetDir)"\n" "EXIT /B0"; return cmdLine; diff --git a/devtools/create_project/msvc.h b/devtools/create_project/msvc.h index f41ecc3aba..b2f2a5d33f 100644 --- a/devtools/create_project/msvc.h +++ b/devtools/create_project/msvc.h @@ -59,8 +59,9 @@ protected: * @param bits Number of bits the platform supports. * @param defines Defines the platform needs to have set. * @param prefix File prefix, used to add additional include paths. + * @param runBuildEvents true if generating a revision number, false otherwise */ - virtual void outputGlobalPropFile(std::ofstream &properties, int bits, const StringList &defines, const std::string &prefix) = 0; + virtual void outputGlobalPropFile(std::ofstream &properties, int bits, const StringList &defines, const std::string &prefix, bool runBuildEvents) = 0; /** * Generates the project properties for debug and release settings. diff --git a/devtools/create_project/scripts/postbuild.cmd b/devtools/create_project/scripts/postbuild.cmd index 5c2bd8a1ad..f548b81442 100644 --- a/devtools/create_project/scripts/postbuild.cmd +++ b/devtools/create_project/scripts/postbuild.cmd @@ -12,7 +12,7 @@ REM Root folder REM Output folder REM Architecture -if "%~1"=="" goto error_input +if "%~1"=="" goto error_root if "%~2"=="" goto error_output if "%~3"=="" goto error_arch @@ -29,7 +29,7 @@ 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 +:error_root echo Invalid root folder (%~1)! goto done diff --git a/devtools/create_project/scripts/prebuild.cmd b/devtools/create_project/scripts/prebuild.cmd index b824f0d5a0..dd4d12a851 100644 --- a/devtools/create_project/scripts/prebuild.cmd +++ b/devtools/create_project/scripts/prebuild.cmd @@ -4,22 +4,28 @@ REM --------------------------------------------------------------- REM -- Pre-Build Script REM --------------------------------------------------------------- REM -REM Generate file with proper revision number +REM Generate file with revision number REM REM Expected parameters -REM Root folder +REM Root folder (the source root folder) +REM Target folder (the build output folder, will be used to copy internal_revision.h) -if "%~1"=="" goto error_input +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 1>NUL +@call cscript "%~1/devtools/create_project/scripts/revision.vbs" %~1 %~2 1>NUL if not %errorlevel% == 0 goto error_script goto done -:error_output +:error_root echo Invalid root folder (%~1)! goto done +:error_target +echo Invalid target folder (%~2)! +goto done + :error_script: echo An error occured while running the revision script! diff --git a/devtools/create_project/scripts/revision.vbs b/devtools/create_project/scripts/revision.vbs index 851185371b..9c29a88f2d 100644 --- a/devtools/create_project/scripts/revision.vbs +++ b/devtools/create_project/scripts/revision.vbs @@ -35,6 +35,7 @@ Dim WshShell : Set WshShell = CreateObject("WScript.Shell") ' Folders Dim rootFolder : rootFolder = "" +Dim targetFolder : targetFolder = "" ' Info variables Dim tool : tool = "" @@ -85,23 +86,25 @@ Sub DetermineRevision() Wscript.StdErr.WriteLine "Found revision " & revision & " on branch " & branch & vbCrLf ' Setup our revision string - Dim revisionString : revisionString = "r" & revision + Dim revisionString : revisionString = revision If (modified) Then - revisionString = revisionString & " M" + revisionString = revisionString & "-dirty" End If ' If we are not on trunk, add the branch name to the revision string - If (branch <> "trunk" And branch <> "") Then - revisionString = revisionString & " (" & branch & ")" + If (branch <> "trunk" And branch <> "master" And branch <> "") Then + revisionString = revisionString & "(" & branch & ")" End If - ' Add the DVCS name at the end - revisionString = revisionString & " - " & tool + ' Add the DVCS name at the end (when not git) + If (tool <> "git") Then + revisionString = revisionString & "-" & tool + End If - ' Setup an environment variable with the revision string - Dim Env: Set Env = WshShell.Environment("User") - Env.item("SCUMMVM_REVISION_STRING") = revisionString + ' Output revision header file + FSO.CopyFile rootFolder & "\\base\\internal_revision.h.in", targetFolder & "\\internal_revision.h" + FindReplaceInFile targetFolder & "\\internal_revision.h", "@REVISION@", revisionString End Sub Function DetermineTortoiseSVNVersion() @@ -283,29 +286,9 @@ Function DetermineGitVersion() End If End If - ' Check for svn clones - Set oExec = WshShell.Exec(gitPath & "log --pretty=format:%s --grep=" & Chr(34) & "^(svn r[0-9]*)" & Chr(34) & " -1 " & rootFolder) - if Err.Number = 0 Then - revision = Mid(oExec.StdOut.ReadLine(), 7) - revision = Mid(revision, 1, InStr(revision, ")") - 1) - tool = "svn-git" - End If - - ' No revision? Maybe it is a custom git-svn clone - If revision = "" Then - Err.Clear - Set oExec = WshShell.Exec(gitPath & "log --pretty=format:%b --grep=" & Chr(34) & "git-svn-id:.*@[0-9]*" & Chr(34) & " -1 " & rootFolder) - If Err.Number = 0 Then - revision = oExec.StdOut.ReadLine() - revision = Mid(revision, InStr(revision, "@") + 1) - revision = Mid(revision, 1, InStr(revision, " ") - 1) - tool = "svn-git" - End If - End If - ' Fallback to abbreviated revision number If revision = "" Then - revision = Mid(hash, 1, 8) + revision = Mid(hash, 1, 7) End If DetermineGitVersion = True @@ -385,8 +368,8 @@ End Function Function ParseCommandLine() ParseCommandLine = True - If Wscript.Arguments.Count <> 1 Then - Wscript.StdErr.WriteLine "[Error] Invalid number of arguments (was: " & Wscript.Arguments.Count & ", expected: 1)" + If Wscript.Arguments.Count <> 2 Then + Wscript.StdErr.WriteLine "[Error] Invalid number of arguments (was: " & Wscript.Arguments.Count & ", expected: 2)" ParseCommandLine = False Exit Function @@ -394,6 +377,7 @@ Function ParseCommandLine() ' Get our arguments rootFolder = Wscript.Arguments.Item(0) + targetFolder = Wscript.Arguments.Item(1) ' Check that the folders are valid If Not FSO.FolderExists(rootFolder) Then @@ -403,8 +387,16 @@ Function ParseCommandLine() Exit Function End If - ' Set absolute path + If Not FSO.FolderExists(targetFolder) Then + Wscript.StdErr.WriteLine "[Error] Invalid target folder (" & targetFolder & ")" + + ParseCommandLine = False + Exit Function + End If + + ' Set absolute paths rootFolder = FSO.GetAbsolutePathName(rootFolder) + targetFolder = FSO.GetAbsolutePathName(targetFolder) End Function Function ReadRegistryKey(shive, subkey, valuename, architecture) @@ -443,3 +435,14 @@ Function ReadRegistryKey(shive, subkey, valuename, architecture) ReadRegistryKey = Outparams.SValue End Function + +Sub FindReplaceInFile(filename, to_find, replacement) + Dim file, data + Set file = FSO.OpenTextFile(filename, 1, 0, 0) + data = file.ReadAll + file.Close + data = Replace(data, to_find, replacement) + Set file = FSO.CreateTextFile(filename, -1, 0) + file.Write data + file.Close +End Sub diff --git a/devtools/create_project/visualstudio.cpp b/devtools/create_project/visualstudio.cpp index 390d0fba1f..41693dcc3a 100644 --- a/devtools/create_project/visualstudio.cpp +++ b/devtools/create_project/visualstudio.cpp @@ -193,7 +193,7 @@ void VisualStudioProvider::writeReferences(std::ofstream &output) { output << "\tEndProjectSection\n"; } -void VisualStudioProvider::outputGlobalPropFile(std::ofstream &properties, int bits, const StringList &defines, const std::string &prefix) { +void VisualStudioProvider::outputGlobalPropFile(std::ofstream &properties, int bits, const StringList &defines, const std::string &prefix, bool runBuildEvents) { std::string warnings; for (StringList::const_iterator i = _globalWarnings.begin(); i != _globalWarnings.end(); ++i) warnings += *i + ';'; @@ -205,6 +205,10 @@ void VisualStudioProvider::outputGlobalPropFile(std::ofstream &properties, int b definesList += *i; } + // Add define to include revision header + if (runBuildEvents) + definesList += "SCUMMVM_INTERNAL_REVISION;"; + properties << "\n" " @@ -34,20 +35,20 @@ CodeBlocksProvider::CodeBlocksProvider(StringList &global_warnings, std::map\n" "\n"; - workspace << "\t\n"; + workspace << "\t\n"; writeReferences(workspace); // Note we assume that the UUID map only includes UUIDs for enabled engines! for (UUIDMap::const_iterator i = _uuidMap.begin(); i != _uuidMap.end(); ++i) { - if (i->first == "scummvm") + if (i->first == PROJECT_NAME) continue; workspace << "\t\tfirst << ".cbp\" />\n"; @@ -59,7 +60,7 @@ void CodeBlocksProvider::createWorkspace(const BuildSetup &setup) { // HACK We need to pre-process library names // since the MSVC and mingw precompiled -// librarie have different names :( +// libraries have different names :( std::string processLibraryName(std::string name) { // Remove "_static" in lib name size_t pos = name.find("_static"); @@ -90,16 +91,16 @@ void CodeBlocksProvider::createProjectFile(const std::string &name, const std::s "\t\t