예제 #1
0
        static void Main()
        {
            var selectedExe = "MifareWindowsTool.exe";
            var solDir      = System.IO.Directory.GetParent(System.IO.Directory.GetParent(System.IO.Directory.GetParent(System.IO.Directory.GetParent(System.Reflection.Assembly.GetExecutingAssembly().Location).FullName).FullName).FullName).FullName + "\\MifareWindowsTool";
            var buildDir    = System.IO.Path.Combine(solDir, "bin\\Release");
            var project     = new ManagedProject("MifareWindowsTool",
                                                 new Dir(@"%ProgramFiles%\AVXTEC\MWT"
                                                         , new Files(buildDir + @"\*.*")));

            project.SetNetFxPrerequisite("NETFRAMEWORK45 >= '#461808'", "Please install .Net 4.7.2 First");
            project.ProductId = Guid.NewGuid();
            project.GUID      = new Guid("6fe30b47-2577-43ad-9095-1861ba25779b");
            project.ManagedUI = new ManagedUI();
            project.Name      = "MWT";
            project.ManagedUI.InstallDialogs
            .Add(Dialogs.InstallDir)
            .Add(Dialogs.Progress)
            .Add(Dialogs.Exit);

            project.ManagedUI.ModifyDialogs.Add(Dialogs.MaintenanceType)
            .Add(Dialogs.Progress)
            .Add(Dialogs.Exit);
            var IconFilename = System.IO.Path.Combine(solDir, "MWT.ico");

            var desktopShortcut = new FileShortcut(selectedExe, "%Desktop%")
            {
                Name = "MWT"
            };
            var programMenuShortCut = new FileShortcut(selectedExe, @"%ProgramMenu%")
            {
                Name = $"MWT"
            };

            if (!string.IsNullOrWhiteSpace(IconFilename))
            {
                desktopShortcut.IconFile     = IconFilename;
                programMenuShortCut.IconFile = IconFilename;
            }
            project.ResolveWildCards(true)
            .FindFirstFile(selectedExe)
            .Shortcuts = new[] {
                desktopShortcut,
                programMenuShortCut
            };

            project.ControlPanelInfo.UrlInfoAbout = "https://github.com/xavave/Mifare-Windows-Tool";
            project.ControlPanelInfo.ProductIcon  = IconFilename;
            project.ControlPanelInfo.Contact      = "AVXTEC";
            project.ControlPanelInfo.Manufacturer = "AVXTEC";
            project.BuildMsi();
        }
예제 #2
0
        static void Main(string[] args)
        {
            string baseFolderPath = @"C:\Users\frede\Source\Repos\saft\src\SolRIA.SaftAnalyser\bin\Release";

            var project = new ManagedProject("SolRIA SAFT",
                                             new Dir(@"%ProgramFiles%\SolRIA\SolRIA SAFT",
                                                     new File(System.IO.Path.Combine(baseFolderPath, "license.txt")),
                                                     new File(System.IO.Path.Combine(baseFolderPath, "NLog.config")),
                                                     new File(System.IO.Path.Combine(baseFolderPath, "SolRIA.SaftAnalyser.exe"),
                                                              new FileShortcut("SolRIA SAFT Analyser", @"%ProgramMenu%\SolRIA\SolRIA SAFT"),
                                                              new FileShortcut("SolRIA SAFT Analyser", @"%Desktop%")),
                                                     new File(System.IO.Path.Combine(baseFolderPath, "Dragablz.dll")),
                                                     new File(System.IO.Path.Combine(baseFolderPath, "EPPlus.dll")),
                                                     new File(System.IO.Path.Combine(baseFolderPath, "MaterialDesignColors.dll")),
                                                     new File(System.IO.Path.Combine(baseFolderPath, "MaterialDesignThemes.Wpf.dll")),
                                                     new File(System.IO.Path.Combine(baseFolderPath, "NLog.dll")),
                                                     new File(System.IO.Path.Combine(baseFolderPath, "SolRIA.SaftAnalyser.Logic.dll")),
                                                     new File(System.IO.Path.Combine(baseFolderPath, "Syncfusion.Data.WPF.dll")),
                                                     new File(System.IO.Path.Combine(baseFolderPath, "Syncfusion.SfGrid.WPF.dll")),
                                                     new File(System.IO.Path.Combine(baseFolderPath, "Syncfusion.SfSkinManager.WPF.dll")),
                                                     new File(System.IO.Path.Combine(baseFolderPath, "Syncfusion.Shared.WPF.dll")),
                                                     new File(System.IO.Path.Combine(baseFolderPath, "Syncfusion.Themes.Blend.WPF.dll")),
                                                     new File(System.IO.Path.Combine(baseFolderPath, "System.Data.SQLite.dll"))));

            project.ResolveWildCards();
            project.OutFileName = "SolRIA.SaftAnalyser";
            project.ProductId   = Guid.NewGuid();
            project.UpgradeCode = new Guid("{9ADF9E4F-BEC5-4875-8E93-6287751C0503}");
            project.Version     = Version.Parse("18.08.01");
            project.LicenceFile = System.IO.Path.Combine(baseFolderPath, "license.rtf");

            project.MajorUpgradeStrategy = MajorUpgradeStrategy.Default;
            project.MajorUpgradeStrategy.RemoveExistingProductAfter = Step.InstallInitialize;

            project.ControlPanelInfo.Comments     = "SolRIA SAF-T Analyser";
            project.ControlPanelInfo.HelpLink     = "http://www.solria.pt/";
            project.ControlPanelInfo.UrlInfoAbout = "http://www.solria.pt/";
            project.ControlPanelInfo.ProductIcon  = System.IO.Path.Combine(baseFolderPath, "app.ico");
            project.ControlPanelInfo.Contact      = "SolRIA, Ideal Software Solutions LDA";
            project.ControlPanelInfo.Manufacturer = "SolRIA, Ideal Software Solutions LDA";
            project.ControlPanelInfo.NoModify     = true;
            project.ControlPanelInfo.NoRepair     = true;

            project.BackgroundImage  = "solria_background2.bmp";
            project.BannerImage      = "solria_banner.bmp";
            project.LocalizationFile = "wixui_pt-PT.wxl";
            project.Encoding         = Encoding.UTF8;

            project.ManagedUI = ManagedUI.Empty;    //no standard UI dialogs

            //custom set of standard UI dialogs
            project.ManagedUI = new ManagedUI();

            project.ManagedUI.InstallDialogs.Add(Dialogs.Welcome)
            .Add(Dialogs.Licence)
            .Add(Dialogs.Progress)
            .Add(Dialogs.Exit);

            project.ManagedUI.ModifyDialogs.Add(Dialogs.MaintenanceType)
            .Add(Dialogs.Progress)
            .Add(Dialogs.Exit);

            Compiler.BuildMsi(project);

            Console.WriteLine("Msi build complete. Enter to close.");
            Console.ReadLine();
        }
