forked from MattRix/UnityDecompiled
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMonoScriptCompilerBase.cs
More file actions
40 lines (35 loc) · 1.39 KB
/
Copy pathMonoScriptCompilerBase.cs
File metadata and controls
40 lines (35 loc) · 1.39 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
using System;
using System.Collections.Generic;
using System.IO;
using UnityEditor.Utils;
namespace UnityEditor.Scripting.Compilers
{
internal abstract class MonoScriptCompilerBase : ScriptCompilerBase
{
private readonly bool runUpdater;
protected MonoScriptCompilerBase(MonoIsland island, bool runUpdater) : base(island)
{
this.runUpdater = runUpdater;
}
protected ManagedProgram StartCompiler(BuildTarget target, string compiler, List<string> arguments)
{
base.AddCustomResponseFileIfPresent(arguments, Path.GetFileNameWithoutExtension(compiler) + ".rsp");
return this.StartCompiler(target, compiler, arguments, true, MonoInstallationFinder.GetMonoInstallation());
}
protected ManagedProgram StartCompiler(BuildTarget target, string compiler, List<string> arguments, bool setMonoEnvironmentVariables, string monodistro)
{
string text = CommandLineFormatter.GenerateResponseFile(arguments);
if (this.runUpdater)
{
APIUpdaterHelper.UpdateScripts(text, this._island.GetExtensionOfSourceFiles());
}
ManagedProgram managedProgram = new ManagedProgram(monodistro, this._island._classlib_profile, compiler, " @" + text, setMonoEnvironmentVariables, null);
managedProgram.Start();
return managedProgram;
}
protected string GetProfileDirectory()
{
return MonoInstallationFinder.GetProfileDirectory(this._island._target, this._island._classlib_profile);
}
}
}