diff --git a/README.md b/README.md index 00f7ecec..27aebd64 100644 --- a/README.md +++ b/README.md @@ -66,36 +66,14 @@ Studio, add the Win2D NuGet package to your project, and get started using the A Locally built versions of Win2D are marked as prerelease, so you must change the 'Stable Only' setting to 'Include Prerelease' when adding them to your project. - -## Preview of Windows universal app platform support - -A preview of Win2D's support for the universal app platform is available through -source builds only. - -### Building the Win2D-UAP NuGet package - -Follow these steps to build a NuGet package that can be consumed by a Windows -universal app: - -- Install the [Windows 10 developer tooling - preview](http://blogs.windows.com/buildingapps/2015/03/23/windows-10-developer-tooling-preview-now-available-to-windows-insiders/) -- Launch "MSBuild Command Prompt for VS2015" (not "Developer Command Prompt") -- Change directory to your cloned Win2D repository and execute the following commands: - -```console -> build -> msbuild win2d.proj /p:BuildTests=false /p:BuildTools=false /p:BuildDocs=false /p:BuildWindows=false /p:BuildPhone=false -> cd build\nuget -> set OVERRIDE_NUGET_PACKAGE=Win2D-UAP -> build-nupkg local -``` - -- This will generate a NuGet package called Win2D-UAP. +If you are building with Visual Studio 2013, then the generated package is +called "Win2D-NoUAP". This contains everything the usual Win2D package contains +apart from any universal app platform binaries. -### Using the Win2D-UAP NuGet package +## Using the Win2D NuGet package with an universal app platform application -- Install the Win2D-UAP package as usual. +- Install the Win2D package as usual. As various parts of the platform, SDK and development tools are still under development, there are some rough edges: diff --git a/build.cmd b/build.cmd index e03ca19f..e4532ec5 100644 --- a/build.cmd +++ b/build.cmd @@ -1,19 +1,44 @@ @echo off +SETLOCAL + IF "%VisualStudioVersion%" LSS "12.0" ( - ECHO Please run this script from a Visual Studio 2013 Command Prompt. - PAUSE - GOTO END + GOTO WRONG_COMMAND_PROMPT +) + +SET NOUAP= + +IF "%1" NEQ "" ( + IF "%1" == "nouap" ( + SET NOUAP=1 + ) ELSE ( + GOTO SHOW_USAGE + ) +) + +IF NOT "%NOUAP%" == "1" ( + IF "%VisualStudioVersion%" LSS "14.0" ( + ECHO Warning: Visual Studio 2015 or higher required to build with Windows universal app platform support. + ECHO Building without universal app platform support. + ECHO. + SET NOUAP=1 + ) ) WHERE /Q msbuild >NUL IF %ERRORLEVEL% NEQ 0 ( ECHO Error: It appears that 'msbuild' is not available in this environment. - ECHO Please run this script from a Visual Studio 2013 Command Prompt. - GOTO END + ECHO. + GOTO WRONG_COMMAND_PROMPT ) -msbuild "%~dp0Win2D.proj" /v:m /maxcpucount /p:BuildTests=false /p:BuildTools=false /p:BuildDocs=false /p:BuildUAP=false + +SET BUILD_UAP= +IF "%NOUAP%" == "1" ( + SET BUILD_UAP=/p:BuildUAP=false +) + +msbuild "%~dp0Win2D.proj" /v:m /maxcpucount /p:BuildTests=false /p:BuildTools=false /p:BuildDocs=false %BUILD_UAP% IF %ERRORLEVEL% NEQ 0 ( ECHO Build failed; aborting. @@ -29,9 +54,34 @@ IF %ERRORLEVEL% NEQ 0 ( ECHO. -SETLOCAL SET OVERRIDE_NUGET_PACKAGE= -CALL "%~dp0build\nuget\build-nupkg.cmd" local +IF "%NOUAP%" == "1" ( + SET OVERRIDE_NUGET_PACKAGE=Win2D-NoUAP +) -:END \ No newline at end of file +CALL "%~dp0build\nuget\build-nupkg.cmd" local +GOTO END + + +:SHOW_USAGE + +ECHO %0 [nouap] +ECHO. +ECHO nouap: pass this to disable building Windows universal app platform support +GOTO END + +:WRONG_COMMAND_PROMPT + +ECHO Please run this script from the appropriate command prompt: +ECHO. +ECHO For Visual Studio 2013, building for Windows / Phone 8.1: +ECHO - Visual Studio 2013 Command Prompt +ECHO. +ECHO For Visual Studio 2015, building for Windows / Phone 8.1 and Windows universal app platform: +ECHO - MSBuild Command Prompt for VS2015 +ECHO. +PAUSE +GOTO END + +:END diff --git a/build/nuget/Win2D-UAP-debug.nuspec b/build/nuget/Win2D-NoUAP-debug.nuspec similarity index 77% rename from build/nuget/Win2D-UAP-debug.nuspec rename to build/nuget/Win2D-NoUAP-debug.nuspec index 45d1582f..ed954325 100644 --- a/build/nuget/Win2D-UAP-debug.nuspec +++ b/build/nuget/Win2D-NoUAP-debug.nuspec @@ -1,9 +1,9 @@ - Win2D-DP7-debug + Win2D-NoUAP-debug 0.0.0-SpecifyVersionOnCommandline - Preview of Win2D with UAP support for DP7 (debug) + Win2D (debug, without universal app platform support) Microsoft win2d,microsoft Win2D debug build. Suitable for debugging Win2D itself. @@ -14,7 +14,7 @@ graphics 2D Direct2D DirectX WinRT XAML canvas drawing C# C++ Windows - + @@ -66,24 +66,7 @@ - - - - - - - - - - - - - - - - - - + diff --git a/build/nuget/Win2D-UAP.nuspec b/build/nuget/Win2D-NoUAP.nuspec similarity index 80% rename from build/nuget/Win2D-UAP.nuspec rename to build/nuget/Win2D-NoUAP.nuspec index 30f5ade3..8ad71780 100644 --- a/build/nuget/Win2D-UAP.nuspec +++ b/build/nuget/Win2D-NoUAP.nuspec @@ -1,9 +1,9 @@ - Win2D-DP7 + Win2D-NoUAP 0.0.0-SpecifyVersionOnCommandline - Preview of Win2D with UAP support for DP7 + Win2D (without universal app platform support) Microsoft win2d,microsoft An easy-to-use Windows Runtime API for immediate mode 2D graphics rendering. @@ -85,35 +85,17 @@ - - - - - - - - - - - - - - - - - - - - + + - - + + - - + + @@ -128,10 +110,6 @@ - - - - diff --git a/build/nuget/Win2D-debug.nuspec b/build/nuget/Win2D-debug.nuspec index 8f259bbb..5a87fdbc 100644 --- a/build/nuget/Win2D-debug.nuspec +++ b/build/nuget/Win2D-debug.nuspec @@ -26,6 +26,9 @@ Running with -NoPackageAnalysis suppresses the warnings. --> + + + @@ -47,6 +50,8 @@ + + @@ -61,7 +66,24 @@ - + + + + + + + + + + + + + + + + + + diff --git a/build/nuget/Win2D.nuspec b/build/nuget/Win2D.nuspec index 0e6b2098..3b43dbb2 100644 --- a/build/nuget/Win2D.nuspec +++ b/build/nuget/Win2D.nuspec @@ -45,6 +45,9 @@ Running with -NoPackageAnalysis suppresses the warnings. --> + + + @@ -66,6 +69,8 @@ + + @@ -80,7 +85,25 @@ - + + + + + + + + + + + + + + + + + + + @@ -88,7 +111,7 @@ - + @@ -105,6 +128,10 @@ + + + +