зеркало из https://github.com/microsoft/msquic.git
Add soversion to msquic (#2095)
* Add soversion to msquic * Fix darwin packages * One more mac fix * Create symlink * Update scripts/make-packages.sh Co-authored-by: Tomas Weinfurt <tweinfurt@yahoo.com> * Update scripts/make-packages.sh Co-authored-by: Tomas Weinfurt <tweinfurt@yahoo.com> * Fix version update script * Update to 2.0 Co-authored-by: Tomas Weinfurt <tweinfurt@yahoo.com>
This commit is contained in:
Родитель
0128f2a437
Коммит
886c8788c6
|
@ -60,7 +60,7 @@ jobs:
|
|||
${{ if eq(variables['Build.Reason'], 'BatchedCI') }}:
|
||||
tags: |
|
||||
latest
|
||||
v1.10.0.$(Build.BuildId)
|
||||
v2.0.0.$(Build.BuildId)
|
||||
${{ if ne(variables['Build.Reason'], 'BatchedCI') }}:
|
||||
tags: custom-$(Build.BuildId)
|
||||
- template: .\templates\run-qns.yml
|
||||
|
|
|
@ -27,8 +27,8 @@ jobs:
|
|||
pushPkgName: msquic.${{ parameters.platform }}
|
||||
owner: quicdev@microsoft.com
|
||||
vpackToken: $(VPACK_PAT)
|
||||
majorVer: 1
|
||||
minorVer: 10
|
||||
majorVer: 2
|
||||
minorVer: 0
|
||||
patchVer: 0
|
||||
prereleaseVer: $(Build.BuildId)
|
||||
|
||||
|
|
|
@ -54,6 +54,9 @@ message(STATUS "System version: ${CMAKE_SYSTEM_VERSION}")
|
|||
message(STATUS "Platform version: ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}")
|
||||
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
|
||||
|
||||
set(QUIC_MAJOR_VERSION 2)
|
||||
set(QUIC_FULL_VERSION 2.0.0)
|
||||
|
||||
if (WIN32)
|
||||
set(CX_PLATFORM "windows")
|
||||
elseif (APPLE)
|
||||
|
|
|
@ -82,8 +82,8 @@ else
|
|||
fi
|
||||
|
||||
ARTIFACTS="artifacts/bin/${OS}/${ARCH}_${CONFIG}_openssl"
|
||||
if [ ! -e "$ARTIFACTS/libmsquic.${LIBEXT}" ]; then
|
||||
echo "$ARTIFACTS/libmsquic.${LIBEXT}" does not exist. Run build first.
|
||||
if [ ! -e "$ARTIFACTS/libmsquic.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}" ]; then
|
||||
echo "$ARTIFACTS/libmsquic.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}" does not exist. Run build first.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -94,15 +94,19 @@ fi
|
|||
mkdir -p ${OUTPUT}
|
||||
|
||||
if [ "$OS" == "linux" ]; then
|
||||
# Create symlink
|
||||
ln -s "${ARTIFACTS}/libmsquic.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}" "${ARTIFACTS}/libmsquic.${LIBEXT}.${VER_MAJOR}"
|
||||
|
||||
# RedHat/CentOS
|
||||
FILES="${ARTIFACTS}/libmsquic.${LIBEXT}=/usr/${LIBDIR}/libmsquic.${LIBEXT}"
|
||||
if [ -e "$ARTIFACTS/libmsquic.lttng.${LIBEXT}" ]; then
|
||||
FILES="${FILES} ${ARTIFACTS}/libmsquic.lttng.${LIBEXT}=/usr/${LIBDIR}/libmsquic.lttng.${LIBEXT}"
|
||||
FILES="${ARTIFACTS}/libmsquic.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}=/usr/${LIBDIR}/libmsquic.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}"
|
||||
FILES="${FILES} ${ARTIFACTS}/libmsquic.${LIBEXT}.${VER_MAJOR}=/usr/${LIBDIR}/libmsquic.${LIBEXT}.${VER_MAJOR}"
|
||||
if [ -e "$ARTIFACTS/libmsquic.lttng.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}" ]; then
|
||||
FILES="${FILES} ${ARTIFACTS}/libmsquic.lttng.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}=/usr/${LIBDIR}/libmsquic.lttng.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}"
|
||||
fi
|
||||
fpm -f -s dir -t rpm -n ${NAME} -v ${VER_MAJOR}.${VER_MINOR}.${VER_PATCH} --license MIT --url https://github.com/microsoft/msquic \
|
||||
--package "$OUTPUT" --log error \
|
||||
--description "${DESCRIPTION}" \
|
||||
--provides libmsquic.so \
|
||||
--provides libmsquic.so.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH} \
|
||||
${CONFLICTS} \
|
||||
${FILES}
|
||||
|
||||
|
@ -110,14 +114,15 @@ if [ "$OS" == "linux" ]; then
|
|||
if [ "$LIBDIR" == 'lib64' ]; then
|
||||
LIBDIR="lib/x86_64-linux-gnu"
|
||||
fi
|
||||
FILES="${ARTIFACTS}/libmsquic.${LIBEXT}=/usr/${LIBDIR}/libmsquic.${LIBEXT}"
|
||||
if [ -e "$ARTIFACTS/libmsquic.lttng.${LIBEXT}" ]; then
|
||||
FILES="${FILES} ${ARTIFACTS}/libmsquic.lttng.${LIBEXT}=/usr/${LIBDIR}/libmsquic.lttng.${LIBEXT}"
|
||||
FILES="${ARTIFACTS}/libmsquic.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}=/usr/${LIBDIR}/libmsquic.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}"
|
||||
FILES="${FILES} ${ARTIFACTS}/libmsquic.${LIBEXT}.${VER_MAJOR}=/usr/${LIBDIR}/libmsquic.${LIBEXT}.${VER_MAJOR}"
|
||||
if [ -e "$ARTIFACTS/libmsquic.lttng.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}" ]; then
|
||||
FILES="${FILES} ${ARTIFACTS}/libmsquic.lttng.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}=/usr/${LIBDIR}/libmsquic.lttng.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}"
|
||||
fi
|
||||
fpm -f -s dir -t deb -n ${NAME} -v ${VER_MAJOR}.${VER_MINOR}.${VER_PATCH} --license MIT --url https://github.com/microsoft/msquic \
|
||||
--package "$OUTPUT" --log error \
|
||||
--description "${DESCRIPTION}" \
|
||||
--provides libmsquic.so \
|
||||
--provides libmsquic.so.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH} \
|
||||
${CONFLICTS} \
|
||||
${FILES}
|
||||
fi
|
||||
|
@ -125,6 +130,6 @@ if [ "$OS" == "macos" ]; then
|
|||
fpm -f -s dir -t osxpkg -n ${NAME} -v ${VER_MAJOR}.${VER_MINOR}.${VER_PATCH} --license MIT --url https://github.com/microsoft/msquic \
|
||||
--package "$OUTPUT" --log error \
|
||||
--description "${DESCRIPTION}" \
|
||||
--provides libmsquic.dylib \
|
||||
"$ARTIFACTS/libmsquic.dylib"=/usr/local/lib/libmsquic.dylib
|
||||
--provides libmsquic.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}.dylib \
|
||||
"$ARTIFACTS/libmsquic.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}.dylib"=/usr/local/lib/libmsquic.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}.dylib
|
||||
fi
|
||||
|
|
|
@ -19,6 +19,8 @@ $ArtifactsBinDir = Join-Path $BaseArtifactsDir "bin"
|
|||
# All direct subfolders are OS's
|
||||
$Platforms = Get-ChildItem -Path $ArtifactsBinDir
|
||||
|
||||
$Version = "2.0.0"
|
||||
|
||||
$WindowsBuilds = @()
|
||||
$AllBuilds = @()
|
||||
|
||||
|
@ -81,19 +83,24 @@ foreach ($Build in $AllBuilds) {
|
|||
# Find Binaries
|
||||
|
||||
$Binaries = @()
|
||||
$DebugFolders = @()
|
||||
|
||||
if ($Platform -eq "windows" -or $Platform -eq "uwp" -or $Platform -eq "gamecore_console") {
|
||||
$Binaries += Join-Path $ArtifactsDir "msquic.dll"
|
||||
$Binaries += Join-Path $ArtifactsDir "msquic.pdb"
|
||||
} elseif ($Platform -eq "linux") {
|
||||
$Binaries += Join-Path $ArtifactsDir "libmsquic.so"
|
||||
$LttngBin = Join-Path $ArtifactsDir "libmsquic.lttng.so"
|
||||
$Binaries += Join-Path $ArtifactsDir "libmsquic.so.$Version"
|
||||
$LttngBin = Join-Path $ArtifactsDir "libmsquic.lttng.so.$Version"
|
||||
if (Test-Path $LttngBin) {
|
||||
$Binaries += $LttngBin
|
||||
}
|
||||
} else {
|
||||
# macos
|
||||
$Binaries += Join-Path $ArtifactsDir "libmsquic.dylib"
|
||||
$Binaries += Join-Path $ArtifactsDir "libmsquic.$Version.dylib"
|
||||
$DebugFolder = Join-Path $ArtifactsDir "libmsquic.$Version.dylib.dSYM"
|
||||
if (Test-Path $DebugFolder) {
|
||||
$DebugFolders += $DebugFolder
|
||||
}
|
||||
}
|
||||
|
||||
$Libraries = @()
|
||||
|
@ -125,6 +132,10 @@ foreach ($Build in $AllBuilds) {
|
|||
Copy-Item -LiteralPath $Binary -Destination $CopyToFolder -Force
|
||||
}
|
||||
|
||||
foreach ($DebugFolder in $DebugFolders) {
|
||||
Copy-Item -Path $DebugFolder -Destination $BinFolder -Recurse
|
||||
}
|
||||
|
||||
foreach ($Library in $Libraries) {
|
||||
$FileName = Split-Path -Path $Library -Leaf
|
||||
$CopyToFolder = (Join-Path $LibFolder $FileName)
|
||||
|
|
|
@ -141,7 +141,7 @@ $DistDir = Join-Path $BaseArtifactsDir "dist"
|
|||
$CurrentCommitHash = Get-GitHash -RepoDir $RootDir
|
||||
$RepoRemote = Get-GitRemote -RepoDir $RootDir
|
||||
|
||||
$Version = "1.10.0"
|
||||
$Version = "2.0.0"
|
||||
|
||||
$BuildId = $env:BUILD_BUILDID
|
||||
if ($null -ne $BuildId) {
|
||||
|
|
|
@ -28,7 +28,9 @@ $MsQuicVerFilePath = Join-Path $RootDir "src" "inc" "msquic.ver"
|
|||
$CreateVPackFilePath = Join-Path $RootDir ".azure" "obtemplates" "push-vpack.yml"
|
||||
$QnsFilePath = Join-Path $RootDir ".azure" "azure-pipelines.qns.yml"
|
||||
$NugetPackageFile = Join-Path $RootDir "scripts" "package-nuget.ps1"
|
||||
$DistributionFile = Join-Path $RootDir "scripts" "package-distribution.ps1"
|
||||
$FrameworkInfoFile = Join-Path $RootDir "src" "distribution" "Info.plist"
|
||||
$CMakeFile = Join-Path $RootDir "CMakeLists.txt"
|
||||
$VersionsWriteFile = Join-Path $RootDir "scripts" "write-versions.ps1"
|
||||
|
||||
# Get the current version number from the msquic.ver file.
|
||||
|
@ -55,11 +57,6 @@ Write-Host " New version: $NewVerMajor.$NewVerMinor.$NewVerPatch"
|
|||
-replace "#define VER_MINOR (.*)", "#define VER_MINOR $NewVerMinor" `
|
||||
-replace "#define VER_PATCH (.*)", "#define VER_PATCH $NewVerPatch" |`
|
||||
Out-File $MsQuicVerFilePath
|
||||
(Get-Content $CreatePackageFilePath) `
|
||||
-replace "majorVer: (.*)", "majorVer: $NewVerMajor" `
|
||||
-replace "minorVer: (.*)", "minorVer: $NewVerMinor" `
|
||||
-replace "patchVer: (.*)", "patchVer: $NewVerPatch" |`
|
||||
Out-File $CreatePackageFilePath
|
||||
(Get-Content $CreateVPackFilePath) `
|
||||
-replace "majorVer: (.*)", "majorVer: $NewVerMajor" `
|
||||
-replace "minorVer: (.*)", "minorVer: $NewVerMinor" `
|
||||
|
@ -74,6 +71,15 @@ Write-Host " New version: $NewVerMajor.$NewVerMinor.$NewVerPatch"
|
|||
(Get-Content $FrameworkInfoFile) `
|
||||
-replace "$VerMajor.$VerMinor.$VerPatch", "$NewVerMajor.$NewVerMinor.$NewVerPatch" |`
|
||||
Out-File $FrameworkInfoFile
|
||||
(Get-Content $DistributionFile) `
|
||||
-replace "$VerMajor.$VerMinor.$VerPatch", "$NewVerMajor.$NewVerMinor.$NewVerPatch" |`
|
||||
Out-File $DistributionFile
|
||||
(Get-Content $CMakeFile) `
|
||||
-replace "`set\(QUIC_MAJOR_VERSION $VerMajor\)", "set(QUIC_MAJOR_VERSION $NewVerMajor)" |`
|
||||
Out-File $CMakeFile
|
||||
(Get-Content $CMakeFile) `
|
||||
-replace "set\(QUIC_FULL_VERSION $VerMajor.$VerMinor.$VerPatch\)", "set(QUIC_FULL_VERSION $NewVerMajor.$NewVerMinor.$NewVerPatch)" |`
|
||||
Out-File $CMakeFile
|
||||
(Get-Content $VersionsWriteFile) `
|
||||
-replace "$VerMajor.$VerMinor.$VerPatch", "$NewVerMajor.$NewVerMinor.$NewVerPatch" |`
|
||||
Out-File $VersionsWriteFile
|
||||
|
|
|
@ -26,7 +26,7 @@ $ArtifactsDir = $BuildConfig.ArtifactsDir
|
|||
$SourceVersion = $env:BUILD_SOURCEVERSION;
|
||||
$SourceBranch = $env:BUILD_SOURCEBRANCH;
|
||||
$BuildId = $env:BUILD_BUILDID;
|
||||
$VersionNumber = "1.10.0";
|
||||
$VersionNumber = "2.0.0";
|
||||
|
||||
class BuildData {
|
||||
[string]$SourceVersion;
|
||||
|
|
|
@ -13,6 +13,9 @@ if(BUILD_SHARED_LIBS)
|
|||
add_library(msquic SHARED ${SOURCES})
|
||||
target_link_libraries(msquic PRIVATE core platform inc warnings logging base_link main_binary_link_args)
|
||||
set_target_properties(msquic PROPERTIES OUTPUT_NAME ${QUIC_LIBRARY_NAME})
|
||||
if (NOT WIN32)
|
||||
set_target_properties(msquic PROPERTIES SOVERSION ${QUIC_MAJOR_VERSION} VERSION ${QUIC_FULL_VERSION})
|
||||
endif()
|
||||
else()
|
||||
add_library(msquic_static STATIC static/empty.c)
|
||||
target_link_libraries(msquic_static PRIVATE core platform inc logging main_binary_link_args)
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.10.0</string>
|
||||
<string>2.0.0</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>MIT</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
|
|
|
@ -21,6 +21,7 @@ if(QUIC_ENABLE_LOGGING)
|
|||
target_compile_definitions(msquic.lttng PRIVATE BUILDING_TRACEPOINT_PROVIDER)
|
||||
target_link_libraries(msquic.lttng PRIVATE logging_inc inc)
|
||||
target_link_libraries(msquic.lttng PRIVATE ${LTTNGUST_LIBRARIES})
|
||||
set_target_properties(msquic.lttng PROPERTIES SOVERSION ${QUIC_FULL_VERSION} VERSION ${QUIC_FULL_VERSION})
|
||||
|
||||
install(TARGETS msquic.lttng DESTINATION lib)
|
||||
endif()
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
//
|
||||
|
||||
#ifndef VER_MAJOR
|
||||
#define VER_MAJOR 1
|
||||
#define VER_MAJOR 2
|
||||
#endif
|
||||
|
||||
#ifndef VER_MINOR
|
||||
#define VER_MINOR 10
|
||||
#define VER_MINOR 0
|
||||
#endif
|
||||
|
||||
#ifndef VER_PATCH
|
||||
|
|
|
@ -21,6 +21,8 @@ Environment:
|
|||
#include <limits.h>
|
||||
#include <sched.h>
|
||||
#include <syslog.h>
|
||||
#define QUIC_VERSION_ONLY 1
|
||||
#include "msquic.ver"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "platform_posix.c.clog.h"
|
||||
#endif
|
||||
|
@ -31,7 +33,12 @@ CX_PLATFORM CxPlatform = { NULL };
|
|||
int RandomFd; // Used for reading random numbers.
|
||||
QUIC_TRACE_RUNDOWN_CALLBACK* QuicTraceRundownCallback;
|
||||
|
||||
static const char TpLibName[] = "libmsquic.lttng.so";
|
||||
#define STR_HELPER(x) #x
|
||||
#define STR(x) STR_HELPER(x)
|
||||
|
||||
#define LIBRARY_VERSION STR(VER_MAJOR) "." STR(VER_MINOR) "." STR(VER_PATCH)
|
||||
|
||||
static const char TpLibName[] = "libmsquic.lttng.so." LIBRARY_VERSION;
|
||||
|
||||
uint32_t CxPlatProcessorCount;
|
||||
|
||||
|
@ -112,7 +119,7 @@ CxPlatSystemLoad(
|
|||
}
|
||||
|
||||
if (!ShouldLoad) {
|
||||
return;
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -121,7 +128,7 @@ CxPlatSystemLoad(
|
|||
Dl_info Info;
|
||||
int Succeeded = dladdr((void *)CxPlatSystemLoad, &Info);
|
||||
if (!Succeeded) {
|
||||
return;
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
size_t PathLen = strlen(Info.dli_fname);
|
||||
|
@ -138,7 +145,7 @@ CxPlatSystemLoad(
|
|||
}
|
||||
|
||||
if (LastTrailingSlashLen == -1) {
|
||||
return;
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
size_t TpLibNameLen = strlen(TpLibName);
|
||||
|
@ -146,7 +153,7 @@ CxPlatSystemLoad(
|
|||
|
||||
char* ProviderFullPath = CXPLAT_ALLOC_PAGED(ProviderFullPathLength, QUIC_POOL_PLATFORM_TMP_ALLOC);
|
||||
if (ProviderFullPath == NULL) {
|
||||
return;
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
CxPlatCopyMemory(ProviderFullPath, Info.dli_fname, LastTrailingSlashLen);
|
||||
|
@ -161,6 +168,8 @@ CxPlatSystemLoad(
|
|||
|
||||
CXPLAT_FREE(ProviderFullPath, QUIC_POOL_PLATFORM_TMP_ALLOC);
|
||||
|
||||
Exit:
|
||||
|
||||
QuicTraceLogInfo(
|
||||
PosixLoaded,
|
||||
"[ dso] Loaded");
|
||||
|
|
Загрузка…
Ссылка в новой задаче