From a7c4070df74e4d62cc8031ae5de9f892fe914bfc Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Sun, 18 Jun 2017 23:41:12 -0700 Subject: scripts: Switch to manual NuGet package with both CRT linkages We'd like to build pugixml with both static & dynamic CRT and put it all in one NuGet package. CoApp sort of allows us to do this via dynamic/static pivots, but it does not let us customize the names of the pivots and additionally has some bugs with the project setup. Their project modifications are also much more complicated - really, at this point we should do this ourselves. Create a simple native NuGet package with Linkage setting that picks the right library, and package all libraries appropriately. Note that we use the unified path syntax to make it simple to just get the right .lib file from the toolset/platform/configuration/linkage combo. --- scripts/nuget.autopkg | 46 ------ .../nuget/build/native/pugixml-propertiesui.xml | 15 ++ scripts/nuget/build/native/pugixml.targets | 27 ++++ scripts/nuget/pugixml.nuspec | 20 +++ scripts/nuget_build.ps1 | 65 +++++++- scripts/pugixml_vs2015_static.vcxproj | 176 +++++++++++++++++++++ scripts/pugixml_vs2017_static.vcxproj | 176 +++++++++++++++++++++ 7 files changed, 476 insertions(+), 49 deletions(-) delete mode 100644 scripts/nuget.autopkg create mode 100644 scripts/nuget/build/native/pugixml-propertiesui.xml create mode 100644 scripts/nuget/build/native/pugixml.targets create mode 100644 scripts/nuget/pugixml.nuspec create mode 100644 scripts/pugixml_vs2015_static.vcxproj create mode 100644 scripts/pugixml_vs2017_static.vcxproj diff --git a/scripts/nuget.autopkg b/scripts/nuget.autopkg deleted file mode 100644 index 27f0ec8..0000000 --- a/scripts/nuget.autopkg +++ /dev/null @@ -1,46 +0,0 @@ -configurations { - Toolset { - key: "PlatformToolset"; - choices: { v141, v140, v120, v110, v100 }; - } -} -nuget { - nuspec { - id = pugixml; - version: 1.8.0-appveyor; - - authors: {Arseny Kapoulkine}; - owners: {Arseny Kapoulkine}; - - projectUrl: "http://pugixml.org/"; - iconUrl: "https://github.com/zeux/pugixml/logo.svg"; - - title: pugixml; - summary: "Light-weight, simple and fast XML parser for C++ with XPath support"; - releaseNotes: "http://pugixml.org/docs/manual.html#changes"; - copyright: "Copyright (c) 2006-2017 Arseny Kapoulkine"; - licenseUrl: "http://pugixml.org/license.html"; - requireLicenseAcceptance: false; - - description: @"pugixml is a C++ XML processing library, which consists of a DOM-like interface with rich traversal/modification capabilities, an extremely fast XML parser which constructs the DOM tree from an XML file/buffer, and an XPath 1.0 implementation for complex data-driven tree queries. Full Unicode support is also available, with Unicode interface variants and conversions between different Unicode encodings (which happen automatically during parsing/saving). - pugixml is used by a lot of projects, both open-source and proprietary, for performance and easy-to-use interface."; - - tags: { native }; - } - files { - include: { "..\src\*.hpp" }; - - [x86,v120,release] { lib: vs2013\x32\pugixmls.lib; } - [x86,v120,debug] { lib: vs2013\x32\pugixmlsd.lib; } - [x64,v120,release] { lib: vs2013\x64\pugixmls.lib; } - [x64,v120,debug] { lib: vs2013\x64\pugixmlsd.lib; } - [x86,v140,release] { lib: vs2015\Win32_Release\pugixml.lib; } - [x86,v140,debug] { lib: vs2015\Win32_Debug\pugixml.lib; } - [x64,v140,release] { lib: vs2015\x64_Release\pugixml.lib; } - [x64,v140,debug] { lib: vs2015\x64_Debug\pugixml.lib; } - [x86,v141,release] { lib: vs2017\Win32_Release\pugixml.lib; } - [x86,v141,debug] { lib: vs2017\Win32_Debug\pugixml.lib; } - [x64,v141,release] { lib: vs2017\x64_Release\pugixml.lib; } - [x64,v141,debug] { lib: vs2017\x64_Debug\pugixml.lib; } - } -} diff --git a/scripts/nuget/build/native/pugixml-propertiesui.xml b/scripts/nuget/build/native/pugixml-propertiesui.xml new file mode 100644 index 0000000..b2e02bb --- /dev/null +++ b/scripts/nuget/build/native/pugixml-propertiesui.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/scripts/nuget/build/native/pugixml.targets b/scripts/nuget/build/native/pugixml.targets new file mode 100644 index 0000000..97d13b2 --- /dev/null +++ b/scripts/nuget/build/native/pugixml.targets @@ -0,0 +1,27 @@ + + + + dynamic + + + + + + + $(MSBuildThisFileDirectory)include/;%(AdditionalIncludeDirectories) + + + $(MSBuildThisFileDirectory)include/;%(AdditionalIncludeDirectories) + + + + + $(MSBuildThisFileDirectory)lib/$(Platform)\$(PlatformToolset.Split('_')[0])\$(Linkage-pugixml)\Debug\pugixml.lib;%(AdditionalDependencies) + + + + + $(MSBuildThisFileDirectory)lib/$(Platform)\$(PlatformToolset.Split('_')[0])\$(Linkage-pugixml)\Release\pugixml.lib;%(AdditionalDependencies) + + + diff --git a/scripts/nuget/pugixml.nuspec b/scripts/nuget/pugixml.nuspec new file mode 100644 index 0000000..abaa7c6 --- /dev/null +++ b/scripts/nuget/pugixml.nuspec @@ -0,0 +1,20 @@ + + + + pugixml + 1.8.0-appveyor + pugixml + Arseny Kapoulkine + Arseny Kapoulkine + false + http://pugixml.org/license.html + http://pugixml.org/ + https://github.com/zeux/pugixml/logo.svg + pugixml is a C++ XML processing library, which consists of a DOM-like interface with rich traversal/modification capabilities, an extremely fast XML parser which constructs the DOM tree from an XML file/buffer, and an XPath 1.0 implementation for complex data-driven tree queries. Full Unicode support is also available, with Unicode interface variants and conversions between different Unicode encodings (which happen automatically during parsing/saving). + pugixml is used by a lot of projects, both open-source and proprietary, for performance and easy-to-use interface. + Light-weight, simple and fast XML parser for C++ with XPath support + http://pugixml.org/docs/manual.html#changes + Copyright (c) 2006-2017 Arseny Kapoulkine + native nativepackage + + \ No newline at end of file diff --git a/scripts/nuget_build.ps1 b/scripts/nuget_build.ps1 index a8e3017..20f2d89 100644 --- a/scripts/nuget_build.ps1 +++ b/scripts/nuget_build.ps1 @@ -1,25 +1,84 @@ -function Run-Command +function Run-Command([string]$cmd) { - Invoke-Expression $args[0] + Invoke-Expression $cmd if ($LastExitCode) { exit $LastExitCode } } +function Force-Copy([string]$from, [string]$to) +{ + Write-Host $from "=>" $to + New-Item -Force $to | Out-Null + Copy-Item -Force $from $to + if (! $?) { exit 1 } +} + Push-Location $scriptdir = Split-Path $MyInvocation.MyCommand.Path cd $scriptdir +Run-Command "msbuild pugixml_vs2013.vcxproj /t:Rebuild /p:Configuration=Debug /p:Platform=x86 /v:minimal /nologo" +Run-Command "msbuild pugixml_vs2013.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x86 /v:minimal /nologo" +Run-Command "msbuild pugixml_vs2013.vcxproj /t:Rebuild /p:Configuration=Debug /p:Platform=x64 /v:minimal /nologo" +Run-Command "msbuild pugixml_vs2013.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x64 /v:minimal /nologo" + Run-Command "msbuild pugixml_vs2013_static.vcxproj /t:Rebuild /p:Configuration=Debug /p:Platform=x86 /v:minimal /nologo" Run-Command "msbuild pugixml_vs2013_static.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x86 /v:minimal /nologo" Run-Command "msbuild pugixml_vs2013_static.vcxproj /t:Rebuild /p:Configuration=Debug /p:Platform=x64 /v:minimal /nologo" Run-Command "msbuild pugixml_vs2013_static.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x64 /v:minimal /nologo" + Run-Command "msbuild pugixml_vs2015.vcxproj /t:Rebuild /p:Configuration=Debug /p:Platform=x86 /v:minimal /nologo" Run-Command "msbuild pugixml_vs2015.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x86 /v:minimal /nologo" Run-Command "msbuild pugixml_vs2015.vcxproj /t:Rebuild /p:Configuration=Debug /p:Platform=x64 /v:minimal /nologo" Run-Command "msbuild pugixml_vs2015.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x64 /v:minimal /nologo" + +Run-Command "msbuild pugixml_vs2015_static.vcxproj /t:Rebuild /p:Configuration=Debug /p:Platform=x86 /v:minimal /nologo" +Run-Command "msbuild pugixml_vs2015_static.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x86 /v:minimal /nologo" +Run-Command "msbuild pugixml_vs2015_static.vcxproj /t:Rebuild /p:Configuration=Debug /p:Platform=x64 /v:minimal /nologo" +Run-Command "msbuild pugixml_vs2015_static.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x64 /v:minimal /nologo" + Run-Command "msbuild pugixml_vs2017.vcxproj /t:Rebuild /p:Configuration=Debug /p:Platform=x86 /v:minimal /nologo" Run-Command "msbuild pugixml_vs2017.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x86 /v:minimal /nologo" Run-Command "msbuild pugixml_vs2017.vcxproj /t:Rebuild /p:Configuration=Debug /p:Platform=x64 /v:minimal /nologo" Run-Command "msbuild pugixml_vs2017.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x64 /v:minimal /nologo" -Write-NuGetPackage nuget.autopkg + +Run-Command "msbuild pugixml_vs2017_static.vcxproj /t:Rebuild /p:Configuration=Debug /p:Platform=x86 /v:minimal /nologo" +Run-Command "msbuild pugixml_vs2017_static.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x86 /v:minimal /nologo" +Run-Command "msbuild pugixml_vs2017_static.vcxproj /t:Rebuild /p:Configuration=Debug /p:Platform=x64 /v:minimal /nologo" +Run-Command "msbuild pugixml_vs2017_static.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x64 /v:minimal /nologo" + +Force-Copy "../src/pugiconfig.hpp" "nuget/build/native/include/pugiconfig.hpp" +Force-Copy "../src/pugixml.hpp" "nuget/build/native/include/pugixml.hpp" + +Force-Copy "vs2013/x32/pugixml.lib" "nuget/build/native/lib/Win32/v120/dynamic/Release/pugixml.lib" +Force-Copy "vs2013/x32/pugixmld.lib" "nuget/build/native/lib/Win32/v120/dynamic/Debug/pugixml.lib" +Force-Copy "vs2013/x64/pugixml.lib" "nuget/build/native/lib/x64/v120/dynamic/Release/pugixml.lib" +Force-Copy "vs2013/x64/pugixmld.lib" "nuget/build/native/lib/x64/v120/dynamic/Debug/pugixml.lib" + +Force-Copy "vs2013/x32/pugixmls.lib" "nuget/build/native/lib/Win32/v120/static/Release/pugixml.lib" +Force-Copy "vs2013/x32/pugixmlsd.lib" "nuget/build/native/lib/Win32/v120/static/Debug/pugixml.lib" +Force-Copy "vs2013/x64/pugixmls.lib" "nuget/build/native/lib/x64/v120/static/Release/pugixml.lib" +Force-Copy "vs2013/x64/pugixmlsd.lib" "nuget/build/native/lib/x64/v120/static/Debug/pugixml.lib" + +Force-Copy "vs2015/Win32_Release/pugixml.lib" "nuget/build/native/lib/Win32/v140/dynamic/Release/pugixml.lib" +Force-Copy "vs2015/Win32_Debug/pugixml.lib" "nuget/build/native/lib/Win32/v140/dynamic/Debug/pugixml.lib" +Force-Copy "vs2015/x64_Release/pugixml.lib" "nuget/build/native/lib/x64/v140/dynamic/Release/pugixml.lib" +Force-Copy "vs2015/x64_Debug/pugixml.lib" "nuget/build/native/lib/x64/v140/dynamic/Debug/pugixml.lib" + +Force-Copy "vs2015/Win32_ReleaseStatic/pugixml.lib" "nuget/build/native/lib/Win32/v140/static/Release/pugixml.lib" +Force-Copy "vs2015/Win32_DebugStatic/pugixml.lib" "nuget/build/native/lib/Win32/v140/static/Debug/pugixml.lib" +Force-Copy "vs2015/x64_ReleaseStatic/pugixml.lib" "nuget/build/native/lib/x64/v140/static/Release/pugixml.lib" +Force-Copy "vs2015/x64_DebugStatic/pugixml.lib" "nuget/build/native/lib/x64/v140/static/Debug/pugixml.lib" + +Force-Copy "vs2017/Win32_Release/pugixml.lib" "nuget/build/native/lib/Win32/v141/dynamic/Release/pugixml.lib" +Force-Copy "vs2017/Win32_Debug/pugixml.lib" "nuget/build/native/lib/Win32/v141/dynamic/Debug/pugixml.lib" +Force-Copy "vs2017/x64_Release/pugixml.lib" "nuget/build/native/lib/x64/v141/dynamic/Release/pugixml.lib" +Force-Copy "vs2017/x64_Debug/pugixml.lib" "nuget/build/native/lib/x64/v141/dynamic/Debug/pugixml.lib" + +Force-Copy "vs2017/Win32_ReleaseStatic/pugixml.lib" "nuget/build/native/lib/Win32/v141/static/Release/pugixml.lib" +Force-Copy "vs2017/Win32_DebugStatic/pugixml.lib" "nuget/build/native/lib/Win32/v141/static/Debug/pugixml.lib" +Force-Copy "vs2017/x64_ReleaseStatic/pugixml.lib" "nuget/build/native/lib/x64/v141/static/Release/pugixml.lib" +Force-Copy "vs2017/x64_DebugStatic/pugixml.lib" "nuget/build/native/lib/x64/v141/static/Debug/pugixml.lib" + +Run-Command "nuget pack nuget" Pop-Location diff --git a/scripts/pugixml_vs2015_static.vcxproj b/scripts/pugixml_vs2015_static.vcxproj new file mode 100644 index 0000000..0ce5082 --- /dev/null +++ b/scripts/pugixml_vs2015_static.vcxproj @@ -0,0 +1,176 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + {07CF01C0-B887-499D-AD9C-799CB6A9FE64} + Win32Proj + pugixml + 8.1 + + + + StaticLibrary + true + v140 + Unicode + + + StaticLibrary + false + v140 + true + Unicode + + + StaticLibrary + true + v140 + Unicode + + + StaticLibrary + false + v140 + true + Unicode + + + + + + + + + + + + + + + + + + + + + vs2015\$(Platform)_$(Configuration)Static\ + vs2015\$(Platform)_$(Configuration)Static\ + pugixml + + + vs2015\$(Platform)_$(Configuration)Static\ + vs2015\$(Platform)_$(Configuration)Static\ + pugixml + + + vs2015\$(Platform)_$(Configuration)Static\ + vs2015\$(Platform)_$(Configuration)Static\ + pugixml + + + vs2015\$(Platform)_$(Configuration)Static\ + vs2015\$(Platform)_$(Configuration)Static\ + pugixml + + + + + + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + $(IntDir)$(TargetName).pdb + OldStyle + false + MultiThreadedDebug + + + Windows + true + + + + + + + Level3 + Disabled + _DEBUG;_LIB;%(PreprocessorDefinitions) + $(IntDir)$(TargetName).pdb + OldStyle + false + MultiThreadedDebug + + + Windows + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + $(IntDir)$(TargetName).pdb + OldStyle + MultiThreaded + + + Windows + true + true + true + + + + + Level3 + + + MaxSpeed + true + true + NDEBUG;_LIB;%(PreprocessorDefinitions) + $(IntDir)$(TargetName).pdb + OldStyle + MultiThreaded + + + Windows + true + true + true + + + + + + + + + + + + + diff --git a/scripts/pugixml_vs2017_static.vcxproj b/scripts/pugixml_vs2017_static.vcxproj new file mode 100644 index 0000000..68a862f --- /dev/null +++ b/scripts/pugixml_vs2017_static.vcxproj @@ -0,0 +1,176 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + {07CF01C0-B887-499D-AD9C-799CB6A9FE64} + Win32Proj + pugixml + 8.1 + + + + StaticLibrary + true + v141 + Unicode + + + StaticLibrary + false + v141 + true + Unicode + + + StaticLibrary + true + v141 + Unicode + + + StaticLibrary + false + v141 + true + Unicode + + + + + + + + + + + + + + + + + + + + + vs2017\$(Platform)_$(Configuration)Static\ + vs2017\$(Platform)_$(Configuration)Static\ + pugixml + + + vs2017\$(Platform)_$(Configuration)Static\ + vs2017\$(Platform)_$(Configuration)Static\ + pugixml + + + vs2017\$(Platform)_$(Configuration)Static\ + vs2017\$(Platform)_$(Configuration)Static\ + pugixml + + + vs2017\$(Platform)_$(Configuration)Static\ + vs2017\$(Platform)_$(Configuration)Static\ + pugixml + + + + + + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + $(IntDir)$(TargetName).pdb + OldStyle + false + MultiThreadedDebug + + + Windows + true + + + + + + + Level3 + Disabled + _DEBUG;_LIB;%(PreprocessorDefinitions) + $(IntDir)$(TargetName).pdb + OldStyle + false + MultiThreadedDebug + + + Windows + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + $(IntDir)$(TargetName).pdb + OldStyle + MultiThreaded + + + Windows + true + true + true + + + + + Level3 + + + MaxSpeed + true + true + NDEBUG;_LIB;%(PreprocessorDefinitions) + $(IntDir)$(TargetName).pdb + OldStyle + MultiThreaded + + + Windows + true + true + true + + + + + + + + + + + + + -- cgit v1.2.3 From 7d651ac3b6c00347014033b8afd89bffe61c6830 Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Mon, 19 Jun 2017 22:25:09 -0700 Subject: Update .gitignore --- .gitignore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 01f9cb9..653fa51 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -build/ -.vscode/ \ No newline at end of file +/build/ +/.vscode/ -- cgit v1.2.3 From d2b0328198b9885a4e3d66115995ba30061c1ef3 Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Mon, 19 Jun 2017 22:33:58 -0700 Subject: Remove CoApp msi installation We build NuGet package manually now so we don't need CoApp. --- appveyor.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 51adf2e..efae639 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,12 +4,6 @@ image: version: "{branch}-{build}" -install: - - ps: (new-object net.webclient).DownloadFile('http://coapp.org/files/CoApp.Tools.Powershell.msi', 'C:\CoApp.Tools.Powershell.msi') - - ps: Start-Process -FilePath msiexec -ArgumentList /i, 'C:\CoApp.Tools.Powershell.msi', /quiet -Wait - - ps: $env:PSModulePath = $env:PSModulePath + ';C:\Program Files (x86)\Outercurve Foundation\Modules' - - ps: Import-Module CoApp - build_script: - ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2017") { .\scripts\nuget_build.ps1 } -- cgit v1.2.3 From fbc7085c149e63cbcc60940040b7a30ded97e1af Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Mon, 19 Jun 2017 23:05:07 -0700 Subject: scripts: Clarify the linkage settings in package description Also improve linkage description --- scripts/nuget/build/native/pugixml-propertiesui.xml | 6 +++--- scripts/nuget/pugixml.nuspec | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/nuget/build/native/pugixml-propertiesui.xml b/scripts/nuget/build/native/pugixml-propertiesui.xml index b2e02bb..0732cc2 100644 --- a/scripts/nuget/build/native/pugixml-propertiesui.xml +++ b/scripts/nuget/build/native/pugixml-propertiesui.xml @@ -7,9 +7,9 @@ - - - + + + diff --git a/scripts/nuget/pugixml.nuspec b/scripts/nuget/pugixml.nuspec index abaa7c6..046ea31 100644 --- a/scripts/nuget/pugixml.nuspec +++ b/scripts/nuget/pugixml.nuspec @@ -11,10 +11,11 @@ http://pugixml.org/ https://github.com/zeux/pugixml/logo.svg pugixml is a C++ XML processing library, which consists of a DOM-like interface with rich traversal/modification capabilities, an extremely fast XML parser which constructs the DOM tree from an XML file/buffer, and an XPath 1.0 implementation for complex data-driven tree queries. Full Unicode support is also available, with Unicode interface variants and conversions between different Unicode encodings (which happen automatically during parsing/saving). - pugixml is used by a lot of projects, both open-source and proprietary, for performance and easy-to-use interface. +pugixml is used by a lot of projects, both open-source and proprietary, for performance and easy-to-use interface. +This package contains builds for VS2013, VS2015 and VS2017, for both statically linked and DLL CRT; you can switch the CRT linkage in Project -> Properties -> Referenced Packages -> pugixml. Light-weight, simple and fast XML parser for C++ with XPath support http://pugixml.org/docs/manual.html#changes Copyright (c) 2006-2017 Arseny Kapoulkine native nativepackage - \ No newline at end of file + -- cgit v1.2.3 From 88d43a7ebc01a2fac86e7c0d9a53ef56a684ad86 Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Mon, 19 Jun 2017 23:25:49 -0700 Subject: scripts: Refactor nuget_build.ps1 Unify build paths in all MSBuild VS projects and extract common build logic into functions. Note that this change changes both VS2010 and VS2013 projects to have more predictable output paths and fixed output file name (pugixml). --- scripts/nuget_build.ps1 | 80 ++++++++++------------------------- scripts/pugixml_vs2010.vcxproj | 28 ++++++------ scripts/pugixml_vs2010_static.vcxproj | 40 +++++++++--------- scripts/pugixml_vs2013.vcxproj | 30 ++++++------- scripts/pugixml_vs2013_static.vcxproj | 42 +++++++++--------- 5 files changed, 92 insertions(+), 128 deletions(-) diff --git a/scripts/nuget_build.ps1 b/scripts/nuget_build.ps1 index 20f2d89..9028426 100644 --- a/scripts/nuget_build.ps1 +++ b/scripts/nuget_build.ps1 @@ -6,78 +6,42 @@ function Run-Command([string]$cmd) function Force-Copy([string]$from, [string]$to) { - Write-Host $from "=>" $to + Write-Host $from "->" $to New-Item -Force $to | Out-Null Copy-Item -Force $from $to if (! $?) { exit 1 } } -Push-Location -$scriptdir = Split-Path $MyInvocation.MyCommand.Path -cd $scriptdir - -Run-Command "msbuild pugixml_vs2013.vcxproj /t:Rebuild /p:Configuration=Debug /p:Platform=x86 /v:minimal /nologo" -Run-Command "msbuild pugixml_vs2013.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x86 /v:minimal /nologo" -Run-Command "msbuild pugixml_vs2013.vcxproj /t:Rebuild /p:Configuration=Debug /p:Platform=x64 /v:minimal /nologo" -Run-Command "msbuild pugixml_vs2013.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x64 /v:minimal /nologo" - -Run-Command "msbuild pugixml_vs2013_static.vcxproj /t:Rebuild /p:Configuration=Debug /p:Platform=x86 /v:minimal /nologo" -Run-Command "msbuild pugixml_vs2013_static.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x86 /v:minimal /nologo" -Run-Command "msbuild pugixml_vs2013_static.vcxproj /t:Rebuild /p:Configuration=Debug /p:Platform=x64 /v:minimal /nologo" -Run-Command "msbuild pugixml_vs2013_static.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x64 /v:minimal /nologo" - -Run-Command "msbuild pugixml_vs2015.vcxproj /t:Rebuild /p:Configuration=Debug /p:Platform=x86 /v:minimal /nologo" -Run-Command "msbuild pugixml_vs2015.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x86 /v:minimal /nologo" -Run-Command "msbuild pugixml_vs2015.vcxproj /t:Rebuild /p:Configuration=Debug /p:Platform=x64 /v:minimal /nologo" -Run-Command "msbuild pugixml_vs2015.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x64 /v:minimal /nologo" +function Build-Version([string]$vs, [string]$toolset, [string]$linkage) +{ + $prjsuffix = if ($linkage -eq "static") { "_static" } else { "" } + $cfgsuffix = if ($linkage -eq "static") { "Static" } else { "" } -Run-Command "msbuild pugixml_vs2015_static.vcxproj /t:Rebuild /p:Configuration=Debug /p:Platform=x86 /v:minimal /nologo" -Run-Command "msbuild pugixml_vs2015_static.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x86 /v:minimal /nologo" -Run-Command "msbuild pugixml_vs2015_static.vcxproj /t:Rebuild /p:Configuration=Debug /p:Platform=x64 /v:minimal /nologo" -Run-Command "msbuild pugixml_vs2015_static.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x64 /v:minimal /nologo" + foreach ($configuration in "Debug","Release") + { + Run-Command "msbuild pugixml_$vs$prjsuffix.vcxproj /t:Rebuild /p:Configuration=$configuration /p:Platform=x86 /v:minimal /nologo" + Run-Command "msbuild pugixml_$vs$prjsuffix.vcxproj /t:Rebuild /p:Configuration=$configuration /p:Platform=x64 /v:minimal /nologo" -Run-Command "msbuild pugixml_vs2017.vcxproj /t:Rebuild /p:Configuration=Debug /p:Platform=x86 /v:minimal /nologo" -Run-Command "msbuild pugixml_vs2017.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x86 /v:minimal /nologo" -Run-Command "msbuild pugixml_vs2017.vcxproj /t:Rebuild /p:Configuration=Debug /p:Platform=x64 /v:minimal /nologo" -Run-Command "msbuild pugixml_vs2017.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x64 /v:minimal /nologo" + Force-Copy "$vs/Win32_$configuration$cfgsuffix/pugixml.lib" "nuget/build/native/lib/Win32/$toolset/$linkage/$configuration/pugixml.lib" + Force-Copy "$vs/x64_$configuration$cfgsuffix/pugixml.lib" "nuget/build/native/lib/x64/$toolset/$linkage/$configuration/pugixml.lib" + } +} -Run-Command "msbuild pugixml_vs2017_static.vcxproj /t:Rebuild /p:Configuration=Debug /p:Platform=x86 /v:minimal /nologo" -Run-Command "msbuild pugixml_vs2017_static.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x86 /v:minimal /nologo" -Run-Command "msbuild pugixml_vs2017_static.vcxproj /t:Rebuild /p:Configuration=Debug /p:Platform=x64 /v:minimal /nologo" -Run-Command "msbuild pugixml_vs2017_static.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x64 /v:minimal /nologo" +Push-Location +$scriptdir = Split-Path $MyInvocation.MyCommand.Path +cd $scriptdir Force-Copy "../src/pugiconfig.hpp" "nuget/build/native/include/pugiconfig.hpp" Force-Copy "../src/pugixml.hpp" "nuget/build/native/include/pugixml.hpp" -Force-Copy "vs2013/x32/pugixml.lib" "nuget/build/native/lib/Win32/v120/dynamic/Release/pugixml.lib" -Force-Copy "vs2013/x32/pugixmld.lib" "nuget/build/native/lib/Win32/v120/dynamic/Debug/pugixml.lib" -Force-Copy "vs2013/x64/pugixml.lib" "nuget/build/native/lib/x64/v120/dynamic/Release/pugixml.lib" -Force-Copy "vs2013/x64/pugixmld.lib" "nuget/build/native/lib/x64/v120/dynamic/Debug/pugixml.lib" - -Force-Copy "vs2013/x32/pugixmls.lib" "nuget/build/native/lib/Win32/v120/static/Release/pugixml.lib" -Force-Copy "vs2013/x32/pugixmlsd.lib" "nuget/build/native/lib/Win32/v120/static/Debug/pugixml.lib" -Force-Copy "vs2013/x64/pugixmls.lib" "nuget/build/native/lib/x64/v120/static/Release/pugixml.lib" -Force-Copy "vs2013/x64/pugixmlsd.lib" "nuget/build/native/lib/x64/v120/static/Debug/pugixml.lib" - -Force-Copy "vs2015/Win32_Release/pugixml.lib" "nuget/build/native/lib/Win32/v140/dynamic/Release/pugixml.lib" -Force-Copy "vs2015/Win32_Debug/pugixml.lib" "nuget/build/native/lib/Win32/v140/dynamic/Debug/pugixml.lib" -Force-Copy "vs2015/x64_Release/pugixml.lib" "nuget/build/native/lib/x64/v140/dynamic/Release/pugixml.lib" -Force-Copy "vs2015/x64_Debug/pugixml.lib" "nuget/build/native/lib/x64/v140/dynamic/Debug/pugixml.lib" - -Force-Copy "vs2015/Win32_ReleaseStatic/pugixml.lib" "nuget/build/native/lib/Win32/v140/static/Release/pugixml.lib" -Force-Copy "vs2015/Win32_DebugStatic/pugixml.lib" "nuget/build/native/lib/Win32/v140/static/Debug/pugixml.lib" -Force-Copy "vs2015/x64_ReleaseStatic/pugixml.lib" "nuget/build/native/lib/x64/v140/static/Release/pugixml.lib" -Force-Copy "vs2015/x64_DebugStatic/pugixml.lib" "nuget/build/native/lib/x64/v140/static/Debug/pugixml.lib" +Build-Version "vs2013" "v120" "dynamic" +Build-Version "vs2013" "v120" "static" -Force-Copy "vs2017/Win32_Release/pugixml.lib" "nuget/build/native/lib/Win32/v141/dynamic/Release/pugixml.lib" -Force-Copy "vs2017/Win32_Debug/pugixml.lib" "nuget/build/native/lib/Win32/v141/dynamic/Debug/pugixml.lib" -Force-Copy "vs2017/x64_Release/pugixml.lib" "nuget/build/native/lib/x64/v141/dynamic/Release/pugixml.lib" -Force-Copy "vs2017/x64_Debug/pugixml.lib" "nuget/build/native/lib/x64/v141/dynamic/Debug/pugixml.lib" +Build-Version "vs2015" "v140" "dynamic" +Build-Version "vs2015" "v140" "static" -Force-Copy "vs2017/Win32_ReleaseStatic/pugixml.lib" "nuget/build/native/lib/Win32/v141/static/Release/pugixml.lib" -Force-Copy "vs2017/Win32_DebugStatic/pugixml.lib" "nuget/build/native/lib/Win32/v141/static/Debug/pugixml.lib" -Force-Copy "vs2017/x64_ReleaseStatic/pugixml.lib" "nuget/build/native/lib/x64/v141/static/Release/pugixml.lib" -Force-Copy "vs2017/x64_DebugStatic/pugixml.lib" "nuget/build/native/lib/x64/v141/static/Debug/pugixml.lib" +Build-Version "vs2015" "v141" "dynamic" +Build-Version "vs2015" "v141" "static" Run-Command "nuget pack nuget" diff --git a/scripts/pugixml_vs2010.vcxproj b/scripts/pugixml_vs2010.vcxproj index c29b4c5..d29c463 100644 --- a/scripts/pugixml_vs2010.vcxproj +++ b/scripts/pugixml_vs2010.vcxproj @@ -64,17 +64,17 @@ <_ProjectFileVersion>10.0.30319.1 - vs2010\x32\ - vs2010\x32\Debug\ - pugixmld - vs2010\x64\ - vs2010\x64\Debug\ - pugixmld - vs2010\x32\ - vs2010\x32\Release\ + vs2010\Win32_Debug\ + vs2010\Win32_Debug\ + pugixml + vs2010\x64_Debug\ + vs2010\x64_Debug\ + pugixml + vs2010\Win32_Release\ + vs2010\Win32_Release\ pugixml - vs2010\x64\ - vs2010\x64\Release\ + vs2010\x64_Release\ + vs2010\x64_Release\ pugixml @@ -93,12 +93,12 @@ _DEBUG;%(PreprocessorDefinitions) - $(OutDir)pugixmld.lib + $(OutDir)pugixml.lib Windows true - $(OutDir)pugixmld.pdb + $(OutDir)pugixml.pdb @@ -117,12 +117,12 @@ _DEBUG;%(PreprocessorDefinitions) - $(OutDir)pugixmld.lib + $(OutDir)pugixml.lib Windows true - $(OutDir)pugixmld.pdb + $(OutDir)pugixml.pdb diff --git a/scripts/pugixml_vs2010_static.vcxproj b/scripts/pugixml_vs2010_static.vcxproj index c1e133c..e770d17 100644 --- a/scripts/pugixml_vs2010_static.vcxproj +++ b/scripts/pugixml_vs2010_static.vcxproj @@ -64,18 +64,18 @@ <_ProjectFileVersion>10.0.30319.1 - vs2010\x32\ - vs2010\x32\DebugStatic\ - pugixmlsd - vs2010\x64\ - vs2010\x64\DebugStatic\ - pugixmlsd - vs2010\x32\ - vs2010\x32\ReleaseStatic\ - pugixmls - vs2010\x64\ - vs2010\x64\ReleaseStatic\ - pugixmls + vs2010\Win32_DebugStatic\ + vs2010\Win32_DebugStatic\ + pugixml + vs2010\x64_DebugStatic\ + vs2010\x64_DebugStatic\ + pugixml + vs2010\Win32_ReleaseStatic\ + vs2010\Win32_ReleaseStatic\ + pugixml + vs2010\x64_ReleaseStatic\ + vs2010\x64_ReleaseStatic\ + pugixml @@ -93,12 +93,12 @@ _DEBUG;%(PreprocessorDefinitions) - $(OutDir)pugixmlsd.lib + $(OutDir)pugixml.lib Windows true - $(OutDir)pugixmlsd.pdb + $(OutDir)pugixml.pdb @@ -117,12 +117,12 @@ _DEBUG;%(PreprocessorDefinitions) - $(OutDir)pugixmlsd.lib + $(OutDir)pugixml.lib Windows true - $(OutDir)pugixmlsd.pdb + $(OutDir)pugixml.pdb @@ -141,14 +141,14 @@ NDEBUG;%(PreprocessorDefinitions) - $(OutDir)pugixmls.lib + $(OutDir)pugixml.lib Windows true true true - $(OutDir)pugixmls.pdb + $(OutDir)pugixml.pdb @@ -167,14 +167,14 @@ NDEBUG;%(PreprocessorDefinitions) - $(OutDir)pugixmls.lib + $(OutDir)pugixml.lib Windows true true true - $(OutDir)pugixmls.pdb + $(OutDir)pugixml.pdb diff --git a/scripts/pugixml_vs2013.vcxproj b/scripts/pugixml_vs2013.vcxproj index c719394..eae27c9 100644 --- a/scripts/pugixml_vs2013.vcxproj +++ b/scripts/pugixml_vs2013.vcxproj @@ -68,17 +68,17 @@ <_ProjectFileVersion>10.0.30319.1 - vs2013\x32\ - vs2013\x32\Debug\ - pugixmld - vs2013\x64\ - vs2013\x64\Debug\ - pugixmld - vs2013\x32\ - vs2013\x32\Release\ + vs2013\Win32_Debug\ + vs2013\Win32_Debug\ + pugixml + vs2013\x64_Debug\ + vs2013\x64_Debug\ + pugixml + vs2013\Win32_Release\ + vs2013\Win32_Release\ pugixml - vs2013\x64\ - vs2013\x64\Release\ + vs2013\x64_Release\ + vs2013\x64_Release\ pugixml @@ -98,12 +98,12 @@ _DEBUG;%(PreprocessorDefinitions) - $(OutDir)pugixmld.lib + $(OutDir)pugixml.lib Windows true - $(OutDir)pugixmld.pdb + $(OutDir)pugixml.pdb @@ -123,12 +123,12 @@ _DEBUG;%(PreprocessorDefinitions) - $(OutDir)pugixmld.lib + $(OutDir)pugixml.lib Windows true - $(OutDir)pugixmld.pdb + $(OutDir)pugixml.pdb @@ -196,4 +196,4 @@ - \ No newline at end of file + diff --git a/scripts/pugixml_vs2013_static.vcxproj b/scripts/pugixml_vs2013_static.vcxproj index acca608..0ad4fe2 100644 --- a/scripts/pugixml_vs2013_static.vcxproj +++ b/scripts/pugixml_vs2013_static.vcxproj @@ -68,18 +68,18 @@ <_ProjectFileVersion>10.0.30319.1 - vs2013\x32\ - vs2013\x32\DebugStatic\ - pugixmlsd - vs2013\x64\ - vs2013\x64\DebugStatic\ - pugixmlsd - vs2013\x32\ - vs2013\x32\ReleaseStatic\ - pugixmls - vs2013\x64\ - vs2013\x64\ReleaseStatic\ - pugixmls + vs2013\Win32_DebugStatic\ + vs2013\Win32_DebugStatic\ + pugixml + vs2013\x64_DebugStatic\ + vs2013\x64_DebugStatic\ + pugixml + vs2013\Win32_ReleaseStatic\ + vs2013\Win32_ReleaseStatic\ + pugixml + vs2013\x64_ReleaseStatic\ + vs2013\x64_ReleaseStatic\ + pugixml @@ -98,12 +98,12 @@ _DEBUG;%(PreprocessorDefinitions) - $(OutDir)pugixmlsd.lib + $(OutDir)pugixml.lib Windows true - $(OutDir)pugixmlsd.pdb + $(OutDir)pugixml.pdb @@ -123,12 +123,12 @@ _DEBUG;%(PreprocessorDefinitions) - $(OutDir)pugixmlsd.lib + $(OutDir)pugixml.lib Windows true - $(OutDir)pugixmlsd.pdb + $(OutDir)pugixml.pdb @@ -148,14 +148,14 @@ NDEBUG;%(PreprocessorDefinitions) - $(OutDir)pugixmls.lib + $(OutDir)pugixml.lib Windows true true true - $(OutDir)pugixmls.pdb + $(OutDir)pugixml.pdb @@ -175,14 +175,14 @@ NDEBUG;%(PreprocessorDefinitions) - $(OutDir)pugixmls.lib + $(OutDir)pugixml.lib Windows true true true - $(OutDir)pugixmls.pdb + $(OutDir)pugixml.pdb @@ -196,4 +196,4 @@ - \ No newline at end of file + -- cgit v1.2.3