forked from fdorg/flashdevelop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFDBuildOptions.cs
More file actions
82 lines (66 loc) · 2.49 KB
/
Copy pathFDBuildOptions.cs
File metadata and controls
82 lines (66 loc) · 2.49 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
using System;
using System.Collections;
using Mono.GetOptions;
using System.IO;
namespace FDBuild
{
public class FDBuildOptions : Options
{
ArrayList extraClasspaths;
string language;
public string ProjectFile;
public FDBuildOptions(string[] args)
{
NoTrace = false;
ProjectFile = "";
extraClasspaths = new ArrayList();
ProcessArgs(args);
}
[ArgumentProcessor]
public void SetProject(string file)
{
ProjectFile = file;
}
[Option(99, "Add extra classpath", "cp")]
public string ExtraClasspath
{
set { if (!extraClasspaths.Contains(value)) extraClasspaths.Add(value); }
}
[Option("Set library base directory", "library")]
public string LibraryDir;
[Option("Set compiler executable path", "compiler")]
public string CompilerPath;
[Option("Set compiler version (optional)", "version")]
public string CompilerVersion;
[Option("Set build target", "target")]
public string TargetBuild;
[Option("Set Swfmill executable path", "swfmill")]
public string SwfmillPath;
[Option("Disable tracing for this build", "notrace")]
public bool NoTrace = false;
[Option("Disable execution of pre build commands", "noprebuild")]
public bool NoPreBuild = false;
[Option("Disable execution of post build commands", "nopostbuild")]
public bool NoPostBuild = false;
[Option("Pause the console after building", "pause")]
public bool PauseAtEnd = false;
[Option("Connect to FlashDevelop's remoting services using the specified IPC name (optional)", "ipc")]
public string IpcName = null;
public string Language
{
set {
if (LibraryDir == null) return;
if (language != null)
extraClasspaths.Remove(Path.Combine(LibraryDir, Path.Combine(language, "classes")));
language = value;
// add the library classpath for the language
string library = Path.Combine(LibraryDir, Path.Combine(language, "classes"));
if (Directory.Exists(library) && language != "HAXE") extraClasspaths.Add(library);
}
}
public string[] ExtraClasspaths
{
get { return extraClasspaths.ToArray(typeof(string)) as string[]; }
}
}
}