Win2D nuget package now supports UAP by default

Alternative, Win2D-NoUAP, package can be built on machines that don't have Win10 SDK installed.

build.cmd does the right thing by default.  "nouap" parameter can force building the nouap package.
This commit is contained in:
Damyan Pepper 2015-04-14 13:44:12 -07:00
Родитель 9196606ba2
Коммит a8e257593b
6 изменённых файлов: 128 добавлений и 90 удалений

Просмотреть файл

@ -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:

Просмотреть файл

@ -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
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

Просмотреть файл

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>Win2D-DP7-debug</id>
<id>Win2D-NoUAP-debug</id>
<version>0.0.0-SpecifyVersionOnCommandline</version>
<title>Preview of Win2D with UAP support for DP7 (debug)</title>
<title>Win2D (debug, without universal app platform support)</title>
<authors>Microsoft</authors>
<owners>win2d,microsoft</owners>
<description>Win2D debug build. Suitable for debugging Win2D itself.</description>
@ -14,7 +14,7 @@
<tags>graphics 2D Direct2D DirectX WinRT XAML canvas drawing C# C++ Windows</tags>
<dependencies>
<dependency id="Win2D-DP7"/>
<dependency id="Win2D-NoUAP"/>
</dependencies>
</metadata>
@ -66,24 +66,7 @@
<file src="bin\intellisense\Microsoft.Graphics.Canvas.xml" target="bin\Phone\arm" />
<file src="bin\intellisense\Microsoft.Graphics.Canvas.Numerics.xml" target="bin\Phone\arm" />
<!-- UAP -->
<file src="$bin$\UAPx86\debug\winrt.dll.UAP\Microsoft.Graphics.Canvas.dll" target="bin\UAP\x86" />
<file src="$bin$\UAPx86\debug\winrt.dll.UAP\Microsoft.Graphics.Canvas.winmd" target="bin\UAP\x86" />
<file src="bin\UAPx86\debug\winrt.dll.UAP\Microsoft.Graphics.Canvas.lib" target="bin\UAP\x86" />
<file src="bin\intellisense\Microsoft.Graphics.Canvas.xml" target="bin\UAP\x86" />
<file src="$bin$\UAParm\debug\winrt.dll.UAP\Microsoft.Graphics.Canvas.dll" target="bin\UAP\arm" />
<file src="$bin$\UAParm\debug\winrt.dll.UAP\Microsoft.Graphics.Canvas.winmd" target="bin\UAP\arm" />
<file src="bin\UAParm\debug\winrt.dll.UAP\Microsoft.Graphics.Canvas.lib" target="bin\UAP\arm" />
<file src="bin\intellisense\Microsoft.Graphics.Canvas.xml" target="bin\UAP\arm" />
<file src="$bin$\UAPx64\debug\winrt.dll.UAP\Microsoft.Graphics.Canvas.dll" target="bin\UAP\x64" />
<file src="$bin$\UAPx64\debug\winrt.dll.UAP\Microsoft.Graphics.Canvas.winmd" target="bin\UAP\x64" />
<file src="bin\UAPx64\debug\winrt.dll.UAP\Microsoft.Graphics.Canvas.lib" target="bin\UAP\x64" />
<file src="bin\intellisense\Microsoft.Graphics.Canvas.xml" target="bin\UAP\x64" />
<file src="build\nuget\Win2D-debug.props" target="build\Win2D-debug-DP7.props" />
<file src="build\nuget\Win2D-debug.props" target="build\Win2D-debug-NoUAP.props" />
<!-- SHA-1 hash of the git HEAD this package was built from -->
<file src="obj\Win2d.githash.txt" target="Win2d-debug.githash.txt" />

