-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathBundleAppTask.cs
More file actions
112 lines (76 loc) · 2.75 KB
/
Copy pathBundleAppTask.cs
File metadata and controls
112 lines (76 loc) · 2.75 KB
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
namespace Dotnet.Bundle
{
public interface IBundleAppTask
{
string OutDir { get; set; }
string PublishDir { get; set; }
string CFBundleName { get; set; }
string CFBundleDisplayName { get; set; }
string CFBundleIdentifier { get; set; }
string CFBundleVersion { get; set; }
string CFBundlePackageType { get; set; }
string CFBundleSignature { get; set; }
string CFBundleExecutable { get; set; }
string CFBundleIconFile { get; set; }
string CFBundleShortVersionString { get; set; }
string NSPrincipalClass { get; set; }
bool NSHighResolutionCapable { get; set; }
bool NSRequiresAquaSystemAppearance { get; set; }
bool? NSRequiresAquaSystemAppearanceNullable { get; set; }
ITaskItem[] CFBundleURLTypes { get; set; }
bool Execute();
void LogMessage(string message);
}
public class BundleAppTask : Task, IBundleAppTask
{
[Required]
public string OutDir { get; set; }
[Required]
public string PublishDir { get; set; }
[Required]
public string CFBundleName { get; set; }
[Required]
public string CFBundleDisplayName { get; set; }
[Required]
public string CFBundleIdentifier { get; set; }
[Required]
public string CFBundleVersion { get; set; }
[Required]
public string CFBundlePackageType { get; set; }
[Required]
public string CFBundleSignature { get; set; }
[Required]
public string CFBundleExecutable { get; set; }
[Required]
public string CFBundleIconFile { get; set; }
[Required]
public string CFBundleShortVersionString { get; set; }
[Required]
public string NSPrincipalClass { get; set; }
[Required]
public bool NSHighResolutionCapable { get; set; }
public bool NSRequiresAquaSystemAppearance
{
get => NSRequiresAquaSystemAppearanceNullable.Value;
set => NSRequiresAquaSystemAppearanceNullable = value;
}
public bool? NSRequiresAquaSystemAppearanceNullable { get; set; }
public ITaskItem[] CFBundleURLTypes { get; set; }
public void LogMessage(string message)
{
Log.LogMessage(message);
}
public override bool Execute()
{
var builder = new StructureBuilder(this);
builder.Build();
var bundler = new AppBundler(this, builder);
bundler.Bundle();
var plistWriter = new PlistWriter(this, builder);
plistWriter.Write();
return true;
}
}
}