static void Main(string[] args) { BuildType = "Release"; if (args.Any(arg => arg.ToLowerInvariant() == "debug")) { BuildType = "Debug"; } // Get our .exe folder path: var exePath = System.Reflection.Assembly.GetExecutingAssembly().Location; if (exePath == null) { throw new Exception("So sorry, don't know where we are!"); } ExeFolder = Path.GetDirectoryName(exePath); // Read in the InstallerConfig file: Configuration = new XmlDocument(); Configuration.Load("InstallerConfig.xml"); // Update the File and Registry Libraries: var libraryUpdater = new ComponentLibraryUpdater(); libraryUpdater.UpdateLibraries(); // Get an object to handle archiving and associated folders: var archiveFolderManager = new ArchiveFolderManager(); // Archive the important files into the latest build version folder: archiveFolderManager.ArchiveFile("AutoFiles.wxs"); archiveFolderManager.ArchiveFile("AutoFiles_No_TE.wxs"); archiveFolderManager.ArchiveFile("FileLibrary.xml"); archiveFolderManager.ArchiveFile("SetupFW.msi"); archiveFolderManager.ArchiveFile("SetupFW.wixpdb"); archiveFolderManager.ArchiveFile("SetupFW_SE.msi"); archiveFolderManager.ArchiveFile("SetupFW_SE.wixpdb"); // Build patches from all previous versions to get to the latest version Parallel.For(1, archiveFolderManager.NumArchives, index => { // If there is a previous installer in the series, build a patch from the // previous installer to this new one: if (archiveFolderManager.GetNthFromEndVersion(index) != null) { Parallel.Invoke ( () => BuildPatch(archiveFolderManager, index, "SetupFW", "FW_BTE_"), () => BuildPatch(archiveFolderManager, index, "SetupFW_SE", "FW_SE_") ); } }); }
static void Main(string[] args) { BuildType = "Release"; if (args.Any(arg => arg.ToLowerInvariant() == "debug")) BuildType = "Debug"; // Get our .exe folder path: var exePath = System.Reflection.Assembly.GetExecutingAssembly().Location; if (exePath == null) throw new Exception("So sorry, don't know where we are!"); ExeFolder = Path.GetDirectoryName(exePath); // Read in the InstallerConfig file: Configuration = new XmlDocument(); Configuration.Load("InstallerConfig.xml"); // Update the File and Registry Libraries: var libraryUpdater = new ComponentLibraryUpdater(); libraryUpdater.UpdateLibraries(); // Get an object to handle archiving and associated folders: var archiveFolderManager = new ArchiveFolderManager(); // Archive the important files into the latest build version folder: archiveFolderManager.ArchiveFile("AutoFiles.wxs"); archiveFolderManager.ArchiveFile("AutoFiles_No_TE.wxs"); archiveFolderManager.ArchiveFile("FileLibrary.xml"); archiveFolderManager.ArchiveFile("SetupFW.msi"); archiveFolderManager.ArchiveFile("SetupFW.wixpdb"); archiveFolderManager.ArchiveFile("SetupFW_SE.msi"); archiveFolderManager.ArchiveFile("SetupFW_SE.wixpdb"); // Build patches from all previous versions to get to the latest version Parallel.For(1, archiveFolderManager.NumArchives, index => { // If there is a previous installer in the series, build a patch from the // previous installer to this new one: if (archiveFolderManager.GetNthFromEndVersion(index) != null) { Parallel.Invoke ( () => BuildPatch(archiveFolderManager, index, "SetupFW", "FW_BTE_"), () => BuildPatch(archiveFolderManager, index, "SetupFW_SE", "FW_SE_") ); } }); }