2016-04-21 16:40:25 +03:00
|
|
|
<!--
|
|
|
|
***********************************************************************************************
|
|
|
|
Xamarin.iOS.WatchApp.Common.targets
|
|
|
|
|
|
|
|
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
|
|
|
|
created a backup copy. Incorrect changes to this file will make it
|
|
|
|
impossible to load or build your projects from the command-line or the IDE.
|
|
|
|
|
|
|
|
This file imports the version- and platform-specific targets for the project importing
|
|
|
|
this file. This file also defines targets to produce an error if the specified targets
|
|
|
|
file does not exist, but the project is built anyway (command-line or IDE build).
|
|
|
|
|
|
|
|
Copyright (C) 2015-2016 Xamarin. All rights reserved.
|
|
|
|
***********************************************************************************************
|
|
|
|
-->
|
|
|
|
|
|
|
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
|
|
<UsingTask TaskName="Xamarin.iOS.Tasks.ResolveNativeWatchApp" AssemblyFile="Xamarin.iOS.Tasks.dll" />
|
|
|
|
|
|
|
|
<Import Project="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).Before.targets"
|
|
|
|
Condition="Exists('$(MSBuildThisFileDirectory)$(MSBuildThisFileName).Before.targets')"/>
|
|
|
|
|
|
|
|
<PropertyGroup>
|
|
|
|
<IsWatchApp>True</IsWatchApp>
|
|
|
|
<IsWatch2App>False</IsWatch2App>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<Import Project="$(MSBuildThisFileDirectory)Xamarin.iOS.Common.targets" />
|
|
|
|
|
|
|
|
<Import Project="$(MSBuildThisFileDirectory)Xamarin.iOS.WatchApp.Common.props"
|
|
|
|
Condition="'$(_XamarinWatchAppCommonPropsHasBeenImported)' != 'true'" />
|
|
|
|
|
|
|
|
<Import Project="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).Before.targets"
|
|
|
|
Condition="Exists('$(MSBuildThisFileDirectory)$(MSBuildThisFileName).Before.targets')"/>
|
|
|
|
|
|
|
|
<!-- Override GetTargetPath, Build, and Rebuild -->
|
|
|
|
<Target Name="GetBundleTargetPath" DependsOnTargets="_GetWatchAppBundlePath;$(GetTargetPathDependsOn)" Outputs="@(_WatchAppBundlePath)" />
|
|
|
|
<Target Name="Build" Condition="'$(_InvalidConfigurationWarning)' != 'true'" DependsOnTargets="_GetWatchAppBundlePath;$(BuildDependsOn)" Outputs="@(_WatchAppBundlePath)" />
|
|
|
|
<Target Name="Rebuild" Condition="'$(_InvalidConfigurationWarning)' != 'true'" DependsOnTargets="_GetWatchAppBundlePath;$(RebuildDependsOn)" Outputs="@(_WatchAppBundlePath)" />
|
|
|
|
|
|
|
|
<Target Name="_GetWatchAppBundlePath" DependsOnTargets="_GenerateBundleName;$(_GetWatchAppBundlePathDependsOn)">
|
|
|
|
<PropertyGroup>
|
|
|
|
<!-- needed for GetTargetPath/Build/Rebuild task outputs -->
|
|
|
|
<_WatchAppBundlePath>$(MSBuildProjectDirectory)\$(AppBundleDir)</_WatchAppBundlePath>
|
|
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
|
|
<_WatchAppBundlePath Include="$(MSBuildProjectDirectory)\$(AppBundleDir)">
|
|
|
|
<!-- We need this metadata to fix the source in VS -->
|
|
|
|
<BuildSessionId>$(BuildSessionId)</BuildSessionId>
|
|
|
|
<BuildServerPath>..\..\$(BuildAppName)\$(BuildSessionId)\$(AppBundleDir)</BuildServerPath>
|
|
|
|
</_WatchAppBundlePath>
|
|
|
|
</ItemGroup>
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="_ResolveNativeWatchApp" DependsOnTargets="_DetectSdkLocations;_GenerateBundleName">
|
|
|
|
<ResolveNativeWatchApp
|
[msbuild] Rename and unify to IsMacEnabled (#193)
* [msbuild] Rename and unify to IsMacEnabled
We previously had an MtouchTargetsEnabled and a separate
IsMacTargetsEnabled for iOS and XM, when both actually
meant the same thing: is a Mac enabled for building this
project?
Note that instead of "targets", we make it more generic,
since the condition can be used in a task, a property
group or whatever really, not just to enable/disable
certain targets.
Also, we call it Enabled, rather than Connected or
Available, since it's more natural to think that all such
tasks/targets are enabled when you're building locally
on the Mac. Connected wouldn't have been appropriate, and
Available would be confusing.
For backwards compatibility I've kepd the old MtouchTargetsEnabled
pointing to IsMacEnabled. We'll change our Windows targets
accordingly to also unify this property and how/where it's
set.
* [msbuild] Use full condition comparison for robustness
This is the proper way to use a boolean in a condition, and
prevents errors whenever the property is an empty string or
anything other than a boolean value.
2016-06-16 20:14:43 +03:00
|
|
|
Condition="'$(IsMacEnabled)' == 'true'"
|
2016-04-21 16:40:25 +03:00
|
|
|
SessionId="$(BuildSessionId)"
|
|
|
|
SdkVersion="$(MtouchSdkVersion)"
|
|
|
|
SdkIsSimulator="$(_SdkIsSimulator)"
|
|
|
|
TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)"
|
|
|
|
>
|
|
|
|
<Output TaskParameter="NativeWatchApp" PropertyName="_NativeWatchApp" />
|
|
|
|
</ResolveNativeWatchApp>
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
<PropertyGroup>
|
|
|
|
<_CompileToNativeDependsOn>
|
|
|
|
$(_CompileToNativeDependsOn);
|
|
|
|
_ResolveNativeWatchApp
|
|
|
|
</_CompileToNativeDependsOn>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<Target Name="_CompileToNative" DependsOnTargets="$(_CompileToNativeDependsOn)" >
|
|
|
|
<Ditto
|
|
|
|
SessionId="$(BuildSessionId)"
|
[msbuild] Rename and unify to IsMacEnabled (#193)
* [msbuild] Rename and unify to IsMacEnabled
We previously had an MtouchTargetsEnabled and a separate
IsMacTargetsEnabled for iOS and XM, when both actually
meant the same thing: is a Mac enabled for building this
project?
Note that instead of "targets", we make it more generic,
since the condition can be used in a task, a property
group or whatever really, not just to enable/disable
certain targets.
Also, we call it Enabled, rather than Connected or
Available, since it's more natural to think that all such
tasks/targets are enabled when you're building locally
on the Mac. Connected wouldn't have been appropriate, and
Available would be confusing.
For backwards compatibility I've kepd the old MtouchTargetsEnabled
pointing to IsMacEnabled. We'll change our Windows targets
accordingly to also unify this property and how/where it's
set.
* [msbuild] Use full condition comparison for robustness
This is the proper way to use a boolean in a condition, and
prevents errors whenever the property is an empty string or
anything other than a boolean value.
2016-06-16 20:14:43 +03:00
|
|
|
Condition="'$(IsMacEnabled)'"
|
2016-04-21 16:40:25 +03:00
|
|
|
ToolExe="$(DittoExe)"
|
|
|
|
ToolPath="$(DittoPath)"
|
|
|
|
Source="$(_NativeWatchApp)"
|
|
|
|
Destination="$(_AppBundlePath)$(AssemblyName)"
|
|
|
|
/>
|
|
|
|
|
|
|
|
<!-- This task must always run, because Apple's toolchain determines if a watch app
|
|
|
|
must be installed or not depending on the timestamp of the main executable (this means
|
|
|
|
that if any other file is modified, we must at least touch the main executable as well).
|
|
|
|
-->
|
[msbuild] Rename and unify to IsMacEnabled (#193)
* [msbuild] Rename and unify to IsMacEnabled
We previously had an MtouchTargetsEnabled and a separate
IsMacTargetsEnabled for iOS and XM, when both actually
meant the same thing: is a Mac enabled for building this
project?
Note that instead of "targets", we make it more generic,
since the condition can be used in a task, a property
group or whatever really, not just to enable/disable
certain targets.
Also, we call it Enabled, rather than Connected or
Available, since it's more natural to think that all such
tasks/targets are enabled when you're building locally
on the Mac. Connected wouldn't have been appropriate, and
Available would be confusing.
For backwards compatibility I've kepd the old MtouchTargetsEnabled
pointing to IsMacEnabled. We'll change our Windows targets
accordingly to also unify this property and how/where it's
set.
* [msbuild] Use full condition comparison for robustness
This is the proper way to use a boolean in a condition, and
prevents errors whenever the property is an empty string or
anything other than a boolean value.
2016-06-16 20:14:43 +03:00
|
|
|
<Touch SessionId="$(BuildSessionId)" Condition="'$(IsMacEnabled)'" Files="$(_AppBundlePath)$(AssemblyName)"/>
|
2016-04-21 16:40:25 +03:00
|
|
|
|
[msbuild] Rename and unify to IsMacEnabled (#193)
* [msbuild] Rename and unify to IsMacEnabled
We previously had an MtouchTargetsEnabled and a separate
IsMacTargetsEnabled for iOS and XM, when both actually
meant the same thing: is a Mac enabled for building this
project?
Note that instead of "targets", we make it more generic,
since the condition can be used in a task, a property
group or whatever really, not just to enable/disable
certain targets.
Also, we call it Enabled, rather than Connected or
Available, since it's more natural to think that all such
tasks/targets are enabled when you're building locally
on the Mac. Connected wouldn't have been appropriate, and
Available would be confusing.
For backwards compatibility I've kepd the old MtouchTargetsEnabled
pointing to IsMacEnabled. We'll change our Windows targets
accordingly to also unify this property and how/where it's
set.
* [msbuild] Use full condition comparison for robustness
This is the proper way to use a boolean in a condition, and
prevents errors whenever the property is an empty string or
anything other than a boolean value.
2016-06-16 20:14:43 +03:00
|
|
|
<MakeDir SessionId="$(BuildSessionId)" Condition="'$(IsMacEnabled)' == 'true'" Directories="$(_AppBundlePath)_WatchKitStub" />
|
2016-04-21 16:40:25 +03:00
|
|
|
|
|
|
|
<Ditto
|
|
|
|
SessionId="$(BuildSessionId)"
|
[msbuild] Rename and unify to IsMacEnabled (#193)
* [msbuild] Rename and unify to IsMacEnabled
We previously had an MtouchTargetsEnabled and a separate
IsMacTargetsEnabled for iOS and XM, when both actually
meant the same thing: is a Mac enabled for building this
project?
Note that instead of "targets", we make it more generic,
since the condition can be used in a task, a property
group or whatever really, not just to enable/disable
certain targets.
Also, we call it Enabled, rather than Connected or
Available, since it's more natural to think that all such
tasks/targets are enabled when you're building locally
on the Mac. Connected wouldn't have been appropriate, and
Available would be confusing.
For backwards compatibility I've kepd the old MtouchTargetsEnabled
pointing to IsMacEnabled. We'll change our Windows targets
accordingly to also unify this property and how/where it's
set.
* [msbuild] Use full condition comparison for robustness
This is the proper way to use a boolean in a condition, and
prevents errors whenever the property is an empty string or
anything other than a boolean value.
2016-06-16 20:14:43 +03:00
|
|
|
Condition="'$(IsMacEnabled)'"
|
2016-04-21 16:40:25 +03:00
|
|
|
ToolExe="$(DittoExe)"
|
|
|
|
ToolPath="$(DittoPath)"
|
|
|
|
Source="$(_NativeWatchApp)"
|
|
|
|
Destination="$(_AppBundlePath)_WatchKitStub\WK"
|
|
|
|
/>
|
|
|
|
|
[msbuild] Rename and unify to IsMacEnabled (#193)
* [msbuild] Rename and unify to IsMacEnabled
We previously had an MtouchTargetsEnabled and a separate
IsMacTargetsEnabled for iOS and XM, when both actually
meant the same thing: is a Mac enabled for building this
project?
Note that instead of "targets", we make it more generic,
since the condition can be used in a task, a property
group or whatever really, not just to enable/disable
certain targets.
Also, we call it Enabled, rather than Connected or
Available, since it's more natural to think that all such
tasks/targets are enabled when you're building locally
on the Mac. Connected wouldn't have been appropriate, and
Available would be confusing.
For backwards compatibility I've kepd the old MtouchTargetsEnabled
pointing to IsMacEnabled. We'll change our Windows targets
accordingly to also unify this property and how/where it's
set.
* [msbuild] Use full condition comparison for robustness
This is the proper way to use a boolean in a condition, and
prevents errors whenever the property is an empty string or
anything other than a boolean value.
2016-06-16 20:14:43 +03:00
|
|
|
<RemoveDir SessionId="$(BuildSessionId)" Condition="'$(IsMacEnabled)' == 'true'" Directories="$(AppBundleDir).dSYM" />
|
2016-04-21 16:40:25 +03:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="CopyFilesToOutputDirectory" />
|
|
|
|
<Target Name="CoreCompile" />
|
|
|
|
<Target Name="CreateIpa"/>
|
|
|
|
|
|
|
|
<Import Project="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).After.targets"
|
|
|
|
Condition="Exists('$(MSBuildThisFileDirectory)$(MSBuildThisFileName).After.targets')"/>
|
|
|
|
|
|
|
|
</Project>
|