示例#1
0
        static void Main(string[] args)
        {
            SparkGlobals.InitializeGlobals(args.ToList());
            string a   = System.IO.Directory.GetCurrentDirectory();
            string dir = System.IO.Path.GetDirectoryName(ExeUtils.GetCurrentExePath());

            System.IO.Directory.SetCurrentDirectory(dir);
            string b = System.IO.Directory.GetCurrentDirectory();

            //
            // Args to build
            //
            if (SparkGlobals.ProgramMode == SparkProgramMode.Build)
            {
                BuildForm bf = new BuildForm();
                try
                {
                    bf.Show();
                    InstallerBuilder ib = new InstallerBuilder();
                    ib.BuildInstaller(bf);
                    bf.Hide();
                }
                catch (Exception ex)
                {
                    System.Windows.Forms.MessageBox.Show(ex.ToString());
                }
            }
            else
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new MainForm());
            }
        }
示例#2
0
        public string WriteUninstaller(InstallOptions objOptions, string strInstallRoot)
        {
            // ** Add the installer to the install directory so we can uninstall.
            string uninstallFileName = System.IO.Path.Combine(strInstallRoot, "Uninstall.exe");

            Globals.Logger.LogInfo("Writing File " + uninstallFileName);

            InstallerBuilder builder = new InstallerBuilder();

            builder.BuildUninstaller(this, objOptions, uninstallFileName);

            //InstalledFiles.Add(uninstallFileName);
            return(uninstallFileName);
        }