Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Changes to prepare for consolidation #8593

Merged
merged 10 commits into from
Oct 18, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -44,9 +44,10 @@
</PropertyGroup>

<PropertyGroup>
<!-- ProjectDir needs to be set for build-tools and legacy usages. New usages should use RepoRoot -->
<ProjectDir>$(RepoRoot)</ProjectDir>
<SourceDir>$(RepoRoot)src/</SourceDir>
<SetupRoot>$(RepoRoot)</SetupRoot>
<!-- ProjectDir needs to be set for build-tools and legacy usages. New usages should use SetupRoot. -->
<ProjectDir>$(SetupRoot)</ProjectDir>
<SourceDir>$(SetupRoot)src/</SourceDir>

<!-- Output directories -->
<BinDir Condition="'$(BinDir)'==''">$(ArtifactsBinDir)</BinDir>
File renamed without changes.
2 changes: 1 addition & 1 deletion eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -123,7 +123,7 @@
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>b47a997282b4d347cb079d26515ea4147e2ac548</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.SharedFramework.Sdk" Version="5.0.0-beta.19515.1">
<Dependency Name="Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk" Version="5.0.0-beta.19517.8">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>a093b5b2bef24499239a2e9b4114db01fa19e446</Sha>
</Dependency>
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -9,6 +9,6 @@
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19517.8",
"Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk": "5.0.0-beta.19515.1"
"Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk": "5.0.0-beta.19517.8"
}
}
2 changes: 1 addition & 1 deletion publish/prepare-artifacts.proj
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
Condition="'$(SkipSigning)' != 'true' and '$(SignType)' != 'public'">
<Message Importance="High" Text="Signing final packages" />
<MSBuild
Projects="$(RepoRoot)signing\SignFinalPackages.proj"
Projects="$(SetupRoot)signing\SignFinalPackages.proj"
Targets="Build"
Properties="DownloadDirectory=$(DownloadDirectory)" />
</Target>
15 changes: 10 additions & 5 deletions src/corehost/build.cmd
Original file line number Diff line number Diff line change
@@ -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=

2 changes: 2 additions & 0 deletions src/corehost/build.proj
Original file line number Diff line number Diff line change
@@ -31,6 +31,7 @@
<BuildArgs Condition="'$(PortableBuild)' == 'true'">$(BuildArgs) -portable</BuildArgs>
<BuildArgs Condition="'$(CrossBuild)' == 'true'">$(BuildArgs) --cross</BuildArgs>
<BuildArgs Condition="'$(StripSymbols)' == 'true'">$(BuildArgs) --stripsymbols</BuildArgs>
<BuildArgs>$(BuildArgs) --rootdir $(RepoRoot)</BuildArgs>
</PropertyGroup>

<!--
@@ -85,6 +86,7 @@
<BuildArgs>$(ConfigurationGroup) $(TargetArchitecture) apphostver $(AppHostVersion) hostver $(HostVersion) fxrver $(HostResolverVersion) policyver $(HostPolicyVersion) commit $(LatestCommit) rid $(OutputRid)</BuildArgs>
<BuildArgs Condition="'$(PortableBuild)' == 'true'">$(BuildArgs) portable</BuildArgs>
<BuildArgs Condition="'$(IncrementalNativeBuild)' == 'true'">$(BuildArgs) incremental-native-build</BuildArgs>
<BuildArgs>$(BuildArgs) rootdir $(RepoRoot)</BuildArgs>
</PropertyGroup>

<!--
24 changes: 17 additions & 7 deletions src/corehost/build.sh
Original file line number Diff line number Diff line change
@@ -58,9 +58,10 @@ init_rid_plat()

usage()
{
echo "Usage: $0 --configuration <configuration> --arch <Architecture> --hostver <Dotnet exe version> --apphostver <app host exe version> --fxrver <HostFxr library version> --policyver <HostPolicy library version> --commithash <Git commit hash> [--xcompiler <Cross C++ Compiler>]"
echo "Usage: $0 --rootdir <path> --configuration <configuration> --arch <Architecture> --hostver <Dotnet exe version> --apphostver <app host exe version> --fxrver <HostFxr library version> --policyver <HostPolicy library version> --commithash <Git commit hash> [--xcompiler <Cross C++ Compiler>]"
echo ""
echo "Options:"
echo " --rootdir <path> Path to the root of the repository. Required."
echo " --configuration <configuration> Build configuration (Debug, Release)"
echo " --arch <Architecture> Target Architecture (x64, x86, arm, arm64, armel)"
echo " --hostver <Dotnet host version> Version of the dotnet executable"
@@ -85,9 +86,6 @@ while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symli
[[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
RootRepo="$DIR/../.."

__bin_dir="$RootRepo/artifacts/bin"
__build_arch=
__host_ver=
__apphost_ver=
@@ -99,8 +97,6 @@ __portableBuildArgs=
__configuration=Debug
__linkPortable=0
__cmake_defines=
__baseIntermediateOutputPath="$RootRepo/artifacts/obj"
__versionSourceFile="$__baseIntermediateOutputPath/_version.c"
__cmake_bin_prefix=

while [ "$1" != "" ]; do
@@ -148,12 +144,26 @@ while [ "$1" != "" ]; do
--stripsymbols)
__cmake_defines="${__cmake_defines} -DSTRIP_SYMBOLS=true"
;;
--rootdir)
shift
RootRepo=$1
;;
*)
echo "Unknown argument to build.sh $1"; usage; exit 1
esac
shift
done

