forked from MattRix/UnityDecompiled
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPostProcessUniversal81.cs
More file actions
194 lines (163 loc) · 5.68 KB
/
PostProcessUniversal81.cs
File metadata and controls
194 lines (163 loc) · 5.68 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
using System;
using System.Collections.Generic;
using System.IO;
using UnityEditor;
using UnityEditor.Modules;
using UnityEditor.Scripting.Compilers;
internal class PostProcessUniversal81 : PostProcessWSA
{
private readonly PostProcessWSA _phone;
private readonly string _phoneStagingArea;
private readonly string _stagingAreaShared;
private readonly PostProcessWSA _store;
private readonly string _storeStagingArea;
public PostProcessUniversal81(BuildPostProcessArgs args) : base(args, WSASDK.UniversalSDK81, null)
{
this._stagingAreaShared = Utility.CombinePath(base.StagingArea, base.VisualStudioName + ".Shared");
this._storeStagingArea = Utility.CombinePath(base.StagingArea, base.VisualStudioName + ".Windows");
this._phoneStagingArea = Utility.CombinePath(base.StagingArea, base.VisualStudioName + ".WindowsPhone");
this._store = new PostProcessStore81(args, this._storeStagingArea);
this._phone = new PostProcessPhone81(args, this._phoneStagingArea);
}
public override void CheckSDK()
{
this._store.CheckSDK();
this._phone.CheckSDK();
}
public override void CopyImages()
{
this._store.CopyImages();
this._phone.CopyImages();
}
public override void CopyPlayerFiles()
{
this._store.CopyPlayerFiles();
this._phone.CopyPlayerFiles();
}
public override void CopyPlugins()
{
this._store.CopyPlugins();
this._phone.CopyPlugins();
}
public override void CopyStreamingAssets()
{
this._store.CopyStreamingAssets();
this._phone.CopyStreamingAssets();
}
public override void CopyTestCertificate()
{
this._store.CopyTestCertificate();
this._phone.CopyTestCertificate();
}
public override void CreateCommandLineArgsPlaceholder()
{
this._store.CreateCommandLineArgsPlaceholder();
this._phone.CreateCommandLineArgsPlaceholder();
}
public override void CreateManifest()
{
this._store.CreateManifest();
this._phone.CreateManifest();
}
protected override ManifestWSA CreateManifestBuilder()
{
throw new InvalidOperationException();
}
public override void CreateRegistryTxtFiles()
{
this._store.CreateRegistryTxtFiles();
this._phone.CreateRegistryTxtFiles();
}
public override void CreateVisualStudioSolution()
{
string sourceDirName = Path.Combine(base.StagingArea, "Data");
string destDirName = Path.Combine(this._stagingAreaShared, "Data");
Directory.Move(sourceDirName, destDirName);
base.CreateVisualStudioSolution();
}
protected override void CreateWindowsResourceFile()
{
base.CreateWindowsResourceFile(this._storeStagingArea);
base.CreateWindowsResourceFile(this._phoneStagingArea);
}
public override void DeleteMdbFiles()
{
this._store.DeleteMdbFiles();
this._phone.DeleteMdbFiles();
}
public override void EnumerateAllManagedAssemblies()
{
this._store.EnumerateAllManagedAssemblies();
this._phone.EnumerateAllManagedAssemblies();
}
protected override string GetAssemblyConverterPlatform()
{
throw new InvalidOperationException();
}
protected override string GetPlatformAssemblyPath()
{
throw new InvalidOperationException();
}
protected override string GetReferenceAssembliesDirectory()
{
throw new InvalidOperationException();
}
protected override string GetResourceCompilerPath() =>
Path.Combine(MicrosoftCSharpCompiler.GetWindowsKitDirectory(WSASDK.SDK81), @"bin\x86\rc.exe");
protected override string GetTemplateDirectorySource() =>
base.GetTemplateDirectorySource("Windows81");
protected override string GetTemplateDirectoryTarget() =>
this._stagingAreaShared;
protected override Version GetToolsVersion() =>
new Version(12, 0);
public override void MoveDataManagedToRoot()
{
this._store.MoveDataManagedToRoot();
this._phone.MoveDataManagedToRoot();
}
public override void OverwriteUnityAssemblies()
{
this._store.OverwriteUnityAssemblies();
this._phone.OverwriteUnityAssemblies();
}
public override void Process()
{
Directory.CreateDirectory(this._stagingAreaShared);
Utility.CopyDirectoryContents(base.StagingAreaDataManaged, this._store.StagingAreaDataManaged, false);
Utility.CopyDirectoryContents(base.StagingAreaDataManaged, this._phone.StagingAreaDataManaged, false);
Directory.Delete(base.StagingAreaDataManaged, true);
string path = @"Temp\Phone";
if (Directory.Exists(path))
{
Utility.CopyDirectoryContents(path, this._phone.StagingAreaDataManaged, false);
Utility.DeleteDirectory(path);
}
base.Process();
}
public override void RunAssemblyConverter()
{
this._store.RunAssemblyConverter();
this._phone.RunAssemblyConverter();
}
public override void RunReferenceRewriter()
{
this._store.RunReferenceRewriter();
this._phone.RunReferenceRewriter();
}
public override void RunSerializationWeaver()
{
this._store.RunSerializationWeaver();
this._phone.RunSerializationWeaver();
}
protected override Dictionary<WSASDK, LibraryCollection> TEMP_GetLibraryCollections() =>
new Dictionary<WSASDK, LibraryCollection>(2) {
{
WSASDK.SDK81,
this._store.Libraries
},
{
WSASDK.PhoneSDK81,
this._phone.Libraries
}
};
}