Просмотреть файл

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>Win2D-DP7</id>
<id>Win2D-NoUAP</id>
<version>0.0.0-SpecifyVersionOnCommandline</version>
<title>Preview of Win2D with UAP support for DP7</title>
<title>Win2D (without universal app platform support)</title>
<authors>Microsoft</authors>
<owners>win2d,microsoft</owners>
<description>An easy-to-use Windows Runtime API for immediate mode 2D graphics rendering.</description>
@ -85,35 +85,17 @@
<file src="bin\intellisense\Microsoft.Graphics.Canvas.xml" target="bin\Phone\arm" />
<file src="bin\intellisense\Microsoft.Graphics.Canvas.Numerics.xml" target="bin\Phone\arm" />
<!-- UAP -->
<file src="$bin$\UAPx86\release\winrt.dll.UAP\Microsoft.Graphics.Canvas.dll" target="bin\UAP\x86" />
<file src="$bin$\UAPx86\release\winrt.dll.UAP\Microsoft.Graphics.Canvas.winmd" target="bin\UAP\x86" />
<file src="bin\UAPx86\release\winrt.dll.UAP\Microsoft.Graphics.Canvas.lib" target="bin\UAP\x86" />
<file src="bin\intellisense\Microsoft.Graphics.Canvas.xml" target="bin\UAP\x86" />
<file src="$bin$\UAParm\release\winrt.dll.UAP\Microsoft.Graphics.Canvas.dll" target="bin\UAP\arm" />
<file src="$bin$\UAParm\release\winrt.dll.UAP\Microsoft.Graphics.Canvas.winmd" target="bin\UAP\arm" />
<file src="bin\UAParm\release\winrt.dll.UAP\Microsoft.Graphics.Canvas.lib" target="bin\UAP\arm" />
<file src="bin\intellisense\Microsoft.Graphics.Canvas.xml" target="bin\UAP\arm" />
<file src="$bin$\UAPx64\release\winrt.dll.UAP\Microsoft.Graphics.Canvas.dll" target="bin\UAP\x64" />
<file src="$bin$\UAPx64\release\winrt.dll.UAP\Microsoft.Graphics.Canvas.winmd" target="bin\UAP\x64" />
<file src="bin\UAPx64\release\winrt.dll.UAP\Microsoft.Graphics.Canvas.lib" target="bin\UAP\x64" />
<file src="bin\intellisense\Microsoft.Graphics.Canvas.xml" target="bin\UAP\x64" />
<!-- Build scripts used by managed Windows Store Apps and UAP apps -->
<file src="build\nuget\Win2D.props" target="build\win\Win2D-DP7.props" />
<file src="build\nuget\Win2D-managed.targets" target="build\win\Win2D-DP7.targets" />
<file src="build\nuget\Win2D.props" target="build\win\Win2D-NoUAP.props" />
<file src="build\nuget\Win2D-managed.targets" target="build\win\Win2D-NoUAP.targets" />
<!-- Build scripts used by managed Windows Phone Apps -->
<file src="build\nuget\Win2D.props" target="build\wpa\Win2D-DP7.props" />
<file src="build\nuget\Win2D-managed.targets" target="build\wpa\Win2D-DP7.targets" />
<file src="build\nuget\Win2D.props" target="build\wpa\Win2D-NoUAP.props" />
<file src="build\nuget\Win2D-managed.targets" target="build\wpa\Win2D-NoUAP.targets" />
<!-- Build scripts used by native apps (Windows Store, Windows Phone and UAP) -->
<file src="build\nuget\Win2D-native.targets" target="build\native\Win2D-DP7.targets" />
<file src="build\nuget\Win2D.props" target="build\native\Win2D-DP7.props" />
<file src="build\nuget\Win2D-native.targets" target="build\native\Win2D-NoUAP.targets" />
<file src="build\nuget\Win2D.props" target="build\native\Win2D-NoUAP.props" />
<!-- Header files used by native apps -->
<file src="winrt\published\Microsoft.Graphics.Canvas.DirectX.Direct3D11.interop.h" target="Include\Windows"/>
@ -128,10 +110,6 @@
<file src="bin\phonex86\release\IdlHeader\Microsoft.Graphics.Canvas.h" target="Include\Phone"/>
<file src="numerics\cpp\WindowsNumerics.*" target="Include\Phone"/>
<file src="winrt\published\Microsoft.Graphics.Canvas.Effects.interop.h" target="Include\UAP"/> <!-- TODO: remove this when it is no longer required -->
<file src="winrt\published\Microsoft.Graphics.Canvas.native.h" target="Include\UAP"/>
<file src="bin\UAPx86\release\IdlHeader\Microsoft.Graphics.Canvas.h" target="Include\UAP"/>
<!-- SHA-1 hash of the git HEAD this package was built from -->
<file src="obj\Win2d.githash.txt" />
</files>

Просмотреть файл

