diff --git a/Directory.Build.props b/Directory.Build.props index 22bb8e06..0c2ad8c2 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,14 +1,39 @@ - <_hostOS>Linux - <_hostOS Condition="$([MSBuild]::IsOSPlatform('OSX'))">OSX - <_hostOS Condition="$([MSBuild]::IsOSPlatform('FREEBSD'))">FreeBSD - <_hostOS Condition="$([MSBuild]::IsOSPlatform('NETBSD'))">NetBSD + <_hostOS>linux + <_hostOS Condition="$([MSBuild]::IsOSPlatform('OSX'))">osx + <_hostOS Condition="$([MSBuild]::IsOSPlatform('FREEBSD'))">freebsd + <_hostOS Condition="$([MSBuild]::IsOSPlatform('NETBSD'))">netbsd <_hostOS Condition="$([MSBuild]::IsOSPlatform('ILLUMOS'))">illumos - <_hostOS Condition="$([MSBuild]::IsOSPlatform('SOLARIS'))">Solaris + <_hostOS Condition="$([MSBuild]::IsOSPlatform('SOLARIS'))">solaris <_hostOS Condition="$([MSBuild]::IsOSPlatform('WINDOWS'))">windows $(_hostOS) $(_hostOS) + + <_hostRid Condition="'$(MSBuildRuntimeType)' == 'core'">$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier) + <_hostRid Condition="'$(MSBuildRuntimeType)' != 'core'">win-$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLowerInvariant) + <_parseDistroRid>$(__DistroRid) + <_parseDistroRid Condition="'$(_parseDistroRid)' == ''">$(_hostRid) + <_distroRidIndex>$(_parseDistroRid.LastIndexOf('-')) + + <_runtimeOS Condition="'$(_runtimeOS)' == ''">$(_parseDistroRid.SubString(0, $(_distroRidIndex))) + + <_portableOS>linux + <_portableOS Condition="'$(_runtimeOS)' == 'linux-musl' or $(_runtimeOS.StartsWith('alpine'))">linux-musl + <_portableOS Condition="'$(_runtimeOS)' == 'linux-bionic'">linux-bionic + <_portableOS Condition="'$(_hostOS)' == 'osx'">osx + <_portableOS Condition="$(_runtimeOS.StartsWith('win')) or '$(TargetOS)' == 'windows'">win + <_portableOS Condition="'$(_runtimeOS)' == 'freebsd' or '$(TargetOS)' == 'freebsd'">freebsd + <_portableOS Condition="'$(_runtimeOS)' == 'illumos' or '$(TargetOS)' == 'illumos'">illumos + <_portableOS Condition="'$(_runtimeOS)' == 'solaris' or '$(TargetOS)' == 'solaris'">solaris + <_portableOS Condition="'$(_runtimeOS)' == 'maccatalyst'">maccatalyst + <_portableOS Condition="'$(_runtimeOS)' == 'ios'">ios + <_portableOS Condition="'$(_runtimeOS)' == 'iossimulator'">iossimulator + <_portableOS Condition="'$(_runtimeOS)' == 'tvos'">tvos + <_portableOS Condition="'$(_runtimeOS)' == 'tvossimulator'">tvossimulator + <_portableOS Condition="'$(_runtimeOS)' == 'android'">android + + <_runtimeOS>$(_portableOS) @@ -27,6 +52,52 @@ $(TargetArchitecture) + + <_packageLibc Condition="$(TargetOS.Contains('musl'))">-musl + <_packageOS>$(_portableOS)$(_packageLibc) + $(_packageOS)-$(TargetArchitecture) + $(_hostRid) + $(PackageRID) + $(_portableOS)-$(TargetArchitecture) + + + + lib + .exe + + + + + + + .dll + .lib + .pdb + + + + + lib + .dylib + .a + .dwarf + + + + + lib + .so + .a + .dbg + + + + + + + + + @@ -36,7 +107,7 @@ embedded true Latest - true + false alpha 1 diff --git a/build.cmd b/build.cmd index 63002134..7d704cb6 100644 --- a/build.cmd +++ b/build.cmd @@ -2,5 +2,5 @@ setlocal set PATH=%CD%\src\msquic\artifacts\dotnet-tools;%PATH% -powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\common\Build.ps1""" -warnAsError:$false -restore -pack %*" +powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\common\Build.ps1""" -warnAsError:$false -build -restore -pack %*" exit /b %ErrorLevel% \ No newline at end of file diff --git a/build.sh b/build.sh index 9dcabb5f..3813a1e4 100755 --- a/build.sh +++ b/build.sh @@ -14,4 +14,4 @@ done scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" export PATH=$PATH:$scriptroot/src/msquic/artifacts/dotnet-tools -"$scriptroot/eng/common/build.sh" --warnAsError false --build --restore $@ +"$scriptroot/eng/common/build.sh" --warnAsError false --build --restore --pack $@ diff --git a/eng/Build.props b/eng/Build.props index 50dfcea1..23bf4b5c 100644 --- a/eng/Build.props +++ b/eng/Build.props @@ -1,5 +1,5 @@ - + diff --git a/src/System.Net.MsQuic.Transport/System.Net.MsQuic.Transport.csproj b/src/System.Net.MsQuic.Transport/System.Net.MsQuic.Transport.csproj deleted file mode 100644 index 02f86d70..00000000 --- a/src/System.Net.MsQuic.Transport/System.Net.MsQuic.Transport.csproj +++ /dev/null @@ -1,26 +0,0 @@ - - - net6.0 - false - true - false - true - - - - - - - - - - - -SysRoot /crossrootfs/$(TargetArchitecture) - - - - - - diff --git a/src/System.Net.MsQuic.Transport/System.Net.MsQuic.Transport.proj b/src/System.Net.MsQuic.Transport/System.Net.MsQuic.Transport.proj new file mode 100644 index 00000000..a683110b --- /dev/null +++ b/src/System.Net.MsQuic.Transport/System.Net.MsQuic.Transport.proj @@ -0,0 +1,34 @@ + + + netstandard2.0 + true + false + true + false + false + + $(NoWarn);NU5128 + + + + + + + + + $(ExtraMsquicArgs) -SysRoot /crossrootfs/$(TargetArchitecture) + + + + + + + + + + diff --git a/src/System.Net.MsQuic.Transport/pkg/runtime.linux-arm.runtime.native.System.Net.MsQuic.Transport.proj b/src/System.Net.MsQuic.Transport/pkg/runtime.linux-arm.runtime.native.System.Net.MsQuic.Transport.proj new file mode 100644 index 00000000..4a4e0af8 --- /dev/null +++ b/src/System.Net.MsQuic.Transport/pkg/runtime.linux-arm.runtime.native.System.Net.MsQuic.Transport.proj @@ -0,0 +1,6 @@ + + + linux-arm + + + diff --git a/src/System.Net.MsQuic.Transport/pkg/runtime.linux-arm64.runtime.native.System.Net.MsQuic.Transport.proj b/src/System.Net.MsQuic.Transport/pkg/runtime.linux-arm64.runtime.native.System.Net.MsQuic.Transport.proj new file mode 100644 index 00000000..da937c7f --- /dev/null +++ b/src/System.Net.MsQuic.Transport/pkg/runtime.linux-arm64.runtime.native.System.Net.MsQuic.Transport.proj @@ -0,0 +1,6 @@ + + + linux-arm64 + + + diff --git a/src/System.Net.MsQuic.Transport/pkg/runtime.linux-x64.runtime.native.System.Net.MsQuic.Transport.proj b/src/System.Net.MsQuic.Transport/pkg/runtime.linux-x64.runtime.native.System.Net.MsQuic.Transport.proj new file mode 100644 index 00000000..052cca68 --- /dev/null +++ b/src/System.Net.MsQuic.Transport/pkg/runtime.linux-x64.runtime.native.System.Net.MsQuic.Transport.proj @@ -0,0 +1,6 @@ + + + linux-x64 + + + diff --git a/src/System.Net.MsQuic.Transport/pkg/runtime.native.System.Net.MsQuic.Transport.proj b/src/System.Net.MsQuic.Transport/pkg/runtime.native.System.Net.MsQuic.Transport.proj deleted file mode 100644 index 81eb8e04..00000000 --- a/src/System.Net.MsQuic.Transport/pkg/runtime.native.System.Net.MsQuic.Transport.proj +++ /dev/null @@ -1,17 +0,0 @@ - - - netstandard2.0 - true - - false - - $(NoWarn);NU5128 - - - - - - - diff --git a/src/System.Net.MsQuic.Transport/pkg/runtime.native.System.Net.MsQuic.Transport.props b/src/System.Net.MsQuic.Transport/pkg/runtime.native.System.Net.MsQuic.Transport.props index f7273928..dff4c047 100644 --- a/src/System.Net.MsQuic.Transport/pkg/runtime.native.System.Net.MsQuic.Transport.props +++ b/src/System.Net.MsQuic.Transport/pkg/runtime.native.System.Net.MsQuic.Transport.props @@ -1,28 +1,45 @@ + true netstandard2.0 true true - true - $(SymbolsSuffix) + false + true + true + + true $(TargetsForTfmSpecificDebugSymbolsInPackage);AddRuntimeSpecificNativeSymbolToPackage - true + $(SymbolsSuffix) $(NoWarn);NU5128 + + openssl + schannel + $(TargetOS) + macos + $([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'msquic', 'artifacts', 'bin', '$(OsFolder)', '$(TargetArchitecture)_$(Configuration)_$(TlsFlavor)')) - + + <_SymbolFilePath>$([MSBuild]::NormalizePath('$(NativeBinDir)', '$(LibPrefix)msquic$(SymbolsSuffix)')) + + + + - diff --git a/src/System.Net.MsQuic.Transport/pkg/runtime.osx-x64.runtime.native.System.Net.MsQuic.Transport.proj b/src/System.Net.MsQuic.Transport/pkg/runtime.osx-x64.runtime.native.System.Net.MsQuic.Transport.proj new file mode 100644 index 00000000..953cfb81 --- /dev/null +++ b/src/System.Net.MsQuic.Transport/pkg/runtime.osx-x64.runtime.native.System.Net.MsQuic.Transport.proj @@ -0,0 +1,6 @@ + + + osx-x64 + + + diff --git a/src/System.Net.MsQuic.Transport/pkg/runtime.win-arm64.runtime.native.System.Net.MsQuic.Transport.proj b/src/System.Net.MsQuic.Transport/pkg/runtime.win-arm64.runtime.native.System.Net.MsQuic.Transport.proj index 66481ec1..cfc67ce1 100644 --- a/src/System.Net.MsQuic.Transport/pkg/runtime.win-arm64.runtime.native.System.Net.MsQuic.Transport.proj +++ b/src/System.Net.MsQuic.Transport/pkg/runtime.win-arm64.runtime.native.System.Net.MsQuic.Transport.proj @@ -1,7 +1,6 @@ - - - true + win-arm64 + diff --git a/src/System.Net.MsQuic.Transport/pkg/runtime.win-x64.runtime.native.System.Net.MsQuic.Transport.proj b/src/System.Net.MsQuic.Transport/pkg/runtime.win-x64.runtime.native.System.Net.MsQuic.Transport.proj index 66481ec1..7d38d312 100644 --- a/src/System.Net.MsQuic.Transport/pkg/runtime.win-x64.runtime.native.System.Net.MsQuic.Transport.proj +++ b/src/System.Net.MsQuic.Transport/pkg/runtime.win-x64.runtime.native.System.Net.MsQuic.Transport.proj @@ -1,7 +1,6 @@ - - - true + win-x64 + diff --git a/src/System.Net.MsQuic.Transport/pkg/runtime.win-x86.runtime.native.System.Net.MsQuic.Transport.proj b/src/System.Net.MsQuic.Transport/pkg/runtime.win-x86.runtime.native.System.Net.MsQuic.Transport.proj index 66481ec1..cca477dc 100644 --- a/src/System.Net.MsQuic.Transport/pkg/runtime.win-x86.runtime.native.System.Net.MsQuic.Transport.proj +++ b/src/System.Net.MsQuic.Transport/pkg/runtime.win-x86.runtime.native.System.Net.MsQuic.Transport.proj @@ -1,7 +1,6 @@ - - - true + win-x86 +