예제 #3
0
        static void Main()
        {
            var project = new ManagedProject("WebchatBuilder",
                                             new RegValueProperty("IISMAJORVERSION", RegistryHive.LocalMachine, @"SYSTEM\CurrentControlSet\Services\W3SVC\Parameters", "MajorVersion", "0"),
                                             new LaunchCondition("Installed OR (IISMAJORVERSION AND IISMAJORVERSION >= \"#7\")", "IIS 7 or higher is required."),
                                             new Dir(@"%ProgramFiles%\Qsect\Webchat Builder",
                                                     //new Dir(@"D:\Qsect\Webchat Builder",
                                                     new Dir("WCB Service",
                                                     //new DirFiles(@"..\Release\Service\*.*", f => !f.EndsWith(".pdb") && !f.EndsWith(".obj"))),
                                                             new DirFiles(@"..\Release\Service_x86\*.*", f => !f.EndsWith(".pdb") && !f.EndsWith(".obj"))),
                                                     new Dir("WCB Web",
                                                             new Files(@"..\Release\Wcb\*.*", f => !f.EndsWith(".less") && !f.EndsWith(".map") && !f.EndsWith(".pdb") && !f.EndsWith(".obj")))))
            {
                GUID             = new Guid("e862184a-8bce-4281-bca9-d81242902fb0"),
                OutDir           = @"..\Build",
                LicenceFile      = @"..\Resources\Wcb-License.rtf",
                ControlPanelInfo = new ProductInfo
                {
                    ProductIcon  = @"..\Resources\icon.ico",
                    UrlInfoAbout = "https://qsect.com/webchatbuilder",
                    HelpLink     = "https://qsect.com/support",
                    Manufacturer = "Qsect LLC"
                },
                BackgroundImage  = @"..\Resources\SetupBackground.bmp",
                BannerImage      = @"..\Resources\SetupBanner.bmp",
                Version          = new Version("1.0.0.0"),
                LocalizationFile = "localization.wxl"
            };

            project.SetNetFxPrerequisite("NETFRAMEWORK45 >= '#378389'", "Please install the .Net Framework 4.5 first.");

            var service = project.ResolveWildCards().FindFile((f) => f.Name.EndsWith("WebChatBuilderService.exe")).First();

            service.ServiceInstaller = new ServiceInstaller
            {
                Name     = "Webchat Builder Service",
                StartOn  = SvcEvent.Install,
                StopOn   = SvcEvent.InstallUninstall_Wait,
                RemoveOn = SvcEvent.Uninstall_Wait,
            };

            project.ManagedUI = new ManagedUI();

            project.ManagedUI.InstallDialogs.Add <WelcomeDialog>()
            .Add <LicenceDialog>()
            .Add <WebSettingsDialog>()
            .Add <CicSettingsDialog>()
            .Add <SharedSettingsDialog>()
            .Add <LicenseKeyDialog>()
            .Add <ProgressDialog>()
            .Add <ExitDialog>();

            project.ManagedUI.ModifyDialogs.Add <MaintenanceTypeDialog>()
            .Add <ProgressDialog>()
            .Add <ExitDialog>();

            project.AfterInstall += project_AfterInstall;
            //project.PreserveTempFiles = true;
            project.DefaultDeferredProperties = "INSTALLDIR, UILevel, IIS_WEBSITENAME, IIS_POOL_NAME, WCB_DOMAIN, WCB_ALLOWED_DOMAINS, IIS_WEBSITEIPADDRESS, IIS_WEBSITEPORT, CIC_USER, CIC_PASS, CIC_PRIMARY, CIC_SECONDARY, CIC_PORT, CIC_PROTOCOL, WCB_LICENSE_KEY, WCB_PORT, WCB_CONNECTION_STRING";
            project.OutFileName = "WebchatBuilderSetup";
            project.BuildMsi();
        }