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); } }
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}'..."); } }