@ -26,6 +26,9 @@
Running with -NoPackageAnalysis suppresses the warnings.
-->
<!-- Windows -->
<file src="$bin$\windowsx86\debug\winrt.dll.windows\Microsoft.Graphics.Canvas.dll" target="bin\Windows\x86" />
<file src="$bin$\windowsx86\debug\winrt.dll.windows\Microsoft.Graphics.Canvas.winmd" target="bin\Windows\x86" />
<file src="$bin$\windowsx86\debug\dotnetnumerics.windows\Microsoft.Graphics.Canvas.Numerics.dll" target="bin\Windows\x86" />
@ -47,6 +50,8 @@
<file src="bin\intellisense\Microsoft.Graphics.Canvas.xml" target="bin\Windows\x64" />
<file src="bin\intellisense\Microsoft.Graphics.Canvas.Numerics.xml" target="bin\Windows\x64" />
<!-- Windows Phone -->
<file src="$bin$\phonex86\debug\winrt.dll.windowsphone\Microsoft.Graphics.Canvas.dll" target="bin\Phone\x86" />
<file src="$bin$\phonex86\debug\winrt.dll.windowsphone\Microsoft.Graphics.Canvas.winmd" target="bin\Phone\x86" />
<file src="$bin$\phonex86\debug\dotnetnumerics.windowsphone\Microsoft.Graphics.Canvas.Numerics.dll" target="bin\Phone\x86" />
@ -61,7 +66,24 @@
<file src="bin\intellisense\Microsoft.Graphics.Canvas.xml" target="bin\Phone\arm" />
<file src="bin\intellisense\Microsoft.Graphics.Canvas.Numerics.xml" target="bin\Phone\arm" />
<file src="build\nuget\Win2D-debug.props" target="build" />
<!-- UAP -->
<file src="$bin$\UAPx86\debug\winrt.dll.UAP\Microsoft.Graphics.Canvas.dll" target="bin\UAP\x86" />
<file src="$bin$\UAPx86\debug\winrt.dll.UAP\Microsoft.Graphics.Canvas.winmd" target="bin\UAP\x86" />
<file src="bin\UAPx86\debug\winrt.dll.UAP\Microsoft.Graphics.Canvas.lib" target="bin\UAP\x86" />
<file src="bin\intellisense\Microsoft.Graphics.Canvas.xml" target="bin\UAP\x86" />
<file src="$bin$\UAParm\debug\winrt.dll.UAP\Microsoft.Graphics.Canvas.dll" target="bin\UAP\arm" />
<file src="$bin$\UAParm\debug\winrt.dll.UAP\Microsoft.Graphics.Canvas.winmd" target="bin\UAP\arm" />
<file src="bin\UAParm\debug\winrt.dll.UAP\Microsoft.Graphics.Canvas.lib" target="bin\UAP\arm" />
<file src="bin\intellisense\Microsoft.Graphics.Canvas.xml" target="bin\UAP\arm" />
<file src="$bin$\UAPx64\debug\winrt.dll.UAP\Microsoft.Graphics.Canvas.dll" target="bin\UAP\x64" />
<file src="$bin$\UAPx64\debug\winrt.dll.UAP\Microsoft.Graphics.Canvas.winmd" target="bin\UAP\x64" />
<file src="bin\UAPx64\debug\winrt.dll.UAP\Microsoft.Graphics.Canvas.lib" target="bin\UAP\x64" />
<file src="bin\intellisense\Microsoft.Graphics.Canvas.xml" target="bin\UAP\x64" />
<file src="build\nuget\Win2D-debug.props" target="build\Win2D-debug.props" />
<!-- SHA-1 hash of the git HEAD this package was built from -->
<file src="obj\Win2d.githash.txt" target="Win2d-debug.githash.txt" />

Просмотреть файл

