Beispiel #1
0
        public void PostBuildEvents(bool pDebug, Dictionary <string, string> pArguments, out string pOutput, out ICollection <Error> pErrors)
        {
            if (!pArguments.ContainsKey(@"FlexSdkPath"))
            {
                pOutput = string.Empty;
                pErrors = new Error[0];
                return;
            }

            ProcessArguments process = new ProcessArguments();

            As3ProjectBuilder builder = new As3ProjectBuilder(pArguments[@"FlexSdkPath"]);

            pArguments.Remove(@"FlexSdkPath");

            process.AddArgument(Path.Combine(_outputFolder, MainClassName.Replace(".", "\\") + ".as"));
            process.AddArgument("source-path", _outputFolder);

            if (pDebug)
            {
                process.AddArgument(@"debug", "true");
                process.AddArgument(@"omit-trace-statements", "false");
                process.AddArgument(@"verbose-stacktraces", "true");
            }

            foreach (var argument in pArguments)
            {
                process.AddArgument(argument.Key, argument.Value);
            }

            process.AddArgument("o", Path.Combine(_outputFolder, @"..\swf\file.swf"));

            pErrors = builder.Compile(_outputFolder, process.ToString(), false, out pOutput);
        }
		public void PostBuildEvents(bool pDebug, Dictionary<string, string> pArguments, out string pOutput, out ICollection<Error> pErrors) {
			if (!pArguments.ContainsKey(@"FlexSdkPath")) {
				pOutput = string.Empty;
				pErrors = new Error[0];
				return;
			}

			ProcessArguments process = new ProcessArguments();

			As3ProjectBuilder builder = new As3ProjectBuilder(pArguments[@"FlexSdkPath"]);
			pArguments.Remove(@"FlexSdkPath");

			process.AddArgument(Path.Combine(_outputFolder, MainClassName.Replace(".", "\\")+".as"));
			process.AddArgument("source-path", _outputFolder);

			if (pDebug) {
				process.AddArgument(@"debug", "true");
				process.AddArgument(@"omit-trace-statements", "false");
				process.AddArgument(@"verbose-stacktraces", "true");
			}

			foreach (var argument in pArguments) {
				process.AddArgument(argument.Key, argument.Value);	
			}

			process.AddArgument("o", Path.Combine(_outputFolder, @"..\swf\file.swf"));

			pErrors = builder.Compile(_outputFolder, process.ToString(), false, out pOutput);
		}