mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 05:13:58 -07:00
Adapt the build infrastructure to VS2022
This commit is contained in:
parent
ef69c37f66
commit
aca798b318
5 changed files with 24 additions and 39 deletions
|
|
@ -18,7 +18,7 @@
|
|||
// This pipeline is used to generate the nightly builds.
|
||||
|
||||
def visualStudioPath = '"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\MSBuild.exe"'
|
||||
def buildOptions = '/p:PlatformToolset=v141_xp /p:XPDeprecationWarning=false /t:pyrogenesis /t:AtlasUI %JOBS% /nologo -clp:Warningsonly -clp:ErrorsOnly'
|
||||
def buildOptions = '/p:PlatformToolset=v143 /t:pyrogenesis /t:AtlasUI %JOBS% /nologo -clp:Warningsonly -clp:ErrorsOnly'
|
||||
|
||||
def gitHash = ''
|
||||
def buildSPIRV = false
|
||||
|
|
@ -66,15 +66,15 @@ pipeline {
|
|||
stage('Pre-build') {
|
||||
steps {
|
||||
bat 'cd libraries && get-windows-libs.bat'
|
||||
bat '(robocopy E:\\wxWidgets-3.2.6\\lib libraries\\win32\\wxwidgets\\lib /MIR /NDL /NJH /NJS /NP /NS /NC) ^& IF %ERRORLEVEL% LEQ 1 exit 0'
|
||||
bat '(robocopy E:\\wxWidgets-3.2.6\\include libraries\\win32\\wxwidgets\\include /MIR /NDL /NJH /NJS /NP /NS /NC) ^& IF %ERRORLEVEL% LEQ 1 exit 0'
|
||||
bat '(robocopy E:\\wxWidgets-3.2.8\\lib libraries\\win32\\wxwidgets\\lib /MIR /NDL /NJH /NJS /NP /NS /NC) ^& IF %ERRORLEVEL% LEQ 1 exit 0'
|
||||
bat '(robocopy E:\\wxWidgets-3.2.8\\include libraries\\win32\\wxwidgets\\include /MIR /NDL /NJH /NJS /NP /NS /NC) ^& IF %ERRORLEVEL% LEQ 1 exit 0'
|
||||
bat 'cd build\\workspaces && update-workspaces.bat --without-pch --without-tests'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build') {
|
||||
steps {
|
||||
bat("cd build\\workspaces\\vs2017 && ${visualStudioPath} pyrogenesis.sln /p:Configuration=Release ${buildOptions}")
|
||||
bat("cd build\\workspaces\\vs2022 && ${visualStudioPath} pyrogenesis.sln /p:Configuration=Release ${buildOptions}")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -97,7 +97,7 @@ pipeline {
|
|||
/XF .gitattributes ^
|
||||
/XF .gitignore ^
|
||||
/XD %cd%\\binaries\\system ^
|
||||
/XD %cd%\\build\\workspaces\\vs2017 ^
|
||||
/XD %cd%\\build\\workspaces\\vs2022 ^
|
||||
/XD %cd%\\libraries\\source\\.svn ^
|
||||
/XD %cd%\\libraries\\win32\\.svn ^
|
||||
/XD %cd%\\libraries\\win32\\wxwidgets\\include ^
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
// This pipeline is used to generate patched releases, suitable to be bundled and distributed.
|
||||
|
||||
def visualStudioPath = '"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\MSBuild.exe"'
|
||||
def buildOptions = '/p:PlatformToolset=v141_xp /p:XPDeprecationWarning=false /t:pyrogenesis /t:AtlasUI %JOBS% /nologo -clp:Warningsonly -clp:ErrorsOnly'
|
||||
def buildOptions = '/p:PlatformToolset=v143 /t:pyrogenesis /t:AtlasUI %JOBS% /nologo -clp:Warningsonly -clp:ErrorsOnly'
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
|
|
@ -59,10 +59,10 @@ pipeline {
|
|||
unstash 'build_version'
|
||||
bat 'cd libraries && get-windows-libs.bat'
|
||||
|
||||
bat '(robocopy E:\\wxWidgets-3.2.6\\lib libraries\\win32\\wxwidgets\\lib /MIR /NDL /NJH /NJS /NP /NS /NC) ^& IF %ERRORLEVEL% LEQ 1 exit 0'
|
||||
bat '(robocopy E:\\wxWidgets-3.2.6\\include libraries\\win32\\wxwidgets\\include /MIR /NDL /NJH /NJS /NP /NS /NC) ^& IF %ERRORLEVEL% LEQ 1 exit 0'
|
||||
bat '(robocopy E:\\wxWidgets-3.2.8\\lib libraries\\win32\\wxwidgets\\lib /MIR /NDL /NJH /NJS /NP /NS /NC) ^& IF %ERRORLEVEL% LEQ 1 exit 0'
|
||||
bat '(robocopy E:\\wxWidgets-3.2.8\\include libraries\\win32\\wxwidgets\\include /MIR /NDL /NJH /NJS /NP /NS /NC) ^& IF %ERRORLEVEL% LEQ 1 exit 0'
|
||||
bat 'cd build\\workspaces && update-workspaces.bat --without-pch --without-tests'
|
||||
bat "cd build\\workspaces\\vs2017 && ${visualStudioPath} pyrogenesis.sln /p:Configuration=Release ${buildOptions}"
|
||||
bat "cd build\\workspaces\\vs2022 && ${visualStudioPath} pyrogenesis.sln /p:Configuration=Release ${buildOptions}"
|
||||
|
||||
script {
|
||||
def modifiedFiles = bat(script:'@svn status', returnStdout: true).split('\n').collect { l -> l.drop(8).trim() }.join(', ')
|
||||
|
|
|
|||
|
|
@ -15,10 +15,10 @@
|
|||
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// This pipeline builds the game on Windows (with the MSVC 15.0 compiler) and runs tests.
|
||||
// This pipeline builds the game on Windows (with the Visual Studio 2022 / 17.x compiler) and runs tests.
|
||||
|
||||
def visualStudioPath = 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\MSBuild.exe'
|
||||
def buildOptions = '/p:PlatformToolset=v141_xp /p:XPDeprecationWarning=false /t:pyrogenesis /t:AtlasUI /t:test /nologo -clp:NoSummary'
|
||||
def buildOptions = '/p:PlatformToolset=v143 /t:pyrogenesis /t:AtlasUI /t:test /nologo -clp:NoSummary'
|
||||
|
||||
def getHOSTTYPE(String arch) {
|
||||
return arch == 'win64' ? 'amd64' : 'x86'
|
||||
|
|
@ -91,14 +91,14 @@ pipeline {
|
|||
bat 'cd libraries && get-windows-libs.bat'
|
||||
}
|
||||
}
|
||||
bat "(robocopy /MIR /NDL /NJH /NJS /NP /NS /NC E:\\wxWidgets-3.2.6\\lib libraries\\${ARCH}\\wxwidgets\\lib) ^& IF %ERRORLEVEL% LEQ 1 exit 0"
|
||||
bat "(robocopy /MIR /NDL /NJH /NJS /NP /NS /NC E:\\wxWidgets-3.2.6\\include libraries\\${ARCH}\\wxwidgets\\include) ^& IF %ERRORLEVEL% LEQ 1 exit 0"
|
||||
bat "(robocopy /MIR /NDL /NJH /NJS /NP /NS /NC E:\\wxWidgets-3.2.8\\lib libraries\\${ARCH}\\wxwidgets\\lib) ^& IF %ERRORLEVEL% LEQ 1 exit 0"
|
||||
bat "(robocopy /MIR /NDL /NJH /NJS /NP /NS /NC E:\\wxWidgets-3.2.8\\include libraries\\${ARCH}\\wxwidgets\\include) ^& IF %ERRORLEVEL% LEQ 1 exit 0"
|
||||
bat 'cd build\\workspaces && update-workspaces.bat --jenkins-tests'
|
||||
|
||||
script {
|
||||
if (params.CLEANBUILD) {
|
||||
bat "cd build\\workspaces\\vs2017 && \"${visualStudioPath}\" pyrogenesis.sln /p:Configuration=Debug /t:Clean"
|
||||
bat "cd build\\workspaces\\vs2017 && \"${visualStudioPath}\" pyrogenesis.sln /p:Configuration=Release /t:Clean"
|
||||
bat "cd build\\workspaces\\vs2022 && \"${visualStudioPath}\" pyrogenesis.sln /p:Configuration=Debug /t:Clean"
|
||||
bat "cd build\\workspaces\\vs2022 && \"${visualStudioPath}\" pyrogenesis.sln /p:Configuration=Release /t:Clean"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -107,7 +107,7 @@ pipeline {
|
|||
stage('Build') {
|
||||
steps {
|
||||
powershell """
|
||||
cd build\\workspaces\\vs2017
|
||||
cd build\\workspaces\\vs2022
|
||||
& \"${visualStudioPath}\" pyrogenesis.sln /p:Configuration=${BUILD_TYPE} ${buildOptions} \$env:JOBS 2>&1 | Tee-Object -FilePath ${BUILD_TYPE}-build.log
|
||||
"""
|
||||
}
|
||||
|
|
@ -127,7 +127,7 @@ pipeline {
|
|||
analysisModelId: 'msbuild',
|
||||
name: config['name'],
|
||||
id : config['id'],
|
||||
pattern: "build\\workspaces\\vs2017\\${BUILD_TYPE}-build.log"
|
||||
pattern: "build\\workspaces\\vs2022\\${BUILD_TYPE}-build.log"
|
||||
),
|
||||
skipPublishingChecks: true,
|
||||
enabledForFailure: true,
|
||||
|
|
|
|||
|
|
@ -212,8 +212,8 @@ extern_lib_defs = {
|
|||
boost = {
|
||||
compile_settings = function()
|
||||
if os.istarget("windows") then
|
||||
-- Force the autolink to use the vc141 libs.
|
||||
defines { 'BOOST_LIB_TOOLSET="vc141"' }
|
||||
-- Force the autolink to use the vc143 libs.
|
||||
defines { 'BOOST_LIB_TOOLSET="vc143"' }
|
||||
add_default_include_paths("boost")
|
||||
elseif os.istarget("macosx") then
|
||||
-- Suppress all the Boost warnings on OS X by including it as a system directory
|
||||
|
|
@ -227,7 +227,7 @@ extern_lib_defs = {
|
|||
link_settings = function()
|
||||
if os.istarget("windows") or os.istarget("macosx") then
|
||||
if os.istarget("windows") then
|
||||
defines { 'BOOST_LIB_TOOLSET="vc141"' }
|
||||
defines { 'BOOST_LIB_TOOLSET="vc143"' }
|
||||
end
|
||||
add_default_lib_paths("boost")
|
||||
end
|
||||
|
|
@ -703,15 +703,9 @@ extern_lib_defs = {
|
|||
link_settings = function()
|
||||
if os.istarget("windows") then
|
||||
add_default_lib_paths("vorbis")
|
||||
if arch == "amd64" then
|
||||
add_default_links({
|
||||
win_names = { "vorbisfile" },
|
||||
})
|
||||
else
|
||||
add_default_links({
|
||||
win_names = { "libvorbisfile" },
|
||||
})
|
||||
end
|
||||
add_default_links({
|
||||
win_names = { "vorbisfile" },
|
||||
})
|
||||
else
|
||||
pkgconfig.add_links("vorbisfile")
|
||||
end
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ cd /D "%~dp0"
|
|||
|
||||
rem **SVN revision to checkout for windows-libs or windows-libs-amd64**
|
||||
rem **Update this line when you commit an update to windows-libs or windows-libs-amd64**
|
||||
set "svnrev=28262"
|
||||
set "svnrev=28267"
|
||||
|
||||
if "%1" == "--amd64" (
|
||||
set "LIBS_PATH=win64"
|
||||
|
|
@ -18,15 +18,6 @@ svn co https://svn.wildfiregames.com/public/%REPO_NAME%/trunk@%svnrev% %LIBS_PAT
|
|||
svn export --force https://svn.wildfiregames.com/public/%REPO_NAME%/trunk@%svnrev% %LIBS_PATH% || ^
|
||||
exit /b 1
|
||||
|
||||
rem **Fixup SpiderMonkey for Windows 7 on Win32**
|
||||
rem This change is performed separately to allow backporting to A27
|
||||
set "smrev=28263"
|
||||
if "%LIBS_PATH%" == "win32" (
|
||||
svn up -r %smrev% win32/spidermonkey/bin || ^
|
||||
svn export --force https://svn.wildfiregames.com/public/windows-libs/trunk/spidermonkey/bin@%smrev% win32/spidermonkey/bin || ^
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
rem **Copy dependencies' binaries to binaries/system/**
|
||||
|
||||
rem static libs: boost fmt
|
||||
|
|
|
|||
Loading…
Reference in a new issue