-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
114 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
KeySwitchManager/Sources/Runtime/Applications/Xamarin.Mac/publish.msbuild
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<Project> | ||
|
||
<PropertyGroup> | ||
<ProjectName>KeySwitchManager.Xamarin.Mac</ProjectName> | ||
<ProjectFile>Applications.Xamarin.Mac.csproj</ProjectFile> | ||
<BuildDate>$([System.DateTime]::Now.ToString("yyyyMMdd"))</BuildDate> | ||
</PropertyGroup> | ||
|
||
<Target Name="Initialize"> | ||
<!-- Build for Specific OS native code --> | ||
<PropertyGroup Condition="$(RID) != ''"> | ||
<Prefix>$(ProjectName)-$(RID)</Prefix> | ||
<ForDotNetCore>false</ForDotNetCore> | ||
</PropertyGroup> | ||
<!-- Build for .net Core code --> | ||
<PropertyGroup Condition="$(RID) == ''"> | ||
<Prefix>$(ProjectName)</Prefix> | ||
<ForDotNetCore>true</ForDotNetCore> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<PublishWorkDir>$(PublishDir)/$(Prefix)</PublishWorkDir> | ||
</PropertyGroup> | ||
|
||
<!--#region Value check --> | ||
<Error | ||
Condition="$(Configuration) == ''" | ||
Text="Property: `Configuration` is not set."/> | ||
<Error | ||
Condition="$(ProjectName) == ''" | ||
Text="Property: `ProjectName` is not set."/> | ||
<Error | ||
Condition="$(ProjectFile) == ''" | ||
Text="Property: `ProjectFile` is not set."/> | ||
<Error | ||
Condition="$(PublishDir) == ''" | ||
Text="Property: `PublishDir` is not set."/> | ||
<!--#endregion--> | ||
|
||
</Target> | ||
|
||
<Target Name="Build" DependsOnTargets="Initialize"> | ||
|
||
<!-- Build for Specific OS native code --> | ||
<PropertyGroup Condition="$(ForDotNetCore) == 'false'"> | ||
<PropertyArgs> | ||
OutDir=$(PublishWorkDir);PublishDir=$(PublishWorkDir);Configuration=$(Configuration);SelfContained=true;RuntimeIdentifier=$(RID) | ||
</PropertyArgs> | ||
</PropertyGroup> | ||
<!-- Build for .net Core code --> | ||
<PropertyGroup Condition="$(ForDotNetCore) == 'true'"> | ||
<PropertyArgs> | ||
OutDir=$(PublishWorkDir);PublishDir=$(PublishWorkDir);Configuration=$(Configuration) | ||
</PropertyArgs> | ||
</PropertyGroup> | ||
|
||
<MSBuild | ||
Projects="$(ProjectFile)" | ||
Targets="restore;publish" | ||
Properties="$(PropertyArgs)"/> | ||
|
||
</Target> | ||
|
||
<Target Name="Archive" DependsOnTargets="Build"> | ||
|
||
<Copy | ||
SourceFiles="VERSION.md" | ||
DestinationFolder="$(PublishWorkDir)" | ||
ContinueOnError="true" /> | ||
|
||
<ZipDirectory | ||
Condition="'$(EnableArchive)'==true" | ||
SourceDirectory="$(PublishWorkDir)" | ||
DestinationFile="$(PublishDir)/$(Prefix)-$(BuildDate).zip" | ||
Overwrite="true" /> | ||
<RemoveDir | ||
Condition="'$(EnableArchive)'==true" | ||
Directories="$(PublishWorkDir)/"/> | ||
</Target> | ||
|
||
</Project> |