dotnet_runtime/src/installer/Directory.Build.props

369 lines
18 KiB
XML

<Project>
<Import Project="..\..\Directory.Build.props" />
<!--
Before Microsoft.Common.targets, set the extensions path to match the restore dir as Arcade
sets it, so MSBuild packages with targets files will be found and imported.
-->
<PropertyGroup>
<MSBuildProjectExtensionsPath>$(BaseIntermediateOutputPath)</MSBuildProjectExtensionsPath>
</PropertyGroup>
<PropertyGroup>
<ArcadeSdkMSBuildProjectDir>$([System.IO.Path]::GetDirectoryName('$(ArcadeSdkBuildTasksAssembly)'))\..\</ArcadeSdkMSBuildProjectDir>
<ArcadeSdkSignProject>$(ArcadeSdkMSBuildProjectDir)Sign.proj</ArcadeSdkSignProject>
<!-- Clear AssemblyVersion as we need to align with the NuGet conventions, when empty arcade will do that for us. -->
<AssemblyVersion />
</PropertyGroup>
<PropertyGroup Condition="'$(MSBuildProjectExtension)' == '.csproj'">
<!-- SDK-based projects' Platform should default to AnyCPU, not $(TargetArchitecture) like Directory.Build.props sets. -->
<Platform>AnyCPU</Platform>
<UsingNETSdkCompiler>true</UsingNETSdkCompiler>
<DisableBuildToolsRoslynVersion>true</DisableBuildToolsRoslynVersion>
</PropertyGroup>
<PropertyGroup>
<SigningToolsDir>$(InstallerProjectRoot)signing\</SigningToolsDir>
</PropertyGroup>
<PropertyGroup>
<NETCoreAppFrameworkIdentifier>.NETCoreApp</NETCoreAppFrameworkIdentifier>
<NETCoreAppFrameworkMoniker>$(NETCoreAppFrameworkIdentifier),Version=v$(NETCoreAppFrameworkVersion)</NETCoreAppFrameworkMoniker>
<NETCoreAppFrameworkBrandName>.NET $(NETCoreAppFrameworkVersion)</NETCoreAppFrameworkBrandName>
</PropertyGroup>
<!-- Platform detection -->
<PropertyGroup>
<RunningOnUnix Condition="'$(OS)'!='Windows_NT'">true</RunningOnUnix>
<RunningOnCore Condition="'$(MSBuildRuntimeType)' == 'core'">true</RunningOnCore>
</PropertyGroup>
<PropertyGroup>
<TargetArchitecture Condition="'$(TargetArchitecture)' == '' AND '$(BuildArchitecture)' == 'arm64'">$(BuildArchitecture)</TargetArchitecture>
<TargetArchitecture Condition="'$(TargetArchitecture)' == ''">x64</TargetArchitecture>
<Platform Condition="'$(Platform)'==''">$(TargetArchitecture)</Platform>
</PropertyGroup>
<PropertyGroup>
<DebugType Condition="'$(DebugType)' == ''">Portable</DebugType>
</PropertyGroup>
<PropertyGroup Condition="'$(DisableSourceLink)' == 'true'">
<EnableSourceLink>false</EnableSourceLink>
<EnableSourceControlManagerQueries>false</EnableSourceControlManagerQueries>
<DeterministicSourcePaths>false</DeterministicSourcePaths>
</PropertyGroup>
<!-- Set up Default symbol and optimization for Configuration -->
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<DebugSymbols Condition="'$(DebugSymbols)' == ''">true</DebugSymbols>
<Optimize Condition="'$(Optimize)' == ''">false</Optimize>
<DefineConstants>$(DefineConstants),DEBUG,TRACE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<DebugSymbols Condition="'$(DebugSymbols)' == ''">true</DebugSymbols>
<Optimize Condition="'$(Optimize)' == ''">true</Optimize>
<DefineConstants>$(DefineConstants),TRACE</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<ExeSuffix Condition="'$(TargetOS)' == 'Windows_NT'">.exe</ExeSuffix>
</PropertyGroup>
<PropertyGroup Condition="'$(OutputRid)' == '' and '$(HostRuntimeIdentifier)' != ''">
<OutputRid>$(HostRuntimeIdentifier.Remove($(HostRuntimeIdentifier.LastIndexOf('-'))))-$(TargetArchitecture)</OutputRid>
</PropertyGroup>
<!-- Portable -->
<PropertyGroup Condition="'$(PortableBuild)' == 'true'">
<OutputRid Condition="'$(TargetOS)' == 'Windows_NT'">win-$(TargetArchitecture)</OutputRid>
<OutputRid Condition="'$(TargetOS)' == 'OSX'">osx-$(TargetArchitecture)</OutputRid>
<OutputRid Condition="'$(TargetOS)' == 'Linux'">linux-$(TargetArchitecture)</OutputRid>
<OutputRid Condition="'$(TargetOS)' == 'FreeBSD'">freebsd-$(TargetArchitecture)</OutputRid>
<OutputRid Condition="'$(TargetOS)' == 'iOS'">ios-$(TargetArchitecture)</OutputRid>
<OutputRid Condition="'$(TargetOS)' == 'tvOS'">tvos-$(TargetArchitecture)</OutputRid>
<OutputRid Condition="'$(TargetOS)' == 'Android'">android-$(TargetArchitecture)</OutputRid>
<OutputRid Condition="'$(TargetOS)' == 'Browser'">browser-$(TargetArchitecture)</OutputRid>
</PropertyGroup>
<PropertyGroup Condition="'$(RuntimeIdentifier)' == '' and '$(EnsureRuntimeIdentifierSet)' == 'true'">
<RuntimeIdentifier>$(OutputRid)</RuntimeIdentifier>
</PropertyGroup>
<PropertyGroup>
<TestTargetRid Condition="'$(TestTargetRid)' == ''">$(OutputRid)</TestTargetRid>
</PropertyGroup>
<!-- Produce assets into the specified blob feed. -->
<PropertyGroup Condition="'$(DotNetOutputBlobFeedDir)' != ''">
<AssetOutputPath>$(DotNetOutputBlobFeedDir)assets/</AssetOutputPath>
</PropertyGroup>
<!-- Set up the default output and intermediate paths -->
<PropertyGroup>
<OSPlatformConfig>$(OutputRid).$(Configuration)</OSPlatformConfig>
<BaseOutputRootPath>$(ArtifactsBinDir)$(OSPlatformConfig)\</BaseOutputRootPath>
<CrossGenRootPath>$(BaseOutputRootPath)crossgen\</CrossGenRootPath>
<IntermediateOutputRootPath Condition="'$(IntermediateOutputRootPath)' == ''">$(ArtifactsObjDir)$(OSPlatformConfig)\</IntermediateOutputRootPath>
<PackagesBasePath Condition="'$(PackagesBasePath)'==''">$(ArtifactsBinDir)$(OSPlatformConfig)/</PackagesBasePath>
<PackageSymbolsBinDir Condition="'$(PackageSymbolsBinDir)' == ''">$(PackagesBasePath)symbols/</PackageSymbolsBinDir>
<AssetOutputPath Condition="'$(AssetOutputPath)'==''">$(ArtifactsShippingPackagesDir)</AssetOutputPath>
<SymbolPackageOutputPath Condition="'$(SymbolPackageOutputPath)'==''">$(ArtifactsShippingPackagesDir)</SymbolPackageOutputPath>
<!-- Use '/' instead of '\': used directly by WiX which doesn't accept trailing '\'. -->
<SharedFrameworkPublishDir>$(IntermediateOutputRootPath)sharedFrameworkPublish/</SharedFrameworkPublishDir>
<SharedFrameworkPublishSymbolsDir>$(IntermediateOutputRootPath)sharedFrameworkPublish.symbols\</SharedFrameworkPublishSymbolsDir>
</PropertyGroup>
<PropertyGroup>
<DisableCrossgen>false</DisableCrossgen>
<DisableCrossgen Condition="'$(RuntimeFlavor)' == 'Mono'">true</DisableCrossgen>
<!-- Disable cross-gen on FreeBSD for now. This can be revisited when we have full support. -->
<DisableCrossgen Condition="'$(TargetOS)'=='FreeBSD'">true</DisableCrossgen>
<OutputVersionBadge>$(AssetOutputPath)sharedfx_$(OutputRid)_$(Configuration)_version_badge.svg</OutputVersionBadge>
</PropertyGroup>
<PropertyGroup>
<DotnetHostString>dotnet-host-</DotnetHostString>
<DotnetHostFxrString>dotnet-hostfxr-</DotnetHostFxrString>
<DotnetRuntimeString>dotnet-runtime-</DotnetRuntimeString>
<DotnetRuntimeDependenciesPackageString>dotnet-runtime-deps-</DotnetRuntimeDependenciesPackageString>
<CombinedInstallerStart>$(AssetOutputPath)$(DotnetRuntimeString)</CombinedInstallerStart>
<SharedHostInstallerStart>$(AssetOutputPath)$(DotnetHostString)</SharedHostInstallerStart>
<HostFxrInstallerStart>$(AssetOutputPath)$(DotnetHostFxrString)</HostFxrInstallerStart>
<SharedFrameworkInstallerStart>$(AssetOutputPath)$(DotnetRuntimeString)</SharedFrameworkInstallerStart>
<DotnetRuntimeDependenciesPackageInstallerStart>$(AssetOutputPath)$(DotnetRuntimeDependenciesPackageString)</DotnetRuntimeDependenciesPackageInstallerStart>
<!-- OSX specific intermediate package suffix . OSX specific intermediate packages are suffixed with -internal to avoid name collision for bundle package (dotnet-runtime-*)
and runtime ( earlier as dotnet-sharedframework-*) -->
<InstallerStartSuffix Condition="'$(TargetOS)' == 'OSX'">internal</InstallerStartSuffix>
<SharedHostInstallerStart Condition="'$(TargetOS)' == 'OSX'">$(SharedHostInstallerStart)$(InstallerStartSuffix)-</SharedHostInstallerStart>
<HostFxrInstallerStart Condition="'$(TargetOS)' == 'OSX'">$(HostFxrInstallerStart)$(InstallerStartSuffix)-</HostFxrInstallerStart>
<SharedFrameworkInstallerStart Condition="'$(TargetOS)' == 'OSX'">$(SharedFrameworkInstallerStart)$(InstallerStartSuffix)-</SharedFrameworkInstallerStart>
</PropertyGroup>
<!-- Set up handling of build warnings -->
<PropertyGroup>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
<TargetsWindows>false</TargetsWindows>
<TargetsOSX>false</TargetsOSX>
<TargetsiOS>false</TargetsiOS>
<TargetstvOS>false</TargetstvOS>
<TargetsAndroid>false</TargetsAndroid>
<TargetsLinux>false</TargetsLinux>
<TargetsUnix>false</TargetsUnix>
<TargetsUbuntu>false</TargetsUbuntu>
<TargetsLinuxMint>false</TargetsLinuxMint>
<TargetsDebian>false</TargetsDebian>
<TargetsRhel>false</TargetsRhel>
<TargetsOpensuse>false</TargetsOpensuse>
<TargetsFedora>false</TargetsFedora>
<TargetsCentos>false</TargetsCentos>
<TargetsOracle>false</TargetsOracle>
<TargetsSles>false</TargetsSles>
<TargetsBrowser>false</TargetsBrowser>
</PropertyGroup>
<Choose>
<When Condition="$(OutputRid.StartsWith('win'))">
<PropertyGroup>
<TargetsWindows>true</TargetsWindows>
</PropertyGroup>
</When>
<When Condition="$(OutputRid.StartsWith('osx'))">
<PropertyGroup>
<TargetsOSX>true</TargetsOSX>
<TargetsUnix>true</TargetsUnix>
</PropertyGroup>
</When>
<When Condition="$(OutputRid.StartsWith('ios'))">
<PropertyGroup>
<TargetsiOS>true</TargetsiOS>
<TargetsUnix>true</TargetsUnix>
<TargetsMobile>true</TargetsMobile>
</PropertyGroup>
</When>
<When Condition="$(OutputRid.StartsWith('tvos'))">
<PropertyGroup>
<TargetstvOS>true</TargetstvOS>
<TargetsUnix>true</TargetsUnix>
<TargetsMobile>true</TargetsMobile>
</PropertyGroup>
</When>
<When Condition="$(OutputRid.StartsWith('android'))">
<PropertyGroup>
<TargetsAndroid>true</TargetsAndroid>
<TargetsLinux>true</TargetsLinux>
<TargetsUnix>true</TargetsUnix>
<TargetsMobile>true</TargetsMobile>
</PropertyGroup>
</When>
<When Condition="$(OutputRid.StartsWith('browser'))">
<PropertyGroup>
<TargetsBrowser>true</TargetsBrowser>
<TargetsUnix>true</TargetsUnix>
</PropertyGroup>
</When>
<When Condition="$(OutputRid.StartsWith('debian'))">
<PropertyGroup>
<TargetsDebian>true</TargetsDebian>
<TargetsLinux>true</TargetsLinux>
<TargetsUnix>true</TargetsUnix>
</PropertyGroup>
</When>
<When Condition="$(OutputRid.StartsWith('ubuntu'))">
<PropertyGroup>
<TargetsUbuntu>true</TargetsUbuntu>
<TargetsLinux>true</TargetsLinux>
<TargetsUnix>true</TargetsUnix>
</PropertyGroup>
</When>
<When Condition="$(OutputRid.StartsWith('linuxmint'))">
<PropertyGroup>
<TargetsLinuxMint>true</TargetsLinuxMint>
<TargetsLinux>true</TargetsLinux>
<TargetsUnix>true</TargetsUnix>
</PropertyGroup>
</When>
<When Condition="$(OutputRid.StartsWith('rhel'))">
<PropertyGroup>
<TargetsRhel>true</TargetsRhel>
<TargetsLinux>true</TargetsLinux>
<TargetsUnix>true</TargetsUnix>
</PropertyGroup>
</When>
<When Condition="$(OutputRid.StartsWith('centos'))">
<PropertyGroup>
<TargetsCentos>true</TargetsCentos>
<TargetsLinux>true</TargetsLinux>
<TargetsUnix>true</TargetsUnix>
</PropertyGroup>
</When>
<When Condition="$(OutputRid.StartsWith('opensuse'))">
<PropertyGroup>
<TargetsOpensuse>true</TargetsOpensuse>
<TargetsLinux>true</TargetsLinux>
<TargetsUnix>true</TargetsUnix>
</PropertyGroup>
</When>
<When Condition="$(OutputRid.StartsWith('fedora'))">
<PropertyGroup>
<TargetsFedora>true</TargetsFedora>
<TargetsLinux>true</TargetsLinux>
<TargetsUnix>true</TargetsUnix>
</PropertyGroup>
</When>
<When Condition="$(OutputRid.StartsWith('oracle'))">
<PropertyGroup>
<TargetsOracle>true</TargetsOracle>
<TargetsLinux>true</TargetsLinux>
<TargetsUnix>true</TargetsUnix>
</PropertyGroup>
</When>
<When Condition="$(OutputRid.StartsWith('sles'))">
<PropertyGroup>
<TargetsSles>true</TargetsSles>
<TargetsLinux>true</TargetsLinux>
<TargetsUnix>true</TargetsUnix>
</PropertyGroup>
</When>
<When Condition="$(OutputRid.StartsWith('freebsd'))">
<PropertyGroup>
<TargetsFreeBSD>true</TargetsFreeBSD>
<TargetsUnix>true</TargetsUnix>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<TargetsLinux>true</TargetsLinux>
<TargetsUnix>true</TargetsUnix>
</PropertyGroup>
<PropertyGroup Condition="'$(PortableBuild)' == 'true'">
<HostMachineRidTargetsDebianPackages Condition="
$(HostRuntimeIdentifier.StartsWith('debian')) or
$(HostRuntimeIdentifier.StartsWith('ubuntu')) or
$(HostRuntimeIdentifier.StartsWith('linuxmint'))">true</HostMachineRidTargetsDebianPackages>
<!-- If the build machine isn't known to be Debian-based, try to build RPM packages. -->
<HostMachineRidTargetsRpmPackages Condition="'$(HostMachineRidTargetsDebianPackages)' != 'true'">true</HostMachineRidTargetsRpmPackages>
</PropertyGroup>
</Otherwise>
</Choose>
<PropertyGroup>
<CompressedFileExtension Condition="'$(TargetOS)' == 'Windows_NT'">.zip</CompressedFileExtension>
<CompressedFileExtension Condition="'$(TargetOS)' != 'Windows_NT'">.tar.gz</CompressedFileExtension>
<InstallerExtension Condition="'$(TargetOS)' == 'Windows_NT'">.msi</InstallerExtension>
<InstallerExtension Condition="'$(TargetOS)' == 'OSX'">.pkg</InstallerExtension>
<InstallerExtension Condition="'$(TargetsDebian)' == 'true' or '$(TargetsUbuntu)' == 'true' or '$(TargetsLinuxMint)' == 'true' or '$(HostMachineRidTargetsDebianPackages)' == 'true'">.deb</InstallerExtension>
<InstallerExtension Condition="'$(TargetsRhel)' == 'true' or '$(TargetsCentos)' == 'true' or '$(TargetsOpensuse)' == 'true' or '$(TargetsFedora)' == 'true' or '$(TargetsOracle)' == 'true' or '$(TargetsSles)' == 'true' or '$(HostMachineRidTargetsRpmPackages)' == 'true'">.rpm</InstallerExtension>
<CombinedInstallerExtension Condition="'$(TargetOS)' == 'Windows_NT'">.exe</CombinedInstallerExtension>
<CombinedInstallerExtension Condition="'$(TargetOS)' != 'Windows_NT'">$(InstallerExtension)</CombinedInstallerExtension>
</PropertyGroup>
<!-- Use actual publishable (non-dummy) package name produced by the build system for this RID -->
<PropertyGroup Condition="'$(OutputRid)' != ''">
<PackageTargetRid>$(OutputRid)</PackageTargetRid>
<PackageTargetRid Condition="'$(OutputRid)' == 'osx.10.11-x64'">osx.10.10-x64</PackageTargetRid>
<PackageTargetRid Condition="$(OutputRid.StartsWith('rhel.7.')) and $(OutputRid.EndsWith('-x64'))">rhel.7-x64</PackageTargetRid>
</PropertyGroup>
<PropertyGroup Condition="'$(UsingNETSdkCompiler)' != 'true'">
<!-- Disable some standard properties for building our projects -->
<NoStdLib>true</NoStdLib>
<NoExplicitReferenceToStdLib>true</NoExplicitReferenceToStdLib>
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
<!-- We don't use any of MSBuild's resolution logic for resolving the framework, so just set these two properties to any folder that exists to skip
the GenerateReferenceAssemblyPaths task (not target) and to prevent it from outputting a warning (MSB3644). -->
<_TargetFrameworkDirectories>$(MSBuildThisFileDirectory)documentation</_TargetFrameworkDirectories>
<_FullFrameworkReferenceAssemblyPaths>$(MSBuildThisFileDirectory)documentation</_FullFrameworkReferenceAssemblyPaths>
<!-- We do not want to target a portable profile.
TODO: Make this the default in buildtools so this is not necessary. -->
<TargetFrameworkProfile></TargetFrameworkProfile>
<!-- We set this property to avoid MSBuild errors regarding not setting TargetFrameworkProfile (see above line) -->
<PortableNuGetMode>true</PortableNuGetMode>
</PropertyGroup>
<PropertyGroup>
<!-- Never use the NuGet fallback folder that comes with the SDK we use to build.
The NuGet fallback folder can/will contain packages we are building in this repo, and we
want to ensure we use the correct packages.
-->
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
</PropertyGroup>
<PropertyGroup>
<LibPrefix Condition="'$(TargetOS)' != 'Windows_NT'">lib</LibPrefix>
<LibSuffix>.so</LibSuffix>
<LibSuffix Condition="'$(TargetOS)' == 'Windows_NT'">.dll</LibSuffix>
<LibSuffix Condition="'$(TargetOS)' == 'OSX' or '$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'tvOS'">.dylib</LibSuffix>
<StaticLibPrefix>lib</StaticLibPrefix>
<StaticLibSuffix>.a</StaticLibSuffix>
<StaticLibSuffix Condition="'$(TargetOS)' == 'Windows_NT'">.lib</StaticLibSuffix>
</PropertyGroup>
<PropertyGroup>
<CrossGenSymbolExtension>.map</CrossGenSymbolExtension>
<CrossGenSymbolExtension Condition="'$(TargetOS)' == 'Windows_NT'">.ni.pdb</CrossGenSymbolExtension>
<!-- OSX doesn't have crossgen symbols, yet -->
<CrossGenSymbolExtension Condition="'$(TargetOS)' == 'OSX' or '$(TargetsMobile)' == 'true' or '$(TargetsBrowser)' == 'true'"></CrossGenSymbolExtension>
</PropertyGroup>
</Project>