aboutsummaryrefslogtreecommitdiff
path: root/devtools/create_project
diff options
context:
space:
mode:
authorSupSuper2018-12-19 20:47:51 +0000
committerFilippos Karapetis2018-12-23 18:39:06 +0200
commite6a80868c64bf9dbefa786686b0257fef7a8f2ef (patch)
tree62020736dd95dc9949f25e8a91edb2585609cb71 /devtools/create_project
parent3091345af36b879bb1f34fc3862fa596cf92d57d (diff)
downloadscummvm-rg350-e6a80868c64bf9dbefa786686b0257fef7a8f2ef.tar.gz
scummvm-rg350-e6a80868c64bf9dbefa786686b0257fef7a8f2ef.tar.bz2
scummvm-rg350-e6a80868c64bf9dbefa786686b0257fef7a8f2ef.zip
MSVC: Update DLL paths in post-build script
Diffstat (limited to 'devtools/create_project')
-rw-r--r--devtools/create_project/msbuild.cpp2
-rw-r--r--devtools/create_project/msvc.cpp10
-rw-r--r--devtools/create_project/msvc.h6
-rw-r--r--devtools/create_project/scripts/postbuild.cmd16
-rw-r--r--devtools/create_project/visualstudio.cpp2
5 files changed, 19 insertions, 17 deletions
diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp
index 2c276d5c9a..58efa88768 100644
--- a/devtools/create_project/msbuild.cpp
+++ b/devtools/create_project/msbuild.cpp
@@ -339,7 +339,7 @@ void MSBuildProvider::outputProjectSettings(std::ofstream &project, const std::s
// Copy data files to the build folder
project << "\t\t<PostBuildEvent>\n"
"\t\t\t<Message>Copy data files to the build folder</Message>\n"
- "\t\t\t<Command>" << getPostBuildEvent(isWin32, setup.createInstaller) << "</Command>\n"
+ "\t\t\t<Command>" << getPostBuildEvent(isWin32, setup) << "</Command>\n"
"\t\t</PostBuildEvent>\n";
} else if (setup.tests) {
project << "\t\t<PreBuildEvent>\n"
diff --git a/devtools/create_project/msvc.cpp b/devtools/create_project/msvc.cpp
index 1912b8df6c..1ca8c7f230 100644
--- a/devtools/create_project/msvc.cpp
+++ b/devtools/create_project/msvc.cpp
@@ -188,7 +188,7 @@ std::string MSVCProvider::getTestPreBuildEvent(const BuildSetup &setup) const {
return "&quot;$(SolutionDir)../../test/cxxtest/cxxtestgen.py&quot; --runner=ParenPrinter --no-std --no-eh -o &quot;$(SolutionDir)test_runner.cpp&quot;" + target;
}
-std::string MSVCProvider::getPostBuildEvent(bool isWin32, bool createInstaller) const {
+std::string MSVCProvider::getPostBuildEvent(bool isWin32, const BuildSetup &setup) const {
std::string cmdLine = "";
cmdLine = "@echo off\n"
@@ -196,12 +196,14 @@ std::string MSVCProvider::getPostBuildEvent(bool isWin32, bool createInstaller)
"echo.\n"
"@call &quot;$(SolutionDir)../../devtools/create_project/scripts/postbuild.cmd&quot; &quot;$(SolutionDir)/../..&quot; &quot;$(OutDir)&quot; ";
- cmdLine += (isWin32) ? "x86" : "x64";
+ cmdLine += (setup.useSDL2) ? "SDL2" : "SDL";
- cmdLine += " &quot;%" LIBS_DEFINE "%&quot; ";
+ cmdLine += " &quot;%" LIBS_DEFINE "%/lib/";
+ cmdLine += (isWin32) ? "x86" : "x64";
+ cmdLine += "/$(Configuration)&quot; ";
// Specify if installer needs to be built or not
- cmdLine += (createInstaller ? "1" : "0");
+ cmdLine += (setup.createInstaller ? "1" : "0");
cmdLine += "\n"
"EXIT /B0";
diff --git a/devtools/create_project/msvc.h b/devtools/create_project/msvc.h
index b25d030483..ce228b8e95 100644
--- a/devtools/create_project/msvc.h
+++ b/devtools/create_project/msvc.h
@@ -104,12 +104,12 @@ protected:
/**
* Get the command line for copying data files to the build directory.
*
- * @param isWin32 Bitness of property file.
- * @param createInstaller true to create installer
+ * @param isWin32 Bitness of property file.
+ * @param setup Description of the desired build setup.
*
* @return The post build event.
*/
- std::string getPostBuildEvent(bool isWin32, bool createInstaller) const;
+ std::string getPostBuildEvent(bool isWin32, const BuildSetup &setup) const;
};
} // End of CreateProjectTool namespace
diff --git a/devtools/create_project/scripts/postbuild.cmd b/devtools/create_project/scripts/postbuild.cmd
index e30d662eb7..e2ea412663 100644
--- a/devtools/create_project/scripts/postbuild.cmd
+++ b/devtools/create_project/scripts/postbuild.cmd
@@ -4,27 +4,27 @@ REM ---------------------------------------------------------------
REM -- Post-Build Script
REM ---------------------------------------------------------------
REM
-REM Copy engine data, themes, translation and required dlls to the
+REM Copy engine data and required dlls to the
REM output folder and optionally create an installer
REM
REM Expected parameters
REM Root folder
REM Output folder
-REM Architecture
+REM SDL version
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 "%~3"=="" goto error_sdl
if "%~4"=="" goto error_libs
if "%~5"=="" goto error_installer
echo Copying data files
echo.
-xcopy /F /Y "%~4/lib/%~3/SDL.dll" "%~2" 1>NUL 2>&1
-xcopy /F /Y "%~4/lib/%~3/freetype6.dll" "%~2" 1>NUL 2>&1
+xcopy /F /Y "%~4/%~3.dll" "%~2" 1>NUL 2>&1
+xcopy /F /Y "%~4/WinSparkle.dll" "%~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_small.zip" "%~2" 1>NUL 2>&1
@@ -33,7 +33,7 @@ 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" 1>NUL
if not %errorlevel% == 0 goto error_script
goto done
@@ -45,8 +45,8 @@ goto done
echo Invalid output folder (%~2)!
goto done
-:error_arch
-echo Invalid arch parameter (was: %~3, allowed: x86, x64)!
+:error_sdl
+echo Invalid SDL parameter (was: %~3, allowed: SDL, SDL2)!
goto done
:error_libs
diff --git a/devtools/create_project/visualstudio.cpp b/devtools/create_project/visualstudio.cpp
index 40daad6bc8..110e643bbd 100644
--- a/devtools/create_project/visualstudio.cpp
+++ b/devtools/create_project/visualstudio.cpp
@@ -171,7 +171,7 @@ void VisualStudioProvider::outputBuildEvents(std::ostream &project, const BuildS
"\t\t\t\tCommandLine=\"" << getPreBuildEvent() << "\"\n"
"\t\t\t/>\n"
"\t\t\t<Tool\tName=\"VCPostBuildEventTool\"\n"
- "\t\t\t\tCommandLine=\"" << getPostBuildEvent(isWin32, setup.createInstaller) << "\"\n"
+ "\t\t\t\tCommandLine=\"" << getPostBuildEvent(isWin32, setup) << "\"\n"
"\t\t\t/>\n";
}