From: Jeremy Koritzinsky Date: Fri, 18 Oct 2019 22:21:23 +0000 (-0700) Subject: Changes to prepare for consolidation (dotnet/core-setup#8593) X-Git-Tag: submit/tizen/20210909.063632~11032^2~25 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d1e298261693810eaf560189dd6c2af9f459a636;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Changes to prepare for consolidation (dotnet/core-setup#8593) * Write an empty global.json for tests so they don't use the repo's global.json * Create new SetupRoot variable that represents the root of core-setup. Convert usages of RepoRoot and ProjectDir to either SetupRoot or RepoRoot depending on if they need files that are at the root of the repo or are setup-specific. * regenerate-readme-table should always target the root README. * Make pack-managed.proj an SDK project. * Make the root directory of the repository configurable in corehost/build.cmd and corehost/build.sh. * Rename LICENSE.TXT to LICENSE. Set properties for the Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk so we don't need to customize them during consolidation. * Update Microsoft.DotNet.Build.SharedFramework.Sdk version. * Update eng/Version.Details.xml Co-Authored-By: Davis Goodin Commit migrated from https://github.com/dotnet/core-setup/commit/96ec25abe981ac689e260efe946db419b157f5f1 --- diff --git a/src/installer/LICENSE b/src/installer/LICENSE new file mode 100644 index 0000000..984713a --- /dev/null +++ b/src/installer/LICENSE @@ -0,0 +1,23 @@ +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/src/installer/corehost/build.cmd b/src/installer/corehost/build.cmd index 7983568..b22f254 100644 --- a/src/installer/corehost/build.cmd +++ b/src/installer/corehost/build.cmd @@ -4,9 +4,6 @@ setlocal :SetupArgs :: Initialize the args that will be passed to cmake set __nativeWindowsDir=%~dp0Windows -set __binDir=%~dp0..\..\artifacts\bin -set __objDir=%~dp0..\..\artifacts\obj -set __rootDir=%~dp0..\.. set __CMakeBinDir="" set __IntermediatesDir="" set __BuildArch=x64 @@ -40,6 +37,7 @@ if /i [%1] == [policyver] (set __HostPolicyVersion=%2&&shift&&shift&goto Arg_L if /i [%1] == [commit] (set __CommitSha=%2&&shift&&shift&goto Arg_Loop) if /i [%1] == [incremental-native-build] ( set __IncrementalNativeBuild=1&&shift&goto Arg_Loop) +if /i [%1] == [rootDir] ( set __rootDir=%2&&shift&&shift&goto Arg_Loop) shift goto :Arg_Loop @@ -87,6 +85,15 @@ set __VSVersion=15 2017 call "%VS150COMNTOOLS%..\..\VC\Auxiliary\Build\vcvarsall.bat" %__VCBuildArch% :SetupDirs + +if %__rootDir% == "" ( + echo Root directory must be provided via the rootDir parameter. + exit /b 1 +) + +set __binDir=%__rootDir%\artifacts\bin +set __objDir=%__rootDir%\artifacts\obj + :: Setup to cmake the native components echo Commencing build of corehost echo. @@ -137,8 +144,6 @@ goto :Failure :: Build the project created by Cmake set __msbuildArgs=/p:Platform=%__BuildArch% /p:PlatformToolset="%__PlatformToolset%" -cd %__rootDir% - SET __NativeBuildArgs=/t:rebuild if /i "%__IncrementalNativeBuild%" == "1" SET __NativeBuildArgs= diff --git a/src/installer/corehost/build.proj b/src/installer/corehost/build.proj index 78a7f20..a666f70 100644 --- a/src/installer/corehost/build.proj +++ b/src/installer/corehost/build.proj @@ -31,6 +31,7 @@ $(BuildArgs) -portable $(BuildArgs) --cross $(BuildArgs) --stripsymbols + $(BuildArgs) --rootdir $(RepoRoot) https://go.microsoft.com/fwlink/?LinkID=799417 diff --git a/src/installer/pkg/packaging/installers.proj b/src/installer/pkg/packaging/installers.proj index 2f50326..a8b7a2b 100644 --- a/src/installer/pkg/packaging/installers.proj +++ b/src/installer/pkg/packaging/installers.proj @@ -51,19 +51,19 @@ - + - + - + - + @@ -89,10 +89,10 @@ - - diff --git a/src/installer/pkg/packaging/pack-managed.proj b/src/installer/pkg/packaging/pack-managed.proj index 7c7c791..3b19cdf6 100644 --- a/src/installer/pkg/packaging/pack-managed.proj +++ b/src/installer/pkg/packaging/pack-managed.proj @@ -1,19 +1,24 @@ + + + + $(NETCoreAppFramework) + + + - + - + - - diff --git a/src/installer/pkg/packaging/vs-insertion-packages.proj b/src/installer/pkg/packaging/vs-insertion-packages.proj index 86af084..657e560 100644 --- a/src/installer/pkg/packaging/vs-insertion-packages.proj +++ b/src/installer/pkg/packaging/vs-insertion-packages.proj @@ -12,7 +12,7 @@ insertion NuGet packages on each project. Bundle installers aren't inserted, so this is enough. --> - + diff --git a/src/installer/pkg/projects/Directory.Build.props b/src/installer/pkg/projects/Directory.Build.props index ce3b150..d67f23b 100644 --- a/src/installer/pkg/projects/Directory.Build.props +++ b/src/installer/pkg/projects/Directory.Build.props @@ -1,6 +1,11 @@ + + $(SetupRoot)signing\ + $(RepoRoot)LICENSE + + @@ -58,7 +63,7 @@ + Include="$(SetupRoot)signing\SignBinaries.proj" /> diff --git a/src/installer/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHost.pkgproj b/src/installer/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHost.pkgproj index d4c5824..4d58474 100644 --- a/src/installer/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHost.pkgproj +++ b/src/installer/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHost.pkgproj @@ -26,14 +26,14 @@ - - - diff --git a/src/installer/publish/prepare-artifacts.proj b/src/installer/publish/prepare-artifacts.proj index 4d66ad7..219866c 100644 --- a/src/installer/publish/prepare-artifacts.proj +++ b/src/installer/publish/prepare-artifacts.proj @@ -5,7 +5,7 @@ Condition="'$(SkipSigning)' != 'true' and '$(SignType)' != 'public'"> diff --git a/src/installer/test/PrepareTestAssets/PrepareTestAssets.proj b/src/installer/test/PrepareTestAssets/PrepareTestAssets.proj index c4aa79d..caaa386 100644 --- a/src/installer/test/PrepareTestAssets/PrepareTestAssets.proj +++ b/src/installer/test/PrepareTestAssets/PrepareTestAssets.proj @@ -58,7 +58,7 @@ - $(ProjectDir)NuGet.config + $(RepoRoot)NuGet.config @(RestoreTestSource -> '<add key="%(Key)" value="%(Identity)" />', '%0A ')