Example #1
0
        private string GetProjectStructure()
        {
            string line = "";

            line += $", {Environment.NewLine}\tnew Dir(@\"{installdir}\",{Environment.NewLine}{Sourcefiles.GetMainExecutableLicenseReadMeLine(application.GetProductName(), progmenu)}";
            line += FireExcept.GetLine();
            if (Options.GetIncludeUninstall())
            {
                line += $", {Environment.NewLine} \tnew ExeFileShortcut(\"Uninstall {application.GetProductName()}\", \"[System64Folder]msiexec.exe\", \"/x [ProductCode]\")";
            }
            string directory = Sourcefiles.GetAppMainDirectory();

            foreach (var file in Sourcefiles.GetSourceFiles(directory))
            {
                line += $", {Environment.NewLine} {file.GetFileLine()}";
            }
            line += Sourcefiles.GetSubdirectoryfiles();

            line += ")";
            foreach (var newdirectory in Sourcefiles.GetDirectories(true))
            {
                line += $", new Dir({Utilities.directorynamecheck(newdirectory)}";
                foreach (var file in Sourcefiles.GetSourceFiles(newdirectory))
                {
                    line += $",{Environment.NewLine}\t {file.GetFileLine()}";
                }
                line += ")";
            }
            line += Certs.GetCertificatesLine();
            line += EnvironmentVariables.GetLine();
            line += Registryvalues.GetLine();
            if (Options.GetOptionalDesktopShortcut())
            {
                line += Options.GetShortcutDesktopLines();
            }
            if (Options.GetPromptReboot())
            {
                line += Options.GetRebootLine();
            }
            line += users.GetUsersLine();
            return(line);
        }
Example #2
0
 private string GetInitializeBootstrapper(string msiproject)
 {
     return($"var bootstrapper = new Bundle(\"{application.GetProductName()}\", new PackageGroupRef(\"{Options.GetNettoInstall()}\"), new MsiPackage({msiproject}) {{DisplayInternalUI = true}});{Environment.NewLine} ");
 }
Example #3
0
        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);
        }