Exemple #1
0
        static bool RedirectOptions(CompilerOptions options)
        {
            foreach (var item in cl.Items)
            {
                switch (item.Type)
                {
                case CommandLine.ItemType.InputFile:
                    options.Input.Add(item.Value);
                    break;

                case CommandLine.ItemType.ResponseFile:
                    options.ResponseFiles.Add(item.Value);
                    break;

                case CommandLine.ItemType.Option:
                    var opt = PFCOptions.Find(item.Name);
                    if (opt == null || opt.DotNetCompiler)
                    {
                        if (!options.SetOption(item.Name, item.Value))
                        {
                            LogError(Errors.InvalidCommandLineOption, item);
                            return(false);
                        }
                    }
                    break;
                }
            }
            return(true);
        }
Exemple #2
0
        static void Usage()
        {
            if (!nologo)
            {
                Logo();
            }

            Console.WriteLine("Usage: pfc.exe [.NET compiler options] [options] <input-files>");
            Console.WriteLine("  where:");
            Console.WriteLine("    <input-files>           - managed assembly (.dll;.exe) files or source code files");
            Console.WriteLine("    [.NET compiler options] - valid .NET compiler options");
            Console.WriteLine("    [options]               - PageFX compiler options listed below");
            Console.WriteLine();
            Console.WriteLine("                      PageFX Compiler Options");
            Console.WriteLine();
            PFCOptions.Usage();
            //ConsoleTestRunner.Usage();
            Console.WriteLine();
            Console.WriteLine();
            Console.WriteLine("NOTE: All relative pathes are resolved relative to current directory.");
        }
Exemple #3
0
 static bool IsPfcOption(CommandLine.Item item)
 {
     return(PFCOptions.Contains(item.Name));
 }