mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 12:39:56 +00:00
MSVC: Update DLL paths in post-build script
This commit is contained in:
parent
3091345af3
commit
e6a80868c6
@ -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"
|
||||
|
@ -188,7 +188,7 @@ std::string MSVCProvider::getTestPreBuildEvent(const BuildSetup &setup) const {
|
||||
return ""$(SolutionDir)../../test/cxxtest/cxxtestgen.py" --runner=ParenPrinter --no-std --no-eh -o "$(SolutionDir)test_runner.cpp"" + 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 "$(SolutionDir)../../devtools/create_project/scripts/postbuild.cmd" "$(SolutionDir)/../.." "$(OutDir)" ";
|
||||
|
||||
cmdLine += (isWin32) ? "x86" : "x64";
|
||||
cmdLine += (setup.useSDL2) ? "SDL2" : "SDL";
|
||||
|
||||
cmdLine += " "%" LIBS_DEFINE "%" ";
|
||||
cmdLine += " "%" LIBS_DEFINE "%/lib/";
|
||||
cmdLine += (isWin32) ? "x86" : "x64";
|
||||
cmdLine += "/$(Configuration)" ";
|
||||
|
||||
// Specify if installer needs to be built or not
|
||||
cmdLine += (createInstaller ? "1" : "0");
|
||||
cmdLine += (setup.createInstaller ? "1" : "0");
|
||||
|
||||
cmdLine += "\n"
|
||||
"EXIT /B0";
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user