示例#1
0
        public static void CreateFromExtension(string inputPath, string outputPath)
        {
            using (var workingDirectory = WorkingDirectory.Create())
            {
                var packageId    = Path.GetFileNameWithoutExtension(outputPath);
                var assetPackage = new AssetPackageBuilder(workingDirectory, packageId);
                assetPackage.CreateFromExtension(inputPath);

                ZipFile.CreateFromDirectory(workingDirectory, outputPath);
            }
        }
示例#2
0
        public static void Main(string[] args)
        {
            // gmextpack -v23 extension.yy
            // gmextpack -v22 package.yymps

            var config = RuntimeConfig.FromCommandLine(args);

            if (config == null)
            {
                RuntimeConfig.ShowHelp();
                return;
            }

            if (config.ModeConvertToPackage)
            {
                AssetPackageBuilder.CreateFromExtension(config.InputPath, config.OutputPath);
                Console.WriteLine($"Saved to '{config.OutputPath}'...");
            }
            else
            {
                ExtensionBuilder.Do(config.InputPath, config.OutputPath);
                Console.WriteLine($"Saved to '{config.OutputPath}'...");
            }
        }