private static void main(string[] args) { _kernel.Load <CoreModule>(); _kernel.Load <DalModule>(); _kernel.Load <UtilModule>(); if (args.GetFlag("-create_shortcut")) { string exePath = args.GetParam("-exe_path"); string iconPath = args.GetParam("-ico_path"); string shortcutPath = args.GetParam("-src_path"); Shortcut.CreateApplicationShortcut( exePath: new FsPath(exePath), iconPath: new FsPath(iconPath), shortcutPath: new FsPath(shortcutPath)); return; } string directory = args.GetParam("-rename_artworks"); if (directory != null) { ArtworkRenamer.RenameArtworks(new FsPath(directory), new ShellWrapper()); return; } directory = args.GetParam("-sign"); if (directory != null) { string setCodes = args.GetParam("-set"); string output = args.GetParam("-output") ?? AppDir.Root.Join("filelist.txt").Value; _kernel.Get <ImageDirectorySigner>().SignFiles(new FsPath(directory), new FsPath(output), setCodes); return; } printUsage(); }
private static void main(string[] args) { _kernel.Load <CoreModule>(); _kernel.Load <DalModule>(); _kernel.Load <UtilModule>(); if (args.GetFlag("-notify")) { NewVersionNotifier.Notify(); return; } if (args.GetFlag("-update_help")) { Console.Write("Updating local help..."); new HelpDownloader().UpdateLocalHelp(); Console.WriteLine(" Done"); return; } string directory = args.GetParam("-rename_artworks"); if (directory != null) { ArtworkRenamer.RenameArtworks(directory); return; } directory = args.GetParam("-sign"); if (directory != null) { var output = args.GetParam("-output") ?? AppDir.Root.AddPath("filelist.txt"); sign(directory, output); return; } directory = args.GetParam("-export"); if (directory != null) { bool silent = args.GetFlag("-silent"); bool small = args.GetFlag("-small"); bool zoomed = args.GetFlag("-zoomed"); string setCode = args.GetParam("-set"); string smallSubdir; string zoomedSubdir; if (small || zoomed) { smallSubdir = args.GetParam("-small"); zoomedSubdir = args.GetParam("-zoomed"); } else { printUsage(); return; } if (Directory.Exists(directory)) { exportImages(small, zoomed, setCode, directory, silent, smallSubdir, zoomedSubdir); } else { printUsage(); } return; } if (args.GetFlag("-forge")) { string setCode = args.GetParam("-set"); replaceForgeImages(setCode); } }