mirror of
https://github.com/microsoft/WSL.git
synced 2026-06-13 04:16:04 -05:00
Create NuGet for WSLC SDK (#14388)
This commit is contained in:
@@ -19,6 +19,7 @@ parameters:
|
||||
type: object
|
||||
default:
|
||||
- Microsoft.WSL.PluginApi.nuspec
|
||||
- Microsoft.WSL.Containers.nuspec
|
||||
|
||||
- name: traceLoggingConfig
|
||||
type: string
|
||||
|
||||
@@ -7,6 +7,7 @@ parameters:
|
||||
type: object
|
||||
default:
|
||||
- Microsoft.WSL.PluginApi
|
||||
- Microsoft.WSL.Containers
|
||||
|
||||
stages:
|
||||
- stage: nuget
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
set(NUGET_PACKAGES Microsoft.WSL.PluginApi.nuspec)
|
||||
set(NUGET_PACKAGES Microsoft.WSL.PluginApi.nuspec Microsoft.WSL.Containers.nuspec)
|
||||
|
||||
# generate vars with native paths since nuget won't accept unix path separators
|
||||
cmake_path(NATIVE_PATH CMAKE_SOURCE_DIR CMAKE_SOURCE_DIR_NATIVE)
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Target Name="WSLForApps_ErrorNoPlatform" BeforeTargets="BeforeBuild" Condition="'$(WSLForApps-Platform)' == ''">
|
||||
<Error Text="wslaclient.dll could not be copied because the AnyCPU platform is being used. Please specify a platform to copy this file, using either RuntimeIdentifier, an architecture specific Platform, or explicitly with WSLForApps-Platform." />
|
||||
</Target>
|
||||
|
||||
<ItemGroup>
|
||||
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)..\runtimes\win-$(WSLForApps-Platform)\wslaclient.dll" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(WSLForApps-Platform)' == ''">
|
||||
<WSLForApps-Platform Condition="$(RuntimeIdentifier.EndsWith('-x64'))">x64</WSLForApps-Platform>
|
||||
<WSLForApps-Platform Condition="$(RuntimeIdentifier.EndsWith('-arm64'))">arm64</WSLForApps-Platform>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(WSLForApps-Platform)' == ''">
|
||||
<WSLForApps-Platform Condition="'$(Platform)' != 'AnyCPU'">$(Platform)</WSLForApps-Platform>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(MSBuildThisFileDirectory)..\Microsoft.WSL.API.common.targets" />
|
||||
|
||||
</Project>
|
||||
23
nuget/Microsoft.WSL.Containers.nuspec.in
Normal file
23
nuget/Microsoft.WSL.Containers.nuspec.in
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>Microsoft.WSL.Containers</id>
|
||||
<version>${WSL_NUGET_PACKAGE_VERSION}</version>
|
||||
<authors>Microsoft</authors>
|
||||
<projectUrl>https://github.com/microsoft/WSL</projectUrl>
|
||||
<description>WSL Containers SDK</description>
|
||||
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
|
||||
<tags>WSL</tags>
|
||||
<language>en-us</language>
|
||||
<license type="expression">MIT</license>
|
||||
<readme>docs\README.MD</readme>
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="${CMAKE_SOURCE_DIR_NATIVE}\src\windows\WslcSDK\wslcsdk.h" target="include"/>
|
||||
<file src="${CMAKE_SOURCE_DIR_NATIVE}\bin\x64\Release\wslcsdk.lib" target="runtimes\win-x64"/>
|
||||
<file src="${CMAKE_SOURCE_DIR_NATIVE}\bin\x64\Release\wslcsdk.dll" target="runtimes\win-x64"/>
|
||||
<file src="${CMAKE_SOURCE_DIR_NATIVE}\bin\arm64\Release\wslcsdk.lib" target="runtimes\win-arm64"/>
|
||||
<file src="${CMAKE_SOURCE_DIR_NATIVE}\bin\arm64\Release\wslcsdk.dll" target="runtimes\win-arm64"/>
|
||||
<file src="${CMAKE_SOURCE_DIR_NATIVE}\nuget\Microsoft.WSL.Containers\**"/>
|
||||
</files>
|
||||
</package>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Target Name="WSLCSDK_ErrorNoPlatform" BeforeTargets="PrepareForBuild" Condition="'$(WSLCSDK_Platform)' == ''">
|
||||
<Error Text="wslcsdk.dll could not be copied because the AnyCPU platform is being used. Please specify a platform to copy this file, using either RuntimeIdentifier, an architecture specific Platform, or explicitly with WSLCSDK_Platform." />
|
||||
</Target>
|
||||
|
||||
<ItemGroup>
|
||||
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)..\runtimes\win-$(WSLCSDK_Platform)\wslcsdk.dll" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(WSLCSDK_Platform)' == ''">
|
||||
<WSLCSDK_Platform>$(Platform)</WSLCSDK_Platform>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<PropertyGroup Condition="'$(WSLForApps-Platform)' == ''">
|
||||
<WSLForApps-Platform>$(Platform)</WSLForApps-Platform>
|
||||
</PropertyGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>
|
||||
$(MSBuildThisFileDirectory)..\..\include;
|
||||
@@ -12,7 +12,7 @@
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>
|
||||
wslaclient.lib;
|
||||
wslcsdk.lib;
|
||||
%(AdditionalDependencies)
|
||||
</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>
|
||||
@@ -21,4 +21,6 @@
|
||||
</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
<Import Project="$(MSBuildThisFileDirectory)..\Microsoft.WSL.Containers.common.targets" />
|
||||
</Project>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(WSLCSDK_Platform)' == ''">
|
||||
<WSLCSDK_Platform Condition="$(RuntimeIdentifier.EndsWith('-x64'))">x64</WSLCSDK_Platform>
|
||||
<WSLCSDK_Platform Condition="$(RuntimeIdentifier.EndsWith('-arm64'))">arm64</WSLCSDK_Platform>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(WSLCSDK_Platform)' == ''">
|
||||
<WSLCSDK_Platform Condition="'$(Platform)' != 'AnyCPU'">$(Platform)</WSLCSDK_Platform>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(MSBuildThisFileDirectory)..\Microsoft.WSL.Containers.common.targets" />
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user