-
Notifications
You must be signed in to change notification settings - Fork 5k
/
Copy pathProgram.csproj
79 lines (68 loc) · 4.24 KB
/
Program.csproj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<OutputPath>bin</OutputPath>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<TargetOS Condition="'$(TargetOS)' == ''">iossimulator</TargetOS>
<RuntimeIdentifier>$(TargetOS)-$(TargetArchitecture)</RuntimeIdentifier>
<DefineConstants Condition="'$(ArchiveTests)' == 'true'">$(DefineConstants);CI_TEST</DefineConstants>
<AppName>HelloiOS</AppName>
<MainLibraryFileName>$(AssemblyName).dll</MainLibraryFileName>
<SelfContained>true</SelfContained>
<RunAOTCompilation Condition="'$(RunAOTCompilation)' == ''">true</RunAOTCompilation>
<PublishTrimmed>true</PublishTrimmed>
<TrimMode>Link</TrimMode>
<Optimized Condition="'$(Configuration)' == 'Release'">true</Optimized>
<ShouldILStrip Condition="'$(RunAOTCompilation)' == 'true' and '$(MonoForceInterpreter)' != 'true'">true</ShouldILStrip>
<EnableDefaultAssembliesToBundle>true</EnableDefaultAssembliesToBundle>
<AppleGenerateAppBundle>true</AppleGenerateAppBundle>
<GenerateXcodeProject>true</GenerateXcodeProject>
<UseConsoleUITemplate>false</UseConsoleUITemplate>
<BuildAppBundleAfterTargets Condition="'$(ArchiveTests)' != 'true'">CopyFilesToPublishDirectory</BuildAppBundleAfterTargets>
<BuildAppBundleAfterTargets Condition="'$(ArchiveTests)' == 'true'">CopyFilesToPublishDirectory;Build</BuildAppBundleAfterTargets>
<BuildAppBundleDependsOnTargets Condition="'$(ArchiveTests)' == 'true'">Publish</BuildAppBundleDependsOnTargets>
<!-- Disable event source by default - iOS and Android SDKs do this by default as well -->
<EventSourceSupport Condition="'$(EventSourceSupport)' == ''">false</EventSourceSupport>
</PropertyGroup>
<ItemGroup>
<RuntimeComponents Condition="'$(DiagnosticPorts)' != ''" Include="diagnostics_tracing" />
</ItemGroup>
<Import Project="$(MonoProjectRoot)\msbuild\apple\build\AppleBuild.props" />
<Import Project="$(MonoProjectRoot)\msbuild\apple\build\AppleBuild.InTree.targets" />
<Target Name="BuildAppBundle" AfterTargets="$(BuildAppBundleAfterTargets)" DependsOnTargets="$(BuildAppBundleDependsOnTargets)"/>
<Target Name="_SetAppleGenerateAppBundleProps" Condition="'$(TargetOS)' != 'ios' and '$(ArchiveTests)' != 'true'" BeforeTargets="_AppleGenerateAppBundle">
<ItemGroup>
<RuntimeComponents Include="diagnostics_tracing" KeepDuplicates="false" />
</ItemGroup>
</Target>
<Target Name="RunAppBundle"
AfterTargets="_AppleGenerateAppBundle"
Condition="'$(ArchiveTests)' != 'true' and '$(DeployAndRun)' == 'true'">
<!-- Install and run on a device or simulator -->
<Exec Condition="'$(TargetOS)' == 'iossimulator'" Command="dotnet xharness apple run --app=$(AppBundlePath) --targets=ios-simulator-64 --output-directory=/tmp/out" />
<Exec Condition="'$(TargetOS)' == 'ios'" Command="dotnet xharness apple run --app=$(AppBundlePath) --targets=ios-device --output-directory=/tmp/out" />
<!-- run on maccatalyst -->
<Exec Condition="'$(TargetOS)' == 'maccatalyst'" Command="open -W $(AppBundlePath)" />
</Target>
<Target Name="CopySampleAppToHelixTestDir"
Condition="'$(ArchiveTests)' == 'true'"
AfterTargets="_AppleGenerateAppBundle" >
<PropertyGroup>
<!-- Helix properties -->
<!-- AnyCPU as Platform-->
<OSPlatformConfig>$(TargetOS).AnyCPU.$(Configuration)</OSPlatformConfig>
<!-- <OSPlatformConfig>$(TargetOS).$(Platform).$(Configuration)</OSPlatformConfig> -->
<HelixArchiveRoot>$(ArtifactsDir)helix/</HelixArchiveRoot>
<HelixArchiveRunOnlyRoot>$(HelixArchiveRoot)runonly/</HelixArchiveRunOnlyRoot>
<HelixArchiveRunOnlyAppsDir>$(HelixArchiveRunOnlyRoot)$(OSPlatformConfig)/</HelixArchiveRunOnlyAppsDir>
<_AppBundleName>$([System.IO.Path]::GetFileName('$(AppBundlePath)'))</_AppBundleName>
</PropertyGroup>
<ItemGroup>
<_appFiles Include="$(AppBundlePath)/**/*" />
</ItemGroup>
<Copy SourceFiles="@(_appFiles)"
DestinationFolder="$(HelixArchiveRunOnlyAppsDir)/$(_AppBundleName)/%(RecursiveDir)" />
<Message Importance="High" Text="AppBundlePath: $(AppBundlePath)"/>
<Message Importance="High" Text="HelixArchiveRunOnlyAppsDir: $(HelixArchiveRunOnlyAppsDir)"/>
</Target>
</Project>