diff --git a/External/Raw/Projects/132 ActionScript 3 - AS3 Library Project/Project.as3proj b/External/Raw/Projects/132 ActionScript 3 - AS3 Library Project/Project.as3proj
index f7f7c38..2ceb27f 100644
--- a/External/Raw/Projects/132 ActionScript 3 - AS3 Library Project/Project.as3proj
+++ b/External/Raw/Projects/132 ActionScript 3 - AS3 Library Project/Project.as3proj
@@ -8,7 +8,7 @@
-
+
diff --git a/External/Raw/Projects/132 ActionScript 3 - AS3 Library Project/Project.txt b/External/Raw/Projects/132 ActionScript 3 - AS3 Library Project/Project.txt
index 228f2fe..236c120 100644
--- a/External/Raw/Projects/132 ActionScript 3 - AS3 Library Project/Project.txt
+++ b/External/Raw/Projects/132 ActionScript 3 - AS3 Library Project/Project.txt
@@ -1 +1 @@
-An ActionScript 3 library project to compile as a SWC file
\ No newline at end of file
+An ActionScript 3 library project to compile as a SWC file (SWCBuild)
\ No newline at end of file
diff --git a/SwcBuild/Program.cs b/SwcBuild/Program.cs
index 9f8b0c3..2024147 100644
--- a/SwcBuild/Program.cs
+++ b/SwcBuild/Program.cs
@@ -3,36 +3,36 @@
namespace SwcBuild
{
- using static Attribute;
- using static Console;
+ using static Attribute;
+ using static Console;
internal static class Program
- {
+ {
private static int Main(string[] args)
- {
- using (var swcBuild = new SwcBuild())
- {
- int exitCode = (int) swcBuild.Run(args);
- WriteLine($"{Assembly.Description} exited with code: {exitCode}");
+ {
+ using (var swcBuild = new SwcBuild())
+ {
+ int exitCode = (int) swcBuild.Run(args);
+ WriteLine($"{Assembly.Description} exited with code: {exitCode}");
- return exitCode;
- }
- }
+ return exitCode;
+ }
+ }
- internal static class Assembly
- {
- private static readonly System.Reflection.Assembly assembly = typeof(Program).Assembly;
+ internal static class Assembly
+ {
+ private static readonly System.Reflection.Assembly assembly = typeof(Program).Assembly;
- public static string Title { get; } = Get().Title;
- public static string Description { get; } = Get().Description;
- public static string Configuration { get; } = Get().Configuration;
- public static string Company { get; } = Get().Company;
- public static string Product { get; } = Get().Product;
- public static string Copyright { get; } = Get().Copyright;
- public static string Trademark { get; } = Get().Trademark;
- public static Version Version { get; } = assembly.GetName().Version;
+ public static string Title { get; } = Get().Title;
+ public static string Description { get; } = Get().Description;
+ public static string Configuration { get; } = Get().Configuration;
+ public static string Company { get; } = Get().Company;
+ public static string Product { get; } = Get().Product;
+ public static string Copyright { get; } = Get().Copyright;
+ public static string Trademark { get; } = Get().Trademark;
+ public static Version Version { get; } = assembly.GetName().Version;
- private static T Get() where T : class => GetCustomAttribute(assembly, typeof(T)) as T;
- }
- }
+ private static T Get() where T : class => GetCustomAttribute(assembly, typeof(T)) as T;
+ }
+ }
}
diff --git a/SwcBuild/Properties/AssemblyInfo.cs b/SwcBuild/Properties/AssemblyInfo.cs
index 748a09d..3e246f4 100644
--- a/SwcBuild/Properties/AssemblyInfo.cs
+++ b/SwcBuild/Properties/AssemblyInfo.cs
@@ -9,7 +9,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Daniel Jeong")]
[assembly: AssemblyProduct("swcbuild.exe")]
-[assembly: AssemblyCopyright("Copyright © Daniel Jeong 2016")]
+[assembly: AssemblyCopyright("Copyright © Daniel Jeong 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -31,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.5.0.*")]
-[assembly: AssemblyFileVersion("1.5.0.0")]
+[assembly: AssemblyVersion("1.5.1.*")]
+[assembly: AssemblyFileVersion("1.5.1.0")]
diff --git a/SwcBuild/SwcBuild.csproj b/SwcBuild/SwcBuild.csproj
index 8c0160e..1cde2cc 100644
--- a/SwcBuild/SwcBuild.csproj
+++ b/SwcBuild/SwcBuild.csproj
@@ -53,7 +53,7 @@
Auto
false
false
- 6
+ default
false
diff --git a/SwcBuild/src/ActionScriptCompiler.cs b/SwcBuild/src/ActionScriptCompiler.cs
index 4043da8..942990f 100644
--- a/SwcBuild/src/ActionScriptCompiler.cs
+++ b/SwcBuild/src/ActionScriptCompiler.cs
@@ -3,154 +3,154 @@
namespace SwcBuild
{
- using static Platform;
- using static Utilities;
+ using static Platform;
+ using static Utilities;
internal class ActionScriptCompiler : CompilerProcess
- {
- public static ActionScriptCompiler ASC1 => new ActionScriptCompiler(ASCVersions.ASC1);
+ {
+ public static ActionScriptCompiler ASC1 => new ActionScriptCompiler(ASCVersions.ASC1);
- public static ActionScriptCompiler ASC2 => new ActionScriptCompiler(ASCVersions.ASC2);
+ public static ActionScriptCompiler ASC2 => new ActionScriptCompiler(ASCVersions.ASC2);
private ActionScriptCompiler(ASCVersions v) : base(true, true)
- {
- Version = v;
- }
+ {
+ Version = v;
+ }
- public Version SdkVersion { get; set; }
+ public Version SdkVersion { get; set; }
- public Version TargetPlayer { get; set; }
+ public Version TargetPlayer { get; set; }
- public ASCVersions Version { get; }
+ public ASCVersions Version { get; }
- public bool BuildArguments(BuildOptions options, bool debug, bool incremental, out ExitCodes exitCode)
- {
- if (string.IsNullOrEmpty(options.Path))
- return ErrorHelper.InvalidPathToOutput(out exitCode);
-
- Output = FixOutputPath(options.Path, debug);
-
- string configname = GetConfigname(options.Platform);
- //string defaultConfig = Path.Combine(CompilerDirectory, "frameworks", $"{configname}-config.xml");
-
- string[] additional = ParseArguments(options.Additional);
- bool isConfignameDefined = false;
- bool isSwfVersionDefined = false;
-
- foreach (string argument in additional)
- {
- if (!isConfignameDefined && argument.Length > 12 && argument.Substring(0, 12) == "+configname=")
- {
- isConfignameDefined = true;
- if (isSwfVersionDefined) break;
- continue;
- }
- if (!isSwfVersionDefined && argument.Length > 13 && argument.Substring(0, 13) == "-swf-version=")
- {
- isSwfVersionDefined = true;
- if (isConfignameDefined) break;
- }
- }
-
- if (!isConfignameDefined && configname != "flex")
- Arguments.Configname = configname;
-
- //if (File.Exists(defaultConfig))
- // Arguments.LoadConfig = Q(defaultConfig);
-
- if (File.Exists(options.LoadConfig))
- Arguments.LoadConfig = Q(options.LoadConfig);
-
- Arguments.LoadConfig = Q(ConfigFile);
-
- if (debug)
- Arguments.Debug = true;
-
- switch (Version)
- {
- case ASCVersions.ASC1:
- if (incremental)
- Arguments.Incremental = true;
- break;
-
- case ASCVersions.ASC2:
- if (options.AdvancedTelemetry)
- {
- Arguments.AdvancedTelemetry = true;
-
- if (!string.IsNullOrEmpty(options.AdvancedTelemetryPassword))
- Arguments.AdvancedTelemetryPassword = Q(options.AdvancedTelemetryPassword);
- }
-
- if (options.Inline)
- Arguments.Inline = true;
- break;
- }
-
- if (!string.IsNullOrEmpty(options.LinkReport))
- Arguments.LinkReport = options.LinkReport;
-
- if (!string.IsNullOrEmpty(options.LoadExterns))
- Arguments.LoadExterns = options.LoadExterns;
-
- if (!isSwfVersionDefined)
- {
- int swfVersion = ResolveSwfVersion(TargetPlayer, options.Platform != FlashPlayer);
-
- if (swfVersion != -1)
- Arguments.SwfVersion = swfVersion;
- }
-
- if (options.Classpaths != null)
- foreach (string classpath in options.Classpaths)
- Arguments.Sources = Q(classpath);
-
- foreach (string arg in additional)
- Arguments.Additionals = arg;
-
- Arguments.Output = Q(Output);
-
- exitCode = 0;
- return false;
- }
-
- public bool Run(out ExitCodes exitCode)
- {
- try
- {
- Run(Arguments.CompcArgs);
-
- exitCode = ExitCode == 0 ? 0 : ExitCodes.ErrorRunningCompiler;
- return false;
- }
- catch (Exception e)
- {
- return ErrorHelper.ErrorRunningCompiler(out exitCode, e);
- }
- }
-
- public string GetAsDocPath()
- {
+ public bool BuildArguments(BuildOptions options, bool debug, bool incremental, out ExitCodes exitCode)
+ {
+ if (string.IsNullOrEmpty(options.Path))
+ return ErrorHelper.InvalidPathToOutput(out exitCode);
+
+ Output = FixOutputPath(options.Path, debug);
+
+ string configname = GetConfigname(options.Platform);
+ //string defaultConfig = Path.Combine(CompilerDirectory, "frameworks", $"{configname}-config.xml");
+
+ string[] additional = ParseArguments(options.Additional);
+ bool isConfignameDefined = false;
+ bool isSwfVersionDefined = false;
+
+ foreach (string argument in additional)
+ {
+ if (!isConfignameDefined && argument.Length > 12 && argument.Substring(0, 12) == "+configname=")
+ {
+ isConfignameDefined = true;
+ if (isSwfVersionDefined) break;
+ continue;
+ }
+ if (!isSwfVersionDefined && argument.Length > 13 && argument.Substring(0, 13) == "-swf-version=")
+ {
+ isSwfVersionDefined = true;
+ if (isConfignameDefined) break;
+ }
+ }
+
+ if (!isConfignameDefined && configname != "flex")
+ Arguments.Configname = configname;
+
+ //if (File.Exists(defaultConfig))
+ // Arguments.LoadConfig = Q(defaultConfig);
+
+ if (File.Exists(options.LoadConfig))
+ Arguments.LoadConfig = Q(options.LoadConfig);
+
+ Arguments.LoadConfig = Q(ConfigFile);
+
+ if (debug)
+ Arguments.Debug = true;
+
+ switch (Version)
+ {
+ case ASCVersions.ASC1:
+ if (incremental)
+ Arguments.Incremental = true;
+ break;
+
+ case ASCVersions.ASC2:
+ if (options.AdvancedTelemetry)
+ {
+ Arguments.AdvancedTelemetry = true;
+
+ if (!string.IsNullOrEmpty(options.AdvancedTelemetryPassword))
+ Arguments.AdvancedTelemetryPassword = Q(options.AdvancedTelemetryPassword);
+ }
+
+ if (options.Inline)
+ Arguments.Inline = true;
+ break;
+ }
+
+ if (!string.IsNullOrEmpty(options.LinkReport))
+ Arguments.LinkReport = options.LinkReport;
+
+ if (!string.IsNullOrEmpty(options.LoadExterns))
+ Arguments.LoadExterns = options.LoadExterns;
+
+ if (!isSwfVersionDefined)
+ {
+ int swfVersion = ResolveSwfVersion(TargetPlayer, options.Platform != FlashPlayer);
+
+ if (swfVersion != -1)
+ Arguments.SwfVersion = swfVersion;
+ }
+
+ if (options.Classpaths != null)
+ foreach (string classpath in options.Classpaths)
+ Arguments.Sources = Q(classpath);
+
+ foreach (string arg in additional)
+ Arguments.Additionals = arg;
+
+ Arguments.Output = Q(Output);
+
+ exitCode = 0;
+ return false;
+ }
+
+ public bool Run(out ExitCodes exitCode)
+ {
+ try
+ {
+ Run(Arguments.CompcArgs);
+
+ exitCode = ExitCode == 0 ? 0 : ExitCodes.ErrorRunningCompiler;
+ return false;
+ }
+ catch (Exception e)
+ {
+ return ErrorHelper.ErrorRunningCompiler(out exitCode, e);
+ }
+ }
+
+ public string GetAsDocPath()
+ {
string path = Path.Combine(Path.GetDirectoryName(CompilerPath), String.AsDoc);
- switch (Version)
- {
- case ASCVersions.ASC1:
- return $"{path}{String.Exe}";
- case ASCVersions.ASC2:
- return $"{path}{String.Bat}";
- default:
- return null;
- }
- }
+ switch (Version)
+ {
+ case ASCVersions.ASC1:
+ return $"{path}{String.Exe}";
+ case ASCVersions.ASC2:
+ return $"{path}{String.Bat}";
+ default:
+ return null;
+ }
+ }
- private static string Q(string text) => WrapWithQuotes(text);
- }
+ private static string Q(string text) => WrapWithQuotes(text);
+ }
internal enum ASCVersions
- {
- None,
- ASC1,
- ASC2,
- }
+ {
+ None,
+ ASC1,
+ ASC2,
+ }
}
diff --git a/SwcBuild/src/AsdocCreator.cs b/SwcBuild/src/AsdocCreator.cs
index 1b0b716..2a0dea8 100644
--- a/SwcBuild/src/AsdocCreator.cs
+++ b/SwcBuild/src/AsdocCreator.cs
@@ -5,83 +5,83 @@
namespace SwcBuild
{
- using static ExitCodes;
- using static FileMode;
- using static ZipArchiveMode;
+ using static ExitCodes;
+ using static FileMode;
+ using static ZipArchiveMode;
internal class AsDocCreator : CompilerProcess
- {
- public AsDocCreator() : base(true, false) { }
+ {
+ public AsDocCreator() : base(true, false) { }
- public string[] Exclude { get; set; }
+ public string[] Exclude { get; set; }
- public void BuildArguments()
- {
- if (File.Exists(ConfigFile))
- Arguments.LoadConfig = ConfigFile;
+ public void BuildArguments()
+ {
+ if (File.Exists(ConfigFile))
+ Arguments.LoadConfig = ConfigFile;
- Arguments.Lenient = true;
- Arguments.KeepXml = true;
- Arguments.SkipXsl = true;
- }
+ Arguments.Lenient = true;
+ Arguments.KeepXml = true;
+ Arguments.SkipXsl = true;
+ }
- public bool Run(out ExitCodes exitCode)
- {
- try
- {
- Run($"{Arguments.AsdocArgs}-output={Output}");
+ public bool Run(out ExitCodes exitCode)
+ {
+ try
+ {
+ Run($"{Arguments.AsdocArgs}-output={Output}");
- if (ExitCode == 0)
- {
- exitCode = 0;
- return false;
- }
+ if (ExitCode == 0)
+ {
+ exitCode = 0;
+ return false;
+ }
- exitCode = ErrorRunningAsDoc;
- return true;
- }
- catch (Exception e)
- {
- return ErrorHelper.ErrorRunningAsDoc(out exitCode, e);
- }
- }
+ exitCode = ErrorRunningAsDoc;
+ return true;
+ }
+ catch (Exception e)
+ {
+ return ErrorHelper.ErrorRunningAsDoc(out exitCode, e);
+ }
+ }
- public bool AddToSwc(string target, bool keepXml, out ExitCodes exitCode)
- {
- try
- {
- using (var swcFile = new FileStream(target, Open))
- using (var archive = new ZipArchive(swcFile, Update))
- {
- string directory = Path.Combine(Output, "tempdita");
+ public bool AddToSwc(string target, bool keepXml, out ExitCodes exitCode)
+ {
+ try
+ {
+ using (var swcFile = new FileStream(target, Open))
+ using (var archive = new ZipArchive(swcFile, Update))
+ {
+ string directory = Path.Combine(Output, "tempdita");
- foreach (string file in Directory.GetFiles(directory))
- {
- string filename = Path.GetFileName(file);
+ foreach (string file in Directory.GetFiles(directory))
+ {
+ string filename = Path.GetFileName(file);
- if (filename == null || Exclude.Contains(filename))
- continue;
+ if (filename == null || Exclude.Contains(filename))
+ continue;
- string destination = Path.Combine("docs", filename);
+ string destination = Path.Combine("docs", filename);
- using (var original = File.OpenRead(file))
- using (var compressed = archive.CreateEntry(destination).Open())
- {
- original.CopyTo(compressed);
- }
- }
- }
+ using (var original = File.OpenRead(file))
+ using (var compressed = archive.CreateEntry(destination).Open())
+ {
+ original.CopyTo(compressed);
+ }
+ }
+ }
- if (!keepXml)
- Directory.Delete(Output, true);
+ if (!keepXml)
+ Directory.Delete(Output, true);
- exitCode = 0;
- return false;
- }
- catch (Exception e)
- {
- return ErrorHelper.ErrorRunningAsDoc(out exitCode, e);
- }
- }
- }
+ exitCode = 0;
+ return false;
+ }
+ catch (Exception e)
+ {
+ return ErrorHelper.ErrorRunningAsDoc(out exitCode, e);
+ }
+ }
+ }
}
diff --git a/SwcBuild/src/BuildOptions.cs b/SwcBuild/src/BuildOptions.cs
index 308f4f1..8a1edf2 100644
--- a/SwcBuild/src/BuildOptions.cs
+++ b/SwcBuild/src/BuildOptions.cs
@@ -3,226 +3,226 @@
namespace SwcBuild
{
- using A = BuildOptionAttributes;
- using E = BuildOptionElements;
- using G = BuildOptionGroups;
- using list = XmlNodeList;
- using xml = XmlElement;
+ using A = BuildOptionAttributes;
+ using E = BuildOptionElements;
+ using G = BuildOptionGroups;
+ using list = XmlNodeList;
+ using xml = XmlElement;
internal class BuildOptions
- {
- public string OutputType = null;
- public string Input = null;
- public string Path = null;
- public string Fps = null;
- public string Width = null;
- public string Height = null;
- public string Version = null;
- public string MinorVersion = null;
- public string Platform = null;
- public string Background = null;
-
- public bool Accessible = false;
- public bool AdvancedTelemetry = false;
- public bool AllowSourcePathOverlap = false;
- public bool Benchmark = false;
- public bool Es = false;
- public bool Inline = false;
- public bool Optimize = false;
- public bool OmitTraces = false;
- public bool ShowActionScriptWarnings = true;
- public bool ShowBindingWarnings = true;
- public bool ShowDeprecationWarnings = true;
- public bool ShowInvalidCss = true;
- public bool ShowUnusedTypeSelectorWarnings = true;
- public bool StaticLinkRSL = false;
- public bool Strict = true;
- public bool UseNetwork = true;
- public bool UseResourceBundleMetadata = true;
- public bool VerboseStackTraces = false;
- public bool Warnings = true;
-
- public string AdvancedTelemetryPassword = null;
- public string Locale = null;
- public string LoadConfig = null;
- public string LinkReport = null;
- public string LoadExterns = null;
- public string Additional = null;
- public string MinorVersion2 = null;
- public string CompilerConstants = null;
-
- public string[] Classpaths = null;
- public string[] ExternalLibraryPaths = null;
- public string[] IncludeLibraries = null;
- public string[] LibraryPaths = null;
- public string[] RslPaths = null;
-
- public BuildOptions() { }
-
- public bool Parse(xml data, out ExitCodes exitCode)
- {
- try
- {
- //