Exemplo n.º 1
0
        private static bool RunPostWizard(PackagedApplication packagedApplication, string applicationDataFile)
        {
            // Packaging succeeded, now gather the required configuration data from the user.
            var postWizard = new PostPackagingWizard(packagedApplication);

            if (postWizard.ShowDialog() != DialogResult.OK)
            {
                return(false); // ToDo: Clean up first?
            }
            // Save the resulting data.
            return(ApplicationData.Save(postWizard.Result, applicationDataFile));
        }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of <see cref="PostPackagingWizard"/>.
 /// </summary>
 /// <param name="packagedApplication"></param>
 public PostPackagingWizard(PackagedApplication packagedApplication)
 {
     _installerResult = packagedApplication;
     _state           = new PostConfigurationState();
 }
Exemplo n.º 3
0
 private static bool RunPackagingSequence(PreConfigurationState preConfigurationState, ApplicationData applicationData, out PackagedApplication packagedApplication)
 {
     try
     {
         var packager = new Packager(applicationData, preConfigurationState.InstallerOutputDestination);
         packagedApplication = packager.CreatePackage();
         return(true);
     }
     catch (Exception ex)
     {
         HostCore.Log.Error("Packaging failed", ex);
         MessageReporter.Show(FormatMessageFor(ex) + "\r\nCheck the log files or the extended information for troubleshooting.",
                              "Packaging failed!", ex, MessageBoxButtons.OK, MessageBoxIcon.Error);
         // ToDo: Clean up first!
         packagedApplication = null;
         return(false);
     }
 }