コード例 #1
0
        public bool Parse(List <string> argv)
        {
            int i = ArgParser.Parse(argv, "-build");

            if (i < 0)
            {
                return(false);
            }

            Splash.Screen.SetMessage("Building Package...");

            string output = "";
            string input  = "";

            while (argv.Count - i > 0 && input.Length == 0 && output.Length == 0)
            {
                if (ArgParser.Parse(argv, i, "-desc", ref input))
                {
                    continue;
                }
                if (ArgParser.Parse(argv, i, "-out", ref output))
                {
                    continue;
                }
                SimPe.Message.Show(Help()[0]);
                return(true);
            }

            if (input.Length == 0 || output.Length == 0)
            {
                SimPe.Message.Show(Help()[0]);
                return(true);
            }
            if (!System.IO.File.Exists(input))
            {
                SimPe.Message.Show(Help()[0]);
                return(true);
            }

            GeneratableFile pkg = GeneratableFile.LoadFromStream(XmlPackageReader.OpenExtractedPackage(null, input));

            pkg.Save(output);

            Splash.Screen.SetMessage("");
            return(true);
        }
コード例 #2
0
 /// <summary>
 /// Creates a new Instance and a new Package
 /// </summary>
 public ObjectCloner()
 {
     package = GeneratableFile.LoadFromStream((System.IO.BinaryReader)null);
     setup   = new CloneSettings();
 }