Пример #1
0
        private string GetBootstrapperInfo()
        {
            string temp = Utilities.AddIfNotEmpty("\tbootstrapper.Condition = \"NOT //INSERTTEXTHERE//\";", Options.GetMinimumNetVersion());

            //temp += $"\tbootstrapper.Version =Tasks.GetVersionFromFile(msiproject);\n";
            temp += Utilities.AddIfNotEmpty("\tbootstrapper.Version = new System.Version(\"//INSERTTEXTHERE//\");", application.GetVersion());
            temp += Utilities.AddIfNotEmpty("\tbootstrapper.UpgradeCode = new System.Guid(\"//INSERTTEXTHERE//\");", application.GetBootstapperGuid());
            temp += Utilities.AddIfNotEmpty("\tbootstrapper.Manufacturer = \"//INSERTTEXTHERE//\";", application.GetPublisher());
            temp += Utilities.AddIfNotEmpty("\tbootstrapper.HelpUrl = \"//INSERTTEXTHERE//\";", application.GetLink());
            temp += Utilities.AddIfNotEmpty("\tbootstrapper.IconFile = @\"//INSERTTEXTHERE//\";", application.GetIcon());
            //  temp += Utilities.AddIfNotEmpty("\tbootstrapper.OutFileName = \"//INSERTTEXTHERE//netfx\";", application.GetProductName().Replace(" ", ""));
            temp += $"\tbootstrapper.OutFileName = OutputFile +\"netfx\";{Environment.NewLine}";
            return(temp);
        }
Пример #2
0
        private string GetMainProjectInfo()
        {
            string temp = Utilities.AddIfNotEmpty("\tproject.GUID = new Guid(\"//INSERTTEXTHERE//\");", application.GetProductGuid());

            temp += Utilities.AddIfNotEmpty("\tproject.LicenceFile = @\"//INSERTTEXTHERE//\";", Sourcefiles.GetLicensePath());
            temp += Utilities.AddIfNotEmpty("\tproject.Version = new System.Version(\"//INSERTTEXTHERE//\");", application.GetVersion());
            temp += Utilities.AddIfNotEmpty("\tproject.ControlPanelInfo.Comments = \"//INSERTTEXTHERE// msi\";", application.GetProductName());
            temp += Utilities.AddIfNotEmpty("\tproject.ControlPanelInfo.Readme = @\"//INSERTTEXTHERE//\";", Sourcefiles.GetReadMePath());
            temp += Utilities.AddIfNotEmpty("\tproject.ControlPanelInfo.HelpLink = @\"//INSERTTEXTHERE//\";", application.GetLink());
            temp += Utilities.AddIfNotEmpty("\tproject.ControlPanelInfo.Manufacturer = \"//INSERTTEXTHERE//\";", application.GetPublisher());
            temp += Utilities.AddIfNotEmpty("\tproject.ControlPanelInfo.ProductIcon = @\"//INSERTTEXTHERE//\";", application.GetIcon());
            temp += "\tproject.OutFileName = OutputFile; ";
            temp += $"\tproject.ControlPanelInfo.InstallLocation = \"[INSTALLDIR]\";{Environment.NewLine}";
            if (Options.GetIncludeUninstall())
            {
                temp += $"\tproject.AfterInstall += Project_AfterInstall;{Environment.NewLine}";
            }
            if (Options.GetBuild64())
            {
                temp += $" \tif (Environment.GetEnvironmentVariable(\"buid_as_64\") != null) {Environment.NewLine}\tproject.Platform = Platform.x64; ";
            }
            if (WElements.Count > 0)
            {
                temp += $"\tproject.WixSourceGenerated += InjectElements;{Environment.NewLine}";
            }
            return(temp);
        }