if [ "$RootRepo" == "" ]; then
usage
fi

SetupRoot="$RootRepo/src/setup"

__bin_dir="$RootRepo/artifacts/bin"
__baseIntermediateOutputPath="$RootRepo/artifacts/obj"
__versionSourceFile="$__baseIntermediateOutputPath/_version.c"

__cmake_defines="${__cmake_defines} -DCMAKE_BUILD_TYPE=${__configuration} ${__portableBuildArgs}"

mkdir -p "$__baseIntermediateOutputPath"
@@ -180,7 +190,7 @@ __cmake_defines="${__cmake_defines} ${__arch_define}"
# Configure environment if we are doing a cross compile.
if [ "$__CrossBuild" == 1 ]; then
if ! [[ -n $ROOTFS_DIR ]]; then
export ROOTFS_DIR="$RootRepo/cross/rootfs/$__build_arch"
export ROOTFS_DIR="$SetupRoot/cross/rootfs/$__build_arch"
fi
fi

2 changes: 1 addition & 1 deletion src/managed/CommonManaged.props
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<IncludeSymbols>true</IncludeSymbols>
<Serviceable>true</Serviceable>
<PackageLicenseFile>LICENSE.TXT</PackageLicenseFile>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageProjectUrl>https://dot.net</PackageProjectUrl>
<Authors>Microsoft</Authors>
<NugetLicenseFile>$(RepoRoot)$(PackageLicenseFile)</NugetLicenseFile>
6 changes: 3 additions & 3 deletions src/pkg/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -7,9 +7,9 @@
</PropertyGroup>

<PropertyGroup>
<PackageLicenseFile>$(ProjectDir)LICENSE.TXT</PackageLicenseFile>
<PackageThirdPartyNoticesFile>$(ProjectDir)THIRD-PARTY-NOTICES.TXT</PackageThirdPartyNoticesFile>
<LicenseUrl>https://github.com/dotnet/core-setup/blob/master/LICENSE.TXT</LicenseUrl>
<PackageLicenseFile>$(RepoRoot)LICENSE</PackageLicenseFile>
<PackageThirdPartyNoticesFile>$(RepoRoot)THIRD-PARTY-NOTICES.TXT</PackageThirdPartyNoticesFile>
<LicenseUrl>https://github.com/dotnet/core-setup/blob/master/LICENSE</LicenseUrl>
<PackageDescriptionFile>$(ProjectDir)src/pkg/projects/descriptions.json</PackageDescriptionFile>
<!-- This link should be updated for each release milestone, currently this points to 1.0.0 -->
<ReleaseNotes>https://go.microsoft.com/fwlink/?LinkID=799417</ReleaseNotes>
12 changes: 6 additions & 6 deletions src/pkg/packaging/installers.proj
Original file line number Diff line number Diff line change
@@ -51,19 +51,19 @@
</Target>

<Target Name="EnsureSignedBinaries" Condition="'$(OSGroup)' == 'Windows_NT'" >
<MSBuild Projects="$(RepoRoot)signing\SignBinaries.proj" Targets="Build" />
<MSBuild Projects="$(SetupRoot)signing\SignBinaries.proj" Targets="Build" />
</Target>

<Target Name="EnsureSignedMsiFiles" Condition="'$(OSGroup)' == 'Windows_NT'" >
<MSBuild Projects="$(RepoRoot)signing\SignMsiFiles.proj" Targets="Build" />
<MSBuild Projects="$(SetupRoot)signing\SignMsiFiles.proj" Targets="Build" />
</Target>

<Target Name="EnsureSignedBurnEngineFiles" Condition="'$(OSGroup)' == 'Windows_NT'" >
<MSBuild Projects="$(RepoRoot)signing\SignBurnEngineFiles.proj" Targets="Build" />
<MSBuild Projects="$(SetupRoot)signing\SignBurnEngineFiles.proj" Targets="Build" />
</Target>

<Target Name="EnsureSignedBurnBundleFiles" Condition="'$(OSGroup)' == 'Windows_NT'" >
<MSBuild Projects="$(RepoRoot)signing\SignBurnBundleFiles.proj" Targets="Build" />
<MSBuild Projects="$(SetupRoot)signing\SignBurnBundleFiles.proj" Targets="Build" />
</Target>

<Target Name="GenerateProjectInstallers" Condition="'$(GenerateProjectInstallers)' == 'true'">
@@ -89,10 +89,10 @@
<Copy SourceFiles="$(SharedFrameworkPublishDir)dotnet$(ExeSuffix)"
DestinationFolder="$(SharedHostPublishRoot)" />

