예제 #1
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);
        }
예제 #2
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);
        }
예제 #3
0
파일: BuildMains.cs 프로젝트: glcjr/Wixard
        private string GetInitMain(string returntype)
        {
            string temp = $"public static {returntype} Process(params string[] Args) {Environment.NewLine} {{ {Environment.NewLine} \t try {Environment.NewLine}\t{{ {Environment.NewLine}";

            temp += $"OutputFile = @\"{System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)}\\Wixard\\{AppInfo.GetProductName()}{AppInfo.GetVersion()}\\{AppInfo.GetProductName()}\";{Environment.NewLine}";
            temp += $"//changing the OutputFile value will result in the compiler not being able to create the script after it compiles this script.\n // You'll need to download the wixsharp dlls to your new location and launch by hand {Environment.NewLine}";
            return(temp);
        }