public static int Main(string[] args)
        {
            try
            {
                if (Parser.ParseHelp(args))
                {
                    StringBuilder sb = new StringBuilder();
                    sb.AppendLine(string.Format("InstallerEditor: dotNetInstaller Configuration Editor ({0})",
                                                Assembly.GetExecutingAssembly().GetName().Version));
                    sb.AppendLine();
                    sb.AppendLine(Parser.ArgumentsUsage(typeof(InstallerEditorArguments)));
                    MessageBox.Show(sb.ToString(), "Installer Editor Help", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return(2);
                }

                if (Parser.ParseArguments(args, _cmdargs, new ErrorReporter(ReportError)))
                {
                    Application.Run(new MainForm());
                }

                return(Environment.ExitCode);
            }
            catch (Exception ex)
            {
                AppUtility.ShowError(null, ex);
                return(-1);
            }
        }
Exemplo n.º 2
0
 private void linkWebsite_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     try
     {
         SourceLibrary.Utility.Shell.ExecCommand("http://dotnetinstaller.codeplex.com/");
     }
     catch (Exception err)
     {
         AppUtility.ShowError(this, err);
     }
 }
        private void btOK_Click(object sender, System.EventArgs e)
        {
            try
            {
                foreach (WizardComponent w in chkListComponents.CheckedItems)
                {
                    m_SelectedComponents.AddRange(w.CreateComponent(txtSupportFilesWebSite.Text, txtSupportFilesFileSystem.Text));
                }

                DialogResult = DialogResult.OK;
            }
            catch (Exception err)
            {
                AppUtility.ShowError(this, err);
            }
        }
Exemplo n.º 4
0
 private void btBrowseSplashBitmap_Click(object sender, EventArgs e)
 {
     try
     {
         OpenFileDialog l_dg = new OpenFileDialog();
         l_dg.Filter = "Bitmap File (*.bmp)|*.bmp|All Files(*.*)|*.*";
         if (l_dg.ShowDialog(this) == DialogResult.OK)
         {
             txtSplashBitmap.Text = l_dg.FileName;
         }
     }
     catch (Exception err)
     {
         AppUtility.ShowError(this, err);
     }
 }
Exemplo n.º 5
0
 private void btBrowseManifest_Click(object sender, EventArgs e)
 {
     try
     {
         OpenFileDialog l_dg = new OpenFileDialog();
         l_dg.Filter = "Manifest File (*.manifest)|*.manifest|All Files(*.*)|*.*";
         if (l_dg.ShowDialog(this) == DialogResult.OK)
         {
             txtManifest.Text = l_dg.FileName;
         }
     }
     catch (Exception err)
     {
         AppUtility.ShowError(this, err);
     }
 }
Exemplo n.º 6
0
 private void btBrowseTemplateFile_Click(object sender, System.EventArgs e)
 {
     try
     {
         OpenFileDialog l_dg = new OpenFileDialog();
         l_dg.Filter = "Exe File (*.exe)|*.exe|All Files(*.*)|*.*";
         if (l_dg.ShowDialog(this) == DialogResult.OK)
         {
             txtTemplateFile.Text = l_dg.FileName;
         }
     }
     catch (Exception err)
     {
         AppUtility.ShowError(this, err);
     }
 }
Exemplo n.º 7
0
        private void btMake_Click(object sender, System.EventArgs e)
        {
            try
            {
                if (!System.IO.File.Exists(txtTemplateFile.Text))
                {
                    throw new ApplicationException("Template file '" + txtTemplateFile.Text + "' is missing");
                }

                if (!System.IO.File.Exists(ConfigFile))
                {
                    throw new ApplicationException("Configuration file '" + ConfigFile + " ' is missing");
                }

                SaveFileDialog l_dg = new SaveFileDialog();
                l_dg.FileName   = m_OutputFileName;
                l_dg.Filter     = "Exe File (*.exe)|*.exe|All Files(*.*)|*.*";
                l_dg.DefaultExt = "exe";
                if (l_dg.ShowDialog(this) == DialogResult.OK)
                {
                    InstallerLinkerArguments args = new InstallerLinkerArguments();
                    args.banner   = txtBannerBitmap.Text;
                    args.icon     = txtIcon.Text;
                    args.config   = ConfigFile;
                    args.output   = l_dg.FileName;
                    args.template = txtTemplateFile.Text;
                    args.embed    = chkEmbed.Checked;
                    args.manifest = txtManifest.Text;
                    args.splash   = txtSplashBitmap.Text;
                    InstallerLinker.CreateInstaller(args);
                    m_OutputFileName = l_dg.FileName;
                    DialogResult     = DialogResult.OK;
                    Close();
                }
            }
            catch (Exception err)
            {
                AppUtility.ShowError(this, err);
            }
        }