<Copy SourceFiles="$(ProjectDir)THIRD-PARTY-NOTICES.TXT"
<Copy SourceFiles="$(RepoRoot)THIRD-PARTY-NOTICES.TXT"
DestinationFiles="$(SharedHostPublishRoot)ThirdPartyNotices.txt" />

<Copy SourceFiles="$(ProjectDir)LICENSE.TXT"
<Copy SourceFiles="$(RepoRoot)LICENSE"
DestinationFiles="$(SharedHostPublishRoot)LICENSE.txt"
Condition="'$(TargetsUnix)' == 'true'"/>

13 changes: 9 additions & 4 deletions src/pkg/packaging/pack-managed.proj
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />

<PropertyGroup>
<TargetFramework>$(NETCoreAppFramework)</TargetFramework>
</PropertyGroup>

<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

<!--
Ensure managed binaries are signed (if necessary) then call the Pack target on them. These
packages are used in other parts of the build, so this can't wait for Arcade's Pack stage.
-->
<Target Name="Build">
<MSBuild Projects="$(RepoRoot)signing\SignBinaries.proj" Targets="Build" />
<MSBuild Projects="$(SetupRoot)signing\SignBinaries.proj" Targets="Build" />

<ItemGroup>
<ManagedProject Include="$(RepoRoot)src\managed\**\*.csproj" />
<ManagedProject Include="$(SetupRoot)src\managed\**\*.csproj" />
</ItemGroup>

<MSBuild Projects="@(ManagedProject)" Targets="Pack" />
</Target>

<Target Name="Test" />

</Project>
2 changes: 1 addition & 1 deletion src/pkg/packaging/vs-insertion-packages.proj
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
insertion NuGet packages on each project. Bundle installers aren't inserted, so this is enough.
-->
<Target Name="Build" DependsOnTargets="GetSharedFrameworkProjects">
<MSBuild Projects="$(RepoRoot)signing\SignMsiFiles.proj" Targets="Build" />
<MSBuild Projects="$(SetupRoot)signing\SignMsiFiles.proj" Targets="Build" />
<MSBuild Projects="@(PkgprojProjectToBuild);@(SharedFrameworkProject)" Targets="GenerateVSInsertionNupkg" />
</Target>

7 changes: 6 additions & 1 deletion src/pkg/projects/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<Project>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.props))\Directory.Build.props" />

<PropertyGroup>
<SigningToolsDir>$(SetupRoot)signing\</SigningToolsDir>
<LicenseFile>$(RepoRoot)LICENSE</LicenseFile>
</PropertyGroup>

<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk" />

<PropertyGroup>
@@ -58,7 +63,7 @@
<!-- Pkgproj requires its depproj crossgen outputs to be signed.-->
<OrderProjectReference
Condition="'$(MSBuildProjectExtension)' == '.pkgproj'"
Include="$(RepoRoot)signing\SignBinaries.proj" />
Include="$(SetupRoot)signing\SignBinaries.proj" />
</ItemGroup>

<!-- In *.builds projects, the current phase's name is the same as the project name. -->
Original file line number Diff line number Diff line change
@@ -26,14 +26,14 @@
<Copy SourceFiles="$(DotNetHostBinDir)/dotnet$(ApplicationFileExtension)"
DestinationFolder="$(PublishRootDir)" />

<Copy SourceFiles="$(ProjectDir)THIRD-PARTY-NOTICES.TXT"
<Copy SourceFiles="$(RepoRoot)THIRD-PARTY-NOTICES.TXT"
DestinationFiles="$(PublishRootDir)ThirdPartyNotices.txt" />

<Copy SourceFiles="$(ProjectDir)LICENSE.TXT"
<Copy SourceFiles="$(RepoRoot)LICENSE"
DestinationFiles="$(PublishRootDir)LICENSE.txt"
Condition="'$(TargetsUnix)' == 'true'"/>

<Copy SourceFiles="$(ProjectDir)resources/LICENSE-MSFT.txt"
<Copy SourceFiles="$(SetupRoot)resources/LICENSE-MSFT.txt"
DestinationFiles="$(PublishRootDir)LICENSE.txt"
Condition="'$(TargetsUnix)' != 'true'"/>

2 changes: 1 addition & 1 deletion src/test/PrepareTestAssets/PrepareTestAssets.proj
Original file line number Diff line number Diff line change
@@ -58,7 +58,7 @@
</ItemGroup>

<PropertyGroup>
<TemplateNuGetConfigFile>$(ProjectDir)NuGet.config</TemplateNuGetConfigFile>
<TemplateNuGetConfigFile>$(RepoRoot)NuGet.config</TemplateNuGetConfigFile>

<RestoreTestSourceConfigLines>@(RestoreTestSource -> '&lt;add key="%(Key)" value="%(Identity)" /&gt;', '%0A ')</RestoreTestSourceConfigLines>