@ -45,6 +45,9 @@
Running with -NoPackageAnalysis suppresses the warnings.
-->
<!-- Windows -->
<file src="$bin$\windowsx86\release\winrt.dll.windows\Microsoft.Graphics.Canvas.dll" target="bin\Windows\x86" />
<file src="$bin$\windowsx86\release\winrt.dll.windows\Microsoft.Graphics.Canvas.winmd" target="bin\Windows\x86" />
<file src="$bin$\windowsx86\release\dotnetnumerics.windows\Microsoft.Graphics.Canvas.Numerics.dll" target="bin\Windows\x86" />
@ -66,6 +69,8 @@
<file src="bin\intellisense\Microsoft.Graphics.Canvas.xml" target="bin\Windows\x64" />
<file src="bin\intellisense\Microsoft.Graphics.Canvas.Numerics.xml" target="bin\Windows\x64" />
<!-- Windows Phone -->
<file src="$bin$\phonex86\release\winrt.dll.windowsphone\Microsoft.Graphics.Canvas.dll" target="bin\Phone\x86" />
<file src="$bin$\phonex86\release\winrt.dll.windowsphone\Microsoft.Graphics.Canvas.winmd" target="bin\Phone\x86" />
<file src="$bin$\phonex86\release\dotnetnumerics.windowsphone\Microsoft.Graphics.Canvas.Numerics.dll" target="bin\Phone\x86" />
@ -80,7 +85,25 @@
<file src="bin\intellisense\Microsoft.Graphics.Canvas.xml" target="bin\Phone\arm" />
<file src="bin\intellisense\Microsoft.Graphics.Canvas.Numerics.xml" target="bin\Phone\arm" />
<!-- Build scripts used by managed Windows Store Apps -->
<!-- UAP -->
<file src="$bin$\UAPx86\release\winrt.dll.UAP\Microsoft.Graphics.Canvas.dll" target="bin\UAP\x86" />
<file src="$bin$\UAPx86\release\winrt.dll.UAP\Microsoft.Graphics.Canvas.winmd" target="bin\UAP\x86" />
<file src="bin\UAPx86\release\winrt.dll.UAP\Microsoft.Graphics.Canvas.lib" target="bin\UAP\x86" />
<file src="bin\intellisense\Microsoft.Graphics.Canvas.xml" target="bin\UAP\x86" />
<file src="$bin$\UAParm\release\winrt.dll.UAP\Microsoft.Graphics.Canvas.dll" target="bin\UAP\arm" />
<file src="$bin$\UAParm\release\winrt.dll.UAP\Microsoft.Graphics.Canvas.winmd" target="bin\UAP\arm" />
<file src="bin\UAParm\release\winrt.dll.UAP\Microsoft.Graphics.Canvas.lib" target="bin\UAP\arm" />
<file src="bin\intellisense\Microsoft.Graphics.Canvas.xml" target="bin\UAP\arm" />
<file src="$bin$\UAPx64\release\winrt.dll.UAP\Microsoft.Graphics.Canvas.dll" target="bin\UAP\x64" />
<file src="$bin$\UAPx64\release\winrt.dll.UAP\Microsoft.Graphics.Canvas.winmd" target="bin\UAP\x64" />
<file src="bin\UAPx64\release\winrt.dll.UAP\Microsoft.Graphics.Canvas.lib" target="bin\UAP\x64" />
<file src="bin\intellisense\Microsoft.Graphics.Canvas.xml" target="bin\UAP\x64" />
<!-- Build scripts used by managed Windows Store Apps and UAP apps -->
<file src="build\nuget\Win2D.props" target="build\win\Win2D.props" />
<file src="build\nuget\Win2D-managed.targets" target="build\win\Win2D.targets" />
@ -88,7 +111,7 @@
<file src="build\nuget\Win2D.props" target="build\wpa\Win2D.props" />
<file src="build\nuget\Win2D-managed.targets" target="build\wpa\Win2D.targets" />
<!-- Build scripts used by native apps (Windows Store and Windows Phone) -->
<!-- Build scripts used by native apps (Windows Store, Windows Phone and UAP) -->
<file src="build\nuget\Win2D-native.targets" target="build\native\Win2D.targets" />
<file src="build\nuget\Win2D.props" target="build\native\Win2D.props" />
@ -105,6 +128,10 @@
<file src="bin\phonex86\release\IdlHeader\Microsoft.Graphics.Canvas.h" target="Include\Phone"/>
<file src="numerics\cpp\WindowsNumerics.*" target="Include\Phone"/>
<file src="winrt\published\Microsoft.Graphics.Canvas.Effects.interop.h" target="Include\UAP"/> <!-- TODO: remove this when it is no longer required -->
<file src="winrt\published\Microsoft.Graphics.Canvas.native.h" target="Include\UAP"/>
<file src="bin\UAPx86\release\IdlHeader\Microsoft.Graphics.Canvas.h" target="Include\UAP"/>
<!-- SHA-1 hash of the git HEAD this package was built from -->
<file src="obj\Win2d.githash.txt" />
</files>