From 48fb43c3eb22175db0c5a9f9337efefc906cea84 Mon Sep 17 00:00:00 2001 From: Carlos Fonseca M Date: Tue, 21 Jul 2020 10:31:22 -0600 Subject: [PATCH] Add UWP Nuget packing support --- native_client/dotnet/DeepSpeech.sln | 6 +- .../DeepSpeechClient/DeepSpeechClient.csproj | 87 +++++++------------ .../Properties/AssemblyInfo.cs | 36 -------- taskcluster/.shared.yml | 8 +- taskcluster/tc-build-utils.sh | 18 +++- taskcluster/win-opt-base.tyml | 2 +- taskcluster/worker.cyml | 4 +- 7 files changed, 57 insertions(+), 104 deletions(-) delete mode 100644 native_client/dotnet/DeepSpeechClient/Properties/AssemblyInfo.cs diff --git a/native_client/dotnet/DeepSpeech.sln b/native_client/dotnet/DeepSpeech.sln index 091f2062..78afe7db 100644 --- a/native_client/dotnet/DeepSpeech.sln +++ b/native_client/dotnet/DeepSpeech.sln @@ -1,8 +1,8 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.28307.136 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30204.135 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeepSpeechClient", "DeepSpeechClient\DeepSpeechClient.csproj", "{56DE4091-BBBE-47E4-852D-7268B33B971F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DeepSpeechClient", "DeepSpeechClient\DeepSpeechClient.csproj", "{56DE4091-BBBE-47E4-852D-7268B33B971F}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeepSpeechConsole", "DeepSpeechConsole\DeepSpeechConsole.csproj", "{312965E5-C4F6-4D95-BA64-79906B8BC7AC}" EndProject diff --git a/native_client/dotnet/DeepSpeechClient/DeepSpeechClient.csproj b/native_client/dotnet/DeepSpeechClient/DeepSpeechClient.csproj index 0139b3e8..33a94115 100644 --- a/native_client/dotnet/DeepSpeechClient/DeepSpeechClient.csproj +++ b/native_client/dotnet/DeepSpeechClient/DeepSpeechClient.csproj @@ -1,63 +1,42 @@ - - - + - Debug - AnyCPU - {56DE4091-BBBE-47E4-852D-7268B33B971F} - Library - Properties - DeepSpeechClient - DeepSpeechClient - v4.6.2 - 512 - true + Library + net452;net46;net47;uap10.0 + x64 - - true - bin\x64\Debug\ - DEBUG;TRACE - true - full + x64 - prompt - MinimumRecommendedRules.ruleset - - bin\x64\Release\ - TRACE - true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset + true - - - - - - - - - + + true + x64 + + + + false + UAP,Version=v10.0 + UAP + 10.0.19041.0 + 10.0.10240.0 + .NETCore + v5.0 + $(DefineConstants);WINDOWS_UWP + $(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets + None + + + + - - - - - - - - - - - - - + - - - \ No newline at end of file + + + + $(DefineConstants);NO_HTTPS + + diff --git a/native_client/dotnet/DeepSpeechClient/Properties/AssemblyInfo.cs b/native_client/dotnet/DeepSpeechClient/Properties/AssemblyInfo.cs deleted file mode 100644 index 96e05580..00000000 --- a/native_client/dotnet/DeepSpeechClient/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("DeepSpeechClient")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("DeepSpeechClient")] -[assembly: AssemblyCopyright("Copyright © 2018")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("56de4091-bbbe-47e4-852d-7268b33b971f")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/taskcluster/.shared.yml b/taskcluster/.shared.yml index 03bdd3fd..3b9ad525 100644 --- a/taskcluster/.shared.yml +++ b/taskcluster/.shared.yml @@ -161,11 +161,11 @@ system: url: "https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.tensorflow.pip.r2.2.0854bb5188a3150a4d75a1c71ee610b0d45cfcb1.android-armv7/artifacts/public/home.tar.xz" namespace: "project.deepspeech.tensorflow.pip.r2.2.0854bb5188a3150a4d75a1c71ee610b0d45cfcb1.android-armv7" win_amd64_cpu: - url: "https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.tensorflow.pip.r2.2.0854bb5188a3150a4d75a1c71ee610b0d45cfcb1.win/artifacts/public/home.tar.xz" - namespace: "project.deepspeech.tensorflow.pip.r2.2.0854bb5188a3150a4d75a1c71ee610b0d45cfcb1.win" + url: "https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.tensorflow.pip.r2.2.518c1d04bf55d362bb11e973b8f5d0aa3e5bf44d.2.win/artifacts/public/home.tar.xz" + namespace: "project.deepspeech.tensorflow.pip.r2.2.518c1d04bf55d362bb11e973b8f5d0aa3e5bf44d.2.win" win_amd64_cuda: - url: "https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.tensorflow.pip.r2.2.0854bb5188a3150a4d75a1c71ee610b0d45cfcb1.win-cuda/artifacts/public/home.tar.xz" - namespace: "project.deepspeech.tensorflow.pip.r2.2.0854bb5188a3150a4d75a1c71ee610b0d45cfcb1.win-cuda" + url: "https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.tensorflow.pip.r2.2.518c1d04bf55d362bb11e973b8f5d0aa3e5bf44d.2.win-cuda/artifacts/public/home.tar.xz" + namespace: "project.deepspeech.tensorflow.pip.r2.2.518c1d04bf55d362bb11e973b8f5d0aa3e5bf44d.2.win-cuda" ios_arm64: url: "https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.tensorflow.pip.r2.2.0854bb5188a3150a4d75a1c71ee610b0d45cfcb1.3.ios_arm64/artifacts/public/home.tar.xz" namespace: "project.deepspeech.tensorflow.pip.r2.2.0854bb5188a3150a4d75a1c71ee610b0d45cfcb1.3.ios_arm64" diff --git a/taskcluster/tc-build-utils.sh b/taskcluster/tc-build-utils.sh index 75645582..4088a7ce 100755 --- a/taskcluster/tc-build-utils.sh +++ b/taskcluster/tc-build-utils.sh @@ -231,7 +231,7 @@ do_deepspeech_netframework_build() cd ${DS_DSDIR}/native_client/dotnet # Setup dependencies - nuget install DeepSpeechConsole/packages.config -OutputDirectory packages/ + nuget restore DeepSpeech.sln MSBUILD="$(cygpath 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe')" @@ -242,23 +242,30 @@ do_deepspeech_netframework_build() DeepSpeechClient/DeepSpeechClient.csproj \ /p:Configuration=Release \ /p:Platform=x64 \ - /p:TargetFrameworkVersion="v4.5.2" \ + /p:TargetFramework="net452" \ /p:OutputPath=bin/nuget/x64/v4.5 MSYS2_ARG_CONV_EXCL='/' "${MSBUILD}" \ DeepSpeechClient/DeepSpeechClient.csproj \ /p:Configuration=Release \ /p:Platform=x64 \ - /p:TargetFrameworkVersion="v4.6" \ + /p:TargetFramework="net46" \ /p:OutputPath=bin/nuget/x64/v4.6 MSYS2_ARG_CONV_EXCL='/' "${MSBUILD}" \ DeepSpeechClient/DeepSpeechClient.csproj \ /p:Configuration=Release \ /p:Platform=x64 \ - /p:TargetFrameworkVersion="v4.7" \ + /p:TargetFramework="net47" \ /p:OutputPath=bin/nuget/x64/v4.7 + MSYS2_ARG_CONV_EXCL='/' "${MSBUILD}" \ + DeepSpeechClient/DeepSpeechClient.csproj \ + /p:Configuration=Release \ + /p:Platform=x64 \ + /p:TargetFramework="uap10.0" \ + /p:OutputPath=bin/nuget/x64/uap10.0 + MSYS2_ARG_CONV_EXCL='/' "${MSBUILD}" \ DeepSpeechConsole/DeepSpeechConsole.csproj \ /p:Configuration=Release \ @@ -307,6 +314,9 @@ do_nuget_build() mkdir -p nupkg/lib/net47/ cp DeepSpeechClient/bin/nuget/x64/v4.7/DeepSpeechClient.dll nupkg/lib/net47/ + mkdir -p nupkg/lib/uap10.0/ + cp DeepSpeechClient/bin/nuget/x64/uap10.0/DeepSpeechClient.dll nupkg/lib/uap10.0/ + PROJECT_VERSION=$(strip "${DS_VERSION}") sed \ -e "s/\$NUPKG_ID/${PROJECT_NAME}/" \ diff --git a/taskcluster/win-opt-base.tyml b/taskcluster/win-opt-base.tyml index b402e4b2..db232e24 100644 --- a/taskcluster/win-opt-base.tyml +++ b/taskcluster/win-opt-base.tyml @@ -43,7 +43,7 @@ payload: - .\msys64\usr\bin\bash.exe --login -cx "pacman -Syu --noconfirm" - echo .\msys64\usr\bin\bash.exe --login -cxe " export LC_ALL=C && - export PATH=\"/c/builds/tc-workdir/msys64/usr/bin:/c/Python36:/c/Program Files/Git/bin:/c/Program Files/7-Zip/:/c/Program Files (x86)/Windows Kits/10/bin/x64/:$PATH\" && + export PATH=\"/c/builds/tc-workdir/msys64/usr/bin:/c/Python36:/c/Program Files/Git/bin:/c/Program Files/7-Zip/:/c/Program Files (x86)/Windows Kits/10/bin/x64/:/c/Program Files/dotnet/:$PATH\" && export TASKCLUSTER_ARTIFACTS=\"$USERPROFILE/public\" && export TASKCLUSTER_TASK_DIR=\"/c/builds/tc-workdir/\" && (mkdir $TASKCLUSTER_TASK_DIR || rm -fr $TASKCLUSTER_TASK_DIR/*) && cd $TASKCLUSTER_TASK_DIR && diff --git a/taskcluster/worker.cyml b/taskcluster/worker.cyml index 65c5c895..9ef5a85e 100644 --- a/taskcluster/worker.cyml +++ b/taskcluster/worker.cyml @@ -4,8 +4,8 @@ taskcluster: provisionerId: proj-deepspeech workerType: ci workerTypeKvm: kvm - workerTypeWin: win - workerTypeCuda: win-gpu-b + workerTypeWin: win-b + workerTypeCuda: win-gpu dockerrpi3: provisionerId: proj-deepspeech workerType: ds-rpi3