Beispiel #1
0
 private static void GenerateProductPrerequisites(ConfigurationModel.Product product, StringBuilder preInstallDeps)
 {
     if (product.Prerequisite != null)
     {
         GenerateRequirementArrayEntries(product.Tag, product.Prerequisite, preInstallDeps);
     }
 }
Beispiel #2
0
 private static void GenerateProductRequires(ConfigurationModel.Product product, StringBuilder postInstallTests)
 {
     if (product.Requires != null)
     {
         GenerateRequirementArrayEntries(product.Tag, product.Requires, postInstallTests);
     }
 }
Beispiel #3
0
 private static void GenerateProductExternalFunctions(ConfigurationModel.Product product, StringBuilder externalFunctions)
 {
     if (product.TestPresence != null)
     {
         var productTestFunction =
             string.Format("extern bool {0}(const _TCHAR * pszMinVersion, const _TCHAR * pszMaxVersion, SoftwareProduct * Product);",
                           product.TestPresence.TestFunction);
         externalFunctions.AppendLine(productTestFunction);
     }
     if (!string.IsNullOrEmpty(product.Preinstall))
     {
         externalFunctions.AppendLine(string.Format("extern int {0}(SoftwareProduct * Product);", product.Preinstall));
     }
     if (product.Install != null && product.Install.Type == "Internal")
     {
         externalFunctions.AppendLine(string.Format("extern DWORD {0}(bool fFlag, SoftwareProduct * Product);",
                                                    product.Install.InstallFunction));
     }
     if (product.PostInstall != null)
     {
         externalFunctions.AppendLine(string.Format("extern int {0}(SoftwareProduct * Product);",
                                                    product.PostInstall.PostInstallFunction));
     }
 }
Beispiel #4
0
 private static void GenerateProductInstallVariables(ConfigurationModel.Product product, StringBuilder builder)
 {
     if (product.Install.Type == "Internal")
     {
         GenerateProductStringVariable(null, "No Install Cmd condition", builder);
         GenerateProductStringVariable(null, "No Install Cmd for true condition", builder);
         GenerateProductStringVariable(null, "No Install Cmd for false condition", builder);
         GenerateProductStringVariable(null, "No MsiFlags", builder);
         GenerateProductBoolVariable(false, "Don't test ANSI conversion", builder);
         GenerateProductStringVariable(null, "No MsiUpgradeFrom", builder);
         GenerateProductStringVariable(null, "No MsiUpgradeTo", builder);
         GenerateProductStringVariable(null, "No MsiUpgradeFlags", builder);
         GenerateProductFunctionVariable(product.Install.InstallFunction, "Internal install function", builder);
     }
     else
     {
         if (!string.IsNullOrEmpty(product.Install.Flag))
         {
             GenerateProductFunctionVariable(product.Install.Flag, "Install Cmd condition flag", builder);
             GenerateProductPathVariable(product.Install.True, "Install Cmd condition true", builder);
             GenerateProductPathVariable(product.Install.False, "Install Cmd condition true", builder);
         }
         else
         {
             GenerateProductStringVariable(null, "No Install Cmd condition", builder);
             GenerateProductStringVariable(product.Install.InstallFunction, "External install Cmd", builder);
             GenerateProductStringVariable(null, "No Install Cmd for false condition", builder);
         }
         GenerateProductStringVariable(product.Install.MsiFlags, "No MsiFlags", builder);
         GenerateProductBoolVariable(false, "Don't test ANSI conversion (Obsolete)", builder);
         GenerateProductStringVariable(product.Install.MsiUpgradeFrom, "MsiUpgradeFrom", builder);
         GenerateProductStringVariable(product.Install.MsiUpgradeTo, "No MsiUpgradeTo", builder);
         GenerateProductStringVariable(null, "No MsiUpgradeFlags (Obsolete)", builder);
         GenerateProductFunctionVariable(null, "No internal install function", builder);
     }
 }