home *** CD-ROM | disk | FTP | other *** search
/ Programming with VisualAge for Java / IBMVJAVA.ISO / vajos2 / install.dat < prev    next >
Text File  |  1997-07-07  |  434KB  |  12,260 lines

  1. //////////////////////////////////////////////////////////////
  2. //
  3. // IBM(R) VisualAge(TM) for Java, Version 1
  4. //  - Licensed Material - Program-Property of IBM
  5. // (C) Copyright IBM Corp. 1997 - All Rights Reserved.
  6. //
  7. //
  8. //
  9. //File: InitPro1 /////////////////////////////////////////////
  10. //
  11. //CIDVars: N/A
  12. //
  13. //Globals changed: All
  14. //
  15. //This file must be the first file in install.dat
  16.  
  17.  
  18. @DefineProject
  19.   @Name = "VisualAge for Java"
  20.   @Version = "1.0"
  21.   @OutDrive = C
  22.   @Subdir = "\\IBMVJava"
  23.  
  24.   @Immediate = 1
  25.   @ShowName(,,,,,,)    //Temporarily disable the background name
  26.  
  27.   @Requires @HardDisk
  28.   @AssumeHardDisk = 1
  29.   
  30. @EndProject
  31.  
  32. //----------------------------------------------------
  33.  
  34. @DefineProto
  35.    @Void @InitProdStrings(@Void)
  36. @EndProto
  37.  
  38. //---------------------------------------------------
  39.  
  40. @DefineVars
  41.    @QString @qProductName = "@Name"
  42.    @QString @qProductPlatform = "for Windows"
  43.    @QString @qProductVersion = "@Version"
  44. @EndVars
  45.  
  46.    // Make platform-specific settings
  47.    @If (@Platform==2)
  48.       @qProductPlatform = "for OS/2"
  49.    @Endif
  50.    @qProductName = "@qProductName @qProductPlatform"
  51.  
  52.   // Reset the variables to match the values in disk.id
  53.   @Name = "VisualAge Install"
  54.   @Version = "0.0"
  55.  
  56. //---------------------------------------------------
  57.  
  58. @DefineFunc @Void @InitProdStrings(@Void)
  59.  
  60.       @qInstallType1 = ""
  61.       @qInstallType2 = ""
  62.       @qInstallType3 = ""
  63.       @qInstallType4 = ""
  64.       @qInstallType5 = ""
  65.       @qInstallType6 = ""
  66.    
  67.       @qInstallTypeHelp1 = ""
  68.       @qInstallTypeHelp2 = ""
  69.       @qInstallTypeHelp3 = ""
  70.       @qInstallTypeHelp4 = ""
  71.       @qInstallTypeHelp5 = ""
  72.       @qInstallTypeHelp6 = ""
  73.  
  74.       @qFeature01 = ""
  75.       @qFeature02 = ""
  76.       @qFeature03 = ""
  77.       @qFeature04 = ""
  78.       @qFeature05 = ""
  79.       @qFeature06 = ""
  80.       @qFeature07 = ""
  81.       @qFeature08 = "" 
  82.       @qFeature09 = "" 
  83.       @qFeature10 = "" 
  84.       @qFeature11 = "" 
  85.       @qFeature12 = "" 
  86.       @qFeature13 = "" 
  87.       @qFeature14 = "" 
  88.       @qFeature15 = "" 
  89.       @qFeature16 = ""
  90.  
  91.       @qFeature01Help = ""
  92.       @qFeature02Help = ""
  93.       @qFeature03Help = ""
  94.       @qFeature04Help = ""
  95.       @qFeature05Help = ""
  96.       @qFeature06Help = ""
  97.       @qFeature07Help = "" 
  98.       @qFeature08Help = "" 
  99.       @qFeature09Help = "" 
  100.       @qFeature10Help = "" 
  101.       @qFeature11Help = "" 
  102.       @qFeature12Help = "" 
  103.       @qFeature13Help = "" 
  104.       @qFeature14Help = "" 
  105.       @qFeature15Help = "" 
  106.       @qFeature16Help = "" 
  107.  
  108.       // Path Names
  109.       @qProduct1 = ""
  110.       @qProduct2 = ""
  111.       @qProduct3 = ""
  112.       @qProduct4 = ""
  113.       @qProduct5 = ""
  114.       @qProduct6 = ""
  115.       @qProduct7 = ""
  116.       @qProduct8 = ""
  117.       @qProduct9 = ""
  118.       @qProduct10 = ""
  119.  
  120.    @If (@iProductClass == @iEnterPrise)
  121.       @qInstallType1 = "Typical"
  122.       @qInstallType2 = "Compact"
  123.       @qInstallType3 = "Custom"
  124.       //   @qInstallType5 = "Team ENVY Server"
  125.    
  126.       @qInstallTypeHelp1 = "The program will be installed with the most common options."
  127.       @qInstallTypeHelp2 = "The program will be installed with the minimum required options."
  128.       @qInstallTypeHelp3 = "You may choose the options to install."
  129.       //      @qInstallTypeHelp5 = "Install Team ENVY Server component only."
  130.  
  131.       @qFeature01 = "Enterprise Access Builders"
  132.       @qFeature02 = "Java Development Kit Help"
  133.       //   @qFeature06 = "Team ENVY Server"
  134.       //   @qFeature16 = "REQUIRED BASE, including IDE (hidden)" 
  135.  
  136.       @qFeature01Help = ""
  137.       @qFeature02Help = ""
  138.       @qFeature16Help = "Required Components (will not be deselectable)" 
  139.  
  140.       // Path Names 
  141.       @qProduct1 = "Install Path"
  142.    //   @qProduct8 = "Team ENVY Server"
  143.  
  144.    @ElseIf (@iProductClass == @iProfessional)
  145.       @qInstallType1 = "Typical"
  146.       @qInstallType2 = "Compact"
  147.       @qInstallType3 = "Custom"
  148.    
  149.       @qInstallTypeHelp1 = "The program will be installed with the most common options."
  150.       @qInstallTypeHelp2 = "The program will be installed with the minimum required options."
  151.       @qInstallTypeHelp3 = "You may choose the options to install."
  152.  
  153.       @qFeature01 = "Java Development Kit Help"
  154.       //   @qFeature06 = "Team ENVY Server"
  155.       //   @qFeature16 = "REQUIRED BASE, including IDE (hidden)" 
  156.  
  157.       @qFeature01Help = ""
  158.       //    @qFeature16Help = "Required Components (will not be deselectable)" 
  159.  
  160.       // Path Names
  161.       @qProduct1 = "Install Path"
  162.       //   @qProduct8 = "Team ENVY Server"
  163.  
  164.    @ElseIf  (@iProductClass == @iEntry)
  165.       @qInstallType1 = "Typical"
  166.    
  167.       @qInstallTypeHelp1 = "The program will be installed with the most common options."
  168.  
  169.       //   @qFeature16 = "REQUIRED BASE, including IDE (hidden)" 
  170.  
  171.       @qFeature16Help = "Required Components (will not be deselectable)" 
  172.  
  173.       // Path Names
  174.       @qProduct1 = "Install Path"
  175.    @EndIf
  176.  
  177.  
  178.    //copyright info
  179. //   @qCopyrightText1 = "VisualAge for JAVA(TM) Version 1.0"
  180. //   @qCopyrightText2 = "(c) Copyright IBM Corp. 1991, 1997"
  181. //   @qCopyrightText3 = "Licensed Material - Property of IBM - //All Rights Reserved."
  182. //   @qCopyrightText4 = "(R) IBM is a registered trademark of //International Business Machines Corporation."
  183. //   @qCopyrightText5 = "* Windows is a registered trademark //of Microsoft Corporation."
  184. //   @qCopyrightText6 = "(TM) VisualAge is a trademark of //International Business Machines Corporation."
  185. //   @qCopyrightText7 = "**Java and all Java-based trademarks //and logos are trademarks or registered trademarks of Sun //Microsystems, Inc. in the U.S. and other countries."
  186. //   @qCopyrightText8 = "Includes materials (c) Copyright Sun //Microsystems, Inc. 1994, 1997 - All rights reserved."
  187.  
  188.    @qCopyrightText1 = ""
  189.    @qCopyrightText2 = ""
  190.    @qCopyrightText3 = ""
  191.    @qCopyrightText4 = ""
  192.    @qCopyrightText5 = ""
  193.    @qCopyrightText6 = ""
  194.    @qCopyrightText7 = ""
  195.    @qCopyrightText8 = ""
  196.  
  197.    //alternate(welcome) copyright info
  198. //   @qWelcomeCopyright1 = "IBM(R) @qProductName(TM) Programming Environment"
  199. //   @qWelcomeCopyright2 = "IBM @qProductName, (c) Copyright IBM Corp. 1991-1996 - All Rights Reserved"
  200.    @qWelcomeCopyright1 = ""
  201.    @qWelcomeCopyright2 = ""
  202.  
  203.    // Overwrite the entries in varstrng.dat
  204.    @qGetInstDirHeader = "Please enter the full path of the install directory for the product."
  205.    @qAskRebootTitle = "Install Complete"
  206.    @qRebuildIfNewerRBText = "Reinstall the product"
  207.    @qRebuildDialogHelp2 = "Replace missing files with the original installation files."
  208.    @qRebuildRBText = "Reinstall the product"
  209.    @qInstallActionHelp4 = "Replace missing files with the original installation files, or recreate the product desktop folder and environment."
  210.    @qUninstallRBText = "Uninstall the product"
  211.    @qRebuildDialogTitle = "@qProductName - Reinstall"
  212.    @qRebuildAllRBText = ""
  213.  
  214.    //Install.txt question
  215.    @qAskReadInstallTxtTitle = "Have you read install.txt?"
  216.    @qAskReadInstallTxtQu = "Have you read the install.txt information, and is your TCP/IP configured and operational as per its information?"
  217.  
  218.    @Return()
  219. @EndFunc
  220. /////////////////////////////////////////////////////////////
  221. // IBM(R) VisualAge(TM) for Java, Version 1
  222. //  - Licensed Material - Program-Property of IBM
  223. // (C) Copyright IBM Corp. 1997 - All Rights Reserved.
  224. /////////////////////////////////////////////////////////////
  225. //
  226. //
  227. //
  228. //File: InitPro2 /////////////////////////////////////
  229. //
  230. //CIDVars: N/A
  231. //
  232. //Globals changed: All
  233. //
  234.  
  235. @DefineProto
  236.    @Void @InitProd(@Void)
  237.    @Void @InstallExitPre(@Void)
  238.    @Void @InstallExitPost(@Void)
  239.    @Void @UninstallExitPre(@Void)
  240.    @Void @UninstallExitPost(@Void)
  241.    @Void @CopyFilesExitPre(@Void)
  242.    @Void @CopyFilesExitPost(@Void)
  243.    @Void @AskShowReadmeART(@Void)
  244.    @Void @WelcomeUpgradeMode(@In @Integer @SystemLevel,
  245.                   @In @Integer @InstallLevel)
  246. @EndProto
  247.  
  248. //----------------------------------------------------
  249. @DefineFunc @Void @InitProd(@Void)  // POST INITIALIZATION
  250.  
  251.    //If uninstall.cmd is run, there won't be any red files in the directory,
  252.    //so the ProductClass is meaningless
  253.    @If (!@UninstallMode) 
  254.       @If (!@Exists(@GroupQRedFile))
  255.          @iProductClass = @iEntry
  256.       @ElseIf (!@Exists(@GroupERedFile))
  257.          @iProductClass = @iProfessional
  258.       @Else
  259.          @iProductClass = @iEnterprise
  260.       @EndIf
  261.    @EndIf
  262.  
  263.    @iJavaInstall = @True
  264.  
  265.    //Set the strings
  266.    @InitProdStrings()
  267.  
  268.    //Set the bitmaps
  269.    @If (@Platform == @OS2)   //These bitmaps aren't in the windows exe
  270.       @qDialogBmp10 = "IVJ10"
  271.       @iDialogBmpID10 = 212
  272.       @qDialogBmp8 = "IVJ8"
  273.       @iDialogBmpID8 = 232
  274.    @EndIf
  275.  
  276.    @iHPFSonly = @True
  277.  
  278.    @InitProdStrings()
  279.  
  280.    //Set the prereqs
  281.    @iPrereqOS = @OS2
  282.    @iPrereqNTVer = @WinNTv40
  283.    @iMinPrereqNTVer = @WinNTv35
  284.    @iPrereqWin95Ver = @Win95
  285.    @iPrereqOS2Ver = @OS2v4
  286.    @iMinPrereqOS2Ver = @OS2v3
  287.    @iPrereqCPU = 486
  288.    @iMinPrereqCPU = 486
  289.    @iPrereqRAM = 48
  290.    @iMinPrereqRAM = 31
  291.    @iPrereqResWidth = 800
  292.    @iMinPrereqResWidth = 640
  293.    @iPrereqResHeight = 600
  294.    @iPrereqColours = 256
  295.    @iMinPrereqColours = 16
  296.  
  297.    @If (@iProductClass != @iEnterprise)
  298.       @iPrereqRAM = 31
  299.       @iMinPrereqRAM = 31
  300.    @EndIf
  301.  
  302.    //Library file Names
  303.    @If(@Platform==@OS2)
  304.          @DataRED = "tim.os2"
  305.    @Else
  306.          @DataRED = "tim.win"
  307.    @Endif
  308.  
  309. // This is the name of the environment variable to set in SetEnv.Bat or
  310. // SetEnv.Cmd
  311.    @qMainProdVar = "IVJ10MAIN"
  312.  
  313.  
  314.    // Turn off @IfNewer for the general case
  315.    @IfNewerMode = @False
  316.  
  317.    // To hide the envvar choice dialog
  318.    @iDisplayEnvvarChoice = @False
  319.    
  320.    // Don't show license display
  321.    @iBypassLicense = @True
  322.    @If (@iJavaInstall)
  323.       @iBypassReadme = @True
  324.    @EndIf
  325.  
  326.    // JAVA has only 1 install path.  IF this changes, remove this setting!
  327.    @iSingleDriveEntry = @True
  328.  
  329.    @qProductINIPointerApp = "IVJ10"     //the name of the app in os2.ini
  330.    @qProductINIPointerKey = "IVJ_INI" //the name of the key in os2.ini
  331.    @qProductINIBase       = "IVJ10"   //the base name of ini file
  332.  
  333.    //Change the name of "install.sys"
  334.    @lInstallSys = "ivj10.ins"
  335.  
  336.    //Error file
  337.    @qErrFile = "ivjinst.err"
  338.  
  339.    //BITMAPFILES
  340.    @qCopyFileBMPFile = ""
  341.    @qSetDeskBMPFile = ""
  342.    @qSetEnvBMPFile = ""
  343.    @qSetODBCBMPFile = ""
  344.    @qSetPVarBMPFile = ""
  345.  
  346.    @qBackGroundBMPFile = "vaBack1._b_"
  347.    @qProdLogoBMPFile = "vaLogo._b_"
  348.    @qBackgroundBMPFile2 = ""
  349.    @qBBoardBMPFile8 = "Bbrd15._b_"
  350.    @qBBoardBMPFile9 = "Bbrd15._b_"
  351.    @qBBoardBMPFile10 = "Bbrd15._b_"
  352.    @qBBoardBMPFile11 = "Bbrd15._b_"
  353.    @qBBoardBMPFile12 = "Bbrd15._b_"
  354.    @qBBoardBMPFile13 = "Bbrd15._b_"
  355.    @qBBoardBMPFile14 = "Bbrd15._b_"
  356.    @qBBoardBMPFile15 = "Bbrd15._b_"
  357.    @qBBoardBMPFile16 = "Bbrd15._b_"
  358.  
  359.    @If (@iProductClass == @iEnterPrise)
  360.       @qBackGroundBMPFile2 = "vaBack2._b_"
  361.       @qWaitMsgBMPFile1 = "msgENV._b_"
  362.       @qWaitMsgBMPFile2 = "vaMsgHtm._b_"
  363.       @qWaitMsgBMPFile3 = "vaMsgIde._b_"
  364.       @qWaitMsgBMPFile4 = "vaByeEnv._b_"
  365.       @qWaitMsgBMPFile5 = "vaByeFil._b_"
  366.       @qBBoardBMPFile1 = "Bbrd1ep._b_"
  367.       @qBBoardBMPFile2 = "Bbrd8ep._b_"
  368.       @qBBoardBMPFile3 = "Bbrd9ep._b_"
  369.       @qBBoardBMPFile4 = "Bbrd10ep._b_"
  370.       @qBBoardBMPFile5 = "Bbrd11ep._b_"
  371.       @qBBoardBMPFile6 = "Bbrd13ep._b_"
  372.       @qBBoardBMPFile7 = "Bbrd14ep._b_"
  373.    @ElseIf (@iProductClass == @iProfessional)
  374.       @qBackGroundBMPFile2 = "vaBack2._b_"
  375.       @qWaitMsgBMPFile1 = "msgENV._b_"
  376.       @qWaitMsgBMPFile2 = "vaMsgHtm._b_"
  377.       @qWaitMsgBMPFile3 = ""
  378.       @qWaitMsgBMPFile4 = "vaByeEnv._b_"
  379.       @qWaitMsgBMPFile5 = "vaByeFil._b_"
  380.       @qBBoardBMPFile1 = "Bbrd1p._b_"
  381.       @qBBoardBMPFile2 = "Bbrd5p._b_"
  382.       @qBBoardBMPFile3 = "Bbrd6p._b_"
  383.       @qBBoardBMPFile4 = "Bbrd7p._b_"
  384.       @qBBoardBMPFile5 = "Bbrd8p._b_"
  385.       @qBBoardBMPFile6 = "Bbrd9p._b_"
  386.       @qBBoardBMPFile7 = ""   
  387.    @ElseIf (@iProductClass == @iEntry)
  388.       @qBackGroundBMPFile2 = "vaBack2._b_"
  389.       @qWaitMsgBMPFile1 = "msgENV._b_"
  390.       @qWaitMsgBMPFile2 = ""
  391.       @qWaitMsgBMPFile3 = ""
  392.       @qWaitMsgBMPFile4 = "vaByeEnv._b_"
  393.       @qWaitMsgBMPFile5 = "vaByeFil._b_"
  394.       @qBBoardBMPFile1 = "Bbrd2p._b_"
  395.       @qBBoardBMPFile2 = "Bbrd8p._b_"
  396.       @qBBoardBMPFile3 = "Bbrd9p._b_"
  397.       @qBBoardBMPFile4 = ""
  398.       @qBBoardBMPFile5 = ""
  399.       @qBBoardBMPFile6 = ""
  400.       @qBBoardBMPFile7 = ""   
  401.    @EndIf
  402.  
  403.  
  404.  
  405.    //Install Type information
  406.    @iInstallType = 1
  407.  
  408.    // @iInstallTypeCustom needs to match the custom type
  409.    @If (@iProductClass == @iEntry)
  410.       @iInstallTypeCustom = 0
  411.    @ElseIf (@iProductClass == @iProfessional)
  412.       @iInstallTypeCustom = 3
  413.    @Else
  414.       @iInstallTypeCustom = 3
  415.    @EndIf
  416.  
  417.    @qCustomFeatures = "@qInstallType1Features"
  418.  
  419.    @If (@iProductClass != @iEntry)
  420.       // NETQ is an external install
  421.       @iGroupQExternalInstall = @True
  422.    //   @qGroupQExternalInstall = "@qTempPath\\NETQ"
  423.       @qGroupQExternalInstall = "@qInstallPath1\\eab\\ntq\\install"
  424.    @EndIf
  425.  
  426.   // InstallType Custom Features definitions
  427.    @If (@iProductClass == @iEnterPrise)
  428.       @qInstallType1Features = "01 02 16"
  429.       @qInstallType2Features = "16"
  430.       @qInstallType3Features = "01 02 16"
  431.    @ElseIf (@iProductClass == @iProfessional)
  432.       @qInstallType1Features = "01 16"
  433.       @qInstallType2Features = "16"
  434.       @qInstallType3Features = "01 16"
  435.    @ElseIf (@iProductClass == @iEntry)
  436.       @qInstallType1Features = "16"
  437.       @qInstallType2Features = ""
  438.       @qInstallType3Features = ""
  439.    @EndIf
  440.  
  441.    @qInstallType4Features = ""
  442.    @qInstallType5Features = ""
  443.    @qInstallType6Features = ""
  444.  
  445.    // Custom Feature Group definitions
  446.    @qFeature01GroupString = ""
  447.    @qFeature02GroupString = ""
  448.    @qFeature03GroupString = ""
  449.    @qFeature04GroupString = ""
  450.    @qFeature05GroupString = ""
  451.    @qFeature06GroupString = ""
  452.    @qFeature07GroupString = ""
  453.    @qFeature08GroupString = ""
  454.    @qFeature09GroupString = ""
  455.    @qFeature10GroupString = ""
  456.    @qFeature11GroupString = ""    
  457.    @qFeature12GroupString = ""
  458.    @qFeature13GroupString = ""
  459.    @qFeature14GroupString = ""    
  460.    @qFeature15GroupString = ""
  461.    @qFeature16GroupString = ""
  462.  
  463.    @If (@iProductClass == @iEnterPrise)
  464.       @qFeature01GroupString = "A B E X"
  465.       @qFeature02GroupString = "G J Q"
  466.       @qFeature16GroupString = "A C G I Q"
  467.       //Z IS A TEMPORARY GROUP UNTIL R32 IS FIXED!!!!!
  468. //      @qFeature01GroupString = "A B E X Z"
  469.    @ElseIf (@iProductClass == @iProfessional)
  470.       @qFeature01GroupString = "G J Q"
  471.       @qFeature16GroupString = "A C G I Q"
  472.    @ElseIf (@iProductClass == @iEntry)
  473.       @qFeature16GroupString = "A I"
  474.    @EndIf
  475.  
  476.    // Option to Groups definitions
  477.    @qOption1Groups = ""
  478.    @qOption2Groups = ""
  479.    @qOption3Groups = ""
  480.    @qOption4Groups = ""
  481.    @qOption5Groups = ""
  482.    @qOption6Groups = ""
  483.    @qOption7Groups = ""
  484.    @qOption8Groups = ""
  485.    @qOption9Groups = ""
  486.    @qOption10Groups = ""
  487.  
  488.    @If (@iProductClass == @iEnterprise)
  489.       @qOption1Groups = "A B C E G I J X"
  490.       @qOption2Groups = ""
  491.       // R32
  492.       //@qOption1Groups = "A B C E G I J Z"
  493.       //@qOption2Groups = "X"
  494.    @ElseIf (@iProductClass == @iProfessional)
  495.       @qOption1Groups = "A C G I J"        
  496.    @ElseIf (@iProductClass == @iEntry)
  497.       @qOption1Groups = "A I"
  498.    @EndIf
  499.  
  500.  
  501.    @If (@iProductClass == @iEnterPrise)
  502.    // Fill in this information until @LibInfo works better
  503.    //last done 970604 at 1912
  504.       @iGroupSizeA = @Eval(1435278 + 965154)  //include the uninstall
  505.       @iGroupSizeB = 6433469
  506.       @iGroupSizeC = @Eval(5089070 + 30000000) //add 10MB for NETQ,20 for ide
  507.       @iGroupSizeE = 5747266
  508.       @iGroupSizeI = 57209483
  509.       @iGroupSizeJ = 13634371 
  510. //Q group is NetQ's install
  511. //      @iGroupSizeQ = 6625612
  512.       @iGroupSizeX = 6978210
  513.       @iTotalSize = 127492301
  514.  
  515.       @iGroupFilesA = 15
  516.       @iGroupFilesB = 23
  517.       @iGroupFilesC = @Eval(389 + 25)    //add for NETQ
  518.       @iGroupFilesE = 83
  519.       @iGroupFilesI = 759
  520.       @iGroupFilesJ = 1931
  521. //      @iGroupFilesQ = 15
  522.       @iGroupFilesX = 18
  523.       @iTotalFiles = 3233
  524.  
  525.    @ElseIf (@iProductClass == @iProfessional)
  526.    // Fill in this information until @LibInfo works better
  527.    //last done 970604 at 1912
  528.       @iGroupSizeA = @Eval(1435278 + 965158)  //include the uninstall
  529.       @iGroupSizeB = 0
  530.       @iGroupSizeC = @Eval(1510710 + 30000000) //add 10MB for NETQ
  531.       @iGroupSizeE = 0 
  532.       @iGroupSizeI = 56979163
  533.       @iGroupSizeJ = 11118956 
  534. //Q group is NetQ's install
  535. //      @iGroupSizeQ = 6625612
  536.       @iGroupSizeX = 0
  537.       @iTotalSize = 102009265
  538.  
  539.       @iGroupFilesA = 15
  540.       @iGroupFilesB = 23
  541.       @iGroupFilesC = 389 
  542.       @iGroupFilesE = 83
  543.       @iGroupFilesI = 759
  544.       @iGroupFilesJ = 1931
  545. //      @iGroupFilesQ = 15
  546.       @iGroupFilesX = 18
  547.       @iTotalFiles = 3233
  548.  
  549.    @ElseIf (@iProductClass == @iEntry)
  550.       @iGroupSizeA = @Eval(1435278 + 808)  //include the uninstall
  551.       @iGroupSizeI = 52087880
  552.       @iTotalSize = 53523966
  553.  
  554.       @iGroupFilesA = 15
  555.       @iGroupFilesI = 759
  556.       @iTotalFiles = 3233
  557.    @EndIf
  558.  
  559.    @Return()
  560. @EndFunc
  561.  
  562. //------------------------------------------------------
  563.  
  564. @DefineFunc @Void @InstallExitPre(@Void)
  565.  
  566.    @If (@iProductInstalled && !@UninstallMode)
  567.       @If (@Platform == @Windows)
  568.  
  569.       @Else
  570.          @qTMP5 = @GetOS2ProductINIString(@qInstallKey,"Product Type")
  571.          @If (!@StrCmp(@qTMP5,"Entry"))
  572.             @iTMP5 = @iEntry
  573.          @ElseIf (!@StrCmp(@qTMP5,"Professional"))
  574.             @iTMP5 = @iProfessional
  575.          @ElseIf (!@StrCmp(@qTMP5,"Enterprise"))
  576.             @iTMP5 = @iEnterprise
  577.          @Else
  578.             @MsgBox("Install has detected an installation of VisualAge for Java, but was unable to determine the product type (Entry, Professional, or Enterprise)") 
  579.             @ErrorExit("Exiting.@qcrlf",@iAbort)
  580.          @EndIf
  581.       @EndIf 
  582.     
  583.       @If (@iTMP5 > @iProductClass) 
  584.          @If (@iProductClass == @iEntry)
  585.             @qTMP6 = "Entry"
  586.          @ElseIf (@iProductClass == @iProfessional)
  587.             @qTMP6 = "Professional"
  588.          @Else
  589.             @qTMP6 = "Enterprise"
  590.          @EndIf
  591.          @MsgBox("Install has detected that VisualAge for Java @qTMP5 Edition has been installed on your system.  You are attempting to install VisualAge for Java @qTMP6 Edition.  You must uninstall the current installation before you can proceed.")
  592.          //@ErrorExit("Exiting.@qcrlf",@iAbort)
  593.          @Abort()
  594.       @ElseIf (@iTMP5 < @iProductClass)
  595.          @WelcomeUpgradeMode(@iTMP5, @iProductClass)
  596.          @DetermineInstallSysFilename()
  597.          @SetInstallPathsFromFile(@qInstallSysFilename)
  598.       @EndIf
  599.    @EndIf
  600.  
  601.    @Return()
  602. @EndFunc
  603.  
  604. //------------------------------------------------------
  605.  
  606. @DefineFunc @Void @UnInstallExitPre(@Void)
  607.  
  608.    @If (@Exists("@qInstallPath1\\eab\\ntq\\install\\ivj10tnq.cmd"))
  609.       @Copy("@qInstallPath1\\eab\\ntq\\install\\ivj10tnq.cmd","@qTempPath\\ivj10tnq.cmd")
  610.    @EndIf
  611.  
  612.    @Return()
  613. @EndFunc
  614.  
  615. // Assumptions:
  616. // 1) Netq is group Q
  617. // 2) The Netq install was installed to @qGroupQExternalInstall
  618. // 3) Netqics.rsp is a template response file for netq's install that was 
  619. //    copied with the netq group
  620.  
  621. //------------------------------------------
  622.  
  623. @DefineFunc @Void @InstallExitPost(@Void)
  624.  
  625.    //Write out productclass
  626.    @If (@iProductClass == @iEntry)
  627.       @SetRegProdValue("Product Type","Entry")
  628.    @ElseIf (@iProductClass == @iProfessional)
  629.       @SetRegProdValue("Product Type","Professional")
  630.    @Else
  631.       @SetRegProdValue("Product Type","Enterprise")
  632.    @EndIf
  633.  
  634.    //   " ..." always causes script error
  635.    //   @If (@RebuildIfnewerMode)
  636.    //      
  637.    //   @EndIf
  638.    //   @If (@iProductClass == @iEntry)
  639.    //      @Return()
  640.    //   @EndIf
  641.  
  642.    @If (@AddMode)
  643.       @qOldGroupsSet = @CustomFeaturestoGroups(@qOldFeatures)
  644.    @EndIf
  645.  
  646.    @If (@RebuildDesktopMode||@RebuildIfNewerMode)
  647. //      @Goto laSetHelpEnvVars          
  648.    @Elseif (@StrFind(@qGroupsSet,"Q") >= 0)   //NetQ/help to be installed 
  649.         @LoadBMPProdLogo(@qProdlogoBMPFile)
  650.         @LoadBMPMsg(@qWaitMsgBMPFile2)
  651.  
  652.  
  653. //      @MsgBox("About to install HTML Search Engine.  This may take a few minutes.")
  654.       //NetQ not previously installed 
  655.       @If (!(@AddMode && (@StrFind(@qOldGroupsSet,"Q") >= 0)))  
  656.          @If (@Exists("@qGroupQExternalInstall\\netqics.rsp"))  //sanity check
  657.             //create NetQ response file
  658.             @iTMP1 = @ReadLine("@qGroupQExternalInstall\\netqics.rsp",@qTMP1,2048,0)  //read first line of NetQ/ICS response file
  659.             //          @Display "Read in: @qTMP1" @Pause @EndDisplay
  660.             @Write("@qGroupQExternalInstall\\netqrsp.tmp","wt","@qTMP1\n")  //write first line out to temp file
  661.  
  662. laConfigureRsp:
  663.             //read next line in NetQ/ICS response file
  664.             @iTMP1 = @ReadLine("@qGroupQExternalInstall\\netqics.rsp",@qTMP1,2048)  
  665.             //          @Display "Read in: @qTMP1" @Pause @EndDisplay
  666.             @if (@iTMP1 == -1)  //end of file
  667.                @Goto laFinishConfigRsp
  668.             @Else
  669.                @if (@StrFind("@qTMP1","Path1") >= 0)
  670.                   @qTMP1 = @StrHead(@qInstallPath1,1)
  671.                   //Pick a directory for netq
  672.                   @If (@Exists("@qTMP1:\\NETQOS2)"))
  673.                       //@display @qtmp1 :\netq exists @pause @enddisplay
  674.                      //Check if it's a directory - if so install there, if not, delete the file
  675.                      //Directory is the 2^4 bit  
  676.                      @If (!(@FileAttr("@qTMP1:\\NETQOS2") & 0x10))
  677.                         @Delete("@qTMP1:\\NETQOS2")
  678.                      @EndIf
  679.                   @EndIf
  680.                   @Write(,,"Path1=@qTMP1:\\NETQOS2\n")
  681.                   @qNetQTMP="@qTMP1:\\NETQOS2"
  682.                @Else
  683.                   @Write(,,"@qTMP1\n")  //write out what was read in
  684.                @Endif
  685.             @Endif
  686.  
  687.             @Goto laConfigureRsp
  688.             //Netq response file configured
  689.  
  690. laFinishConfigRsp:
  691.             @Delete("@qGroupQExternalInstall\\netqics.rsp")
  692.             @Rename("@qGroupQExternalInstall\\netqrsp.tmp","netqics.rsp")
  693.  
  694.  
  695.             //             ...  
  696.  
  697.             //install NetQ, which is in @qGroupQExternalInstall
  698.             //          @Display "Installing NetQ" @Pause @EndDisplay
  699.             //drive where Temp is
  700.             @qTMP1 = @StrHead(@qGroupQExternalInstall,1) 
  701.             //get rest of path (without drive letter)
  702.             @qTMP2 = @StrDel(@qGroupQExternalInstall,0,2)
  703.  
  704.             @Delete("@qTempPath\\netq.err")
  705.             @if (@RebuildMode)
  706.                @iRetVal = @OS2Exec("@qGroupQExternalInstall\\install.exe","-f @qGroupQExternalInstall\\install.dat @@@!@qGroupQExternalInstall\\netqics.rsp -REBUILD", "@qGroupQExternalInstall",1,3,"","",0,0,0,0,-1,0)
  707.  
  708.             @Elseif (@UpdateMode)
  709.                @iRetVal = @OS2Exec("@qGroupQExternalInstall\\install.exe","-f @qGroupQExternalInstall\\install.dat @@@!@qGroupQExternalInstall\\netqics.rsp -UPDATE", "@qGroupQExternalInstall",1,3,"","",0,0,0,0,-1,0)
  710.  
  711.             @Else
  712.                @iRetVal = @OS2Exec("@qGroupQExternalInstall\\install.exe","-f @qGroupQExternalInstall\\install.dat @@@!@qGroupQExternalInstall\\netqics.rsp", "@qGroupQExternalInstall",1,3,"","",0,0,0,0,-1,0)
  713.  
  714.             @Endif
  715.             @If (@Exists("@qTempPath\\netq.err"))
  716.                @MsgBox("An error occured while installing the NetQuestion Search Server.  When the install is complete, please consult the release notes for more details.")
  717.             @EndIf
  718.  
  719.          @EndIf   //exists template file
  720.       @EndIf      //not addmode and already installed
  721.  
  722.       @qNetQTMP = @GetExtInstallDirectory("NetQuestion","1.1","NETQ","NETQ11")
  723.       @qTMP5=@GetEnv("COMSPEC")
  724.       @If (!@IsNull(@qNetQTMP))
  725.          //@Delete("@qInstallPath1\\eab\\ntq\\install\\netq_err.log")
  726.          //@OS2Exec("@qTMP5", "/c @qGroupQExternalInstall\\ivj10inq.cmd @qNetQTMP @qInstallPath1", "@qGroupQExternalInstall",0,0,"","",0,0,0,0,-1,0)
  727.          //@If (@Exists("@qInstallPath1\\eab\\ntq\\install\\netq_err.log"))
  728.          //   @MsgBox("An error occured while configuring the NetQuestion Search Server.  When the install is complete, please consult the release notes for more details.")
  729.          //@Endif
  730.       @EndIf
  731.  
  732.    @Endif    
  733.       
  734. laSetHelpEnvVars:
  735.    @if (@StrFind(@qGroupsSet,"Q") >= 0)   //NetQ/help installed
  736.       @CreateNextProdVarsItem("VAJHELP","file:///@qInstallPath1\\ide\\doc",@lString,"HLP",@qMethod)
  737.       @CreateNextProdVarsItem("HTML_DOC_ROOT","@qInstallPath1\\eab\\doc",@lString,"HLP","")
  738.       @CreateNextProdVarsItem("NETQ_DAEMON","1",@lString,"HLP",@qMethod)
  739.       @CreateNextProdVarsItem("ICS_DAEMON","1",@lString,"HLP",@qMethod)
  740.    @Else   //Netq help not installed      
  741.       @CreateNextProdVarsItem("VAJHELP","0",@lString,"HLP",@qMethod)
  742.       @CreateNextProdVarsItem("NETQ_DAEMON","0",@lString,"HLP",@qMethod)
  743.       @CreateNextProdVarsItem("ICS_DAEMON","0",@lString,"HLP",@qMethod)
  744.    @Endif
  745.    @CreateNextProdVarsItem("HELP","@qInstallPath1\\eab\\help",@lString,"HLP",@qMethod)
  746.    @CreateNextProdVarsItem("HTML_HOSTNAME","localhost:49213",@lString,"HLP",@qMethod)
  747.    @CreateNextProdVarsItem("ZIPPED_WEB","0",@lString,"HLP",@qMethod)
  748.  
  749.  
  750.  
  751. laLaunchIDE:
  752.    //Only launch IDE if EAB has been installed, but not if previously installed
  753.    @If ((@StrFind(@qGroupsSet,"E") >= 0) && 
  754.         (!(@AddMode && (@StrFind(@qOldGroupsSet,"E") >= 0))))
  755. //      @MsgBox("Launching Integrated Development Environment for initialization.  This may take a few minutes.")
  756.    //      @SetEnv("BEGINLIBPATH","@qInstallPath1\\ide\\program")
  757.       
  758.       @LoadBMPBillBoard()
  759.       @LoadBMPMSG(@qWaitmsgBMPFile3)
  760.  
  761.       @OS2Exec("@qInstallPath1\\ide\\program\\ide.exe","-nosplash","@qInstallPath1\\ide\\program",1,3,"","",0,0,0,0,-1,0)
  762.    @EndIf
  763.  
  764.    @EraseBMP(3)
  765.    @LoadBMPBackground(@qBackgroundBMPFile)
  766.    @LoadBMPProdLogo(@qProdLogoBMPFile)
  767.  
  768.    @If (!@RebuildIfnewerMode)
  769.       //Readme and ART
  770.       @AskShowReadmeART()
  771.    @EndIf
  772.    @Return()
  773. @EndFunc
  774.  
  775.  
  776. //----------------------------------------
  777. @DefineFunc @Void @UnInstallExitPost(@Void)
  778.  
  779.    //   @If (@iProductClass == @iEntry)
  780.    //      @Return()
  781.    //   @EndIf
  782.    //first thing to do is to unregister Java from NetQ   
  783.    @qTMP1 = @GetExtInstallDirectory("NetQuestion","1.1","NETQ","NETQ11")     
  784.    @ShowAll("@@UninstalExitPost","Netq path:@qTMP1")
  785.    @if (@StrCmp(@qTMP1,"") != 0)
  786.       @qTMP2 = @StrHead(@qTMP1,1)   //drive where NetQ is
  787.       @qTMP3 = @StrDel(@qTMP1,0,2)  //get rest of path (without drive letter and :) 
  788.       @ShowAll("@@UninstalExitPost","@qTempPath\\IBMVJAVA\\termnetq.cmd")
  789.       //THIS PLACES TOO MUCH KNOWLEDGE INSIDE THIS SCRIPT-@qTEMPPATH\\IBMVJAVA should be hidden
  790.        //      @System("call @qTempPath\\IBMVJAVA\\termnetq.cmd @qTMP1",2,-1)
  791.       @qTMP5=@GetEnv("COMSPEC")
  792.       //      @iRetVal = @OS2Exec("@qTMP5", "/c @qTempPath\\IBMVJAVA\\termnetq.cmd @qTMP1", "@qTempPath\\IBMVJAVA",0,0,"","",0,0,0,0,-1,0)
  793.       @OS2Exec("@qTMP5", "/c @qTempPath\\ivj10tnq.cmd @qTMP1", "@qTempPath",0,0,"","",0,0,0,0,-1,0)
  794.  
  795.       @Write("@qTempPath\\IBMVJAVA\\ivjunin.log","wt","termnetq returned\n")  
  796.       //    call NetQ's uninstall
  797.       //      @System("call @qTMP1\\install\\uninstal.cmd @qTMP2 @qTMP3\\install",2,-1)
  798.       @iRetVal = @OS2Exec("@qTMP5", "/c @qTMP1\\install\\uninstal.cmd @qTMP2 @qTMP3\\install", "@qTMP1\\install",0,0,"","",0,0,0,0,-1,0)
  799.       @Write("@qTempPath\\IBMVJAVA\\ivjunin.log","wt","uninstal returned\n")  
  800.    @Endif 
  801.    @Return()
  802. @EndFunc
  803.  
  804. //----------------------------------------
  805. @DefineFunc @Void @CopyFilesExitPre(@Void)
  806.  
  807.    @If (@iProductClass == @iEntry)
  808.       @NumberOfDisks = ((@NumberOfDisks) + (1))
  809.    @EndIf
  810.  
  811.    @If (@iProductClass!=@iEntry)
  812.  
  813.       @If (@StrFind("@qGroupsSet","J") >= 0)
  814.          @iTMP3 = @StrFind("@qGroupsSet","C")
  815.          @If (@iTMP3 >= 0)   //sanity check, should always be >= 0
  816.             @qGroupsSet = "@StrDel(@qGroupsSet,@iTMP3,1)"
  817.          @EndIf
  818.       @EndIf
  819.  
  820.       //Need to set Groupq here, because otherwise it will be set 
  821.       // to c:\visage\...
  822.       @qGroupQExternalInstall = "@qInstallPath1\\eab\\ntq\\install"
  823.    
  824.       //WORKAROUND FOR R32 CRASH
  825.       //@qInstallpath2 = "@qInstallpath1\\ide\\_update"   
  826.  
  827.    @EndIf
  828.    // @EraseBMP(2)
  829.    // @EraseBMP(1)
  830.    @LoadBMPBillboard()
  831.    @LoadBMPBackground(@qBackgroundBMPFile2)
  832.   
  833.    @Return()
  834. @EndFunc
  835.  
  836. //----------------------------------------
  837. @DefineFunc @Void @CopyFilesExitPost(@Void)
  838.  
  839.    //WORKAROUND FOR R32 CRASH
  840.    //@MkDir("@qInstallPath1\\ide\\_update")
  841.    //@System("XCopy /e/s @qInstallpath1\\$\\* @qInstallPath1\\ide\\_update\*")
  842.    //@DeleteTree(@qInstallPath2, 99999, "--DANGER--")
  843.    //@RmDir(@qInstallPath2)
  844.  
  845.    @ShowAll("@@CopyFilesExitPost","Workaround successful?")
  846.  
  847.    //Quote for spaces
  848.    //   @qInstallPath1NoQuotes=@qInstallPath1
  849.    //   @If (@StrFind(@qInstallPath1," ") >= 0)
  850.    //      // *-Workaround for string assignment problems
  851.    //      @qInstallPath1="\"@qInstallPath1\"*"
  852.    //      @iTMP1=@StrRFind(@qInstallPath1,"*")
  853.    //      @qInstallPath1=@StrDel(@qInstallPath1,@iTMP1,1)
  854.    //   @EndIf
  855.  
  856.    @Return()
  857. @EndFunc
  858.  
  859. //------------------------------------------
  860.  
  861. @DefineFunc @Void @AskShowReadmeART(@Void)
  862.  
  863.    @If (!@CIDBypass("N"))
  864.       //ART will only show up if this is the first time
  865.       @iTMP1 = @Exists("@qInstallPath1\\@qReadmeFile") 
  866.       @iTMP2 = (@Exists("@qInstallPath1\\ART\\artexe.exe") && (!@RebuildMode && !@RebuildDesktopMode && !@AddMode))
  867.       @iTMP3 = @Exists("@qInstallPath1\\@qReadmeFile")
  868.       @iTMP4 = (@Exists("@qInstallPath1\\ART\\artexe.exe") && (!@RebuildMode && !@RebuildDesktopMode && !@AddMode))
  869.       @If (@iTMP1 || @iTMP2)
  870.          @Dialog2CB("Install Complete", @qInstallTypeBitmap,
  871.             @iInstallTypeBitmapID, 
  872.             "You can now view the Readme file and register online.",
  873.             "", 
  874.             "I want to view the Readme file",
  875.             "I want to register online", 
  876.             @iTMP1,@iTMP2,
  877.             @iTMP3,@iTMP4,
  878.             "",@qNext,"", "","")
  879.       @EndIf
  880.  
  881.       @If (@iTMP1 && @Exists("@qInstallPath1\\@qReadmeFile"))
  882.          @OS2Exec("e.exe","@qInstallPath1\\@qReadmeFile","",1,3,"","",0,0,0,0,-1,0)
  883.       @EndIf
  884.       @iBypassReadme = @True
  885.  
  886.       @If (@iTMP2 && @Exists("@qInstallPath1\\ART\\artexe.exe"))
  887.          @OS2Exec("@qInstallPath1\\art\\artexe.exe", "-d\"@qInstallPath1\\art",
  888.           "@qInstallPath1\\art", 1,3,"","",0,0,0,0,-1,0)
  889.       @EndIf
  890.    @EndIf
  891.  
  892.    @Return()
  893. @EndFunc
  894.  
  895. //-------------------------------------------
  896.  
  897. @DefineFunc @Void @WelcomeUpgradeMode(@In @Integer @SystemLevel,
  898.                   @In @Integer @InstallLevel)
  899.  
  900.    @If (!@CIDBypass(@qForceWelcome))
  901.  
  902.       @If ((@SystemLevel == @iEntry) && (@InstallLevel == @iProfessional))
  903.          @qWelcomeUpgradeText1 = "@qWelcomeUpgrade1EntryToPro"
  904.          @qWelcomeUpgradeText3 = "@qWelcomeUpgrade3EntryToPro"
  905.       @ElseIf ((@SystemLevel == @iEntry) && (@InstallLevel == @iEnterprise))
  906.          @qWelcomeUpgradeText1 = "@qWelcomeUpgrade1EntryToEnterp"
  907.          @qWelcomeUpgradeText3 = "@qWelcomeUpgrade3EntryToEnterp"
  908.       @ElseIf ((@SystemLevel == @iProfessional) && (@InstallLevel == @iEnterprise))
  909.          @qWelcomeUpgradeText1 = "@qWelcomeUpgrade1ProToEnterp"
  910.          @qWelcomeUpgradeText3 = "@qWelcomeUpgrade3ProToEnterp"
  911.       @Else
  912.          //Error
  913.          @Return()
  914.       @EndIf
  915.          
  916.  
  917. laWelcomeUpgrade:
  918.       @iDialogRes = @DialogText(@qWelcomeTitle,@qWelcomeBitmap,
  919.               @iWelcomeBitmapID, @qWelcomeUpgradeText1, 
  920.               @qWelcomeText2, @qWelcomeUpgradeText3,
  921.               "",@qWelcomeCopyright1,
  922.               @qWelcomeCopyright2,"",@qNext,@qCancel,
  923.               "","")
  924.  
  925.       @If (@iDialogRes == 2)
  926.          @iDialogRes = @iNext
  927.  
  928.       @ElseIf (@iDialogRes == 3)
  929.          @ConfirmCancel()
  930.          @Goto laWelcomeUpgrade
  931.  
  932.       @Else 
  933.          @ErrorExit(@qWelcomeError1,@iAbort)
  934.       @EndIf
  935.    @Else
  936.       @iDialogRes = @iNext
  937.    @EndIf
  938.  
  939.    //If we make it through this screen, we're doing an upgrade
  940.    @iJavaUpgradeMode = @TRUE
  941.    @IfNewerMode = @TRUE
  942.    @Return()
  943. @EndFunc
  944. //
  945. //
  946. //
  947. //File: InitVar /////////////////////////////////////
  948. //
  949. //CIDVars: TBD
  950. //
  951. //Globals changed: **ALL**
  952. //
  953. //
  954. //
  955.  
  956. //----------------------------------------------------------
  957.  
  958. @DefineVars
  959.  
  960.    //Operating Systems
  961.    @Integer @OS2      = 2    //Value returned by @Platform
  962.    @Integer @Windows  = 3    //Value returned by @Platform
  963.  
  964.    @QString @qCRLF =""       //Carriage-return, line-feed
  965.  
  966.    @QString @qMnemonic = ""  //The mnemonic for dialog controls
  967.  
  968.    @QString @qSystemRoot = ""
  969.    @QString @qTMP1 = ""
  970.    @Integer @iTMP1 = 0
  971.  
  972.    @QString @qRedFileExt = ""  // the extension for group red files
  973.  
  974.  
  975. @EndVars
  976.  
  977. ////////////////////////////////////////
  978. // Operating system-specific settings //
  979. ////////////////////////////////////////
  980.  
  981.    @If (@Platform == @Windows)
  982.       @qCRLF       = "
  983. "
  984.       @qMnemonic   = "&"
  985.       @qSystemRoot = @GetEnv("Windir")
  986.       @qRedFileExt = "Win"
  987.  
  988.    @Else
  989.       @qCRLF       = "\n"
  990.       @qMnemonic   = "~"
  991.       @qTMP1       = @GetEnv("Comspec")
  992.       //Find the last '\' in the comspec, and delete everything after it
  993.       @iTMP1       = @StrRFind("@qTMP1","\\")
  994.       @qSystemRoot = @StrHead("@qTMP1",@iTMP1)
  995.       @qRedFileExt = "OS2"
  996.  
  997.    @EndIf
  998.  
  999. @DefineVars
  1000.  
  1001.    @QString @qCompanyName = "IBM"
  1002.  
  1003.    @Integer @iTMP2 = 0
  1004.    @Integer @iTMP3 = 0
  1005.    @Integer @iTMP4 = 0
  1006.    @Integer @iTMP5 = 0
  1007.    @Integer @iTMP6 = 0
  1008.  
  1009.    @QString @qTMP2 = ""
  1010.    @QString @qTMP3 = ""
  1011.    @QString @qTMP4 = ""
  1012.    @QString @qTMP5 = ""
  1013.    @QString @qTMP6 = ""
  1014.    @QString @qNetQTMP = ""
  1015.  
  1016.    @Integer @iTMPBMP1 = 0
  1017.    @Integer @iTMPBMP2 = 0
  1018.    @Integer @iTMPBMP3 = 0
  1019.    @Integer @iTMPBMP4 = 0
  1020.    @Integer @iTMPBMP5 = 0
  1021.    @Integer @iTMPBMP6 = 0
  1022.  
  1023.    @QString @qTMPBMP1 = ""
  1024.    @QString @qTMPBMP2 = ""
  1025.    @QString @qTMPBMP3 = ""
  1026.    @QString @qTMPBMP4 = ""
  1027.    @QString @qTMPBMP5 = ""
  1028.    @QString @qTMPBMP6 = ""
  1029.  
  1030.    @Drive @dTMP1 = C
  1031.    @Drive @dTMP2 = C
  1032.    @Drive @dTMP3 = C
  1033.    @Drive @dTMP4 = C
  1034.    @Drive @dTMP5 = C
  1035.    @Drive @dTMP6 = C
  1036.  
  1037.    @Integer @iProductClass = 0
  1038.    @Integer @iEntry        = 1
  1039.    @Integer @iProfessional = 2
  1040.    @Integer @iEnterprise   = 3
  1041.  
  1042.    //INI file literals headers
  1043.    @QString @qSectionResponseFile = "ResponseFile"
  1044.    @QString @lRegistry    = "Registry"
  1045.    @QString @lKey         = "Key"
  1046.    @QString @lName        = "Name"
  1047.    @QString @lValue       = "Value"
  1048.    @QString @lDataType    = "DataType"
  1049.    @QString @lType        = "Type"
  1050.    @QString @lIcon        = "Icon"
  1051.    @QString @lTitle       = "Title"
  1052.    @QString @lFolder      = "Folder"
  1053.    @QString @lExePath     = "ExePath"
  1054.    @QString @lIconPath    = "IconPath"
  1055.    @QString @lIconNumber  = "IconNumber"
  1056.    @QString @lParameters  = "Parameters"
  1057.    @QString @lWorkingDir  = "WorkingDir"
  1058.    @QString @lOS2ObjectID = "OS2ObjectID"
  1059.    @QString @lOS2ProgType = "OS2ProgType"
  1060.    @QString @lOption1     = "Option1"
  1061.    @QString @lOption2     = "Option2"
  1062.    @QString @lEnvironmentVars = "EnvironmentVars"
  1063.    @QString @lProductInfo = "ProductInfo"
  1064.    @QString @lMethod      = "Method"
  1065.    @QString @lComponent   = "Component"
  1066.    @QString @lGroup       = "Group"
  1067.    @QString @lFeature     = "Feature"
  1068.    @QString @lProductVars = "ProductVars"
  1069.    @QString @lString      = "String"
  1070.    @QString @lExpandString = "ExpandString"
  1071.    @QString @lBinary      = "Binary"
  1072.    @QString @lDWORD       = "DWORD"
  1073.    @QString @lMultiString = "MultiString"
  1074.    @QString @lIfOS2       = "#IfOS2"
  1075.    @QString @lIfWin       = "#IfWin"
  1076.    @QString @lEndif       = "#Endif"
  1077.  
  1078.    @QString @lInstallOptions = "InstallOptions"
  1079.    @QString @lCustom         = "Custom"
  1080.    @QString @lInstallPath    = "InstallPath"
  1081.    @QString @l1              = "1"
  1082.    @QString @l2              = "2"
  1083.    @QString @l3              = "3"
  1084.    @QString @l4              = "4"
  1085.    @QString @l5              = "5"
  1086.    @QString @l6              = "6"
  1087.    @QString @l7              = "7"
  1088.    @QString @l8              = "8"
  1089.    @QString @l9              = "9"
  1090.    @QString @l10             = "10"
  1091.    @QString @l11             = "11"
  1092.    @QString @l12             = "12"
  1093.  
  1094.    @QString @lInstallType = "InstallType"
  1095.    @QString @lY           = "Y"
  1096.    @QString @lN           = "N"
  1097.    @QString @lYes         = "Yes"
  1098.    @QString @lNo          = "No"
  1099.  
  1100.    @QString @lInstallSys  = "Install.sys"
  1101.    @QString @lOldValue    = "OldValue"
  1102.    @QString @lDirectory   = "Directory"
  1103.    @QString @lEnvVarLoc   = "EnvVarLoc"
  1104.    @QString @lLanguage    = "Language"
  1105.    @QString @lFixPak      = "FixPak"
  1106.    @QString @lDisplayName = "DisplayName"
  1107.    @QString @lUninstallString = "UninstallString"
  1108.  
  1109.    @QString @lBytes = "Bytes"
  1110.  
  1111.    @QString @qDialogBmp10   = "Vaibm10"
  1112.    @Integer @iDialogBmpID10 = 211
  1113.    @QString @qDialogBmp8    = "Vaibm8"
  1114.    @Integer @iDialogBmpID8  = 231
  1115.  
  1116.  
  1117.    //These will be reset in setdisp! 
  1118.    @QString @qDialogBmp    = @qDialogBmp10  // Bmp for dialog
  1119.    @Integer @iDialogBmpID  = @iDialogBmpID10
  1120.    @QString @qLogoBmp      = "VaLogo"    // Bmp for logo
  1121.  
  1122.    //CID flags and codes
  1123.    @Integer @iAbort        = 5000            // CID abort code
  1124.    @Integer @iResponseFile = @FALSE
  1125.  
  1126.    @QString @qOverwriteAutoexec = "Y"
  1127.    @QString @qOverwriteConfig = "Y"
  1128.    @QString @qOverwriteProduct = "Y"
  1129.    @QString @qReboot = "N"
  1130.  
  1131.  
  1132.    @Integer @iHPFSonly = 0
  1133.    @Integer @iAlreadyRunInstallPre = @False
  1134.  
  1135.    //Red files
  1136.    @Integer @iMultipleRedFiles = @TRUE
  1137.  
  1138.    @QString @UninstallRedFile = "Uninstal.@qRedFileExt"
  1139.    @QString @GroupARedFile = "Agroup.@qRedFileExt"
  1140.    @QString @GroupBRedFile = "Bgroup.@qRedFileExt"
  1141.    @QString @GroupCRedFile = "Cgroup.@qRedFileExt"
  1142.    @QString @GroupDRedFile = "Dgroup.@qRedFileExt"
  1143.    @QString @GroupERedFile = "Egroup.@qRedFileExt"
  1144.    @QString @GroupFRedFile = "Fgroup.@qRedFileExt"
  1145.    @QString @GroupGRedFile = "Ggroup.@qRedFileExt"
  1146.    @QString @GroupHRedFile = "Hgroup.@qRedFileExt"
  1147.    @QString @GroupIRedFile = "Igroup.@qRedFileExt"
  1148.    @QString @GroupJRedFile = "Jgroup.@qRedFileExt"
  1149.    @QString @GroupKRedFile = "Kgroup.@qRedFileExt"
  1150.    @QString @GroupLRedFile = "Lgroup.@qRedFileExt"
  1151.    @QString @GroupMRedFile = "Mgroup.@qRedFileExt"
  1152.    @QString @GroupNRedFile = "Ngroup.@qRedFileExt"
  1153.    @QString @GroupORedFile = "Ogroup.@qRedFileExt"
  1154.    @QString @GroupPRedFile = "Pgroup.@qRedFileExt"
  1155.    @QString @GroupQRedFile = "Qgroup.@qRedFileExt"
  1156.    @QString @GroupRRedFile = "Rgroup.@qRedFileExt"
  1157.    @QString @GroupSRedFile = "Sgroup.@qRedFileExt"
  1158.    @QString @GroupTRedFile = "Tgroup.@qRedFileExt"
  1159.    @QString @GroupURedFile = "Ugroup.@qRedFileExt"
  1160.    @QString @GroupVRedFile = "Vgroup.@qRedFileExt"
  1161.    @QString @GroupWRedFile = "Wgroup.@qRedFileExt"
  1162.    @QString @GroupXRedFile = "Xgroup.@qRedFileExt"
  1163.    @QString @GroupYRedFile = "Ygroup.@qRedFileExt"
  1164.    @QString @GroupZRedFile = "Zgroup.@qRedFileExt"
  1165.  
  1166.  
  1167.  
  1168.    //Special files
  1169.    @QString @qDefaultsFilename   = "@StartupDrive:\\@StartupDir\\INSTALL.INI"
  1170.    @Integer @iDefaultsFilepos    = 0
  1171.    @QString @qResponseFilename   = ""
  1172.    @QString @qInstallSysFilename = ""
  1173.    @Integer @iInstallSysFilepos  = 0
  1174.    @QString @qErrFile = ""
  1175.    
  1176.    @QString @qConfirmHelpFile = "confirm._t_"
  1177.    @QString @qChkExistHelpFile = "ChkExist._t_"
  1178.    @QString @qDlgDriveHelpFile = "DlgDrive._t_"
  1179.    @QString @qDlgInUseHelpFile = "DlgInUse._t_"
  1180.    @QString @qDlgSpaceHelpFile = "DlgSpace._t_"
  1181.    @QString @qInstTypeHelpFile = "InstType._t_"
  1182.    @QString @qInstPathHelpFile = "InstPath._t_"
  1183.    @QString @qCustomHelpFile = "custom._t_"
  1184.    @QString @qGoodbyeHelpFile = "Goodbye._t_"
  1185.    @QString @qWelcomeHelpFile = "Help._t_"
  1186.    @QString @qRebootHelpFile = "Reboot._t_"
  1187.    @QString @qReqtsHelpFile = "Reqts._t_"
  1188.    @QString @qSetEnvHelpFile = "SetEnv._t_"
  1189.    @QString @qUninstalHelpFile = "Uninstal._t_"
  1190.    @QString @qDetInstDirHelpFile = "DetDir._t_"
  1191.    @QString @qGetProductDirHelpFile = "GetDir._t_"
  1192.    @QString @qInstallActionsHelpFile = "Actions._t_"
  1193.    @QString @qRebuildHelpFile = "Rebuild._t_"
  1194.    @QString @qRebuildConfirmPathsHelpFile = "rconfirm._t_"
  1195.  
  1196.    @QString @qPrereqsFile = "Prereqs._t_"
  1197.    @QString @qPreviewFile = "Preview._t_"
  1198.    @QString @qLicenseFile = "License._t_"
  1199.  
  1200.    @QString @qCopyFileBMPFile = "copyfile._b_"
  1201.    @QString @qSetDeskBMPFile = "setdesk._b_"
  1202.    @QString @qSetEnvBMPFile = "setenv._b_"
  1203.    @QString @qSetODBCBMPFile = "setodbc._b_"
  1204.    @QString @qSetPVarBMPFile = "setpvar._b_"
  1205.  
  1206.    @QString @qBackGroundBMPFile = ""
  1207.    @QString @qBackGroundBMPFile2 = ""
  1208.    @QString @qProdLogoBMPFile = ""
  1209.    @QString @qWaitMsgBMPFile1 = ""
  1210.    @QString @qWaitMsgBMPFile2 = ""
  1211.    @QString @qWaitMsgBMPFile3 = ""
  1212.    @QString @qWaitMsgBMPFile4 = ""
  1213.    @QString @qWaitMsgBMPFile5 = ""
  1214.    @QString @qWaitMsgBMPFile6 = ""
  1215.    @QString @qBBoardBMPFile1 = ""
  1216.    @QString @qBBoardBMPFile2 = ""
  1217.    @QString @qBBoardBMPFile3 = ""
  1218.    @QString @qBBoardBMPFile4 = ""
  1219.    @QString @qBBoardBMPFile5 = ""
  1220.    @QString @qBBoardBMPFile6 = ""
  1221.    @QString @qBBoardBMPFile7 = ""
  1222.    @QString @qBBoardBMPFile8 = ""
  1223.    @QString @qBBoardBMPFile9 = ""
  1224.    @QString @qBBoardBMPFile10 = ""
  1225.    @QString @qBBoardBMPFile11 = ""
  1226.    @QString @qBBoardBMPFile12 = ""
  1227.    @QString @qBBoardBMPFile13 = ""
  1228.    @QString @qBBoardBMPFile14 = ""
  1229.    @QString @qBBoardBMPFile15 = ""
  1230.    @QString @qBBoardBMPFile16 = ""
  1231.  
  1232.    @QString @qReadmeFile     = "ReadMe.txt"
  1233.  
  1234.    //Function return values
  1235.    @Integer @Success = @TRUE
  1236.    @Integer @Failure = @FALSE
  1237.  
  1238.    //Function return variables
  1239.    @QString @qRetVal = ""
  1240.  
  1241.    //Dialog return code vars
  1242.    @Integer @iRetVal = 0     // in Dialog.dat
  1243.    @Integer @iDialogRes = 0  // in all functions
  1244.    @Integer @iFuncRes = 0    // in the main script
  1245.  
  1246.    //System variables
  1247.    @QString @qTempPath = "@GetEnv("TEMP")"
  1248.  
  1249.    //OS version
  1250.    @Integer @OS2v3     = 300
  1251.    @Integer @OS2v4     = 400
  1252.    @Integer @Win95     = 400
  1253.    @Integer @Windows95 = 2     //Value returned by @Subplatform
  1254.    @Integer @Win97     = 0
  1255.    @Integer @WindowsNT = 3     //Value returned by @Subplatform
  1256.    @Integer @WinNTv35  = 351
  1257.    @Integer @WinNTv40  = 400
  1258.    @Integer @OS        = 0
  1259.  
  1260.    //Dialog return codes
  1261.    @Integer @iNext   = 110
  1262.    @Integer @iBack   = 100
  1263.    @Integer @iCancel = 120
  1264.    @Integer @iOK     = 100
  1265.    @Integer @iHelp   = 130
  1266.  
  1267.    //Other return values
  1268.    @Integer @iSuccess                = 1
  1269.    @Integer @iFiledone               = 2
  1270.    @Integer @iSuccessSectionDone     = 3
  1271.    @Integer @iEOF                    = -1
  1272.    @Integer @iNoItem                 = -2
  1273.    @Integer @iNoItemSectionDone      = 4
  1274.    @Integer @iErrorIncompleteRegItem = -3
  1275.  
  1276.  
  1277.  
  1278.    //Library file Names
  1279.    @QString @DataRED
  1280.  
  1281.    @Integer @InstallSize = 0
  1282.  
  1283.    //Install path information
  1284.    @QString @qExtInstallPath1 = ""
  1285.    @QString @qInstallPath1 = "@OutDrive:\\@Subdir"
  1286.    @QString @qInstallPath2 = "@OutDrive:\\@Subdir"
  1287.    @QString @qInstallPath3 = "@OutDrive:\\@Subdir"
  1288.    @QString @qInstallPath4 = "@OutDrive:\\@Subdir"
  1289.    @QString @qInstallPath5 = "@OutDrive:\\@Subdir"
  1290.    @QString @qInstallPath6 = "@OutDrive:\\@Subdir"
  1291.    @QString @qInstallPath7 = "@OutDrive:\\@Subdir"
  1292.    @QString @qInstallPath8 = "@OutDrive:\\@Subdir"
  1293.    @QString @qInstallPath9 = "@OutDrive:\\@Subdir"
  1294.    @QString @qInstallPath10 = "@OutDrive:\\@Subdir"
  1295.    @QString @qInstallPath1TMP = ""
  1296.  
  1297.    @QString @qInstallPath1NoQuotes = ""
  1298.    @QString @qInstallPath2NoQuotes = ""
  1299.    @QString @qInstallPath3NoQuotes = ""
  1300.    @QString @qInstallPath4NoQuotes = ""
  1301.    @QString @qInstallPath5NoQuotes = ""
  1302.    @QString @qInstallPath6NoQuotes = ""
  1303.    @QString @qInstallPath7NoQuotes = ""
  1304.    @QString @qInstallPath8NoQuotes = ""
  1305.    @QString @qInstallPath9NoQuotes = ""
  1306.    @QString @qInstallPath10NoQuotes = ""
  1307.    @QString @qInstallPath1TMPNoQuotes = ""
  1308.  
  1309.    @QString @qWelcomeBitmap = "@qDialogBmp"
  1310.    @Integer @iWelcomeBitmapID = @iDialogBmpID
  1311.  
  1312.    @QString @qWelcomeCopyright1 = ""
  1313.    @QString @qWelcomeCopyright2 = ""
  1314.  
  1315.    @QString @qCopyrightText1 = ""
  1316.    @QString @qCopyrightText2 = ""
  1317.    @QString @qCopyrightText3 = ""
  1318.    @QString @qCopyrightText4 = ""
  1319.    @QString @qCopyrightText5 = ""
  1320.    @QString @qCopyrightText6 = ""
  1321.    @QString @qCopyrightText7 = ""
  1322.    @QString @qCopyrightText8 = ""
  1323.  
  1324.  
  1325.    @QString @qCopyrightBitmap = "@qDialogBmp"
  1326.    @Integer @iCopyrightBitmapID = @iDialogBmpID
  1327.  
  1328.    @QString @qAskRebootBitMap = @qDialogBmp
  1329.    @Integer @iAskRebootBitmapID = @iDialogBmpID
  1330.  
  1331.    @Integer @iAskReboot = 2
  1332.  
  1333.    @Integer @iSingleDriveEntry = @False
  1334.    @QString @qGetInstDirDriveList1 = ""
  1335.    @QString @qGetInstDirDriveList2 = ""
  1336.    @QString @qGetInstDirDriveList3 = ""
  1337.    @Integer @iDriveList1Count = 0
  1338.    @Integer @iDriveList2Count = 0
  1339.    @Integer @iDriveList3Count = 0
  1340.  
  1341.    @Integer @iGetInstDirPathOK = 0
  1342.    @Integer @iGetInstDirBadPath = 1
  1343.    @Integer @iGetInstDirBadDrive = 2
  1344.    @Integer @iGetInstDirNoRoot = 3
  1345.    @Integer @iGetInstDirInvalidCharacterInPath = 4
  1346.    @Integer @iGetInstDirDriveNotHPFS = 5
  1347.    @Integer @iGetInstDirLongPath = 6
  1348.    @QString @qInvalidPath = ""
  1349.    @Drive @dInvalidDrive = A
  1350.    @Integer @iCheckPathResult = 0
  1351.  
  1352.    @QString @qGetInstDirBitmap = "vaibm"
  1353.    @Integer @iGetInstDirBitmapID = 201
  1354.  
  1355.    @Drive @dGetInstDirDriveLetter = A
  1356.  
  1357.    @QString @qProduct1 = ""
  1358.    @QString @qProduct2 = ""
  1359.    @QString @qProduct3 = ""
  1360.    @QString @qProduct4 = ""
  1361.    @QString @qProduct5 = ""
  1362.    @QString @qProduct6 = ""
  1363.    @QString @qProduct7 = ""
  1364.    @QString @qProduct8 = ""
  1365.    @QString @qProduct9 = ""
  1366.    @QString @qProduct10 = ""
  1367.    @QString @qProduct1Text = ""
  1368.    @QString @qProduct2Text = ""
  1369.    @QString @qProduct3Text = ""
  1370.    @QString @qProduct4Text = ""
  1371.    @QString @qProduct5Text = ""
  1372.    @QString @qProduct6Text = ""
  1373.    @QString @qProduct7Text = ""
  1374.    @QString @qProduct8Text = ""
  1375.    @QString @qProduct9Text = ""
  1376.    @QString @qProduct10Text = ""
  1377.  
  1378.  
  1379.    @Integer @iCustom    = 1
  1380.    @QString @qCustomBitmap = "@qDialogBmp"
  1381.    @Integer @iCustomBitmapID = @iDialogBmpID
  1382.  
  1383.  
  1384.  
  1385.    //Not used with new initprod, can be removed
  1386.    @QString @qCustomDesc1 = "CB Desc 1"
  1387.    @QString @qCustomDesc2 = ""
  1388.    @QString @qCustomDesc3 = ""
  1389.    @QString @qCustomDesc4 = ""
  1390.    @QString @qCustomDesc5 = ""
  1391.    @QString @qCustomDesc6 = ""
  1392.    @QString @qCustomDesc7 = ""
  1393.    @QString @qCustomDesc8 = ""
  1394.    @QString @qCustomDesc9 = ""
  1395.    @QString @qCustomDesc10 = ""
  1396.    @QString @qCustomDesc11 = ""
  1397.    @QString @qCustomDesc12 = ""
  1398.  
  1399.  
  1400.    @QString @qFeature01            = ""
  1401.    @QString @qFeature02            = ""
  1402.    @QString @qFeature03            = ""
  1403.    @QString @qFeature04            = ""
  1404.    @QString @qFeature05            = ""
  1405.    @QString @qFeature06            = ""
  1406.    @QString @qFeature07            = ""
  1407.    @QString @qFeature08            = ""
  1408.    @QString @qFeature09            = ""
  1409.    @QString @qFeature10            = ""
  1410.    @QString @qFeature11            = ""
  1411.    @QString @qFeature12            = ""
  1412.    @QString @qFeature13            = ""
  1413.    @QString @qFeature14            = ""
  1414.    @QString @qFeature15            = ""
  1415.    @QString @qFeature16            = ""
  1416.  
  1417.    @QString @qFeature01Help        = ""
  1418.    @QString @qFeature02Help        = ""
  1419.    @QString @qFeature03Help        = ""
  1420.    @QString @qFeature04Help        = ""
  1421.    @QString @qFeature05Help        = ""
  1422.    @QString @qFeature06Help        = ""
  1423.    @QString @qFeature07Help        = ""
  1424.    @QString @qFeature08Help        = ""
  1425.    @QString @qFeature09Help        = ""
  1426.    @QString @qFeature10Help        = ""
  1427.    @QString @qFeature11Help        = ""
  1428.    @QString @qFeature12Help        = ""
  1429.    @QString @qFeature13Help        = ""
  1430.    @QString @qFeature14Help        = ""
  1431.    @QString @qFeature15Help        = ""
  1432.    @QString @qFeature16Help        = ""
  1433.  
  1434.    @QString @qCustomHelp1 = "Help for CB 1 goes here"
  1435.    @QString @qCustomHelp2 = ""
  1436.    @QString @qCustomHelp3 = ""
  1437.    @QString @qCustomHelp4 = ""
  1438.    @QString @qCustomHelp5 = ""
  1439.    @QString @qCustomHelp6 = ""
  1440.    @QString @qCustomHelp7 = ""
  1441.    @QString @qCustomHelp8 = ""
  1442.    @QString @qCustomHelp9 = ""
  1443.    @QString @qCustomHelp10 = ""
  1444.    @QString @qCustomHelp11 = ""
  1445.    @QString @qCustomHelp12 = ""
  1446.  
  1447.    //Text messages - CustomSelect function
  1448.    @Integer @iCustom1 = 1
  1449.    @Integer @iCustom2 = 0
  1450.    @Integer @iCustom3 = 0
  1451.    @Integer @iCustom4 = 0
  1452.    @Integer @iCustom5 = 0
  1453.    @Integer @iCustom6 = 0
  1454.    @Integer @iCustom7 = 0
  1455.    @Integer @iCustom8 = 0
  1456.    @Integer @iCustom9 = 0
  1457.    @Integer @iCustom10 = 0
  1458.    @Integer @iCustom11 = 0
  1459.    @Integer @iCustom12 = 0
  1460.    @Integer @iCustom13 = 0
  1461.    @Integer @iCustom14 = 0
  1462.    @Integer @iCustom15 = 0
  1463.    @Integer @iCustom16 = 0
  1464.  
  1465.    //Not used with new initprod, can be removed
  1466.    @QString @qCustomGroups1 = ""
  1467.    @QString @qCustomGroups2 = ""
  1468.    @QString @qCustomGroups3 = ""
  1469.    @QString @qCustomGroups4 = ""
  1470.    @QString @qCustomGroups5 = ""
  1471.    @QString @qCustomGroups6 = ""
  1472.    @QString @qCustomGroups7 = ""
  1473.    @QString @qCustomGroups8 = ""
  1474.    @QString @qCustomGroups9 = ""
  1475.    @QString @qCustomGroups10 = ""
  1476.    @QString @qCustomGroups11 = ""
  1477.    @QString @qCustomGroups12 = ""
  1478.  
  1479.    // Gray out features?
  1480.    @Integer @iCustom1Enable = 1
  1481.    @Integer @iCustom2Enable = 1
  1482.    @Integer @iCustom3Enable = 1
  1483.    @Integer @iCustom4Enable = 1
  1484.    @Integer @iCustom5Enable = 1
  1485.    @Integer @iCustom6Enable = 1
  1486.    @Integer @iCustom7Enable = 1
  1487.    @Integer @iCustom8Enable = 1
  1488.    @Integer @iCustom9Enable = 1
  1489.    @Integer @iCustom10Enable = 1
  1490.    @Integer @iCustom11Enable = 1
  1491.    @Integer @iCustom12Enable = 1
  1492.    @Integer @iCustom13Enable = 1
  1493.    @Integer @iCustom14Enable = 1
  1494.    @Integer @iCustom15Enable = 1
  1495.    @Integer @iCustom16Enable = 1
  1496.  
  1497.    //features and groups string
  1498.    @QString @qGroupsString = ""
  1499.    @QString @qFeature01GroupString = ""
  1500.    @QString @qFeature02GroupString = ""
  1501.    @QString @qFeature03GroupString = ""
  1502.    @QString @qFeature04GroupString = ""
  1503.    @QString @qFeature05GroupString = ""
  1504.    @QString @qFeature06GroupString = ""
  1505.    @QString @qFeature07GroupString = ""
  1506.    @QString @qFeature08GroupString = ""
  1507.    @QString @qFeature09GroupString = ""
  1508.    @QString @qFeature10GroupString = ""
  1509.    @QString @qFeature11GroupString = ""
  1510.    @QString @qFeature12GroupString = ""
  1511.    @QString @qFeature13GroupString = ""
  1512.    @QString @qFeature14GroupString = ""
  1513.    @QString @qFeature15GroupString = ""
  1514.    @QString @qFeature16GroupString = ""
  1515.  
  1516.    //Install type variables
  1517.    @QString @qInstallTypeSelection = ""
  1518.    @QString @qCustomSelections = ""
  1519.  
  1520.    //Marks which features have been selected
  1521.    @QString @qCustomFeatures = ""
  1522.    //Used during add to mark the features which were previously on the system
  1523.    @QString @qOldFeatures    = ""
  1524.  
  1525.    @QString @qGroupsSet      = ""
  1526.    @QString @qOldGroupsSet   = ""
  1527.  
  1528.    //Install Type Groups
  1529.    @QString @qInstallTypeGroups1 = ""
  1530.    @QString @qInstallTypeGroups2 = ""
  1531.    @QString @qInstallTypeGroups3 = ""
  1532.    @QString @qInstallTypeGroups4 = ""
  1533.    @QString @qInstallTypeGroups5 = ""
  1534.    @QString @qInstallTypeGroups6 = ""
  1535.  
  1536.    //InstallType Custom Features
  1537.    @QString @qInstallType1Features = ""
  1538.    @QString @qInstallType2Features = ""
  1539.    @QString @qInstallType3Features = ""
  1540.    @QString @qInstallType4Features = ""
  1541.    @QString @qInstallType5Features = ""
  1542.    @QString @qInstallType6Features = ""
  1543.  
  1544.    //Text messages - GetInstallType function
  1545.    @QString @qInstallTypeBitmap = "@qDialogBmp"
  1546.    @Integer @iInstallTypeBitmapID = @iDialogBmpID
  1547.    @QString @qInstallTypeText2 = ""
  1548.    @QString @qInstallTypeText3 = ""
  1549.    @QString @qInstallType1Desc = ""
  1550.    @QString @qInstallType2Desc = ""
  1551.    @QString @qInstallType3Desc = ""
  1552.    @QString @qInstallType4Desc = ""
  1553.    @QString @qInstallType5Desc = ""
  1554.    @QString @qInstallType6Desc = ""
  1555.    @QString @qInstallTypeText5 = ""
  1556.    @QString @qInstallTypeText6 = ""
  1557.    @QString @qInstallTypeHelp1 = ""
  1558.    @QString @qInstallTypeHelp2 = ""
  1559.    @QString @qInstallTypeHelp3 = ""
  1560.    @QString @qInstallTypeHelp4 = ""
  1561.    @QString @qInstallTypeHelp5 = ""
  1562.    @QString @qInstallTypeHelp6 = ""
  1563.  
  1564.    //Install Type information
  1565.    @Integer @iInstallType    = 1
  1566.    @QString @qInstallType1   = "Full"
  1567.    @QString @qInstallType2   = ""
  1568.    @QString @qInstallType3   = ""
  1569.    @QString @qInstallType4   = ""
  1570.    @QString @qInstallType5   = ""
  1571.    @QString @qInstallType6   = ""
  1572.    @Integer @iInstallTypeCustom = 0
  1573.    @QString @qInstallTypeCustom = ""
  1574.  
  1575.  
  1576.    @QString @qConfirmBitmap = @qDialogBmp
  1577.    @Integer @iConfirmBitmapID = @iDialogBmpID
  1578.  
  1579.  
  1580.  
  1581.    //Reading mode
  1582.    @Integer @iCondlReadMode = @False
  1583.    //Variables for reading/writing icons,registry,envvars
  1584.    @QString @qKey         = ""
  1585.    @QString @qName        = ""
  1586.    @QString @qValue       = ""
  1587.    @QString @qDataType    = ""
  1588.    @QString @qType        = ""
  1589.    @QString @qTitle       = ""
  1590.    @QString @qFolder      = ""
  1591.    @QString @qExePath     = ""
  1592.    @QString @qIconPath    = ""
  1593.    @QString @qIconNumber  = ""
  1594.    @QString @qParameters  = ""
  1595.    @QString @qWorkingDir  = ""
  1596.    @QString @qOS2ObjectID = ""
  1597.    @QString @qOS2ProgType = ""
  1598.    @QString @qOption1     = ""
  1599.    @QString @qOption2     = ""
  1600.    @QString @qMethod      = ""
  1601.    @QString @qOldValue    = ""
  1602.    @QString @qComponent   = ""
  1603.    @QString @qGroup       = ""
  1604.    @QString @qItemFeature = ""
  1605.  
  1606.    //Variables for local storage (within functions)
  1607.    @QString @qReadStr
  1608.    @QString @qToken1
  1609.    @QString @qToken2
  1610.    @Integer @iReturnVal
  1611.    @Integer @iDoLoop
  1612.    @Integer @iIndex
  1613.    @Integer @iSectionDone
  1614.  
  1615.    //Byte variables for comparisons
  1616.    @Byte @bBeginSection   = @Eval('[')
  1617.    @Byte @bBlank          = @Eval(' ')
  1618.  
  1619.  
  1620.    //Screen resolution
  1621.    @Integer @XRes     = @WinScreenCaps(8)
  1622.    @Integer @YRes     = @WinScreenCaps(10)
  1623. //   @Integer @NColours = @WinScreenCaps(24) //the call is not currently working
  1624.  
  1625.    //Testing variable
  1626.    @QString @qInputLine
  1627.    @Integer @RetVal
  1628.  
  1629.    //Variables for funcs.dat
  1630.    @Integer @Index = 0
  1631.    @Integer @Button100 = 0
  1632.    @Integer @Button110 = 0
  1633.    @qString @EditBox1000 = ""
  1634.    @qString @TempStr = ""
  1635.    @qString @qTempStr = ""
  1636.    @qString @qTempStr1 = ""
  1637.    @qString @qTempStr2 = ""
  1638.    @qString @qTempStr3 = ""
  1639.    @qString @qTempStr4 = ""
  1640.    @qString @qTempStr5 = ""
  1641.    @qString @qTempStr6 = ""
  1642.  
  1643.    //Variables for debug.dat and cmdline.dat
  1644.    @Integer @DebugMode = @False
  1645.    @Integer @AutorunMode = @False
  1646.    @Integer @ShowAllToggle = @False
  1647.    @Integer @Error = @False
  1648.    @Integer @TabSpace = 0
  1649.    @QString @CurFuncName = "System"
  1650.  
  1651.    @Integer @iBypassODBC = @False
  1652.    @Integer @iBypassLicense = @False
  1653.    @Integer @iBypassReadme = @False
  1654.  
  1655.    //CID force variables
  1656.    @QString @qForceCopyright         = "N"
  1657.    @QString @qForceWelcome           = "N"
  1658.    @QString @qForceLicense           = "N"
  1659.    @QString @qForceCheckPrereqs      = "N"
  1660.    @QString @qForceCheckExisting     = "N"
  1661.    @QString @qForceGetInstallType    = "N"
  1662.    @QString @qForceCustom            = "N"
  1663.    @QString @qForceGetInstallPath    = "N"
  1664.    @QString @qForceCheckFreeSpace    = "N"
  1665.    @QString @qForceCheckInUse        = "N"
  1666.    @QString @qForceConfirmInstall    = "N"
  1667.    @QString @qForceSetDesktop        = "N"
  1668.    @QString @qForceSetEnvironment    = "N"
  1669.    @QString @qForceRegisterProduct   = "N"
  1670.    @QString @qForceRegisterUninstall = "N"
  1671.    @QString @qForceRegisterART       = "N"
  1672.    @QString @qForceReboot            = "N"
  1673.    @QString @qForceReadme            = "N"
  1674.    @QString @qForceDetInstDir        = "N"
  1675.    @QString @qForceInstallActions    = "N"
  1676.    @QString @qForceRebuild           = "N"
  1677.    @QString @qForceRebuildConfirm    = "N"
  1678.    @QString @qForceUninstall         = "N"
  1679.  
  1680.    //Variables for chkreqs.dat
  1681. //   @QString @qCheckReqsBitmap = "bang"
  1682.    @QString @qCheckReqsBitmap = ""
  1683. //   @Integer @iCheckReqsBitmapID = 7004   //bang
  1684.    @Integer @iCheckReqsBitmapID = 0    
  1685.    @QString @qTargetSystemPlatform = ""
  1686.    @QString @qCheckSysReqsOSVer = ""
  1687.    @Integer @iPrereqOS = @Windows
  1688.    @Integer @iPrereqNTVer = @WinNTv40
  1689.    @Integer @iMinPrereqNTVer = @WinNTv35
  1690.    @Integer @iPrereqWin95Ver = @Win95
  1691.    @Integer @iPrereqOS2Ver = @OS2v4
  1692.    @Integer @iMinPrereqOS2Ver = @OS2v3
  1693.    @Integer @iPrereqCPU = 586
  1694.    @Integer @iMinPrereqCPU = 486
  1695.    @Integer @iPrereqRAM = 32
  1696.    @Integer @iMinPrereqRAM = 16
  1697.    @Integer @iPrereqResWidth = 800
  1698.    @Integer @iMinPrereqResWidth = 800
  1699.    @Integer @iPrereqResHeight = 600
  1700.    @Integer @iPrereqColours = 256
  1701.    @Integer @iMinPrereqColours = 16
  1702.  
  1703.    //SetDesktop info
  1704.    @QString @qFolderName = @qProductName
  1705.    @QString @qExtFolderName = @qProductName
  1706.    @QString @qInstallFolderID  = ""
  1707.  
  1708.    @QString @qFolderType       = "Folder"
  1709.    @QString @qProgramType      = "Program"
  1710.    @QString @qCommandType      = "Command"
  1711.    @QString @qTextFileType     = "TextFile"
  1712.    @QString @qLinkToFolderType = "LinkToFolder"
  1713.    @QString @qDoubleQuotes = "\"\""
  1714.    @QString @qREXXScriptFile = "kdinst.cmd"
  1715.  
  1716.    //RegProd and regunin info
  1717.    @QString @qInstallKey = "Install"
  1718.    @QString @qLanguage = "ENG"
  1719.    @QString @qFixPakLevel = "0"
  1720.    @QString @qRegEnvVarsNotSet = "0"
  1721.    @QString @qRegSetForAllUsers = "1"
  1722.    @QString @qRegSetForCurrentUser = "2"
  1723.    @QString @qUninstallCmdLine = "install\\uninstal.bat"
  1724.  
  1725.    @Integer @iKeyHandle = 0
  1726.    @Integer @iDisposition = 0
  1727.    @Integer @iRegString = 1
  1728.    @Integer @iRegExpandString = 2
  1729.    @Integer @iRegBinary = 3
  1730.    @Integer @iRegDWord = 4
  1731.    @Integer @iRegMultiString = 7
  1732.    @Integer @iRegKeyAllAccess = 0xf003f
  1733.  
  1734.    @QString @qProductINI = ""   //the name of the os2 product ini file
  1735.    @QString @qExtProductINI = ""  //the name of another os2 product ini file
  1736.    @QString @lProductINIVar = ""
  1737.    @QString @qProductINIPointerApp = ""  //the name of the app in os2.ini
  1738.    @QString @qProductINIPointerKey = ""  //the name of the key in os2.ini
  1739.    @QString @qProductINIBase       = ""  //the base name of ini file
  1740.  
  1741.    //setenv info
  1742.    @Integer @iDisplayEnvvarChoice = @True
  1743.    @QString @qEnvVarLoc = @qRegSetForCurrentUser
  1744.    @QString @qExtEnvVarLoc = @qRegSetForCurrentUser
  1745.  
  1746.    @QString @qSetEnvBitmap = @qDialogBmp
  1747.    @Integer @iSetEnvBitmapID = @iDialogBmpID
  1748.    @QString @qSetEnvReplaceVar = "="
  1749.    @QString @qSetProdReplaceVar = "="
  1750.    @Integer @iSetEnvRBSelected = 2
  1751.    @Integer @iRegValueType = 0
  1752.    @Integer @iSetEnvForAllUsers = @FALSE
  1753.    @Integer @iEnvVarKeyHandle = @HKeyCurrentUser
  1754.  
  1755.    @Integer @iSetEnvVarMaxLength = 255
  1756.  
  1757.  
  1758.    @Integer @iVarWritten = @False
  1759.    @Integer @iPos = 0
  1760.  
  1761.    @QString @qUninstallBitmap = @qDialogBmp
  1762.    @Integer @iUninstallBitmapID = @iDialogBmpID
  1763.  
  1764.    @QString @qSubKeyName = ""
  1765.    @Integer @UninstallMode = @False
  1766.    @Integer @iReturn = 0
  1767.    @Integer @iProductInstalled = @True
  1768.    @Integer @iExtProductInstalled = @False
  1769.    @QString @qEnvVarSetting = ""
  1770. //   @QString @qAskRemoveDirBitmap = "bang"
  1771.    @QString @qAskRemoveDirBitmap = ""
  1772. //   @Integer @iAskRemoveDirBitmapID = 7004   //bang
  1773.    @Integer @iAskRemoveDirBitmapID = 0
  1774.  
  1775.    //Special files used for Environment variable related
  1776.    //operations during installation
  1777.    @QString @qMainProdVar = "VACPPMAIN"
  1778.    @QString @qSetEnvBatFile = "SETENV.BAT"
  1779.    @QString @qAutoexecBatFile = "@BootDrive:\\AUTOEXEC.BAT"
  1780.    @QString @qConfigSysFile = "@BootDrive:\\CONFIG.SYS"
  1781.    @QString @qBackupAutoexecBatFile = ""
  1782.    @QString @qBackupConfigSysFile = ""
  1783.    @QString @qTempTextFile = "#IBM#._#_"
  1784.  
  1785.    @Integer @iMakeConfigSysBackup = @True
  1786.    @Integer @iMakeAutoexecBatBackup = @True
  1787.  
  1788.  
  1789.    @QString @qProdVarSetting = ""
  1790.    @Integer @iDataType = 0
  1791.    @QString @qAppendProdVar = "Append"
  1792.  
  1793.    //Special JAVA variable
  1794.    @Integer @iJavaUpgradeMode = @False
  1795.    @Integer @iJavaInstall = @True
  1796.  
  1797.    //Variables for Actions.dat
  1798.    @Integer @AddMode = @False
  1799.    @Integer @DeleteMode = @False
  1800.    @Integer @UpdateMode = @False
  1801.    @Integer @RebuildMode = @False
  1802.    @QString @qDetInstDirTitle = "@qProductName"
  1803.    @QString @qDetInstDirBitmap = @qDialogBmp
  1804.    @Integer @iDetInstDirBitmapID = @iDialogBmpID
  1805.  
  1806.    @Integer @iDetInstDirRBSelected = 1
  1807.  
  1808.    @QString @qProdInfoRemovedBitmap = @qDialogBmp
  1809.    @Integer @iProdInfoRemovedBitmapID = @iDialogBmpID
  1810.  
  1811.    @QString @qGetProductDirBitmap = @qDialogBmp
  1812.    @Integer @iGetProductDirBitmapID = @iDialogBmpID
  1813.  
  1814.    @QString @qInstallActionsBitmap = @qDialogBmp
  1815.    @Integer @iInstallActionsBitmapID = @iDialogBmpID
  1816.  
  1817.    @Integer @iInstallActionRBSelected = 3
  1818.  
  1819.  
  1820.    //Variables for chkfree.dat
  1821.    @QString @qDrives = ""
  1822.    @Integer @iNumDrives = 0
  1823.    @Drive @dCurrentDrive = A
  1824.    @QString @qCurrentDrive = ""
  1825.    @QString @qSetGroups = ""
  1826.    @QString @qOptionGroups = ""
  1827.    @QString @qDriveOptions = ""
  1828.    @Integer @iSpaceRequired = 0
  1829.    @Integer @iSpaceAvailable = 0
  1830. //   @QString @qCheckFreeSpaceBitmap = "bang"
  1831.    @QString @qCheckFreeSpaceBitmap = ""
  1832. //   @Integer @iCheckFreeSpaceBitmapID = 7004  //bang
  1833.    @Integer @iCheckFreeSpaceBitmapID = 0
  1834.  
  1835.    //Variables for Rebuild.dat
  1836.    @QString @qRebuildDialogBitmap = @qDialogBmp
  1837.    @Integer @iRebuildDialogBitmapID = @iDialogBmpID
  1838.    @Integer @iRebuildRBSelected = 1
  1839.    @Integer @RebuildDesktopMode = @False
  1840.    @Integer @RebuildIfNewerMode = @False
  1841.    @Integer @RebuildAllMode = @False
  1842.    @Integer @RebuildOnlyMode = @False
  1843.  
  1844.    @QString @qConfirmPathsBitmap = @qDialogBmp
  1845.    @Integer @iConfirmPathsBitmapID = @iDialogBmpID
  1846.  
  1847.  
  1848.    // External Install variables
  1849.    @Integer @iGroupAExternalInstall = @False
  1850.    @Integer @iGroupBExternalInstall = @False
  1851.    @Integer @iGroupCExternalInstall = @False
  1852.    @Integer @iGroupDExternalInstall = @False
  1853.    @Integer @iGroupEExternalInstall = @False
  1854.    @Integer @iGroupFExternalInstall = @False
  1855.    @Integer @iGroupGExternalInstall = @False
  1856.    @Integer @iGroupHExternalInstall = @False
  1857.    @Integer @iGroupIExternalInstall = @False
  1858.    @Integer @iGroupJExternalInstall = @False
  1859.    @Integer @iGroupKExternalInstall = @False
  1860.    @Integer @iGroupLExternalInstall = @False
  1861.    @Integer @iGroupMExternalInstall = @False
  1862.    @Integer @iGroupNExternalInstall = @False
  1863.    @Integer @iGroupOExternalInstall = @False
  1864.    @Integer @iGroupPExternalInstall = @False
  1865.    @Integer @iGroupQExternalInstall = @False
  1866.    @Integer @iGroupRExternalInstall = @False
  1867.    @Integer @iGroupSExternalInstall = @False
  1868.    @Integer @iGroupTExternalInstall = @False
  1869.    @Integer @iGroupUExternalInstall = @False
  1870.    @Integer @iGroupVExternalInstall = @False
  1871.    @Integer @iGroupWExternalInstall = @False
  1872.    @Integer @iGroupXExternalInstall = @False
  1873.    @Integer @iGroupYExternalInstall = @False
  1874.    @Integer @iGroupZExternalInstall = @False
  1875.  
  1876.    @QString @qGroupAExternalInstall = ""
  1877.    @QString @qGroupBExternalInstall = ""
  1878.    @QString @qGroupCExternalInstall = ""
  1879.    @QString @qGroupDExternalInstall = ""
  1880.    @QString @qGroupEExternalInstall = ""
  1881.    @QString @qGroupFExternalInstall = ""
  1882.    @QString @qGroupGExternalInstall = ""
  1883.    @QString @qGroupHExternalInstall = ""
  1884.    @QString @qGroupIExternalInstall = ""
  1885.    @QString @qGroupJExternalInstall = ""
  1886.    @QString @qGroupKExternalInstall = ""
  1887.    @QString @qGroupLExternalInstall = ""
  1888.    @QString @qGroupMExternalInstall = ""
  1889.    @QString @qGroupNExternalInstall = ""
  1890.    @QString @qGroupOExternalInstall = ""
  1891.    @QString @qGroupPExternalInstall = ""
  1892.    @QString @qGroupQExternalInstall = ""
  1893.    @QString @qGroupRExternalInstall = ""
  1894.    @QString @qGroupSExternalInstall = ""
  1895.    @QString @qGroupTExternalInstall = ""
  1896.    @QString @qGroupUExternalInstall = ""
  1897.    @QString @qGroupVExternalInstall = ""
  1898.    @QString @qGroupWExternalInstall = ""
  1899.    @QString @qGroupXExternalInstall = ""
  1900.    @QString @qGroupYExternalInstall = ""
  1901.    @QString @qGroupZExternalInstall = ""
  1902.  
  1903.    @Integer @iOption1ExternalInstall = @False
  1904.    @Integer @iOption2ExternalInstall = @True
  1905.    @Integer @iOption3ExternalInstall = @False
  1906.    @Integer @iOption4ExternalInstall = @True
  1907.    @Integer @iOption5ExternalInstall = @False
  1908.    @Integer @iOption6ExternalInstall = @False
  1909.    @Integer @iOption7ExternalInstall = @False
  1910.    @Integer @iOption8ExternalInstall = @False
  1911.    @Integer @iOption9ExternalInstall = @False
  1912.    @Integer @iOption10ExternalInstall = @False
  1913.  
  1914.    @QString @AgroupRspFileName = "Agroup.rsp"
  1915.    @QString @BgroupRspFileName = "Bgroup.rsp"
  1916.    @QString @CgroupRspFileName = "Cgroup.rsp"
  1917.    @QString @DgroupRspFileName = "Dgroup.rsp"
  1918.    @QString @EgroupRspFileName = "Egroup.rsp"
  1919.    @QString @FgroupRspFileName = "Fgroup.rsp"
  1920.    @QString @GgroupRspFileName = "Ggroup.rsp"
  1921.    @QString @HgroupRspFileName = "Hgroup.rsp"
  1922.    @QString @IgroupRspFileName = "Igroup.rsp"
  1923.    @QString @JgroupRspFileName = "Jgroup.rsp"
  1924.    @QString @KgroupRspFileName = "Kgroup.rsp"
  1925.    @QString @LgroupRspFileName = "Lgroup.rsp"
  1926.    @QString @MgroupRspFileName = "Mgroup.rsp"
  1927.    @QString @NgroupRspFileName = "Ngroup.rsp"
  1928.    @QString @OgroupRspFileName = "Ogroup.rsp"
  1929.    @QString @PgroupRspFileName = "Pgroup.rsp"
  1930.    @QString @QgroupRspFileName = "Qgroup.rsp"
  1931.    @QString @RgroupRspFileName = "Rgroup.rsp"
  1932.    @QString @SgroupRspFileName = "Sgroup.rsp"
  1933.    @QString @TgroupRspFileName = "Tgroup.rsp"
  1934.    @QString @UgroupRspFileName = "Ugroup.rsp"
  1935.    @QString @VgroupRspFileName = "Vgroup.rsp"
  1936.    @QString @WgroupRspFileName = "Wgroup.rsp"
  1937.    @QString @XgroupRspFileName = "Xgroup.rsp"
  1938.    @QString @YgroupRspFileName = "Ygroup.rsp"
  1939.    @QString @ZgroupRspFileName = "Zgroup.rsp"
  1940.    @QString @qRspFileWriteError = "Error writing to the response file"
  1941.  
  1942.    @QString @Option1RspFileName = "Option1.rsp"
  1943.    @QString @Option2RspFileName = "Option2.rsp"
  1944.    @QString @Option3RspFileName = "Option3.rsp"
  1945.    @QString @Option4RspFileName = "Option4.rsp"
  1946.    @QString @Option5RspFileName = "Option5.rsp"
  1947.    @QString @Option6RspFileName = "Option6.rsp"
  1948.    @QString @Option7RspFileName = "Option7.rsp"
  1949.    @QString @Option8RspFileName = "Option8.rsp"
  1950.    @QString @Option9RspFileName = "Option9.rsp"
  1951.    @QString @Option10RspFileName = "Option10.rsp"
  1952.  
  1953.    // Information about install drives
  1954.    @QString @qDrive1Drive = ""
  1955.    @QString @qDrive2Drive = ""
  1956.    @QString @qDrive3Drive = ""
  1957.    @QString @qDrive4Drive = ""
  1958.    @QString @qDrive5Drive = ""
  1959.    @QString @qDrive6Drive = ""
  1960.    @QString @qDrive7Drive = ""
  1961.    @QString @qDrive8Drive = ""
  1962.    @QString @qDrive9Drive = ""
  1963.    @QString @qDrive10Drive = ""
  1964.  
  1965.    @Integer @iDrive1SpaceReq = 0
  1966.    @Integer @iDrive2SpaceReq = 0
  1967.    @Integer @iDrive3SpaceReq = 0
  1968.    @Integer @iDrive4SpaceReq = 0
  1969.    @Integer @iDrive5SpaceReq = 0
  1970.    @Integer @iDrive6SpaceReq = 0
  1971.    @Integer @iDrive7SpaceReq = 0
  1972.    @Integer @iDrive8SpaceReq = 0
  1973.    @Integer @iDrive9SpaceReq = 0
  1974.    @Integer @iDrive10SpaceReq = 0
  1975.  
  1976.    // Options to Features mapping
  1977.    @QString @qOption1Groups = ""
  1978.    @QString @qOption2Groups = ""
  1979.    @QString @qOption3Groups = ""
  1980.    @QString @qOption4Groups = ""
  1981.    @QString @qOption5Groups = ""
  1982.    @QString @qOption6Groups = ""
  1983.    @QString @qOption7Groups = ""
  1984.    @QString @qOption8Groups = ""
  1985.    @QString @qOption9Groups = ""
  1986.    @QString @qOption10Groups = ""
  1987.  
  1988.    //Buffers for Group sizes and number of files
  1989.    @Integer @iGroupSizeA = 0
  1990.    @Integer @iGroupSizeB = 0
  1991.    @Integer @iGroupSizeC = 0
  1992.    @Integer @iGroupSizeD = 0
  1993.    @Integer @iGroupSizeE = 0
  1994.    @Integer @iGroupSizeF = 0
  1995.    @Integer @iGroupSizeG = 0
  1996.    @Integer @iGroupSizeH = 0
  1997.    @Integer @iGroupSizeI = 0
  1998.    @Integer @iGroupSizeJ = 0
  1999.    @Integer @iGroupSizeK = 0
  2000.    @Integer @iGroupSizeL = 0
  2001.    @Integer @iGroupSizeM = 0
  2002.    @Integer @iGroupSizeN = 0
  2003.    @Integer @iGroupSizeO = 0
  2004.    @Integer @iGroupSizeP = 0
  2005.    @Integer @iGroupSizeQ = 0
  2006.    @Integer @iGroupSizeR = 0
  2007.    @Integer @iGroupSizeS = 0
  2008.    @Integer @iGroupSizeT = 0
  2009.    @Integer @iGroupSizeU = 0
  2010.    @Integer @iGroupSizeV = 0
  2011.    @Integer @iGroupSizeW = 0
  2012.    @Integer @iGroupSizeX = 0
  2013.    @Integer @iGroupSizeY = 0
  2014.    @Integer @iGroupSizeZ = 0
  2015.  
  2016.    @Integer @iGroupFilesA = 0
  2017.    @Integer @iGroupFilesB = 0
  2018.    @Integer @iGroupFilesC = 0
  2019.    @Integer @iGroupFilesD = 0
  2020.    @Integer @iGroupFilesE = 0
  2021.    @Integer @iGroupFilesF = 0
  2022.    @Integer @iGroupFilesG = 0
  2023.    @Integer @iGroupFilesH = 0
  2024.    @Integer @iGroupFilesI = 0
  2025.    @Integer @iGroupFilesJ = 0
  2026.    @Integer @iGroupFilesK = 0
  2027.    @Integer @iGroupFilesL = 0
  2028.    @Integer @iGroupFilesM = 0
  2029.    @Integer @iGroupFilesN = 0
  2030.    @Integer @iGroupFilesO = 0
  2031.    @Integer @iGroupFilesP = 0
  2032.    @Integer @iGroupFilesQ = 0
  2033.    @Integer @iGroupFilesR = 0
  2034.    @Integer @iGroupFilesS = 0
  2035.    @Integer @iGroupFilesT = 0
  2036.    @Integer @iGroupFilesU = 0
  2037.    @Integer @iGroupFilesV = 0
  2038.    @Integer @iGroupFilesW = 0
  2039.    @Integer @iGroupFilesX = 0
  2040.    @Integer @iGroupFilesY = 0
  2041.    @Integer @iGroupFilesZ = 0
  2042.  
  2043.    @Integer @iNoGroupsSet = @True
  2044.    @Integer @iTotalSize = 0
  2045.    @Integer @iTotalFiles = 0
  2046.  
  2047.    //Magic variables for disabling radio buttons
  2048.    @Integer @iRB1Disabled = 0
  2049.    @Integer @iRB2Disabled = 0
  2050.    @Integer @iRB3Disabled = 0
  2051.    @Integer @iRB4Disabled = 0
  2052.    @Integer @iRB5Disabled = 0
  2053.    @Integer @iRB6Disabled = 0
  2054.  
  2055.  
  2056.    //Temporary variables
  2057.    @Integer @TempInt = 0
  2058.    @Integer @TempInt2 = 0
  2059.    @QString @Line = ""
  2060.  
  2061.    //variables for AUTORUN
  2062.    @QString @qTeamEnvyFile = "TeamEnvy._t_"
  2063.    @QString @qAutorunHelpFile = "BrwsHelp._t_"
  2064.    @QString @qAutorunName = "VisualAge CD Autoplay"
  2065.    @QString @qAutorunText1 = "Click on any button to execute that function."
  2066.    @QString @qAutorunText2 = " "
  2067.    @QString @qAutorunPreview = "@qMnemonic@!Preview"
  2068.    @QString @qAutorunExplore = "@qMnemonic@!Explore CD"
  2069.    @QString @qAutorunReadme = "@qMnemonic@!View Readme"
  2070.    @QString @qAutorunInstall = "@qMnemonic@!Install Product"
  2071.    @QString @qAutorunServer = "Install Product - @qMnemonic@!Server"
  2072.    @QString @qAutorunBrowseHelp = "@qMnemonic@!Browse Help"
  2073.    @QString @qAutorunExit = "E@qMnemonic@!xit"
  2074. @EndVars
  2075. @DefineVars
  2076.    @QString @lQuestion    = "Question"
  2077.    @QString @lMessage     = "Message"
  2078.  
  2079.  
  2080.    @QString @qErrorText1   = "ERROR_EXIT: " // debug display of error exits
  2081.    @QString @qCancelText1  = "Do you really want to CANCEL the current installation ? "
  2082.    @QString @qCancelText2  = "User Cancelled"
  2083.    @QString @qCancelTitle  = "Confirm Cancel"
  2084.    @QString @qDisplayHelpError = "Sorry, no help file: "
  2085.    @QString @qErrorInvalidReturn = "DEBUG INTERNAL: Invalid Main/Function return value"
  2086.  
  2087.  
  2088.    //Dialog button strings
  2089.    @QString @qNext    = "@qMnemonic@!Next >"
  2090.    @QString @qBack    = "< @qMnemonic@!Back"
  2091.    @QString @qCancel  = "@qMnemonic@!Cancel"
  2092.    @QString @qInstall = "@qMnemonic@!Install >"
  2093.    @QString @qOK      = "@qMnemonic@!OK"
  2094.    @QString @qHelp    = "@qMnemonic@!Help"
  2095.    @QString @qYes     = "@qMnemonic@!Yes"
  2096.    @QString @qNo      = "@qMnemonic@!No"
  2097.    @QString @qPreview = "@qMnemonic@!Preview"
  2098.    @QString @qAbort   = "Abort"
  2099.    @QString @qReenter = "@qMnemonic@!Re-enter"
  2100.    @QString @AnotherDrive = "Another Drive"
  2101.    @QString @qPreReqs = "Pre@qMnemonic@!Reqs"
  2102.    @QString @qExit    = "Exit"
  2103.    @QString @qPrev    = "@qMnemonic@!Prev"
  2104.    @QString @qMessage = "Message"
  2105.    @QString @qFinish  = "@qMnemonic@!Finish"
  2106.    @QString @qUninstall = "@qMnemonic@!Uninstall"
  2107.    @QString @qAccept = "@qMnemonic@!Accept"
  2108.    @QString @qDoNotAccept = "Do @qMnemonic@!Not Accept"
  2109.    @QString @qRebuild = "@qMnemonic@!Rebuild"
  2110.  
  2111.  
  2112.    @QString @qWarningTitle = "WARNING!"
  2113.    @QString @qCheckPrereqsError = "System prerequisite not met. "
  2114.    @QString @qContinueORNot = "Would you like to continue?"
  2115.    @QString @qCheckSysReqsCPU1 = "Required CPU:"
  2116.    @QString @qCheckSysReqsCPU2 = "CPU on target system:"
  2117.    @QString @qCheckSysReqsRAM1 = "Required RAM (in MegaBytes):"
  2118.    @QString @qCheckSysReqsRAM2 = "RAM on target system (in MegaBytes):"
  2119.    @QString @qCheckSysReqsRes1 = "Required screen resolution:"
  2120.    @QString @qCheckSysReqsRes2 = "Screen resolution on target system:"
  2121.    @QString @qCheckSysReqsColours1 = "Required number of colours:"
  2122.    @QString @qCheckSysReqsColours2 = "Number of colours on target system:"
  2123.    @QString @qPrereqOSWin95 = "Required platform is Windows95."
  2124.    @QString @qPrereqOSWin95NTv35 = "Required platform is Windows95 or Windows NT version 3.5."
  2125.    @QString @qPrereqOSWin95NTv40 = "Required platform is Windows95 or Windows NT version 4.0."
  2126.    @QString @qPrereqOSNTv35 = "Required platform is Windows NT version 3.5."
  2127.    @QString @qPrereqOSNTv40 = "Required platform is Windows NT version 4.0."
  2128.    @QString @qPrereqOSOS2v3 = "Required platform is OS/2 Warp version 3.0."
  2129.    @QString @qPrereqOSOS2v4 = "Required platform is OS/2 Warp version 4.0."
  2130.    @QString @qPrereqOSError = "Platform cannot be determined."
  2131.    @QString @qDOSTargetPlatform = "The platform on the target system is DOS version @OSMajor.@OSMinor. "
  2132.    @QString @qOS2TargetPlatform = "The platform on the target system is OS2 version @Eval(@OSMajor/10).0. "
  2133.    @QString @qWinNTTargetPlatform = "The platform on the target system is Windows NT version @WinMajor.@WinMinor. "
  2134.    @QString @qWin95TargetPlatform = "The platform on the target system is Windows 95"
  2135.    @QString @qWindowsTargetPlatform = "The platform on the target system is Windows version @WinMajor.@WinMinor. "
  2136.  
  2137.    //Text messages - DisplayWelcome function
  2138.    @QString @qWelcomeTitle = "@qProductName Installation"
  2139.    @QString @qWelcomeText1 = "Welcome to the installation of @qProductName."
  2140. //   @QString @qWelcomeText2 = "Before installing this product, you should exit this program, close all running applications on your computer, and run CHKDSK or SCANDISK to ensure your hard disk integrity."
  2141.    @QString @qWelcomeText2 = "Before installing this product, you should close all running applications on your computer."
  2142.    @QString @qWelcomeText3 = "For a preview of the product feature list, press 'Preview'.  To view the hardware and software pre-requisites of @qProductName, press 'PreReqs'."
  2143.    @QString @qWelcomeText4 = "To continue the installation, press 'Next'."
  2144.    @QString @qWelcomeText5 = ""
  2145.    @QString @qWelcomeText6 = ""
  2146.    @QString @qWelcomeError1 = "DEBUG INTERNAL: Welcome: Unexpected return value from Dialog6s"
  2147.  
  2148.    @QString @qWelcomeUpgrade1EntryToPro ="Install has detected that @qProductName Entry Edition has been installed on your system. You are currently installing @qProductName Professional Edition."
  2149.    @QString @qWelcomeUpgrade3EntryToPro = "To upgrade your installation from Entry to Professional Edition, press Next." 
  2150.    @QString @qWelcomeUpgrade1EntryToEnterp = "Install has detected that @qProductName Entry Edition has been installed on your system. You are currently installing @qProductName Enterprise Edition."
  2151.    @QString @qWelcomeUpgrade3EntryToEnterp = "To upgrade your installation from Entry to Enterprise Edition, press Next." 
  2152.    @QString @qWelcomeUpgrade1ProToEnterp = "Install has detected that @qProductName Professional Edition has been installed on your system. You are currently installing @qProductName Enterprise Edition."
  2153.    @QString @qWelcomeUpgrade3ProToEnterp = "To upgrade your installation from Professional to Enterprise Edition, press Next." 
  2154.  
  2155.    @QString @qWelcomeUpgradeText1 = "@qWelcomeUpgrade1EntryToPro"
  2156.    @QString @qWelcomeUpgradeText3 = "@qWelcomeUpgrade3EntryToPro"
  2157.  
  2158.    //Text messages - DisplayCopyright function
  2159.    @QString @qCopyrightTitle = "@qProductName Copyright Notices"
  2160.    @QString @qCopyrightError1 = "DEBUG INTERNAL: Copyright: Unexpected return value from Dialog6s"
  2161.  
  2162.    //Text message - DisplayLicense function
  2163.    @QString @qLicenseTitle = "License Agreement"
  2164.    @QString @qLicenseAgreement = "The license agreement should go here."
  2165.    @QString @qLicenseDialogError = "DisplayLicense() - Unknown dialog result"
  2166.    @QString @qLicenseText1 = "Please read the following evaluation license.  ONCE YOU HAVE READ THE EVALUATION LICENSE:"
  2167.  
  2168.    @QString @qLicenseText2 = "IF YOU ACCEPT THESE TERMS AND CONDITIONS then push 'ACCEPT' to continue the installation."
  2169.    @QString @qLicenseText3 = "IF YOU DO NOT ACCEPT THESE TERMS AND CONDITIONS then push 'DO NOT ACCEPT' and the installation will exit."
  2170.  
  2171.    //Text messages - AskReboot function
  2172.    @QString @qAskRebootTitle = "Setup Complete"
  2173.  
  2174.    @QString @qAskRebootStringText1 = "You must reboot the computer to use the product.\n
  2175. Click Finish to complete the installation"
  2176.    @QString @qAskRebootStringText2 = ""
  2177.    @QString @qAskRebootStringText3 = ""
  2178.    @QString @qAskRebootRadioButton1Text = "Yes, I want to reboot my computer now"
  2179.    @QString @qAskRebootRadioButton2Text = "No, I will reboot my computer later"
  2180.    @QString @qAskRebootHelp1 = "Your system will be rebooted for you when install is finished."
  2181.    @QString @qAskRebootHelp2 = "You must manually reboot your system."
  2182.    @QString @qAskRebootPushButton1Text = @qFinish
  2183.  
  2184.    @QString @qAskRebootErrorMsg1 = "DEBUG INTERNAL: AskReboot: Invalid Radio Button"
  2185.    @QString @qAskRebootErrorMsg2 = "DEBUG INTERNAL: AskReboot: Invalid Push Button"
  2186.    @QString @qAskRebootErrorMsg3 = "DEBUG INTERNAL: AskReboot: Invalid iAskRebootRBResult"
  2187.  
  2188.    //Text messages - DoResponse function
  2189.    @QString @qDoResponseError1 = "DoResponse() - Filename required"
  2190.    @QString @qDoResponseError2 = "StringResponse() - Illegal call"
  2191.    @QString @qDoResponseError3 = "IntegerResponse() - Negative integer result"
  2192.    @QString @qDoResponseError4 = "DoResponse() - File not found: "
  2193.  
  2194.    //Text messages - GetInstallDrive function
  2195. //   @QString @qGetInstDrText = "Select the drive to install onto"
  2196. //   @QString @qGetInstDrPrompt = "Select the Install Drive"
  2197.    @QString @qGetInstDirError1 = " is invalid.  Please enter the full path where the product is to be installed.
  2198. Ex:  @OutDrive:\\@Subdir"
  2199.    @QString @qGetInstDirError1Title = "Error: Invalid path"
  2200.    @QString @qGetInstDirError2 = ": is an invalid drive.  The product cannot be installed on a removeable, non-existent, or unmounted network drive."
  2201.    @QString @qGetInstDirError2Title = "Error: Invalid drive"
  2202.    @QString @qGetInstDirError3 = ":\\ is invalid.  The product cannot be installed to the root directory."
  2203.    @QString @qGetInstDirError3Title = "Error: Root directory"
  2204.    @QString @qGetInstDirError4 = " is invalid.  The character ':' is not allowed in path names."
  2205.    @QString @qGetInstDirError4Title = "Error: Bad character"
  2206.    @QString @qGetInstDirError5Title = "Error: Invalid drive"
  2207.    @QString @qGetInstDirError5 = ": does not support long file names. This product must be installed on a file system which supports long file names."
  2208.    @QString @qGetInstDirError6Title = "Error: Long path"
  2209.    @QString @qGetInstDirError6 = "@qCRLF The install path must contain fewer than 28 characters."
  2210.  
  2211.    @QString @qGetInstDirErrorLogo = "bang"
  2212.    @QString @qGetInstDirCIDError = "The response file contains an invalid path entry."
  2213.    @QString @qGetInstDirSelectAnotherDrive = "Select another drive?"
  2214.    @QString @qGetInstDirDialogResultError = "Unknown dialog result"
  2215.  
  2216.    @QString @qCheckPathResultError = "Unknown CheckPath() result."
  2217.  
  2218.    //Text messages - GetInstallDir function
  2219.    @QString @qGetInstDirTitle = "Select the install directory"
  2220.    @QString @qGetInstDirHeader = "Please enter the full path of the install directories for the product."
  2221.    @QString @qGetInstDirDriveBox = ""
  2222.    @QString @qGetInstDirFreespace = "MB"
  2223.    @QString @qGetInstDirDriveList = ""
  2224.  
  2225.  
  2226.    //Text messages - CustomSelect function
  2227.    @QString @qCustomTitle = "Custom Feature Selection"
  2228.    @QString @qCustomText1 = "Please select the Custom Features to be installed"
  2229.    @QString @qCustomText2 = "Custom Text 2"
  2230.  
  2231.    @QString @qCustomError1 = "DEBUG INTERNAL: CustomSelect: Unexpected return value from Dialog12c"
  2232.    @QString @qCustomError2 = "DEBUG INTERNAL: CustomSelect: iDialogRes changing values"
  2233.    @QString @qCustomError3 = "DEBUG INTERNAL: CustomSelect: Illegal value for iCustomSelect"
  2234.    @QString @qCustomError4 = "DEBUG INTERNAL: CustomSelect: Illegal value for RadioButton Event"
  2235.  
  2236.  
  2237.    @QString @qInstallTypeTitle = "Install Type Selection"
  2238.    @QString @qInstallTypeText1 = "Please select the install type:"
  2239.  
  2240.    @QString @qInstallTypeError1 = "DEBUG INTERNAL: InstallType: Unexpected return value from Dialog3r"
  2241.    @QString @qInstallTypeError2 = "DEBUG INTERNAL: InstallType: iDialogRes changing values"
  2242.    @QString @qInstallTypeError3 = "DEBUG INTERNAL: InstallType: Illegal value for iInstallType"
  2243.    @QString @qInstallTypeError4 = "DEBUG INTERNAL: InstallType: Illegal value for RadioButton Event"
  2244.    @QString @qInstallTypeReqKB = "Total KB required: "
  2245.  
  2246.    //Text messages - GetInstallOptions function
  2247. //   @QString @qGetInstOpText = "Please select the options you would like installed"
  2248.  
  2249.    //Text messages - ConfirmInstall function
  2250.    @QString @qConfirmTitle  = "Confirm Installation"
  2251.    @QString @qConfirmText1  = "You are about to install.  Press Install to continue."
  2252.    @QString @qConfirmText2  = ""
  2253.    @QString @qConfirmText3  = "Install Type:"
  2254.    @QString @qConfirmText4  = "Install Directory:"
  2255.    @QString @qConfirmText5  = ""
  2256.    @QString @qConfirmText6  = ""
  2257.    @QString @qConfirmError1 = "DEBUG INTERNAL: Confirm: invalid dialog return code"
  2258.    @QString @qConfirmPaths    = "Install Paths:"
  2259.    @QString @qConfirmSpace    = "Space Required:"
  2260.    @QString @qConfirmType     = "Install Type:"
  2261.    @QString @qConfirmFeatures = "Selected Features:"
  2262.  
  2263.    @QString @qConfirmUpdateText1 = "You are about to update the files.  Press Install to continue."
  2264.  
  2265.    //Text messages - DisplayReadme function
  2266. //   @QString @qDisReadmeTitle = "Display readme"
  2267. //   @QString @qDisReadmeText  = "Do you want to view the readme file now?"
  2268. //
  2269.  
  2270.    //Text messages = DisplayGoodbye function
  2271. //   @QString @qDisGbyeSuccess = "@qProductName has been sucessfully installed to "
  2272. //   @QString @qDisGbyeTitle   = "Goodbye"
  2273.  
  2274.    //Text messages - icon reading
  2275.    @QString @qIconErrorDuplicateTitle       = "GetNextIconItem: Duplicate keyword '@lTitle' found in install.ini file"
  2276.    @QString @qIconErrorDuplicateFolder      = "GetNextIconItem: Duplicate keyword '@lFolder' found in install.ini file"
  2277.    @QString @qIconErrorDuplicateType        = "GetNextIconItem: Duplicate keyword '@lType' found in install.ini file"
  2278.    @QString @qIconErrorDuplicateExePath     = "GetNextIconItem: Duplicate keyword '@lExePath' found in install.ini file"
  2279.    @QString @qIconErrorDuplicateIconPath    = "GetNextIconItem: Duplicate keyword '@lIconPath' found in install.ini file"
  2280.    @QString @qIconErrorDuplicateIconNumber  = "GetNextIconItem: Duplicate keyword '@lIconNumber' found in install.ini file"
  2281.    @QString @qIconErrorDuplicateParameters  = "GetNextIconItem: Duplicate keyword '@lParameters' found in install.ini file"
  2282.    @QString @qIconErrorDuplicateWorkingDir  = "GetNextIconItem: Duplicate keyword '@lWorkingDir' found in install.ini file"
  2283.    @QString @qIconErrorDuplicateOS2ObjectID = "GetNextIconItem: Duplicate keyword '@lOS2ObjectID' found in install.ini file"
  2284.    @QString @qIconErrorDuplicateOS2ProgType = "GetNextIconItem: Duplicate keyword '@lOS2ProgType' found in install.ini file"
  2285.    @QString @qIconErrorDuplicateOption1     = "GetNextIconItem: Duplicate keyword '@lOption1'found in install.ini file"
  2286.    @QString @qIconErrorDuplicateOption2     = "GetNextIconItem: Duplicate keyword '@lOption2' found in install.ini file"
  2287.    @QString @qIconErrorDuplicateFeature     = "GetNextIconItem: Duplicate keyword '@lFeature' found in install.ini file"
  2288.    @QString @qIconErrorUnknownKeyword       = "GetNextIconItem: unknown keyword found in install.ini file"
  2289.    @QString @qIconErrorIncompleteItem       = "GetNextIconItem: incomplete icon item found in install.ini file"
  2290.    @QString @qIconErrorFileNotExist         = "DoIcon: file does not exist"
  2291.  
  2292.    //Text messages - envvar reading
  2293.    @QString @qEnvVarsErrorDuplicateName     = "GetNextEnvVarsItem: Duplicate keyword '@lName' found in install.ini file"
  2294.    @QString @qEnvVarsErrorDuplicateValue    = "GetNextEnvVarsItem: Duplicate keyword '@lValue'found in install.ini file"
  2295.    @QString @qEnvVarsErrorDuplicateMethod   = "GetNextEnvVarsItem: Duplicate keyword '@lMethod' found in install.ini file"
  2296.    @QString @qEnvVarsErrorDuplicateOldValue = "GetNextEnvVarsItem: Duplicate keyword '@lOldValue' found in install.ini file"
  2297.    @QString @qEnvVarsErrorDuplicateFeature = "GetNextEnvVarsItem: Duplicate keyword '@lFeature' found in install.ini file"
  2298.    @QString @qEnvVarsErrorUnknownKeyword    = "GetNextEnvVarsItem: unknown keyword found in install.ini file"
  2299.    @QString @qEnvVarsErrorIncompleteItem    = "GetNextEnvVarsItem: incomplete environment variable item found in install.ini file"
  2300.    @QString @qEnvVarsErrorFileNotExist      = "DoEnvVars: file does not exist"
  2301.  
  2302.  
  2303.    //Text messages - prodvar reading
  2304.    @QString @qProdVarsErrorDuplicateName     = "GetNextProdVarsItem: Duplicate keyword '@lName' found in install.ini file"
  2305.    @QString @qProdVarsErrorDuplicateValue    = "GetNextProdVarsItem: Duplicate keyword '@lValue'found in install.ini file"
  2306.    @QString @qProdVarsErrorDuplicateComponent = "GetNextProdVarsItem: Duplicate keyword '@lComponent' found in install.ini file"
  2307.    @QString @qProdVarsErrorDuplicateMethod   = "GetNextProdVarsItem: Duplicate keyword '@lMethod' found in install.ini file"
  2308.    @QString @qProdVarsErrorDuplicateOldValue = "GetNextProdVarsItem: Duplicate keyword '@lOldValue' found in install.ini file"
  2309.    @QString @qProdVarsErrorDuplicateFeature  = "GetNextProdVarsItem: Duplicate keyword '@lFeature' found in install.ini file"
  2310.    @QString @qProdVarsErrorUnknownKeyword     = "GetNextProdVarsItem: unknown keyword found in install.ini file"
  2311.    @QString @qProdVarsErrorIncompleteItem    = "GetNextProdVarsItem: incomplete environment variable item found in install.ini file"
  2312.    @QString @qProdVarsErrorFileNotExist      = "DoProdVars: file does not exist"
  2313.  
  2314.    //Text messages - utils
  2315.    @QString @qCueSectionErrorFileNotExist   = "CueSection: file does not exist"
  2316.    @QString @qCueSectionErrorSectionNull    = "CueSection: @@Section parameter is NULL"
  2317.  
  2318.    //Text messages - Ask
  2319.    @QString @qAskErrorShouldNotBeCalled     = "Ask: This function should not be called during a CID install"
  2320.    @QString @qAskErrorPushButtonNotSpecified= "Ask: Only one pushbutton label specified"
  2321.  
  2322.    //Text messages - Install.sys functions
  2323.    @QString @qInstallSysErrorWrite1 = "CreateInstallSys: cannot write to Install.sys"
  2324.    @QString @qInstallSysErrorWrite2 = "WritelnInstallSys: cannot write to Install.sys"
  2325.    @QString @qInstallSysErrorWrite3 = "AddSectionInstallSys: cannot write to Install.sys"
  2326.    @QString @qInstallSysErrorWrite4 = "AddNewline: cannot write to Install.sys"
  2327.  
  2328.    //Text messages - Readinfo
  2329.    @QString @qReadInfoErrorBadFilename = "ReadInfo: Internal Error: ReadInfo() cannot currently be used to read from this file.  Please modify ReadInfo for your purposes."
  2330.  
  2331.    //Text message - ReadConditional
  2332.    @QString @qErrorReadConditionalCondlNotExpected = "ReadConditional: Conditional expression found within a conditional block."
  2333.    @QString @qErrorReadConditionalEndCondlNotExpected = "ReadConditional: #Endif found outside of a conditional block."
  2334.  
  2335.    @QString @qInvalidOSError = "Invalid operating system. Please check system prerequisites."
  2336.    @QString @qInvalidDesktopItemType = "Invalid DeskTopItem Type"
  2337.    @QString @qInvalidInstallPath = "Invalid InstallPath"
  2338.    @QString @qCommandTypeError = "Cannot find System Command Processor."
  2339.  
  2340.    @QString @qRegCreateProdKeyError = "Cannot create the @qProductName product key in the Windows registry."
  2341.    @QString @qRegSetProdValueError = "Cannot create the product information value in the Windows registry."
  2342.    @QString @qRegWriteProdInfoError = "Cannot write product information data to the Windows registry."
  2343.    @QString @qRegCloseProdKeyError = "Cannot close the product key in the Windows registry."
  2344.    @QString @qRegCreateUninstallKeyError = "Cannot create the uninstall key in the Windows registry."
  2345.    @QString @qRegSetDisplayNameError = "Cannot create the DisplayName value in the Windows registry."
  2346.    @QString @qRegSetUninstallStringError = "Cannot create the UninstallString value in the Windows registry."
  2347.    @QString @qRegWriteUninstallInfoError = "Cannot write uninstall data to the Windows registry."
  2348.    @QString @qRegCloseUninstallKeyError = "Cannot close the uninstall key in the Windows registry."
  2349.  
  2350.  
  2351.    @QString @qSetEnvMessage = ""
  2352.    @QString @qSetEnvTypeHelpText = ""
  2353.    @QString @qSetEnvRBText2 = ""
  2354.    @QString @qSetEnvRBText3 = ""
  2355.    @QString @qSetEnvText = "Set environment variables"
  2356. //   @QString @qSetEnvTypeHelp3 = "Set environment variables for all users"
  2357.    @QString @qSetEnvTypeHelp3 = ""
  2358. //   @QString @qSetEnvTypeHelp2a = "Set environment variables for current user only"
  2359.    @QString @qSetEnvTypeHelp2a = ""
  2360. //   @QString @qSetEnvTypeHelp2  = "Set environment variables."
  2361.    @QString @qSetEnvTypeHelp2  = ""
  2362. //   @QString @qSetEnvTypeHelp1 = "Do not set any environment variables"
  2363.    @QString @qSetEnvTypeHelp1 = ""
  2364.    @QString @qSetForAllUsersText = "Set for all users"
  2365.    @QString @qSetForCurrentUserText = "Set only for current user"
  2366.    @QString @qBypassRBText = "Bypass"
  2367.  
  2368.    @QString @qSetBypassMessageNT = "You may set environment variables in the Windows NT registry or bypass this step."
  2369.    @QString @qSetBypassMessageWin95 = "You may set environment variables in Autoexec.bat or bypass this step."
  2370.    @QString @qSetBypassMessageOS2 = "You may set environment variables in Config.sys or bypass this step."
  2371.    @QString @qSetEnvBackupMessage = "Your configuration files will be backed up."
  2372.    @QString @qSetEnvBatMessage = "Even if you bypass this step, you can always run the 'SetEnv.bat' program to set environment variables for a C command line window."
  2373.    @QString @qSetEnvTitle = "Setup Environment Variables"
  2374.  
  2375.    @QString @qRegSetValueError = "Error Setting the Environment Variable value."
  2376.    @QString @qSetForAllUsersORNot = "Would you like to set the Environment variables for all users?"
  2377.    @QString @qSetEnvTypeError1 = "DEBUG INTERNAL: SetEnvironment: Illegal value for RadioButton Event"
  2378.    @QString @qRegOpenProdKeyError = "Cannot open the product key in the windows registry."
  2379.    @QString @qRegOpenEnvVarKeyError = "Cannot open the environment key in the Windows registry."
  2380.  
  2381.    @QString @qSetEnvVarMaxLengthWarning = " has exceeded the maximum length of @iSetEnvVarMaxLength characters.  You will have to fix this manually in "
  2382.  
  2383.    //Uninstall variables
  2384.    @QString @qUninstallTitle = "Uninstall"
  2385.    @QString @qUninstallText1 = "Press Uninstall to uninstall @qProductName."
  2386.    @QString @qUninstallText2 = "Uninstalling this product will delete everything from the product directory so it is recommended that you save anything you wish to keep that currently resides in this directory to a different directory."
  2387.    @QString @qUninstallText3 = "@qProductName has been successfully uninstalled."
  2388.    @QString @qUninstallOS2IDError = "UNINSTAL.DAT: Cannot get Product folder ID."
  2389.  
  2390.    @QString @qRemoveDirText1 = "Uninstall will now remove the directory"
  2391.    @QString @qRemoveDirText2 = "Everything from this directory will be removed."
  2392.    @QString @qRemoveDirText3 = "Would you like to remove this directory?"
  2393.  
  2394.  
  2395.    @QString @qAutoexecBatBackupMade = "@qAutoexecBatFile has been backed-up as "
  2396.    @QString @qConfigSysBackupMade = "@qConfigSysFile has been backed-up as "
  2397.  
  2398.    //Registry messages
  2399.    @QString @qRegDeleteProdVersionError = "Error deleting product version info in the Windows registry."
  2400.    @QString @qRegDeleteProdKeyError = "Error deleting product info key in the Windows registry."
  2401.    @QString @qRegDeleteProdSubKeyError = "Error deleting product info subkey in the Windows registry."
  2402.    @QString @qRegOpenCompanyKeyError = "Error opening company key in windows registry."
  2403.    @QString @qRegDeleteCompanyKeyError = "Error deleting company key in the Windows registry."
  2404.    @QString @qRegDeleteUninKeyError = "Error deleting product uninstall key in the Windows registry."
  2405.    @QString @qErrorProductNotInstalled =  "@qProductName has not been installed or cannot be found."
  2406.    @QString @qErrorAdminOnlyUninstall = "Only an Administrator may uninstall this product."
  2407.    @QString @qErrorInstallSysNotFound = "Cannot find the install information file:@qCRLF"
  2408.    @QString @qErrorInstallSysMustRemove = "If the directory listed is correct, you must select \"Remove product information\" from the previous screen, and then reinstall."
  2409.    @QString @qRegQueryValueError = "Error getting the value for"
  2410.  
  2411.    //odbc text messages
  2412.    @QString @qRegCreateODBCKeyError = "Error Creating the ODBC key in the Windows registry."
  2413.    @QString @qRegODBCKeyWriteError  = "Error Writing the ODBC key to the Windows registry."
  2414.    @QString @qRegODBCKeyCloseError  = "Error Closing the ODBC key in the Windows registry."
  2415.    @QString @qRegSetODBCValueError  = "Error Setting the ODBC value in the Windows registry."
  2416.  
  2417.    //Variables for SetPVars
  2418.    @QString @qRegCreateProdVarKeyError = "Error creating or opening the product variable key."
  2419.    @QString @qInvalidDataType = "Invalid data type specified for the product variable"
  2420.  
  2421. //   @QString @qDetInstDirText1 = "@qProductName has been detected on your system. You can either choose to enter the location of the product directory or remove @qProductName."
  2422. //   @QString @qDetInstDirText1 = "Either @qProductName has been detected on the system but the installation information is incomplete, or a command-line action has been specified and @qProductName has not been installed."
  2423.    @QString @qDetInstDirText1 = "Either @qProductName has NOT been installed on the system, or the installation information is incomplete."
  2424.    @QString @qDetInstDirText2 = ""
  2425.    @QString @qDetInstDirHelpText = ""
  2426.    @QString @qEnterInstDirRBText  = "Rebuild current installation"
  2427.    @QString @qRemoveProdRBText = "Remove product information and folder"
  2428.  
  2429.    @QString @qDetInstDirHelp1 = "Rebuild current installation. The environment and folder will be reset, and the product files will be recopied."
  2430.    @QString @qDetInstDirHelp2 = "Remove existing product information and folder.  The product files will not be deleted."
  2431.    @QString @qProdInfoRemovedTitle = "Product Information Removed"
  2432.  
  2433.    @QString @qProdInfoRemovedText = "@qProductName product information has been successfully removed."
  2434.  
  2435.    @QString @qGetProductDirTitle = "@qProductName"
  2436.  
  2437.    @QString @qGetProductDirText1 = "Please enter the product directory for @qProductName."
  2438.    @QString @qInstallActionsTitle = "@qProductName - Install Actions"
  2439.  
  2440.    @QString @qInstallActionsText1 = "Please select an option."
  2441.    @QString @qInstallActionsText2 = ""
  2442.    @QString @qInstallActionHelpText = ""
  2443.    @QString @qAddRBText = "Add features to your installation"
  2444.    @QString @qDeleteRBText = ""
  2445.    @QString @qUpdateRBText = "Update to a newer service level"
  2446.    @QString @qRebuildRBText = "Rebuild your installation"
  2447.    @QString @qUninstallRBText = "Uninstall the entire product"
  2448.  
  2449.    @QString @qInstallActionHelp1 = "Remove installed feature(s)."
  2450.    @QString @qInstallActionHelp2 = ""
  2451.    @QString @qInstallActionHelp3 = "Update product files."
  2452.    @QString @qInstallActionHelp4 = "Rebuild the product folder and environment, and reinstall the files."
  2453.    @QString @qInstallActionHelp5 = "Remove the product folder and environment, and delete the files."
  2454.  
  2455.    @QString @qErrorInvalidDriveNumber = "Invalid Number of Drives"
  2456.    @QString @qInsufficientSpaceText = ""
  2457.    @QString @qInsufficientSpaceText1 = "There is insufficient space available on drive"
  2458.    @QString @qInsufficientSpaceText2 = "Space Required:"
  2459.    @QString @qInsufficientSpaceText3 = "Space Available:"
  2460.  
  2461.    @QString @qRebuildDialogTitle = "@qProductName - Rebuild"
  2462.    @QString @qRebuildDialogText1 = "Please select a rebuild option."
  2463.    @QString @qRebuildDialogText2 = ""
  2464.    @QString @qRebuildDialogHelpText = ""
  2465.    @QString @qRebuildDesktopRBText = "Rebuild desktop folder and environment"
  2466.    @QString @qRebuildIfNewerRBText = "Partial product refresh: desktop and new files only"
  2467.    @QString @qRebuildAllRBText = "Complete product refresh"
  2468.    @QString @qRebuildDialogHelp1 = "Rebuild the desktop folder and environment."
  2469.    @QString @qRebuildDialogHelp2 = "Rebuild the desktop folder and environment, and reinstall all missing files, and files with a newer date."
  2470.    @QString @qRebuildDialogHelp3 = "Rebuild the desktop folder and environment, and reinstall all files."
  2471.    @QString @qErrorInvalidRebuildMode = "Invalid rebuild mode."
  2472.    @QString @qConfirmPathsTitle = "Confirm Install Paths"
  2473.  
  2474.    @QString @qConfirmPathsText1 = "Please confirm that the following product installation paths are correct. If they are not, please make the appropriate corrections."
  2475.  
  2476.    // Update text strings
  2477.    @QString @qProceedWithUpdateTitle = "Proceed with Update?"
  2478.    @QString @qProceedWithUpdateText1 = "The service level of the version of @qProductName you are applying is the same as the service level of the version of @qProductName on your system.  Do you wish to proceed?"
  2479.    @QString @qUpdateErrorOlderVersion = "The service level of the version of @qProductName you are applying is older than the version on your system. You cannot proceed."
  2480.    @QString @ProceedWithUpdateBadReturn = "ProceedWithUpdate: Unexpected return code from Ask"
  2481.    @QString @GetCurrentFixpakLevelCantOpenKey = "GetCurrentFixpakLevel: Fixpak level cannot be determined"
  2482.  
  2483.    // Add text strings
  2484.    @QString @qAddErrorOlderVersion = "The service level of the version of @qProductName you are applying is older than the version on your system. You cannot proceed."
  2485.    @QString @qAddErrorNewerVersion = "You cannot add new features until you update the features already installed.  Please select update from the previous dialog."
  2486.    @QString @qErrorReadingCustomFeatures = "Cannot retrieve previously set custom features from install information file. You must uninstall and reinstall this product."
  2487.  
  2488.    //Settemp message
  2489.    @QString @qSetTempError = "Cannot determine temporary directory. Please set the environment variable TEMP or TMP to a writeable directory and restart the install. "
  2490.  
  2491.    @QString @qSetTempError2_1 = "The directory pointed to by the TEMP environment variable does not exist.  Please create this directory, or reset the environment variable to a valid writeable directory, and restart the install.@qcrlf"
  2492.    @QString @qSetTempError2_2 = "The directory pointed to by the TMP environment variable does not exist.  Please create this directory, or reset the environment variable to a valid writeable directory, and restart the install.@qcrlf"
  2493.  
  2494.    @QString @qSetTempError3_1 = "The TEMP environment variable points to a file, not a directory.  Please reset this variable to a valid directory, and restart the install."
  2495.    @QString @qSetTempError3_2 = "The TMP environment variable points to a file, not a directory.  Please reset this variable to a valid directory, and restart the install."
  2496.  
  2497.    @QString @qSetTempError5_1 = "Could not create the file @qTempTextFile in the TEMP directory.  Please verify that the TEMP environment variable points to a valid writeable directory, and restart the install."
  2498.    @QString @qSetTempError5_2 = "Could not create the file @qTempTextFile in the TMP directory.  Please verify that the TMP environment variable points to a valid writeable directory, and restart the install."
  2499.  
  2500.    @Qstring @qSetTempError4_1 = "Could not delete the file or directory @qTempTextFile from the TEMP directory.  Please verify that the TEMP environment variable points to a valid writeable directory, delete the file or directory @qTempTextFile, and restart the install.@qcrlf"
  2501.    @Qstring @qSetTempError4_2 = "Could not delete the file or directory @qTempTextFile from the TMP directory.  Please verify that the TMP environment variable points to a valid writeable directory, delete the file or directory @qTempTextFile, and restart the install.@qcrlf"
  2502.  
  2503.    //Java message
  2504.    @QString @qAskReadInstallTxtTitle = ""
  2505.    @QString @qAskReadInstallTxtQu = ""
  2506.  
  2507. @EndVars
  2508. //
  2509. //
  2510. //
  2511. //File: Dialog /////////////////////////////////////
  2512. //
  2513. //CIDVars: None
  2514. //
  2515. //Globals changed: None
  2516. //
  2517. //@DefineProto
  2518. //   //SEE BELOW
  2519. //@EndProto
  2520. //
  2521. //
  2522. //
  2523. // Parameters:
  2524. //  All parameters to dialog box wrapper functions are in the same order, 
  2525. //  but may not all be present
  2526. //          @In @QString @DialogTitle
  2527. //          @In @QString @Bitmap1Title
  2528. //          @In @QSTring @ST1Text, @In @QString @ST2Text, ...
  2529. //          @In @QString @RB1Text, @In @QString @RB2Text, ...
  2530. //          @In @QString @CB1Text, @In @QString @CB2Text, ...
  2531. //          @In @QString @PB1Text, @In @QString @PB2Text, ...
  2532. //          @InOut @Integer @RBSelected
  2533. //          @InOut @Integer @CB1Selected, @CB2Selected, ...
  2534. //          @InOut @QString @EF1, @InOut @QString @EF2, ...
  2535. //  The dialogs take parameters for each of their controls.  If a null string is
  2536. //  passed as a parameter, that control will be hidden in the DlgInitEvent handler.
  2537. //
  2538. // Return values:
  2539. //  The dialog functions return the button number (from 1 to n) of the button pressed,
  2540. //  where n is the number of buttons in the dialog. This is the button number 
  2541. //  corresponding to the order of the strings passed in as button text, not the 
  2542. //  resource id number.
  2543. //
  2544. //  The final parameter of dialogs with radio buttons, checkboxes, and edit fields is 
  2545. //  both an input and an output parameter - as input it specifies the default value
  2546. //  of the field, as output it specifies the value which was specified in the dialog.
  2547. //  -For edit fields, the value is the text string which was in the field.
  2548. //  -For radio buttons, the value is the number of the radio button (based on the text 
  2549. //  strings passed in.
  2550. //  -For check boxes, there is an input/output parameter for every checkbox, with the 
  2551. //  value @TRUE or @FALSE.
  2552. //
  2553.  
  2554. @DefineProto
  2555.  
  2556.    //Small, message-type dialogs
  2557.    @Integer @MsgBox(@In @QString @ST1Text)
  2558.  
  2559.    @Integer @Message(@In @QString @DialogTitle, 
  2560.             @In @QString @Bitmap1Title,  @In @Integer @Bitmap1ID,
  2561.             @In @QString @ST1Text,  
  2562.             @In @QString @PB1Text, @In @QString @PB2Text)
  2563.  
  2564.    @Integer @Ask(@In @QString @DialogTitle, 
  2565.             @In @QString @Bitmap1Title, @In @Integer @Bitmap1ID,  
  2566.             @In @QString @ST1Text,  
  2567.             @In @QString @PB1Text, @In @QString @PB2Text)
  2568.  
  2569.    @Integer @Dialog1s1p(@In @QString @DialogTitle,
  2570.             @In @QString @ST1Text,
  2571.             @In @QString @PB1Text)
  2572.  
  2573.    @Integer @Dialog1s2p(@In @QString @DialogTitle,
  2574.             @In @QString @ST1Text,
  2575.             @In @QString @PB1Text, @In @QString @PB2Text)
  2576.  
  2577.    @Integer @Dialog1b1s1p(@In @QString @DialogTitle, 
  2578.             @In @QString @Bitmap1Title, @In @Integer @Bitmap1ID,
  2579.             @In @QString @ST1Text,
  2580.             @In @QString @PB1Text)
  2581.  
  2582.    @Integer @Dialog1b1s2p(@In @QString @DialogTitle, 
  2583.             @In @QString @Bitmap1Title, @In @Integer @Bitmap1ID,
  2584.             @In @QString @ST1Text,
  2585.             @In @QString @PB1Text, @In @QString @PB2Text)
  2586.  
  2587.    //Large dialogs
  2588.    @Void @EventHandler @DialogTextInit(@Void)
  2589.  
  2590.    @Integer @DialogText(@In @QString @DialogTitle, 
  2591.             @In @QString @Bitmap1Title, @In @Integer @Bitmap1ID,
  2592.             @In @QString @ST1Text, @In @QString @ST2Text, @In @QString @ST3Text,
  2593.             @In @QString @ST4Text, @In @QString @ST5Text, @In @QString @ST6Text,
  2594.             @In @QString @PB1Text, @In @QString @PB2Text, @In @QString @PB3Text, 
  2595.             @In @QString @PB4Text, @In @QString @PB5Text)
  2596.  
  2597.    @Void @EventHandler @DialogBitmapInit(@Void)
  2598.  
  2599.    @Integer @DialogBitmap(@In @QString @DialogTitle, 
  2600.             @In @QString @Bitmap1Title, @In @Integer @Bitmap1ID,
  2601.             @In @QString @PB1Text, @In @QString @PB2Text, @In @QString @PB3Text, 
  2602.             @In @QString @PB4Text, @In @QString @PB5Text)
  2603.  
  2604.    //Sets magic variables @iRB1-6Disabled
  2605.    @Void @DialogRadioDisableRB(@In @Integer @RB1, @In @Integer @RB2,
  2606.             @In @Integer @RB3, @In @Integer @RB4,
  2607.             @In @Integer @RB5, @In @Integer @RB6)
  2608.  
  2609.    //Uses magic variables @iRB1-6Disabled
  2610.    @Void @EventHandler @DialogRadioInit(@Void)
  2611.  
  2612.    @Integer @DialogRadio(@In @QString @DialogTitle, 
  2613.             @In @QString @Bitmap1Title, @In @Integer @Bitmap1ID,
  2614.             @In @QString @ST1Text, @In @QString @ST2Text, @In @QString @ST3Text,
  2615.             @In @QString @RB1Text, @In @QString @RB2Text, @In @QString @RB3Text,
  2616.             @In @QString @RB4Text, @In @QString @RB5Text, @In @QString @RB6Text,
  2617.             @In @QString @PB1Text, @In @QString @PB2Text, @In @QString @PB3Text,
  2618.             @In @QString @PB4Text, @In @QString @PB5Text,
  2619.             @InOut @Integer @RBSelected)
  2620.  
  2621.    @Void @EventHandler @DialogEditInit(@Void)
  2622.  
  2623.    @Integer @DialogEdit(@In @QString @DialogTitle,
  2624.             @In @QString @Bitmap1Title, @In @Integer @Bitmap1ID,
  2625.             @In @QString @ST1Text, @In @QString @ST2Text, @In @QString @ST3Text,
  2626.             @In @QString @ST4Text, @In @QString @ST5Text, @In @QString @ST6Text,
  2627.             @In @QString @ST7Text, @In @QString @ST8Text, @In @QString @ST9Text,
  2628.             @In @QString @ST10Text, @In @QString @ST11Text, @In @QString @ST12Text,
  2629.             @In @QString @PB1Text, @In @QString @PB2Text, @In @QString @PB3Text,
  2630.             @In @QString @PB4Text, @In @QString @PB5Text, 
  2631.             @InOut @QString @EF1, @InOut @QString @EF2, @InOut @QString @EF3,
  2632.             @InOut @QString @EF4, @InOut @QString @EF5, @InOut @QString @EF6,
  2633.             @InOut @QString @EF7, @InOut @QString @EF8, @InOut @QString @EF9,
  2634.             @InOut @QString @EF10, @In @QString @RE1)
  2635.  
  2636.    @Void @EventHandler @Dialog1EditInit(@Void)
  2637.  
  2638.    @Integer @Dialog1Edit(@In @QString @DialogTitle,
  2639.             @In @QString @Bitmap1Title, @In @Integer @Bitmap1ID,
  2640.             @In @QString @ST1Text, @In @QString @ST2Text, 
  2641.             @In @QString @ST3Text, @In @QString @ST4Text, 
  2642.             @In @QString @ST5Text,
  2643.             @In @QString @PB1Text, @In @QString @PB2Text, @In @QString @PB3Text,
  2644.             @In @QString @PB4Text, @In @QString @PB5Text, 
  2645.             @InOut @QString @EF1)
  2646.  
  2647.    @Void @EventHandler @DialogCheckInit(@Void)
  2648.  
  2649.    @Integer @DialogCheck(@In @QString @DialogTitle, 
  2650.             @In @QString @Bitmap1Title, @In @Integer @Bitmap1ID,
  2651.             @In @QString @ST1Text, @In @QString @ST2Text,
  2652.             @In @QString @CB1Text, @In @QString @CB2Text, @In @QString @CB3Text,
  2653.             @In @QString @CB4Text, @In @QString @CB5Text, @In @QString @CB6Text,
  2654.             @In @QString @CB7Text, @In @QString @CB8Text, @In @QString @CB9Text,
  2655.             @In @QString @CB10Text, @In @QString @CB11Text, @In @QString @CB12Text,
  2656.             @In @QString @CB13Text, @In @QString @CB14Text, @In @QString @CB15Text,
  2657.             @In @QString @CB16Text,
  2658.             @InOut @Integer @CB1Selected, @InOut @Integer @CB2Selected, 
  2659.             @InOut @Integer @CB3Selected, @InOut @Integer @CB4Selected, 
  2660.             @InOut @Integer @CB5Selected, @InOut @Integer @CB6Selected,
  2661.             @InOut @Integer @CB7Selected, @InOut @Integer @CB8Selected, 
  2662.             @InOut @Integer @CB9Selected, @InOut @Integer @CB10Selected,
  2663.             @InOut @Integer @CB11Selected, @InOut @Integer @CB12Selected,
  2664.             @InOut @Integer @CB13Selected, @InOut @Integer @CB14Selected,
  2665.             @InOut @Integer @CB15Selected, @InOut @Integer @CB16Selected,
  2666.             @InOut @Integer @CB1Enabled, @InOut @Integer @CB2Enabled, 
  2667.             @InOut @Integer @CB3Enabled, @InOut @Integer @CB4Enabled, 
  2668.             @InOut @Integer @CB5Enabled, @InOut @Integer @CB6Enabled,
  2669.             @InOut @Integer @CB7Enabled, @InOut @Integer @CB8Enabled, 
  2670.             @InOut @Integer @CB9Enabled, @InOut @Integer @CB10Enabled,
  2671.             @InOut @Integer @CB11Enabled, @InOut @Integer @CB12Enabled,
  2672.             @InOut @Integer @CB13Enabled, @InOut @Integer @CB14Enabled,
  2673.             @InOut @Integer @CB15Enabled, @InOut @Integer @CB16Selected,
  2674.             @In @QString @PB1Text, @In @QString @PB2Text, @In @QString @PB3Text, 
  2675.             @In @QString @PB4Text, @In @QString @PB5Text)
  2676.  
  2677.    @Void @EventHandler @Dialog2CBInit(@Void)
  2678.  
  2679.    @Integer @Dialog2CB(@In @QString @DialogTitle, 
  2680.             @In @QString @Bitmap1Title, @In @Integer @Bitmap1ID,
  2681.             @In @QString @ST1Text, @In @QString @ST2Text,
  2682.             @In @QString @CB1Text, @In @QString @CB2Text, 
  2683.             @InOut @Integer @CB1Selected, @InOut @Integer @CB2Selected, 
  2684.             @InOut @Integer @CB1Enabled, @InOut @Integer @CB2Enabled, 
  2685.             @In @QString @PB1Text, @In @QString @PB2Text, @In @QString @PB3Text, 
  2686.             @In @QString @PB4Text, @In @QString @PB5Text)
  2687.  
  2688.    @Void @EventHandler @DialogReadOnlyInit(@Void)
  2689.  
  2690.    @Integer @DialogReadOnly(@In @QString @DialogTitle,
  2691.             @In @QString @ST1Text, @In @QString @ST2Text, 
  2692.             @In @QString @RE1,
  2693.             @In @QString @PB1Text, @In @QString @PB2Text, @In @QString @PB3Text, 
  2694.             @In @QString @PB4Text, @In @QString @PB5Text)
  2695.  
  2696.    @Void @EventHandler @DialogReadOnlyBmpInit(@Void)
  2697.  
  2698.    @Integer @DialogReadOnlyBmp(@In @QString @DialogTitle,
  2699.             @In @QString @Bitmap1Title, @In @Integer @Bitmap1ID,
  2700.             @In @QString @ST1Text, @In @QString @ST2Text, 
  2701.             @In @QString @RE1,
  2702.             @In @QString @PB1Text, @In @QString @PB2Text, @In @QString @PB3Text, 
  2703.             @In @QString @PB4Text, @In @QString @PB5Text)
  2704.  
  2705. @EndProto
  2706.  
  2707.  
  2708. //----------------------------------------------------------
  2709.  
  2710. //----------------------------------------------------------
  2711. @DefineFunc @Integer @MsgBox(@In @QString @ST1Text)
  2712.  
  2713.    @If (@CIDBypass(@qNo))
  2714.       @If (!@ShowallToggle)
  2715.          @Return(1)  //There is only one button to push in the dialog
  2716.       @EndIf
  2717.    @EndIf
  2718.  
  2719.    @Return (@Dialog1s1p(@lMessage, @ST1Text, @qOK))
  2720. @EndFunc
  2721.  
  2722. //----------------------------------------------------------
  2723. @DefineFunc @Integer @Message(@In @QString @DialogTitle, 
  2724.             @In @QString @Bitmap1Title,  @In @Integer @Bitmap1ID,
  2725.             @In @QString @ST1Text,  
  2726.             @In @QString @PB1Text, @In @QString @PB2Text)
  2727.  
  2728.  
  2729.    @If (@CIDBypass(@qNo))
  2730.       @If (!@ShowallToggle)
  2731.          @Return(0)  //No buttons have been pushed
  2732.       @EndIf
  2733.    @EndIf
  2734.  
  2735.    @If (@StrCmp(@DialogTitle, "") == 0)
  2736.       @DialogTitle = @lMessage
  2737.    @EndIf
  2738.    @If (@StrCmp(@Bitmap1Title, "") ==0)
  2739.       @If (@StrCmp(@PB2Text, "") == 0)
  2740.          @If (@StrCmp(@PB1Text, "") == 0)
  2741.             @PB1Text = @qOK
  2742.          @EndIf
  2743.          @Return (@Dialog1s1p(@DialogTitle,@St1Text,@PB1Text))
  2744.       @Else
  2745.          @Return (@Dialog1s2p(@DialogTitle,@St1Text,@PB1Text,@PB2Text))
  2746.       @EndIf
  2747.    @Else
  2748.       @If (@StrCmp(@PB2Text, "") == 0)
  2749.          @If (@StrCmp(@PB1Text, "") == 0)
  2750.             @PB1Text = @qOK
  2751.          @EndIf
  2752.          @Return (@Dialog1b1s1p(@DialogTitle,@Bitmap1Title,@Bitmap1ID,@St1Text,@PB1Text))
  2753.       @Else
  2754.          @Return (@Dialog1b1s2p(@DialogTitle,@Bitmap1Title,@Bitmap1ID,@St1Text,@PB1Text,@PB2Text))
  2755.       @EndIf
  2756.    @EndIf
  2757.    @Return(0)
  2758. @EndFunc
  2759.  
  2760. //------------------------------------------------------------
  2761. @DefineFunc @Integer @Ask(@In @QString @DialogTitle, 
  2762.             @In @QString @Bitmap1Title, @In @Integer @Bitmap1ID,  
  2763.             @In @QString @ST1Text,  
  2764.             @In @QString @PB1Text, @In @QString @PB2Text)
  2765.  
  2766.  
  2767.    @If (@CIDBypass(@qNo))
  2768.          @ErrorExit(@qAskErrorShouldNotBeCalled,@iAbort)
  2769.    @EndIf
  2770.  
  2771.    @If (@StrCmp(@DialogTitle, "") == 0)
  2772.       @DialogTitle = @lQuestion
  2773.    @EndIf
  2774.    @If (@StrCmp(@Bitmap1Title, "") ==0)
  2775.       @If ((@StrCmp(@PB1Text,"") == 0) &&  (@StrCmp(@PB2Text, "") == 0))
  2776.          @PB1Text = @lYes
  2777.          @PB2Text = @lNo
  2778.       @ElseIf ((@StrCmp(@PB1Text,"") == 0) ||  (@StrCmp(@PB2Text, "") == 0))
  2779.          @ErrorExit(@qAskErrorPushButtonNotSpecified,@iAbort)
  2780.       @EndIf
  2781.  
  2782.       @Return (@Dialog1s2p(@DialogTitle,@St1Text,@PB1Text,@PB2Text))
  2783.    @Else
  2784.       @If ((@StrCmp(@PB1Text,"") == 0) &&  (@StrCmp(@PB2Text, "") == 0))
  2785.          @PB1Text = @lYes
  2786.          @PB2Text = @lNo
  2787.       @ElseIf ((@StrCmp(@PB1Text,"") == 0) ||  (@StrCmp(@PB2Text, "") == 0))
  2788.          @ErrorExit(@qAskErrorPushButtonNotSpecified,@iAbort)
  2789.       @EndIf
  2790.       @Return (@Dialog1b1s2p(@DialogTitle,@Bitmap1Title,@Bitmap1ID,@St1Text,@PB1Text,@PB2Text))
  2791.    @EndIf
  2792.    @Return(0)   //This return statement is just because the language needs one 
  2793.                 //on the last line of a function
  2794. @EndFunc
  2795.  
  2796. //----------------------------------------------------------
  2797. @DefineFunc @Integer @Dialog1s1p(@In @QString @DialogTitle,
  2798.                                    @In @QString @ST1Text,
  2799.                                    @In @QString @PB1Text)
  2800.  
  2801.  
  2802.    @BeginWinDialog("Dialog1s1p","@DialogTitle", 10001)
  2803.  
  2804.       @StaticText(310, "@ST1Text")
  2805.  
  2806.       @Button(100, "@PB1Text")
  2807.  
  2808.    @ExecuteDialog
  2809.  
  2810.       @iRetVal = 1
  2811.  
  2812.    @EndWinDialog
  2813.  
  2814.  
  2815.  
  2816.    @Return (@iRetVal)
  2817. @EndFunc
  2818.  
  2819. //----------------------------------------------------------
  2820. @DefineFunc @Integer @Dialog1s2p(@In @QString @DialogTitle,
  2821.                                    @In @QString @ST1Text,
  2822.                                    @In @QString @PB1Text,
  2823.                                    @In @QString @PB2Text)
  2824.  
  2825.    @BeginWinDialog("Dialog1s2p","@DialogTitle", 11002)
  2826.  
  2827.       @StaticText(310, "@ST1Text")
  2828.  
  2829.       @Button(100, "@PB1Text")
  2830.       @Button(110, "@PB2Text")
  2831.  
  2832.    @ExecuteDialog
  2833.  
  2834.       @If (@Button(100))
  2835.          @iRetVal = 1
  2836.       @Else
  2837.          @iRetVal = 2
  2838.       @EndIf
  2839.  
  2840.    @EndWinDialog
  2841.  
  2842.  
  2843.  
  2844.    @Return (@iRetVal)
  2845. @EndFunc
  2846.  
  2847.  
  2848. //----------------------------------------------------------
  2849.  
  2850. @DefineFunc @Integer @Dialog1b1s1p(@In @QString @DialogTitle,
  2851.             @In @QString @Bitmap1Title, @In @Integer @Bitmap1ID,
  2852.             @In @QString @ST1Text,
  2853.             @In @QString @PB1Text)
  2854.  
  2855.    @BeginWinDialog("Dialog1b1s1p",@DialogTitle,10011)
  2856.  
  2857.       @Bitmap(200, "@Bitmap1Title", @Bitmap1ID)
  2858.  
  2859.       @StaticText(310, "@ST1Text")
  2860.  
  2861.       @Button(100, "@PB1Text")
  2862.  
  2863.    @ExecuteDialog
  2864.  
  2865.       @iRetVal = 1
  2866.  
  2867.    @EndWinDialog
  2868.  
  2869.    @Return (@iRetVal)
  2870. @EndFunc
  2871.  
  2872. //----------------------------------------------------------
  2873.  
  2874. @DefineFunc @Integer @Dialog1b1s2p(@In @QString @DialogTitle,
  2875.             @In @QString @Bitmap1Title, @In @Integer @Bitmap1ID,
  2876.             @In @QString @ST1Text,
  2877.             @In @QString @PB1Text, @In @QString @PB2Text)
  2878.  
  2879.    @BeginWinDialog("Dialog1b1s2p","@DialogTitle",11012)
  2880.  
  2881.       @Bitmap(200, "@Bitmap1Title", @Bitmap1ID)
  2882.  
  2883.       @StaticText(310, "@ST1Text")
  2884.  
  2885.       @Button(100, "@PB1Text")
  2886.       @Button(110, "@PB2Text")
  2887.  
  2888.    @ExecuteDialog
  2889.  
  2890.       @If (@Button(100))
  2891.          @iRetVal = 1
  2892.       @Else
  2893.          @iRetVal = 2
  2894.       @EndIf
  2895.  
  2896.    @EndWinDialog
  2897.  
  2898.  
  2899.    @Return (@iRetVal)
  2900. @EndFunc
  2901.  
  2902.  
  2903.  
  2904. //----------------------------------------------------------
  2905. @DefineFunc @Void @EventHandler @DialogTextInit(@Void)
  2906.  
  2907.    @DlgCtrlShow(500,!((@StrCmp(@ST5Text, "") == 0) && 
  2908.                       (@StrCmp(@ST6Text, "") == 0)))
  2909.    @DlgCtrlShow(100,(@StrCmp(@PB1Text, "") != 0))
  2910.    @DlgCtrlShow(110,(@StrCmp(@PB2Text, "") != 0))
  2911.    @DlgCtrlShow(120,(@StrCmp(@PB3Text, "") != 0))
  2912.    @DlgCtrlShow(130,(@StrCmp(@PB4Text, "") != 0))
  2913.    @DlgCtrlShow(140,(@StrCmp(@PB5Text, "") != 0))
  2914.  
  2915.    @Return()
  2916. @EndFunc
  2917.  
  2918. //----------------------------------------------------------
  2919. @DefineFunc @Integer @DialogText(@In @QString @DialogTitle, 
  2920.             @In @QString @Bitmap1Title, @In @Integer @Bitmap1ID,
  2921.             @In @QString @ST1Text, @In @QString @ST2Text, @In @QString @ST3Text,
  2922.             @In @QString @ST4Text, @In @QString @ST5Text, @In @QString @ST6Text,
  2923.             @In @QString @PB1Text, @In @QString @PB2Text, @In @QString @PB3Text, 
  2924.             @In @QString @PB4Text, @In @QString @PB5Text)
  2925.  
  2926.    @MapEventToFunc(@DlgInitEvent, @DialogTextInit)
  2927.    @EnableEventMap(@DlgInitEvent)
  2928.  
  2929.    @BeginWinDialog("DialogText","@DialogTitle",8000)
  2930.       @StaticText(310, "@ST1Text@qCRLF@qCRLF@ST2Text@qCRLF@qCRLF@ST3Text@qCRLF@qCRLF@ST4Text")
  2931.  
  2932.       @StaticText(510, "@ST5Text@qCRLF@qCRLF@ST6Text")
  2933.  
  2934.       @Button(100, "@PB1Text")
  2935.       @Button(110, "@PB2Text")
  2936.       @Button(120, "@PB3Text")
  2937.       @Button(130, "@PB4Text")
  2938.       @Button(140, "@PB5Text")
  2939.  
  2940.       @Bitmap(200, "@Bitmap1Title", @Bitmap1ID)
  2941.  
  2942.    @ExecuteDialog
  2943.       @If (@Button(100))
  2944.          @iRetVal = 1
  2945.       @ElseIf (@Button(110))
  2946.          @iRetVal = 2
  2947.       @ElseIf (@Button(120))
  2948.          @iRetVal = 3
  2949.       @ElseIf (@Button(130))
  2950.          @iRetVal = 4
  2951.       @ElseIf (@Button(140))
  2952.          @iRetVal = 5
  2953.       @Else
  2954.          @iRetVal = 6
  2955.       @EndIf
  2956.  
  2957.    @EndWinDialog
  2958.  
  2959.    @DisableEventMap(@DlgInitEvent)
  2960.  
  2961.    @Return (@iRetVal)
  2962. @EndFunc
  2963.  
  2964. //----------------------------------------------------------
  2965. @DefineFunc @Void @EventHandler @DialogBitmapInit(@Void)
  2966.  
  2967.    @DlgCtrlShow(100,(@StrCmp(@PB1Text, "") != 0))
  2968.    @DlgCtrlShow(110,(@StrCmp(@PB2Text, "") != 0))
  2969.    @DlgCtrlShow(120,(@StrCmp(@PB3Text, "") != 0))
  2970.    @DlgCtrlShow(130,(@StrCmp(@PB4Text, "") != 0))
  2971.    @DlgCtrlShow(140,(@StrCmp(@PB5Text, "") != 0))
  2972.  
  2973.    @Return()
  2974. @EndFunc
  2975.  
  2976. @DefineFunc @Integer @DialogBitmap(@In @QString @DialogTitle, 
  2977.             @In @QString @Bitmap1Title, @In @Integer @Bitmap1ID,
  2978.             @In @QString @PB1Text, @In @QString @PB2Text, @In @QString @PB3Text, 
  2979.             @In @QString @PB4Text, @In @QString @PB5Text)
  2980.  
  2981.  
  2982.    @MapEventToFunc(@DlgInitEvent, @DialogBitmapInit)
  2983.    @EnableEventMap(@DlgInitEvent)
  2984.    @BeginWinDialog("ProdLogo","@DialogTitle",8900)
  2985.  
  2986.       @Button(100, "@PB1Text")
  2987.       @Button(110, "@PB2Text")
  2988.       @Button(120, "@PB3Text")
  2989.       @Button(130, "@PB4Text")
  2990.       @Button(140, "@PB5Text")
  2991.  
  2992.       @Bitmap(200, "@Bitmap1Title", @Bitmap1ID)
  2993.  
  2994.    @ExecuteDialog
  2995.       @If (@Button(100))
  2996.          @iRetVal = 1
  2997.       @ElseIf (@Button(110))
  2998.          @iRetVal = 2
  2999.       @ElseIf (@Button(120))
  3000.          @iRetVal = 3
  3001.       @ElseIf (@Button(130))
  3002.          @iRetVal = 4
  3003.       @ElseIf (@Button(140))
  3004.          @iRetVal = 5
  3005.       @Else
  3006.          @iRetVal = 6
  3007.       @EndIf
  3008.    @EndWinDialog
  3009.  
  3010.    @DisableEventMap(@DlgInitEvent)
  3011.  
  3012.    @Return (@iRetVal)
  3013. @EndFunc
  3014.  
  3015. //----------------------------------------------------------
  3016. @DefineFunc @Void @DialogRadioDisableRB(@In @Integer @RB1, @In @Integer @RB2,
  3017.             @In @Integer @RB3, @In @Integer @RB4,
  3018.             @In @Integer @RB5, @In @Integer @RB6)
  3019.  
  3020.    @iRB1Disabled = @RB1
  3021.    @iRB2Disabled = @RB2
  3022.    @iRB3Disabled = @RB3
  3023.    @iRB4Disabled = @RB4
  3024.    @iRB5Disabled = @RB5
  3025.    @iRB6Disabled = @RB6
  3026.    
  3027.    @Return()
  3028. @EndFunc
  3029.  
  3030. //----------------------------------------------------------
  3031. @DefineFunc @Void @EventHandler @DialogRadioInit(@Void)
  3032.  
  3033.    @DlgCtrlShow(500,!((@StrCmp(@ST2Text, "") == 0) && 
  3034.                       (@StrCmp(@ST3Text, "") == 0)))
  3035.    @DlgCtrlShow(1410,(@StrCmp(@RB1Text, "") != 0))
  3036.    @DlgCtrlShow(1420,(@StrCmp(@RB2Text, "") != 0))
  3037.    @DlgCtrlShow(1430,(@StrCmp(@RB3Text, "") != 0))
  3038.    @DlgCtrlShow(1440,(@StrCmp(@RB4Text, "") != 0))
  3039.    @DlgCtrlShow(1450,(@StrCmp(@RB5Text, "") != 0))
  3040.    @DlgCtrlShow(1460,(@StrCmp(@RB6Text, "") != 0))
  3041.    @DlgCtrlShow(100,(@StrCmp(@PB1Text, "") != 0))
  3042.    @DlgCtrlShow(110,(@StrCmp(@PB2Text, "") != 0))
  3043.    @DlgCtrlShow(120,(@StrCmp(@PB3Text, "") != 0))
  3044.    @DlgCtrlShow(130,(@StrCmp(@PB4Text, "") != 0))
  3045.    @DlgCtrlShow(140,(@StrCmp(@PB5Text, "") != 0))
  3046.  
  3047.    @DlgCtrlEnable(1410,!@iRB1Disabled)
  3048.    @DlgCtrlEnable(1420,!@iRB2Disabled)
  3049.    @DlgCtrlEnable(1430,!@iRB3Disabled)
  3050.    @DlgCtrlEnable(1440,!@iRB4Disabled)
  3051.    @DlgCtrlEnable(1450,!@iRB5Disabled)
  3052.    @DlgCtrlEnable(1460,!@iRB6Disabled)
  3053.  
  3054.    @Return()
  3055. @EndFunc
  3056.  
  3057.  
  3058. //----------------------------------------------------------
  3059. @DefineFunc @Integer @DialogRadio(@In @QString @DialogTitle, 
  3060.             @In @QString @Bitmap1Title, @In @Integer @Bitmap1ID,
  3061.             @In @QString @ST1Text, @In @QString @ST2Text, @In @QString @ST3Text,
  3062.             @In @QString @RB1Text, @In @QString @RB2Text, @In @QString @RB3Text,
  3063.             @In @QString @RB4Text, @In @QString @RB5Text, @In @QString @RB6Text,
  3064.             @In @QString @PB1Text, @In @QString @PB2Text, @In @QString @PB3Text,
  3065.             @In @QString @PB4Text, @In @QString @PB5Text,
  3066.             @InOut @Integer @RBSelected)
  3067.  
  3068.    @MapEventToFunc(@DlgInitEvent, @DialogRadioInit)
  3069.    @EnableEventMap(@DlgInitEvent)
  3070.  
  3071.    @BeginWinDialog("DialogRadio","@DialogTitle",8100)
  3072.  
  3073.       @StaticText(310, "@ST1Text")
  3074.       @StaticText(510, "@ST2Text@qCRLF@qCRLF@ST3Text")
  3075.  
  3076.       @RBRange(1410,1460)
  3077.       @RB(1410,"@RB1Text",@Eval(@RBSelected == 1))
  3078.       @RB(1420,"@RB2Text",@Eval(@RBSelected == 2))
  3079.       @RB(1430,"@RB3Text",@Eval(@RBSelected == 3))
  3080.       @RB(1440,"@RB4Text",@Eval(@RBSelected == 4))
  3081.       @RB(1450,"@RB5Text",@Eval(@RBSelected == 5))
  3082.       @RB(1460,"@RB6Text",@Eval(@RBSelected == 6))
  3083.  
  3084.       @Button(100, "@PB1Text")
  3085.       @Button(110, "@PB2Text")
  3086.       @Button(120, "@PB3Text")
  3087.       @Button(130, "@PB4Text")
  3088.       @Button(140, "@PB5Text")
  3089.  
  3090.       @Bitmap(200, "@Bitmap1Title", @Bitmap1ID)
  3091.  
  3092.  
  3093.    @ExecuteDialog
  3094.  
  3095.       @RBSelected = @RBRange(1410)
  3096.       @If (@RBSelected == 1410)
  3097.          @RBSelected = 1
  3098.       @ElseIf (@RBSelected == 1420)
  3099.          @RBSelected = 2
  3100.       @ElseIf (@RBSelected == 1430)
  3101.          @RBSelected = 3
  3102.       @ElseIf (@RBSelected == 1440)
  3103.          @RBSelected = 4
  3104.       @ElseIf (@RBSelected == 1450)
  3105.          @RBSelected = 5
  3106.       @Else
  3107.         @RBSelected = 6
  3108.       @EndIf
  3109.  
  3110.       @If (@Button(100))
  3111.          @iRetVal = 1
  3112.       @ElseIf (@Button(110))
  3113.          @iRetVal = 2
  3114.       @ElseIf (@Button(120))
  3115.          @iRetVal = 3
  3116.       @ElseIf (@Button(130))
  3117.          @iRetVal = 4
  3118.       @ElseIf (@Button(140))
  3119.          @iRetVal = 5
  3120.       @Else
  3121.          @iRetVal = 6
  3122.       @EndIf
  3123.  
  3124.    @EndWinDialog
  3125.  
  3126.    @DisableEventMap(@DlgInitEvent)
  3127.    @Return (@iRetVal)
  3128. @EndFunc
  3129.  
  3130.  
  3131.  
  3132. //----------------------------------------------------------
  3133. @DefineFunc @Void @EventHandler @DialogEditInit(@Void)
  3134.  
  3135.    @DlgCtrlShow(500,(@StrCmp(@ST12Text, "") != 0))
  3136.  
  3137.    //hide the static text controls - necessary?
  3138.    @DlgCtrlShow(410,(@StrCmp(@ST2Text, "") != 0))
  3139.    @DlgCtrlShow(420,(@StrCmp(@ST3Text, "") != 0))
  3140.    @DlgCtrlShow(430,(@StrCmp(@ST4Text, "") != 0))
  3141.    @DlgCtrlShow(440,(@StrCmp(@ST5Text, "") != 0))
  3142.    @DlgCtrlShow(450,(@StrCmp(@ST6Text, "") != 0))
  3143.    @DlgCtrlShow(460,(@StrCmp(@ST7Text, "") != 0))
  3144.    @DlgCtrlShow(470,(@StrCmp(@ST8Text, "") != 0))
  3145.    @DlgCtrlShow(480,(@StrCmp(@ST9Text, "") != 0))
  3146.    @DlgCtrlShow(490,(@StrCmp(@ST10Text, "") != 0))
  3147.    @DlgCtrlShow(800,(@StrCmp(@ST11Text, "") != 0))
  3148.  
  3149.    //hide the edit fields
  3150.    @DlgCtrlShow(1410,(@StrCmp(@ST2Text, "") != 0))
  3151.    @DlgCtrlShow(1420,(@StrCmp(@ST3Text, "") != 0))
  3152.    @DlgCtrlShow(1430,(@StrCmp(@ST4Text, "") != 0))
  3153.    @DlgCtrlShow(1440,(@StrCmp(@ST5Text, "") != 0))
  3154.    @DlgCtrlShow(1450,(@StrCmp(@ST6Text, "") != 0))
  3155.    @DlgCtrlShow(1460,(@StrCmp(@ST7Text, "") != 0))
  3156.    @DlgCtrlShow(1470,(@StrCmp(@ST8Text, "") != 0))
  3157.    @DlgCtrlShow(1480,(@StrCmp(@ST9Text, "") != 0))
  3158.    @DlgCtrlShow(1490,(@StrCmp(@ST10Text, "") != 0))
  3159.    @DlgCtrlShow(1800,(@StrCmp(@ST11Text, "") != 0))
  3160.  
  3161.    //hide the read-only edit field
  3162.    @DlgCtrlShow(1610,(@StrCmp(@RE1,"") != 0))
  3163.  
  3164.    @DlgCtrlShow(100,(@StrCmp(@PB1Text, "") != 0))
  3165.    @DlgCtrlShow(110,(@StrCmp(@PB2Text, "") != 0))
  3166.    @DlgCtrlShow(120,(@StrCmp(@PB3Text, "") != 0))
  3167.    @DlgCtrlShow(130,(@StrCmp(@PB4Text, "") != 0))
  3168.    @DlgCtrlShow(140,(@StrCmp(@PB5Text, "") != 0))
  3169.  
  3170.    @Return()
  3171. @EndFunc
  3172.  
  3173.  
  3174. //----------------------------------------------------------
  3175. @DefineFunc @Integer @DialogEdit(@In @QString @DialogTitle,
  3176.             @In @QString @Bitmap1Title, @In @Integer @Bitmap1ID,
  3177.             @In @QString @ST1Text, @In @QString @ST2Text, @In @QString @ST3Text,
  3178.             @In @QString @ST4Text, @In @QString @ST5Text, @In @QString @ST6Text,
  3179.             @In @QString @ST7Text, @In @QString @ST8Text, @In @QString @ST9Text,
  3180.             @In @QString @ST10Text, @In @QString @ST11Text, @In @QString @ST12Text,
  3181.             @In @QString @PB1Text, @In @QString @PB2Text, @In @QString @PB3Text,
  3182.             @In @QString @PB4Text, @In @QString @PB5Text, 
  3183.             @InOut @QString @EF1, @InOut @QString @EF2, @InOut @QString @EF3,
  3184.             @InOut @QString @EF4, @InOut @QString @EF5, @InOut @QString @EF6,
  3185.             @InOut @QString @EF7, @InOut @QString @EF8, @InOut @QString @EF9,
  3186.             @InOut @QString @EF10, @In @QString @RE1)
  3187.  
  3188.    @MapEventToFunc(@DlgInitEvent, @DialogEditInit)
  3189.    @EnableEventMap(@DlgInitEvent)
  3190.  
  3191.    @BeginWinDialog("DialogEdit","@DialogTitle",8400)
  3192.       @Bitmap(200, "@Bitmap1Title", @Bitmap1ID)
  3193.  
  3194.       @StaticText(310, "@ST1Text")
  3195.       @StaticText(410, "@ST2Text")
  3196.       @StaticText(420, "@ST3Text")
  3197.       @StaticText(430, "@ST4Text")
  3198.       @StaticText(440, "@ST5Text")
  3199.       @StaticText(450, "@ST6Text")
  3200.       @StaticText(460, "@ST7Text")
  3201.       @StaticText(470, "@ST8Text")
  3202.       @StaticText(480, "@ST9Text")
  3203.       @StaticText(490, "@ST10Text")
  3204.       @StaticText(800, "@ST11Text")
  3205.       @StaticText(510, "@ST12Text")
  3206.  
  3207.       @EditBox(1410, "@EF1")
  3208.       @EditBox(1420, "@EF2")
  3209.       @EditBox(1430, "@EF3")
  3210.       @EditBox(1440, "@EF4")
  3211.       @EditBox(1450, "@EF5")
  3212.       @EditBox(1460, "@EF6")
  3213.       @EditBox(1470, "@EF7")
  3214.       @EditBox(1480, "@EF8")
  3215.       @EditBox(1490, "@EF9")
  3216.       @EditBox(1800, "@EF10")
  3217.  
  3218. //      @EditBox(1610, "@RE1")
  3219.       @StaticText(1610, "@RE1")
  3220.  
  3221.       @Button(100, "@PB1Text")
  3222.       @Button(110, "@PB2Text")
  3223.       @Button(120, "@PB3Text")
  3224.       @Button(130, "@PB4Text")
  3225.       @Button(140, "@PB5Text")
  3226.  
  3227.    @ExecuteDialog
  3228.  
  3229.       @EF1 = "@EditBox(1410)"
  3230.       @EF2 = "@EditBox(1420)"
  3231.       @EF3 = "@EditBox(1430)"
  3232.       @EF4 = "@EditBox(1440)"
  3233.       @EF5 = "@EditBox(1450)"
  3234.       @EF6 = "@EditBox(1460)"
  3235.       @EF7 = "@EditBox(1470)"
  3236.       @EF8 = "@EditBox(1480)"
  3237.       @EF9 = "@EditBox(1490)"
  3238.       @EF10 = "@EditBox(1800)"
  3239.  
  3240.       @If (@Button(100))
  3241.          @iRetVal = 1
  3242.       @ElseIf (@Button(110))
  3243.          @iRetVal = 2
  3244.       @ElseIf (@Button(120))
  3245.          @iRetVal = 3
  3246.       @ElseIf (@Button(130))
  3247.          @iRetVal = 4
  3248.       @ElseIf (@Button(140))
  3249.          @iRetVal = 5
  3250.       @Else
  3251.          @iRetVal = 6
  3252.       @EndIf
  3253.  
  3254.    @EndWinDialog
  3255.  
  3256.    @DisableEventMap(@DlgInitEvent)
  3257.  
  3258.    @Return (@iRetVal)
  3259. @EndFunc
  3260.  
  3261. //----------------------------------------------------------
  3262. @DefineFunc @Void @EventHandler @Dialog1EditInit(@Void)
  3263.  
  3264. //   @DlgCtrlShow(500,((@StrCmp(@ST2Text, "") != 0) || (@StrCmp(@ST3Text, "") != 0) || (@StrCmp(@ST4Text, "") != 0) || (@StrCmp(@ST5Text, "") != 0)))
  3265.  
  3266.    @DlgCtrlShow(100,(@StrCmp(@PB1Text, "") != 0))
  3267.    @DlgCtrlShow(110,(@StrCmp(@PB2Text, "") != 0))
  3268.    @DlgCtrlShow(120,(@StrCmp(@PB3Text, "") != 0))
  3269.    @DlgCtrlShow(130,(@StrCmp(@PB4Text, "") != 0))
  3270.    @DlgCtrlShow(140,(@StrCmp(@PB5Text, "") != 0))
  3271.  
  3272.    @Return()
  3273.  
  3274.  
  3275. @EndFunc
  3276. //----------------------------------------------------------
  3277. @DefineFunc @Integer @Dialog1Edit(@In @QString @DialogTitle,
  3278.             @In @QString @Bitmap1Title, @In @Integer @Bitmap1ID,
  3279.             @In @QString @ST1Text, @In @QString @ST2Text, 
  3280.             @In @QString @ST3Text, @In @QString @ST4Text,
  3281.             @In @QString @ST5Text,
  3282.             @In @QString @PB1Text, @In @QString @PB2Text, @In @QString @PB3Text,
  3283.             @In @QString @PB4Text, @In @QString @PB5Text, 
  3284.             @InOut @QString @EF1)
  3285.  
  3286.    @MapEventToFunc(@DlgInitEvent, @Dialog1EditInit)
  3287.    @EnableEventMap(@DlgInitEvent)
  3288.  
  3289.    @BeginWinDialog("DialogDirJava","@DialogTitle",8700)
  3290.       @Bitmap(200, "@Bitmap1Title", @Bitmap1ID)
  3291.  
  3292.       @StaticText(310, "@ST1Text")
  3293.       @StaticText(510, "@ST2Text")
  3294.       @StaticText(520, "@ST3Text")
  3295.       @StaticText(530, "@ST4Text")
  3296.       @StaticText(540, "@ST5Text")
  3297.  
  3298.       @EditBox(1410, "@EF1")
  3299.  
  3300.       @Button(100, "@PB1Text")
  3301.       @Button(110, "@PB2Text")
  3302.       @Button(120, "@PB3Text")
  3303.       @Button(130, "@PB4Text")
  3304.       @Button(140, "@PB5Text")
  3305.  
  3306.    @ExecuteDialog
  3307.  
  3308.       @EF1 = "@EditBox(1410)"
  3309.  
  3310.       @If (@Button(100))
  3311.          @iRetVal = 1
  3312.       @ElseIf (@Button(110))
  3313.          @iRetVal = 2
  3314.       @ElseIf (@Button(120))
  3315.          @iRetVal = 3
  3316.       @ElseIf (@Button(130))
  3317.          @iRetVal = 4
  3318.       @ElseIf (@Button(140))
  3319.          @iRetVal = 5
  3320.       @Else
  3321.          @iRetVal = 6
  3322.       @EndIf
  3323.  
  3324.    @EndWinDialog
  3325.  
  3326.    @DisableEventMap(@DlgInitEvent)
  3327.  
  3328.    @Return (@iRetVal)
  3329.  
  3330. @EndFunc
  3331.  
  3332. //----------------------------------------------------------
  3333. @DefineFunc @Void @EventHandler @DialogCheckInit(@Void)
  3334.  
  3335.    @DlgCtrlShow(500,(@StrCmp(@ST2Text, "") != 0))
  3336.  
  3337.    @DlgCtrlShow(1000,(@StrCmp(@CB1Text, "") != 0))
  3338.    @DlgCtrlShow(1001,(@StrCmp(@CB2Text, "") != 0))
  3339.    @DlgCtrlShow(1002,(@StrCmp(@CB3Text, "") != 0))
  3340.    @DlgCtrlShow(1003,(@StrCmp(@CB4Text, "") != 0))
  3341.    @DlgCtrlShow(1004,(@StrCmp(@CB5Text, "") != 0))
  3342.    @DlgCtrlShow(1005,(@StrCmp(@CB6Text, "") != 0))
  3343.    @DlgCtrlShow(1006,(@StrCmp(@CB7Text, "") != 0))
  3344.    @DlgCtrlShow(1007,(@StrCmp(@CB8Text, "") != 0))
  3345.    @DlgCtrlShow(1008,(@StrCmp(@CB9Text, "") != 0))
  3346.    @DlgCtrlShow(1009,(@StrCmp(@CB10Text, "") != 0))
  3347.    @DlgCtrlShow(1010,(@StrCmp(@CB11Text, "") != 0))
  3348.    @DlgCtrlShow(1011,(@StrCmp(@CB12Text, "") != 0))
  3349.    @DlgCtrlShow(1012,(@StrCmp(@CB13Text, "") != 0))
  3350.    @DlgCtrlShow(1013,(@StrCmp(@CB14Text, "") != 0))
  3351.    @DlgCtrlShow(1014,(@StrCmp(@CB15Text, "") != 0))
  3352.    @DlgCtrlShow(1015,(@StrCmp(@CB16Text, "") != 0))
  3353.    @DlgCtrlEnable(110, (@CB1Selected || @CB2Selected || @CB3Selected || @CB4Selected || @CB5Selected || @CB6Selected || @CB7Selected || @CB8Selected || @CB9Selected || @CB10Selected || @CB11Selected || @CB12Selected || @CB13Selected || @CB14Selected || @CB15Selected || @CB16Selected))
  3354.  
  3355.    @DlgCtrlEnable(1000,@CB1Enabled)
  3356.    @DlgCtrlEnable(1001,@CB2Enabled)
  3357.    @DlgCtrlEnable(1002,@CB3Enabled)
  3358.    @DlgCtrlEnable(1003,@CB4Enabled)
  3359.    @DlgCtrlEnable(1004,@CB5Enabled)
  3360.    @DlgCtrlEnable(1005,@CB6Enabled)
  3361.    @DlgCtrlEnable(1006,@CB7Enabled)
  3362.    @DlgCtrlEnable(1007,@CB8Enabled)
  3363.    @DlgCtrlEnable(1008,@CB9Enabled)
  3364.    @DlgCtrlEnable(1009,@CB10Enabled)
  3365.    @DlgCtrlEnable(1010,@CB11Enabled)
  3366.    @DlgCtrlEnable(1011,@CB12Enabled)
  3367.    @DlgCtrlEnable(1012,@CB13Enabled)
  3368.    @DlgCtrlEnable(1013,@CB14Enabled)
  3369.    @DlgCtrlEnable(1014,@CB15Enabled)
  3370.    @DlgCtrlEnable(1015,@CB16Enabled)
  3371.  
  3372.    @DlgCtrlShow(100,(@StrCmp(@PB1Text, "") != 0))
  3373.    @DlgCtrlShow(110,(@StrCmp(@PB2Text, "") != 0))
  3374.    @DlgCtrlShow(120,(@StrCmp(@PB3Text, "") != 0))
  3375.    @DlgCtrlShow(130,(@StrCmp(@PB4Text, "") != 0))
  3376.    @DlgCtrlShow(140,(@StrCmp(@PB5Text, "") != 0))
  3377.  
  3378.    @Return()
  3379. @EndFunc
  3380.  
  3381. //----------------------------------------------------------
  3382. @DefineFunc @Integer @DialogCheck(@In @QString @DialogTitle, 
  3383.             @In @QString @Bitmap1Title, @In @Integer @Bitmap1ID,
  3384.             @In @QString @ST1Text, @In @QString @ST2Text,
  3385.             @In @QString @CB1Text, @In @QString @CB2Text, @In @QString @CB3Text,
  3386.             @In @QString @CB4Text, @In @QString @CB5Text, @In @QString @CB6Text,
  3387.             @In @QString @CB7Text, @In @QString @CB8Text, @In @QString @CB9Text,
  3388.             @In @QString @CB10Text, @In @QString @CB11Text, @In @QString @CB12Text,
  3389.             @In @QString @CB13Text, @In @QString @CB14Text, @In @QString @CB15Text,
  3390.             @In @QString @CB16Text, 
  3391.             @InOut @Integer @CB1Selected, @InOut @Integer @CB2Selected, 
  3392.             @InOut @Integer @CB3Selected, @InOut @Integer @CB4Selected, 
  3393.             @InOut @Integer @CB5Selected, @InOut @Integer @CB6Selected,
  3394.             @InOut @Integer @CB7Selected, @InOut @Integer @CB8Selected, 
  3395.             @InOut @Integer @CB9Selected, @InOut @Integer @CB10Selected,
  3396.             @InOut @Integer @CB11Selected, @InOut @Integer @CB12Selected,
  3397.             @InOut @Integer @CB13Selected, @InOut @Integer @CB14Selected,
  3398.             @InOut @Integer @CB15Selected, @InOut @Integer @CB16Selected,
  3399.             @InOut @Integer @CB1Enabled, @InOut @Integer @CB2Enabled, 
  3400.             @InOut @Integer @CB3Enabled, @InOut @Integer @CB4Enabled, 
  3401.             @InOut @Integer @CB5Enabled, @InOut @Integer @CB6Enabled,
  3402.             @InOut @Integer @CB7Enabled, @InOut @Integer @CB8Enabled, 
  3403.             @InOut @Integer @CB9Enabled, @InOut @Integer @CB10Enabled,
  3404.             @InOut @Integer @CB11Enabled, @InOut @Integer @CB12Enabled,
  3405.             @InOut @Integer @CB13Enabled, @InOut @Integer @CB14Enabled,
  3406.             @InOut @Integer @CB15Enabled, @InOut @Integer @CB16Enabled,
  3407.             @In @QString @PB1Text, @In @QString @PB2Text, @In @QString @PB3Text, 
  3408.             @In @QString @PB4Text, @In @QString @PB5Text)
  3409.  
  3410.    @MapEventToFunc(@DlgInitEvent, @DialogCheckInit)
  3411.    @EnableEventMap(@DlgInitEvent)
  3412.  
  3413.    @BeginWinDialog("DialogCheck","@DialogTitle",8200)
  3414.       @StaticText(310, "@ST1Text")
  3415.       @StaticText(510, "@ST2Text")
  3416.  
  3417.       @CB(1000, "@CB1Text", @CB1Selected)
  3418.       @CB(1001, "@CB2Text", @CB2Selected)
  3419.       @CB(1002, "@CB3Text", @CB3Selected)
  3420.       @CB(1003, "@CB4Text", @CB4Selected)
  3421.       @CB(1004, "@CB5Text", @CB5Selected)
  3422.       @CB(1005, "@CB6Text", @CB6Selected)
  3423.       @CB(1006, "@CB7Text", @CB7Selected)
  3424.       @CB(1007, "@CB8Text", @CB8Selected)
  3425.       @CB(1008, "@CB9Text", @CB9Selected)
  3426.       @CB(1009, "@CB10Text", @CB10Selected)
  3427.       @CB(1010, "@CB11Text", @CB11Selected)
  3428.       @CB(1011, "@CB12Text", @CB12Selected)
  3429.       @CB(1012, "@CB13Text", @CB13Selected)
  3430.       @CB(1013, "@CB14Text", @CB14Selected)
  3431.       @CB(1014, "@CB15Text", @CB15Selected)
  3432.       @CB(1015, "@CB16Text", @CB16Selected)
  3433.  
  3434.       @Button(100, "@PB1Text")
  3435.       @Button(110, "@PB2Text")
  3436.       @Button(120, "@PB3Text")
  3437.       @Button(130, "@PB4Text")
  3438.       @Button(140, "@PB5Text")
  3439.  
  3440.       @Bitmap(200, "@Bitmap1Title", @Bitmap1ID)
  3441.  
  3442.    @ExecuteDialog
  3443.  
  3444.       @If (@CB(1000)) @CB1Selected = @TRUE @Else @CB1Selected = @FALSE @Endif
  3445.       @If (@CB(1001)) @CB2Selected = @TRUE @Else @CB2Selected = @FALSE @Endif
  3446.       @If (@CB(1002)) @CB3Selected = @TRUE @Else @CB3Selected = @FALSE @Endif
  3447.       @If (@CB(1003)) @CB4Selected = @TRUE @Else @CB4Selected = @FALSE @Endif
  3448.       @If (@CB(1004)) @CB5Selected = @TRUE @Else @CB5Selected = @FALSE @Endif
  3449.       @If (@CB(1005)) @CB6Selected = @TRUE @Else @CB6Selected = @FALSE @Endif
  3450.       @If (@CB(1006)) @CB7Selected = @TRUE @Else @CB7Selected = @FALSE @Endif
  3451.       @If (@CB(1007)) @CB8Selected = @TRUE @Else @CB8Selected = @FALSE @Endif
  3452.       @If (@CB(1008)) @CB9Selected = @TRUE @Else @CB9Selected = @FALSE @Endif
  3453.       @If (@CB(1009)) @CB10Selected = @TRUE @Else @CB10Selected = @FALSE @Endif
  3454.       @If (@CB(1010)) @CB11Selected = @TRUE @Else @CB11Selected = @FALSE @Endif
  3455.       @If (@CB(1011)) @CB12Selected = @TRUE @Else @CB12Selected = @FALSE @Endif
  3456.       @If (@CB(1012)) @CB13Selected = @TRUE @Else @CB13Selected = @FALSE @Endif
  3457.       @If (@CB(1013)) @CB14Selected = @TRUE @Else @CB14Selected = @FALSE @Endif
  3458.       @If (@CB(1014)) @CB15Selected = @TRUE @Else @CB15Selected = @FALSE @Endif
  3459.       @If (@CB(1015)) @CB16Selected = @TRUE @Else @CB16Selected = @FALSE @Endif
  3460.  
  3461.       @If (@Button(100))
  3462.          @iRetVal = 1
  3463.       @ElseIf (@Button(110))
  3464.          @iRetVal = 2
  3465.       @ElseIf (@Button(120))
  3466.          @iRetVal = 3
  3467.       @ElseIf (@Button(130))
  3468.          @iRetVal = 4
  3469.       @ElseIf (@Button(140))
  3470.          @iRetVal = 5
  3471.       @Else
  3472.          @iRetVal = 6
  3473.       @EndIf
  3474.  
  3475.    @EndWinDialog
  3476.  
  3477.    @DisableEventMap(@DlgInitEvent)
  3478.  
  3479.    @Return (@iRetVal)
  3480.  
  3481. @EndFunc
  3482.  
  3483. //----------------------------------------------------------
  3484.  
  3485. @DefineFunc @Void @EventHandler @Dialog2CBInit(@Void)
  3486.  
  3487.    @DlgCtrlShow(500,(@StrCmp(@ST2Text, "") != 0))
  3488.  
  3489.    @DlgCtrlShow(1000,(@StrCmp(@CB1Text, "") != 0))
  3490.    @DlgCtrlShow(1001,(@StrCmp(@CB2Text, "") != 0))
  3491.  
  3492. //   @DlgCtrlEnable(110, (@CB1Selected || @CB2Selected))
  3493.  
  3494.    @DlgCtrlEnable(1000,@CB1Enabled)
  3495.    @DlgCtrlEnable(1001,@CB2Enabled)
  3496.  
  3497.    @DlgCtrlShow(100,(@StrCmp(@PB1Text, "") != 0))
  3498.    @DlgCtrlShow(110,(@StrCmp(@PB2Text, "") != 0))
  3499.    @DlgCtrlShow(120,(@StrCmp(@PB3Text, "") != 0))
  3500.    @DlgCtrlShow(130,(@StrCmp(@PB4Text, "") != 0))
  3501.    @DlgCtrlShow(140,(@StrCmp(@PB5Text, "") != 0))
  3502.  
  3503.    @Return()
  3504. @EndFunc
  3505.  
  3506. //----------------------------------------------------------
  3507.  
  3508. @DefineFunc @Integer @Dialog2CB(@In @QString @DialogTitle, 
  3509.             @In @QString @Bitmap1Title, @In @Integer @Bitmap1ID,
  3510.             @In @QString @ST1Text, @In @QString @ST2Text,
  3511.             @In @QString @CB1Text, @In @QString @CB2Text, 
  3512.             @InOut @Integer @CB1Selected, @InOut @Integer @CB2Selected, 
  3513.             @InOut @Integer @CB1Enabled, @InOut @Integer @CB2Enabled, 
  3514.             @In @QString @PB1Text, @In @QString @PB2Text, @In @QString @PB3Text, 
  3515.             @In @QString @PB4Text, @In @QString @PB5Text)
  3516.  
  3517.    @MapEventToFunc(@DlgInitEvent, @Dialog2CBInit)
  3518.    @EnableEventMap(@DlgInitEvent)
  3519.  
  3520.    @BeginWinDialog("Dialog2CB","@DialogTitle",8800)
  3521.       @StaticText(310, "@ST1Text")
  3522.       @StaticText(510, "@ST2Text")
  3523.  
  3524.       @CB(1000, "@CB1Text", @CB1Selected)
  3525.       @CB(1001, "@CB2Text", @CB2Selected)
  3526.  
  3527.       @Button(100, "@PB1Text")
  3528.       @Button(110, "@PB2Text")
  3529.       @Button(120, "@PB3Text")
  3530.       @Button(130, "@PB4Text")
  3531.       @Button(140, "@PB5Text")
  3532.  
  3533.       @Bitmap(200, "@Bitmap1Title", @Bitmap1ID)
  3534.  
  3535.    @ExecuteDialog
  3536.  
  3537.       @If (@CB(1000)) @CB1Selected = @TRUE @Else @CB1Selected = @FALSE @Endif
  3538.       @If (@CB(1001)) @CB2Selected = @TRUE @Else @CB2Selected = @FALSE @Endif
  3539.  
  3540.       @If (@Button(100))
  3541.          @iRetVal = 1
  3542.       @ElseIf (@Button(110))
  3543.          @iRetVal = 2
  3544.       @ElseIf (@Button(120))
  3545.          @iRetVal = 3
  3546.       @ElseIf (@Button(130))
  3547.          @iRetVal = 4
  3548.       @ElseIf (@Button(140))
  3549.          @iRetVal = 5
  3550.       @Else
  3551.          @iRetVal = 6
  3552.       @EndIf
  3553.  
  3554.    @EndWinDialog
  3555.  
  3556.    @DisableEventMap(@DlgInitEvent)
  3557.  
  3558.    @Return (@iRetVal)
  3559.  
  3560. @EndFunc
  3561.  
  3562. //----------------------------------------------------------
  3563. @DefineFunc @Void @EventHandler @DialogReadOnlyInit(@Void)
  3564.  
  3565.    @DlgCtrlShow(100,(@StrCmp(@PB1Text, "") != 0))
  3566.    @DlgCtrlShow(110,(@StrCmp(@PB2Text, "") != 0))
  3567.    @DlgCtrlShow(120,(@StrCmp(@PB3Text, "") != 0))
  3568.    @DlgCtrlShow(130,(@StrCmp(@PB4Text, "") != 0))
  3569.    @DlgCtrlShow(140,(@StrCmp(@PB5Text, "") != 0))
  3570.  
  3571.    @Return()
  3572. @EndFunc
  3573.  
  3574. //----------------------------------------------------------
  3575. @DefineFunc @Integer @DialogReadOnly(@In @QString @DialogTitle,
  3576.             @In @QString @ST1Text, @In @QString @ST2Text, 
  3577.             @In @QString @RE1,
  3578.             @In @QString @PB1Text, @In @QString @PB2Text, @In @QString @PB3Text,
  3579.             @In @QString @PB4Text, @In @QString @PB5Text)
  3580.  
  3581.    @MapEventToFunc(@DlgInitEvent, @DialogReadOnlyInit)
  3582.    @EnableEventMap(@DlgInitEvent)
  3583.  
  3584.    @BeginWinDialog("DialogReadOnly","@DialogTitle",8300)
  3585.       @StaticText(310, "@ST1Text@qCRLF@qCRLF@ST2Text")
  3586.  
  3587.       @EditBox(410, "@RE1")
  3588.  
  3589.       @Button(100, "@PB1Text")
  3590.       @Button(110, "@PB2Text")
  3591.       @Button(120, "@PB3Text")
  3592.       @Button(130, "@PB4Text")
  3593.       @Button(140, "@PB5Text")
  3594.  
  3595.    @ExecuteDialog
  3596.       @If (@Button(100))
  3597.          @iRetVal = 1
  3598.       @ElseIf (@Button(110))
  3599.          @iRetVal = 2
  3600.       @ElseIf (@Button(120))
  3601.          @iRetVal = 3
  3602.       @ElseIf (@Button(130))
  3603.          @iRetVal = 4
  3604.       @ElseIf (@Button(150))
  3605.          @iRetVal = 5
  3606.       @Else
  3607.          @iRetVal = 6
  3608.       @EndIf
  3609.  
  3610.    @EndWinDialog
  3611.  
  3612.    @DisableEventMap(@DlgInitEvent)
  3613.  
  3614.    @Return (@iRetVal)
  3615. @EndFunc
  3616.  
  3617. //----------------------------------------------------------
  3618. @DefineFunc @Void @EventHandler @DialogReadOnlyBmpInit(@Void)
  3619.  
  3620.    @DlgCtrlShow(500,(@StrCmp(@ST2Text, "") != 0))
  3621.    @DlgCtrlShow(100,(@StrCmp(@PB1Text, "") != 0))
  3622.    @DlgCtrlShow(110,(@StrCmp(@PB2Text, "") != 0))
  3623.    @DlgCtrlShow(120,(@StrCmp(@PB3Text, "") != 0))
  3624.    @DlgCtrlShow(130,(@StrCmp(@PB4Text, "") != 0))
  3625.    @DlgCtrlShow(140,(@StrCmp(@PB5Text, "") != 0))
  3626.  
  3627.    @Return()
  3628. @EndFunc
  3629.  
  3630. //----------------------------------------------------------
  3631. @DefineFunc @Integer @DialogReadOnlyBmp(@In @QString @DialogTitle,
  3632.             @In @QString @Bitmap1Title, @In @Integer @Bitmap1ID,
  3633.             @In @QString @ST1Text, @In @QString @ST2Text, 
  3634.             @In @QString @RE1,
  3635.             @In @QString @PB1Text, @In @QString @PB2Text, @In @QString @PB3Text,
  3636.             @In @QString @PB4Text, @In @QString @PB5Text)
  3637.  
  3638.    @MapEventToFunc(@DlgInitEvent, @DialogReadOnlyBmpInit)
  3639.    @EnableEventMap(@DlgInitEvent)
  3640.  
  3641.    @BeginWinDialog("DialogReadOnlyBmp","@DialogTitle",8600)
  3642.  
  3643.       @Bitmap(200, "@Bitmap1Title", @Bitmap1ID)
  3644.  
  3645.       @StaticText(310, "@ST1Text")
  3646.  
  3647.       @EditBox(410, "@RE1")
  3648.  
  3649.       @StaticText(510, "@ST2Text")
  3650.  
  3651.       @Button(100, "@PB1Text")
  3652.       @Button(110, "@PB2Text")
  3653.       @Button(120, "@PB3Text")
  3654.       @Button(130, "@PB4Text")
  3655.       @Button(140, "@PB5Text")
  3656.  
  3657.    @ExecuteDialog
  3658.       @If (@Button(100))
  3659.          @iRetVal = 1
  3660.       @ElseIf (@Button(110))
  3661.          @iRetVal = 2
  3662.       @ElseIf (@Button(120))
  3663.          @iRetVal = 3
  3664.       @ElseIf (@Button(130))
  3665.          @iRetVal = 4
  3666.       @ElseIf (@Button(150))
  3667.          @iRetVal = 5
  3668.       @Else
  3669.          @iRetVal = 6
  3670.       @EndIf
  3671.  
  3672.    @EndWinDialog
  3673.  
  3674.    @DisableEventMap(@DlgInitEvent)
  3675.  
  3676.    @Return (@iRetVal)
  3677. @EndFunc
  3678.  
  3679.  
  3680. //
  3681. //
  3682. //
  3683. //File: SetDisp /////////////////////////////////////
  3684. //
  3685. //CIDVars: TBD
  3686. //
  3687. //Globals changed: none
  3688. //
  3689. @DefineProto
  3690.    @Integer @SetDisplay(@Void)
  3691. @EndProto
  3692. //
  3693. //
  3694.  
  3695. //----------------------------------------------------------
  3696. @DefineFunc @Integer @SetDisplay(@Void)  // sets background text, bitmaps, colour
  3697.    //the defaults are mostly ok for show name, except for font size and colour
  3698.    //@ShowName(1,,"Helvetica",20,,,@RGB(255,0,0))
  3699.    //@ShowName(1,@qProductName,"Arial",3,,,@RGB(255,0,0))
  3700.  
  3701.    @If ((@Platform == @OS2) && (@WinScreenCaps(8) < 1000))
  3702.       @qDialogBmp = @qDialogBmp8
  3703.       @iDialogBmpID = @iDialogBmpID8
  3704.    @Else
  3705.       @qDialogBmp = @qDialogBmp10
  3706.       @iDialogBmpID = @iDialogBmpID10
  3707.    @EndIf
  3708.  
  3709.    @qWelcomeBitmap = @qDialogBmp
  3710.    @iWelcomeBitmapID = @iDialogBmpID
  3711.    @qCopyrightBitmap = @qDialogBmp
  3712.    @iCopyrightBitmapID = @iDialogBmpID
  3713.    @qAskRebootBitMap = @qDialogBmp
  3714.    @iAskRebootBitmapID = @iDialogBmpID
  3715.    @qCustomBitmap = @qDialogBmp
  3716.    @iCustomBitmapID = @iDialogBmpID
  3717.    @qInstallTypeBitmap = @qDialogBmp
  3718.    @iInstallTypeBitmapID = @iDialogBmpID
  3719.    @qConfirmBitmap = @qDialogBmp
  3720.    @iConfirmBitmapID = @iDialogBmpID
  3721.    @qSetEnvBitmap = @qDialogBmp
  3722.    @iSetEnvBitmapID = @iDialogBmpID
  3723.    @qUninstallBitmap = @qDialogBmp
  3724.    @iUninstallBitmapID = @iDialogBmpID
  3725.    @qDetInstDirBitmap = @qDialogBmp
  3726.    @iDetInstDirBitmapID = @iDialogBmpID
  3727.    @qGetProductDirBitmap = @qDialogBmp
  3728.    @iGetProductDirBitmapID = @iDialogBmpID
  3729.    @qInstallActionsBitmap = @qDialogBmp
  3730.    @iInstallActionsBitmapID = @iDialogBmpID
  3731.    @qRebuildDialogBitmap = @qDialogBmp
  3732.    @iRebuildDialogBitmapID = @iDialogBmpID
  3733.    @qConfirmPathsBitmap = @qDialogBmp
  3734.    @iConfirmPathsBitmapID = @iDialogBmpID
  3735.    @qProdInfoRemovedBitmap = @qDialogBmp
  3736.    @iProdInfoRemovedBitmapID = @iDialogBmpID
  3737.    @qGetInstDirBitmap = @qDialogBmp
  3738.    @iGetInstDirBitmapID = @iDialogBmpID
  3739.    @iDialogRes = @iNext
  3740.    @Return(@iDialogRes)
  3741. @EndFunc
  3742. //
  3743. //
  3744. //
  3745. //File: cmdline.dat /////////////////////////////////
  3746. //
  3747. //CIDVars: TBD
  3748. //
  3749. //Globals changed: @DebugMode, @ShowAllToggle, @iResponseFile
  3750. //   @AddMode,@uninstallMode, @UpdateMode, @DeleteMode, @RebuildMode,
  3751. //
  3752. @DefineProto
  3753.    @Void @ProcessCmdLine(@Void)
  3754. @EndProto
  3755. //
  3756. //
  3757.  
  3758. //----------------------------------------------------------
  3759. @DefineFunc @Void @ProcessCmdLine(@Void)
  3760.    @TempInt = 0
  3761.  
  3762. loop:
  3763.    @TempStr = "@StrToken(@CommandLine, @TempInt)"
  3764.    @If(@StrLen(@TempStr) > 0)
  3765.       @If(@StrCmp(@StrUpr(@TempStr), "-DEBUG") == 0)
  3766.          @DebugMode = @True
  3767. //      @ElseIf(@StrCmp(@StrUpr(@TempStr), "-SHOWALL") == 0)
  3768.          @ShowAllToggle = @True
  3769.       @ElseIf(@StrCmp(@StrUpr(@TempStr), "-AUTOPLAY") == 0)
  3770.          @AutorunMode = @True
  3771.       @ElseIf(@StrCmp(@StrUpr(@TempStr), "-UNINSTALL") == 0)
  3772.          @AddMode = @False
  3773.          @DeleteMode = @False
  3774.          @UpdateMode = @False
  3775.          @RebuildMode = @False
  3776.          @UninstallMode = @True
  3777.       @ElseIf(@StrCmp(@StrUpr(@TempStr), "-REBUILD") == 0)
  3778.          @UninstallMode = @False
  3779.          @AddMode = @False
  3780.          @DeleteMode = @False
  3781.          @UpdateMode = @False
  3782.          @RebuildMode = @True
  3783.       @ElseIf(@StrCmp(@StrUpr(@TempStr), "-UPDATE") == 0)
  3784.          @UninstallMode = @False
  3785.          @AddMode = @False
  3786.          @DeleteMode = @False
  3787.          @RebuildMode = @False
  3788.          @UpdateMode = @True
  3789.       @ElseIf(@StrCmp(@StrUpr(@TempStr), "-ADD") == 0)
  3790.          @UninstallMode = @False
  3791.          @DeleteMode = @False
  3792.          @UpdateMode = @False
  3793.          @RebuildMode = @False
  3794.          @AddMode = @True
  3795.       @ElseIf(@StrCmp(@StrHead(@TempStr, 1), "@@") == 0)
  3796.          @qTempStr2 = @StrTail(@TempStr, (@StrLen(@TempStr) - 1))
  3797.          @iResponseFile = @True
  3798.  
  3799.          @If(@StrLen(@qTempStr2) == 0)
  3800.             @qTempStr2 = "@qDefaultsFilename"
  3801.          @EndIf
  3802.  
  3803.          @If((@StrFind(@qTempStr2, "\\") == -1) && (@StrFind(@qTempStr2, ":") == -1))
  3804.             @qTempStr2 = "@StartUpDrive:@StartUpDir\\@qTempStr2"
  3805.          @EndIf
  3806.  
  3807.          @If(!@Exists("@qTempStr2"))
  3808.             @MsgBox("ERROR: Response file \"@qTempStr2\" not found!")
  3809.             @ErrorExit("CMDLINE.DAT: Response file not found!", @iAbort)
  3810.          @EndIf
  3811.       @EndIf
  3812.       @TempInt = (@TempInt + 1)
  3813.       @Goto loop
  3814.    @EndIf
  3815.    @If(@iResponseFile)
  3816.       @ShowAll("@@ProcessCmdLine","CID Response filename = @qTempStr2")
  3817.       @DoResponse(@qTempStr2)
  3818.    @EndIf
  3819.    @Return()
  3820. @EndFunc
  3821. @DefineProto
  3822.    @Integer @DialogAutoplay(@In @QString @BitmapTitle,@In @QString @DialogTitle,
  3823.             @In @QString @ST1Text, @In @QString @ST2Text,
  3824.             @In @QString @PB1Text, @In @QString @PB2Text, @In @QString @PB3Text,
  3825.             @In @QString @PB4Text, @In @QString @PB5Text, @In @QString @PB6Text,
  3826.             @In @QString @PB7Text) 
  3827.    @Integer @DisplayAutorun(@Void)
  3828. @EndProto
  3829.  
  3830. //File: Autorun /////////////////////////////////////
  3831. //
  3832. //CIDVars: none
  3833. //
  3834. //Globals changed: none
  3835. //
  3836.  
  3837. @DefineFunc @Integer @DisplayAutorun(@Void)
  3838.  
  3839. laAutorun:
  3840.    @iDialogRes = @DialogAutoplay(@qDialogBmp,@qAutorunName,
  3841.                                  @qAutorunText1,@qAutorunText2,
  3842.                                  @qAutorunPreview,@qAutorunExplore,@qAutorunReadme,
  3843.                                  @qAutorunInstall,@qAutorunServer,@qAutorunBrowseHelp,    
  3844.                                  @qAutorunExit)
  3845.  
  3846.    @If (@iDialogRes == 1)
  3847.       @DisplayHelp(@qPreviewFile)
  3848.       @Goto laAutorun        
  3849.  
  3850.    @ElseIf (@iDialogRes == 2)
  3851.       @If (@ShowAllToggle)
  3852.          @MsgBox("Autorun: Ensure EXPLORER is replaced for OS/2")
  3853.       @Endif
  3854.       @WinExec("explorer @StartupDrive:",5)
  3855.       @Goto laAutorun
  3856.   
  3857.    @ElseIf (@iDialogRes == 3)
  3858.       @If (@ShowAllToggle)
  3859.          @MsgBox("Autorun: Ensure NOTEPAD is replaced for OS/2")
  3860.       @Endif
  3861.       @WinExec("notepad @StartupDrive:@qReadmeFile",1)
  3862.       @Goto laAutorun
  3863.  
  3864.    @ElseIf (@iDialogRes == 4)
  3865.       @iFuncRes = @iNext
  3866.  
  3867.    @ElseIf (@iDialogRes == 5)
  3868.       @DisplayHelp(@qTeamEnvyFile)
  3869.       @Goto laAutorun
  3870.  
  3871.    @ElseIf (@iDialogRes == 6)
  3872.       @DisplayHelp(@qAutorunHelpFile)
  3873.       @Goto laAutorun
  3874.  
  3875.    @ElseIf (@iDialogRes == 7)
  3876.       @iFuncRes = @Dialog1s2p(@qCancelTitle, @qCancelText1, @qYes, @qNo)
  3877.       @If (@iFuncRes == 1)        
  3878.          @ReturnValue(0)
  3879.          @Exit
  3880.       @Else
  3881.          @Goto laAutorun
  3882.       @Endif
  3883.  
  3884.    @Else 
  3885.       @MsgBox("ERROR DEBUG INTERNAL: unknown function in Autoplay menu")
  3886.       @Exit
  3887.    @EndIf
  3888.  
  3889.    @Return(@iFuncRes)
  3890. @EndFunc
  3891. @DefineFunc @Integer @DialogAutoplay(@In @QString @BitmapTitle,
  3892.                                      @In @QString @DialogTitle,
  3893.                                      @In @QString @ST1Text,
  3894.                                      @In @QString @ST2Text,
  3895.                                      @In @QString @PB1Text,
  3896.                                      @In @QString @PB2Text,
  3897.                                      @In @QString @PB3Text,
  3898.                                      @In @QString @PB4Text,
  3899.                                      @In @QString @PB5Text,
  3900.                                      @In @QString @PB6Text,
  3901.                                      @In @QString @PB7Text)
  3902.  
  3903.   @BeginWinDialog("Autoplay","@DialogTitle",9041)
  3904.  
  3905.       @Bitmap(200, "@BitmapTitle")
  3906.  
  3907.       @StaticText(310, "@ST1Text")
  3908.       @StaticText(410, "@ST2Text")
  3909.  
  3910.       @Button(100, "@PB1Text")
  3911.       @Button(110, "@PB2Text")
  3912.       @Button(120, "@PB3Text")
  3913.       @Button(130, "@PB4Text")
  3914.       @Button(140, "@PB5Text")
  3915.       @Button(150, "@PB6Text")
  3916.       @Button(160, "@PB7Text")
  3917.  
  3918.    @ExecuteDialog
  3919.  
  3920.       @If (@Button(100)) 
  3921.          @iRetVal = 1
  3922.       @ElseIf (@Button(110))
  3923.          @iRetVal = 2
  3924.       @ElseIf (@Button(120))
  3925.          @iRetVal = 3
  3926.       @ElseIf (@Button(130))
  3927.          @iRetVal = 4
  3928.       @ElseIf (@Button(140))
  3929.          @iRetVal = 5
  3930.       @ElseIf (@Button(150))
  3931.          @iRetVal = 6
  3932.       @Else
  3933.          @iRetVal = 7
  3934.       @Endif
  3935.  
  3936.    @EndWinDialog
  3937.  
  3938.    @Return (@iRetVal)
  3939. @EndFunc
  3940. //
  3941. //
  3942. //
  3943. //File: Copyright /////////////////////////////////////
  3944. //
  3945. //CIDVars: none
  3946. //
  3947. //Globals changed: none
  3948. //
  3949. @DefineProto
  3950.    @Integer @DisplayCopyright(@Void)
  3951. @EndProto
  3952. //
  3953. //
  3954.  
  3955.  
  3956. //----------------------------------------------------------
  3957. @DefineFunc @Integer @DisplayCopyright(@Void)
  3958. laDisplayCopyright:
  3959.  
  3960. @iDialogRes = @iNext
  3961. //@ShowBMP(0, 1, 60,"vaCopy", 2)
  3962.  
  3963.    @If ( (!@CIDBypass(@qForceCopyright)) && (@StrCmp(@qCopyrightBitmap, "")!=0) && (@StrCmp(@qCopyrightText1, "")!=0))
  3964. //      @iDialogRes = @DialogBitmap@qCopyrightTitle,@qCopyrightBitmap,@iCopyrightBitmapID
  3965. //                    ,@qNext,@qCancel,"","","")
  3966.       @iDialogRes = @DialogText(@qCopyrightTitle,
  3967. @qCopyrightBitmap,
  3968. @iCopyrightBitmapID,
  3969.                     "@qCopyrightText1",
  3970.                     "@qCopyrightText2\n@qCopyrightText3",
  3971.                     "@qCopyrightText4\n@qCopyrightText5",
  3972.                     "@qCopyrightText6\n@qCopyrightText7\n@qCopyrightText8",
  3973.                     "","",
  3974.                     "",@qNext,@qCancel,"","")
  3975.       @If (@iDialogRes == 2)
  3976.          @iDialogRes = @iNext
  3977.       @ElseIf (@iDialogRes == 3)
  3978.          @ConfirmCancel()
  3979.          @Goto laDisplayCopyright
  3980.       @Else 
  3981.          @ErrorExit(@qCopyrightError1,@iAbort)
  3982.       @EndIf
  3983.    @Else
  3984.       @iDialogRes = @iNext
  3985.    @EndIf
  3986.  
  3987. //@EraseBMP(0)
  3988.    @Return(@iDialogRes)
  3989. @EndFunc
  3990.  
  3991.  
  3992.  
  3993. //
  3994. //
  3995. //
  3996. //File: Welcome /////////////////////////////////////
  3997. //
  3998. //CIDVars: none
  3999. //
  4000. //Globals changed: none
  4001. //
  4002. @DefineProto
  4003.    @Integer @DisplayWelcome(@Void)
  4004. @EndProto
  4005. //
  4006. //
  4007.  
  4008.  
  4009. //----------------------------------------------------------
  4010. @DefineFunc @Integer @DisplayWelcome(@Void)
  4011. laDisplayWelcome:
  4012.  
  4013.    @If (!@CIDBypass(@qForceWelcome))
  4014.       @iDialogRes = @DialogText(@qWelcomeTitle,@qWelcomeBitmap,
  4015.                     @iWelcomeBitmapID,@qWelcomeText1,@qWelcomeText2,
  4016.                     @qWelcomeText4,"",@qWelcomeCopyright1,
  4017.                     @qWelcomeCopyright2,"",@qNext,@qCancel,
  4018.                     "","")
  4019.  
  4020.  
  4021.       @If (@iDialogRes == 1)
  4022.          @ShowAll("Welcome", "Remove 1st button test")
  4023.          @Goto laDisplayWelcome
  4024.   
  4025.       @ElseIf (@iDialogRes == 2)
  4026.          @iDialogRes = @iNext
  4027.  
  4028.       @ElseIf (@iDialogRes == 3)
  4029.          @ConfirmCancel()
  4030.          @Goto laDisplayWelcome
  4031.  
  4032.       @ElseIf (@iDialogRes == 4) 
  4033.          @ShowAll("Welcome", "Remove 4th button test")
  4034.          @Goto laDisplayWelcome
  4035.  
  4036.       @ElseIf (@iDialogRes == 5)
  4037.          @ShowAll("Welcome", "Remove 5th button test")
  4038.          @Goto laDisplayWelcome
  4039.  
  4040.       @Else 
  4041.          @ErrorExit(@qWelcomeError1,@iAbort)
  4042.       @EndIf
  4043.    @Else
  4044.       @iDialogRes = @iNext
  4045.    @EndIf
  4046.  
  4047.    @Return(@iDialogRes)
  4048. @EndFunc
  4049.  
  4050.  
  4051.  
  4052.  
  4053.  
  4054.  
  4055.  
  4056.  
  4057. //
  4058. //
  4059. //
  4060. //File: ChkExist /////////////////////////////////////
  4061. //
  4062. //CIDVars: TBD
  4063. //
  4064. //Globals changed: none
  4065. //
  4066. @DefineProto
  4067.    @Integer @CheckExisting(@Void)
  4068. @EndProto
  4069. //
  4070. //
  4071.  
  4072. //----------------------------------------------------
  4073. @DefineFunc @Integer @CheckExisting(@Void)
  4074.    //@iDialogRes = @iNext
  4075.    @Return(@iDialogRes)
  4076. @EndFunc
  4077. //
  4078. //
  4079. //
  4080. //File: ChkReqs /////////////////////////////////////
  4081. //
  4082. //CIDVars: TBD
  4083. //
  4084. //Globals changed: none
  4085. //
  4086. @DefineProto
  4087.    @Integer @CheckPrereqs(@Void)
  4088.    @Void @CheckPrereqOS(@Void)
  4089.    @QString @GetPrereqOS(@Void)
  4090.    @Void @CheckPrereqCPU(@Void)
  4091.    @Void @CheckPrereqRAM(@Void)
  4092.    @Void @CheckPrereqRes(@Void)
  4093.    @Void @CheckPrereqColours(@Void)
  4094.    @Void @DisplayPrereqWarning(@In @QString @WarningMessage)
  4095.    @QString @GetTargetSystemPlatform(@Void)
  4096. @EndProto
  4097. //
  4098. //
  4099.  
  4100. //----------------------------------------------------
  4101. @DefineFunc @Integer @CheckPrereqs(@Void)
  4102.  
  4103.    @If (@iFuncRes == @iBack)
  4104.         @Return (@iBack)
  4105.    @Else
  4106.       @CheckPrereqOS()
  4107.       @CheckPrereqCPU()
  4108.       @CheckPrereqRAM()
  4109.       @CheckPrereqRes()
  4110. //      @CheckPrereqColours()
  4111.    @EndIf
  4112.    @Return(@iNext)
  4113.  
  4114. @EndFunc
  4115.  
  4116.  
  4117. //----------------------------------------------------
  4118. @DefineFunc @Void @CheckPrereqOS(@Void)
  4119.  
  4120.    //Ensure that the operating system meets the requirements
  4121.    @ShowAll("@@CheckPrereqOS()", "@@GetPrereqOS()")
  4122.    @If (@Platform == @iPrereqOS)
  4123.       @If(@iPrereqOS == @Windows)
  4124.          @If(@SubPlatform == @WindowsNT && @iPrereqNTVer != 0)
  4125.             @If (((@WinMajor * 100) + @WinMinor) < @iPrereqNTVer)
  4126.                @If (((@WinMajor * 100) + @WinMinor) < @iMinPrereqNTVer)
  4127.                   @ErrorExit(@GetPrereqOS(), @iAbort)
  4128.                @Else
  4129.                   @DisplayPrereqWarning(@GetPrereqOS())
  4130.                @EndIf
  4131.             @EndIf
  4132.          @ElseIf (@SubPlatform == @Windows95 && @iPrereqWin95Ver != 0)
  4133.          @Else
  4134.             @ErrorExit(@GetPrereqOS(), @iAbort)
  4135.          @EndIf
  4136.       @ElseIf(@iPrereqOS == @OS2)
  4137.          @If (((@OSMajor * 10) + @OSMinor) < @iPrereqOS2Ver)
  4138.             @If (((@OSMajor * 10) + @OSMinor) < @iMinPrereqOS2Ver)
  4139.                @ErrorExit(@GetPrereqOS(), @iAbort)
  4140.             @Else
  4141.                @DisplayPrereqWarning(@GetPrereqOS())
  4142.             @EndIf
  4143.          @EndIf
  4144.       @EndIf
  4145.    @Else
  4146.       @ErrorExit(@GetPrereqOS(), @iAbort)
  4147.    @EndIf
  4148.  
  4149.   @Return()
  4150. @EndFunc
  4151.  
  4152.  
  4153. //----------------------------------------------------
  4154. @DefineFunc @Void @CheckPrereqCPU(@Void)
  4155.  
  4156.    //Ensure that the processor meets the requirements
  4157.    @ShowAll("@@CheckPrereqCPU()", "@qCheckSysReqsCPU1 80@iPrereqCPU.@qCRLF@qCheckSysReqsCPU2 80@CPU.")
  4158.    @If (@CPU < @iPrereqCPU)
  4159.       @If (@CPU < @iMinPrereqCPU)
  4160.          @ErrorExit("@qCheckSysReqsCPU1 80@iPrereqCPU.@qCRLF@qCheckSysReqsCPU2 80@CPU.", @iAbort)
  4161.       @Else
  4162.          @DisplayPrereqWarning("@qCheckSysReqsCPU1 80@iPrereqCPU.@qCRLF@qCheckSysReqsCPU2 80@CPU.")
  4163.       @EndIf
  4164.    @EndIf
  4165.  
  4166.   @Return()
  4167. @EndFunc
  4168.  
  4169.  
  4170. //----------------------------------------------------
  4171. @DefineFunc @Void @CheckPrereqRAM(@Void)
  4172.  
  4173.    //Ensure that the memory meets the requirements
  4174.    @ShowAll("@@CheckPrereqRAM()", "@qCheckSysReqsRAM1 @iPrereqRAM.@qCRLF@qCheckSysReqsRAM2 @Eval((@RAMTotal/1024)/1000).")
  4175.    @If (@Eval (((@RAMTotal/1024)/1000) + 2) < @iPrereqRAM)
  4176.       @If (@Eval ((@RAMTotal/1024)/1000) < @iMinPrereqRAM)
  4177.          @ErrorExit("@qCheckSysReqsRAM1 @iPrereqRAM.@qCRLF@qCheckSysReqsRAM2 @Eval((@RAMTotal/1024)/1000).", @iAbort)
  4178.       @Else
  4179.          @DisplayPrereqWarning("@qCheckSysReqsRAM1 @iPrereqRAM.@qCRLF@qCheckSysReqsRAM2 @Eval((@RAMTotal/1024)/1000).")
  4180.       @EndIf
  4181.    @EndIf
  4182.  
  4183.   @Return()
  4184. @EndFunc
  4185.  
  4186.  
  4187. //----------------------------------------------------
  4188. @DefineFunc @Void @CheckPrereqRes(@Void)
  4189.  
  4190.    //Ensure that the screen resolution meets the requirements
  4191.    @ShowAll("@@CheckPrereqRes()", "@qCheckSysReqsRes1 @iPrereqResWidth X @iPrereqResHeight.@qCRLF@qCheckSysReqsRes2 @XRes X @YRes.")
  4192.    @If (@XRes < @iPrereqResWidth)
  4193.       @If (@XRes < @iMinPrereqResWidth)
  4194.          @ErrorExit("@qCheckSysReqsRes1 @iPrereqResWidth X @iPrereqResHeight.@qCRLF@qCheckSysReqsRes2 @XRes X @YRes.", @iAbort)
  4195.       @Else
  4196.          @DisplayPrereqWarning("@qCheckSysReqsRes1 @iPrereqResWidth X @iPrereqResHeight.@qCRLF@qCheckSysReqsRes2 @XRes X @YRes.")
  4197.       @EndIf
  4198.    @EndIf
  4199.  
  4200.    @Return()
  4201. @EndFunc
  4202.  
  4203.  
  4204. //----------------------------------------------------
  4205. @DefineFunc @Void @CheckPrereqColours(@Void)
  4206.  
  4207.    //Ensure that the number of colors meets the requirements
  4208.    @ShowAll("@@CheckPrereqColours()", "@qCheckSysReqsColours1 @iPrereqColours.@qCRLF@qCheckSysReqsColours2 @NColours.")
  4209.    @If (@NColours < @iPrereqColours)
  4210.       @If (@NColours < @iMinPrereqColours)
  4211.          @ErrorExit("@qCheckSysReqsColours1 @iPrereqColours.@qCRLF@qCheckSysReqsColours2 @NColours.", @iAbort)
  4212.       @Else
  4213.          @DisplayPrereqWarning("@qCheckSysReqsColours1 @iPrereqColours.@qCRLF@qCheckSysReqsColours2 @NColours.")
  4214.       @EndIf
  4215.    @EndIf
  4216.  
  4217.    @Return()
  4218. @EndFunc
  4219.  
  4220.  
  4221. //----------------------------------------------------
  4222. @DefineFunc @Void @DisplayPrereqWarning(@In @QString @qWarningMessage)
  4223.  
  4224.    @If (!@iResponseFile)
  4225.       @iFuncRes = @Ask(@qWarningTitle, @qCheckReqsBitmap, @iCheckReqsBitmapID,
  4226.                            "@qWarningMessage@qCRLF@qCRLF@qContinueORNot", "", "")
  4227.       @If (@iFuncRes == 1)
  4228.       @ElseIf (@iFuncRes == 2)
  4229.          @ErrorExit(@qCheckPrereqsError, @iAbort)
  4230.       @Else
  4231.          @MsgBox(@qErrorInvalidReturn)
  4232.       @EndIf
  4233.    @EndIf
  4234.  
  4235.    @Return()
  4236. @EndFunc
  4237.  
  4238.  
  4239. //----------------------------------------------------
  4240. @DefineFunc @QString @GetPrereqOS(@Void)
  4241.  
  4242.    @If (@iPrereqOS == @Windows)
  4243.       @If (@iPrereqWin95Ver != 0 && @iPrereqNTVer == 0)
  4244.          @qCheckSysReqsOSVer = @qPrereqOSWin95
  4245.       @ElseIf (@iPrereqWin95Ver != 0 && @iPrereqNTVer == @WinNTv35)
  4246.          @qCheckSysReqsOSVer = @qPrereqOSWin95NTv35
  4247.       @ElseIf (@iPrereqWin95Ver != 0 && @iPrereqNTVer == @WinNTv40)
  4248.          @qCheckSysReqsOSVer = @qPrereqOSWin95NTv40
  4249.       @ElseIf (@iPrereqWin95Ver == 0 && @iPrereqNTVer == @WinNTv35)
  4250.          @qCheckSysReqsOSVer = @qPrereqOSNTv35
  4251.       @ElseIf (@iPrereqWin95Ver == 0 && @iPrereqNTVer == @WinNTv40)
  4252.          @qCheckSysReqsOSVer = @qPrereqOSNTv40
  4253.       @Else
  4254.          @ErrorExit(@qPrereqOSError, @iAbort)
  4255.       @EndIf
  4256.    @ElseIf (@iPrereqOS == @OS2)
  4257.       @If (@iPrereqOS2Ver == @OS2v3)
  4258.          @qCheckSysReqsOSVer = @qPrereqOSOS2v3
  4259.       @ElseIf (@iPrereqOS2Ver == @OS2v4)
  4260.          @qCheckSysReqsOSVer = @qPrereqOSOS2v4
  4261.       @Else
  4262.          @ErrorExit(@qPrereqOSError, @iAbort)
  4263.       @EndIf
  4264.    @EndIf
  4265.    @Return("@qCheckSysReqsOSVer@qCRLF@GetTargetSystemPlatform()")
  4266.  
  4267. @EndFunc
  4268.  
  4269.  
  4270. //----------------------------------------------------
  4271. @DefineFunc @QString @GetTargetSystemPlatform(@Void)
  4272.  
  4273.       @If (@Platform == 1)
  4274.            @qTargetSystemPlatform = @qDOSTargetPlatform
  4275.       @ElseIf (@Platform == 2)
  4276.            @qTargetSystemPlatform = @qOS2TargetPlatform
  4277.       @ElseIf (@Platform == 3)
  4278.            @If(@SubPlatform == @WindowsNT)
  4279.               @qTargetSystemPlatform = @qWinNTTargetPlatform
  4280.            @ElseIf (@SubPlatform == @Windows95)
  4281.               @qTargetSystemPlatform = @qWin95TargetPlatform
  4282.            @Else
  4283.               @qTargetSystemPlatform = @qWindowsTargetPlatform
  4284.            @EndIf
  4285.       @Else
  4286.            @ErrorExit(@qPrereqOSError, @iAbort)
  4287.       @EndIf
  4288.  
  4289.   @Return(@qTargetSystemPlatform)
  4290. @EndFunc
  4291.  
  4292.  
  4293. //
  4294. //
  4295. //
  4296. //File: InstType /////////////////////////////////////
  4297. //
  4298. //CIDVars: iInstallType
  4299. //
  4300. //Globals changed: iInstallType,groups and options
  4301. //
  4302. @DefineProto
  4303.    @Integer @GetInstallType(@Void)
  4304.    @Void @InstallTypeSetHelp(@Void)
  4305.    @QString @TypeToFeatures(@Void)
  4306.    @Void @SetCustomFeatures(@Void)
  4307.    @Void @CalcInstallSize(@Void)
  4308.    @Void @SetGroupsString(@In @qString @Str)
  4309.    @Void @EventHandler @InstTypeRBHandler(@In @Int @OldSelected, @In @Int @NewSelected, @In @Int @RangeStart, @In @Int @RangeEnd)
  4310. @EndProto
  4311. //
  4312. //
  4313.  
  4314.  
  4315. //----------------------------------------------------------
  4316. @DefineFunc @Void @EventHandler @InstTypeRBHandler(@In @Int @OldSelected, 
  4317.             @In @Int @NewSelected,  @In @Int @RangeStart,  
  4318.             @In @Int @RangeEnd)
  4319.   @If    (@NewSelected == 1410)
  4320.      @iInstallType = 1
  4321.   @ElseIf(@NewSelected == 1420)
  4322.      @iInstallType = 2
  4323.   @ElseIf(@NewSelected == 1430)
  4324.      @iInstallType = 3
  4325.   @ElseIf(@NewSelected == 1440)
  4326.      @iInstallType = 4
  4327.   @ElseIf(@NewSelected == 1450)
  4328.      @iInstallType = 5
  4329.   @ElseIf(@NewSelected == 1460)
  4330.      @iInstallType = 6
  4331.   @Else
  4332.      @ErrorExit("@qInstallTypeError4")
  4333.   @EndIf
  4334.  
  4335.   @qTMP3 = @TypeToFeatures()
  4336.   @qTMP4 = @CustomFeaturesToGroups(@qTMP3)
  4337.   @SetGroupsString(@qTMP4)
  4338.   @CalcInstallSize()
  4339.   @InstallTypeSetHelp()
  4340.   @StaticText(510, "@qInstallTypeReqKB @Eval(@InstallSize/1024) @qCRLF@qCRLF@qInstallTypeText3 ")
  4341.   @Return()
  4342. @EndFunc
  4343. //----------------------------------------------------------
  4344. @DefineFunc @Integer @GetInstallType(@Void)
  4345.    
  4346. laInstallTypeDialog:
  4347.  
  4348.    @If (!@CIDBypass(@qForceGetInstallType))
  4349.       @iTMP1 = (@IsNull(@qInstallType1) && @IsNull(@qInstallType2) &&
  4350.               @IsNull(@qInstallType3) && @IsNull(@qInstallType4) &&
  4351.               @IsNull(@qInstallType5))
  4352.      
  4353.       @If (!@iTMP1)
  4354.          @qTMP3 = @TypeToFeatures()
  4355.          @qTMP4 = @CustomFeaturesToGroups(@qTMP3)
  4356.          @SetGroupsString(@qTMP4)
  4357.          @CalcInstallSize()
  4358.          @InstallTypeSetHelp()
  4359.  
  4360.          @MapEventToFunc(@DlgRBEvent, @InstTypeRBHandler)
  4361.          @EnableEventMap(@DlgRBEvent)
  4362.          @qInstallTypeText2 = "@qInstallTypeReqKB @Eval(@InstallSize/1024)"
  4363.  
  4364.          @iDialogRes = @DialogRadio(@qInstallTypeTitle, @qInstallTypeBitmap,
  4365.                    @iInstallTypeBitmapID, @qInstallTypeText1,
  4366.                    @qInstallTypeText2, @qInstallTypeText3,
  4367.                    @qInstallType1, @qInstallType2, @qInstallType3,
  4368.                    @qInstallType4, @qInstallType5, @qInstallType6,
  4369.                    @qBack,@qNext,@qCancel, "","",@iInstallType)
  4370.          @DisableEventMap(@DlgRBEvent)
  4371.  
  4372.          @If (@iDialogRes == 1)
  4373.             @iDialogRes = @iBack
  4374.          @ElseIf (@iDialogRes == 2)
  4375.             @iDialogRes = @iNext
  4376.          @ElseIf (@iDialogRes == 3)
  4377.             @ConfirmCancel()
  4378.             @Goto laInstallTypeDialog
  4379.          @ElseIf (@iDialogRes == 4)
  4380.             @ShowAll("GetInstallType", "Remove 4th button test")
  4381.             @Goto laInstallTypeDialog
  4382.          @ElseIf (@iDialogRes == 5)
  4383.             @ShowAll("GetInstallType", "Remove 5th button test")
  4384.             @Goto laInstallTypeDialog
  4385.          @Else
  4386.             @ErrorExit(@qInstallTypeError1, @iAbort) 
  4387.          @EndIf
  4388.       @EndIf
  4389.    @Else   
  4390.       @iDialogRes = @iNext
  4391.    @EndIf
  4392.  
  4393. laInstallTypePostprocessing:
  4394.  
  4395.    @qTMP3 = @TypeToFeatures()
  4396.    @qTMP4 = @CustomFeaturesToGroups(@qTMP3)
  4397.    @SetGroupsString(@qTMP4)
  4398.    @qCustomFeatures = @qTMP3
  4399.    @CalcInstallSize()
  4400.  
  4401.    @Return(@iDialogRes)
  4402. @EndFunc
  4403.  
  4404. //------------------------------------------------
  4405.  
  4406. @DefineFunc @Void @SetCustomFeatures(@Void)
  4407.  
  4408.    //@qCustomFeatures was already set if the type is custom
  4409.    @If (@iInstallType == @iInstallTypeCustom)
  4410.       @Return()
  4411.    @EndIf      
  4412.    @If (@iInstallType == 1)
  4413.       @qCustomFeatures = @qInstallType1Features
  4414.    @ElseIf (@iInstallType == 2)
  4415.       @qCustomFeatures = @qInstallType2Features
  4416.    @ElseIf (@iInstallType == 3)
  4417.       @qCustomFeatures = @qInstallType3Features
  4418.    @ElseIf (@iInstallType == 4)
  4419.       @qCustomFeatures = @qInstallType4Features
  4420.    @ElseIf (@iInstallType == 5)
  4421.       @qCustomFeatures = @qInstallType5Features
  4422.    @Else
  4423.       @qCustomFeatures = @qInstallType6Features
  4424.    @EndIf
  4425.    
  4426.    @Return()
  4427. @EndFunc
  4428. //------------------------------------------------
  4429.  
  4430. @DefineFunc @Void @InstallTypeSetHelp(@Void)
  4431.  
  4432.    @If (@iInstallType == 1)
  4433.       @qInstallTypeText3 = @qInstallTypeHelp1
  4434.    @ElseIf (@iInstallType == 2)
  4435.       @qInstallTypeText3 = @qInstallTypeHelp2
  4436.    @ElseIf (@iInstallType == 3)
  4437.       @qInstallTypeText3 = @qInstallTypeHelp3
  4438.    @ElseIf (@iInstallType == 4)
  4439.       @qInstallTypeText3 = @qInstallTypeHelp4
  4440.    @ElseIf (@iInstallType == 5)
  4441.       @qInstallTypeText3 = @qInstallTypeHelp5
  4442.    @ElseIf (@iInstallType == 6)
  4443.       @qInstallTypeText3 = @qInstallTypeHelp6
  4444.    @Else
  4445.       @ErrorExit(@qInstallTypeError3, @iAbort) 
  4446.    @EndIf
  4447.  
  4448.    @Return()
  4449. @EndFunc
  4450.  
  4451. //----------------------------------------------------------
  4452.  
  4453. @DefineFunc @QString @TypeToFeatures(@Void)
  4454.    @If (@iInstallType == 1)
  4455.       @qTMP4 = @qInstallType1Features
  4456.    @ElseIf  (@iInstallType == 2)
  4457.       @qTMP4 = @qInstallType2Features
  4458.    @ElseIf  (@iInstallType == 3)
  4459.       @qTMP4 = @qInstallType3Features
  4460.    @ElseIf  (@iInstallType == 4)
  4461.       @qTMP4 = @qInstallType4Features
  4462.    @ElseIf  (@iInstallType == 5)
  4463.       @qTMP4 = @qInstallType5Features
  4464.    @Else
  4465.       @qTMP4 = @qInstallType6Features
  4466.    @Endif
  4467.    
  4468.    @Return(@qTMP4)
  4469. @EndFunc
  4470.  
  4471. //----------------------------------------------------------
  4472. @DefineFunc @Void @SetGroupsString(@In @qString @Str)
  4473. //@Display setgroupsstring: @str @pause @enddisplay
  4474. @FlushGroups()
  4475. @qTMP1=@StrUpr(@Str)
  4476. @If (@StrFind(@qTMP1,"A")>=0)    @SetGroup(A)   @Endif
  4477. @If (@StrFind(@qTMP1,"B")>=0)    @SetGroup(B)   @Endif
  4478. @If (@StrFind(@qTMP1,"C")>=0)    @SetGroup(C)   @Endif
  4479. @If (@StrFind(@qTMP1,"D")>=0)    @SetGroup(D)   @Endif
  4480. @If (@StrFind(@qTMP1,"E")>=0)    @SetGroup(E)   @Endif
  4481. @If (@StrFind(@qTMP1,"F")>=0)    @SetGroup(F)   @Endif
  4482. @If (@StrFind(@qTMP1,"G")>=0)    @SetGroup(G)   @Endif
  4483. @If (@StrFind(@qTMP1,"H")>=0)    @SetGroup(H)   @Endif
  4484. @If (@StrFind(@qTMP1,"I")>=0)    @SetGroup(I)   @Endif
  4485. @If (@StrFind(@qTMP1,"J")>=0)    @SetGroup(J)   @Endif
  4486. @If (@StrFind(@qTMP1,"K")>=0)    @SetGroup(K)   @Endif
  4487. @If (@StrFind(@qTMP1,"L")>=0)    @SetGroup(L)   @Endif
  4488. @If (@StrFind(@qTMP1,"M")>=0)    @SetGroup(M)   @Endif
  4489. @If (@StrFind(@qTMP1,"N")>=0)    @SetGroup(N)   @Endif
  4490. @If (@StrFind(@qTMP1,"O")>=0)    @SetGroup(O)   @Endif
  4491. @If (@StrFind(@qTMP1,"P")>=0)    @SetGroup(P)   @Endif
  4492. @If (@StrFind(@qTMP1,"Q")>=0)    @SetGroup(Q)   @Endif
  4493. @If (@StrFind(@qTMP1,"R")>=0)    @SetGroup(R)   @Endif
  4494. @If (@StrFind(@qTMP1,"S")>=0)    @SetGroup(S)   @Endif
  4495. @If (@StrFind(@qTMP1,"T")>=0)    @SetGroup(T)   @Endif
  4496. @If (@StrFind(@qTMP1,"U")>=0)    @SetGroup(U)   @Endif
  4497. @If (@StrFind(@qTMP1,"V")>=0)    @SetGroup(V)   @Endif
  4498. @If (@StrFind(@qTMP1,"W")>=0)    @SetGroup(W)   @Endif
  4499. @If (@StrFind(@qTMP1,"X")>=0)    @SetGroup(X)   @Endif
  4500. @If (@StrFind(@qTMP1,"Y")>=0)    @SetGroup(Y)   @Endif
  4501. @If (@StrFind(@qTMP1,"Z")>=0)    @SetGroup(Z)   @Endif
  4502.  
  4503.   @Return()
  4504. @EndFunc
  4505.  
  4506. //----------------------------------------------------------
  4507. @DefineFunc @Void @CalcInstallSize(@Void)
  4508.    @InstallSize = 0
  4509.  
  4510. // The next value is an estimate of the percentage of a cluster that is wasted per file.
  4511.    @iTMP1 = 80
  4512.  
  4513.    @iNoGroupsSet = @True
  4514.  
  4515.    @If(@GroupIsSet(A))
  4516.       @iNoGroupsSet = @False
  4517.       @InstallSize = (@InstallSize+@iGroupSizeA+@ClusterOverhead(@OutDrive, @iGroupFilesA, @iTMP1))
  4518.    @EndIf
  4519.  
  4520.    @If(@GroupIsSet(B))
  4521.       @iNoGroupsSet = @False
  4522.       @InstallSize = (@InstallSize+@iGroupSizeB+@ClusterOverhead(@OutDrive, @iGroupFilesB, @iTMP1))
  4523.    @EndIf
  4524.  
  4525.    @If(@GroupIsSet(C))
  4526.       @iNoGroupsSet = @False
  4527.       @InstallSize = (@InstallSize+@iGroupSizeC+@ClusterOverhead(@OutDrive, @iGroupFilesC, @iTMP1))
  4528.    @EndIf
  4529.  
  4530.    @If(@GroupIsSet(D))
  4531.       @iNoGroupsSet = @False
  4532.       @InstallSize = (@InstallSize+@iGroupSizeD+@ClusterOverhead(@OutDrive, @iGroupFilesD, @iTMP1))
  4533.    @EndIf
  4534.  
  4535.    @If(@GroupIsSet(E))
  4536.       @iNoGroupsSet = @False
  4537.       @InstallSize = (@InstallSize+@iGroupSizeE+@ClusterOverhead(@OutDrive, @iGroupFilesE, @iTMP1))
  4538.    @EndIf
  4539.  
  4540.    @If(@GroupIsSet(F))
  4541.       @iNoGroupsSet = @False
  4542.       @InstallSize = (@InstallSize+@iGroupSizeF+@ClusterOverhead(@OutDrive, @iGroupFilesF, @iTMP1))
  4543.    @EndIf
  4544.  
  4545.    @If(@GroupIsSet(G))
  4546.       @iNoGroupsSet = @False
  4547.       @InstallSize = (@InstallSize+@iGroupSizeG+@ClusterOverhead(@OutDrive, @iGroupFilesG, @iTMP1))
  4548.    @EndIf
  4549.  
  4550.    @If(@GroupIsSet(H))
  4551.       @iNoGroupsSet = @False
  4552.       @InstallSize = (@InstallSize+@iGroupSizeH+@ClusterOverhead(@OutDrive, @iGroupFilesH, @iTMP1))
  4553.    @EndIf
  4554.  
  4555.    @If(@GroupIsSet(I))
  4556.       @iNoGroupsSet = @False
  4557.       @InstallSize = (@InstallSize+@iGroupSizeI+@ClusterOverhead(@OutDrive, @iGroupFilesI, @iTMP1))
  4558.    @EndIf
  4559.  
  4560.    @If(@GroupIsSet(J))
  4561.       @iNoGroupsSet = @False
  4562.       @InstallSize = (@InstallSize+@iGroupSizeJ+@ClusterOverhead(@OutDrive, @iGroupFilesJ, @iTMP1))
  4563.    @EndIf
  4564.  
  4565.    @If(@GroupIsSet(K))
  4566.       @iNoGroupsSet = @False
  4567.       @InstallSize = (@InstallSize+@iGroupSizeK+@ClusterOverhead(@OutDrive, @iGroupFilesK, @iTMP1))
  4568.    @EndIf
  4569.  
  4570.    @If(@GroupIsSet(L))
  4571.       @iNoGroupsSet = @False
  4572.       @InstallSize = (@InstallSize+@iGroupSizeL+@ClusterOverhead(@OutDrive, @iGroupFilesL, @iTMP1))
  4573.    @EndIf
  4574.  
  4575.    @If(@GroupIsSet(M))
  4576.       @iNoGroupsSet = @False
  4577.       @InstallSize = (@InstallSize+@iGroupSizeM+@ClusterOverhead(@OutDrive, @iGroupFilesM, @iTMP1))
  4578.    @EndIf
  4579.  
  4580.    @If(@GroupIsSet(N))
  4581.       @iNoGroupsSet = @False
  4582.       @InstallSize = (@InstallSize+@iGroupSizeN+@ClusterOverhead(@OutDrive, @iGroupFilesN, @iTMP1))
  4583.    @EndIf
  4584.  
  4585.    @If(@GroupIsSet(O))
  4586.       @iNoGroupsSet = @False
  4587.       @InstallSize = (@InstallSize+@iGroupSizeO+@ClusterOverhead(@OutDrive, @iGroupFilesO, @iTMP1))
  4588.    @EndIf
  4589.  
  4590.    @If(@GroupIsSet(P))
  4591.       @iNoGroupsSet = @False
  4592.       @InstallSize = (@InstallSize+@iGroupSizeP+@ClusterOverhead(@OutDrive, @iGroupFilesP, @iTMP1))
  4593.    @EndIf
  4594.  
  4595.    @If(@GroupIsSet(Q))
  4596.       @iNoGroupsSet = @False
  4597.       @InstallSize = (@InstallSize+@iGroupSizeQ+@ClusterOverhead(@OutDrive, @iGroupFilesQ, @iTMP1))
  4598.    @EndIf
  4599.  
  4600.    @If(@GroupIsSet(R))
  4601.       @iNoGroupsSet = @False
  4602.       @InstallSize = (@InstallSize+@iGroupSizeR+@ClusterOverhead(@OutDrive, @iGroupFilesR, @iTMP1))
  4603.    @EndIf
  4604.  
  4605.    @If(@GroupIsSet(S))
  4606.       @iNoGroupsSet = @False
  4607.       @InstallSize = (@InstallSize+@iGroupSizeS+@ClusterOverhead(@OutDrive, @iGroupFilesS, @iTMP1))
  4608.    @EndIf
  4609.  
  4610.    @If(@GroupIsSet(T))
  4611.       @iNoGroupsSet = @False
  4612.       @InstallSize = (@InstallSize+@iGroupSizeT+@ClusterOverhead(@OutDrive, @iGroupFilesT, @iTMP1))
  4613.    @EndIf
  4614.  
  4615.    @If(@GroupIsSet(U))
  4616.       @iNoGroupsSet = @False
  4617.       @InstallSize = (@InstallSize+@iGroupSizeU+@ClusterOverhead(@OutDrive, @iGroupFilesU, @iTMP1))
  4618.    @EndIf
  4619.  
  4620.    @If(@GroupIsSet(V))
  4621.       @iNoGroupsSet = @False
  4622.       @InstallSize = (@InstallSize+@iGroupSizeV+@ClusterOverhead(@OutDrive, @iGroupFilesV, @iTMP1))
  4623.    @EndIf
  4624.  
  4625.    @If(@GroupIsSet(W))
  4626.       @iNoGroupsSet = @False
  4627.       @InstallSize = (@InstallSize+@iGroupSizeW+@ClusterOverhead(@OutDrive, @iGroupFilesW, @iTMP1))
  4628.    @EndIf
  4629.  
  4630.    @If(@GroupIsSet(X))
  4631.       @iNoGroupsSet = @False
  4632.       @InstallSize = (@InstallSize+@iGroupSizeX+@ClusterOverhead(@OutDrive, @iGroupFilesX, @iTMP1))
  4633.    @EndIf
  4634.  
  4635.    @If(@GroupIsSet(Y))
  4636.       @iNoGroupsSet = @False
  4637.       @InstallSize = (@InstallSize+@iGroupSizeY+@ClusterOverhead(@OutDrive, @iGroupFilesY, @iTMP1))
  4638.    @EndIf
  4639.  
  4640.    @If(@GroupIsSet(Z))
  4641.       @iNoGroupsSet = @False
  4642.       @InstallSize = (@InstallSize+@iGroupSizeZ+@ClusterOverhead(@OutDrive, @iGroupFilesZ, @iTMP1))
  4643.    @EndIf
  4644.  
  4645. //    @If(@iNoGroupsSet)
  4646. //       @InstallSize = (@iTotalSize + @ClusterOverhead(@OutDrive, @iTotalFiles, @iTMP1))
  4647. //    @EndIf
  4648. //  
  4649. //    @If(@InstallSize == 0) @Display "Warning: @@InstallSize is 0" @pause @enddisplay @EndIf 
  4650.  
  4651.    @Return()
  4652. @EndFunc
  4653.  
  4654. //
  4655. //
  4656. //
  4657. //File: Custom /////////////////////////////////////
  4658. //
  4659. //CIDVars: TBD
  4660. //
  4661. //Globals changed: 
  4662. //   @qCustomFeatures
  4663. //   @iCustom<x>
  4664. //
  4665. @DefineProto
  4666.    @Integer @CustomSelect(@Void)
  4667.    @Void @EventHandler @CustomSelectCBHandler(@IN @Int @CtrlID, @In @Integer @OldState, @In @Integer @NewState)
  4668.    @Void @CustomSelectSetHelp(@Void)
  4669.    @Void @SetFeaturesFromString(@In @QString @FeaturesString)
  4670. @EndProto
  4671. //
  4672. //
  4673.  
  4674. //----------------------------------------------------------
  4675. @DefineFunc @Void @EventHandler @CustomSelectCBHandler(@IN @Int @CtrlID, @In @Integer @OldState, @In @Integer @NewState)
  4676.  
  4677.    @If    (@CtrlID == 1000)
  4678.       @iCustom = 1
  4679.    @ElseIf (@CtrlID == 1001)
  4680.       @iCustom = 2
  4681.    @ElseIf (@CtrlID == 1002)
  4682.       @iCustom = 3
  4683.    @ElseIf (@CtrlID == 1003)
  4684.       @iCustom = 4
  4685.    @ElseIf (@CtrlID == 1004)
  4686.       @iCustom = 5
  4687.    @ElseIf (@CtrlID == 1005)
  4688.       @iCustom = 6
  4689.    @ElseIf (@CtrlID == 1006)
  4690.       @iCustom = 7
  4691.    @ElseIf (@CtrlID == 1007)
  4692.       @iCustom = 8
  4693.    @ElseIf (@CtrlID == 1008)
  4694.       @iCustom = 9
  4695.    @ElseIf (@CtrlID == 1009)
  4696.       @iCustom = 10
  4697.    @ElseIf (@CtrlID == 1010)
  4698.       @iCustom = 11
  4699.    @ElseIf (@CtrlID == 1011)
  4700.       @iCustom = 12
  4701.    @ElseIf (@CtrlID == 1012)
  4702.       @iCustom = 13
  4703.    @ElseIf (@CtrlID == 1013)
  4704.       @iCustom = 14
  4705.    @ElseIf (@CtrlID == 1014)
  4706.       @iCustom = 15
  4707.    @ElseIf (@CtrlID == 1015)
  4708.       @iCustom = 16
  4709.    @Else
  4710.       @ErrorExit(@qCustomError1,@iAbort)
  4711.    @EndIf
  4712.  
  4713.    @If (@icustom < 10)
  4714.       @qTMP5 = "0@icustom"
  4715.    @Else
  4716.       @qTMP5 = "@icustom"
  4717.    @EndIf
  4718.    @If (@NewState)
  4719.       @If (@StrFind(@qCustomFeatures,@qTMP5) >= 0)
  4720.          //noop
  4721.       @Else
  4722.          @qCustomFeatures = "@qTMP5 @qCustomFeatures"
  4723.       @EndIf
  4724.    @Else
  4725.       @iTMP1 = @StrFind(@qCustomFeatures,@qTMP5)
  4726.       @If (@iTMP1 >= 0)
  4727.          @qCustomFeatures = @StrDel(@qCustomFeatures,@iTMP1,3)
  4728.       @Else
  4729.          //noop
  4730.       @EndIf
  4731.    @Endif
  4732.  
  4733.    @qTMP2 = @CustomFeaturesToGroups(@qCustomFeatures)
  4734.    @SetGroupsString(@qTMP2)
  4735.    @CalcInstallSize()
  4736.    @If(@IsNULL(@qCustomFeatures))
  4737.       @DlgCtrlEnable(110, @False)
  4738.    @Else
  4739.       @DlgCtrlEnable(110, @True)
  4740.    @EndIf
  4741.    @CustomSelectSetHelp()
  4742.    @StaticText(510, "@qInstallTypeReqKB @eval(@InstallSize/1024)@qCRLF@qCRLF@qCustomText2")
  4743.    @Return()
  4744. @EndFunc
  4745.  
  4746.  
  4747. //----------------------------------------------------------
  4748. @DefineFunc @Integer @CustomSelect(@Void)
  4749.    @If (@iInstallType != @iInstallTypeCustom)
  4750.       @Return(@iDialogRes)
  4751.    @Endif
  4752.  
  4753. laCustomSelectDialog:
  4754.    @If (!@CIDBypass(@qForceGetInstallType))
  4755.  
  4756.       @SetFeaturesFromString(@qCustomFeatures)
  4757.       @qTMP2 = @CustomFeaturesToGroups(@qCustomFeatures)
  4758.       @SetGroupsString(@qTMP2)
  4759.       @CalcInstallSize()
  4760.       @CustomSelectSetHelp()
  4761.       @qTMP1 = "@qInstallTypeReqKB @eval(@InstallSize/1024)@qCRLF@qCRLF@qCustomText2"
  4762.       @MapEventToFunc(@DlgCBEvent, @CustomSelectCBHandler)
  4763.       @EnableEventMap(@DlgCBEvent)
  4764.       @iDialogRes = @DialogCheck(@qCustomTitle, @qCustomBitmap,
  4765.            @iCustomBitmapID,
  4766.            @qCustomText1, @qTMP1,
  4767.            @qFeature01, @qFeature02, @qFeature03,
  4768.            @qFeature04, @qFeature05, @qFeature06,
  4769.            @qFeature07, @qFeature08, @qFeature09,
  4770.            @qFeature10, @qFeature11, @qFeature12,
  4771.            @qFeature13, @qFeature14, @qFeature15,
  4772.            @qFeature16,
  4773.            @iCustom1,@iCustom2,@iCustom3,@iCustom4,
  4774.            @iCustom5,@iCustom6,@iCustom7,@iCustom8,
  4775.            @iCustom9,@iCustom10,@iCustom11,@iCustom12,
  4776.            @iCustom13,@iCustom14,@iCustom15,@iCustom16,
  4777.            @iCustom1Enable,@iCustom2Enable,@iCustom3Enable,@iCustom4Enable,
  4778.            @iCustom5Enable,@iCustom6Enable,@iCustom7Enable,@iCustom8Enable,
  4779.            @iCustom9Enable,@iCustom10Enable,@iCustom11Enable,@iCustom12Enable,
  4780.            @iCustom13Enable,@iCustom14Enable,@iCustom15Enable,@iCustom16Enable,
  4781.            @qBack,@qNext,@qCancel,"","")
  4782.  
  4783.       @DisableEventMap(@DlgCBEvent)
  4784.    
  4785.             @If (@iDialogRes == 1)
  4786.                @iDialogRes = @iBack
  4787.             @ElseIf (@iDialogRes == 2)
  4788.                @iDialogRes = @iNext
  4789.             @ElseIf (@iDialogRes == 3)
  4790.                @ConfirmCancel()
  4791.                @Goto laCustomSelectDialog
  4792.             @ElseIf (@iDialogRes == 4)
  4793.                @DisplayHelp("@qCustomHelpFile")
  4794.                @Goto laCustomSelectDialog
  4795.             @ElseIf (@iDialogRes == 5)
  4796.                @ShowAll("GetInstallType", "Remove 5th button test")
  4797.                @Goto laCustomSelectDialog
  4798.             @Else
  4799.                @ErrorExit(@qCustomError1, @iAbort) 
  4800.             @EndIf
  4801.  
  4802.    @Else
  4803.       // set  the custom features string to be the one from the response file
  4804.       @qCustomFeatures = @qCustomSelections
  4805.       @iDialogRes = @iNext
  4806.    @EndIf
  4807.  
  4808.    @Return(@iDialogRes)
  4809. @EndFunc
  4810.  
  4811.  
  4812. //----------------------------------------------------------
  4813. @DefineFunc @Void @CustomSelectSetHelp(@Void)
  4814.    @If     (@iCustom == 1)
  4815.       @qCustomText2 = @qFeature01Help
  4816.    @ElseIf (@iCustom == 2)
  4817.       @qCustomText2 = @qFeature02Help
  4818.    @ElseIf (@iCustom == 3)
  4819.       @qCustomText2 = @qFeature03Help
  4820.    @ElseIf (@iCustom == 4)
  4821.       @qCustomText2 = @qFeature04Help
  4822.    @ElseIf (@iCustom == 5)
  4823.       @qCustomText2 = @qFeature05Help
  4824.    @ElseIf (@iCustom == 6)
  4825.       @qCustomText2 = @qFeature06Help
  4826.    @ElseIf (@iCustom == 7)
  4827.       @qCustomText2 = @qFeature07Help
  4828.    @ElseIf (@iCustom == 8)
  4829.       @qCustomText2 = @qFeature08Help
  4830.    @ElseIf (@iCustom == 9)
  4831.       @qCustomText2 = @qFeature09Help
  4832.    @ElseIf (@iCustom == 10)
  4833.       @qCustomText2 = @qFeature10Help
  4834.    @ElseIf (@iCustom == 11)
  4835.       @qCustomText2 = @qFeature11Help
  4836.    @ElseIf (@iCustom == 12)
  4837.       @qCustomText2 = @qFeature12Help
  4838.    @ElseIf (@iCustom == 13)
  4839.       @qCustomText2 = @qFeature13Help
  4840.    @ElseIf (@iCustom == 14)
  4841.       @qCustomText2 = @qFeature14Help
  4842.    @ElseIf (@iCustom == 15)
  4843.       @qCustomText2 = @qFeature15Help
  4844.    @ElseIf (@iCustom == 16)
  4845.       @qCustomText2 = @qFeature16Help
  4846.    @Else
  4847.       @ErrorExit(@qCustomError3,@iAbort)
  4848.    @Endif
  4849.    @Return()
  4850. @EndFunc
  4851.  
  4852.  
  4853. //----------------------------------------------------------
  4854.  
  4855. @DefineFunc @Void @SetFeaturesFromString(@In @QString @FeaturesString)
  4856.  
  4857.    @If (@StrFind(@FeaturesString,"01") >= 0)
  4858.       @iCustom1 = 1
  4859.    @Else 
  4860.       @iCustom1 = 0
  4861.    @EndIf
  4862.    @If (@StrFind(@FeaturesString,"02") >= 0)
  4863.       @iCustom2 = 1
  4864.    @Else 
  4865.       @iCustom2 = 0
  4866.    @EndIf
  4867.    @If (@StrFind(@FeaturesString,"03") >= 0)
  4868.       @iCustom3 = 1
  4869.    @Else 
  4870.       @iCustom3 = 0
  4871.    @EndIf
  4872.    @If (@StrFind(@FeaturesString,"04") >= 0)
  4873.       @iCustom4 = 1
  4874.    @Else 
  4875.       @iCustom4 = 0
  4876.    @EndIf
  4877.    @If (@StrFind(@FeaturesString,"05") >= 0)
  4878.       @iCustom5 = 1
  4879.    @Else 
  4880.       @iCustom5 = 0
  4881.    @EndIf
  4882.    @If (@StrFind(@FeaturesString,"06") >= 0)
  4883.       @iCustom6 = 1
  4884.    @Else 
  4885.       @iCustom6 = 0
  4886.    @EndIf
  4887.    @If (@StrFind(@FeaturesString,"07") >= 0)
  4888.       @iCustom7 = 1
  4889.    @Else 
  4890.       @iCustom7 = 0
  4891.    @EndIf
  4892.    @If (@StrFind(@FeaturesString,"08") >= 0)
  4893.       @iCustom8 = 1
  4894.    @Else 
  4895.       @iCustom8 = 0
  4896.    @EndIf
  4897.    @If (@StrFind(@FeaturesString,"09") >= 0)
  4898.       @iCustom9 = 1
  4899.    @Else 
  4900.       @iCustom9 = 0
  4901.    @EndIf
  4902.    @If (@StrFind(@FeaturesString,"10") >= 0)
  4903.       @iCustom10 = 1
  4904.    @Else 
  4905.       @iCustom10 = 0
  4906.    @EndIf
  4907.    @If (@StrFind(@FeaturesString,"11") >= 0)
  4908.       @iCustom11 = 1
  4909.    @Else 
  4910.       @iCustom11 = 0
  4911.    @EndIf
  4912.    @If (@StrFind(@FeaturesString,"12") >= 0)
  4913.       @iCustom12 = 1
  4914.    @Else 
  4915.       @iCustom12 = 0
  4916.    @EndIf
  4917.    @Return()
  4918. @EndFunc
  4919.  
  4920. //
  4921. //
  4922. //
  4923. //File: InstPath /////////////////////////////////////
  4924. //
  4925. //CIDVars: @qForceGetInstallPath
  4926. //
  4927. //Globals changed: @qInstallPath1-@qInstallPath6
  4928. //
  4929. @DefineProto
  4930.    @Integer @GetInstallPath(@Void)
  4931.    @Void @CheckPath(@InOut @QString @PathName, @InOut @Integer @PreviousResult)
  4932.    @Void @FillDriveList(@In @QString @DriveandSize)
  4933. @EndProto
  4934. //
  4935. //
  4936.  
  4937. //----------------------------------------------------
  4938. @DefineFunc @Integer @GetInstallPath(@Void)
  4939.  
  4940.    @If(!@CIDBypass(@qForceGetInstallPath))
  4941.  
  4942. laCreateDriveListTop:
  4943.       @TempInt = 0
  4944.       @iTMP5 = 0
  4945.       @qGetInstDirDriveList = ""
  4946.       @qGetInstDirDriveList1 = ""
  4947.       @qGetInstDirDriveList2 = ""
  4948.       @qGetInstDirDriveList3 = ""
  4949.       @iDriveList1Count = 0
  4950.       @iDriveList2Count = 0
  4951.       @iDriveList3Count = 0
  4952.  
  4953.  
  4954. loop:
  4955.       @dGetInstDirDriveLetter = @StrIndex("ABCDEFGHIJKLMNOPQRSTUVWXYZ", @TempInt)
  4956.       @TempInt = (@TempInt + 1)
  4957.  
  4958.       @If(@DriveExists(@dGetInstDirDriveLetter))
  4959.          @If(!@Removable(@dGetInstDirDriveLetter) /* &&!@DriveRemote(@dGetInstDirDriveLetter) */ )
  4960.             @FillDriveList("@Eval(@DiskFree(@dGetInstDirDriveLetter)/1048576)")
  4961. //            @qGetInstDirDriveList = "@qGetInstDirDriveList@dGetInstDirDriveLetter: @Eval(@DiskFree(@dGetInstDirDriveLetter)/1048576) @qGetInstDirFreeSpace@qCRLF"
  4962.             @iTMP5=(@iTMP5 + 1)
  4963.             //Can only fit 17 drives on a 800x600, 18 on 1024x768
  4964.             @If (((@iTMP5 >= 17) && (@XRes == 800)) ||
  4965.                  ((@iTMP5 >= 18) && (@XRes == 1024)))
  4966.                @Goto endloop
  4967.             @EndIf
  4968.          @EndIf
  4969.       @EndIf
  4970.  
  4971.       @If(@TempInt < 26)
  4972.          @Goto loop
  4973.       @EndIf
  4974.  
  4975. endloop:
  4976.       @If(@OptionGroupsNotEmpty(@qOption1Groups))
  4977.          @qProduct1Text = @qProduct1
  4978.       @Else
  4979.          @qProduct1Text = ""
  4980.       @EndIf
  4981.       @If(@OptionGroupsNotEmpty(@qOption2Groups))
  4982.          @qProduct2Text = @qProduct2
  4983.       @Else
  4984.          @qProduct2Text = ""
  4985.       @EndIf
  4986.       @If(@OptionGroupsNotEmpty(@qOption3Groups))
  4987.          @qProduct3Text = @qProduct3
  4988.       @Else
  4989.          @qProduct3Text = ""
  4990.       @EndIf
  4991.       @If(@OptionGroupsNotEmpty(@qOption4Groups))
  4992.          @qProduct4Text = @qProduct4
  4993.       @Else
  4994.          @qProduct4Text = ""
  4995.       @EndIf
  4996.       @If(@OptionGroupsNotEmpty(@qOption5Groups))
  4997.          @qProduct5Text = @qProduct5
  4998.       @Else
  4999.          @qProduct5Text = ""
  5000.       @EndIf
  5001.       @If(@OptionGroupsNotEmpty(@qOption6Groups))
  5002.          @qProduct6Text = @qProduct6
  5003.       @Else
  5004.          @qProduct6Text = ""
  5005.       @EndIf
  5006.       @If(@OptionGroupsNotEmpty(@qOption7Groups))
  5007.          @qProduct7Text = @qProduct7
  5008.       @Else
  5009.          @qProduct7Text = ""
  5010.       @EndIf
  5011.       @If(@OptionGroupsNotEmpty(@qOption8Groups))
  5012.          @qProduct8Text = @qProduct8
  5013.       @Else
  5014.          @qProduct8Text = ""
  5015.       @EndIf
  5016.       @If(@OptionGroupsNotEmpty(@qOption9Groups))
  5017.          @qProduct9Text = @qProduct9
  5018.       @Else
  5019.          @qProduct9Text = ""
  5020.       @EndIf
  5021.       @If(@OptionGroupsNotEmpty(@qOption10Groups))
  5022.          @qProduct10Text = @qProduct10
  5023.       @Else
  5024.          @qProduct10Text = ""
  5025.       @EndIf
  5026.  
  5027. laGetInstallDirTop:
  5028.       @If (@iSingleDriveEntry && (@Platform == @OS2))
  5029.          @iDialogRes = @Dialog1Edit(@qGetInstDirTitle, @qGetInstDirBitmap,
  5030.                                 @iGetInstDirBitmapID,
  5031.                                 @qGetInstDirHeader, "",
  5032.                                 @qGetInstDirDriveList1,@qGetInstDirDriveList2,
  5033.                                 @qGetInstDirDriveList3,
  5034.                                 @qBack,@qNext,@qCancel,"","",
  5035.                                 @qInstallPath1)
  5036.  
  5037.       @Else     
  5038.          @iDialogRes = @DialogEdit(@qGetInstDirTitle, @qGetInstDirBitmap,
  5039.                                 @iGetInstDirBitmapID,
  5040.                                 @qGetInstDirHeader,
  5041.                                 @qProduct1Text, @qProduct2Text, @qProduct3Text, @qProduct4Text,
  5042.                                 @qProduct5Text, @qProduct6Text, @qProduct7Text, @qProduct8Text,
  5043.                                 @qProduct9Text, @qProduct10Text,
  5044.                                 @qGetInstDirDriveBox,
  5045.                                 @qBack, @qNext, @qCancel, "", "",
  5046.                                 @qInstallPath1, @qInstallPath2, @qInstallPath3,
  5047.                                 @qInstallPath4, @qInstallPath5, @qInstallPath6,
  5048.                                 @qInstallPath7, @qInstallPath8, @qInstallPath9,
  5049.                                 @qInstallPath10,
  5050.                                 @qGetInstDirDriveList)
  5051.  
  5052.       @EndIf
  5053.       @If (@iDialogRes == 1)
  5054.          @iDialogRes = @iBack
  5055.       @ElseIf (@iDialogRes == 2)
  5056.          @iDialogRes = @iNext
  5057.       @ElseIf (@iDialogRes == 3)
  5058.           @ConfirmCancel()
  5059.           @Goto laGetInstallDirTop
  5060.       @ElseIf (@iDialogRes == 4)
  5061.          @ErrorExit(@qGetInstDirDialogResultError, @iAbort)
  5062.       @Else
  5063.          @ErrorExit(@qGetInstDirDialogResultError, @iAbort)
  5064.       @EndIf
  5065.  
  5066.    @Else
  5067.       @iDialogRes = @iNext
  5068.    @EndIf
  5069.  
  5070. laGetInstallDirPostProcessing:
  5071.    @If(@iDialogRes == @iNext)
  5072.       @iCheckPathResult = @iGetInstDirPathOK
  5073.  
  5074.                 @If(!@IsNULL(@qProduct1))
  5075.               @CheckPath(@qInstallPath1, @iCheckPathResult)
  5076.                 @EndIf
  5077.  
  5078.                 @If(!@IsNULL(@qProduct2))
  5079.               @CheckPath(@qInstallPath2, @iCheckPathResult)
  5080.                 @EndIf
  5081.  
  5082.                 @If(!@IsNULL(@qProduct3))
  5083.               @CheckPath(@qInstallPath3, @iCheckPathResult)
  5084.                 @EndIf
  5085.  
  5086.                 @If(!@IsNULL(@qProduct4))
  5087.               @CheckPath(@qInstallPath4, @iCheckPathResult)
  5088.                 @EndIf
  5089.  
  5090.                 @If(!@IsNULL(@qProduct5))
  5091.               @CheckPath(@qInstallPath5, @iCheckPathResult)
  5092.                 @EndIf
  5093.  
  5094.                 @If(!@IsNULL(@qProduct6))
  5095.               @CheckPath(@qInstallPath6, @iCheckPathResult)
  5096.                 @EndIf
  5097.  
  5098.                 @If(!@IsNULL(@qProduct7))
  5099.               @CheckPath(@qInstallPath7, @iCheckPathResult)
  5100.                 @EndIf
  5101.  
  5102.                 @If(!@IsNULL(@qProduct8))
  5103.               @CheckPath(@qInstallPath8, @iCheckPathResult)
  5104.                 @EndIf
  5105.  
  5106.                 @If(!@IsNULL(@qProduct9))
  5107.               @CheckPath(@qInstallPath9, @iCheckPathResult)
  5108.                 @EndIf
  5109.  
  5110.                 @If(!@IsNULL(@qProduct10))
  5111.               @CheckPath(@qInstallPath10, @iCheckPathResult)
  5112.                 @EndIf
  5113.  
  5114.       @If(!@CIDByPass(@qForceGetInstallPath))
  5115.          @If(@iCheckPathResult == @iGetInstDirPathOK)
  5116.             //Do nothing
  5117.          @ElseIf(@iCheckPathResult == @iGetInstDirBadPath)
  5118.             @MsgBox("@qInvalidPath@qGetInstDirError1")
  5119.             @Goto laGetInstallDirTop
  5120.          @ElseIf(@iCheckPathResult == @iGetInstDirBadDrive)
  5121.             @MsgBox("@dInvalidDrive@qGetInstDirError2")
  5122.             @Goto laGetInstallDirTop
  5123.          @ElseIf(@iCheckPathResult == @iGetInstDirNoRoot)
  5124.             @MsgBox("@dInvalidDrive@qGetInstDirError3")
  5125.             @Goto laGetInstallDirTop
  5126.          @ElseIf(@iCheckPathResult == @iGetInstDirInvalidCharacterInPath)
  5127.             @MsgBox("@qInvalidPath@qGetInstDirError4")
  5128.             @Goto laGetInstallDirTop
  5129.          @ElseIf(@iCheckPathResult == @iGetInstDirDriveNotHPFS)
  5130.             @MsgBox("@dInvalidDrive@qGetInstDirError5")
  5131.             @Goto laGetInstallDirTop
  5132.          @ElseIf(@iCheckPathResult == @iGetInstDirLongPath)
  5133.             @MsgBox("@qInvalidPath@qGetInstDirError6")
  5134.             @Goto laGetInstallDirTop
  5135.          @Else
  5136.             @ErrorExit(@qCheckPathResultError, @iAbort)
  5137.          @EndIf
  5138.       @Else
  5139.          @If(@iCheckPathResult != @iGetInstDirPathOK)
  5140.             @ErrorExit(@qGetInstDirCIDError, @iAbort)
  5141.          @EndIf
  5142.       @EndIf
  5143.    @EndIf
  5144.  
  5145.    @Return (@iDialogRes)
  5146. @EndFunc
  5147.  
  5148. //////////////////////////////////////////////////////
  5149.  
  5150. @DefineFunc @Void @CheckPath(@InOut @QString @PathStr, @InOut @Integer @PreviousResult)
  5151.    @If(@PreviousResult == @iGetInstDirPathOK)
  5152.       @qInvalidPath = ""
  5153.       @dInvalidDrive = A
  5154.  
  5155. laStripDoubleQuotes:
  5156.       @TempInt = @StrFind(@PathStr, "\"")
  5157.       @If(@TempInt != -1)
  5158.          @PathStr = @StrDel(@PathStr, @TempInt, 1)
  5159.          @Goto laStripDoubleQuotes
  5160.       @EndIf
  5161.  
  5162.       //Not Valid if : is not the second character
  5163.       @If (@StrFind(@PathStr,":") != 1)
  5164.          @qInvalidPath = @PathStr
  5165.          @PreviousResult = @iGetInstDirBadPath
  5166.  
  5167.       //Not Valid if there is another : in the path
  5168.       @ElseIf (@StrRFind(@PathStr,":") != 1)
  5169.          @qInvalidPath = @PathStr
  5170.          @PreviousResult = @iGetInstDirBadPath
  5171.  
  5172.       //Not Valid if there is are 2 \'s in a row in the path
  5173.       @ElseIf (@StrFind(@PathStr,"\\\\") >= 0)
  5174.          @qInvalidPath = @PathStr
  5175.          @PreviousResult = @iGetInstDirBadPath
  5176.  
  5177.       //Not Valid if there is a * in the path
  5178.       @ElseIf (@StrFind(@PathStr,"*") >= 0)
  5179.          @qInvalidPath = @PathStr
  5180.          @PreviousResult = @iGetInstDirBadPath
  5181.  
  5182.       //Not Valid if there is a ? in the path
  5183.       @ElseIf (@StrFind(@PathStr,"?") >= 0)
  5184.          @qInvalidPath = @PathStr
  5185.          @PreviousResult = @iGetInstDirBadPath
  5186.  
  5187.       //Only 27 characters allowed, for Java
  5188.       @ElseIf (@StrLen(@PathStr) > 27)
  5189.          @qInvalidPath = @PathStr
  5190.          @PreviousResult = @iGetInstDirLongPath
  5191.  
  5192.       //Not Valid if the first character is not a letter
  5193.       @ElseIf (!(((@StrIndex(@PathStr,0) >= @Eval('a')) && 
  5194.                  (@StrIndex(@PathStr,0) <= @Eval('z'))) ||
  5195.                 ((@StrIndex(@PathStr,0) >= @Eval('A')) &&
  5196.                  (@StrIndex(@PathStr,0) <= @Eval('Z')))))
  5197.          @qInvalidPath = @PathStr
  5198.          @PreviousResult = @iGetInstDirBadPath
  5199.  
  5200.       //Do no allow install if there is a " " in the path
  5201.       @ElseIf (@StrFind(@PathStr," ") >= 0)
  5202.          @qInvalidPath = @PathStr
  5203.          @PreviousResult = @iGetInstDirBadPath
  5204.   
  5205.       //Bad path entry
  5206.       @ElseIf(!( (@StrFind(@PathStr,":\\") == @StrRFind(@PathStr,":\\")) && (@StrFind(@PathStr,":\\") > 0) ))
  5207.          @qInvalidPath = @PathStr
  5208.          @PreviousResult = @iGetInstDirBadPath
  5209.  
  5210.       //Drive is not a letter
  5211.       @ElseIf(@StrFind("ABCDEFGHIJKLMNOPQRSTUVWXYZ", "@StrIndex(@StrUpr(@PathStr),(@StrFind(@PathStr, ":\\") - 1))") == -1)
  5212.          @dInvalidDrive = @StrIndex(@StrUpr(@PathStr),(@StrFind(@PathStr, ":\\") - 1))
  5213.          @PreviousResult = @iGetInstDirBadDrive
  5214.  
  5215.       //Not Valid if \ is the last character
  5216.       @ElseIf (@StrRFind(@PathStr,"\\") == (@StrLen(@PathStr) - 1))
  5217.          @qInvalidPath = @PathStr
  5218.          @PreviousResult = @iGetInstDirBadPath
  5219.  
  5220.       //Drive doesn't exist
  5221.       @ElseIf(!@DriveExists(@StrIndex(@StrUpr(@PathStr),(@StrFind(@PathStr, ":\\") - 1))))
  5222.          @dInvalidDrive = @StrIndex(@StrUpr(@PathStr),(@StrFind(@PathStr, ":\\") - 1))
  5223.          @PreviousResult = @iGetInstDirBadDrive
  5224.  
  5225.       //Drive is removeable
  5226.       @ElseIf(@Removable(@StrIndex(@StrUpr(@PathStr),(@StrFind(@PathStr, ":\\") - 1))))
  5227.          @dInvalidDrive = @StrIndex(@StrUpr(@PathStr),(@StrFind(@PathStr, ":\\") - 1))
  5228.          @PreviousResult = @iGetInstDirBadDrive
  5229.  
  5230.       //Can't install to root
  5231.       @ElseIf(@StrFind(@PathStr, ":\\") == (@StrLen(@PathStr) - 2))
  5232.          @dInvalidDrive = @StrIndex(@StrUpr(@PathStr),(@StrFind(@PathStr, ":\\") - 1))
  5233.          @PreviousResult = @iGetInstDirNoRoot
  5234.  
  5235.       //The path is almost valid
  5236.       @Else
  5237.          //Strip the path
  5238.          @PathStr = @StrDel(@PathStr, 0, (@StrFind(@PathStr, ":\\") - 1))
  5239.          @qTMP1 = @StrDel(@PathStr, 0, (@StrFind(@PathStr, ":\\") + 1))
  5240.          @If(@StrFind(@qTMP1, ":") > 0)
  5241.             @qInvalidPath = @PathStr
  5242.             @PreviousResult = @iGetInstDirInvalidCharacterInPath
  5243.          @Else
  5244.             @PreviousResult = @iGetInstDirPathOK
  5245.          @EndIf
  5246.  
  5247.       @EndIf
  5248.  
  5249.       //Check long-filename support
  5250.       @If ((@PreviousResult == @iGetInstDirPathOK) && (@iHPFSonly) && (@Platform == @OS2))
  5251.          @dTMP1 = @StrIndex(@StrUpr(@PathStr),(@StrFind(@PathStr, ":\\") - 1))
  5252.          @If (!@Exists("@dTMP1:\\longdirname.ext1.ext2"))
  5253.             @System("mkdir @dTMP1:\\longdirname.ext1.ext2 > NUL 2> NUL",2,-1)
  5254.             @If (!@Exists("@dTMP1:\\longdirname.ext1.ext2")) 
  5255.                @dInvalidDrive = @StrIndex(@StrUpr(@PathStr),(@StrFind(@PathStr, ":\\") - 1))
  5256.                @PreviousResult=@iGetInstDirDriveNotHPFS
  5257.             @Else
  5258.                @RmDir("@dTMP1:\\longdirname.ext1.ext2")
  5259.             @EndIf
  5260.          @EndIf
  5261.       @EndIf
  5262.  
  5263.    @EndIf
  5264.  
  5265.    @Return()
  5266. @EndFunc
  5267.  
  5268. //-----------------------------------------------------------------
  5269.  
  5270. @DefineFunc @Void @FillDriveList(@In @QString @DriveandSize)
  5271.  
  5272.  
  5273.    @If (@iSingleDriveEntry && (@Platform == @OS2))
  5274.       @If ((@iDriveList1Count >= 8) && (@iDriveList2Count >= 8) && (@iDriveList3Count < 8))
  5275.          @qGetInstDirDriveList3 = "@qGetInstDirDriveList3@dGetInstDirDriveLetter: @Eval(@DiskFree(@dGetInstDirDriveLetter)/1048576) @qGetInstDirFreeSpace@qCRLF"
  5276.          @iDriveList3Count = (@iDriveList3Count + 1)
  5277.       @ElseIf ((@iDriveList1Count >= 8) && (@iDriveList2Count < 8))
  5278.          @qGetInstDirDriveList2 = "@qGetInstDirDriveList2@dGetInstDirDriveLetter: @Eval(@DiskFree(@dGetInstDirDriveLetter)/1048576) @qGetInstDirFreeSpace@qCRLF"
  5279.          @iDriveList2Count = (@iDriveList2Count + 1)
  5280.       @ElseIf (@iDriveList1Count < 8)
  5281.           @qGetInstDirDriveList1 = "@qGetInstDirDriveList1@dGetInstDirDriveLetter: @Eval(@DiskFree(@dGetInstDirDriveLetter)/1048576) @qGetInstDirFreeSpace@qCRLF"
  5282.          @iDriveList1Count = (@iDriveList1Count + 1)
  5283.       @EndIf
  5284.    @Else
  5285.       @qGetInstDirDriveList = "@qGetInstDirDriveList@dGetInstDirDriveLetter: @Eval(@DiskFree(@dGetInstDirDriveLetter)/1048576) @qGetInstDirFreeSpace@qCRLF"
  5286.    @EndIf
  5287.  
  5288.    @Return()
  5289. @EndFunc
  5290. //
  5291. //
  5292. //
  5293. //File: ChkFree /////////////////////////////////////
  5294. //
  5295. //CIDVars: TBD
  5296. //
  5297. //Globals changed: 
  5298. //  @qDrive<x>Drive      (in SetDriveInfo)
  5299. //  @iDrive<x>SpaceReq   (in SetDriveInfo)
  5300. //
  5301. @DefineProto
  5302.    @Integer @CheckFreeSpace(@Void)
  5303.    @QString @GetInstallPathDrives(@Void)
  5304.    @QString @AddPathDriveToList(@In @QString @qDriveList,
  5305.                                 @In @QString @qOption,
  5306.                                 @In @QString @qInstallPath)
  5307.    @Integer @GetRequiredDriveSpace(@In @QString @qDrive,
  5308.                                    @In @Integer @iDriveNumber)
  5309.    @Void @SetDriveInfo(@In @QString @DriveList)
  5310.    @QString @DriveToOptions(@In @QString @DriveLetter)
  5311.    @QString @OptionsToGroups(@In @QString @OptionString)
  5312.    @QString @GroupIntersection(@In @QString @Instring1,
  5313.                                @In @QString @Instring2)
  5314. @EndProto
  5315. //
  5316. //
  5317. //----------------------------------------------------
  5318. @DefineFunc @Integer @CheckFreeSpace(@Void)
  5319.  
  5320.    //If back pushbutton pressed from confirm install dialog,
  5321.    //go back to installpath dialog.
  5322.    @If (@iFuncRes == @iBack)
  5323.         @Return (@iBack)
  5324.    @EndIf
  5325.  
  5326.    @qDrives = @GetInstallPathDrives()
  5327.    @ShowAll("@@GetInstallPathDrives()", "All of the drive letters are: @qDrives")
  5328. //   @MsgBox("All of the drive letters are: @qDrives")
  5329.    @SetDriveInfo(@qDrives)
  5330.    @iNumDrives = @StrLen(@qDrives)
  5331.    @iIndex = 0
  5332.  
  5333. loop:
  5334.    @If (@iIndex < @iNumDrives)
  5335.       @dCurrentDrive = @StrIndex(@qDrives, @iIndex)
  5336.       @iIndex = @Eval(@iIndex + 1)
  5337.       @iSpaceRequired = @GetRequiredDriveSpace("@dCurrentDrive", @iIndex)
  5338.       @iSpaceAvailable = @Eval(@DiskFree(@dCurrentDrive))
  5339.       @ShowAll("@@CheckFreeSpace()", "Drive: @dCurrentDrive , Space Required: @iSpaceRequired , Space Avail: @iSpaceAvailable")
  5340. //      @MsgBox("Drive: "@dCurrentDrive" , Space Required: @iSpaceRequired , Space Avail: @iSpaceAvailable")
  5341.       @If (@iSpaceRequired > @iSpaceAvailable)
  5342.          @qInsufficientSpaceText = "@qInsufficientSpaceText1 @dCurrentDrive.@qCRLF@qCRLF@qInsufficientSpaceText2 @iSpaceRequired @lBytes@qCRLF@qInsufficientSpaceText3 @iSpaceAvailable @lBytes"
  5343.  
  5344. laInsufficientSpaceDlg:
  5345.          @If (!@CIDBypass("N"))
  5346.             @iFuncRes = @Ask(@qWarningTitle, @qCheckFreeSpaceBitmap,
  5347.                           @iCheckFreeSpaceBitmapID,
  5348.                           "@qInsufficientSpaceText@qCRLF@qCRLF@qContinueORNot",
  5349.                            "", "")
  5350.  
  5351.             @If (@iFuncRes == 1)
  5352.                //User chose to continue.
  5353.             @ElseIf (@iFuncRes == 2)
  5354.                //User does not wish to continue. Go back to InstallPath dialog.
  5355.                @Return(@iBack)
  5356.             @Else
  5357.                @ErrorExit(@qErrorInvalidReturn, 1)
  5358.             @EndIf
  5359.          @Else  //CID - Error - no recovery possible
  5360.             @If (!@UpdateMode)
  5361.                @ErrorExit("@@CheckFreeSpace: @qInsufficientSpaceText",@iAbort)
  5362.             @EndIf
  5363.          @EndIf
  5364.       @EndIf
  5365.       @Goto loop
  5366.    @EndIf
  5367.    @Return(@iNext)
  5368. @EndFunc
  5369.  
  5370.  
  5371. //----------------------------------------------------
  5372. @DefineFunc @QString @GetInstallPathDrives(@Void)
  5373.  
  5374.    @qTMP1 = ""
  5375.    @qTMP1 = @AddPathDriveToList(@qTMP1, @qProduct1, @qInstallPath1)
  5376.    @qTMP1 = @AddPathDriveToList(@qTMP1, @qProduct2, @qInstallPath2)
  5377.    @qTMP1 = @AddPathDriveToList(@qTMP1, @qProduct3, @qInstallPath3)
  5378.    @qTMP1 = @AddPathDriveToList(@qTMP1, @qProduct4, @qInstallPath4)
  5379.    @qTMP1 = @AddPathDriveToList(@qTMP1, @qProduct5, @qInstallPath5)
  5380.    @qTMP1 = @AddPathDriveToList(@qTMP1, @qProduct6, @qInstallPath6)
  5381.    @qTMP1 = @AddPathDriveToList(@qTMP1, @qProduct7, @qInstallPath7)
  5382.    @qTMP1 = @AddPathDriveToList(@qTMP1, @qProduct8, @qInstallPath8)
  5383.    @qTMP1 = @AddPathDriveToList(@qTMP1, @qProduct9, @qInstallPath9)
  5384.    @qTMP1 = @AddPathDriveToList(@qTMP1, @qProduct10, @qInstallPath10)
  5385.    @Return(@StrUpr(@qTMP1))
  5386.  
  5387. @EndFunc
  5388.  
  5389. //----------------------------------------------------
  5390. @DefineFunc @QString @AddPathDriveToList(@In @QString @qDriveList,
  5391.                                          @In @QString @qOption,
  5392.                                          @In @QString @qInstallPath)
  5393.  
  5394.    @If (@StrCmp(@qOption, "") != 0)
  5395.       @If ((@StrFind(@qDriveList, @StrLwr(@StrHead(@qInstallPath, 1))) == -1) && (@StrFind(@qDriveList, @StrUpr(@StrHead(@qInstallPath, 1))) == -1))
  5396.          @qDriveList = "@qDriveList@!@StrHead(@qInstallPath, 1)"
  5397.       @EndIf
  5398.    @EndIf
  5399.    @Return(@qDriveList)
  5400.  
  5401. @EndFunc
  5402.  
  5403.  
  5404. //----------------------------------------------------
  5405. @DefineFunc @Integer @GetRequiredDriveSpace(@In @QString @qDrive,
  5406.                                             @In @Integer @iDriveNumber)
  5407.  
  5408.    @If (@iDriveNumber == 1)
  5409.       @iTMP1 = @iDrive1SpaceReq
  5410.    @ElseIf (@iDriveNumber == 2)
  5411.       @iTMP1 = @iDrive2SpaceReq
  5412.    @ElseIf (@iDriveNumber == 3)
  5413.       @iTMP1 = @iDrive3SpaceReq
  5414.    @ElseIf (@iDriveNumber == 4)
  5415.       @iTMP1 = @iDrive4SpaceReq
  5416.    @ElseIf (@iDriveNumber == 5)
  5417.       @iTMP1 = @iDrive5SpaceReq
  5418.    @ElseIf (@iDriveNumber == 6)
  5419.       @iTMP1 = @iDrive6SpaceReq
  5420.    @ElseIf (@iDriveNumber == 7)
  5421.       @iTMP1 = @iDrive7SpaceReq
  5422.    @ElseIf (@iDriveNumber == 8)
  5423.       @iTMP1 = @iDrive8SpaceReq
  5424.    @ElseIf (@iDriveNumber == 9)
  5425.       @iTMP1 = @iDrive9SpaceReq
  5426.    @ElseIf (@iDriveNumber == 10)
  5427.       @iTMP1 = @iDrive10SpaceReq
  5428.    @Else
  5429.       @ErrorExit(@qErrorInvalidDriveNumber, 1)
  5430.    @EndIf
  5431.  
  5432.    @Return(@iTMP1)
  5433.  
  5434. @EndFunc
  5435.  
  5436.  
  5437. //-----------------------------------------------
  5438.  
  5439. @DefineFunc @Void @SetDriveInfo(@In @QString @DriveList)
  5440.  
  5441.    @qDrive1Drive = ""
  5442.    @qDrive2Drive = ""
  5443.    @qDrive3Drive = ""
  5444.    @qDrive4Drive = ""
  5445.    @qDrive5Drive = ""
  5446.    @qDrive6Drive = ""
  5447.    @qDrive7Drive = ""
  5448.    @qDrive8Drive = ""
  5449.    @qDrive9Drive = ""
  5450.    @qDrive10Drive = ""
  5451.    @iDrive1SpaceReq = 0
  5452.    @iDrive2SpaceReq = 0
  5453.    @iDrive3SpaceReq = 0
  5454.    @iDrive4SpaceReq = 0
  5455.    @iDrive5SpaceReq = 0
  5456.    @iDrive6SpaceReq = 0
  5457.    @iDrive7SpaceReq = 0
  5458.    @iDrive8SpaceReq = 0
  5459.    @iDrive9SpaceReq = 0
  5460.    @iDrive10SpaceReq = 0
  5461.  
  5462.    @iIndex = 0
  5463.    @qSetGroups = @CustomFeaturesToGroups(@qCustomFeatures)
  5464.  
  5465. loop:
  5466.    @If (@iIndex >= @Strlen(@DriveList))
  5467.       @Goto endloop
  5468.    @EndIf
  5469. //   @qCurrentDrive = "@StrIndex(@DriveList, @iIndex)"
  5470.    @qCurrentDrive = @StrMid(@DriveList, @iIndex, 1)
  5471.    @qDriveOptions = @DriveToOptions(@qCurrentDrive)
  5472.    @ShowAll("@@SetDriveInfo()", "Drive: @qCurrentDrive , DriveOptions = @qDriveOptions")
  5473. //   @MsgBox ("Drive: @qCurrentDrive , DriveOptions = @qDriveOptions")
  5474.    @If (!@IsNull(@qDriveOptions))
  5475.       @qOptionGroups = @OptionsToGroups(@qDriveOptions)
  5476.       @If (@IsNULL(@qOptionGroups))
  5477.          @InstallSize = 0
  5478.       @Else
  5479.          @If (@IsNULL(@qSetGroups))
  5480.             //noop. All groups from option to be installed.
  5481.          @Else
  5482.             @qOptionGroups = @GroupIntersection(@qOptionGroups, @qSetGroups)
  5483.          @EndIf
  5484.          // Need to check for NULL again - the intersection might be empty
  5485.          @If (@IsNull(@qOptionGroups))
  5486.             @InstallSize = 0
  5487.          @Else
  5488.             @SetGroupsString(@qOptionGroups)
  5489.             @CalcInstallSize()
  5490.          @EndIf
  5491.       @EndIf
  5492.       @iIndex = @Eval(@iIndex + 1)
  5493.       @If (@iIndex == 1)
  5494.          @qDrive1Drive = "@qCurrentDrive"
  5495.          @iDrive1SpaceReq = @InstallSize
  5496.       @ElseIf (@iIndex == 2)
  5497.          @qDrive2Drive = "@qCurrentDrive"
  5498.          @iDrive2SpaceReq = @InstallSize
  5499.       @ElseIf (@iIndex == 3)
  5500.          @qDrive3Drive = "@qCurrentDrive"
  5501.          @iDrive3SpaceReq = @InstallSize
  5502.       @ElseIf (@iIndex == 4)
  5503.          @qDrive4Drive = "@qCurrentDrive"
  5504.          @iDrive4SpaceReq = @InstallSize
  5505.       @ElseIf (@iIndex == 5)
  5506.          @qDrive5Drive = "@qCurrentDrive"
  5507.          @iDrive5SpaceReq = @InstallSize
  5508.       @ElseIf (@iIndex == 6)
  5509.          @qDrive6Drive = "@qCurrentDrive"
  5510.          @iDrive6SpaceReq = @InstallSize
  5511.       @ElseIf (@iIndex == 7)
  5512.          @qDrive7Drive = "@qCurrentDrive"
  5513.          @iDrive7SpaceReq = @InstallSize
  5514.       @ElseIf (@iIndex == 8)
  5515.          @qDrive8Drive = "@qCurrentDrive"
  5516.          @iDrive8SpaceReq = @InstallSize
  5517.       @ElseIf (@iIndex == 9)
  5518.          @qDrive9Drive = "@qCurrentDrive"
  5519.          @iDrive9SpaceReq = @InstallSize
  5520.       @ElseIf (@iIndex == 10)
  5521.          @qDrive10Drive = "@qCurrentDrive"
  5522.          @iDrive10SpaceReq = @InstallSize
  5523.       @EndIf
  5524.    @Else
  5525.       @iIndex = @Eval(@iIndex + 1)   //empty string for Options (qDriveOptions)
  5526.    @EndIf
  5527.    @Goto loop
  5528. endloop:
  5529.    // Reset all the groups
  5530.    @SetGroupsString(@qSetGroups)
  5531.    @Return ()
  5532. @EndFunc
  5533.  
  5534. //-----------------------------------------------
  5535.  
  5536. @DefineFunc @QString @DriveToOptions(@In @QString @DriveLetter)
  5537.  
  5538.    @qTMP6 = ""
  5539.  
  5540.    @If (!@IsNULL(@qProduct10))
  5541.       @If (@StrIndex(@DriveLetter,0) == @StrIndex(@StrUpr(@qInstallPath10),0))
  5542.          @qTMP6 = "10 @qTMP6"
  5543.       @EndIf
  5544.    @EndIf
  5545.    @If (!@IsNULL(@qProduct9))
  5546.       @If (@StrIndex(@DriveLetter,0) == @StrIndex(@StrUpr(@qInstallPath9),0))
  5547.          @qTMP6 = "09 @qTMP6"
  5548.       @EndIf
  5549.    @EndIf
  5550.    @If (!@IsNULL(@qProduct8))
  5551.       @If (@StrIndex(@DriveLetter,0) == @StrIndex(@StrUpr(@qInstallPath8),0))
  5552.          @qTMP6 = "08 @qTMP6"
  5553.       @EndIf
  5554.    @EndIf
  5555.    @If (!@IsNULL(@qProduct7))
  5556.       @If (@StrIndex(@DriveLetter,0) == @StrIndex(@StrUpr(@qInstallPath7),0))
  5557.          @qTMP6 = "07 @qTMP6"
  5558.       @EndIf
  5559.    @EndIf
  5560.    @If (!@IsNULL(@qProduct6))
  5561.       @If (@StrIndex(@DriveLetter,0) == @StrIndex(@StrUpr(@qInstallPath6),0))
  5562.          @qTMP6 = "06 @qTMP6"
  5563.       @EndIf
  5564.    @EndIf
  5565.    @If (!@IsNULL(@qProduct5))
  5566.       @If (@StrIndex(@DriveLetter,0) == @StrIndex(@StrUpr(@qInstallPath5),0))
  5567.          @qTMP6 = "05 @qTMP6"
  5568.       @EndIf
  5569.    @EndIf
  5570.    @If (!@IsNULL(@qProduct4))
  5571.       @If (@StrIndex(@DriveLetter,0) == @StrIndex(@StrUpr(@qInstallPath4),0))
  5572.          @qTMP6 = "04 @qTMP6"
  5573.       @EndIf
  5574.    @EndIf
  5575.    @If (!@IsNULL(@qProduct3))
  5576.       @If (@StrIndex(@DriveLetter,0) == @StrIndex(@StrUpr(@qInstallPath3),0))
  5577.          @qTMP6 = "03 @qTMP6"
  5578.       @EndIf
  5579.    @EndIf
  5580.    @If (!@IsNULL(@qProduct2))
  5581.       @If (@StrIndex(@DriveLetter,0) == @StrIndex(@StrUpr(@qInstallPath2),0))
  5582.          @qTMP6 = "02 @qTMP6"
  5583.       @EndIf
  5584.    @EndIf
  5585.    @If (!@IsNULL(@qProduct1))
  5586.       @If (@StrIndex(@DriveLetter,0) == @StrIndex(@StrUpr(@qInstallPath1),0))
  5587.          @qTMP6 = "01 @qTMP6"
  5588.       @EndIf
  5589.    @EndIf
  5590.    @Return(@qTMP6)
  5591. @EndFunc
  5592.  
  5593. //----------------------------------------------
  5594.  
  5595. @DefineFunc @QString @OptionsToGroups(@In @QString @OptionsString)
  5596.  
  5597.    @qTMP6 = ""
  5598.    @If (@StrFind(@OptionsString, "10") >= 0)
  5599.       @qTMP6 = "@qOption10Groups @qTMP6"
  5600.    @EndIf
  5601.    @If (@StrFind(@OptionsString, "09") >= 0)
  5602.       @qTMP6 = "@qOption9Groups @qTMP6"
  5603.    @EndIf
  5604.    @If (@StrFind(@OptionsString, "08") >= 0)
  5605.       @qTMP6 = "@qOption8Groups @qTMP6"
  5606.    @EndIf
  5607.    @If (@StrFind(@OptionsString, "07") >= 0)
  5608.       @qTMP6 = "@qOption7Groups @qTMP6"
  5609.    @EndIf
  5610.    @If (@StrFind(@OptionsString, "06") >= 0)
  5611.       @qTMP6 = "@qOption6Groups @qTMP6"
  5612.    @EndIf
  5613.    @If (@StrFind(@OptionsString, "05") >= 0)
  5614.       @qTMP6 = "@qOption5Groups @qTMP6"
  5615.    @EndIf
  5616.    @If (@StrFind(@OptionsString, "04") >= 0)
  5617.       @qTMP6 = "@qOption4Groups @qTMP6"
  5618.    @EndIf
  5619.    @If (@StrFind(@OptionsString, "03") >= 0)
  5620.       @qTMP6 = "@qOption3Groups @qTMP6"
  5621.    @EndIf
  5622.    @If (@StrFind(@OptionsString, "02") >= 0)
  5623.       @qTMP6 = "@qOption2Groups @qTMP6"
  5624.    @EndIf
  5625.    @If (@StrFind(@OptionsString, "01") >= 0)
  5626.       @qTMP6 = "@qOption1Groups @qTMP6"
  5627.    @EndIf
  5628.  
  5629.    @Return(@qTMP6)
  5630. @EndFunc
  5631.  
  5632. //---------------------------------------------------
  5633. // Returns the intersection of two sets of groups
  5634. @DefineFunc @QString @GroupIntersection(@In @QString @Instring1,
  5635.             @In @QString @Instring2)
  5636.  
  5637.    @qTMP1 = ""
  5638.    @iTMP1 = 0
  5639.  
  5640. loop:
  5641.    @If (@iTMP1 < @StrLen(@InString1))
  5642.       @If ((@StrFind(@StrUpr(@InString2), @StrUpr(@StrMid(@InString1, @iTMP1, 1))) >= 0) &&
  5643.            (@StrCmp(@StrMid(@InString1,@iTMP1,1)," ") != 0))
  5644.          @qTMP1 = "@StrMid(@InString1, @iTMP1, 1) @qTMP1"
  5645.       @EndIf
  5646.       @iTMP1 = @Eval(@iTMP1 + 1)
  5647.       @Goto loop
  5648.    @EndIf
  5649.    @Return(@qTMP1)
  5650.  
  5651. @EndFunc
  5652. //
  5653. //
  5654. //
  5655. //File: ChkInuse /////////////////////////////////////
  5656. //
  5657. //CIDVars: TBD
  5658. //
  5659. //Globals changed: none
  5660. //
  5661. @DefineProto
  5662.    @Integer @CheckInUse(@Void)
  5663. @EndProto
  5664. //
  5665. //
  5666.  
  5667. //----------------------------------------------------
  5668. @DefineFunc @Integer @CheckInUse(@Void)
  5669.    //@iDialogRes = @iNext
  5670.    @Return(@iDialogRes)
  5671. @EndFunc
  5672. //
  5673. //
  5674. //
  5675. //File: Confirm /////////////////////////////////////
  5676. //
  5677. //CIDVars: NONE
  5678. //
  5679. //Globals changed: NONE
  5680. //
  5681. @DefineProto
  5682.    @Integer @ConfirmInstall(@Void)
  5683.    @Void @SetConfirmText(@Void)
  5684. @EndProto
  5685. //
  5686. //
  5687.  
  5688. //----------------------------------------------------
  5689. @DefineFunc @Integer @ConfirmInstall(@Void)
  5690.  
  5691. laConfirmInstall:
  5692.  
  5693. @If ( !@CIDBypass("N") )
  5694.    @SetConfirmText()
  5695.    
  5696.    @iDialogRes = @DialogReadOnlyBmp(@qConfirmTitle, 
  5697.                  @qConfirmBitmap, @iConfirmBitmapID,
  5698.                  @qConfirmText1, @qConfirmText2, @qConfirmText3,
  5699.                  @qBack, @qInstall, @qCancel, "", "")
  5700.  
  5701.    @If     (@iDialogRes == 1)
  5702.       @iDialogRes = @iBack
  5703.    @ElseIf (@iDialogRes == 2)
  5704.       @iDialogRes = @iNext
  5705.    @ElseIf (@iDialogRes == 3)
  5706.       @ConfirmCancel()
  5707.       @Goto laConfirmInstall
  5708.    @ElseIf (@iDialogRes == 4) 
  5709.       @ShowAll("ConfirmInstall", "Remove 4th button test")
  5710.       @Goto laConfirmInstall
  5711.    @ElseIf (@iDialogRes == 5) 
  5712.    @Else 
  5713.       @ErrorExit(@qConfirmError, @iAbort)
  5714.    @EndIf
  5715. @Endif
  5716.  
  5717.    @Return(@iDialogRes)
  5718. @EndFunc
  5719.  
  5720.  
  5721. ////////////////////////////////////////////////
  5722.  
  5723. @DefineFunc @Void @SetConfirmText(@Void)
  5724.  
  5725.    @If (@iJavaInstall)
  5726.       @If (@iProductClass == @iEnterPrise)
  5727.          @qConfirmText3 = "@qCRLF Product Type:  Enterprise@qCRLF"
  5728.       @ElseIf (@iProductClass == @iProfessional)
  5729.          @qConfirmText3 = "@qCRLF Product Type:  Professional@qCRLF"
  5730.       @Else
  5731.          @qConfirmText3 = "@qCRLF Product Type:  Entry@qCRLF"
  5732.       @EndIf
  5733.  
  5734.    @EndIf
  5735.  
  5736.    @qConfirmText3 = "@qConfirmText3 @qConfirmType"
  5737.    @If (@iInstallType == 1)
  5738.       @qConfirmText3 = "     @qConfirmText3     @qInstallType1@qCRLF"
  5739.    @ElseIf (@iInstallType == 2)
  5740.       @qConfirmText3 = "     @qConfirmText3     @qInstallType2@qCRLF"
  5741.    @ElseIf (@iInstallType == 3)
  5742.       @qConfirmText3 = "     @qConfirmText3     @qInstallType3@qCRLF"
  5743.    @ElseIf (@iInstallType == 4)
  5744.       @qConfirmText3 = "     @qConfirmText3     @qInstallType4@qCRLF"
  5745.    @ElseIf (@iInstallType == 5)
  5746.       @qConfirmText3 = "     @qConfirmText3     @qInstallType5@qCRLF"
  5747.    @Else
  5748.       @qConfirmText3 = "     @qConfirmText3     @qInstallType6@qCRLF"
  5749.    @EndIf
  5750.  
  5751.    @If (@iJavaInstall)
  5752.       @qConfirmText3 = "@qConfirmText3@qCRLF Required (Autoselected) Features@qCRLF"
  5753.       @qConfirmText3 = "@qConfirmText3     Integrated Development Environment@qCRLF"
  5754.       @If (@iProductClass != @iEntry)
  5755.          @qConfirmText3 = "@qConfirmText3     Integrated Development Environment Help@qCRLF"
  5756.          @qConfirmText3 = "@qConfirmText3     HTML Search Engine@qCRLF"
  5757.          @qConfirmText3 = "@qConfirmText3     Product Registration, Uninstall@qCRLF"
  5758.       @EndIf
  5759.    @EndIf
  5760.  
  5761.    @qConfirmText3 = "@qConfirmText3@qCRLF@qConfirmFeatures@qCRLF"
  5762.    @If (@StrFind(@qCustomFeatures,"01") >= 0)
  5763.       @qConfirmText3 = "@qConfirmText3     @qFeature01@qCRLF"
  5764.    @EndIf
  5765.    @If (@StrFind(@qCustomFeatures,"02") >= 0)
  5766.       @qConfirmText3 = "@qConfirmText3     @qFeature02@qCRLF"
  5767.    @EndIf
  5768.    @If (@StrFind(@qCustomFeatures,"03") >= 0)
  5769.       @qConfirmText3 = "@qConfirmText3     @qFeature03@qCRLF"
  5770.    @EndIf
  5771.    @If (@StrFind(@qCustomFeatures,"04") >= 0)
  5772.       @qConfirmText3 = "@qConfirmText3     @qFeature04@qCRLF"
  5773.    @EndIf
  5774.    @If (@StrFind(@qCustomFeatures,"05") >= 0)
  5775.       @qConfirmText3 = "@qConfirmText3     @qFeature05@qCRLF"
  5776.    @EndIf
  5777.    @If (@StrFind(@qCustomFeatures,"06") >= 0)
  5778.       @qConfirmText3 = "@qConfirmText3     @qFeature06@qCRLF"
  5779.    @EndIf
  5780.    @If (@StrFind(@qCustomFeatures,"07") >= 0)
  5781.       @qConfirmText3 = "@qConfirmText3     @qFeature07@qCRLF"
  5782.    @EndIf
  5783.    @If (@StrFind(@qCustomFeatures,"08") >= 0)
  5784.       @qConfirmText3 = "@qConfirmText3     @qFeature08@qCRLF"
  5785.    @EndIf
  5786.    @If (@StrFind(@qCustomFeatures,"09") >= 0)
  5787.       @qConfirmText3 = "@qConfirmText3     @qFeature09@qCRLF"
  5788.    @EndIf
  5789.    @If (@StrFind(@qCustomFeatures,"10") >= 0)
  5790.       @qConfirmText3 = "@qConfirmText3     @qFeature10@qCRLF"
  5791.    @EndIf
  5792.    @If (@StrFind(@qCustomFeatures,"11") >= 0)
  5793.       @qConfirmText3 = "@qConfirmText3     @qFeature11@qCRLF"
  5794.    @EndIf
  5795.    @If (@StrFind(@qCustomFeatures,"12") >= 0)
  5796.       @qConfirmText3 = "@qConfirmText3     @qFeature12@qCRLF"
  5797.    @EndIf
  5798.    @If (@StrFind(@qCustomFeatures,"13") >= 0)
  5799.       @qConfirmText3 = "@qConfirmText3     @qFeature13@qCRLF"
  5800.    @EndIf
  5801.    @If (@StrFind(@qCustomFeatures,"14") >= 0)
  5802.       @qConfirmText3 = "@qConfirmText3     @qFeature14@qCRLF"
  5803.    @EndIf
  5804.    @If (@StrFind(@qCustomFeatures,"15") >= 0)
  5805.       @qConfirmText3 = "@qConfirmText3     @qFeature15@qCRLF"
  5806.    @EndIf
  5807.    @If (@StrFind(@qCustomFeatures,"16") >= 0)
  5808.       @qConfirmText3 = "@qConfirmText3     @qFeature16@qCRLF"
  5809.    @EndIf
  5810.  
  5811.  
  5812.  @If (@iJavaInstall)
  5813.       @qConfirmText3 = "@qConfirmText3@qProduct1:     @qInstallPath1@qCRLF"
  5814.  @Else
  5815.    @qConfirmText3 = "@qConfirmText3@qConfirmPaths@qCRLF"
  5816.    @If (!@IsNull(@qProduct1))
  5817.       @qConfirmText3 = "@qConfirmText3     @qProduct1@qCRLF          @qInstallPath1@qCRLF"
  5818.    @EndIf
  5819.    @If (!@IsNull(@qProduct2))
  5820.       @qConfirmText3 = "@qConfirmText3     @qProduct2@qCRLF          @qInstallPath2@qCRLF"
  5821.    @EndIf
  5822.    @If (!@IsNull(@qProduct3))
  5823.       @qConfirmText3 = "@qConfirmText3     @qProduct3@qCRLF          @qInstallPath3@qCRLF"
  5824.    @EndIf
  5825.    @If (!@IsNull(@qProduct4))
  5826.       @qConfirmText3 = "@qConfirmText3     @qProduct4@qCRLF          @qInstallPath4@qCRLF"
  5827.    @EndIf
  5828.    @If (!@IsNull(@qProduct5))
  5829.       @qConfirmText3 = "@qConfirmText3     @qProduct5@qCRLF          @qInstallPath5@qCRLF"
  5830.    @EndIf
  5831.    @If (!@IsNull(@qProduct6))
  5832.       @qConfirmText3 = "@qConfirmText3     @qProduct6@qCRLF          @qInstallPath6@qCRLF"
  5833.    @EndIf
  5834.    @If (!@IsNull(@qProduct7))
  5835.       @qConfirmText3 = "@qConfirmText3     @qProduct7@qCRLF          @qInstallPath7@qCRLF"
  5836.    @EndIf
  5837.    @If (!@IsNull(@qProduct8))
  5838.       @qConfirmText3 = "@qConfirmText3     @qProduct8@qCRLF          @qInstallPath8@qCRLF"
  5839.    @EndIf
  5840.    @If (!@IsNull(@qProduct9))
  5841.       @qConfirmText3 = "@qConfirmText3     @qProduct9@qCRLF          @qInstallPath9@qCRLF"
  5842.    @EndIf
  5843.    @If (!@IsNull(@qProduct10))
  5844.       @qConfirmText3 = "@qConfirmText3     @qProduct10@qCRLF          @qInstallPath10@qCRLF"
  5845.    @EndIf
  5846.  @EndIf
  5847.  
  5848.    @qConfirmText3 = "@qConfirmText3@qCRLF@qConfirmSpace@qCRLF"
  5849.    @If (!@IsNull(@qDrive1Drive))
  5850.       @qConfirmText3 = "@qConfirmText3     @qDrive1Drive:     @Eval(@iDrive1SpaceReq/1024) KB@qCRLF"
  5851.    @EndIf
  5852.    @If (!@IsNull(@qDrive2Drive))
  5853.       @qConfirmText3 = "@qConfirmText3     @qDrive2Drive:     @Eval(@iDrive2SpaceReq/1024) KB@qCRLF"
  5854.    @EndIf
  5855.    @If (!@IsNull(@qDrive3Drive))
  5856.       @qConfirmText3 = "@qConfirmText3     @qDrive3Drive:     @Eval(@iDrive3SpaceReq/1024) KB@qCRLF"
  5857.    @EndIf
  5858.    @If (!@IsNull(@qDrive4Drive))
  5859.       @qConfirmText3 = "@qConfirmText3     @qDrive4Drive:     @Eval(@iDrive4SpaceReq/1024) KB@qCRLF"
  5860.    @EndIf
  5861.    @If (!@IsNull(@qDrive5Drive))
  5862.       @qConfirmText3 = "@qConfirmText3     @qDrive5Drive:     @Eval(@iDrive5SpaceReq/1024) KB@qCRLF"
  5863.    @EndIf
  5864.    @If (!@IsNull(@qDrive6Drive))
  5865.       @qConfirmText3 = "@qConfirmText3     @qDrive6Drive:     @Eval(@iDrive6SpaceReq/1024) KB@qCRLF"
  5866.    @EndIf
  5867.    @If (!@IsNull(@qDrive7Drive))
  5868.       @qConfirmText3 = "@qConfirmText3     @qDrive7Drive:     @Eval(@iDrive7SpaceReq/1024) KB@qCRLF"
  5869.    @EndIf
  5870.    @If (!@IsNull(@qDrive8Drive))
  5871.       @qConfirmText3 = "@qConfirmText3     @qDrive8Drive:     @Eval(@iDrive8SpaceReq/1024) KB@qCRLF"
  5872.    @EndIf
  5873.    @If (!@IsNull(@qDrive9Drive))
  5874.       @qConfirmText3 = "@qConfirmText3     @qDrive9Drive:     @Eval(@iDrive9SpaceReq/1024) KB@qCRLF"
  5875.    @EndIf
  5876.    @If (!@IsNull(@qDrive10Drive))
  5877.       @qConfirmText3 = "@qConfirmText3     @qDrive10Drive:     @Eval(@iDrive10SpaceReq/1024) KB@qCRLF"
  5878.    @EndIf
  5879.  
  5880.    @Return()
  5881. @EndFunc
  5882. //
  5883. //
  5884. //
  5885. //File: SetEnv /////////////////////////////////////
  5886. //
  5887. //CIDVars: TBD
  5888. //
  5889. //Globals changed: qOldValue
  5890. //
  5891. @DefineProto
  5892.    @Integer @SetEnvironment(@Void)
  5893.    @Void @CreateNextEnvVarsItem(@In @QString @qName, @In @QString @qValue,
  5894.                                 @In @QString @qMethod, @InOut @QString @qOldValue)
  5895.    @Void @SetEnvAutoexecBat(@In @QString @qName, @In @QString @qValue,
  5896.                             @In @QString @qMethod, @InOut @QString @qOldValue)
  5897.    @Void @SetEnvNTRegistry(@In @QString @qName, @In @QString @qValue,
  5898.                            @In @QString @qMethod, @InOut @QString @qOldValue)
  5899.    @Void @SetEnvConfigSys(@In @QString @qName, @In @QString @qValue,
  5900.                           @In @QString @qMethod, @InOut @QString @qOldValue)
  5901.    @Void @EventHandler @SetEnvRBHandler(@In @Int @OldSelected, @In @Int @NewSelected, @In @Int @RangeStart, @In @Int @RangeEnd)
  5902.    @Void @SetEnvSetHelpText(@Void)
  5903.  
  5904.    @QString @QueryVar(@In @QString @Filename, @In @QString @VarName)
  5905.    @Void @WriteVar(@In @QString @InFile, @In @QString @VarName, @In @QString @Value)
  5906.    @Void @DeleteVar(@InOut @QString @Buffer, @In @QString @Value)
  5907.    @Void @PrependVar(@InOut @QString @Buffer, @In @QString @Value)
  5908.    @Void @AppendVar(@InOut @QString @Buffer, @In @QString @Value)
  5909.    @QString @CreateBackupFilename(@In @QString @Filename)
  5910.    @Void @ModifyBatFile(@In @QString @qBatchStem, @In @QString @qName, @In @QString @qValue)
  5911. @EndProto
  5912. //
  5913. //
  5914. //----------------------------------------------------------
  5915. @DefineFunc @Void @EventHandler @SetEnvRBHandler(@In @Int @OldSelected,
  5916.                                                  @In @Int @NewSelected,
  5917.                                                  @In @Int @RangeStart,
  5918.                                                  @In @Int @RangeEnd)
  5919.   @If (@NewSelected == 1410)
  5920.      @iSetEnvRBSelected = 1
  5921.   @ElseIf(@NewSelected == 1420)
  5922.      @iSetEnvRBSelected = 2
  5923.   @ElseIf(@NewSelected == 1430)
  5924.      @iSetEnvRBSelected = 3
  5925.   @Else
  5926.      @ErrorExit(@qSetEnvTypeError1, @iAbort)
  5927.   @EndIf
  5928.   @SetEnvSetHelpText()
  5929.   @StaticText(510, @qSetEnvTypeHelpText)
  5930.   @Return()
  5931. @EndFunc
  5932.  
  5933. //----------------------------------------------------------
  5934. @DefineFunc @Integer @SetEnvironment(@Void)
  5935.  
  5936.  
  5937.    // @DisplayEnvvarChoice is a variable which allows a product to 
  5938.    // suppress the displaying of the envvar choice dialog
  5939.  
  5940.    @If ((!@CIDBypass(@qForceSetEnvironment)) && (@iDisplayEnvvarChoice))
  5941.       @If (@Platform == @Windows)
  5942.          @If(@SubPlatform == @Windows95)
  5943.             @qSetEnvMessage = "@qSetBypassMessageWin95 @qSetEnvBatMessage"
  5944.             @qSetEnvRBText2 = @qSetEnvText
  5945.             @qSetEnvRBText3 = ""
  5946.          @ElseIf(@SubPlatform == @WindowsNT)
  5947.             @qSetEnvMessage = "@qSetBypassMessageNT @qSetEnvBatMessage"
  5948.             @If (@WinIsAdmin())
  5949.                @qSetEnvRBText2 = @qSetForCurrentUserText
  5950.                @qSetEnvRBText3 = @qSetForAllUsersText
  5951.             @Else
  5952.                @qSetEnvRBText2 = @qSetEnvText
  5953.                @qSetEnvRBText3 = ""
  5954.             @EndIf
  5955.          @Else
  5956.             @ErrorExit(@qInvalidOSError, @iAbort)
  5957.          @EndIf
  5958.       @ElseIf (@Platform == @OS2)
  5959.          @qSetEnvMessage = "@qSetBypassMessageOS2 @qSetEnvBatMessage"
  5960.          @qSetEnvRBText2 = @qSetEnvText
  5961.          @qSetEnvRBText3 = ""
  5962.       @Else
  5963.          @ErrorExit(@qInvalidOSError, @iAbort)
  5964.       @EndIf
  5965.       @SetEnvSetHelpText()
  5966.  
  5967. laSetEnvDialog:
  5968.  
  5969.       @MapEventToFunc(@DlgRBEvent, @SetEnvRBHandler)
  5970.       @EnableEventMap(@DlgRBEvent)
  5971.  
  5972.       @If(@Platform == @Windows)
  5973.          @If(@SubPlatform == @Windows95)
  5974.             @qSetEnvBackupMessage = "AUTOEXEC.BAT will be backed up."
  5975.          @Else
  5976.             @qSetEnvBackupMessage = ""
  5977.          @EndIf
  5978.       @ElseIf(@Platform == @OS2)
  5979.          @qSetEnvBackupMessage = "CONFIG.SYS will be backed up."
  5980.       @Else
  5981.          @qSetEnvBackupMessage = ""
  5982.       @EndIf
  5983.  
  5984.       @iDialogRes = @DialogRadio(@qSetEnvTitle, @qSetEnvBitmap, @iSetEnvBitmapID,
  5985.                                  @qSetEnvMessage, @qSetEnvTypeHelpText, @qSetEnvBackupMessage,
  5986.                                  @qBypassRBText, @qSetEnvRBText2,
  5987.                                  @qSetEnvRBText3, "", "", "", @qHelp, @qNext,
  5988.                                  @qCancel, "", "", @iSetEnvRBSelected)
  5989.  
  5990.       @DisableEventMap(@DlgRBEvent)
  5991.  
  5992.       @If (@iDialogRes == 1)
  5993.          @DisplayHelp("@qSetEnvHelpFile")
  5994.          @Goto laSetEnvDialog
  5995.       @ElseIf (@iDialogRes == 2)
  5996.          //Bypass
  5997.       @ElseIf (@iDialogRes == 3)
  5998.          @ConfirmCancel()
  5999.          @Goto laSetEnvDialog
  6000.       @Else
  6001.             @MsgBox(@qErrorInvalidReturn)
  6002.             @Goto laSetEnvDialog
  6003.       @EndIf
  6004.  
  6005. laSetEnvPostprocessing:
  6006.  
  6007.       @If (@iSetEnvRBSelected == 1)
  6008.          @Goto laModifySetEnvBat
  6009.       @ElseIf(@iSetEnvRBSelected == 2)
  6010.          @qEnvVarLoc = @qRegSetForCurrentUser
  6011.          @iSetEnvForAllUsers = @FALSE
  6012.       @ElseIf(@iSetEnvRBSelected == 3)
  6013.          @qEnvVarLoc = @qRegSetForAllUsers
  6014.          @iSetEnvForAllUsers = @TRUE
  6015.       @Else
  6016.          @ErrorExit(@qSetEnvTypeError1)
  6017.       @EndIf
  6018.  
  6019.    @Else 
  6020.       @qEnvvarLoc = @qRegSetForAllUsers
  6021.       @iSetEnvForAllUsers = @TRUE
  6022.    @EndIf
  6023.  
  6024. //   @ShowBMP(0, @Eval((@WinScreenCaps(8) - 350) / 2), @Eval((@WinScreenCaps(10) - 60) / 2), "@qSetEnvBMPFile", 2)
  6025.  
  6026.    // The following function (@DoEnvvars() from the file envvars.dat)
  6027.    // reads info from install.ini and calls the function
  6028.    // @CreateNextEnvVarsItem() which sets the specified environment variable.
  6029.    @DoEnvvars(@qDefaultsfilename)
  6030.  
  6031.    // Set the value which states where environment variables were set in the
  6032.    // in the Windows registry (i.e. current user space, system space, or bypassed).
  6033.    @If((@Platform == @Windows) && (@SubPlatform == @WindowsNT))
  6034.       @SetRegProdValue(@lEnvVarLoc, @qEnvVarLoc)
  6035.    @EndIf
  6036.  
  6037. //   @EraseBMP(0)
  6038.  
  6039. laModifySetEnvBat:
  6040.    @ModifyBatFile("SETENV", @qMainProdVar, @qInstallPath1)
  6041.  
  6042. laModifyUninstalBat:
  6043.    @ModifyBatFile("\\INSTALL\\UNINSTAL", "INSTDIR", "@qInstallPath1\\INSTALL")
  6044.  
  6045.    @Return(@iNext)
  6046.  
  6047. @EndFunc
  6048.  
  6049.  
  6050. //----------------------------------------------------------
  6051. @DefineFunc @Void @CreateNextEnvVarsItem(@In @QString @qName,
  6052.                                          @In @QString @qValue,
  6053.                                          @In @QString @qMethod
  6054.                                          @InOut @QString @qOldValue)
  6055.  
  6056.    @qValue = @ReplaceMagicVariable(@qValue)
  6057.    @If (@Platform == @Windows)
  6058.       @If (@SubPlatform == @Windows95)
  6059.          @If(@iMakeAutoexecBatBackup)
  6060.             @qBackupAutoexecBatFile = @CreateBackupFilename("AUTOEXEC.BAT")
  6061.             @qBackupAutoexecBatFile = "@BootDrive:\\@qBackupAutoexecBatFile"
  6062.             @Copy(@qAutoexecBatFile, @qBackupAutoexecBatFile)
  6063.             @iMakeAutoexecBatBackup = @False
  6064.          @EndIf
  6065.          @SetEnvAutoexecBat(@qName, @qValue, @qMethod, @qOldValue)
  6066.       @ElseIf (@SubPlatform == @WindowsNT)
  6067.          @SetEnvNTRegistry(@qName, @qValue, @qMethod, @qOldValue)
  6068.       @Else
  6069.          @ErrorExit(@qInvalidOSError, @iAbort)
  6070.       @EndIf
  6071.    @ElseIf (@Platform == @OS2)
  6072.       @If(@iMakeConfigSysBackup)
  6073.          @qBackupConfigSysFile = @CreateBackupFilename("CONFIG.SYS")
  6074.          @qBackupConfigSysFile = "@BootDrive:\\@qBackupConfigSysFile"
  6075.          @Copy(@qConfigSysFile, @qBackupConfigSysFile)
  6076.          @iMakeConfigSysBackup = @False
  6077.       @EndIf
  6078.       @SetEnvConfigSys(@qName, @qValue, @qMethod, @qOldValue)
  6079.    @Else
  6080.       @ErrorExit(@qInvalidOSError, @iAbort)
  6081.    @EndIf
  6082.  
  6083.    @Return()
  6084.  
  6085. @EndFunc
  6086.  
  6087.  
  6088. //----------------------------------------------------------
  6089. @DefineFunc @Void @SetEnvAutoexecBat(@In @QString @qName, @In @QString @qValue,
  6090.                                      @In @QString @qMethod, @InOut @QString @qOldValue)
  6091.  
  6092.    @ShowAll("@@SetEnvAutoexecBat","Setting @qName")
  6093.  
  6094.    @qOldValue = ""
  6095.  
  6096.    @If(@StrCmp(@qMethod, @qSetEnvReplaceVar) == 0)
  6097.       @qOldValue = @QueryVar(@qAutoexecBatFile, @qName)
  6098.       @qTMP1 = @qValue
  6099.    @Else
  6100.       @qTMP1 = @QueryVar(@qAutoexecBatFile, @qName)
  6101.       @PrependVar(@qTMP1, @qValue)
  6102.    @EndIf
  6103.    @WriteVar(@qAutoexecBatFile, @qName, @qTMP1)
  6104.  
  6105.    @Return()
  6106. @EndFunc
  6107.  
  6108.  
  6109. //----------------------------------------------------------
  6110. @DefineFunc @Void @SetEnvNTRegistry(@In @QString @qName, @In @QString @qValue,
  6111.                                     @In @QString @qMethod, @InOut @QString @qOldValue)
  6112.  
  6113.     @qOldValue = ""
  6114.  
  6115.    @If (@iSetEnvForAllUsers)
  6116.       @iEnvVarKeyHandle = @HKeyLocalMachine
  6117.       @qTMP1 = "System\\CurrentControlSet\\Control\\Session Manager\\Environment"
  6118.    @Else
  6119.       @iEnvVarKeyHandle = @HKeyCurrentUser
  6120.       @qTMP1 = "Environment"
  6121.    @EndIf
  6122.  
  6123.    @If (@WinRegOpenKeyEx(@iEnvVarKeyHandle, @qTMP1, @iRegKeyAllAccess,
  6124.                          @iKeyHandle) != 0)
  6125.       @ErrorExit(@qRegOpenEnvVarKeyError, 1)
  6126.    @Else
  6127.       @If (@WinRegQueryValueEx(@iKeyHandle, @qName, @iRegValueType,
  6128.                                @qEnvVarSetting, @iTMP1) != 0)
  6129.          //env var name does not exist so set it.
  6130.          @If (@WinRegSetValueEx(@iKeyHandle, @qName, @iRegString,
  6131.                                 @qValue, @StrLen(@qValue) + 1) != 0)
  6132.             @ErrorExit("@qRegSetValueError Name:@qName, Value:@qValue", 2)
  6133.          @EndIf
  6134.       @Else
  6135.          @If (@StrCmp(@qEnvVarSetting, "") == 0)
  6136.             //Null value so set it.
  6137.             @If (@WinRegSetValueEx(@iKeyHandle, @qName, @iRegValueType,
  6138.                                    @qValue, @StrLen(@qValue) + 1) != 0)
  6139.                @ErrorExit("@qRegSetValueError Name:@qName, Value:@qValue", 2)
  6140.             @EndIf
  6141.          @ElseIf (@StrCmp(@qMethod, @qSetEnvReplaceVar) == 0)
  6142.             @qOldValue = @qEnvVarSetting
  6143.             //set value but keep the oldvalue.
  6144.             @If (@WinRegSetValueEx(@iKeyHandle, @qName, @iRegValueType,
  6145.                                 @qValue, @StrLen(@qValue) + 1) != 0)
  6146.                @ErrorExit("@qRegSetValueError Name:@qName, Value:@qValue", 2)
  6147.             @EndIf
  6148.          @Else
  6149.             //prepend the value to the environment variable.
  6150.             @PrependVar(@qEnvVarSetting, @qValue)
  6151.             @If (@WinRegSetValueEx(@iKeyHandle, @qName, @iRegValueType,
  6152.                                 @qEnvVarSetting, @StrLen(@qEnvVarSetting) + 1) != 0)
  6153.                @ErrorExit("@qRegSetValueError Name:@qName, Value:@qValue", 2)
  6154.             @EndIf
  6155.          @EndIf
  6156.       @EndIf
  6157.       //Ensure that we don't write empty string to install.sys
  6158.       @If (@StrCmp(@qOldValue, "") == 0)
  6159.          @qOldValue = @qDoubleQuotes
  6160.       @EndIf
  6161.    @EndIf
  6162.  
  6163.    @Return()
  6164. @EndFunc
  6165.  
  6166.  
  6167. //----------------------------------------------------------
  6168. @DefineFunc @Void @SetEnvConfigSys(@In @QString @qName, @In @QString @qValue,
  6169.                                    @In @QString @qMethod, @InOut @QString @qOldValue)
  6170.  
  6171.    @ShowAll("@@SetEnvConfigSys","Setting @qName")
  6172.  
  6173.    @qOldValue = ""
  6174.  
  6175.    @If(@StrCmp(@qMethod, @qSetEnvReplaceVar) == 0)
  6176.       @qOldValue = @QueryVar(@qConfigSysFile, @qName)
  6177.       @qTMP1 = @qValue
  6178.    @Else
  6179.       @qTMP1 = @QueryVar(@qConfigSysFile, @qName)
  6180.       @PrependVar(@qTMP1, @qValue)
  6181.    @EndIf
  6182.    @WriteVar(@qConfigSysFile, @qName, @qTMP1)
  6183.  
  6184.    @Return()
  6185. @EndFunc
  6186.  
  6187.  
  6188. //----------------------------------------------------------
  6189. @DefineFunc @Void @SetEnvSetHelpText(@Void)
  6190.  
  6191.   @If (@iSetEnvRBSelected == 1)
  6192.      @qSetEnvTypeHelpText = @qSetEnvTypeHelp1
  6193.   @ElseIf (@iSetEnvRBSelected == 2)
  6194.      @If ((@SubPlatform == @WindowsNT) && (@WinIsAdmin())
  6195.         @qSetEnvTypeHelpText = @qSetEnvTypeHelp2a
  6196.      @Else
  6197.         @qSetEnvTypeHelpText = @qSetEnvTypeHelp2
  6198.      @EndIf
  6199.   @ElseIf (@iSetEnvRBSelected == 3)
  6200.      @qSetEnvTypeHelpText = @qSetEnvTypeHelp3
  6201.   @Else
  6202.      @ErrorExit(@qSetEnvTypeError1, @iAbort)
  6203.   @EndIf
  6204.  
  6205.   @Return()
  6206.  
  6207. @EndFunc
  6208.  
  6209. @DefineFunc @QString @QueryVar(@In @QString @Filename, @In @QString @VarName)
  6210.    @If(@Exists(@Filename))
  6211.       @iRetVal = @ReadLine(@Filename, @qTempStr, 2048, 0)
  6212.  
  6213. laNextLineLoop:
  6214.  
  6215.       @If(@iRetVal != -1)
  6216.          @If(@StrLen(@qTempStr) > 0)
  6217.             @qTempStr2 = @StrUpr(@StrToken(@qTempStr, 0))
  6218.             @If(@StrCmp(@qTempStr2, "SET") == 0)
  6219.                @qTempStr2 = @StrToken(@StrTail(@qTempStr, (@StrLen(@qTempStr) - @StrLen(@qTempStr2) - 1)), 0, "=")
  6220.             @ElseIf(@Strcmp(@qTempStr2, "REM") == 0)
  6221.                @qTempStr2 = ""
  6222.             @Else
  6223.                @qTempStr2 = @StrToken(@qTempStr, 0, "=")
  6224.             @EndIf
  6225.          @Else
  6226.             @iRetVal = @ReadLine(@Filename, @qTempStr, 2048)
  6227.             @Goto laNextLineLoop
  6228.          @EndIf
  6229.  
  6230.          @If(@StrCmp(@StrUpr(@qTempStr2), @StrUpr(@VarName)) != 0)
  6231.             @iRetVal = @ReadLine(@Filename, @qTempStr, 2048)
  6232.             @Goto laNextLineLoop
  6233.          @Else
  6234.             @qRetVal = @StrToken(@qTempStr, 1, "=")
  6235.          @EndIf
  6236.  
  6237.       @Else
  6238.          @qRetVal = ""
  6239.       @EndIf
  6240.  
  6241.    @Else
  6242.       @qRetVal = ""
  6243.    @EndIf
  6244.  
  6245.    @Return(@qRetVal)
  6246. @EndFunc
  6247.  
  6248.  
  6249. //----------------------------------------------------------
  6250. @DefineFunc @Void @WriteVar(@In @QString @InFile, @In @QString @VarName, @In @QString @Value)
  6251.  
  6252.    @If(@Exists(@InFile))
  6253.  
  6254.       @iVarWritten = @False
  6255.       @iRetVal = @ReadLine(@InFile, @qTempStr, 2048, 0)
  6256.       @Write("@qTempPath\\@qTempTextFile", "wt", "")
  6257.  
  6258. laNextLineLoop:
  6259.  
  6260.       @If(@iRetVal != -1)
  6261.          @If(@StrLen(@qTempStr) > 0)
  6262.  
  6263.             @qTempStr2 = @StrUpr(@StrToken(@qTempStr, 0))
  6264.             @If(@StrCmp(@qTempStr2, "SET") == 0)
  6265.                @qTempStr2 = @StrToken(@StrTail(@qTempStr, (@StrLen(@qTempStr) - @StrLen(@qTempStr2) - 1)), 0, "=")
  6266.                @iRetVal = -2
  6267.             @ElseIf(@Strcmp(@qTempStr2, "REM") == 0)
  6268.                @qTempStr2 = ""
  6269.             @Else
  6270.                @qTempStr2 = @StrToken(@qTempStr, 0, "=")
  6271.             @EndIf
  6272.          @EndIf
  6273.  
  6274.          @If((@StrCmp(@StrUpr(@qTempStr2), @StrUpr(@VarName)) != 0) || @iVarWritten)
  6275.             @Write("@qTempPath\\@qTempTextFile", "at", "@qTempStr\n")
  6276.          @Else
  6277.             @If(!@IsNULL(@Value))
  6278.                @If(@iRetVal == -2)
  6279.                   @Write("@qTempPath\\@qTempTextFile", "at", "SET @VarName=@Value\n")
  6280.                @Else
  6281.                   @Write("@qTempPath\\@qTempTextFile", "at", "@VarName=@Value\n")
  6282.                @EndIf
  6283.             @EndIf
  6284.  
  6285.             @If((@StrLen(@Value) > @iSetEnvVarMaxLength) && (@Platform == @Windows) && (@SubPlatform == @Windows95))
  6286.                @MsgBox("@VarName@qSetEnvVarMaxLengthWarning@qAutoexecBatFile.")
  6287.             @EndIf
  6288.  
  6289.             @iVarWritten = @True
  6290.          @EndIf
  6291.  
  6292.          @iRetVal = @ReadLine(@InFile, @qTempStr, 2048)
  6293.          @Goto laNextLineLoop
  6294.  
  6295.       @EndIf
  6296.  
  6297.       @If(!@iVarWritten)
  6298.          @Write("@qTempPath\\@qTempTextFile", "at", "SET @VarName=@Value\n")
  6299.          @iVarWritten = @True
  6300.       @EndIf
  6301.  
  6302.       // @Delete(@InFile)
  6303.       @Copy("@qTempPath\\@qTempTextFile", @InFile)
  6304.  
  6305.    @Else
  6306.       @Write(@InFile, "wt", "SET @VarName=@Value\n")
  6307.       @iVarWritten = @True
  6308.    @EndIf
  6309.  
  6310.    @Return()
  6311. @EndFunc
  6312.  
  6313.  
  6314. //----------------------------------------------------------
  6315. @DefineFunc @Void @DeleteVar(@InOut @QString @Buffer, @In @QString @Value)
  6316.  
  6317. //Add leading and ending semicolons
  6318.  
  6319.    @qTempStr2 = ";@Value;"
  6320.    @qTempStr3 = ";@Buffer;"
  6321.    @iPos = @StrFind(@StrUpr(@qTempStr3), @StrUpr(@qTempStr2))
  6322.  
  6323.    @If(@iPos != -1)
  6324.       @qTempStr3 = @StrDel(@qTempStr3, @iPos, (@StrLen(@qTempStr2) - 1))
  6325.  
  6326. //Remove leading and trailing semicolon that was added initially
  6327. //for the check. Special case exists when the value is the only
  6328. //entry.
  6329.       @qTempStr3 = @StrTail(@qTempStr3, (@StrLen(@qTempStr3) - 1))
  6330.       @If(@StrLen(@qTempStr3) > 0)
  6331.          @qTempStr3 = @StrHead(@qTempStr3, (@StrLen(@qTempStr3) - 1))
  6332.       @EndIf
  6333.       @Buffer = @qTempStr3
  6334.    @EndIf
  6335.  
  6336.    @Return()
  6337. @EndFunc
  6338.  
  6339.  
  6340. //----------------------------------------------------------
  6341. @DefineFunc @Void @PrependVar(@InOut @QString @Buffer, @In @QString @Value)
  6342.    @qTempStr = @Value
  6343.    @DeleteVar(@Buffer, @qTempStr)
  6344.    @If(@IsNull(@Buffer))
  6345.       @Buffer = @Value
  6346.    @Else
  6347.       @Buffer = "@Value;@Buffer"
  6348.    @EndIf
  6349.  
  6350.    @Return()
  6351. @EndFunc
  6352.  
  6353.  
  6354. //----------------------------------------------------------
  6355. @DefineFunc @Void @AppendVar(@InOut @QString @Buffer, @In @QString @Value)
  6356.    @qTempStr = @Value
  6357.    @DeleteVar(@Buffer, @qTempStr)
  6358.    @If(@IsNull(@Buffer))
  6359.       @Buffer = @Value
  6360.    @Else
  6361.       @Buffer = "@Buffer;@Value"
  6362.    @EndIf
  6363.  
  6364.    @Return()
  6365. @EndFunc
  6366.  
  6367.  
  6368. //----------------------------------------------------------
  6369. @DefineFunc @QString @CreateBackupFilename(@In @QString @Filename)
  6370.    @qTMP1 = @Filename
  6371.    @If(@StrFind(@qTMP1, ".") != -1)
  6372.       @qTMP1 = @StrHead(@qTMP1, @StrFind(@qTMP1, "."))
  6373.    @EndIf
  6374.  
  6375.    @If(@StrLen(@qTMP1) > 8)
  6376.       @qTMP1 = @StrHead(@qTMP1, 8)
  6377.    @EndIf
  6378.  
  6379.    @If(@StrLen(@qTMP1) > 0)
  6380.  
  6381.       @iTMP1 = 0
  6382.  
  6383. laCreateExtension:
  6384.       @If (@iTMP1 > 100)
  6385.          @iTMP1 = 100
  6386.          @qTMP2 = "@iTMP1"
  6387.          @If (@Exists("@BootDrive:\\@qTMP1.@qTMP2"))
  6388.             @Delete("@BootDrive:\\@qTMP1.@qTMP2")
  6389.          @EndIf
  6390.       @EndIf
  6391.       @qTMP2 = "@iTMP1"
  6392.  
  6393. laZeroPad:
  6394.       @If(@StrLen(@qTMP2) < 3)
  6395.          @qTMP2 = "0@qTMP2"
  6396.          @Goto laZeroPad
  6397.       @EndIf
  6398.  
  6399.       @If(@Exists("@BootDrive:\\@qTMP1.@qTMP2"))
  6400.          @iTMP1 = (@iTMP1 + 1)
  6401.          @Goto laCreateExtension
  6402.       @Else
  6403.          @qTMP1 = "@qTMP1.@qTMP2"
  6404.       @EndIf
  6405.  
  6406.    @EndIf
  6407.  
  6408.    @qRetVal = @qTMP1
  6409.  
  6410.    @Return(@qRetVal)
  6411. @EndFunc
  6412.  
  6413. //---------------------------------------------------------------
  6414. @DefineFunc @Void @ModifyBatFile(@In @QString @qBatchStem, @In @QString @qName, @In @QString @qValue)
  6415.    @If(@Platform == @OS2)
  6416.       @qTMP1 = "@qInstallPath1\\@qBatchStem.CMD"
  6417.    @Else
  6418.       @qTMP1 = "@qInstallPath1\\@qBatchStem.BAT"
  6419.    @EndIf
  6420.    @If(@Exists(@qTMP1))
  6421.       @WriteVar(@qTMP1, @qName, @qValue)
  6422.    @EndIf
  6423.    @Return()
  6424. @EndFunc
  6425. //
  6426. //
  6427. //
  6428. //File: SetPVar /////////////////////////////////////
  6429. //
  6430. //CIDVars: TBD
  6431. //
  6432. //Globals changed:
  6433. //
  6434. @DefineProto
  6435.    @Integer @SetProductVariables(@Void)
  6436.    @Void @CreateNextProdVarsItem(@In @QString @qName, @In @QString @qValue,
  6437.                                  @In @QString @qDataType,
  6438.                                  @In @QString @qComponent, @In @QString @qMethod)
  6439.    @Void @SetWinProdVar(@In @QString @qName, @In @QString @qValue,
  6440.                         @In @Integer @iDataType,
  6441.                         @In @QString @qComponent, @In @QString @qMethod)
  6442.    @Void @SetOS2ProdVar(@In @QString @qName, @In @QString @qValue,
  6443.                         @In @Integer @iDataType,
  6444.                         @In @QString @qComponent, @In @QString @qMethod)
  6445.    @Void @SetOS2ProductINIString(@In @QString @qComponent,
  6446.             @In @QString @qName, @In @QString @qValue)
  6447.  
  6448.    @QString @GetOS2ProductINIString(@In @QString @qComponent
  6449.             @In @QString @qName)
  6450.    @QString @GetOS2ExtProductINIString(@In @QString @qComponent
  6451.             @In @QString @qName)
  6452.  
  6453.  
  6454. @EndProto
  6455. //
  6456. //
  6457. //----------------------------------------------------------
  6458. @DefineFunc @Integer @SetProductVariables(@Void)
  6459.  
  6460. //   @ShowBMP(0, @Eval((@WinScreenCaps(8) - 350) / 2), @Eval((@WinScreenCaps(10) - 60) / 2), "@qSetPVarBMPFile", 2)
  6461.  
  6462.    // The following function (@DoProdvars() from the file Prodvar.dat)
  6463.    // reads info from install.ini and calls the function
  6464.    // @CreateNextProdVarsItem() which sets the specified product variable.
  6465.    @DoProdVars(@qDefaultsfilename)
  6466.  
  6467. //   @EraseBMP(0)
  6468.  
  6469.    @Return(@iNext)
  6470.  
  6471. @EndFunc
  6472.  
  6473.  
  6474. //----------------------------------------------------------
  6475. @DefineFunc @Void @CreateNextProdVarsItem(@In @QString @qName,
  6476.                                           @In @QString @qValue,
  6477.                                           @In @QString @qDataType,
  6478.                                           @In @QString @qComponent,
  6479.                                           @In @QString @qMethod)
  6480.  
  6481.    @ShowAll("@@CreateNextProdVarsItem","What is default behaviour if no group specified?")
  6482.    @qValue = @ReplaceMagicVariable(@qValue)
  6483.    @If ((@StrCmpNos(@qDataType, @lString) == 0) || (@StrCmp(@qDataType, "") == 0))
  6484.       @iDataType = @iRegString
  6485.    @ElseIf (@StrCmpNos(@qDataType, @lExpandString) == 0)
  6486.       @iDataType = @iRegExpandString
  6487.    @ElseIf (@StrCmpNos(@qDataType, @lBinary) == 0)
  6488.       @iDataType = @iRegBinary
  6489.    @ElseIf (@StrCmpNos(@qDataType, @lDWORD) == 0)
  6490.       @iDataType = @iRegDword
  6491.    @ElseIf (@StrCmpNos(@qDataType, @lMultiString) == 0)
  6492.       @iDataType = @iRegMultiString
  6493.    @Else
  6494.       @ErrorExit("@qInvalidDataType @qName , @qComponent", 2)
  6495.    @EndIf
  6496.  
  6497.    @If (@Platform == @Windows)
  6498.       @SetWinProdVar(@qName, @qValue, @iDataType, @qComponent, @qMethod)
  6499.    @ElseIf (@Platform == @OS2)
  6500.       @SetOS2ProdVar(@qName, @qValue, @iDataType, @qComponent, @qMethod)
  6501.    @Else
  6502.       @ErrorExit(@qInvalidOSError, @iAbort)
  6503.    @EndIf
  6504.    @Return()
  6505.  
  6506. @EndFunc
  6507.  
  6508.  
  6509. //----------------------------------------------------------
  6510. @DefineFunc @Void @SetWinProdVar(@In @QString @qName,
  6511.                                  @In @QString @qValue,
  6512.                                  @In @Integer @iDataType,
  6513.                                  @In @QString @qComponent,
  6514.                                  @In @QString @qMethod)
  6515.  
  6516.    @qTMP1 = "SOFTWARE\\@qCompanyName\\@qProductName\\@qProductVersion\\@qComponent"
  6517.  
  6518.    @If (@WinRegCreateKeyEx(@HKeyLocalMachine, @qTMP1, "", 0, @iRegKeyAllAccess,
  6519.                            @Null, @iKeyHandle, @iDisposition) != 0)
  6520.       @ErrorExit("@qRegCreateProdVarKeyError Component: @qComponent", 1)
  6521.    @EndIf
  6522.  
  6523.    @If ((@iDataType == @iRegString) || (@iDataType == @iRegExpandString))
  6524.       @If (@WinRegQueryValueEx(@iKeyHandle, @qName, @iRegValueType,
  6525.                                @qProdVarSetting, @iTMP1, @iTMP2) != 0)
  6526.          //Prod var name does not exist so set it.
  6527.          @If (@WinRegSetValueEx(@iKeyHandle, @qName, @iDataType,
  6528.                                 @qValue, @StrLen(@qValue) + 1) != 0)
  6529.             @ErrorExit("@qRegSetValueError Name:@qName, Value:@qValue", 2)
  6530.          @EndIf
  6531.       @Else
  6532.          @If (@StrCmpNos(@qMethod, @qAppendProdVar) == 0)
  6533.             //Append value
  6534.             @AppendVar(@qProdVarSetting, @qValue)
  6535.             @If (@WinRegSetValueEx(@iKeyHandle, @qName, @iRegValueType,
  6536.                                 @qProdVarSetting, @StrLen(@qProdVarSetting) + 1) != 0)
  6537.                @ErrorExit("@qRegSetValueError Name:@qName, Value:@qValue", 2)
  6538.             @EndIf
  6539.          @Else
  6540.             @If (@WinRegSetValueEx(@iKeyHandle, @qName, @iDataType,
  6541.                                    @qValue, @StrLen(@qValue) + 1) != 0)
  6542.                @ErrorExit("@qRegSetValueError Name:@qName, Value:@qValue", 2)
  6543.             @EndIf
  6544.          @EndIf
  6545.       @EndIf
  6546.    @Else //datatype is not string or expandstring
  6547.       @If (@WinRegSetValueEx(@iKeyHandle, @qName, @iDataType,
  6548.                              @qValue, @StrLen(@qValue) + 1) != 0)
  6549.          @ErrorExit("@qRegSetValueError Name:@qName, Value:@qValue", 2)
  6550.       @EndIf
  6551.    @EndIf
  6552.  
  6553.    @Return()
  6554. @EndFunc
  6555.  
  6556.  
  6557. //----------------------------------------------------------
  6558. @DefineFunc @Void @SetOS2ProdVar(@In @QString @qName,
  6559.                                  @In @QString @qValue,
  6560.                                  @In @Integer @iDataType,
  6561.                                  @In @QString @qComponent,
  6562.                                  @In @QString @qMethod)
  6563.  
  6564.    @ShowAll("@@SetOS2ProdVar","Setting Component: @qComponent , Name: @qName")
  6565.    @If (@iDataType == @iRegString)
  6566.       @SetOS2ProductINIString(@qComponent,@qName,@qValue)
  6567.    @EndIf
  6568.  
  6569.    @Return()
  6570. @EndFunc
  6571.  
  6572. //--------------------------------------------------------
  6573.  
  6574. @DefineFunc @Void @SetOS2ProductINIString(@In @QString @qComponent,
  6575.             @In @QString @qName, @In @QString @qValue)
  6576.  
  6577.    @OS2SetIni(@qComponent, @qName,@QValue,@qProductINI)
  6578.  
  6579.    @Return()
  6580. @EndFunc
  6581.  
  6582. //---------------------------------------------------------
  6583.  
  6584. @DefineFunc @QString @GetOS2ProductINIString(@In @QString @qComponent,
  6585.             @In @QString @qName)
  6586.  
  6587.  
  6588.    @Return(@OS2GetINI(@qComponent, @qName, @qProductINI))
  6589.  
  6590. @EndFunc
  6591.  
  6592. //---------------------------------------------------------
  6593.  
  6594. @DefineFunc @QString @GetOS2ExtProductINIString(@In @QString @qComponent,
  6595.             @In @QString @qName)
  6596.  
  6597.    @Return(@OS2GetINI(@qComponent, @qName, @qExtProductINI))
  6598.  
  6599. @EndFunc
  6600. //
  6601. //
  6602. //
  6603. //File: ODBC /////////////////////////////////////
  6604. //
  6605. //CIDVars: TBD
  6606. //
  6607. //Globals changed: none
  6608. //
  6609. @DefineProto
  6610.    @Void @SetEnvODBC(@Void)
  6611.    @Void @SetEnvODBCWindows(@Void)
  6612.    @Void @SetEnvODBCOS2(@Void)
  6613. @EndProto
  6614. //
  6615. //
  6616.  
  6617. //----------------------------------------------------------
  6618. @DefineFunc @Void @SetEnvODBC(@Void)
  6619.  
  6620.    @If (!@iBypassODBC)
  6621. //      @ShowBMP(0, @Eval((@WinScreenCaps(8) - 350) / 2), @Eval((@WinScreenCaps(10) - 60) / 2), "@qSetODBCBMPFile", 2)
  6622.       @ShowAll("@@SetEnvODBC()", "ODBC Env vars set here.")
  6623.       @If (@Platform == @Windows)
  6624.          @SetEnvODBCWindows()
  6625.       @ElseIf (@Platform == @OS2)
  6626.          @SetEnvODBCOS2()
  6627.       @Else
  6628.          @ErrorExit(@qInvalidOSError, @iAbort)
  6629.       @EndIf
  6630. //      @EraseBMP(0)
  6631.    @EndIf
  6632.    @Return()
  6633.  
  6634. @EndFunc
  6635.  
  6636.  
  6637. //----------------------------------------------------------
  6638. @DefineFunc @Void @SetEnvODBCWindows(@Void)
  6639.  
  6640.    // Create the ODBC key
  6641.    @qTMP1 = "SOFTWARE\\ODBC\\ODBCINST.INI"
  6642.    @If (@WinRegCreateKeyEx(@HKeyLocalMachine, @qTMP1, "", 0, @iRegKeyAllAccess,
  6643.                            @Null, @iKeyHandle, @iDisposition) != 0)
  6644.       @MsgBox(@qRegCreateODBCKeyError)
  6645.    @Else
  6646.       @If (@WinRegFlushKey(@iKeyHandle) != 0)
  6647.          @MsgBox(@qRegODBCKeyWriteError)
  6648.       @EndIf
  6649.       @If (@WinRegCloseKey(@iKeyHandle) != 0)
  6650.          @MsgBox(@qRegODBCKeyCloseError)
  6651.       @EndIf
  6652.    @EndIf
  6653.  
  6654. // ---------- ODBC driver - dBase -----------
  6655.  
  6656.    @qTMP2 = "@qTMP1\\INTERSOLV 2.11 32-bit dBASEFile (*.dbf)"
  6657.    @If (@WinRegCreateKeyEx(@HKeyLocalMachine, @qTMP2, "", 0, @iRegKeyAllAccess,
  6658.                            @Null, @iKeyHandle, @iDisposition) != 0)
  6659.       @MsgBox(@qRegCreateODBCKeyError)
  6660.    @Else
  6661.       @If (@WinRegSetValueEx(@iKeyHandle, "APILevel", @iRegString,
  6662.                              "1", @StrLen("1") + 1) != 0)
  6663.          @MsgBox(@qRegSetODBCValueError)
  6664.       @EndIf
  6665.       @If (@WinRegSetValueEx(@iKeyHandle, "ConnectFunctions", @iRegString,
  6666.                              "YYN", @StrLen("YYN") + 1) != 0)
  6667.          @MsgBox(@qRegSetODBCValueError)
  6668.       @EndIf
  6669.       @If (@WinRegSetValueEx(@iKeyHandle, "Driver", @iRegString,
  6670.                              "@qInstallPath1\\ODBC32\\IBDBF08.DLL",
  6671.                              @StrLen("@qInstallPath1\\ODBC32\\IBDBF08.DLL") + 1) != 0)
  6672.          @MsgBox(@qRegSetODBCValueError)
  6673.       @EndIf
  6674.       @If (@WinRegSetValueEx(@iKeyHandle, "DriverODBCVer", @iRegString,
  6675.                              "02.10", @StrLen("02.10") + 1) != 0)
  6676.          @MsgBox(@qRegSetODBCValueError)
  6677.       @EndIf
  6678.       @If (@WinRegSetValueEx(@iKeyHandle, "FileExtns", @iRegString,
  6679.                              "*.dbf", @StrLen("*.dbf") + 1) != 0)
  6680.          @MsgBox(@qRegSetODBCValueError)
  6681.       @EndIf
  6682.  
  6683.       @If (@WinRegSetValueEx(@iKeyHandle, "FileUsage", @iRegString,
  6684.                              "1", @StrLen("1") + 1) != 0)
  6685.          @MsgBox(@qRegSetODBCValueError)
  6686.       @EndIf
  6687.       @If (@WinRegSetValueEx(@iKeyHandle, "Setup", @iRegString,
  6688.                              "@qInstallPath1\\ODBC32\\IBDBF08.DLL",
  6689.                              @StrLen("@qInstallPath1\\ODBC32\\IBDBF08.DLL") + 1) != 0)
  6690.          @MsgBox(@qRegSetODBCValueError)
  6691.       @EndIf
  6692.       @If (@WinRegSetValueEx(@iKeyHandle, "smProcessPerConnect", @iRegString,
  6693.                              "N", @StrLen("N") + 1) != 0)
  6694.          @MsgBox(@qRegSetODBCValueError)
  6695.       @EndIf
  6696.       @If (@WinRegSetValueEx(@iKeyHandle, "SQLLevel", @iRegString,
  6697.                              "0", @StrLen("0") + 1) != 0)
  6698.          @MsgBox(@qRegSetODBCValueError)
  6699.       @EndIf
  6700.       @If (@WinRegFlushKey(@iKeyHandle) != 0)
  6701.          @MsgBox(@qRegODBCKeyWriteError)
  6702.       @EndIf
  6703.       @If (@WinRegCloseKey(@iKeyHandle) != 0)
  6704.          @MsgBox(@qRegODBCKeyCloseError)
  6705.       @EndIf
  6706.  
  6707.       @qTMP2 = "@qTMP1\\ODBC Drivers"
  6708.       @If (@WinRegCreateKeyEx(@HKeyLocalMachine, @qTMP2, "", 0, @iRegKeyAllAccess,
  6709.                               @Null, @iKeyHandle, @iDisposition) != 0)
  6710.          @MsgBox(@qRegCreateODBCKeyError)
  6711.       @Else
  6712.          @If (@WinRegSetValueEx(@iKeyHandle, "INTERSOLV 2.11 32-bit dBASEFile (*.dbf)",
  6713.                                 @iRegString, "Installed", @StrLen("Installed") + 1) != 0)
  6714.             @MsgBox(@qRegSetODBCValueError)
  6715.          @EndIf
  6716.          @If (@WinRegFlushKey(@iKeyHandle) != 0)
  6717.             @MsgBox(@qRegODBCKeyWriteError)
  6718.          @EndIf
  6719.          @If (@WinRegCloseKey(@iKeyHandle) != 0)
  6720.             @MsgBox(@qRegODBCKeyCloseError)
  6721.          @EndIf
  6722.       @EndIf
  6723.    @EndIf
  6724.  
  6725. // ---------- ODBC driver - Oracle 7 -----------
  6726.  
  6727.    @qTMP2 = "@qTMP1\\INTERSOLV 2.11 32-bit Oracle 7"
  6728.    @If (@WinRegCreateKeyEx(@HKeyLocalMachine, @qTMP2, "", 0, @iRegKeyAllAccess,
  6729.                            @Null, @iKeyHandle, @iDisposition) != 0)
  6730.       @MsgBox(@qRegCreateODBCKeyError)
  6731.    @Else
  6732.       @If (@WinRegSetValueEx(@iKeyHandle, "APILevel", @iRegString,
  6733.                              "1", @StrLen("1") + 1) != 0)
  6734.          @MsgBox(@qRegSetODBCValueError)
  6735.       @EndIf
  6736.       @If (@WinRegSetValueEx(@iKeyHandle, "ConnectFunctions", @iRegString,
  6737.                              "YYY", @StrLen("YYY") + 1) != 0)
  6738.          @MsgBox(@qRegSetODBCValueError)
  6739.       @EndIf
  6740.       @If (@WinRegSetValueEx(@iKeyHandle, "Driver", @iRegString,
  6741.                              "@qInstallPath1\\ODBC32\\IBOR708.DLL",
  6742.                              @StrLen("@qInstallPath1\\ODBC32\\IBOR708.DLL") + 1) != 0)
  6743.          @MsgBox(@qRegSetODBCValueError)
  6744.       @EndIf
  6745.       @If (@WinRegSetValueEx(@iKeyHandle, "DriverODBCVer", @iRegString,
  6746.                              "02.10", @StrLen("02.10") + 1) != 0)
  6747.          @MsgBox(@qRegSetODBCValueError)
  6748.       @EndIf
  6749.       @If (@WinRegSetValueEx(@iKeyHandle, "FileUsage", @iRegString,
  6750.                              "0", @StrLen("0") + 1) != 0)
  6751.          @MsgBox(@qRegSetODBCValueError)
  6752.       @EndIf
  6753.       @If (@WinRegSetValueEx(@iKeyHandle, "Setup", @iRegString,
  6754.                              "@qInstallPath1\\ODBC32\\IBOR708.DLL",
  6755.                              @StrLen("@qInstallPath1\\ODBC32\\IBOR708.DLL") + 1) != 0)
  6756.          @MsgBox(@qRegSetODBCValueError)
  6757.       @EndIf
  6758.       @If (@WinRegSetValueEx(@iKeyHandle, "smProcessPerConnect", @iRegString,
  6759.                              "N", @StrLen("N") + 1) != 0)
  6760.          @MsgBox(@qRegSetODBCValueError)
  6761.       @EndIf
  6762.       @If (@WinRegSetValueEx(@iKeyHandle, "SQLLevel", @iRegString,
  6763.                              "1", @StrLen("1") + 1) != 0)
  6764.          @MsgBox(@qRegSetODBCValueError)
  6765.       @EndIf
  6766.       @If (@WinRegFlushKey(@iKeyHandle) != 0)
  6767.          @MsgBox(@qRegODBCKeyWriteError)
  6768.       @EndIf
  6769.       @If (@WinRegCloseKey(@iKeyHandle) != 0)
  6770.          @MsgBox(@qRegODBCKeyCloseError)
  6771.       @EndIf
  6772.       @qTMP2 = "@qTMP1\\ODBC Drivers"
  6773.       @If (@WinRegCreateKeyEx(@HKeyLocalMachine, @qTMP2, "", 0, @iRegKeyAllAccess,
  6774.                               @Null, @iKeyHandle, @iDisposition) != 0)
  6775.          @MsgBox(@qRegCreateODBCKeyError)
  6776.       @Else
  6777.          @If (@WinRegSetValueEx(@iKeyHandle, "INTERSOLV 2.11 32-bit Oracle 7",
  6778.                                 @iRegString, "Installed", @StrLen("Installed") + 1) != 0)
  6779.             @MsgBox(@qRegSetODBCValueError)
  6780.          @EndIf
  6781.          @If (@WinRegFlushKey(@iKeyHandle) != 0)
  6782.             @MsgBox(@qRegODBCKeyWriteError)
  6783.          @EndIf
  6784.          @If (@WinRegCloseKey(@iKeyHandle) != 0)
  6785.             @MsgBox(@qRegODBCKeyCloseError)
  6786.          @EndIf
  6787.       @EndIf
  6788.    @EndIf
  6789.  
  6790. // ---------- ODBC driver - Sybase -----------
  6791.  
  6792.    @qTMP2 = "@qTMP1\\INTERSOLV 2.11 32-bit Sybase System 10"
  6793.    @If (@WinRegCreateKeyEx(@HKeyLocalMachine, @qTMP2, "", 0, @iRegKeyAllAccess,
  6794.                            @Null, @iKeyHandle, @iDisposition) != 0)
  6795.       @MsgBox(@qRegCreateODBCKeyError)
  6796.    @Else
  6797.       @If (@WinRegSetValueEx(@iKeyHandle, "APILevel", @iRegString,
  6798.                              "1", @StrLen("1") + 1) != 0)
  6799.          @MsgBox(@qRegSetODBCValueError)
  6800.       @EndIf
  6801.       @If (@WinRegSetValueEx(@iKeyHandle, "ConnectFunctions", @iRegString,
  6802.                              "YYY", @StrLen("YYY") + 1) != 0)
  6803.          @MsgBox(@qRegSetODBCValueError)
  6804.       @EndIf
  6805.       @If (@WinRegSetValueEx(@iKeyHandle, "Driver", @iRegString,
  6806.                              "@qInstallPath1\\ODBC32\\IBSYB08.DLL",
  6807.                              @StrLen("@qInstallPath1\\ODBC32\\IBSYB08.DLL") + 1) != 0)
  6808.          @MsgBox(@qRegSetODBCValueError)
  6809.       @EndIf
  6810.       @If (@WinRegSetValueEx(@iKeyHandle, "DriverODBCVer", @iRegString,
  6811.                              "02.10", @StrLen("02.10") + 1) != 0)
  6812.          @MsgBox(@qRegSetODBCValueError)
  6813.       @EndIf
  6814.       @If (@WinRegSetValueEx(@iKeyHandle, "FileUsage", @iRegString,
  6815.                              "0", @StrLen("0") + 1) != 0)
  6816.          @MsgBox(@qRegSetODBCValueError)
  6817.       @EndIf
  6818.       @If (@WinRegSetValueEx(@iKeyHandle, "Setup", @iRegString,
  6819.                              "@qInstallPath1\\ODBC32\\IBSYB08.DLL",
  6820.                              @StrLen("@qInstallPath1\\ODBC32\\IBSYB08.DLL") + 1) != 0)
  6821.          @MsgBox(@qRegSetODBCValueError)
  6822.       @EndIf
  6823.       @If (@WinRegSetValueEx(@iKeyHandle, "smProcessPerConnect", @iRegString,
  6824.                              "Y", @StrLen("Y") + 1) != 0)
  6825.          @MsgBox(@qRegSetODBCValueError)
  6826.       @EndIf
  6827.       @If (@WinRegSetValueEx(@iKeyHandle, "SQLLevel", @iRegString,
  6828.                              "0", @StrLen("0") + 1) != 0)
  6829.          @MsgBox(@qRegSetODBCValueError)
  6830.       @EndIf
  6831.       @If (@WinRegFlushKey(@iKeyHandle) != 0)
  6832.          @MsgBox(@qRegODBCKeyWriteError)
  6833.       @EndIf
  6834.       @If (@WinRegCloseKey(@iKeyHandle) != 0)
  6835.          @MsgBox(@qRegODBCKeyCloseError)
  6836.       @EndIf
  6837.       @qTMP2 = "@qTMP1\\ODBC Drivers"
  6838.       @If (@WinRegCreateKeyEx(@HKeyLocalMachine, @qTMP2, "", 0, @iRegKeyAllAccess,
  6839.                               @Null, @iKeyHandle, @iDisposition) != 0)
  6840.          @MsgBox(@qRegCreateODBCKeyError)
  6841.       @Else
  6842.          @If (@WinRegSetValueEx(@iKeyHandle, "INTERSOLV 2.11 32-bit Sybase System 10",
  6843.                                 @iRegString, "Installed", @StrLen("Installed") + 1) != 0)
  6844.             @MsgBox(@qRegSetODBCValueError)
  6845.          @EndIf
  6846.          @If (@WinRegFlushKey(@iKeyHandle) != 0)
  6847.             @MsgBox(@qRegODBCKeyWriteError)
  6848.          @EndIf
  6849.          @If (@WinRegCloseKey(@iKeyHandle) != 0)
  6850.             @MsgBox(@qRegODBCKeyCloseError)
  6851.          @EndIf
  6852.          @EndIf
  6853.    @EndIf
  6854.  
  6855. // ---------- ODBC driver - Text -----------
  6856.  
  6857.    @qTMP2 = "@qTMP1\\INTERSOLV 2.11 32-bit Textfile (*.*)"
  6858.    @If (@WinRegCreateKeyEx(@HKeyLocalMachine, @qTMP2, "", 0, @iRegKeyAllAccess,
  6859.                            @Null, @iKeyHandle, @iDisposition) != 0)
  6860.       @MsgBox(@qRegCreateODBCKeyError)
  6861.    @Else
  6862.       @If (@WinRegSetValueEx(@iKeyHandle, "APILevel", @iRegString,
  6863.                              "1", @StrLen("1") + 1) != 0)
  6864.          @MsgBox(@qRegSetODBCValueError)
  6865.       @EndIf
  6866.       @If (@WinRegSetValueEx(@iKeyHandle, "ConnectFunctions", @iRegString,
  6867.                              "YYN", @StrLen("YYN") + 1) != 0)
  6868.          @MsgBox(@qRegSetODBCValueError)
  6869.       @EndIf
  6870.       @If (@WinRegSetValueEx(@iKeyHandle, "Driver", @iRegString,
  6871.                              "@qInstallPath1\\ODBC32\\IBTXT08.DLL",
  6872.                              @StrLen("@qInstallPath1\\ODBC32\\IBTXT08.DLL") + 1) != 0)
  6873.          @MsgBox(@qRegSetODBCValueError)
  6874.       @EndIf
  6875.       @If (@WinRegSetValueEx(@iKeyHandle, "DriverODBCVer", @iRegString,
  6876.                              "02.10", @StrLen("02.10") + 1) != 0)
  6877.          @MsgBox(@qRegSetODBCValueError)
  6878.       @EndIf
  6879.       @If (@WinRegSetValueEx(@iKeyHandle, "FileUsage", @iRegString,
  6880.                              "1", @StrLen("1") + 1) != 0)
  6881.          @MsgBox(@qRegSetODBCValueError)
  6882.       @EndIf
  6883.       @If (@WinRegSetValueEx(@iKeyHandle, "Setup", @iRegString,
  6884.                              "@qInstallPath1\\ODBC32\\IBTXT08.DLL",
  6885.                              @StrLen("@qInstallPath1\\ODBC32\\IBTXT08.DLL") + 1) != 0)
  6886.          @MsgBox(@qRegSetODBCValueError)
  6887.       @EndIf
  6888.       @If (@WinRegSetValueEx(@iKeyHandle, "smProcessPerConnect", @iRegString,
  6889.                              "N", @StrLen("N") + 1) != 0)
  6890.          @MsgBox(@qRegSetODBCValueError)
  6891.       @EndIf
  6892.       @If (@WinRegSetValueEx(@iKeyHandle, "SQLLevel", @iRegString,
  6893.                              "0", @StrLen("0") + 1) != 0)
  6894.          @MsgBox(@qRegSetODBCValueError)
  6895.       @EndIf
  6896.       @If (@WinRegSetValueEx(@iKeyHandle, "FileExtns", @iRegString,
  6897.                              "*.*", @StrLen("*.*") + 1) != 0)
  6898.          @MsgBox(@qRegSetODBCValueError)
  6899.       @EndIf
  6900.       @If (@WinRegFlushKey(@iKeyHandle) != 0)
  6901.          @MsgBox(@qRegODBCKeyWriteError)
  6902.       @EndIf
  6903.       @If (@WinRegCloseKey(@iKeyHandle) != 0)
  6904.          @MsgBox(@qRegODBCKeyCloseError)
  6905.       @EndIf
  6906.       @qTMP2 = "@qTMP1\\ODBC Drivers"
  6907.       @If (@WinRegCreateKeyEx(@HKeyLocalMachine, @qTMP2, "", 0, @iRegKeyAllAccess,
  6908.                               @Null, @iKeyHandle, @iDisposition) != 0)
  6909.          @MsgBox(@qRegCreateODBCKeyError)
  6910.       @Else
  6911.          @If (@WinRegSetValueEx(@iKeyHandle, "INTERSOLV 2.11 32-bit Textfile (*.*)",
  6912.                                 @iRegString, "Installed", @StrLen("Installed") + 1) != 0)
  6913.             @MsgBox(@qRegSetODBCValueError)
  6914.          @EndIf
  6915.          @If (@WinRegFlushKey(@iKeyHandle) != 0)
  6916.             @MsgBox(@qRegODBCKeyWriteError)
  6917.          @EndIf
  6918.          @If (@WinRegCloseKey(@iKeyHandle) != 0)
  6919.             @MsgBox(@qRegODBCKeyCloseError)
  6920.          @EndIf
  6921.       @EndIf
  6922.    @EndIf
  6923.  
  6924. // ---------- ODBC driver - Excel 5 -----------
  6925.  
  6926.    @qTMP2 = "@qTMP1\\INTERSOLV 2.11 32-bit Excel5Workbook (*.xls)"
  6927.    @If (@WinRegCreateKeyEx(@HKeyLocalMachine, @qTMP2, "", 0, @iRegKeyAllAccess,
  6928.                            @Null, @iKeyHandle, @iDisposition) != 0)
  6929.       @MsgBox(@qRegCreateODBCKeyError)
  6930.    @Else
  6931.       @If (@WinRegSetValueEx(@iKeyHandle, "APILevel", @iRegString,
  6932.                              "1", @StrLen("1") + 1) != 0)
  6933.          @MsgBox(@qRegSetODBCValueError)
  6934.       @EndIf
  6935.       @If (@WinRegSetValueEx(@iKeyHandle, "ConnectFunctions", @iRegString,
  6936.                              "YYN", @StrLen("YYN") + 1) != 0)
  6937.          @MsgBox(@qRegSetODBCValueError)
  6938.       @EndIf
  6939.       @If (@WinRegSetValueEx(@iKeyHandle, "Driver", @iRegString,
  6940.                              "@qInstallPath1\\ODBC32\\IBXLS508.DLL",
  6941.                              @StrLen("@qInstallPath1\\ODBC32\\IBXLS508.DLL") + 1) != 0)
  6942.          @MsgBox(@qRegSetODBCValueError)
  6943.       @EndIf
  6944.       @If (@WinRegSetValueEx(@iKeyHandle, "DriverODBCVer", @iRegString,
  6945.                              "02.10", @StrLen("02.10") + 1) != 0)
  6946.          @MsgBox(@qRegSetODBCValueError)
  6947.       @EndIf
  6948.       @If (@WinRegSetValueEx(@iKeyHandle, "FileUsage", @iRegString,
  6949.                              "2", @StrLen("2") + 1) != 0)
  6950.          @MsgBox(@qRegSetODBCValueError)
  6951.       @EndIf
  6952.       @If (@WinRegSetValueEx(@iKeyHandle, "Setup", @iRegString,
  6953.                              "@qInstallPath1\\ODBC32\\IBXLS508.DLL",
  6954.                              @StrLen("@qInstallPath1\\ODBC32\\IBXLS508.DLL") + 1) != 0)
  6955.          @MsgBox(@qRegSetODBCValueError)
  6956.       @EndIf
  6957.       @If (@WinRegSetValueEx(@iKeyHandle, "smProcessPerConnect", @iRegString,
  6958.                              "Y", @StrLen("Y") + 1) != 0)
  6959.          @MsgBox(@qRegSetODBCValueError)
  6960.       @EndIf
  6961.       @If (@WinRegSetValueEx(@iKeyHandle, "SQLLevel", @iRegString,
  6962.                              "0", @StrLen("0") + 1) != 0)
  6963.          @MsgBox(@qRegSetODBCValueError)
  6964.       @EndIf
  6965.       @If (@WinRegSetValueEx(@iKeyHandle, "FileExtns", @iRegString,
  6966.                              "*.xls", @StrLen("*.xls") + 1) != 0)
  6967.          @MsgBox(@qRegSetODBCValueError)
  6968.       @EndIf
  6969.       @If (@WinRegFlushKey(@iKeyHandle) != 0)
  6970.          @MsgBox(@qRegODBCKeyWriteError)
  6971.       @EndIf
  6972.       @If (@WinRegCloseKey(@iKeyHandle) != 0)
  6973.          @MsgBox(@qRegODBCKeyCloseError)
  6974.       @EndIf
  6975.  
  6976.       @qTMP2 = "@qTMP1\\ODBC Drivers"
  6977.       @If (@WinRegCreateKeyEx(@HKeyLocalMachine, @qTMP2, "", 0, @iRegKeyAllAccess,
  6978.                               @Null, @iKeyHandle, @iDisposition) != 0)
  6979.          @MsgBox(@qRegCreateODBCKeyError)
  6980.       @Else
  6981.          @If (@WinRegSetValueEx(@iKeyHandle, "INTERSOLV 2.11 32-bit Excel5Workbook (*.xls)",
  6982.                                 @iRegString, "Installed", @StrLen("Installed") + 1) != 0)
  6983.             @MsgBox(@qRegSetODBCValueError)
  6984.          @EndIf
  6985.          @If (@WinRegFlushKey(@iKeyHandle) != 0)
  6986.             @MsgBox(@qRegODBCKeyWriteError)
  6987.          @EndIf
  6988.          @If (@WinRegCloseKey(@iKeyHandle) != 0)
  6989.             @MsgBox(@qRegODBCKeyCloseError)
  6990.          @EndIf
  6991.       @EndIf
  6992.    @EndIf
  6993.  
  6994. // ---------- ODBC driver - Excel 4 -----------
  6995.  
  6996.    @qTMP2 = "@qTMP1\\INTERSOLV 2.11 32-bit ExcelFile (*.xls)"
  6997.    @If (@WinRegCreateKeyEx(@HKeyLocalMachine, @qTMP2, "", 0, @iRegKeyAllAccess,
  6998.                            @Null, @iKeyHandle, @iDisposition) != 0)
  6999.       @MsgBox(@qRegCreateODBCKeyError)
  7000.    @Else
  7001.       @If (@WinRegSetValueEx(@iKeyHandle, "APILevel", @iRegString,
  7002.                              "1", @StrLen("1") + 1) != 0)
  7003.          @MsgBox(@qRegSetODBCValueError)
  7004.       @EndIf
  7005.       @If (@WinRegSetValueEx(@iKeyHandle, "ConnectFunctions", @iRegString,
  7006.                              "YYN", @StrLen("YYN") + 1) != 0)
  7007.          @MsgBox(@qRegSetODBCValueError)
  7008.       @EndIf
  7009.       @If (@WinRegSetValueEx(@iKeyHandle, "Driver", @iRegString,
  7010.                              "@qInstallPath1\\ODBC32\\IBXLS08.DLL",
  7011.                              @StrLen("@qInstallPath1\\ODBC32\\IBXLS08.DLL") + 1) != 0)
  7012.          @MsgBox(@qRegSetODBCValueError)
  7013.       @EndIf
  7014.       @If (@WinRegSetValueEx(@iKeyHandle, "DriverODBCVer", @iRegString,
  7015.                              "02.10", @StrLen("02.10") + 1) != 0)
  7016.          @MsgBox(@qRegSetODBCValueError)
  7017.       @EndIf
  7018.       @If (@WinRegSetValueEx(@iKeyHandle, "FileUsage", @iRegString,
  7019.                              "1", @StrLen("1") + 1) != 0)
  7020.          @MsgBox(@qRegSetODBCValueError)
  7021.       @EndIf
  7022.       @If (@WinRegSetValueEx(@iKeyHandle, "Setup", @iRegString,
  7023.                              "@qInstallPath1\\ODBC32\\IBXLS08.DLL",
  7024.                              @StrLen("@qInstallPath1\\ODBC32\\IBXLS08.DLL") + 1) != 0)
  7025.          @MsgBox(@qRegSetODBCValueError)
  7026.       @EndIf
  7027.       @If (@WinRegSetValueEx(@iKeyHandle, "smProcessPerConnect", @iRegString,
  7028.                              "Y", @StrLen("Y") + 1) != 0)
  7029.          @MsgBox(@qRegSetODBCValueError)
  7030.       @EndIf
  7031.       @If (@WinRegSetValueEx(@iKeyHandle, "SQLLevel", @iRegString,
  7032.                              "0", @StrLen("0") + 1) != 0)
  7033.          @MsgBox(@qRegSetODBCValueError)
  7034.       @EndIf
  7035.       @If (@WinRegSetValueEx(@iKeyHandle, "FileExtns", @iRegString,
  7036.                              "*.xls", @StrLen("*.xls") + 1) != 0)
  7037.          @MsgBox(@qRegSetODBCValueError)
  7038.       @EndIf
  7039.       @If (@WinRegFlushKey(@iKeyHandle) != 0)
  7040.          @MsgBox(@qRegODBCKeyWriteError)
  7041.       @EndIf
  7042.       @If (@WinRegCloseKey(@iKeyHandle) != 0)
  7043.          @MsgBox(@qRegODBCKeyCloseError)
  7044.       @EndIf
  7045.       @qTMP2 = "@qTMP1\\ODBC Drivers"
  7046.       @If (@WinRegCreateKeyEx(@HKeyLocalMachine, @qTMP2, "", 0, @iRegKeyAllAccess,
  7047.                               @Null, @iKeyHandle, @iDisposition) != 0)
  7048.          @MsgBox(@qRegCreateODBCKeyError)
  7049.       @Else
  7050.          @If (@WinRegSetValueEx(@iKeyHandle, "INTERSOLV 2.11 32-bit ExcelFile (*.xls)",
  7051.                                 @iRegString, "Installed", @StrLen("Installed") + 1) != 0)
  7052.             @MsgBox(@qRegSetODBCValueError)
  7053.          @EndIf
  7054.          @If (@WinRegFlushKey(@iKeyHandle) != 0)
  7055.             @MsgBox(@qRegODBCKeyWriteError)
  7056.          @EndIf
  7057.          @If (@WinRegCloseKey(@iKeyHandle) != 0)
  7058.             @MsgBox(@qRegODBCKeyCloseError)
  7059.          @EndIf
  7060.       @EndIf
  7061.    @EndIf
  7062.  
  7063. // ---------- ODBC driver - Informix -----------
  7064.  
  7065.    @qTMP2 = "@qTMP1\\INTERSOLV 2.11 32-bit INFORMIX5"
  7066.    @If (@WinRegCreateKeyEx(@HKeyLocalMachine, @qTMP2, "", 0, @iRegKeyAllAccess,
  7067.                            @Null, @iKeyHandle, @iDisposition) != 0)
  7068.       @MsgBox(@qRegCreateODBCKeyError)
  7069.    @Else
  7070.       @If (@WinRegSetValueEx(@iKeyHandle, "APILevel", @iRegString,
  7071.                              "1", @StrLen("1") + 1) != 0)
  7072.          @MsgBox(@qRegSetODBCValueError)
  7073.       @EndIf
  7074.       @If (@WinRegSetValueEx(@iKeyHandle, "ConnectFunctions", @iRegString,
  7075.                              "YYY", @StrLen("YYY") + 1) != 0)
  7076.          @MsgBox(@qRegSetODBCValueError)
  7077.       @EndIf
  7078.       @If (@WinRegSetValueEx(@iKeyHandle, "Driver", @iRegString,
  7079.                              "@qInstallPath1\\ODBC32\\IBINF508.DLL",
  7080.                              @StrLen("@qInstallPath1\\ODBC32\\IBINF508.DLL") + 1) != 0)
  7081.          @MsgBox(@qRegSetODBCValueError)
  7082.       @EndIf
  7083.       @If (@WinRegSetValueEx(@iKeyHandle, "DriverODBCVer", @iRegString,
  7084.                              "02.10", @StrLen("02.10") + 1) != 0)
  7085.          @MsgBox(@qRegSetODBCValueError)
  7086.       @EndIf
  7087.       @If (@WinRegSetValueEx(@iKeyHandle, "FileUsage", @iRegString,
  7088.                              "0", @StrLen("0") + 1) != 0)
  7089.          @MsgBox(@qRegSetODBCValueError)
  7090.       @EndIf
  7091.       @If (@WinRegSetValueEx(@iKeyHandle, "Setup", @iRegString,
  7092.                              "@qInstallPath1\\ODBC32\\IBINF508.DLL",
  7093.                              @StrLen("@qInstallPath1\\ODBC32\\IBINF508.DLL") + 1) != 0)
  7094.          @MsgBox(@qRegSetODBCValueError)
  7095.       @EndIf
  7096.       @If (@WinRegSetValueEx(@iKeyHandle, "smProcessPerConnect", @iRegString,
  7097.                              "Y", @StrLen("Y") + 1) != 0)
  7098.          @MsgBox(@qRegSetODBCValueError)
  7099.       @EndIf
  7100.       @If (@WinRegSetValueEx(@iKeyHandle, "SQLLevel", @iRegString,
  7101.                              "1", @StrLen("1") + 1) != 0)
  7102.          @MsgBox(@qRegSetODBCValueError)
  7103.       @EndIf
  7104.       @If (@WinRegFlushKey(@iKeyHandle) != 0)
  7105.          @MsgBox(@qRegODBCKeyWriteError)
  7106.       @EndIf
  7107.       @If (@WinRegCloseKey(@iKeyHandle) != 0)
  7108.          @MsgBox(@qRegODBCKeyCloseError)
  7109.       @EndIf
  7110.       @qTMP2 = "@qTMP1\\ODBC Drivers"
  7111.       @If (@WinRegCreateKeyEx(@HKeyLocalMachine, @qTMP2, "", 0, @iRegKeyAllAccess,
  7112.                               @Null, @iKeyHandle, @iDisposition) != 0)
  7113.          @MsgBox(@qRegCreateODBCKeyError)
  7114.       @Else
  7115.          @If (@WinRegSetValueEx(@iKeyHandle, "INTERSOLV 2.11 32-bit INFORMIX5",
  7116.                                 @iRegString, "Installed", @StrLen("Installed") + 1) != 0)
  7117.             @MsgBox(@qRegSetODBCValueError)
  7118.          @EndIf
  7119.          @If (@WinRegFlushKey(@iKeyHandle) != 0)
  7120.             @MsgBox(@qRegODBCKeyWriteError)
  7121.          @EndIf
  7122.          @If (@WinRegCloseKey(@iKeyHandle) != 0)
  7123.             @MsgBox(@qRegODBCKeyCloseError)
  7124.          @EndIf
  7125.       @EndIf
  7126.    @EndIf
  7127.  
  7128. // ---------- ODBC driver - Ingres ----------
  7129.  
  7130.    @qTMP2 = "@qTMP1\\INTERSOLV 2.11 32-bit INGRES 6.4/04"
  7131.    @If (@WinRegCreateKeyEx(@HKeyLocalMachine, @qTMP2, "", 0, @iRegKeyAllAccess,
  7132.                            @Null, @iKeyHandle, @iDisposition) != 0)
  7133.       @MsgBox(@qRegCreateODBCKeyError)
  7134.    @Else
  7135.       @If (@WinRegSetValueEx(@iKeyHandle, "APILevel", @iRegString,
  7136.                              "1", @StrLen("1") + 1) != 0)
  7137.          @MsgBox(@qRegSetODBCValueError)
  7138.       @EndIf
  7139.       @If (@WinRegSetValueEx(@iKeyHandle, "ConnectFunctions", @iRegString,
  7140.                              "YYY", @StrLen("YYY") + 1) != 0)
  7141.          @MsgBox(@qRegSetODBCValueError)
  7142.       @EndIf
  7143.       @If (@WinRegSetValueEx(@iKeyHandle, "Driver", @iRegString,
  7144.                              "@qInstallPath1\\ODBC32\\IBING408.DLL",
  7145.                              @StrLen("@qInstallPath1\\ODBC32\\IBING408.DLL") + 1) != 0)
  7146.          @MsgBox(@qRegSetODBCValueError)
  7147.       @EndIf
  7148.       @If (@WinRegSetValueEx(@iKeyHandle, "DriverODBCVer", @iRegString,
  7149.                              "02.10", @StrLen("02.10") + 1) != 0)
  7150.          @MsgBox(@qRegSetODBCValueError)
  7151.       @EndIf
  7152.       @If (@WinRegSetValueEx(@iKeyHandle, "FileUsage", @iRegString,
  7153.                              "0", @StrLen("0") + 1) != 0)
  7154.          @MsgBox(@qRegSetODBCValueError)
  7155.       @EndIf
  7156.       @If (@WinRegSetValueEx(@iKeyHandle, "Setup", @iRegString,
  7157.                              "@qInstallPath1\\ODBC32\\IBING408.DLL",
  7158.                              @StrLen("@qInstallPath1\\ODBC32\\IBING408.DLL") + 1) != 0)
  7159.          @MsgBox(@qRegSetODBCValueError)
  7160.       @EndIf
  7161.       @If (@WinRegSetValueEx(@iKeyHandle, "smProcessPerConnect", @iRegString,
  7162.                              "Y", @StrLen("Y") + 1) != 0)
  7163.          @MsgBox(@qRegSetODBCValueError)
  7164.       @EndIf
  7165.       @If (@WinRegSetValueEx(@iKeyHandle, "SQLLevel", @iRegString,
  7166.                              "0", @StrLen("0") + 1) != 0)
  7167.          @MsgBox(@qRegSetODBCValueError)
  7168.       @EndIf
  7169.       @If (@WinRegFlushKey(@iKeyHandle) != 0)
  7170.          @MsgBox(@qRegODBCKeyWriteError)
  7171.       @EndIf
  7172.       @If (@WinRegCloseKey(@iKeyHandle) != 0)
  7173.          @MsgBox(@qRegODBCKeyCloseError)
  7174.       @EndIf
  7175.       @qTMP2 = "@qTMP1\\ODBC Drivers"
  7176.       @If (@WinRegCreateKeyEx(@HKeyLocalMachine, @qTMP2, "", 0, @iRegKeyAllAccess,
  7177.                               @Null, @iKeyHandle, @iDisposition) != 0)
  7178.          @MsgBox(@qRegCreateODBCKeyError)
  7179.       @Else
  7180.          @If (@WinRegSetValueEx(@iKeyHandle, "INTERSOLV 2.11 32-bit INGRES 6.4/04",
  7181.                                 @iRegString, "Installed", @StrLen("Installed") + 1) != 0)
  7182.             @MsgBox(@qRegSetODBCValueError)
  7183.          @EndIf
  7184.          @If (@WinRegFlushKey(@iKeyHandle) != 0)
  7185.             @MsgBox(@qRegODBCKeyWriteError)
  7186.          @EndIf
  7187.          @If (@WinRegCloseKey(@iKeyHandle) != 0)
  7188.             @MsgBox(@qRegODBCKeyCloseError)
  7189.          @EndIf
  7190.       @EndIf
  7191.    @EndIf
  7192.  
  7193. // ---------- ODBC driver - SQLBase ----------
  7194.  
  7195.    @qTMP2 = "@qTMP1\\INTERSOLV 2.11 32-bit SQLBase"
  7196.    @If (@WinRegCreateKeyEx(@HKeyLocalMachine, @qTMP2, "", 0, @iRegKeyAllAccess,
  7197.                            @Null, @iKeyHandle, @iDisposition) != 0)
  7198.       @MsgBox(@qRegCreateODBCKeyError)
  7199.    @Else
  7200.       @If (@WinRegSetValueEx(@iKeyHandle, "APILevel", @iRegString,
  7201.                              "1", @StrLen("1") + 1) != 0)
  7202.          @MsgBox(@qRegSetODBCValueError)
  7203.       @EndIf
  7204.       @If (@WinRegSetValueEx(@iKeyHandle, "ConnectFunctions", @iRegString,
  7205.                              "YYY", @StrLen("YYY") + 1) != 0)
  7206.          @MsgBox(@qRegSetODBCValueError)
  7207.       @EndIf
  7208.       @If (@WinRegSetValueEx(@iKeyHandle, "Driver", @iRegString,
  7209.                              "@qInstallPath1\\ODBC32\\IBGUP08.DLL",
  7210.                              @StrLen("@qInstallPath1\\ODBC32\\IBGUP08.DLL") + 1) != 0)
  7211.          @MsgBox(@qRegSetODBCValueError)
  7212.       @EndIf
  7213.       @If (@WinRegSetValueEx(@iKeyHandle, "DriverODBCVer", @iRegString,
  7214.                              "02.10", @StrLen("02.10") + 1) != 0)
  7215.          @MsgBox(@qRegSetODBCValueError)
  7216.       @EndIf
  7217.       @If (@WinRegSetValueEx(@iKeyHandle, "FileUsage", @iRegString,
  7218.                              "0", @StrLen("0") + 1) != 0)
  7219.          @MsgBox(@qRegSetODBCValueError)
  7220.       @EndIf
  7221.       @If (@WinRegSetValueEx(@iKeyHandle, "Setup", @iRegString,
  7222.                              "@qInstallPath1\\ODBC32\\IBGUP08.DLL",
  7223.                              @StrLen("@qInstallPath1\\ODBC32\\IBGUP08.DLL") + 1) != 0)
  7224.          @MsgBox(@qRegSetODBCValueError)
  7225.       @EndIf
  7226.       @If (@WinRegSetValueEx(@iKeyHandle, "smProcessPerConnect", @iRegString,
  7227.                              "Y", @StrLen("Y") + 1) != 0)
  7228.          @MsgBox(@qRegSetODBCValueError)
  7229.       @EndIf
  7230.       @If (@WinRegSetValueEx(@iKeyHandle, "SQLLevel", @iRegString,
  7231.                              "1", @StrLen("1") + 1) != 0)
  7232.          @MsgBox(@qRegSetODBCValueError)
  7233.       @EndIf
  7234.       @If (@WinRegFlushKey(@iKeyHandle) != 0)
  7235.          @MsgBox(@qRegODBCKeyWriteError)
  7236.       @EndIf
  7237.       @If (@WinRegCloseKey(@iKeyHandle) != 0)
  7238.          @MsgBox(@qRegODBCKeyCloseError)
  7239.       @EndIf
  7240.       @qTMP2 = "@qTMP1\\ODBC Drivers"
  7241.       @If (@WinRegCreateKeyEx(@HKeyLocalMachine, @qTMP2, "", 0, @iRegKeyAllAccess,
  7242.                               @Null, @iKeyHandle, @iDisposition) != 0)
  7243.          @MsgBox(@qRegCreateODBCKeyError)
  7244.       @Else
  7245.          @If (@WinRegSetValueEx(@iKeyHandle, "INTERSOLV 2.11 32-bit SQLBase",
  7246.                                 @iRegString, "Installed", @StrLen("Installed") + 1) != 0)
  7247.             @MsgBox(@qRegSetODBCValueError)
  7248.          @EndIf
  7249.          @If (@WinRegFlushKey(@iKeyHandle) != 0)
  7250.             @MsgBox(@qRegODBCKeyWriteError)
  7251.          @EndIf
  7252.          @If (@WinRegCloseKey(@iKeyHandle) != 0)
  7253.             @MsgBox(@qRegODBCKeyCloseError)
  7254.          @EndIf
  7255.       @EndIf
  7256.    @EndIf
  7257.  
  7258. // ---------- ODBC driver - SQLServer ----------
  7259.  
  7260.    @qTMP2 = "@qTMP1\\INTERSOLV 2.11 32-bit SQLServer"
  7261.    @If (@WinRegCreateKeyEx(@HKeyLocalMachine, @qTMP2, "", 0, @iRegKeyAllAccess,
  7262.                            @Null, @iKeyHandle, @iDisposition) != 0)
  7263.       @MsgBox(@qRegCreateODBCKeyError)
  7264.    @Else
  7265.       @If (@WinRegSetValueEx(@iKeyHandle, "APILevel", @iRegString,
  7266.                              "1", @StrLen("1") + 1) != 0)
  7267.          @MsgBox(@qRegSetODBCValueError)
  7268.       @EndIf
  7269.       @If (@WinRegSetValueEx(@iKeyHandle, "ConnectFunctions", @iRegString,
  7270.                              "YYY", @StrLen("YYY") + 1) != 0)
  7271.          @MsgBox(@qRegSetODBCValueError)
  7272.       @EndIf
  7273.       @If (@WinRegSetValueEx(@iKeyHandle, "Driver", @iRegString,
  7274.                              "@qInstallPath1\\ODBC32\\IBSS08.DLL",
  7275.                              @StrLen("@qInstallPath1\\ODBC32\\IBSS08.DLL") + 1) != 0)
  7276.          @MsgBox(@qRegSetODBCValueError)
  7277.       @EndIf
  7278.       @If (@WinRegSetValueEx(@iKeyHandle, "DriverODBCVer", @iRegString,
  7279.                              "02.10", @StrLen("02.10") + 1) != 0)
  7280.          @MsgBox(@qRegSetODBCValueError)
  7281.       @EndIf
  7282.       @If (@WinRegSetValueEx(@iKeyHandle, "FileUsage", @iRegString,
  7283.                              "0", @StrLen("0") + 1) != 0)
  7284.          @MsgBox(@qRegSetODBCValueError)
  7285.       @EndIf
  7286.       @If (@WinRegSetValueEx(@iKeyHandle, "Setup", @iRegString,
  7287.                              "@qInstallPath1\\ODBC32\\IBSS08.DLL",
  7288.                              @StrLen("@qInstallPath1\\ODBC32\\IBSS08.DLL") + 1) != 0)
  7289.          @MsgBox(@qRegSetODBCValueError)
  7290.       @EndIf
  7291.       @If (@WinRegSetValueEx(@iKeyHandle, "smProcessPerConnect", @iRegString,
  7292.                              "Y", @StrLen("Y") + 1) != 0)
  7293.          @MsgBox(@qRegSetODBCValueError)
  7294.       @EndIf
  7295.       @If (@WinRegSetValueEx(@iKeyHandle, "SQLLevel", @iRegString,
  7296.                              "1", @StrLen("1") + 1) != 0)
  7297.          @MsgBox(@qRegSetODBCValueError)
  7298.       @EndIf
  7299.       @If (@WinRegFlushKey(@iKeyHandle) != 0)
  7300.          @MsgBox(@qRegODBCKeyWriteError)
  7301.       @EndIf
  7302.       @If (@WinRegCloseKey(@iKeyHandle) != 0)
  7303.          @MsgBox(@qRegODBCKeyCloseError)
  7304.       @EndIf
  7305.       @qTMP2 = "@qTMP1\\ODBC Drivers"
  7306.       @If (@WinRegCreateKeyEx(@HKeyLocalMachine, @qTMP2, "", 0, @iRegKeyAllAccess,
  7307.                               @Null, @iKeyHandle, @iDisposition) != 0)
  7308.          @MsgBox(@qRegCreateODBCKeyError)
  7309.       @Else
  7310.          @If (@WinRegSetValueEx(@iKeyHandle, "INTERSOLV 2.11 32-bit SQLServer",
  7311.                                 @iRegString, "Installed", @StrLen("Installed") + 1) != 0)
  7312.             @MsgBox(@qRegSetODBCValueError)
  7313.          @EndIf
  7314.          @If (@WinRegFlushKey(@iKeyHandle) != 0)
  7315.             @MsgBox(@qRegODBCKeyWriteError)
  7316.          @EndIf
  7317.          @If (@WinRegCloseKey(@iKeyHandle) != 0)
  7318.             @MsgBox(@qRegODBCKeyCloseError)
  7319.          @EndIf
  7320.       @EndIf
  7321.    @EndIf
  7322.  
  7323.    @Return()
  7324.  
  7325. @EndFunc
  7326.  
  7327.  
  7328. //----------------------------------------------------------
  7329. @DefineFunc @Void @SetEnvODBCOS2(@Void)
  7330.  
  7331.   @ShowAll("@@SetEnvODBCOS2()", "No special ODBC setup for OS2 at present.")
  7332.   @Return()
  7333.  
  7334. @EndFunc
  7335. //
  7336. //
  7337. //
  7338. //File: SetDesk /////////////////////////////////////
  7339. //
  7340. //CIDVars: TBD
  7341. //
  7342. //Globals changed: none
  7343. //
  7344. @DefineProto
  7345.    @Integer @SetDesktop(@Void)
  7346.    @Void @CreateDeskTopItem(@In @QString @qTitle, @In @QString @qFolder,
  7347.                             @In @QString @qType, @In @QString @qExePath,
  7348.                             @In @QString @qIconPath, @In @QString @qIconNumber,
  7349.                             @In @QString @qParameters, @In @QString @qWorkingDir,
  7350.                             @In @QString @qOS2ObjectID, @In @QString @qOS2ProgType,
  7351.                             @In @QString @qOption1, @In @QString @qOption2)
  7352.    @QString @ReplaceMagicVariable(@In @QString @qPathString)
  7353.    @Void @CreateWPSObject(@In @QString @Class,
  7354.                           @In @QString @Title,
  7355.                           @In @QString @Folder,
  7356.                           @In @QString @ProgType,
  7357.                           @In @QString @ExePath,
  7358.                           @In @QString @ObjectID,
  7359.                           @In @QString @StartupDir,
  7360.                           @In @QString @Parameters,
  7361.                           @In @QString @IconFile)
  7362.    @Integer @IsNULL(@In @QString @InValue)
  7363. @EndProto
  7364. //
  7365. //
  7366.  
  7367. //----------------------------------------------------------
  7368. @DefineFunc @Integer @SetDesktop(@Void)
  7369. //   @ShowBMP(0, @Eval((@WinScreenCaps(8) - 350) / 2), @Eval((@WinScreenCaps(10) - 60) / 2), "@qSetDeskBMPFile", 2)
  7370.    @DoIcon(@qDefaultsFilename)
  7371. //   @EraseBMP(0)
  7372.    @iDialogRes = @iNext
  7373.    @Return(@iDialogRes)
  7374. @EndFunc
  7375.  
  7376.  
  7377. //----------------------------------------------------------
  7378. @DefineFunc @Void @CreateDeskTopItem(@In @QString @qTitle, @In @QString @qFolder,
  7379.                      @In @QString @qType, @In @QString @qExePath,
  7380.                      @In @QString @qIconPath, @In @QString @qIconNumber,
  7381.                      @In @QString @qParameters, @In @QString @qWorkingDir,
  7382.                      @In @QString @qOS2ObjectID, @In @QString @qOS2ProgType,
  7383.                      @In @QString @qOption1, @In @QString @qOption2)
  7384.  
  7385.    @ShowAll("@@CreateDeskTopItem()", "Need capability to create current user folders when user is admin on NT.")
  7386.    @ShowAll("@@CreateDeskTopItem()", "Creating @qType")
  7387.  
  7388.    @qTitle = @ReplaceMagicVariable(@qTitle)
  7389.    @qFolder = @ReplaceMagicVariable(@qFolder)
  7390.    @qIconPath = @ReplaceMagicVariable(@qIconPath)
  7391.    @qExePath = @ReplaceMagicVariable(@qExePath)
  7392.    @qParameters = @ReplaceMagicVariable(@qParameters)
  7393.    @qWorkingDir = @ReplaceMagicVariable(@qWorkingDir)
  7394.  
  7395.  
  7396.    @If (@StrCmp(@qType, @qFolderType) == 0)
  7397.       @If (@Platform == @Windows)
  7398.          @ProgramManager("[CreateGroup(@qTitle)]")
  7399.       @ElseIf(@Platform == @OS2)
  7400.          @If(@StrLen(@qInstallFolderID) == 0)
  7401.             @qInstallFolderID = @qOS2ObjectID
  7402.          @EndIf
  7403.          @CreateWPSObject("WPFolder", @qTitle, @qOption1, @qOS2ProgType,
  7404.             @qExePath, @qOS2ObjectID, @qWorkingDir, @qParameters, @qIconPath)
  7405.          @qInstallFolderID  = @qOS2ObjectID
  7406.       @Else
  7407.          @ErrorExit(@qInvalidOSError)
  7408.       @EndIf
  7409.    @ElseIf (@StrCmp(@qType, @qProgramType) == 0)
  7410.       //Create the icon only if the file exists
  7411.       @If (@Exists(@qExePath) == @TRUE)
  7412.          @If (@Platform == @Windows)
  7413.             @If (!@IsNull(@qParameters))
  7414.                @qExePath = "@qExePath @qParameters"
  7415.             @EndIf
  7416.             @ProgramManager("[CreateGroup(@qFolder)]")
  7417.             @ProgramManager("[AddItem(@qExePath, @qTitle, @qIconPath, @qIconNumber,,,
  7418.                             @qWorkingDir)]")
  7419.          @ElseIf(@Platform == @OS2)
  7420.             @CreateWPSObject("WPProgram", @qTitle, @qOption1, @qOS2ProgType,
  7421.                @qExePath, @qOS2ObjectID, @qWorkingDir, @qParameters, @qIconPath)
  7422.          @Else
  7423.             @ErrorExit(@qInvalidOSError)
  7424.          @EndIf
  7425.       @EndIf
  7426.    @ElseIf (@StrCmp(@qType, @qCommandType) == 0)
  7427.       @qExePath = @GetEnv("COMSPEC")
  7428.       //Create the icon only if the file exists
  7429.       @If (@Exists(@qExePath))
  7430.         @If (@Platform == @Windows)
  7431.             @If ((@SubPlatform == @Windows95) && (@IsNULL(@qIconPath)))
  7432.                @qIconPath = "@WinSystemDrive:@WinSystemDir\\pifmgr.dll"
  7433.             @ElseIf ((@SubPlatform == @WindowsNT) && (@IsNULL(@qIconPath)))
  7434.                @qIconPath = "@WinSystemDrive:@WinSystemDir\\CMD.EXE"
  7435.             @EndIf
  7436.             @If (!@IsNull(@qParameters))
  7437.                @qExePath = "@qExePath @qParameters"
  7438.             @EndIf
  7439.             @ProgramManager("[CreateGroup(@qFolder)]")
  7440.             @ProgramManager("[AddItem(@qExePath, @qTitle,@qIconPath,@qIconNumber,,,
  7441.                             @qWorkingDir)]")
  7442.          @ElseIf(@Platform == @OS2)
  7443.             @CreateWPSObject("WPProgram", @qTitle, @qOption1, @qOS2ProgType,
  7444.                @qExePath, @qOS2ObjectID, @qWorkingDir, @qParameters, @qIconPath)
  7445.          @Else
  7446.             @ErrorExit(@qInvalidOSError)
  7447.          @EndIf
  7448.       @Else
  7449.         @MsgBox(@qCommandTypeError)
  7450.       @EndIf
  7451.    @ElseIf (@StrCmp(@qType, @qTextFileType) == 0)
  7452.       //Create the icon only if the file exists
  7453.       @If (@Exists(@qParameters))
  7454.         @If (@Platform == @Windows)
  7455.             @qExePath = "Notepad.exe @qParameters"
  7456.             @ProgramManager("[CreateGroup(@qFolder)]")
  7457.             @ProgramManager("[AddItem(@qExePath, @qTitle, @qIconPath, @qIconNumber,,, @qWorkingDir)]")
  7458.          @ElseIf(@Platform == @OS2)
  7459.             @qExePath = "E.EXE"
  7460.             @CreateWPSObject("WPProgram", @qTitle, @qOption1, @qOS2ProgType,
  7461.                @qExePath, @qOS2ObjectID, @qWorkingDir, @qParameters, @qIconPath)
  7462.          @Else
  7463.             @ErrorExit(@qInvalidOSError)
  7464.          @EndIf
  7465.       @EndIf
  7466.    @ElseIf (@StrCmp(@qType, "URL") == 0)
  7467.       @If(@Platform == @OS2)
  7468. //         @If (@OSMajor < 4)   //Not Merlin
  7469. //            @qExePath="netscape.exe"
  7470. //            @CreateWPSObject("WPProgram",@qTitle,@qOption1,@qOS2ProgType,
  7471. //              @qExePath,@qOS2ObjectID, @qWorkingDir, @qParameters, @qIconPath)
  7472. //         @Else //Merlin               
  7473.             @qExePath = ""
  7474.             @CreateWPSObject("WPURL", @qTitle, @qOption1, @qOS2ProgType,
  7475.               @qExePath, @qOS2ObjectID, @qWorkingDir, @qParameters, @qIconPath)
  7476. //         @EndIf
  7477.       @EndIf
  7478.    @ElseIf (@StrCmp(@qType, @qLinkToFolderType) == 0)
  7479.       @MsgBox("Need to create link to folder here.")
  7480.    @Else
  7481.       @MsgBox (@qInvalidDesktopItemType)
  7482.    @EndIf
  7483.    @Return()
  7484.  
  7485. @EndFunc
  7486.  
  7487.  
  7488. //----------------------------------------------------------
  7489. @DefineFunc @QString @ReplaceMagicVariable(@In @QString @qPathString)
  7490.  
  7491. loop:
  7492.    //Get the beginning of the magic variable
  7493.    @iTMP1 = @StrFind(@qPathString, "*!")
  7494.    //Get the end of the magic variable
  7495.    @iTMP4 = @StrFind(@qPathString, "!*")
  7496.    @If ( (@iTMP1 != -1) && (@iTMP4 != -1) && (@iTMP4 > @iTMP1) )
  7497.       @iTMP2 = @StrLen(@qPathString)
  7498.       @iTMP3 = @Eval(@iTMP2-@iTMP4 - 2)
  7499.       //Get the beginning of @qPathString (before the magic variable)
  7500.       @qTMP1 = @StrHead(@qPathString, @iTMP1)
  7501.       //Get the magic variable
  7502.       @qTMP2 = @StrMid(@qPathString, @Eval(@iTMP1+2), @Eval(@iTMP4-@iTMP1- 2) )
  7503.       //Get the ending of q PathString (afger the magic variable)
  7504.       @qTMP3 = @StrMid(@qPathString, @Eval(@iTMP4+2), @iTMP3 )
  7505.  
  7506.       //Get the real value of the magic variable.
  7507.       @If (@StrCmp(@qTMP2, "InstallPath1") == 0)
  7508.           @qTMP2 = @qInstallPath1
  7509.       @ElseIf (@StrCmp(@qTMP2, "InstallPath2") == 0)
  7510.           @qTMP2 = @qInstallPath2
  7511.       @ElseIf (@StrCmp(@qTMP2, "InstallPath3") == 0)
  7512.           @qTMP2 = @qInstallPath3
  7513.       @ElseIf (@StrCmp(@qTMP2, "InstallPath4") == 0)
  7514.           @qTMP2 = @qInstallPath4
  7515.       @ElseIf (@StrCmp(@qTMP2, "InstallPath5") == 0)
  7516.           @qTMP2 = @qInstallPath5
  7517.       @ElseIf (@StrCmp(@qTMP2, "InstallPath6") == 0)
  7518.           @qTMP2 = @qInstallPath6
  7519.       @ElseIf (@StrCmp(@qTMP2, "InstallPath7") == 0)
  7520.           @qTMP2 = @qInstallPath7
  7521.       @ElseIf (@StrCmp(@qTMP2, "InstallPath8") == 0)
  7522.           @qTMP2 = @qInstallPath8
  7523.       @ElseIf (@StrCmp(@qTMP2, "InstallPath9") == 0)
  7524.           @qTMP2 = @qInstallPath9
  7525.       @ElseIf (@StrCmp(@qTMP2, "InstallPath10") == 0)
  7526.           @qTMP2 = @qInstallPath10
  7527.       @ElseIf (@StrCmp(@qTMP2, "ProductName") == 0)
  7528.           @qTMP2 = @qProductName
  7529.       @Else
  7530.           @MsgBox(@qInvalidInstallPath)
  7531.       @EndIf
  7532.       @qPathString = "@qTMP1@qTMP2@qTMP3"
  7533.       @Goto loop
  7534.    @EndIf
  7535.    @Return("@qPathString")
  7536.  
  7537. @EndFunc
  7538.  
  7539.  
  7540. //----------------------------------------------------------
  7541. @DefineFunc @Void @CreateWPSObject(@In @QString @Class,
  7542.                                     @In @QString @Title,
  7543.                                     @In @QString @Folder,
  7544.                                     @In @QString @ProgType,
  7545.                                     @In @QString @ExePath,
  7546.                                     @In @QString @ObjectID,
  7547.                                     @In @QString @StartupDir,
  7548.                                     @In @QString @Parameters,
  7549.                                     @In @QString @IconFile)
  7550.  
  7551.    @If (@Exists("@qTempPath\\@qREXXScriptFile"))
  7552.       @Write("@qTempPath\\@qREXXScriptFile", "at", "/* REXX CMD Script */\n\n")
  7553.    @Else
  7554.       @Write("@qTempPath\\@qREXXScriptFile", "wt", "/* REXX CMD Script */\n\n")
  7555.       @Write(,,"CALL RxFuncAdd 'SysLoadFuncs', 'REXXUtil', 'SysLoadFuncs'\n")
  7556.       @Write(,,"CALL SysLoadFuncs\n\n")
  7557.    @EndIf
  7558.    @Write(,,"classname = '@Class'\n")
  7559.    @Write(,,"title = '@Title'\n")
  7560.    @If(@IsNULL(@Folder))
  7561.       @Write(,,"location = <WP_DESKTOP>"
  7562.    @Else
  7563.       @Write(,,"location = '<@Folder>'\n")
  7564.    @EndIf
  7565.  
  7566.    @If(!@IsNull(@ObjectID))
  7567.       @Write(,,"setup = 'OBJECTID=<@ObjectID>")
  7568.    @Else
  7569.       @ErrorExit("WPS Object '@Title' does not have an ObjectID")
  7570.    @EndIf
  7571.  
  7572.    @If(!@IsNull(@ProgType))
  7573.       @Write(,,";PROGTYPE=@ProgType")
  7574.    @EndIf
  7575.  
  7576.    @If(!@IsNULL(@ExePath))
  7577.       @Write(,,";EXENAME=@ExePath")
  7578.    @EndIf
  7579.  
  7580.    @If(!@IsNULL(@StartupDir))
  7581.       @Write(,,";STARTUPDIR=@StartupDir")
  7582.    @EndIf
  7583.  
  7584.    @If(!@IsNULL(@Parameters))
  7585.       @If(@StrCmp(@Class,"WPURL") == 0)
  7586.          @Write(,,";URL=@Parameters")
  7587.       @Else
  7588.          @Write(,,";PARAMETERS=@Parameters")
  7589.       @EndIf
  7590.    @EndIf
  7591.  
  7592.    @If(!@IsNULL(@IconFile))
  7593.       @Write(,,";ICONFILE=@IconFile")
  7594.    @EndIf
  7595.  
  7596.    @Write(,,"'\n")
  7597.    @Write(,,"return = SysCreateObject(classname, title, location, setup)\n\n")
  7598. //   @Write(,, "EXIT\n")
  7599.  
  7600. //   @OS2Exec("@qTempPath\\@qREXXScriptFile","","",1,3,"Creating @Class @Title","",0,0,0,0,-1,0)
  7601.  
  7602.    @Return()
  7603. @EndFunc
  7604.  
  7605.  
  7606. //----------------------------------------------------------
  7607. @DefineFunc @Integer @IsNULL(@In @QString @InValue)
  7608.    @Return((@StrLen(@InValue) == 0) || (@StrCmp(@InValue, @qDoubleQuotes) == 0))
  7609. @EndFunc
  7610. //
  7611. //
  7612. //
  7613. //File: RegProd /////////////////////////////////////
  7614. //
  7615. //CIDVars: TBD
  7616. //
  7617. //Globals changed: none
  7618. //
  7619. @DefineProto
  7620.    @Integer @RegisterProduct(@Void)
  7621.    @Void @RegProdWindows(@Void)
  7622.    @Void @RegProdOS2(@Void)
  7623.    @Void @SetRegProdValue(@In @QString @qName, @In @QString @qValue)
  7624.    @Void @SetRegProdValueOS2(@In @QString @qName, @In @QString @qValue)
  7625.    @Void @InitRegProdEnvVarLoc(@Void)
  7626.    @Void @SetProductINI(@Void)
  7627.    @Void @BackupConfigSys(@Void)
  7628.    @Void @SetProductINIPointer(@Void)
  7629.    @QString @GetProductINIPointer(@Void)
  7630.    @QString @GetExtProductINIPointer(@In @QString @qExtProductINIPointerApp,@In @QString @qExtProductINIPointerKey)
  7631.    @Void @DeleteProductINIPointer(@Void)
  7632.  
  7633. @EndProto
  7634. //
  7635. //
  7636.  
  7637. //----------------------------------------------------------
  7638. @DefineFunc @Integer @RegisterProduct(@Void)
  7639.  
  7640.    @If(@Platform == @Windows)
  7641.       @RegProdWindows()
  7642.    @ElseIf(@Platform == @OS2)
  7643.       @RegProdOS2()
  7644.    @Else
  7645.       @MsgBox(@qInvalidOSError)
  7646.    @EndIf
  7647.  
  7648.    //Write Product Info to install.sys
  7649.    @AddSectionInstallSys(@lProductInfo)
  7650.    @WritelnInstallSys("@lDirectory=@qInstallPath1")
  7651.    @WritelnInstallSys("@lFolder=@qFolderName")
  7652.    @WritelnInstallSys("@lFixPak=@qFixPakLevel")
  7653.    @WritelnInstallSys("@lLanguage=@qLanguage")
  7654.    @If ((@Platform == @Windows) && (@SubPlatform == @WindowsNT))
  7655.       @WritelnInstallSys("@lEnvVarLoc=@qEnvVarLoc")
  7656.    @EndIf
  7657.  
  7658.    @Return(@iNext)
  7659.  
  7660. @EndFunc
  7661.  
  7662.  
  7663. //----------------------------------------------------------
  7664. @DefineFunc @Void @RegProdWindows(@Void)
  7665.  
  7666.    @ShowAll("@@RegProdWindows()", "Register product info done here.")
  7667.    @ShowAll("@@RegProdWindows()", "Nothing into AppPath.")
  7668.  
  7669.    @SetRegProdValue(@lDirectory, @qInstallPath1)
  7670.    @SetRegProdValue(@lFolder, @qFolderName)
  7671.    @SetRegProdValue(@lLanguage, @qLanguage)
  7672.    @SetRegProdValue(@lFixPak, @qFixPakLevel)
  7673.    //set the value for where env. vars. are to be set (Only for WinNT)
  7674.    @If (@SubPlatform == @WindowsNT)
  7675.       @InitRegProdEnvVarLoc()
  7676.    @EndIf
  7677.  
  7678.    @Return()
  7679.  
  7680. @EndFunc
  7681.  
  7682.  
  7683. //----------------------------------------------------------
  7684. @DefineFunc @Void @SetRegProdValue(@In @QString @qName, @In @QString @qValue)
  7685.  
  7686.    @If(@Platform == @Windows)
  7687.       //This string contains the key to be created in the Windows 95/NT registry
  7688.       @qTMP1 = "SOFTWARE\\@qCompanyName\\@qProductName\\@qProductVersion\\@qInstallKey"
  7689.  
  7690.       @If (@WinRegCreateKeyEx(@HKeyLocalMachine, @qTMP1, "", 0, @iRegKeyAllAccess,
  7691.                               @Null, @iKeyHandle, @iDisposition) != 0)
  7692.          @ErrorExit(@qRegCreateProdKeyError, 1)
  7693.       @EndIf
  7694.  
  7695.       //After creating the key set the Product Info value
  7696.       @If (@WinRegSetValueEx(@iKeyHandle, @qName, @iRegString, @qValue,
  7697.                             @StrLen(@qValue) + 1) != 0)
  7698.          @ErrorExit("@qRegSetProdValueError Name: @qName, Value: @qValue", 2)
  7699.       @EndIf
  7700.  
  7701.       @If (@WinRegFlushKey(@iKeyHandle) != 0)
  7702.          @MsgBox(@qRegWriteProdInfoError)
  7703.       @EndIf
  7704.       @If (@WinRegCloseKey(@iKeyHandle) != 0)
  7705.          @MsgBox(@qRegCloseProdKeyError)
  7706.       @EndIf
  7707.    @ElseIf(@Platform == @OS2)
  7708.       @SetProductINI()
  7709.       @SetRegProdValueOS2(@qName, @qValue)
  7710.    @EndIf
  7711.    @Return()
  7712.  
  7713. @EndFunc
  7714.  
  7715.  
  7716. //----------------------------------------------------------
  7717. @DefineFunc @Void @InitRegProdEnvVarLoc(@Void)
  7718.  
  7719.    //This string contains the key to be created in the Windows 95/NT registry
  7720.    @qTMP1 = "SOFTWARE\\@qCompanyName\\@qProductName\\@qProductVersion\\@qInstallKey"
  7721.  
  7722.    @If (@WinRegCreateKeyEx(@HKeyLocalMachine, @qTMP1, "", 0, @iRegKeyAllAccess,
  7723.                            @Null, @iKeyHandle, @iDisposition) != 0)
  7724.       @ErrorExit(@qRegCreateProdKeyError, 1)
  7725.    @EndIf
  7726.  
  7727.    @If (@WinRegQueryValueEx(@iKeyHandle, @lEnvVarLoc, @Null,
  7728.                             @qTMP2, @iTMP1) != 0)
  7729.       @If (@WinRegSetValueEx(@iKeyHandle, @lEnvVarLoc, @iRegString,
  7730.                              @qRegEnvVarsNotSet, @StrLen(@qRegEnvVarsNotSet) + 1) != 0)
  7731.          @ErrorExit("@qRegSetProdValueError Name: @lEnvVarLoc Value: @qRegEnvVarsNotSet", 2)
  7732.       @EndIf
  7733.    @EndIf
  7734.  
  7735.    @If (@WinRegFlushKey(@iKeyHandle) != 0)
  7736.       @MsgBox(@qRegWriteProdInfoError)
  7737.    @EndIf
  7738.    @If (@WinRegCloseKey(@iKeyHandle) != 0)
  7739.       @MsgBox(@qRegCloseProdKeyError)
  7740.    @EndIf
  7741.  
  7742.    @Return()
  7743.  
  7744. @EndFunc
  7745.  
  7746.  
  7747. //----------------------------------------------------------
  7748. @DefineFunc @Void @RegProdOS2(@Void)
  7749.  
  7750.    @ShowAll("@@RegProdOS2()", "OS/2 RegProd in alpha stage")
  7751.    @BackupConfigSys()
  7752.    @SetProductIni()
  7753.    @SetRegProdValueOS2(@lDirectory, @qInstallPath1)
  7754.    @SetRegProdValueOS2(@lFolder, @qInstallFolderID)
  7755.    @SetRegProdValueOS2(@lLanguage, @qLanguage)
  7756.    @SetRegProdValueOS2(@lFixpak, @qFixpaklevel)
  7757.  
  7758.    @Return()
  7759. @EndFunc
  7760.  
  7761. //---------------------------------------------------------
  7762.  
  7763. @DefineFunc @Void @SetProductINI(@Void)
  7764.    @If(@Platform == @OS2)
  7765.       @If (!@iProductInstalled)
  7766.          @qProductINI = "@qInstallPath1\\@qProductINIBase.INI"
  7767.          @SetProductINIPointer()
  7768. //         @WriteVar(@qConfigSysFile, "@lProductINIVar@Version", @qProductINI)
  7769.       @EndIf
  7770.    @EndIf
  7771.    @Return()
  7772. @EndFunc
  7773.  
  7774. //---------------------------------------------------------
  7775.  
  7776. @DefineFunc @Void @BackupConfigSys(@Void)
  7777.  
  7778.    @If(@iMakeConfigSysBackup)
  7779.       @qBackupConfigSysFile = @CreateBackupFilename("CONFIG.SYS")
  7780.       @qBackupConfigSysFile = "@BootDrive:\\@qBackupConfigSysFile"
  7781.       @Copy(@qConfigSysFile, @qBackupConfigSysFile)
  7782.       @iMakeConfigSysBackup = @False
  7783.    @EndIf
  7784.    @Return()
  7785. @EndFunc
  7786.  
  7787. //----------------------------------------------------------
  7788.  
  7789. @DefineFunc @Void @SetRegProdValueOS2(@In @QString @qName, @In @QString @qValue)
  7790.  
  7791.    @SetOS2ProductINIString(@qInstallKey, @qName, @qValue)
  7792.    @Return()
  7793. @EndFunc
  7794.  
  7795. //--------------------------------------------------
  7796.  
  7797. @DefineFunc @Void @SetProductINIPointer(@Void)
  7798.  
  7799.  
  7800.    @If (@OS2SetINI("@qProductINIPointerApp","@qProductINIPointerKey",
  7801.                    "@qProductINI","HINI_USERPROFILE"))
  7802.       @MsgBox("CreateProductINIPointer: Error writing to OS2.INI")
  7803.    @EndIf
  7804.  
  7805.    @Return()
  7806. @EndFunc
  7807.  
  7808. //--------------------------------------------------
  7809.  
  7810. @DefineFunc @QString @GetProductINIPointer(@Void)
  7811.  
  7812.    @Return("@OS2GetINI("@qProductINIPointerApp","@qProductINIPointerKey",
  7813.                        "HINI_USERPROFILE")")
  7814. @EndFunc
  7815.  
  7816. //---------------------------------------------------
  7817.  
  7818. @DefineFunc @Void @DeleteProductINIPointer(@Void)
  7819.  
  7820.    @If (@OS2SetINI("@qProductINIPointerApp","@qProductINIPointerKey",
  7821.                    "","HINI_USERPROFILE"))
  7822.       @MsgBox("CreateProductINIPointer: Error writing to OS2.INI")
  7823.    @EndIf
  7824.  
  7825.    @Return()
  7826. @EndFunc
  7827.    
  7828. //--------------------------------------------------
  7829.  
  7830. @DefineFunc @QString @GetExtProductINIPointer(@In @QString @qExtProductINIPointerApp,@In @QString @qExtProductINIPointerKey)
  7831.  
  7832.    @Return("@OS2GetINI("@qExtProductINIPointerApp","@qExtProductINIPointerKey",
  7833.                        "HINI_USERPROFILE")")
  7834. @EndFunc
  7835.  
  7836.  
  7837.  
  7838. //
  7839. //
  7840. //
  7841. //File: GoodBye /////////////////////////////////////
  7842. //
  7843. //CIDVars: TBD
  7844. //
  7845. //Globals changed: none
  7846. //
  7847. @DefineProto
  7848.   @Void @DisplayReadme(@Void)
  7849.   @Void @DisplayGoodbye(@Void)
  7850. @EndProto
  7851. //
  7852. //
  7853.  
  7854.  
  7855. //----------------------------------------------------
  7856. @DefineFunc @Void @DisplayGoodbye(@Void)
  7857.    @If (@iResponseFile==@TRUE)
  7858.       @Return ()
  7859.    @Endif
  7860.  
  7861.    @DisplayReadme()  
  7862.  
  7863.    @TempStr = "@qDisGbyeSuccess
  7864.    @OutDrive:@Subdir"
  7865.    @Message("@qDisGbyeTitle","",,@TempStr,"","")
  7866.  
  7867.    @Return()
  7868. @EndFunc
  7869.  
  7870.  
  7871. //----------------------------------------------------
  7872. @DefineFunc @Void @DisplayReadme(@Void)
  7873.    @if (@Message("@qDisReadmeTitle","",,"@qDisReadmeText","@qYes","@qNo") == 1)
  7874.       @WinExec("notepad @OutDrive:\\@Subdir\\@qReadmeFile",1)  //1 means SW_SHOWNORMAL
  7875.    @Endif
  7876.    @Return()
  7877. @EndFunc
  7878. //
  7879. //
  7880. //
  7881. //File: RegArt /////////////////////////////////////
  7882. //
  7883. //CIDVars: TBD
  7884. //
  7885. //Globals changed: none
  7886. //
  7887. @DefineProto
  7888.    @Integer @RegisterART(@Void)
  7889. @EndProto
  7890. //
  7891. //
  7892.  
  7893. //----------------------------------------------------------
  7894. @DefineFunc @Integer @RegisterART(@Void)
  7895.    @iDialogRes = @iNext
  7896.    @Return(@iDialogRes)
  7897. @EndFunc
  7898. //
  7899. //
  7900. //
  7901. //File: Reboot  /////////////////////////////////////
  7902. //
  7903. //CIDVars: TBD
  7904. //
  7905. //Globals changed: none
  7906. //
  7907. @DefineProto
  7908.    @Integer @AskReboot(@Void)
  7909.    @Void @EventHandler @AskRebootRBHandler(@In @Int @OldSelected, @In @Int @NewSelected, @In @Int @RangeStart, @In @Int @RangeEnd)
  7910.    @Void @AskRebootSetHelp(@Void)
  7911. @EndProto
  7912. //
  7913. //
  7914. //----------------------------------------------------
  7915. @DefineFunc @Void @EventHandler @AskRebootRBHandler(@In @Int @OldSelected, @In @Int @NewSelected, 
  7916.                                  @In @Int @RangeStart,  @In @Int @RangeEnd)
  7917.    @If    (@NewSelected == 1410)
  7918.       @iAskReboot = 1
  7919.    @ElseIf(@NewSelected == 1420)
  7920.       @iAskReboot = 2
  7921.    @Else
  7922.       @ErrorExit("@qAskRebootErrorMsg1")
  7923.    @EndIf
  7924.  
  7925.    @AskRebootSetHelp()
  7926.    @StaticText(510, "@qAskRebootStringText2 \n\n @qAskRebootStringText3 ")
  7927.    @Return()
  7928. @EndFunc
  7929.  
  7930. //----------------------------------------------------
  7931. @DefineFunc @Integer @AskReboot(@Void)
  7932.  
  7933.    @if (@CIDBypass(@qForceReboot))
  7934.       @return(@iDialogRes)
  7935.    @endif
  7936.   
  7937.    @AskRebootSetHelp()
  7938.    @MapEventToFunc(@DlgRBEvent, @AskRebootRBHandler)
  7939.    @EnableEventMap(@DlgRBEvent)
  7940.    @iDialogRes = @DialogRadio(@qAskRebootTitle, @qAskRebootBitMap,
  7941.                               @iAskRebootBitmapID,
  7942.                               @qAskRebootStringText1, @qAskRebootStringText2,
  7943.                               @qAskRebootStringText3,
  7944.                               @qAskRebootRadioButton1Text,
  7945.                               @qAskRebootRadioButton2Text, "", "", "", "", 
  7946.                               "", @qAskRebootPushButton1Text, "", "", "",
  7947.                               @iAskReboot)
  7948.    @DisableEventMap(@DlgRBEvent)
  7949.  
  7950.    @if (!(@iDialogRes == 2))
  7951.       @ErrorExit(@qAskRebootErrorMsg2,@iAbort)
  7952.    @endif
  7953.    
  7954.    @iDialogRes = @iNext
  7955.    @Return(@iDialogRes)
  7956.  
  7957. @EndFunc
  7958.  
  7959. @DefineFunc @Void @AskRebootSetHelp(@Void)
  7960.    @If     (@iAskReboot == 1)
  7961.       @qAskRebootStringText2 = @qAskRebootHelp1
  7962.    @ElseIf (@iAskReboot == 2)
  7963.       @qAskRebootStringText2 = @qAskRebootHelp2
  7964.    @Else
  7965.       @ErrorExit(@qAskRebootErrorMsg3,@iAbort)
  7966.    @Endif
  7967.    @Return()
  7968. @EndFunc
  7969. //
  7970. //
  7971. //
  7972. //File: RegUnin /////////////////////////////////////
  7973. //
  7974. //CIDVars: TBD
  7975. //
  7976. //Globals changed: none
  7977. //
  7978. @DefineProto
  7979.    @Integer @RegisterUninstall(@Void)
  7980.    @Void @RegUninWindows(@Void)
  7981.    @Void @RegUninOS2(@Void)
  7982. @EndProto
  7983. //
  7984. //
  7985.  
  7986. //----------------------------------------------------------
  7987. @DefineFunc @Integer @RegisterUninstall(@Void)
  7988.  
  7989.    @If(@Platform == @Windows)
  7990.       @RegUninWindows()
  7991.    @ElseIf(@Platform == @OS2)
  7992.       @RegUninOS2()
  7993.    @Else
  7994.       @MsgBox(@qRegProdOSError)
  7995.    @EndIf
  7996.    @Return(@iNext)
  7997.  
  7998. @EndFunc
  7999.  
  8000. @DefineFunc @Void @RegUninWindows(@Void)
  8001.  
  8002.    @ShowAll("@@RegUninWindows()", "Register Uninstall done here.")
  8003. //   @ShowAll("@@RegUninWindows()", "Creating product uninstall key.")
  8004. //   @ShowAll("@@RegUninWindows()", "setting DisplayName value.")
  8005. //   @ShowAll("@@RegUninWindows()", "Setting UninstallString value.")
  8006.  
  8007.    // Set Uninstall Information Key
  8008.    // This string contains the key to be created in the Windows 95/NT registry
  8009.    @qTempStr1 = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\@qProductName"
  8010.  
  8011.    // This string contains the name which will appear as the product to
  8012.    // uninstall in the Add/Remove components list of the Settings dialog
  8013.    // from the Start menu.
  8014.    @qTempStr2 = @qProductName
  8015.  
  8016.    // This string is the path and name of the uninstall routine
  8017.    @qTempStr3 = "@qInstallPath1\\@qUninstallCmdLine"
  8018.  
  8019.    // Create the key
  8020.    @If (@WinRegCreateKeyEx(@HKeyLocalMachine, @qTempStr1, "", 0, @iRegKeyAllAccess,
  8021.                            @Null, @iKeyHandle, @iDisposition) != 0)
  8022.       @MsgBox(@qRegCreateUninstallKeyError)
  8023.    @Else
  8024.       //After creating the key set the Uninstall Info -- DisplayName & UninstallString
  8025.       //DisplayName contains the Title of the software.  UninstallString points to the program
  8026.       //path and command line to uninstall the application.
  8027.       @If (@WinRegSetValueEx(@iKeyHandle, @lDisplayName, @iRegString, @qTempStr2,
  8028.                             @StrLen(@qTempStr2) + 1) != 0)
  8029.          @MsgBox(@qRegSetDisplayNameError)
  8030.       @EndIf
  8031.       @If (@WinRegSetValueEx(@iKeyHandle, @lUninstallString, @iRegString, @qTempStr3,
  8032.                              @StrLen(@qTempStr3) + 1) != 0)
  8033.          @MsgBox(@qRegSetUninstallStringError)
  8034.       @EndIf
  8035.       @If (@WinRegFlushKey(@iKeyHandle) != 0)
  8036.          @MsgBox(@qRegWriteUninstallInfoError)
  8037.       @EndIf
  8038.       @If (@WinRegCloseKey(@iKeyHandle) != 0)
  8039.          @MsgBox(@qRegCloseUninstallKeyError)
  8040.       @EndIf
  8041.    @EndIf
  8042.    @Return()
  8043.  
  8044. @EndFunc
  8045.  
  8046. @DefineFunc @Void @RegUninOS2(@Void)
  8047.  
  8048.    @ShowAll("@@RegUninOS2()", "Need function to register uninstall info for OS2 here.")
  8049.    @Return()
  8050.  
  8051. @EndFunc
  8052. //
  8053. //
  8054. //
  8055. //File: DispHelp /////////////////////////////////////
  8056. //
  8057. //CIDVars: NONE
  8058. //
  8059. //Globals changed: NONE
  8060. //
  8061. @DefineProto
  8062.    @Void @DisplayHelp(@In @QString @qHelpFileName)
  8063. @EndProto
  8064. //
  8065. //
  8066.  
  8067. //----------------------------------------------------
  8068. @DefineFunc @Void @DisplayHelp(@In @QString @qHelpFileName)
  8069.    @If (@iResponseFile==@TRUE)
  8070.       @return()
  8071.    @EndIf
  8072.  
  8073.    @If ( @Exists("@qTempPath\\@qHelpFileName") )
  8074.       @WinExec("notepad @qTempPath\\@qHelpFileName",1)  //1 means SW_SHOWNORMAL
  8075.    @Else
  8076.       @MsgBox("@qDisplayHelpError @qHelpFileName")
  8077.    @Endif
  8078.  
  8079.    @Return()
  8080. @EndFunc
  8081. //
  8082. //
  8083. //
  8084. //File: Util /////////////////////////////////////
  8085. //
  8086. //CIDVars: NONE
  8087. //
  8088. //Globals changed: NONE
  8089. //
  8090. @DefineProto
  8091.    @Integer @CIDBypass(@In @QString @qForceFlag)
  8092.  
  8093.    @Integer @CueSection(@In @QString @filename, @In @QString @qSection)
  8094.    @QString @StripBlanks(@In @QString @InString)
  8095.    @Void @Parse2(@In @QString @InString, @In @QString @qDelimiter,
  8096.                             @Out @QString @qtok1, @Out @QString @qtok2)
  8097.    @Void @CreateInstallSys(@Void)
  8098.    @Void @WritelnInstallSys(@In @QString @Instring)
  8099.    @Void @AddSectionInstallSys(@In @QString @Sectionname)
  8100.    @Void @AddNewlineInstallSys(@Void)
  8101.    @Integer @ClusterOverhead(@In @Drive @DriveLetter, @In @Integer @NumFiles, @In @Integer @Percent)
  8102.    @Void @DetermineInstallSysFilename(@Void)
  8103.    @QString @CustomFeaturesToGroups(@In @QString @qFeaturesString)
  8104.    @Void @SetInstallPathsFromFile(@In @QString @Filename)
  8105.    @Void @SetCustomFeaturesStringFromFile(@In @QString @filename,
  8106.             @Out @QString @qCustomFeaturesString)
  8107.    @Integer @OptionGroupsNotEmpty(@In @QString @qOptionsToGroup)
  8108.    @QString @GetGroupPath(@In @QString @qGroup)
  8109.    @Void @SetOutPath(@In @QString @qGroup)
  8110.    @Void @SetOutDriveSubdir(@In @QString @qPath)
  8111.    @Void @CheckMultipleRedFiles(@Void)
  8112.    @Void @SetNumberOfDisks(@Void)
  8113.    @Void @LoadBMPBackground(@In @QString @filename)
  8114.    @Void @LoadBMPBillBoard(@Void)
  8115.    @Void @LoadBMPProdLogo(@In @QString @filename)
  8116.    @Void @LoadBMPMsg(@In @QString @filename)
  8117. @EndProto
  8118. //
  8119. //
  8120.  
  8121. //----------------------------------------------------
  8122. @DefineFunc @Integer @CIDBypass(@In @QString @qForceFlag)
  8123.    @If (@iResponseFile &&  @StrCmp(@qForceFlag,@lY)!=0 )
  8124.       @Return(@TRUE)
  8125.    @Else
  8126.       @Return(@FALSE)
  8127. @EndFunc
  8128.  
  8129. //----------------------------------------------------------------------------
  8130.  
  8131. @DefineFunc @Integer @CueSection(@In @QString @Filename, @In @QString @Section)
  8132.  
  8133.    @If (!@Exists(@Filename))
  8134.       @ErrorExit(@qCueSectionErrorFileNotExist,@iAbort)
  8135.    @EndIf
  8136.  
  8137.    @If (@StrCmp(@Section,"") == 0)
  8138.       @ErrorExit(@qCueSectionErrorSectionNull,@iAbort)
  8139.    @EndIf
  8140.  
  8141.    @iReturnVal = @ReadInfo(@filename,@qReadStr,@True,0)
  8142.  
  8143. CueSectionTop:
  8144.    @If (@iReturnVal == -1)
  8145.       @iReturnVal = @iEOF
  8146.    @Else
  8147.       @If (@StrFind(@qReadStr,"[@Section]") != -1)
  8148.          @iReturnVal = @iSuccess
  8149.       @Else
  8150.          @iReturnVal = @ReadInfo(@filename, @qReadStr, @False,0)
  8151.          @Goto CueSectionTop
  8152.       @EndIf
  8153.    @EndIf
  8154.  
  8155. CueSectionEnd:
  8156.    @Return(@iReturnVal)
  8157. @EndFunc
  8158.  
  8159. //---------------------------------------------------------------
  8160.  
  8161. //Parse2 tokenizes @InString into 2 tokens delimited by the first occurence
  8162. //of @qDelimiter.
  8163. //The strings are returned in @qtok1 and @qtok2. Leading and trailing
  8164. //blanks are removed from both strings.
  8165.  
  8166. @DefineFunc @Void @Parse2(@In @QString @InString, @In @QString @qDelimiter,
  8167.                             @Out @QString @qtok1, @Out @QString @qtok2)
  8168.  
  8169.    @qtok1 = @StrToken("@InString",0,"@qDelimiter")
  8170.  
  8171.    //@qtok2 cannot be generated with StrToken, because it needs to preserve
  8172.    //any @qDelimiters after the first one
  8173.    @qtok2 = @StrDel(@InString, 0, @StrLen(@qtok1)+1)
  8174.  
  8175.    @If (@StrCmp(@qtok1,"") != 0)
  8176.       @qtok1 = @StripBlanks(@qtok1)
  8177.    @EndIf
  8178.  
  8179.    @If (@StrCmp(@qtok2,"") != 0)
  8180.       @qtok2 = @StripBlanks(@qtok2)
  8181.    @EndIf
  8182.  
  8183.    @Return()
  8184. @EndFunc
  8185. //---------------------------------------------------------------
  8186.  
  8187. @DefineFunc @QString @StripBlanks(@In @QString @InString)
  8188.  
  8189.    //Check for a null string
  8190.    @If (@StrLen(@InString) == 0)
  8191.       @Return(@InString)
  8192.    @EndIf
  8193.  
  8194. StripLeading:
  8195.    @If (@StrIndex(@InString,0) == @bBlank)
  8196.       @InString = @StrDel(@InString,0,1)
  8197.       @Goto StripLeading
  8198.    @EndIf
  8199.  
  8200.  
  8201. StripTrailing:
  8202.    //Check again for a null string
  8203.    @If (@StrLen(@InString) == 0)
  8204.       @Return(@InString)
  8205.    @EndIf
  8206.  
  8207.    @If (@StrIndex(@InString,@StrLen(@InString) - 1) == @bBlank)
  8208.       @InString = @StrDel(@InString,@StrLen(@InString) - 1,1)
  8209.       @Goto StripTrailing
  8210.    @EndIf
  8211.  
  8212.    @Return(@InString)
  8213. @EndFunc
  8214.  
  8215. //---------------------------------------------------------------
  8216. @DefineFunc @Void @CreateInstallSys(@Void)
  8217.    @If (@StrFind(@qInstallPath1,"@qInstallPath1NoQuotes") == 1)
  8218.       @If (!@Exists(@qInstallPath1NoQuotes))
  8219.          @MkDir(@qInstallPath1NoQuotes)
  8220.       @EndIf
  8221.    @Else
  8222.       @If (!@Exists(@qInstallPath1))
  8223.          @MkDir(@qInstallPath1)
  8224.       @EndIf
  8225.    @EndIf
  8226.  
  8227.    @DetermineInstallSysFilename()
  8228.    @If (@Write(@qInstallSysFilename,"wt",""))
  8229.       @ErrorExit(@qInstallSysErrorWrite1,@iAbort)
  8230.    @EndIf
  8231.  
  8232.    @Return()
  8233. @EndFunc
  8234. //---------------------------------------------------------------
  8235. @DefineFunc @Void @WritelnInstallSys(@In @QString @Instring)
  8236.    @If (@Write(@qInstallSysFilename,,"@Instring\n"))
  8237.       @ErrorExit(@qInstallSysErrorWrite2,@iAbort)
  8238.    @EndIf
  8239.  
  8240.    @Return()
  8241. @EndFunc
  8242. //---------------------------------------------------------------
  8243. @DefineFunc @Void @AddSectionInstallSys(@In @QString @Sectionname)
  8244.    @If (@Write(@qInstallSysFilename,,"[@Sectionname]\n"))
  8245.       @ErrorExit(@qInstallSysErrorWrite3,@iAbort)
  8246.    @EndIf
  8247.  
  8248.    @Return()
  8249. @EndFunc
  8250. //---------------------------------------------------------------
  8251. @DefineFunc @Void @AddNewlineInstallSys(@Void)
  8252.    @If (@Write(@qInstallSysFilename,,"\n"))
  8253.       @ErrorExit(@qInstallSysErrorWrite4,@iAbort)
  8254.    @EndIf
  8255.  
  8256.    @Return()
  8257. @EndFunc
  8258.  
  8259. //---------------------------------------------------------------
  8260. @DefineFunc @Integer @ClusterOverhead(@In @Drive @DriveLetter, @In @Integer @NumFiles,@In @Integer @Percent)
  8261.    @Return(@DriveCluster(@DriveLetter)*@NumFiles/100*@Percent)
  8262. @EndFunc
  8263.  
  8264.  
  8265.  
  8266. //---------------------------------------------------------------
  8267. @DefineFunc @Void @DetermineInstallSysFilename(@Void)
  8268.  
  8269.    @If (@StrCmp(@qInstallSysFilename,"") == 0)
  8270.       @If (@StrFind(@qInstallPath1,"@qInstallPath1NoQuotes") == 1)
  8271.          @qInstallSysfilename = "@qInstallPath1NoQuotes\\@lInstallSys"
  8272.       @Else
  8273.          @qInstallSysfilename = "@qInstallPath1\\@lInstallSys"
  8274.       @EndIf
  8275.    @EndIf
  8276.    @Return()
  8277. @EndFunc
  8278.  
  8279.  
  8280. //----------------------------------------------------------------
  8281. @DefineFunc @QString @CustomFeaturesToGroups(@In @QString @qFeaturesString)
  8282.    @qTMP1 = "16"
  8283.    @qGroupsString = ""
  8284.    @iTMP2 = @StrFind("@qFeaturesString","@qTMP1")
  8285.    @If (@iTMP2 >= 0)
  8286.       @qGroupsString = "@qGroupsString @qFeature16GroupString"
  8287.    @Endif
  8288.    @qTMP1 = "15"
  8289.    @iTMP2 = @StrFind("@qFeaturesString","@qTMP1")
  8290.    @If (@iTMP2 >= 0)
  8291.       @qGroupsString = "@qGroupsString @qFeature15GroupString"
  8292.    @Endif
  8293.    @qTMP1 = "14"
  8294.    @iTMP2 = @StrFind("@qFeaturesString","@qTMP1")
  8295.    @If (@iTMP2 >= 0)
  8296.       @qGroupsString = "@qGroupsString @qFeature14GroupString"
  8297.    @Endif
  8298.    @qTMP1 = "13"
  8299.    @iTMP2 = @StrFind("@qFeaturesString","@qTMP1")
  8300.    @If (@iTMP2 >= 0)
  8301.       @qGroupsString = "@qGroupsString @qFeature13GroupString"
  8302.    @Endif
  8303.    @qTMP1 = "12"
  8304.    @iTMP2 = @StrFind("@qFeaturesString","@qTMP1")
  8305.    @If (@iTMP2 >= 0)
  8306.       @qGroupsString = "@qGroupsString @qFeature12GroupString"
  8307.    @Endif
  8308.    @qTMP1 = "11"
  8309.    @iTMP2 = @StrFind("@qFeaturesString","@qTMP1")
  8310.    @If (@iTMP2 >= 0)
  8311.       @qGroupsString = "@qGroupsString @qFeature11GroupString"
  8312.    @Endif
  8313.    @qTMP1 = "10"
  8314.    @iTMP2 = @StrFind("@qFeaturesString","@qTMP1")
  8315.    @If (@iTMP2 >= 0)
  8316.       @qGroupsString = "@qGroupsString @qFeature10GroupString"
  8317.    @Endif
  8318.    @qTMP1 = "09"
  8319.    @iTMP2 = @StrFind("@qFeaturesString","@qTMP1")
  8320.    @If (@iTMP2 >= 0)
  8321.       @qGroupsString = "@qGroupsString @qFeature09GroupString"
  8322.    @Endif
  8323.    @qTMP1 = "08"
  8324.    @iTMP2 = @StrFind("@qFeaturesString","@qTMP1")
  8325.    @If (@iTMP2 >= 0)
  8326.       @qGroupsString = "@qGroupsString @qFeature08GroupString"
  8327.    @Endif
  8328.    @qTMP1 = "07"
  8329.    @iTMP2 = @StrFind("@qFeaturesString","@qTMP1")
  8330.    @If (@iTMP2 >= 0)
  8331.       @qGroupsString = "@qGroupsString @qFeature07GroupString"
  8332.    @Endif
  8333.    @qTMP1 = "06"
  8334.    @iTMP2 = @StrFind("@qFeaturesString","@qTMP1")
  8335.    @If (@iTMP2 >= 0)
  8336.       @qGroupsString = "@qGroupsString @qFeature06GroupString"
  8337.    @Endif
  8338.    @qTMP1 = "05"
  8339.    @iTMP2 = @StrFind("@qFeaturesString","@qTMP1")
  8340.    @If (@iTMP2 >= 0)
  8341.       @qGroupsString = "@qGroupsString @qFeature05GroupString"
  8342.    @Endif
  8343.    @qTMP1 = "04"
  8344.    @iTMP2 = @StrFind("@qFeaturesString","@qTMP1")
  8345.    @If (@iTMP2 >= 0)
  8346.       @qGroupsString = "@qGroupsString @qFeature04GroupString"
  8347.    @Endif
  8348.    @qTMP1 = "03"
  8349.    @iTMP2 = @StrFind("@qFeaturesString","@qTMP1")
  8350.    @If (@iTMP2 >= 0)
  8351.       @qGroupsString = "@qGroupsString @qFeature03GroupString"
  8352.    @Endif
  8353.    @qTMP1 = "02"
  8354.    @iTMP2 = @StrFind("@qFeaturesString","@qTMP1")
  8355.    @If (@iTMP2 >= 0)
  8356.       @qGroupsString = "@qGroupsString @qFeature02GroupString"
  8357.    @Endif
  8358.    @qTMP1 = "01"
  8359.    @iTMP2 = @StrFind("@qFeaturesString","@qTMP1")
  8360.    @If (@iTMP2 >= 0)
  8361.       @qGroupsString = "@qGroupsString @qFeature01GroupString"
  8362.    @Endif
  8363.    @Return(@qGroupsString)
  8364. @EndFunc
  8365.  
  8366.  
  8367.  
  8368. //----------------------------------------------------------------
  8369. @DefineFunc @Void @SetInstallPathsFromFile(@In @QString @Filename)
  8370.  
  8371.    @qInstallPath1 = @GetIni("@lInstallOptions","@lInstallPath@l1",@Filename)
  8372.    @qInstallPath2 = @GetIni("@lInstallOptions","@lInstallPath@l2",@Filename)
  8373.    @qInstallPath3 = @GetIni("@lInstallOptions","@lInstallPath@l3",@Filename)
  8374.    @qInstallPath4 = @GetIni("@lInstallOptions","@lInstallPath@l4",@Filename)
  8375.    @qInstallPath5 = @GetIni("@lInstallOptions","@lInstallPath@l5",@Filename)
  8376.    @qInstallPath6 = @GetIni("@lInstallOptions","@lInstallPath@l6",@Filename)
  8377.    @qInstallPath7 = @GetIni("@lInstallOptions","@lInstallPath@l7",@Filename)
  8378.    @qInstallPath8 = @GetIni("@lInstallOptions","@lInstallPath@l8",@Filename)
  8379.    @qInstallPath9 = @GetIni("@lInstallOptions","@lInstallPath@l9",@Filename)
  8380.    @qInstallPath10 = @GetIni("@lInstallOptions","@lInstallPath@l10",@Filename)
  8381.  
  8382.    @Return()
  8383. @EndFunc
  8384.  
  8385. //----------------------------------------------------------
  8386. @DefineFunc @Void @SetCustomFeaturesStringFromFile(@In @QString @filename,
  8387.             @Out @QString @qCustomFeaturesString)
  8388.  
  8389.    @qCustomFeaturesString = @GetINI(@lInstallOptions,@lCustom,@filename)
  8390.  
  8391.    @Return()
  8392. @EndFunc
  8393.  
  8394. //----------------------------------------------------------
  8395. @DefineFunc @Integer @OptionGroupsNotEmpty(@In @QString @qOptionsToGroup)
  8396.    @iTMP1 = @False
  8397.    @iTMP1 = (@iTMP1 || (@GroupIsSet(A) && (@StrFind(@StrUpr(@qOptionsToGroup), "A") != -1)))
  8398.    @iTMP1 = (@iTMP1 || (@GroupIsSet(B) && (@StrFind(@StrUpr(@qOptionsToGroup), "B") != -1)))
  8399.    @iTMP1 = (@iTMP1 || (@GroupIsSet(C) && (@StrFind(@StrUpr(@qOptionsToGroup), "C") != -1)))
  8400.    @iTMP1 = (@iTMP1 || (@GroupIsSet(D) && (@StrFind(@StrUpr(@qOptionsToGroup), "D") != -1)))
  8401.    @iTMP1 = (@iTMP1 || (@GroupIsSet(E) && (@StrFind(@StrUpr(@qOptionsToGroup), "E") != -1)))
  8402.    @iTMP1 = (@iTMP1 || (@GroupIsSet(F) && (@StrFind(@StrUpr(@qOptionsToGroup), "F") != -1)))
  8403.    @iTMP1 = (@iTMP1 || (@GroupIsSet(G) && (@StrFind(@StrUpr(@qOptionsToGroup), "G") != -1)))
  8404.    @iTMP1 = (@iTMP1 || (@GroupIsSet(H) && (@StrFind(@StrUpr(@qOptionsToGroup), "H") != -1)))
  8405.    @iTMP1 = (@iTMP1 || (@GroupIsSet(I) && (@StrFind(@StrUpr(@qOptionsToGroup), "I") != -1)))
  8406.    @iTMP1 = (@iTMP1 || (@GroupIsSet(J) && (@StrFind(@StrUpr(@qOptionsToGroup), "J") != -1)))
  8407.    @iTMP1 = (@iTMP1 || (@GroupIsSet(K) && (@StrFind(@StrUpr(@qOptionsToGroup), "K") != -1)))
  8408.    @iTMP1 = (@iTMP1 || (@GroupIsSet(L) && (@StrFind(@StrUpr(@qOptionsToGroup), "L") != -1)))
  8409.    @iTMP1 = (@iTMP1 || (@GroupIsSet(M) && (@StrFind(@StrUpr(@qOptionsToGroup), "M") != -1)))
  8410.    @iTMP1 = (@iTMP1 || (@GroupIsSet(N) && (@StrFind(@StrUpr(@qOptionsToGroup), "N") != -1)))
  8411.    @iTMP1 = (@iTMP1 || (@GroupIsSet(O) && (@StrFind(@StrUpr(@qOptionsToGroup), "O") != -1)))
  8412.    @iTMP1 = (@iTMP1 || (@GroupIsSet(P) && (@StrFind(@StrUpr(@qOptionsToGroup), "P") != -1)))
  8413.    @iTMP1 = (@iTMP1 || (@GroupIsSet(Q) && (@StrFind(@StrUpr(@qOptionsToGroup), "Q") != -1)))
  8414.    @iTMP1 = (@iTMP1 || (@GroupIsSet(R) && (@StrFind(@StrUpr(@qOptionsToGroup), "R") != -1)))
  8415.    @iTMP1 = (@iTMP1 || (@GroupIsSet(S) && (@StrFind(@StrUpr(@qOptionsToGroup), "S") != -1)))
  8416.    @iTMP1 = (@iTMP1 || (@GroupIsSet(T) && (@StrFind(@StrUpr(@qOptionsToGroup), "T") != -1)))
  8417.    @iTMP1 = (@iTMP1 || (@GroupIsSet(U) && (@StrFind(@StrUpr(@qOptionsToGroup), "U") != -1)))
  8418.    @iTMP1 = (@iTMP1 || (@GroupIsSet(V) && (@StrFind(@StrUpr(@qOptionsToGroup), "V") != -1)))
  8419.    @iTMP1 = (@iTMP1 || (@GroupIsSet(W) && (@StrFind(@StrUpr(@qOptionsToGroup), "W") != -1)))
  8420.    @iTMP1 = (@iTMP1 || (@GroupIsSet(X) && (@StrFind(@StrUpr(@qOptionsToGroup), "X") != -1)))
  8421.    @iTMP1 = (@iTMP1 || (@GroupIsSet(Y) && (@StrFind(@StrUpr(@qOptionsToGroup), "Y") != -1)))
  8422.    @iTMP1 = (@iTMP1 || (@GroupIsSet(Z) && (@StrFind(@StrUpr(@qOptionsToGroup), "Z") != -1)))
  8423.    @Return(@iTMP1)
  8424. @EndFunc
  8425.  
  8426. //---------------------------------------------------
  8427.  
  8428. @DefineFunc @QString @GetGroupPath(@In @QString @qGroup)
  8429.  
  8430.    @If (@StrFind(@qOption1Groups,"@qGroup") >= 0)
  8431.       @Return (@qInstallPath1)
  8432.    @ElseIf (@StrFind(@qOption2Groups,"@qGroup") >= 0)
  8433.       @Return (@qInstallPath2)
  8434.    @ElseIf (@StrFind(@qOption3Groups,"@qGroup") >= 0)
  8435.       @Return (@qInstallPath3)
  8436.    @ElseIf (@StrFind(@qOption4Groups,"@qGroup") >= 0)
  8437.       @Return (@qInstallPath4)
  8438.    @ElseIf (@StrFind(@qOption5Groups,"@qGroup") >= 0)
  8439.       @Return (@qInstallPath5)
  8440.    @ElseIf (@StrFind(@qOption6Groups,"@qGroup") >= 0)
  8441.       @Return (@qInstallPath6)
  8442.    @ElseIf (@StrFind(@qOption7Groups,"@qGroup") >= 0)
  8443.       @Return (@qInstallPath7)
  8444.    @ElseIf (@StrFind(@qOption8Groups,"@qGroup") >= 0)
  8445.       @Return (@qInstallPath8)
  8446.    @ElseIf (@StrFind(@qOption9Groups,"@qGroup") >= 0)
  8447.       @Return (@qInstallPath9)
  8448.    @Else
  8449.       @Return (@qInstallPath10)
  8450.    @EndIf
  8451.  
  8452.    @Return (@qInstallPath1)
  8453. @EndFunc
  8454.  
  8455. //---------------------------------------------------
  8456.  
  8457. @DefineFunc @Void @SetOutPath(@In @QString @qGroup)
  8458.  
  8459.    @SetOutDriveSubdir(@GetGroupPath(@qGroup))
  8460.    @Return()
  8461. @EndFunc
  8462.  
  8463. //---------------------------------------------------
  8464.  
  8465. @DefineFunc @Void @SetOutDriveSubdir(@In @QString @qPath)
  8466.  
  8467.    @OutDrive = @StrIndex(@StrUpr(@qPath), (@StrFind(@qPath, ":\\") - 1))
  8468.    @Subdir = @StrDel("@qPath", 0, (@StrFind(@qPath, ":\\") + 1))
  8469.  
  8470.    @Return()
  8471. @EndFunc
  8472.  
  8473. //---------------------------------------------------
  8474.  
  8475. @DefineFunc @Void @CheckMultipleRedFiles(@Void)
  8476.    @iMultipleRedFiles = @TRUE
  8477.    @Return()
  8478. @EndFunc
  8479.  
  8480. //---------------------------------------------------
  8481.  
  8482. @DefineFunc @Void @SetNumberOfDisks(@Void)
  8483.  
  8484.    @qTMP3 = @CustomFeaturesToGroups(@qCustomFeatures)
  8485.  
  8486.    @If (@iMultipleRedFiles)
  8487.       @NumberofDisks = 1   //start at 1 for uninstall
  8488.       @NumberofDisks = (@NumberofDisks +
  8489.             ((@StrFind(@qTMP3,"A") >= 0) && (@FileSize(@GroupARedFile) != 0)))
  8490.       @NumberofDisks = (@NumberofDisks +
  8491.             ((@StrFind(@qTMP3,"B") >= 0) && (@FileSize(@GroupBRedFile) != 0)))
  8492.       @NumberofDisks = (@NumberofDisks +
  8493.             ((@StrFind(@qTMP3,"C") >= 0) && (@FileSize(@GroupCRedFile) != 0)))
  8494.       @NumberofDisks = (@NumberofDisks +
  8495.             ((@StrFind(@qTMP3,"D") >= 0) && (@FileSize(@GroupDRedFile) != 0)))
  8496.       @NumberofDisks = (@NumberofDisks +
  8497.             ((@StrFind(@qTMP3,"E") >= 0) && (@FileSize(@GroupERedFile) != 0)))
  8498.       @NumberofDisks = (@NumberofDisks +
  8499.             ((@StrFind(@qTMP3,"F") >= 0) && (@FileSize(@GroupFRedFile) != 0)))
  8500.       @NumberofDisks = (@NumberofDisks +
  8501.             ((@StrFind(@qTMP3,"G") >= 0) && (@FileSize(@GroupGRedFile) != 0)))
  8502.       @NumberofDisks = (@NumberofDisks +
  8503.             ((@StrFind(@qTMP3,"H") >= 0) && (@FileSize(@GroupHRedFile) != 0)))
  8504.       @NumberofDisks = (@NumberofDisks +
  8505.             ((@StrFind(@qTMP3,"I") >= 0) && (@FileSize(@GroupIRedFile) != 0)))
  8506.       @NumberofDisks = (@NumberofDisks +
  8507.             ((@StrFind(@qTMP3,"J") >= 0) && (@FileSize(@GroupJRedFile) != 0)))
  8508.       @NumberofDisks = (@NumberofDisks +
  8509.             ((@StrFind(@qTMP3,"K") >= 0) && (@FileSize(@GroupKRedFile) != 0)))
  8510.       @NumberofDisks = (@NumberofDisks +
  8511.             ((@StrFind(@qTMP3,"L") >= 0) && (@FileSize(@GroupLRedFile) != 0)))
  8512.       @NumberofDisks = (@NumberofDisks +
  8513.             ((@StrFind(@qTMP3,"M") >= 0) && (@FileSize(@GroupMRedFile) != 0)))
  8514.       @NumberofDisks = (@NumberofDisks +
  8515.             ((@StrFind(@qTMP3,"N") >= 0) && (@FileSize(@GroupNRedFile) != 0)))
  8516.       @NumberofDisks = (@NumberofDisks +
  8517.             ((@StrFind(@qTMP3,"O") >= 0) && (@FileSize(@GroupORedFile) != 0)))
  8518.       @NumberofDisks = (@NumberofDisks +
  8519.             ((@StrFind(@qTMP3,"P") >= 0) && (@FileSize(@GroupPRedFile) != 0)))
  8520.       @NumberofDisks = (@NumberofDisks +
  8521.             ((@StrFind(@qTMP3,"Q") >= 0) && (@FileSize(@GroupQRedFile) != 0)))
  8522.       @NumberofDisks = (@NumberofDisks +
  8523.             ((@StrFind(@qTMP3,"R") >= 0) && (@FileSize(@GroupRRedFile) != 0)))
  8524.       @NumberofDisks = (@NumberofDisks +
  8525.             ((@StrFind(@qTMP3,"S") >= 0) && (@FileSize(@GroupSRedFile) != 0)))
  8526.       @NumberofDisks = (@NumberofDisks +
  8527.             ((@StrFind(@qTMP3,"T") >= 0) && (@FileSize(@GroupTRedFile) != 0)))
  8528.       @NumberofDisks = (@NumberofDisks +
  8529.             ((@StrFind(@qTMP3,"U") >= 0) && (@FileSize(@GroupURedFile) != 0)))
  8530.       @NumberofDisks = (@NumberofDisks +
  8531.             ((@StrFind(@qTMP3,"V") >= 0) && (@FileSize(@GroupVRedFile) != 0)))
  8532.       @NumberofDisks = (@NumberofDisks +
  8533.             ((@StrFind(@qTMP3,"W") >= 0) && (@FileSize(@GroupWRedFile) != 0)))
  8534.       @NumberofDisks = (@NumberofDisks +
  8535.             ((@StrFind(@qTMP3,"X") >= 0) && (@FileSize(@GroupXRedFile) != 0)))
  8536.       @NumberofDisks = (@NumberofDisks +
  8537.             ((@StrFind(@qTMP3,"Y") >= 0) && (@FileSize(@GroupYRedFile) != 0)))
  8538.       @NumberofDisks = (@NumberofDisks +
  8539.             ((@StrFind(@qTMP3,"Z") >= 0) && (@FileSize(@GroupZRedFile) != 0)))
  8540.  
  8541.    @Else
  8542.       @NumberofDisks = 0
  8543.       @NumberofDisks = (@NumberofDisks + @OptionGroupsNotEmpty(@qOption1Groups))
  8544.       @NumberofDisks = (@NumberofDisks + @OptionGroupsNotEmpty(@qOption2Groups))
  8545.       @NumberofDisks = (@NumberofDisks + @OptionGroupsNotEmpty(@qOption3Groups))
  8546.       @NumberofDisks = (@NumberofDisks + @OptionGroupsNotEmpty(@qOption4Groups))
  8547.       @NumberofDisks = (@NumberofDisks + @OptionGroupsNotEmpty(@qOption5Groups))
  8548.       @NumberofDisks = (@NumberofDisks + @OptionGroupsNotEmpty(@qOption6Groups))
  8549.       @NumberofDisks = (@NumberofDisks + @OptionGroupsNotEmpty(@qOption7Groups))
  8550.       @NumberofDisks = (@NumberofDisks + @OptionGroupsNotEmpty(@qOption8Groups))
  8551.       @NumberofDisks = (@NumberofDisks + @OptionGroupsNotEmpty(@qOption9Groups))
  8552.       @NumberofDisks = (@NumberofDisks + @OptionGroupsNotEmpty(@qOption10Groups))
  8553.  
  8554.    @EndIf
  8555.  
  8556.    @Return()
  8557. @EndFunc
  8558.  
  8559. //--------------------------------------------------
  8560. @DefineFunc @Void @LoadBMPBackground(@In @QString @filename)
  8561.  
  8562.    //Background bitmap is level 1
  8563. //   @EraseBMP(1)
  8564. //   @If (@XRes == 800)
  8565.       @iTMPBMP2 = (@YRes - (15))
  8566. //   @Else
  8567. //      @iTMPBMP2 = @YRes
  8568. //   @EndIf
  8569.  
  8570.    @If (!@IsNULL(@filename))
  8571.       @ShowBMP(1,0,0,"@filename",2,@XRes,@iTMPBMP2)
  8572.    @EndIf
  8573.    @Return()
  8574. @EndFunc
  8575. //--------------------------------------------------
  8576. @DefineFunc @Void @LoadBMPBillBoard(@Void)
  8577.    //billboard is level 2
  8578.  
  8579.    @iTMPBMP1=@Eval((@XRes - (800)) / (2))
  8580.    @iTMPBMP2=@Eval((@YRes - (600)) / (2))
  8581.  
  8582.    @If (@XRes == 1024)
  8583.       @iTMPBMP2 = (@iTMPBMP2 - (8))
  8584.    @ElseIf (@XRes == 1280)
  8585.       @iTMPBMP2 = (@iTMPBMP2 - (8))
  8586.    @EndIf
  8587.  
  8588.  
  8589.  
  8590.    //@iTMPBMP6 is a state variable for the billboards
  8591.    @iTMPBMP6 = (@iTMPBMP6 + (1))
  8592.    @If (@iTMPBMP6 == 1)
  8593.       @qTMPBMP6 = "@qBBoardBMPFile1"
  8594.    @ElseIf(@iTMPBMP6 == 2)
  8595.       @qTMPBMP6 = "@qBBoardBMPFile2"
  8596.    @ElseIf(@iTMPBMP6 == 3)
  8597.       @qTMPBMP6 = "@qBBoardBMPFile3"
  8598.    @ElseIf(@iTMPBMP6 == 4)
  8599.       @qTMPBMP6 = "@qBBoardBMPFile4"
  8600.    @ElseIf(@iTMPBMP6 == 5)
  8601.       @qTMPBMP6 = "@qBBoardBMPFile5"
  8602.    @ElseIf(@iTMPBMP6 == 6)
  8603.       @qTMPBMP6 = "@qBBoardBMPFile6"
  8604.    @ElseIf(@iTMPBMP6 == 7)
  8605.       @qTMPBMP6 = "@qBBoardBMPFile7"
  8606.    @ElseIf(@iTMPBMP6 == 8)
  8607.       @qTMPBMP6 = "@qBBoardBMPFile8"
  8608.    @ElseIf(@iTMPBMP6 == 9)
  8609.       @qTMPBMP6 = "@qBBoardBMPFile9"
  8610.    @ElseIf(@iTMPBMP6 == 10)
  8611.       @qTMPBMP6 = "@qBBoardBMPFile10"
  8612.    @ElseIf(@iTMPBMP6 == 11)
  8613.       @qTMPBMP6 = "@qBBoardBMPFile11"
  8614.    @ElseIf(@iTMPBMP6 == 12)
  8615.       @qTMPBMP6 = "@qBBoardBMPFile12"
  8616.    @ElseIf(@iTMPBMP6 == 13)
  8617.       @qTMPBMP6 = "@qBBoardBMPFile13"
  8618.    @ElseIf(@iTMPBMP6 == 14)
  8619.       @qTMPBMP6 = "@qBBoardBMPFile14"
  8620.    @Else
  8621.       @qTMpBMp6 = "@qBBoardBMPFile14"
  8622.    @EndIf
  8623.  
  8624.    @If (!@IsNULL(@qTMPBMP6))
  8625.       @If (@XRes < 800)
  8626.          @ShowBMP(2,0,0,"@qTMPBMp6",2,@XRes,@YRes)      
  8627.       @Else
  8628.          @ShowBMP(2,@iTMPBMP1,@iTMPBMP2,"@qTMPBMp6",2)
  8629.       @EndIf
  8630.    @EndIf
  8631.  
  8632.    @Return()
  8633.  
  8634. @EndFunc
  8635. //--------------------------------------------------
  8636. @DefineFunc @Void @LoadBMPProdLogo(@In @QString @filename)
  8637.  
  8638. //   @EraseBMP(2)
  8639.    @If (!@IsNULL(@filename))
  8640.       @ShowBMP(2,10,20,"@filename",2)
  8641.    @EndIf
  8642.    @Return()
  8643. @EndFunc
  8644. //--------------------------------------------------
  8645. @DefineFunc @Void @LoadBMPMsg(@In @QString @filename)
  8646.  
  8647. //   @EraseBMP(3)
  8648.    @If (!@IsNULL(@filename))
  8649.       @ShowBMP(3,10,@Eval(@YRes - (200)),"@filename",2)
  8650.    @EndIf
  8651.    @Return()
  8652. @EndFunc
  8653.  
  8654. //
  8655. // FILE: INSTOPT
  8656. //
  8657. //
  8658. //
  8659. @DefineProto
  8660.  
  8661.    @Integer @WriteInstallOptions(@Void)
  8662. @EndProto
  8663.  
  8664. ///////////////////////////////////////////////////////
  8665.  
  8666. @DefineFunc @Integer @WriteInstallOptions(@Void)
  8667.  
  8668.    @AddSectionInstallSys("@lInstallOptions")
  8669.    @WritelnInstallSys("@lCustom@!=@qCustomFeatures")
  8670.  
  8671.    @If (@StrCmp(@qInstallPath1,"") != 0)
  8672.       @WritelnInstallSys("@lInstallPath@l1@!=@qInstallPath1")
  8673.    @EndIf
  8674.    @If (@StrCmp(@qInstallPath2,"") != 0)
  8675.       @WritelnInstallSys("@lInstallPath@l2@!=@qInstallPath2")
  8676.    @EndIf
  8677.    @If (@StrCmp(@qInstallPath3,"") != 0)
  8678.       @WritelnInstallSys("@lInstallPath@l3@!=@qInstallPath3")
  8679.    @EndIf
  8680.    @If (@StrCmp(@qInstallPath4,"") != 0)
  8681.       @WritelnInstallSys("@lInstallPath@l4@!=@qInstallPath4")
  8682.    @EndIf
  8683.    @If (@StrCmp(@qInstallPath5,"") != 0)
  8684.       @WritelnInstallSys("@lInstallPath@l5@!=@qInstallPath5")
  8685.    @EndIf
  8686.    @If (@StrCmp(@qInstallPath6,"") != 0)
  8687.       @WritelnInstallSys("@lInstallPath@l6@!=@qInstallPath6")
  8688.    @EndIf
  8689.    @If (@StrCmp(@qInstallPath7,"") != 0)
  8690.       @WritelnInstallSys("@lInstallPath@l7@!=@qInstallPath7")
  8691.    @EndIf
  8692.    @If (@StrCmp(@qInstallPath8,"") != 0)
  8693.       @WritelnInstallSys("@lInstallPath@l8@!=@qInstallPath8")
  8694.    @EndIf
  8695.    @If (@StrCmp(@qInstallPath9,"") != 0)
  8696.       @WritelnInstallSys("@lInstallPath@l9@!=@qInstallPath9")
  8697.    @EndIf
  8698.    @If (@StrCmp(@qInstallPath10,"") != 0)
  8699.       @WritelnInstallSys("@lInstallPath@l10@!=@qInstallPath10")
  8700.    @EndIf
  8701.   
  8702.    @Return(@iNext)
  8703. @EndFunc
  8704. //
  8705. //
  8706. //
  8707. //File: Err_Exit /////////////////////////////////////
  8708. //
  8709. //CIDVars: NONE (iResponseFile)
  8710. //
  8711. //Globals changed: NONE (install return code)
  8712. //
  8713. @DefineProto
  8714.    @Void @ErrorExit(@In @QString @qErrorMsg, @In @Integer @iErrorCode)
  8715. @EndProto
  8716. //
  8717. //
  8718.  
  8719. //----------------------------------------------------
  8720. @DefineFunc @Void @ErrorExit(@In @QString @qErrorMsg, @In @Integer @iErrorCode)
  8721.  
  8722.    @If (!@iResponseFile||@ShowAllToggle)
  8723. //      @Display "@qErrorText1 @qErrorMsg @Eval(@iErrorCode)"  @pause @enddisplay
  8724.       @MsgBox("@qErrorText1@qcrlf @qErrorMsg@qcrlf @Eval(@iErrorCode)")
  8725.    @EndIf
  8726.  
  8727.    @ShowAll("ErrorExit","Need to ensure ErrorCode != 0 ")
  8728.    //@If (@iErrorCode==0)
  8729.    //   @iErrorCode=5000
  8730.    //@EndIf
  8731.  
  8732.    @If ((!@IsNull(@qErrFile)) && (!@IsNull(@qTempPath))) 
  8733.       @Write("@qTempPath\\@qErrFile","wt","@qErrorMsg @iErrorCode\n")
  8734.    @Endif
  8735.  
  8736.    @CleanTemp()
  8737. //   @EraseBMP(3)
  8738. //   @EraseBMP(2)
  8739. //   @EraseBMP(1)
  8740. //   @EraseBMP(0)
  8741.  
  8742.    @If (@Platform == @OS2)
  8743.       @Abort
  8744.    @EndIf
  8745.    @Exit
  8746.    @return()
  8747. @EndFunc
  8748.  
  8749. //
  8750. //
  8751. //
  8752. //File: Cancel /////////////////////////////////////
  8753. //
  8754. //CIDVars: NONE (iResponseFile)
  8755. //
  8756. //Globals changed: NONE
  8757. //
  8758. @DefineProto
  8759.    @Void @ConfirmCancel(@Void)
  8760. @EndProto
  8761. //
  8762. //
  8763.  
  8764. //----------------------------------------------------
  8765. @DefineFunc @Void @ConfirmCancel(@Void)
  8766.  
  8767.    @If (@iResponseFile==@TRUE)
  8768.       @ErrorExit("User Cancel",5000)
  8769.    @EndIf
  8770.  
  8771.    @iFuncRes = @Dialog1s2p(@qCancelTitle, @qCancelText1, @qYes, @qNo )
  8772.    @If (@iFuncRes == 1)
  8773.       //@ErrorExit(@qCancelText2,5000)
  8774.       @Exit
  8775.    @Endif
  8776.  
  8777.    @Return()
  8778. @EndFunc
  8779. //
  8780. //
  8781. //
  8782. //File: SetTemp /////////////////////////////////////
  8783. //
  8784. //CIDVars: none
  8785. //
  8786. //Globals changed: @qTempPath
  8787. //
  8788. @DefineProto
  8789.    @Void @SetTemp(@Void)
  8790.    @Void @CleanTemp(@Void)
  8791.    @Void @TempDelete(@IN @QString @qFileName)
  8792.    @Integer @IsDirectory(@IN @QString @qDirName)
  8793. @EndProto
  8794. //
  8795. //
  8796.  
  8797. //----------------------------------------------------------
  8798. @DefineFunc @Void @SetTemp(@Void)
  8799.    @qTempPath = @GetEnv("TEMP")
  8800.    @iTMP1 = 1
  8801.    @If(@StrLen(@qTempPath) == 0)
  8802.       @qTempPath = @GetEnv("TMP")
  8803.       @iTMP1 = 2
  8804.    @EndIf
  8805.    @If(@StrLen(@qTempPath) == 0)
  8806.       @ErrorExit(@qSetTempError, @iAbort)
  8807.    @EndIf
  8808.  
  8809.    @If (!@Exists(@qTempPath))
  8810.       @If (@iTMP1 == 1)
  8811.          @ErrorExit(@qSetTempError2_1,@iAbort)
  8812.       @Else
  8813.          @ErrorExit(@qSetTempError2_2,@iAbort)
  8814.       @EndIf
  8815.    @EndIf
  8816.  
  8817.    //@If (!@IsDirectory(@qTempPath))
  8818.    //   @If (@iTMP1 == 1)
  8819.    //      @ErrorExit(@qSettempError3_1,@iAbort)
  8820.    //   @Else
  8821.    //      @ErrorExit(@qSettempError3_2,@iAbort)
  8822.    //   @EndIf
  8823.    //@EndIf
  8824.  
  8825.    @If (@Exists("@qTempPath\\@qTempTextFile"))
  8826.       //fileattr doesn't work, so try deleting it.
  8827.       @Delete("@qTempPath\\@qTempTextFile")
  8828.       //  @DeleteTree("@qTempPath\\@qTempTextFile", 99999, "--DANGER--")
  8829.       //2 bugs: fileattr doesn't work, and after using deletetree, you can't
  8830.       //rmdir a directory
  8831.       @If (@Exists("@qTempPath\\@qTempTextFile")
  8832.           @Delete("@qTempPath\\@qTempTextFile\\*")
  8833.           @RmDir("@qTempPath\\@qTempTextFile")
  8834.       @EndIf
  8835.       @If (@Exists("@qTempPath\\@qTempTextFile"))      
  8836.          @If (@iTMP1 == 1)
  8837.             @ErrorExit(@qSetTempError4_1,@iAbort)
  8838.          @Else
  8839.             @ErrorExit(@qSetTempError4_2,@iAbort)
  8840.          @EndIf
  8841.       @EndIf
  8842.    @Else
  8843.       @Write("@qTempPath\\@qTempTextFile", "wt", "")
  8844.       @If (!@Exists("@qTempPath\\@qTempTextFile"))
  8845.          @If (@iTMP1 == 1)
  8846.             @ErrorExit(@qSetTempError5_1,@iAbort)
  8847.          @Else
  8848.             @ErrorExit(@qSetTempError5_2,@iAbort)
  8849.          @EndIf
  8850.       @EndIf
  8851.       @Delete("@qTempPath\\@qTempTextFile")
  8852.       @If (@Exists("@qTempPath\\@qTempTextFile"))      
  8853.          @If (@iTMP1 == 1)
  8854.             @ErrorExit(@qSetTempError4_1,@iAbort)
  8855.          @Else
  8856.             @ErrorExit(@qSetTempError4_2,@iAbort)
  8857.          @EndIf
  8858.       @EndIf
  8859.    @EndIf
  8860.  
  8861.  
  8862.    
  8863.    @Return()
  8864. @EndFunc
  8865.  
  8866. //----------------------------------------------------------
  8867. @DefineFunc @Void @CleanTemp(@Void)
  8868.    @If(@StrCmp(@qTempPath, "") != 0)
  8869.       @TempDelete("install.ini")
  8870.       @TempDelete("install.dat")
  8871.       @TempDelete("disk.id")
  8872.       @TempDelete("*._T_")
  8873.       @TempDelete("@DataRED")
  8874.       @qTempPath = ""
  8875.    @EndIf
  8876.    @Return()
  8877. @EndFunc
  8878.  
  8879. //----------------------------------------------------
  8880. @DefineFunc @Void @TempDelete(@IN @QString @qFileName)
  8881.    @If(@Exists("@qTempPath\\@qFileName"))
  8882.       @Delete ("@qTempPath\\@qFileName")
  8883.    @endif
  8884.    @return()
  8885. @EndFunc
  8886.  
  8887. //----------------------------------------------------
  8888. @DefineFunc @Integer @IsDirectory(@IN @QString @qDirName)
  8889.    @Return(@FileAttr("@qDirname") & 0x10)
  8890. @EndFunc
  8891. //
  8892. //
  8893. //
  8894. //File: Debug ///////////////////////////////////////
  8895. //
  8896. //CIDVars: TBD
  8897. //
  8898. //Globals changed: none
  8899. //
  8900. @DefineProto
  8901.     //ShowAll
  8902.    @Void @ShowAll(@In @QString @ProcName, @In @QString @Comment)
  8903. @EndProto
  8904. //
  8905. //
  8906.  
  8907. //----------------------------------------------------------
  8908. @DefineFunc @Void @ShowAll(@In @QString @ProcName, @In @QString @Comment)
  8909.    @If(@ShowAllToggle)
  8910.       @MsgBox("@ProcName: @Comment")
  8911.    @EndIf
  8912.    @Return()
  8913. @EndFunc
  8914. //
  8915. //
  8916. //
  8917. //File: readresp.dat ////////////////////////////////
  8918. //
  8919. //CIDVars: All (See below)
  8920. //
  8921. //Globals changed: @qResponseFilename
  8922. //
  8923. @DefineProto
  8924.    @Void @DoResponse(@In @QString @Filename)
  8925.    @Void @StringResponse(@In @QString @InValue, @InOut @QString @OutValue)
  8926.    @Void @IntegerResponse(@In @QString @InValue, @InOut @Integer @OutValue)
  8927. @EndProto
  8928. //
  8929. //
  8930.  
  8931. //----------------------------------------------------------
  8932. @DefineFunc @Void @StringResponse(@In @QString @InValue, @InOut @QString @OutValue)
  8933.    @If(@StrLen(@qResponseFilename) == 0)
  8934.       @ErrorExit(@qDoResponseError2, @iAbort)
  8935.    @Else //Do nothing otherwise
  8936.    @EndIf
  8937.  
  8938.    @qTempStr2 = @GetINI(@qSectionResponseFile, @InValue, @qResponseFilename)
  8939.    @If(@StrLen(@qTempStr2) > 0)
  8940.       @OutValue = @qTempStr2
  8941.    @Else //Do nothing for a null string
  8942.    @EndIf
  8943.    @Return()
  8944. @EndFunc
  8945.  
  8946. //----------------------------------------------------------
  8947. @DefineFunc @Void @IntegerResponse(@In @QString @InValue, @InOut @Integer @OutValue)
  8948.    @StringResponse(@InValue, @qTempStr3)
  8949.    @If(@StrLen(@qTempStr2) > 0)
  8950.       @OutValue = @StrToInt(@qTempStr3)
  8951.       @If(@OutValue < 0)
  8952.          @ErrorExit("@qDoResponseError3: Input = @InValue", @iAbort)
  8953.       @Else //Do nothing otherwise
  8954.       @EndIf
  8955.    @Else //Do nothing for a null value
  8956.    @EndIf
  8957.    @Return()
  8958. @EndFunc
  8959.  
  8960. //----------------------------------------------------------
  8961. @DefineFunc @Void @DoResponse(@In @QString @Filename)
  8962.    //Set the filename to get information from
  8963.    @If(@StrLen(@Filename) != 0)
  8964.       @qResponseFilename = @Filename
  8965.    @Else
  8966.       @ErrorExit(@qDoResponseError1, @iAbort)
  8967.    @EndIf
  8968.  
  8969.    @If(!@Exists(@Filename))
  8970.       @ErrorExit("@qDoResponseError4@Filename", @iAbort)
  8971.    @EndIf
  8972.  
  8973.    @StringResponse ( "OverwriteAutoexec",          @qOverwriteAutoexec   )
  8974.    @StringResponse ( "OverwriteConfig",            @qOverwriteConfig     )
  8975.    @StringResponse ( "OverwriteProduct",           @qOverwriteProduct    )
  8976.    @StringResponse ( "Reboot",                     @qReboot              )
  8977.  
  8978.    //Get Path settings
  8979.    @StringResponse ( "Path1",                      @qInstallPath1        )
  8980.    @StringResponse ( "Path2",                      @qInstallPath2        )
  8981.    @StringResponse ( "Path3",                      @qInstallPath3        )
  8982.    @StringResponse ( "Path4",                      @qInstallPath4        )
  8983.    @StringResponse ( "Path5",                      @qInstallPath5        )
  8984.    @StringResponse ( "Path6",                      @qInstallPath6        )
  8985.    @StringResponse ( "Path7",                      @qInstallPath7        )
  8986.    @StringResponse ( "Path8",                      @qInstallPath8        )
  8987.    @StringResponse ( "Path9",                      @qInstallPath9        )
  8988.    @StringResponse ( "Path10",                     @qInstallPath10       )
  8989.  
  8990.    //Read Install type and Custom Settings
  8991.    @StringResponse ( "Custom",                     @qCustomSelections    )
  8992.    @IntegerResponse( "InstallType",                @iInstallType         )
  8993.  
  8994.    //Force stuff
  8995.    @StringResponse ( "ForceInstallType",           @qForceGetInstallType )
  8996.    @StringResponse ( "ForceInstallPath",           @qForceGetInstallPath )
  8997.    @StringResponse ( "ForceWelcome",               @qForceWelcome        )
  8998.    
  8999.    @Return()
  9000. @EndFunc
  9001. //
  9002. //
  9003. //
  9004. //File: License /////////////////////////////////////
  9005. //
  9006. //CIDVars: none
  9007. //
  9008. //Globals changed: none
  9009. //
  9010. @DefineProto
  9011.    @Integer @DisplayLicense(@Void)
  9012.    @QString @ReadLicense(@In @QString @Filename)
  9013. @EndProto
  9014. //
  9015. //
  9016.  
  9017. //----------------------------------------------------------
  9018. @DefineFunc @Integer @DisplayLicense(@Void)
  9019.  
  9020.   @If (!@iBypassLicense)
  9021.    @If (!@CIDBypass(@qForceLicense))
  9022.       @qLicenseAgreement = @ReadLicense(@qLicenseFile)
  9023.  
  9024. laDisplayLicense:
  9025.       @If(!@IsNULL(@qLicenseAgreement))
  9026.          @iDialogRes = @DialogReadOnly(@qLicenseTitle,@qLicenseText1, @qLicenseText2,
  9027.                                        @qLicenseAgreement, @qBack,
  9028.                                        @qAccept,@qDoNotAccept, "", "")
  9029.  
  9030.          @If (@iDialogRes == 1)
  9031.             @iDialogRes = @iBack
  9032.          @ElseIf (@iDialogRes == 2)
  9033.             @iDialogRes = @iNext
  9034.          @ElseIf (@iDialogRes == 3)
  9035.             @ConfirmCancel()
  9036.             @Goto laDisplayLicense
  9037.          @Else
  9038.             @ErrorExit(@qLicenseDialogError,@iAbort)
  9039.          @EndIf
  9040.       @Else
  9041.          @iDialogRes = @iFuncRes
  9042.       @EndIf
  9043.    @Else
  9044.       @iDialogRes = @iNext
  9045.    @EndIf
  9046.   @EndIf //@iBypasslicense
  9047.    @Return(@iDialogRes)
  9048. @EndFunc
  9049.  
  9050. //----------------------------------------------------------
  9051. @DefineFunc @QString @ReadLicense(@In @QString @Filename)
  9052.    @If(@Exists(@Filename))
  9053.       @qTempStr2 = ""
  9054.       @TempInt = @ReadLine(@Filename, @TempStr,, 0)
  9055.  
  9056. laReadLicense:
  9057.       @If(@TempInt != -1)
  9058.          @If(@StrLen("@qTempStr2@TempStr") < 5000)
  9059.             @qTempStr2 = "@qTempStr2@TempStr@qCRLF"
  9060.             @TempInt = @ReadLine(@Filename, @TempStr,,)
  9061.             @Goto laReadLicense
  9062.          @EndIf
  9063.       @EndIf
  9064.       @qRetVal = @qTempStr2
  9065.    @Else
  9066.       @qRetVal = ""
  9067.    @EndIf
  9068.  
  9069.    @Return(@qRetVal)
  9070. @EndFunc
  9071. //
  9072. //
  9073. //
  9074. //File: Icon //////////////////////////////////////////////////
  9075. //
  9076. //CIDVars: NONE
  9077. //
  9078. //Globals changed: NONE
  9079. //
  9080. @DefineProto
  9081.    @Void @DoIcon(@In @QString @filename)
  9082.    @Integer @GetNextIconItem(@In @QString @filename, @Out @QString @qTitle, 
  9083.                  @Out @QString @qFolder,
  9084.                  @Out @QString @qType, @Out @QString @qExePath,
  9085.                  @Out @QString @qIconPath, @Out @QString @qIconNumber,
  9086.                  @Out @QString @qParameters, @Out @QString @qWorkingDir,
  9087.                  @Out @QString @qOS2ObjectID, @Out @QString @qOS2ProgType,
  9088.                  @Out @QString @qOption1, @Out @QString @qOption2,
  9089.                  @Out @QString @qItemFeature)
  9090.  
  9091.    @Void @WriteIconItemInstallSys(@In @QString @qTitle,
  9092.             @In @QString @qFolder,@In @QString @qType,@In @QString @qExePath,
  9093.             @In @QString @qIconPath,@In @QString @qIconNumber,
  9094.             @In @QString @qParameters,@In @QString @qWorkingDir,
  9095.             @In @QString @qOS2ObjectID,@In @QString @qOS2ProgType,
  9096.             @In @QString @qOption1,@In @QString @qOption2,
  9097.             @In @QString @qItemFeature)
  9098.  
  9099. @EndProto
  9100.  
  9101. //-------------------------------------------------------------------------
  9102.  
  9103. @DefineFunc @Void @DoIcon(@In @QString @filename)
  9104.  
  9105.    @If (!@Exists(@filename))
  9106.       @ErrorExit(@qIconErrorFileNotExist,@iAbort)
  9107.    @EndIf
  9108.  
  9109.    @AddSectionInstallSys(@lIcon)
  9110.  
  9111.    //Delete REXX icon construction file
  9112.    @If (@Platform == @OS2)
  9113.       @If (@Exists("@qTempPath\\@qREXXScriptFile"))
  9114.          @FileAttr("@qTempPath\\@qREXXScriptFile","r-")
  9115.          @Delete("@qTempPath\\@qREXXScriptFile")
  9116.       @EndIf
  9117.    @EndIf
  9118.  
  9119.    //Make sure icon section found
  9120.    @If (@CueSection(@filename, @lIcon) != @iEOF)
  9121.  
  9122. DoIconTop:
  9123.       @iReturnVal = @GetNextIconItem(@filename, @qTitle,@qFolder,@qType,
  9124.                     @qExePath,@qIconPath,
  9125.                     @qIconNumber,@qParameters,@qWorkingDir,@qOS2ObjectID,
  9126.                     @qOS2ProgType,@qOption1,@qOption2,@qItemFeature)
  9127.  
  9128.       @If ((@iReturnVal == @iSuccess) || (@iReturnVal == @iSuccessSectionDone))
  9129.          // Only create if the feature it was in was set
  9130.          @If (@IsNull(@qItemFeature) || 
  9131.               (@StrFind(@qCustomFeatures,@qItemFeature) >= 0))
  9132.             @CreateDeskTopItem(@qTitle,@qFolder,@qType,@qExePath,@qIconPath,
  9133.                        @qIconNumber,@qParameters,@qWorkingDir,@qOS2ObjectID,
  9134.                        @qOS2ProgType,@qOption1,@qOption2)
  9135.          @EndIf
  9136.          @WriteIconItemInstallSys(@qTitle,@qFolder,@qType,@qExePath,@qIconPath,
  9137.                     @qIconNumber,@qParameters,@qWorkingDir,@qOS2ObjectID,
  9138.                     @qOS2ProgType,@qOption1,@qOption2,@qItemFeature)
  9139.  
  9140.       @EndIf
  9141.       @If ((@iReturnVal == @iSuccess) || (@iReturnVal == @iNoItem))
  9142.          @Goto DoIconTop
  9143.       @Else        //Section done
  9144.       @EndIf
  9145.    @Else           //Icon section not found
  9146.    @EndIf
  9147.  
  9148.    //Run Rexx icon construction file
  9149.    @If (@Platform == @OS2)
  9150.       @If (@Exists("@qTempPath\\@qREXXScriptFile"))
  9151.          @Write("@qTempPath\\@qREXXScriptFile", "at", "EXIT\n")
  9152. //         @qTMP5 = @getenv("COMSPEC")
  9153.          @OS2Exec("@qTempPath\\@qREXXScriptFile","","",0,0," ","",0,0,0,0,0,0)
  9154.       @EndIf
  9155.    @EndIf
  9156.  
  9157.    @Return()
  9158. @EndFunc
  9159.  
  9160.  
  9161. //-------------------------------------------------------------
  9162.  
  9163. @DefineFunc @Integer @GetNextIconItem(@In @QString @filename, 
  9164.                  @Out @QString @qTitle, @Out @QString @qFolder,
  9165.                  @Out @QString @qType, @Out @QString @qExePath,
  9166.                  @Out @QString @qIconPath, @Out @QString @qIconNumber,
  9167.                  @Out @QString @qParameters, @Out @QString @qWorkingDir,
  9168.                  @Out @QString @qOS2ObjectID, @Out @QString @qOS2ProgType,
  9169.                  @Out @QString @qOption1, @Out @QString @qOption2,
  9170.                  @Out @QString @qItemFeature)
  9171.  
  9172.    //This function is called after CueSection, and so the filename is left
  9173.    //out of the calls to ReadLine
  9174.  
  9175.    @iDoLoop     = @True
  9176.    @iSectionDone = @False
  9177.  
  9178.    @qTitle       = ""
  9179.    @qFolder      = ""
  9180.    @qType        = ""
  9181.    @qExePath     = ""
  9182.    @qIconPath    = ""
  9183.    @qIconNumber  = ""
  9184.    @qParameters  = ""
  9185.    @qWorkingDir  = ""
  9186.    @qOS2ObjectID = ""
  9187.    @qOS2ProgType = ""
  9188.    @qOption1     = ""
  9189.    @qOption2     = ""
  9190.    @qItemFeature = ""
  9191.  
  9192. GetNextIconItemTop:
  9193.    @If (@iDoLoop == @False)
  9194.       @Goto GetNextIconItemEnd
  9195.  
  9196.    //Check if Not (EOF and empty line)
  9197.    @ElseIf (!((@ReadInfo(@filename, @qReadStr,@false,0) == -1) && (@StrCmp(@qReadStr,"") == 0)))
  9198.  
  9199.       @Parse2(@qReadStr,"=",@qToken1,@qToken2)
  9200.  
  9201.       @If (@StrIndex(@qToken1,0) != @bBeginSection)
  9202.          @If (@StrCmp(@qToken1,"") != 0)
  9203.             @If (@StrCmp(@qToken1,@lTitle) == 0)
  9204.                @If (@StrCmp(@qTitle,"") == 0)
  9205.                   @qTitle = @qToken2
  9206.                @Else
  9207.                   @ErrorExit(@qIconErrorDuplicateTitle,@iAbort)
  9208.                @Endif
  9209.             @ElseIf (@StrCmp(@qToken1,@lFolder) == 0)
  9210.                @If (@StrCmp(@qFolder,"") == 0)
  9211.                   @qFolder = @qToken2
  9212.                @Else
  9213.                   @ErrorExit(@qIconErrorDuplicateFolder,@iAbort)
  9214.                @Endif
  9215.             @ElseIf (@StrCmp(@qToken1,@lType) == 0)
  9216.                @If (@StrCmp(@qType,"") == 0)
  9217.                   @qType = @qToken2
  9218.                @Else
  9219.                   @ErrorExit(@qIconErrorDuplicateType,@iAbort)
  9220.                @Endif
  9221.             @ElseIf (@StrCmp(@qToken1,@lExePath) == 0)
  9222.                @If (@StrCmp(@qExePath,"") == 0)
  9223.                   @qExePath = @qToken2
  9224.                @Else
  9225.                   @ErrorExit(@qIconErrorDuplicateExePath,@iAbort)
  9226.                @Endif
  9227.             @ElseIf (@StrCmp(@qToken1,@lIconPath) == 0)
  9228.                @If (@StrCmp(@qIconPath,"") == 0)
  9229.                   @qIconPath = @qToken2
  9230.                @Else
  9231.                   @ErrorExit(@qIconErrorDuplicateIconPath,@iAbort)
  9232.                @Endif
  9233.             @ElseIf (@StrCmp(@qToken1,@lIconNumber) == 0)
  9234.                @If (@StrCmp(@qIconNumber,"") == 0)
  9235.                   @qIconNumber = @qToken2
  9236.                @Else
  9237.                   @ErrorExit(@qIconErrorDuplicateIconNumber,@iAbort)
  9238.                @Endif
  9239.             @ElseIf (@StrCmp(@qToken1,@lParameters) == 0)
  9240.                @If (@StrCmp(@qParameters,"") == 0)
  9241.                   @qParameters = @qToken2
  9242.                @Else
  9243.                   @ErrorExit(@qIconErrorDuplicateParameters,@iAbort)
  9244.                @Endif
  9245.             @ElseIf (@StrCmp(@qToken1,@lWorkingDir) == 0)
  9246.                @If (@StrCmp(@qWorkingDir,"") == 0)
  9247.                   @qWorkingDir = @qToken2
  9248.                @Else
  9249.                   @ErrorExit(@qIconErrorDuplicateWorkingDir,@iAbort)
  9250.                @Endif
  9251.             @ElseIf (@StrCmp(@qToken1,@lOS2ObjectID) == 0)
  9252.                @If (@StrCmp(@qOS2ObjectID,"") == 0)
  9253.                   @qOS2ObjectID = @qToken2
  9254.                @Else
  9255.                   @ErrorExit(@qIconErrorDuplicateOS2ObjectID,@iAbort)
  9256.                @Endif
  9257.             @ElseIf (@StrCmp(@qToken1,@lOS2ProgType) == 0)
  9258.                @If (@StrCmp(@qOS2ProgType,"") == 0)
  9259.                   @qOS2ProgType = @qToken2
  9260.                @Else
  9261.                   @ErrorExit(@qIconErrorDuplicateOS2ProgType,@iAbort)
  9262.                @Endif
  9263.             @ElseIf (@StrCmp(@qToken1,@lOption1) == 0)
  9264.                @If (@StrCmp(@qOption1,"") == 0)
  9265.                   @qOption1 = @qToken2
  9266.                @Else
  9267.                   @ErrorExit(@qIconErrorDuplicateOption1,@iAbort)
  9268.                @Endif
  9269.             @ElseIf (@StrCmp(@qToken1,@lOption2) == 0)
  9270.                @If (@StrCmp(@qOption2,"") == 0)
  9271.                   @qOption2 = @qToken2
  9272.                @Else
  9273.                   @ErrorExit(@qIconErrorDuplicateOption2,@iAbort)
  9274.                @Endif
  9275.             @ElseIf (@StrCmp(@qToken1,@lFeature) == 0)
  9276.                @If (@StrCmp(@qItemFeature,"") == 0)
  9277.                   @qItemFeature = @qToken2
  9278.                @Else
  9279.                   @ErrorExit(@qIconErrorDuplicateFeature,@iAbort)
  9280.                @Endif
  9281.             @Else   //token 1 not identified as a valid keyword
  9282.                @ErrorExit(@qIconErrorUnknownKeyword,@iAbort)
  9283.             @EndIf
  9284.          @Else      //empty line reached
  9285.             @iDoLoop = @False
  9286.          @EndIf
  9287.       @Else         //new section reached
  9288.          @iSectionDone = @True
  9289.          @iDoLoop = @False
  9290.       @EndIf
  9291.    @Else            //EOF reached and line is empty
  9292.       @iSectionDone = @True
  9293.       @iDoLoop = @False
  9294.    @EndIf
  9295.  
  9296.    @Goto GetNextIconItemTop
  9297.  
  9298. GetNextIconItemEnd:
  9299.    //Check if all neededvalues were set - option1 and option2 are optional
  9300.    @If ((@StrCmp(@qTitle,"") != 0) && (@StrCmp(@qFolder,"") != 0) &&
  9301.         (@StrCmp(@qType,"") != 0) && (@StrCmp(@qExePath,"") != 0) &&
  9302.         (@StrCmp(@qIconPath,"") != 0) && (@StrCmp(@qIconNumber,"") != 0) &&
  9303.         (@StrCmp(@qParameters,"") != 0) && (@StrCmp(@qWorkingDir,"") != 0) &&
  9304.         (@StrCmp(@qOS2ObjectID,"") != 0) && (@StrCmp(@qOS2ProgType,"") != 0))
  9305.       @If (@iSectionDone == @True)
  9306.          @iReturnVal = @iSuccessSectionDone
  9307.       @Else
  9308.          @iReturnVal = @iSuccess
  9309.       @EndIf
  9310.    //Check if no values were set
  9311.    @ElseIf ((@StrCmp(@qTitle,"") == 0) && (@StrCmp(@qFolder,"") == 0) &&
  9312.         (@StrCmp(@qType,"") == 0) && (@StrCmp(@qExePath,"") == 0) &&
  9313.         (@StrCmp(@qIconPath,"") == 0) && (@StrCmp(@qIconNumber,"") == 0) &&
  9314.         (@StrCmp(@qParameters,"") == 0) && (@StrCmp(@qWorkingDir,"") == 0) &&
  9315.         (@StrCmp(@qOS2ObjectID,"") == 0) && (@StrCmp(@qOS2ProgType,"") == 0) &&
  9316.         (@StrCmp(@qOption1,"") == 0) && (@StrCmp(@qOption2,"") == 0) &&
  9317.         (@StrCmp(@qItemFeature,"") == 0))
  9318.  
  9319.       @If (@iSectionDone == @True)
  9320.          @iReturnVal = @iNoItemSectionDone
  9321.       @Else
  9322.          @iReturnVal = @iNoItem
  9323.       @EndIf
  9324.  
  9325.    @Else
  9326.       @ErrorExit(@qIconErrorIncompleteItem,@iAbort)
  9327.    @EndIf
  9328.  
  9329.    @Return(@iReturnVal)
  9330. @EndFunc
  9331.  
  9332. //-----------------------------------------------------------------------
  9333. @DefineFunc @Void @WriteIconItemInstallSys(@In @QString @qTitle,
  9334.             @In @QString @qFolder,@In @QString @qType,@In @QString @qExePath,
  9335.             @In @QString @qIconPath,@In @QString @qIconNumber,
  9336.             @In @QString @qParameters,@In @QString @qWorkingDir,
  9337.             @In @QString @qOS2ObjectID,@In @QString @qOS2ProgType,
  9338.             @In @QString @qOption1,@In @QString @qOption2,
  9339.             @In @QString @qItemFeature)
  9340.  
  9341.    @WritelnInstallSys("@lTitle=@qTitle")
  9342.    @WritelnInstallSys("@lFolder=@qFolder")
  9343.    @WritelnInstallSys("@lType=@qType")
  9344.    @WritelnInstallSys("@lExePath=@qExePath")
  9345.    @WritelnInstallSys("@lIconPath=@qIconPath")
  9346.    @WritelnInstallSys("@lIconNumber=@qIconNumber")
  9347.    @WritelnInstallSys("@lParameters=@qParameters")
  9348.    @WritelnInstallSys("@lWorkingDir=@qWorkingDir")
  9349.    @WritelnInstallSys("@lOS2ObjectID=@qOS2ObjectID")
  9350.    @WritelnInstallSys("@lOS2ProgType=@qOS2ProgType")
  9351.  
  9352.    @If (@StrCmp(@qOption1,"") != 0)
  9353.       @WritelnInstallSys("@lOption1=@qOption1")
  9354.    @EndIf
  9355.    @If (@StrCmp(@qOption2,"") != 0)
  9356.       @WritelnInstallSys("@lOption2=@qOption2")
  9357.    @EndIf
  9358.    @If (@StrCmp(@qItemFeature,"") != 0)
  9359.       @WritelnInstallSys("@lFeature=@qItemFeature")
  9360.    @EndIf
  9361.  
  9362.    @AddNewlineInstallSys()
  9363.  
  9364.    @Return()
  9365. @EndFunc
  9366. //
  9367. //
  9368. //
  9369. //File: Envvar //////////////////////////////////////////////////
  9370. //
  9371. //CIDVars: NONE
  9372. //
  9373. //Globals changed: NONE
  9374. //
  9375. @DefineProto
  9376.    @Void @DoEnvVars(@In @QString @filename)
  9377.    @Integer @GetNextEnvVarsItem(@In @QString @filename, @Out @QString @qName,
  9378.                  @Out @QString @qValue, @Out @QString @qMethod, 
  9379.                  @Out @QString @qOldValue,@Out @QString @qItemFeature)
  9380.    @Void @WriteEnvVarsItemInstallSys(@In @QString @qName,
  9381.             @In @QString @qValue, @In @QString @qMethod, 
  9382.             @In @QString @qOldValue,@In @QString @qItemFeature)
  9383.  
  9384. @EndProto
  9385.  
  9386. //-------------------------------------------------------------------------
  9387.  
  9388. @DefineFunc @Void @DoEnvVars(@In @QString @filename)
  9389.  
  9390.    @If (!(@Exists(@filename)))
  9391.       @ErrorExit(@qEnvVarsErrorFileNotExist,@iAbort)
  9392.    @EndIf
  9393.  
  9394.    @AddSectionInstallSys(@lEnvironmentVars)
  9395.  
  9396.    //Make sure environment section found
  9397.    @If (@CueSection(@filename, @lEnvironmentVars) != @iEOF)
  9398.  
  9399. DoEnvVarsTop:
  9400.       @iReturnVal = @GetNextEnvVarsItem(@filename, @qName,@qValue,@qMethod,@qOldValue,@qItemFeature)
  9401.  
  9402.       @If ((@iReturnVal == @iSuccess) || (@iReturnVal == @iSuccessSectionDone))
  9403.          // Only create it if the feature it's in was set
  9404.          @If (@IsNull(@qItemFeature) || 
  9405.               (@StrFind(@qCustomFeatures,@qItemFeature) >= 0))
  9406.             @CreateNextEnvVarsItem(@qName,@qValue,@qMethod,@qOldValue)
  9407.          @EndIf
  9408.          @WriteEnvVarsItemInstallSys(@qName,@qValue,@qMethod,@qOldValue,
  9409.                                      @qItemFeature)
  9410.       @EndIf
  9411.  
  9412.       @If ((@iReturnVal == @iSuccess) || (@iReturnVal == @iNoItem))
  9413.          @Goto DoEnvVarsTop
  9414.       @Else      //Section done
  9415.       @EndIf
  9416.    @Else         //Environment variables section not found
  9417.    @EndIf
  9418.  
  9419.    @Return()
  9420. @EndFunc
  9421.  
  9422.  
  9423. //-------------------------------------------------------------
  9424.  
  9425. @DefineFunc @Integer @GetNextEnvVarsItem(@In @QString @filename,
  9426.             @Out @QString @qName, @Out @QString @qValue,
  9427.             @Out @QString @qMethod, @Out @QString @qOldValue,
  9428.             @Out @QString @qItemFeature)
  9429.  
  9430.  
  9431.    @iDoLoop     = @True
  9432.    @iSectionDone = @False
  9433.  
  9434.    @qName       = ""
  9435.    @qValue      = ""
  9436.    @qMethod     = ""
  9437.    @qOldValue   = ""
  9438.    @qItemFeature= ""
  9439.  
  9440. GetNextEnvVarsItemTop:
  9441.    @If (@iDoLoop == @False)
  9442.       @Goto GetNextEnvVarsItemEnd
  9443.  
  9444.    //Check if Not (EOF and empty line)
  9445.    @ElseIf (!((@Readinfo(@filename, @qReadStr,@false,0) == -1) && (@StrCmp(@qReadStr,"") == 0)))
  9446.  
  9447.       @Parse2(@qReadStr,"=",@qToken1,@qToken2)
  9448.  
  9449.       @If (@StrIndex(@qToken1,0) != @bBeginSection)
  9450.          @If (@StrCmp(@qToken1,"") != 0)
  9451.             @If (@StrCmp(@qToken1,@lName) == 0)
  9452.                @If (@StrCmp(@qName,"") == 0)
  9453.                   @qName = @qToken2
  9454.                @Else
  9455.                   @ErrorExit(@qEnvVarsErrorDuplicateName,@iAbort)
  9456.                @Endif
  9457.             @ElseIf (@StrCmp(@qToken1,@lValue) == 0)
  9458.                @If (@StrCmp(@qValue,"") == 0)
  9459.                   @qValue = @qToken2
  9460.                @Else
  9461.                   @ErrorExit(@qEnvVarsErrorDuplicateValue,@iAbort)
  9462.                @Endif
  9463.             @ElseIf (@StrCmp(@qToken1,@lMethod) == 0)
  9464.                @If (@StrCmp(@qMethod,"") == 0)
  9465.                   @qMethod = @qToken2
  9466.                @Else
  9467.                   @ErrorExit(@qEnvVarsErrorDuplicateMethod,@iAbort)
  9468.                @Endif
  9469.             @ElseIf (@StrCmp(@qToken1,@lOldValue) == 0)
  9470.                @If (@StrCmp(@qOldValue,"") == 0)
  9471.                   @qOldValue = @qToken2
  9472.                @Else
  9473.                   @ErrorExit(@qEnvVarsErrorDuplicateOldValue,@iAbort)
  9474.                @Endif
  9475.             @ElseIf (@StrCmp(@qToken1,@lFeature) == 0)
  9476.                @If (@StrCmp(@qItemFeature,"") == 0)
  9477.                   @qItemFeature = @qToken2
  9478.                @Else
  9479.                   @ErrorExit(@qEnvVarsErrorDuplicateFeature,@iAbort)
  9480.                @Endif
  9481.             @Else   //token 1 not identified as a valid keyword
  9482.                @ErrorExit(@qEnvVarsErrorUnknownKeyword,@iAbort)
  9483.             @EndIf
  9484.          @Else      //empty line reached
  9485.             @iDoLoop = @False
  9486.          @EndIf
  9487.       @Else         //new section reached
  9488.          @iSectionDone = @True
  9489.          @iDoLoop = @False
  9490.       @EndIf
  9491.    @Else            //EOF reached and line is empty
  9492.       @iSectionDone = @True
  9493.       @iDoLoop = @False
  9494.    @EndIf
  9495.  
  9496.    @Goto GetNextEnvVarsItemTop
  9497.  
  9498. GetNextEnvVarsItemEnd:
  9499.    //Check if all needed values were set - method (oldvalue) is not required
  9500.    @If ((@StrCmp(@qName,"") != 0) && (@StrCmp(@qValue,"") != 0))
  9501.  
  9502.       @If (@iSectionDone == @True)
  9503.          @iReturnVal = @iSuccessSectionDone
  9504.       @Else
  9505.          @iReturnVal = @iSuccess
  9506.       @EndIf
  9507.    //Check if no values were set
  9508.    @ElseIf ((@StrCmp(@qName,"") == 0) && (@StrCmp(@qValue,"") == 0) &&
  9509.         (@StrCmp(@qMethod,"") == 0) && (@StrCmp(@qOldValue,"") == 0) &&
  9510.         (@StrCmp(@qItemFeature,"") == 0))
  9511.  
  9512.       @If (@iSectionDone == @True)
  9513.          @iReturnVal = @iNoItemSectionDone
  9514.       @Else
  9515.          @iReturnVal = @iNoItem
  9516.       @EndIf
  9517.  
  9518.    @Else
  9519.       @ErrorExit(@qEnvVarsErrorIncompleteItem,@iAbort)
  9520.    @EndIf
  9521.  
  9522.    @Return(@iReturnVal)
  9523. @EndFunc
  9524.  
  9525. //-------------------------------------------------------------
  9526. @DefineFunc @Void @WriteEnvVarsItemInstallSys(@In @QString @qName,
  9527.             @In @QString @qValue, @In @QString @qMethod, @In @QString @qOldValue,
  9528.             @In @QString @qItemFeature)
  9529.    @WritelnInstallSys("@lName=@qName")
  9530.    @WritelnInstallSys("@lValue=@qValue")
  9531.  
  9532.    //Method is an optional parameter - don't write it if it wasn't in install.ini
  9533.    @If (@StrCmp(@qMethod,"") != 0)
  9534.       @WritelnInstallSys("@lMethod=@qMethod")
  9535.       //If the method was overwrite, store the old value
  9536.       @If (@StrCmp(@qMethod, @qSetEnvReplaceVar) == 0)
  9537.          @WritelnInstallSys("@lOldValue=@qOldValue")
  9538.       @EndIf
  9539.    @EndIf
  9540.    @If (@StrCmp(@qItemFeature,"") != 0)
  9541.       @WritelnInstallSys("@lFeature=@qItemFeature")
  9542.    @EndIf
  9543.    @AddNewlineInstallSys()
  9544.  
  9545.    @Return()
  9546. @EndFunc
  9547. //
  9548. //
  9549. //
  9550. //File: Prodvar //////////////////////////////////////////////////
  9551. //
  9552. //CIDVars: NONE
  9553. //
  9554. //Globals changed: NONE
  9555. //
  9556. @DefineProto
  9557.    @Void @DoProdVars(@In @QString @filename)
  9558.    @Integer @GetNextProdVarsItem(@In @QString @filename, @Out @QString @qName,
  9559.                  @Out @QString @qValue, @Out @QString @qDataType,
  9560.                  @Out @QString @qComponent, 
  9561.                  @Out @QString @qMethod, @Out @QString @qItemFeature)
  9562.    @Void @WriteProdVarsItemInstallSys(@In @QString @qName,
  9563.             @In @QString @qValue, @In @QString @qDataType,
  9564.             @In @QString @qComponent, 
  9565.             @In @QString @qMethod, @In @QString @qItemFeature)
  9566.  
  9567. @EndProto
  9568.  
  9569. //-------------------------------------------------------------------------
  9570.  
  9571. @DefineFunc @Void @DoProdVars(@In @QString @filename)
  9572.  
  9573.    @If (!(@Exists(@filename)))
  9574.       @ErrorExit(@qProdVarsErrorFileNotExist,@iAbort)
  9575.    @EndIf
  9576.  
  9577.    @AddSectionInstallSys(@lProductVars)
  9578.  
  9579.    //Make sure Product vars section found
  9580.    @If (@CueSection(@filename, @lProductVars) != @iEOF)
  9581.  
  9582. DoProdVarsTop:
  9583.       @iReturnVal = @GetNextProdVarsItem(@filename, @qName, @qValue,
  9584.                     @qDataType, @qComponent, @qMethod, @qItemFeature)
  9585.  
  9586.       @If ((@iReturnVal == @iSuccess) || (@iReturnVal == @iSuccessSectionDone))
  9587.          // Only create if the feature it was in was set
  9588.          @If (@IsNull(@qItemFeature) || 
  9589.               (@StrFind(@qCustomFeatures,@qItemFeature) >= 0))
  9590.             @CreateNextProdVarsItem(@qName,@qValue, @qDataType,
  9591.                                     @qComponent,@qMethod)
  9592.          @EndIf
  9593.          @WriteProdVarsItemInstallSys(@qName,@qValue,@qDataType,
  9594.                                  @qComponent,@qMethod,@qItemFeature)
  9595.       @EndIf
  9596.  
  9597.       @If ((@iReturnVal == @iSuccess) || (@iReturnVal == @iNoItem))
  9598.          @Goto DoProdVarsTop
  9599.       @Else      //Section done
  9600.       @EndIf
  9601.    @Else         //Product variables section not found
  9602.    @EndIf
  9603.  
  9604.    @Return()
  9605. @EndFunc
  9606.  
  9607.  
  9608. //-------------------------------------------------------------
  9609.  
  9610. @DefineFunc @Integer @GetNextProdVarsItem(@In @QString @filename,
  9611.             @Out @QString @qName, @Out @QString @qValue,
  9612.             @Out @QString @qDataType,
  9613.             @Out @QString @qComponent, @Out @QString @qMethod,
  9614.             @Out @QString @qItemFeature)
  9615.  
  9616.  
  9617.    @iDoLoop     = @True
  9618.    @iSectionDone = @False
  9619.  
  9620.    @qName       = ""
  9621.    @qValue      = ""
  9622.    @qDataType   = ""
  9623.    @qComponent  = ""
  9624.    @qMethod     = ""
  9625.    @qItemFeature= ""
  9626.  
  9627. GetNextProdVarsItemTop:
  9628.    @If (@iDoLoop == @False)
  9629.       @Goto GetNextProdVarsItemEnd
  9630.  
  9631.    //Check if Not (EOF and empty line)
  9632.    @ElseIf (!((@Readinfo(@filename, @qReadStr,@false,0) == -1) && (@StrCmp(@qReadStr,"") == 0)))
  9633.  
  9634.       @Parse2(@qReadStr,"=",@qToken1,@qToken2)
  9635.  
  9636.       @If (@StrIndex(@qToken1,0) != @bBeginSection)
  9637.          @If (@StrCmp(@qToken1,"") != 0)
  9638.             @If (@StrCmp(@qToken1,@lName) == 0)
  9639.                @If (@StrCmp(@qName,"") == 0)
  9640.                   @qName = @qToken2
  9641.                @Else
  9642.                   @ErrorExit(@qProdVarsErrorDuplicateName,@iAbort)
  9643.                @Endif
  9644.             @ElseIf (@StrCmp(@qToken1,@lValue) == 0)
  9645.                @If (@StrCmp(@qValue,"") == 0)
  9646.                   @qValue = @qToken2
  9647.                @Else
  9648.                   @ErrorExit(@qProdVarsErrorDuplicateValue,@iAbort)
  9649.                @Endif
  9650.             @ElseIf (@StrCmp(@qToken1,@lDataType) == 0)
  9651.                @If (@StrCmp(@qDataType,"") == 0)
  9652.                   @qDataType = @qToken2
  9653.                @Else
  9654.                   @ErrorExit(@qProdVarsErrorDuplicateDataType,@iAbort)
  9655.                @Endif
  9656.             @ElseIf (@StrCmp(@qToken1,@lComponent) == 0)
  9657.                @If (@StrCmp(@qComponent,"") == 0)
  9658.                   @qComponent = @qToken2
  9659.                @Else
  9660.                   @ErrorExit(@qProdVarsErrorDuplicateComponent,@iAbort)
  9661.                @Endif
  9662.             @ElseIf (@StrCmp(@qToken1,@lMethod) == 0)
  9663.                @If (@StrCmp(@qMethod,"") == 0)
  9664.                   @qMethod = @qToken2
  9665.                @Else
  9666.                   @ErrorExit(@qProdVarsErrorDuplicateMethod,@iAbort)
  9667.                @Endif
  9668.             @ElseIf (@StrCmp(@qToken1,@lFeature) == 0)
  9669.                @If (@StrCmp(@qItemFeature,"") == 0)
  9670.                   @qItemFeature = @qToken2
  9671.                @Else
  9672.                   @ErrorExit(@qProdVarsErrorDuplicateFeature,@iAbort)
  9673.                @Endif
  9674.             @Else   //token 1 not identified as a valid keyword
  9675.                @ErrorExit(@qProdVarsErrorUnknownKeyword,@iAbort)
  9676.             @EndIf
  9677.          @Else      //empty line reached
  9678.             @iDoLoop = @False
  9679.          @EndIf
  9680.       @Else         //new section reached
  9681.          @iSectionDone = @True
  9682.          @iDoLoop = @False
  9683.       @EndIf
  9684.    @Else            //EOF reached and line is empty
  9685.       @iSectionDone = @True
  9686.       @iDoLoop = @False
  9687.    @EndIf
  9688.  
  9689.    @Goto GetNextProdVarsItemTop
  9690.  
  9691. GetNextProdVarsItemEnd:
  9692.    //Check if all needed values were set-method,group,datatype not required
  9693.    @If ((@StrCmp(@qName,"") != 0) && (@StrCmp(@qValue,"") != 0) &&
  9694.         (@StrCmp(@qComponent,"") != 0))
  9695.  
  9696.       @If (@iSectionDone == @True)
  9697.          @iReturnVal = @iSuccessSectionDone
  9698.       @Else
  9699.          @iReturnVal = @iSuccess
  9700.       @EndIf
  9701.    //Check if no values were set
  9702.    @ElseIf ((@StrCmp(@qName,"") == 0) && (@StrCmp(@qValue,"") == 0) &&
  9703.         (@StrCmp(@qDataType,"") == 0) &&
  9704.         (@StrCmp(@qComponent,"") == 0) && (@StrCmp(@qMethod,"") == 0) &&
  9705.         (@StrCmp(@qItemFeature,"") == 0))
  9706.  
  9707.       @If (@iSectionDone == @True)
  9708.          @iReturnVal = @iNoItemSectionDone
  9709.       @Else
  9710.          @iReturnVal = @iNoItem
  9711.       @EndIf
  9712.  
  9713.    @Else
  9714.       @ErrorExit(@qProdVarsErrorIncompleteItem,@iAbort)
  9715.    @EndIf
  9716.  
  9717.    @Return(@iReturnVal)
  9718. @EndFunc
  9719.  
  9720. //-------------------------------------------------------------
  9721. @DefineFunc @Void @WriteProdVarsItemInstallSys(@In @QString @qName,
  9722.             @In @QString @qValue, @In @QString @qDataType,
  9723.             @In @QString @qComponent, 
  9724.             @In @QString @qMethod, @In @QString @qItemFeature)
  9725.    @WritelnInstallSys("@lName=@qName")
  9726.    @WritelnInstallSys("@lValue=@qValue")
  9727.  
  9728.    @If (@StrCmp(@qDataType,"") != 0)
  9729.       @WritelnInstallSys("@lDataType=@qDataType")
  9730.    @EndIf
  9731.  
  9732.    @WritelnInstallSys("@lComponent=@qComponent")
  9733.  
  9734.  
  9735.    //Method is an optional parameter - don't write it if it wasn't in install.ini
  9736.    @If (@StrCmp(@qMethod,"") != 0)
  9737.       @WritelnInstallSys("@lMethod=@qMethod")
  9738.    @EndIf
  9739.  
  9740.    //Group is an optional parameter - don't write it if it wasn't in install.ini
  9741.    @If (@StrCmp(@qItemFeature,"") != 0)
  9742.       @WritelnInstallSys("@lFeature=@qItemFeature")
  9743.    @EndIf
  9744.  
  9745.    @AddNewlineInstallSys()
  9746.  
  9747.    @Return()
  9748. @EndFunc
  9749. //
  9750. //
  9751. //
  9752. //File: Uninstal /////////////////////////////////////
  9753. //
  9754. //CIDVars: TBD
  9755. //
  9756. //Globals changed: none
  9757. //
  9758. @DefineProto
  9759.    @Void @GetInstallStatus(@Void)
  9760.    @QString @GetExtInstallDirectory(@In @QString @qExtProductName,
  9761.                                     @In @QString @qExtProductVersion,
  9762.                                     @In @QString @qExtProductINIPointerApp,
  9763.                                     @In @QString @qExtProductINIPointerKey)
  9764.    @QString @GetRegValue(@In @Integer @iRegKey, @In @QString @qRegString)
  9765.    @Integer @UninstallProduct(@Void)
  9766.    @Void @RemoveDesktopItems(@Void)
  9767.    @Void @RemoveProductFiles(@Void)
  9768.    @Void @GetInstallPathInfo(@Void)
  9769.    @Void @RemoveDirTree(@In @QString @qOption, @In @QString @qInstallPath)
  9770.    @Void @HandleSharedFiles(@Void)
  9771.    @Void @RemoveEnvVars(@Void)
  9772.    @Void @RemoveEnvVarItem(@In @QString @qName, @In @QString @qValue,
  9773.                            @In @QString @qMethod, @In @QString @qOldValue)
  9774.    @Void @RemoveWin95EnvVars(@In @QString @qName, @In @QString @qValue,
  9775.                              @In @QString @qMethod, @In @QString @qOldValue)
  9776.    @Void @RemoveWinNTEnvVars(@In @QString @qName, @In @QString @qValue,
  9777.                              @In @QString @qMethod, @In @QString @qOldValue)
  9778.    @Void @RemoveOS2EnvVars(@In @QString @qName, @In @QString @qValue,
  9779.                            @In @QString @qMethod, @In @QString @qOldValue)
  9780.    @Void @RemoveProdVars(@Void)
  9781.    @Void @RemoveProdVarItem(@In @QString @qName,
  9782.             @In @QString @qValue, @In @QString @qDataType,
  9783.             @In @QString @qComponent, @In @QString @qMethod)
  9784.    @Void @RemoveRegProdInfo(@Void)
  9785.    @Void @RemoveRegUninInfo(@Void)
  9786.    @Void @DestroyWPSObject(@In @QString @ObjectID)
  9787. @EndProto
  9788. //
  9789. //
  9790. //----------------------------------------------------
  9791. @DefineFunc @Void @GetInstallStatus(@Void)
  9792.  
  9793.    @If (@Platform == @Windows)
  9794.       @qTMP1 = "SOFTWARE\\@qCompanyName\\@qProductName\\@qProductVersion\\@qInstallKey"
  9795.       @If (@WinRegOpenKeyEx(@HKeyLocalMachine, @qTMP1, @iRegKeyAllAccess,
  9796.                             @iKeyHandle) != 0)
  9797.          @iProductInstalled = @False
  9798.       @Else
  9799.          @qInstallPath1TMP = @GetRegValue(@iKeyHandle, @lDirectory)
  9800.          @qFolderName   = @GetRegValue(@iKeyHandle, @lFolder)
  9801.          @If(@IsNULL(@qInstallPath1TMP))
  9802.             @iProductInstalled = @False
  9803.          @Else
  9804.             @iProductInstalled = @True
  9805.             @qInstallPath1 = @qInstallPath1TMP
  9806.          @EndIf
  9807.          //On WinNT, determine where the env vars were set.
  9808.          @If(@SubPlatform == @WindowsNT && @iProductInstalled)
  9809.             @qEnvVarLoc = @GetRegValue(@iKeyHandle, @lEnvVarLoc)
  9810.             @If(@IsNULL(@qEnvVarLoc))
  9811.                @iProductInstalled = @False
  9812.             @Else
  9813.                @iProductInstalled = @True
  9814.             @EndIf
  9815.          @EndIf
  9816.       @EndIf
  9817.    @ElseIf (@Platform == @OS2)
  9818.       @qProductINI = @GetProductINIPointer()
  9819.       @If(@StrLen(@qProductINI) == 0)
  9820.          @iProductInstalled = @False
  9821.       @Else
  9822.          @If(!@Exists(@qProductINI))
  9823.             @iProductInstalled = @False
  9824.          @Else
  9825.             // Get Installation information from
  9826.             // product ini file.
  9827.             @qInstallPath1TMP = @GetOS2ProductINIString(@qInstallKey, @lDirectory)
  9828.             @qOS2ObjectID = @GetOS2ProductINIString(@qInstallKey, @lFolder)
  9829.  
  9830.             @If(@IsNULL(@qInstallPath1TMP))
  9831.                @iProductInstalled = @False
  9832.             @Else
  9833.                @iProductInstalled = @True
  9834.                @qInstallPath1 = @qInstallPath1TMP
  9835.             @EndIf
  9836.          @EndIf
  9837.       @EndIf
  9838.    @Else
  9839.       @ErrorExit(@qInvalidOSError, @iAbort)
  9840.    @EndIf
  9841.    @Return()
  9842.  
  9843. @EndFunc
  9844.  
  9845. //
  9846. //
  9847. //----------------------------------------------------
  9848. @DefineFunc @QString @GetExtInstallDirectory(@In @QString @qExtProductName,
  9849.                                              @In @QString @qExtProductVersion,
  9850.                                              @In @QString @qExtProductINIPointerApp,
  9851.                                              @In @QString @qExtProductINIPointerKey)
  9852.  
  9853.    @If (@Platform == @Windows)
  9854.       @qTMP1 = "SOFTWARE\\@qCompanyName\\@qExtProductName\\@qExtProductVersion\\@qInstallKey"
  9855.       @If (@WinRegOpenKeyEx(@HKeyLocalMachine, @qTMP1, @iRegKeyAllAccess,
  9856.                             @iKeyHandle) != 0)
  9857.          @iExtProductInstalled = @False
  9858.          @Return("")
  9859.       @Else
  9860.          @qExtInstallPath1 = @GetRegValue(@iKeyHandle, @lDirectory)
  9861.          @qExtFolderName   = @GetRegValue(@iKeyHandle, @lFolder)
  9862.          @If(@IsNULL(@qExtInstallPath1))
  9863.             @iExtProductInstalled = @False
  9864.          @Else
  9865.             @iExtProductInstalled = @True
  9866.          @EndIf
  9867.          //On WinNT, determine where the env vars were set.
  9868.          @If(@SubPlatform == @WindowsNT && @iExtProductInstalled)
  9869.             @qExtEnvVarLoc = @GetRegValue(@iKeyHandle, @lEnvVarLoc)
  9870.             @If(@IsNULL(@qExtEnvVarLoc))
  9871.                @iExtProductInstalled = @False
  9872.             @Else
  9873.                @iExtProductInstalled = @True
  9874.             @EndIf
  9875.          @EndIf
  9876.          @If (@iExtProductInstalled)
  9877.              @Return(@qExtInstallPath1)
  9878.          @Else
  9879.              @Return("")
  9880.          @Endif
  9881.       @EndIf
  9882.    @ElseIf (@Platform == @OS2)
  9883.       @qExtProductINI = @GetExtProductINIPointer(@qExtProductINIPointerApp,@qExtProductINIPointerKey)
  9884.       @If(@StrLen(@qExtProductINI) == 0)
  9885.          @iExtProductInstalled = @False
  9886.          @Return("")
  9887.       @Else
  9888.          @If(!@Exists(@qExtProductINI))
  9889.             @iExtProductInstalled = @False
  9890.             @Return("")
  9891.          @Else
  9892. // Get Installation information from
  9893. // product ini file.
  9894.             @qExtInstallPath1 = @GetOS2ExtProductINIString(@qInstallKey, @lDirectory)
  9895.             @If(!@IsNULL(@qExtInstallPath1))
  9896.                @iExtProductInstalled = @True     
  9897.                @Return(@qExtInstallPath1)
  9898.             @Else
  9899.                @iExtProductInstalled = @False
  9900.                @Return("")
  9901.             @EndIf
  9902.          @EndIf         
  9903.       @EndIf
  9904.    @Else
  9905.       @ErrorExit(@qInvalidOSError, @iAbort)
  9906.    @EndIf
  9907.    @Return()
  9908.  
  9909. @EndFunc
  9910.  
  9911. //----------------------------------------------------
  9912. @DefineFunc @QString @GetRegValue(@In @Integer @iRegKey, @In @QString @qRegString)
  9913.  
  9914.    @If (@WinRegQueryValueEx(@iRegKey, @qRegString, @iRegValueType,
  9915.                             @qTMP1, @iTMP1) != 0)
  9916.       @qTMP1 = ""
  9917.    @EndIf
  9918.  
  9919.    @Return(@qTMP1)
  9920.  
  9921. @EndFunc
  9922.  
  9923.  
  9924. //----------------------------------------------------
  9925. @DefineFunc @Integer @UninstallProduct(@Void)
  9926.  
  9927.    @UninstallExitPre()
  9928.    @If (!@iProductInstalled)
  9929.       @ErrorExit(@qErrorProductNotInstalled , 1)
  9930.    @EndIf
  9931.  
  9932.    @If ((@Platform == @Windows) && (@SubPlatform == @WindowsNT))
  9933.       @If (!@WinIsAdmin() && @StrCmp(@qEnvVarLoc, @qRegSetForAllUsers) == 0)
  9934.          @ErrorExit (@qErrorAdminOnlyUninstall, 1)
  9935.       @EndIf
  9936.    @EndIf
  9937.  
  9938.    @If (!@CIDBypass(@qForceUninstall))
  9939. laUninstallDlg:
  9940.  
  9941.       @iDialogRes = @DialogText(@qUninstallTitle,@qUninstallBitmap,
  9942.                                 @iUninstallBitmapID, @qUninstallText1,
  9943.                                 @qUninstallText2, "", "", "", "",
  9944.                                 @qBack, @qUninstall, @qCancel, "", "")
  9945.  
  9946.  
  9947.       @If (@iDialogRes == 1)
  9948.          @Return(@iBack)
  9949.       @ElseIf (@iDialogRes == 2)
  9950.          //Uninstall button pressed. Fall through to PostProcessing.
  9951.       @ElseIf (@iDialogRes == 3)
  9952.          @ConfirmCancel()
  9953.          @Goto laUninstallDlg
  9954.       @ElseIf (@iDialogRes == 4)
  9955.          @ErrorExit(@qErrorInvalidReturn, @iAbort)
  9956.       @Else
  9957.          @ErrorExit(@qErrorInvalidReturn, @iAbort)
  9958.       @EndIf
  9959.    @EndIf
  9960. laUninstallPostProcessing:
  9961.  
  9962.    @DetermineInstallSysFilename()
  9963.    @SetCustomFeaturesStringFromFile(@qInstallSysFileName, @qCustomFeatures)
  9964.  
  9965.    @LoadBMPMsg(@qWaitMsgBMPFile4)
  9966.  
  9967.    @RemoveDesktopItems()
  9968.    @HandleSharedFiles()
  9969.    @RemoveEnvVars()
  9970.    // Do not need to remove Prodvars - the product reg key/ini file will
  9971.    // be deleted anyway
  9972.    // @RemoveProdVars()
  9973.    @RemoveRegProdInfo()
  9974.    @RemoveRegUninInfo()
  9975.  
  9976.    @EraseBMP(3)
  9977.    @RemoveProductFiles()
  9978.  
  9979.    @UninstallExitPost()
  9980.  
  9981.    @If (!@CIDBypass(@qForceUninstall))
  9982.       @iDialogRes = @DialogText(@qUninstallTitle, @qUninstallBitmap,
  9983.                                 @iUninstallBitmapID,
  9984.                                 "", @qUninstallText3, "", "", "", "",
  9985.                                "", @qFinish, "", "", "")
  9986.    @EndIf
  9987.    @Return(@iNext)
  9988.  
  9989. @EndFunc
  9990.  
  9991.  
  9992. //----------------------------------------------------
  9993. @DefineFunc @Void @RemoveDesktopItems(@Void)
  9994.  
  9995. //   Delete Program Folder.
  9996.  
  9997.    @If (@Platform == @Windows)
  9998.       @ProgramManager("[DeleteGroup(@qFolderName)]")
  9999.    @ElseIf(@Platform == @OS2)
  10000.       @DestroyWPSObject(@qOS2ObjectID)
  10001.    @Else
  10002.       @ErrorExit(@qInvalidOSError, @iAbort)
  10003.    @EndIf
  10004.    @Return()
  10005.  
  10006. @EndFunc
  10007.  
  10008.  
  10009. //----------------------------------------------------
  10010. @DefineFunc @Void @RemoveProductFiles(@Void)
  10011.  
  10012.    //Recursive delete of all directories.
  10013.    @GetInstallPathInfo()
  10014.    @RemoveDirTree(@qProduct1, @qInstallPath1)
  10015.    @RemoveDirTree(@qProduct2, @qInstallPath2)
  10016.    @RemoveDirTree(@qProduct3, @qInstallPath3)
  10017.    @RemoveDirTree(@qProduct4, @qInstallPath4)
  10018.    @RemoveDirTree(@qProduct5, @qInstallPath5)
  10019.    @RemoveDirTree(@qProduct6, @qInstallPath6)
  10020.    @RemoveDirTree(@qProduct7, @qInstallPath7)
  10021.    @RemoveDirTree(@qProduct8, @qInstallPath8)
  10022.    @RemoveDirTree(@qProduct9, @qInstallPath9)
  10023.    @RemoveDirTree(@qProduct10, @qInstallPath10)
  10024.    @Return()
  10025.  
  10026. @EndFunc
  10027.  
  10028.  
  10029. //----------------------------------------------------
  10030. @DefineFunc @Void @GetInstallPathInfo(@Void)
  10031.  
  10032.    @If (!@Exists(@qInstallSysFilename))
  10033.       @ErrorExit("@qErrorInstallSysNotFound@qInstallSysFilename", 1)
  10034.    @EndIf
  10035.    @qInstallPath1 = @GetINI(@lInstallOptions, "@lInstallPath@l1", @qInstallSysFilename)
  10036.    @qInstallPath2 = @GetINI(@lInstallOptions, "@lInstallPath@l2", @qInstallSysFilename)
  10037.    @qInstallPath3 = @GetINI(@lInstallOptions, "@lInstallPath@l3", @qInstallSysFilename)
  10038.    @qInstallPath4 = @GetINI(@lInstallOptions, "@lInstallPath@l4", @qInstallSysFilename)
  10039.    @qInstallPath5 = @GetINI(@lInstallOptions, "@lInstallPath@l5", @qInstallSysFilename)
  10040.    @qInstallPath6 = @GetINI(@lInstallOptions, "@lInstallPath@l6", @qInstallSysFilename)
  10041.    @qInstallPath7 = @GetINI(@lInstallOptions, "@lInstallPath@l7", @qInstallSysFilename)
  10042.    @qInstallPath8 = @GetINI(@lInstallOptions, "@lInstallPath@l8", @qInstallSysFilename)
  10043.    @qInstallPath9 = @GetINI(@lInstallOptions, "@lInstallPath@l9", @qInstallSysFilename)
  10044.    @qInstallPath10 = @GetINI(@lInstallOptions, "@lInstallPath@l10", @qInstallSysFilename)
  10045.  
  10046.    @Return()
  10047.  
  10048. @EndFunc
  10049.  
  10050.  
  10051. //----------------------------------------------------
  10052. @DefineFunc @Void @RemoveDirTree(@In @QString @qOption,
  10053.                                  @In @QString @qInstallPath)
  10054.  
  10055.    @If (!@IsNULL(@qOption) && !@IsNULL(@qInstallPath) && @Exists(@qInstallPath))
  10056.       @If (!@CIDBypass("N"))
  10057.          @iFuncRes = @Ask(@qWarningTitle, @qAskRemoveDirBitmap,
  10058.                        @iAskRemoveDirBitmapID,
  10059.                        "@qRemoveDirText1 @qInstallPath. @qRemoveDirText2@qCRLF@qCRLF@qRemoveDirText3",
  10060.                        "", "")
  10061.          @If (@iFuncRes == 1)
  10062.             @LoadBMPMsg(@qWaitMsgBMPFile5)
  10063.             @DeleteTree(@qInstallPath, 99999, "--DANGER--")
  10064.             @RmDir("@qInstallPath\\install")
  10065.             @RmDir("@qInstallPath")
  10066.             @EraseBMP(3)
  10067.          @ElseIf (@iFuncRes == 2)
  10068.             @Return()
  10069.          @Else
  10070.             @ErrorExit(@qErrorInvalidReturn)
  10071.          @EndIf
  10072.       @Else  //CID default is to delete the tree
  10073.             @LoadBMPMsg(@qWaitMsgBMPFile5)
  10074.             @DeleteTree(@qInstallPath, 99999, "--DANGER--")
  10075.             @RmDir("@qInstallPath\\install")
  10076.             @RmDir("@qInstallPath")
  10077.             @EraseBMP(3)
  10078.       @EndIf
  10079.    @EndIf
  10080.    @Return()
  10081.  
  10082. @EndFunc
  10083.  
  10084.  
  10085. //----------------------------------------------------
  10086. @DefineFunc @Void @HandleSharedFiles(@Void)
  10087.  
  10088.    //Decrement the shared file count for shared files and delete file if 0.
  10089.  
  10090.    //*** ISSUES ***
  10091.    //?? Location of shared files --> winsystem dir for windows? system dir for OS2?
  10092.    //?? Need to get a list of all shared files from Martin, Tony
  10093.    //?? How do we handle for OS2
  10094.    @Return()
  10095.  
  10096. @EndFunc
  10097.  
  10098.  
  10099. //----------------------------------------------------
  10100. @DefineFunc @Void @RemoveEnvVars(@Void)
  10101.  
  10102.    //Remove all Environment variables taking into account env vars set with
  10103.    //method = @qSetEnvReplaceVar (i.e. restore old value).
  10104.  
  10105.    @If (!@Exists(@qInstallSysFilename))
  10106.       @ErrorExit("@qErrorInstallSysNotFound@qInstallSysFilename", 1)
  10107.    @EndIf
  10108.  
  10109.    //Make sure environment section found
  10110.    @If (@CueSection(@qInstallSysFilename, @lEnvironmentVars) != @iEOF)
  10111.  
  10112. laGetEnvVar:
  10113.       @iReturnVal = @GetNextEnvVarsItem(@qInstallSysFilename, @qName, @qValue, @qMethod, @qOldValue, @qItemFeature)
  10114.  
  10115.       @If ((@iReturnVal == @iSuccess) || (@iReturnVal == @iSuccessSectionDone))
  10116.          //Convert oldvalue to an empty string, if it is returned as double quotes.
  10117.          @If(@StrCmp(@qOldValue, @qDoubleQuotes) == 0)
  10118.             @qOldValue = ""
  10119.          @EndIf
  10120.          @If (@IsNull(@qItemFeature) ||
  10121.               (@StrFind(@qCustomFeatures,@qItemFeature) >= 0))
  10122.             @RemoveEnvVarItem(@qName,@qValue,@qMethod,@qOldValue)
  10123.          @EndIf
  10124.       @EndIf
  10125.       @If ((@iReturnVal == @iSuccess) || (@iReturnVal == @iNoItem))
  10126.          @Goto laGetEnvVar
  10127.       @Else   //No more items to process
  10128.       @EndIf
  10129.    @Else         //Environment variables section not found
  10130.    @EndIf
  10131.  
  10132.    @Return()
  10133. @EndFunc
  10134.  
  10135.  
  10136. //----------------------------------------------------------
  10137. @DefineFunc @Void @RemoveEnvVarItem(@In @QString @qName,
  10138.                                     @In @QString @qValue,
  10139.                                     @In @QString @qMethod,
  10140.                                     @In @QString @qOldValue)
  10141.  
  10142.    @qValue = @ReplaceMagicVariable(@qValue)
  10143.    @If (@Platform == @Windows)
  10144.       @If (@SubPlatform == @Windows95)
  10145.          @If(@iMakeAutoexecBatBackup)
  10146.             @qBackupAutoexecBatFile = @CreateBackupFilename("AUTOEXEC.BAT")
  10147.             @qBackupAutoexecBatFile = "@BootDrive:\\@qBackupAutoexecBatFile"
  10148.             @Copy(@qAutoexecBatFile, @qBackupAutoexecBatFile)
  10149.             @iMakeAutoexecBatBackup = @False
  10150.          @EndIf
  10151.          @RemoveWin95EnvVars(@qName, @qValue, @qMethod, @qOldValue)
  10152.       @ElseIf (@SubPlatform == @WindowsNT)
  10153.          @RemoveWinNTEnvVars(@qName, @qValue, @qMethod, @qOldValue)
  10154.       @Else
  10155.          @ErrorExit(@qInvalidOSError, @iAbort)
  10156.       @EndIf
  10157.    @ElseIf (@Platform == @OS2)
  10158.       @If(@iMakeConfigSysBackup)
  10159.          @qBackupConfigSysFile = @CreateBackupFilename("CONFIG.SYS")
  10160.          @qBackupConfigSysFile = "@BootDrive:\\@qBackupConfigSysFile"
  10161.          @Copy(@qConfigSysFile, @qBackupConfigSysFile)
  10162.          @iMakeConfigSysBackup = @False
  10163.       @EndIf
  10164.       @RemoveOS2EnvVars(@qName, @qValue, @qMethod, @qOldValue)
  10165.    @Else
  10166.       @ErrorExit(@qInvalidOSError, @iAbort)
  10167.    @EndIf
  10168.  
  10169.    @Return()
  10170.  
  10171. @EndFunc
  10172.  
  10173.  
  10174. //----------------------------------------------------------
  10175. @DefineFunc @Void @RemoveWin95EnvVars(@In @QString @qName, @In @QString @qValue,
  10176.                                      @In @QString @qMethod, @In @QString @qOldValue)
  10177.  
  10178.    @ShowAll("@@RemoveWin95EnvVars()", "In the works.")
  10179.    @qTMP1 = @QueryVar(@qAutoexecBatFile, @qName)
  10180.    @If(@StrCmp(@qMethod, @qSetEnvReplaceVar) == 0)
  10181.       @qTMP1 = @qOldValue
  10182.    @Else
  10183.       @DeleteVar(@qTMP1, @qValue)
  10184.    @EndIF
  10185.    @WriteVar(@qAutoexecBatFile, @qName, @qTMP1)
  10186.    @Return()
  10187. @EndFunc
  10188.  
  10189.  
  10190. //----------------------------------------------------------
  10191. @DefineFunc @Void @RemoveWinNTEnvVars(@In @QString @qName, @In @QString @qValue,
  10192.                                       @In @QString @qMethod, @In @QString @qOldValue)
  10193.  
  10194.    @qTMP3 = ""
  10195.    @qTMP4 = ""
  10196.  
  10197.    @If(@StrCmp(@qEnvVarLoc, @qRegSetForAllUsers) == 0)
  10198.       @iSetEnvForAllUsers = @True
  10199.    @Else
  10200.       @iSetEnvForAllUsers = @False
  10201.    @EndIf
  10202.  
  10203.    @If (@iSetEnvForAllUsers)
  10204.       @iEnvVarKeyHandle = @HKeyLocalMachine
  10205.       @qTMP1 = "System\\CurrentControlSet\\Control\\Session Manager\\Environment"
  10206.    @Else
  10207.       @iEnvVarKeyHandle = @HKeyCurrentUser
  10208.       @qTMP1 = "Environment"
  10209.    @EndIf
  10210.  
  10211.    @If (@WinRegOpenKeyEx(@iEnvVarKeyHandle, @qTMP1, @iRegKeyAllAccess,
  10212.                          @iKeyHandle) != 0)
  10213.       @ErrorExit(@qRegOpenEnvVarKeyError, 1)
  10214.    @EndIf
  10215.  
  10216.    @If (@WinRegQueryValueEx(@iKeyHandle, @qName, @iRegValueType,
  10217.                             @qEnvVarSetting, @iTMP1) != 0)
  10218.         //Env var not set.
  10219.    @Else
  10220.       @If (@StrCmp(@qMethod, @qSetEnvReplaceVar) == 0)
  10221.          @If (@WinRegSetValueEx(@iKeyHandle, @qName, @iRegValueType,
  10222.                                 @qOldValue, @StrLen(@qOldValue) + 1) != 0)
  10223.             @ErrorExit(@qRegSetValueError, 1)
  10224.          @EndIf
  10225.       @Else
  10226.          @DeleteVar(@qEnvVarSetting, @qValue)
  10227.  
  10228.             @If (@WinRegSetValueEx(@iKeyHandle, @qName, @iRegValueType,
  10229.                                 @qEnvVarSetting, @StrLen(@qEnvVarSetting) + 1) != 0)
  10230.                @ErrorExit("@qRegSetValueError Name:@qName, Value:@qValue", 2)
  10231.             @EndIf
  10232.       @EndIf
  10233.       @If (@WinRegQueryValueEx(@iKeyHandle, @qName, @iRegValueType,
  10234.                                @qEnvVarSetting, @iTMP1) != 0)
  10235.          @ErrorExit("@qRegQueryValueError @qName.", 2)
  10236.       @Else
  10237.          @If (@StrCmp(@qEnvVarSetting, "") == 0)
  10238.             @WinRegDeleteValue(@iKeyHandle, @qName)
  10239.          @EndIf
  10240.       @EndIf
  10241.    @EndIf
  10242.  
  10243.    @If (@WinRegFlushKey(@iKeyHandle) != 0)
  10244.       @MsgBox(@qRegWriteEnvVarsKeyError)
  10245.    @EndIf
  10246.    @If (@WinRegCloseKey(@iKeyHandle) != 0)
  10247.       @MsgBox(@qRegCloseEnvVarsKeyError)
  10248.    @EndIf
  10249.  
  10250.    @Return()
  10251. @EndFunc
  10252.  
  10253.  
  10254. //----------------------------------------------------------
  10255. @DefineFunc @Void @RemoveOS2EnvVars(@In @QString @qName, @In @QString @qValue,
  10256.                                     @In @QString @qMethod, @In @QString @qOldValue)
  10257.  
  10258.    @ShowAll("@@RemoveOS2EnvVars()", "In the works.")
  10259.    @qTMP1 = @QueryVar(@qConfigSysFile, @qName)
  10260.    @If(@StrCmp(@qMethod, @qSetEnvReplaceVar) == 0)
  10261.       @qTMP1 = @qOldValue
  10262.    @Else
  10263.       @DeleteVar(@qTMP1, @qValue)
  10264.    @EndIf
  10265.    @WriteVar(@qConfigSysFile, @qName, @qTMP1)
  10266.    @Return()
  10267.  
  10268. @EndFunc
  10269.  
  10270.  
  10271. //----------------------------------------------------
  10272. @DefineFunc @Void @RemoveRegProdInfo(@Void)
  10273.  
  10274.    @If(@Platform == @Windows)
  10275.       //Remove all keys under "SOFTWARE\IBM\<Productname>\<ProductVersion>"
  10276.       @qTMP1= "SOFTWARE\\@qCompanyName\\@qProductName\\@qProductVersion"
  10277.       @If (@WinRegOpenKeyEx(@HKeyLocalMachine, @qTMP1, @iRegKeyAllAccess,
  10278.                             @iKeyHandle) != 0)
  10279.          @ErrorExit(@qRegOpenProdKeyError, 1)
  10280.       @EndIf
  10281. loop1:
  10282.       @If (@WinRegEnumKeyEx(@iKeyHandle, 0, @qSubKeyName, @iTMP1,
  10283.                             @qTMP3, @iTMP2, @iTMP3) == 0)
  10284.          @If (@WinRegDeleteKey(@iKeyHandle, @qSubKeyName) != 0)
  10285.             @ErrorExit("@qRegDeleteProdSubKeyError SubKey: @qSubKeyName", 1)
  10286.          @EndIf
  10287.          @Goto loop1
  10288.       @EndIf
  10289.  
  10290.       //Remove Product info key ("SOFTWARE\IBM\<Productname>\<ProductVersion>").
  10291.       @qTMP1 = "SOFTWARE\\@qCompanyName\\@qProductName\\@qProductVersion"
  10292.       @If (@WinRegDeleteKey(@HKeyLocalMachine, @qTMP1) != 0)
  10293.          @ErrorExit(@qRegDeleteProdVersionError, 1)
  10294.       @EndIf
  10295.  
  10296.       @qTMP2= "SOFTWARE\\@qCompanyName\\@qProductName"
  10297.       @iIndex = 0
  10298.       @If (@WinRegOpenKeyEx(@HKeyLocalMachine, @qTMP2, @iRegKeyAllAccess,
  10299.                             @iKeyHandle) != 0)
  10300.          @ErrorExit(@qRegOpenProdKeyError, 1)
  10301.       @EndIf
  10302. loop2:
  10303.       @If (@WinRegEnumKeyEx(@iKeyHandle, @iIndex, @qSubKeyName, @iTMP1,
  10304.                             @qTMP3, @iTMP2, @iTMP3) == 0)
  10305.          @iIndex = @Eval(@iIndex + 1)
  10306.          @Goto loop2
  10307.       @EndIf
  10308.  
  10309.       @If (@iIndex == 0)
  10310.          @If (@WinRegDeleteKey(@HKeyLocalMachine, @qTMP2) != 0)
  10311.             @ErrorExit(@qRegDeleteProdKeyError, 1)
  10312.          @EndIf
  10313.  
  10314.          @qTMP4= "SOFTWARE\\@qCompanyName"
  10315.          @iIndex = 0
  10316.          @If (@WinRegOpenKeyEx(@HKeyLocalMachine, @qTMP4, @iRegKeyAllAccess,
  10317.                                @iKeyHandle) != 0)
  10318.             @ErrorExit(@qRegOpenCompanyKeyError, 1)
  10319.          @EndIf
  10320. loop3:
  10321.          @If (@WinRegEnumKeyEx(@iKeyHandle, @iIndex, @qSubKeyName, @iTMP1,
  10322.                          @qTMP3, @iTMP2, @iTMP3) == 0)
  10323.             @iIndex = @Eval(@iIndex + 1)
  10324.             @Goto loop3
  10325.          @EndIf
  10326.  
  10327.          @If (@iIndex == 0)
  10328.             @If (@WinRegDeleteKey(@HKeyLocalMachine, @qTMP4) != 0)
  10329.                @ErrorExit(@qRegDeleteCompanyKeyError, 1)
  10330.             @EndIf
  10331.          @EndIf
  10332.       @EndIf
  10333.  
  10334.    @ElseIf(@Platform == @OS2)
  10335. //      @SetRegProdValue(@lDirectory, "\"\"")
  10336. //      @SetRegProdValue(@lFolder, "\"\"")
  10337. //     @SetRegProdValue(@lLanguage, "\"\"")
  10338. //      @SetRegProdValue(@lFixPak, "\"\"")
  10339.       @FileAttr("@qProductINI","r-")
  10340.       @Delete(@qProductINI)
  10341.       @DeleteProductINIPointer()
  10342.    @EndIf
  10343.  
  10344.    @Return()
  10345.  
  10346. @EndFunc
  10347.  
  10348.  
  10349. //----------------------------------------------------
  10350. @DefineFunc @Void @RemoveRegUninInfo(@Void)
  10351.  
  10352.    @If(@Platform == @Windows)
  10353.       //Remove Uninstall key.
  10354.       @qTMP1 = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\@qProductName"
  10355.       @If (@WinRegDeleteKey(@HKeyLocalMachine, @qTMP1) != 0)
  10356.          @ErrorExit(@qRegDeleteUninKeyError, 1)
  10357.       @EndIf
  10358.    @EndIf
  10359.  
  10360.    @Return()
  10361.  
  10362. @EndFunc
  10363.  
  10364.  
  10365. //----------------------------------------------------------
  10366. @DefineFunc @Void @DestroyWPSObject(@In @QString @ObjectID)
  10367.    @If(!@IsNull(@ObjectID))
  10368.       @Write("@qTempPath\\@qREXXScriptFile", "wt", "/* REXX CMD Script */\n\n")
  10369.       @Write(,,"CALL RxFuncAdd 'SysLoadFuncs', 'REXXUtil', 'SysLoadFuncs'\n")
  10370.       @Write(,,"CALL SysLoadFuncs\n\n")
  10371.       @Write(,,"name = '<@ObjectID>")
  10372.       @Write(,,"'\n")
  10373.       @Write(,,"return = SysDestroyObject(name)\n\n")
  10374.       @Write(,, "EXIT\n")
  10375.       @OS2Exec("@qTempPath\\@qREXXScriptFile","","",1,3,"Deleting @ObjectID","",0,0,0,0,-1,0)
  10376.    @Else
  10377.       @ShowAll("@@DestroyWPSObject", "Need to specify Object ID")
  10378.    @EndIf
  10379.  
  10380.    @Return()
  10381. @EndFunc
  10382.  
  10383. //------------------------------------------------------
  10384. @DefineFunc @Void @RemoveProdVars(@Void)
  10385.  
  10386.    //Remove all Product variables taking into account prod vars set with
  10387.    //method = @qSetProdReplaceVar (i.e. restore old value).
  10388.  
  10389.    @If (!@Exists(@qInstallSysFilename))
  10390.       @ErrorExit("@qErrorInstallSysNotFound@qInstallSysFilename", 1)
  10391.    @EndIf
  10392.  
  10393.    //Make sure environment section found
  10394.    @If (@CueSection(@qInstallSysFilename, @lProductVars) != @iEOF)
  10395.  
  10396. DoProdVarsTop:
  10397.       @iReturnVal = @GetNextProdVarsItem(@qInstallSysFilename, @qName, @qValue,
  10398.                     @qDataType, @qComponent, @qMethod, @qItemFeature)
  10399.  
  10400.       @If ((@iReturnVal == @iSuccess) || (@iReturnVal == @iSuccessSectionDone))
  10401.  
  10402.          @If (@IsNull(@qItemFeature) ||
  10403.               (@StrFind(@qCustomFeatures,@qItemFeature) >= 0))
  10404.             @RemoveProdVarItem(@qName,@qValue, @qDataType,
  10405.                                     @qComponent,@qMethod)
  10406.          @EndIf
  10407.       @EndIf
  10408.  
  10409.       @If ((@iReturnVal == @iSuccess) || (@iReturnVal == @iNoItem))
  10410.          @Goto DoProdVarsTop
  10411.       @Else      //Section done
  10412.       @EndIf
  10413.    @Else         //Product variables section not found
  10414.    @EndIf
  10415.  
  10416.    @Return()
  10417. @EndFunc
  10418.  
  10419.  
  10420. //--------------------------------------------------
  10421.  
  10422. @DefineFunc @Void @RemoveProdVarItem(@In @QString @qName,
  10423.             @In @QString @qValue, @In @QString @qDataType,
  10424.             @In @QString @qComponent, @In @QString @qMethod)
  10425.  
  10426.    @If (@Platform == @OS2)
  10427.       @ShowAll("RemoveProdVarItem","Need to remove os2 prodvars")
  10428.  
  10429.       // Only handle strings - set to doublequotes
  10430.       @SetOS2ProductINIString(@qComponent, @qName, "\"\"")
  10431.    @EndIf
  10432.    @Return()
  10433. @EndFunc
  10434.  
  10435.  
  10436. //
  10437. //
  10438. //
  10439. //File: IO ///////////////////////////////
  10440. //
  10441. //CIDVars: NONE
  10442. //
  10443. //Globals changed: 
  10444. //   iDefaultsFilePos   (Readinfo)
  10445. //   iInstallSysfilepos (Readinfo)
  10446. //
  10447.  
  10448. @DefineProto
  10449.    @Integer @ReadInfo(@In @QString @Filename, @Out @QString @Outstr,
  10450.             @In @Integer @OverwritePos, @In @Integer @Newpos)
  10451.    @Integer @ReadConditional(@In @QString @filename, 
  10452.             @Out @QString @Outstr, @In @Integer @FilePos)
  10453.  
  10454. @EndProto
  10455.  
  10456.  
  10457. // ReadInfo() is a wrapper for wrapper for ReadConditional.
  10458. // It maintains a read position for the files which are called with it.
  10459. // The position can be overwritten by calling Readinfo with parameter
  10460. // OverwritePos set to True, and Newpos set to a value.
  10461. // It currently works 2 files: 
  10462. //    @qDefaultsFilename
  10463. //    @qInstallSysFilename
  10464. // More files can be added by modifying the function.
  10465. // Return values are the same as from ReadFile: the file position,
  10466. //    and -1 for EOF or an error
  10467. //
  10468. @DefineFunc @Integer @ReadInfo(@In @QString @Filename, @Out @QString @Outstr,
  10469.             @In @Integer @OverwritePos, @In @Integer @NewPos)
  10470.  
  10471.    @If (@StrCmp(@StrUpr(@Filename), @StrUpr(@qDefaultsFilename)) == 0)
  10472.       @If (@OverwritePos == @TRUE)
  10473.          @iDefaultsFilepos = @NewPos
  10474.       @EndIf
  10475.       @iDefaultsFilepos = @ReadConditional(@qDefaultsFilename, @Outstr, 
  10476.                                     @iDefaultsFilepos)
  10477.       @Return(@iDefaultsFilepos)
  10478.    @ElseIf (@StrCmp(@StrUpr(@Filename), @StrUpr(@qInstallSysFilename)) == 0)
  10479.       @If (@OverwritePos == @TRUE)
  10480.          @iInstallSysFilepos = @NewPos
  10481.       @EndIf
  10482.       @iInstallSysFilepos = @ReadConditional(@qInstallSysFilename, @Outstr, 
  10483.                                     @iInstallSysFilepos)
  10484.       @Return(@iInstallSysFilepos)
  10485.    @Else
  10486.       @ErrorExit(@qReadInfoErrorBadFilename,@iAbort)
  10487.    @EndIf
  10488.       @Return(0)
  10489. @EndFunc
  10490.  
  10491.  
  10492. // ReadConditional() is a wrapper for ReadFile.
  10493. // It reads a text file line by line and handles the conditional 
  10494. // statements #ifwin, #ifos2, and #endif
  10495. // If it is on the wrong platform for the conditional (windows for
  10496. // and #ifos2), it keeps reading until the line after the next endif.
  10497. // If it is on the correct platform for the conditional, it sets a 
  10498. // flag iCondlReadMode, so that the next time an #endif is found
  10499. // it is ignored.
  10500. // All conditional markers are converted to uppercase before comparison
  10501. // so they should not be case sensitive.
  10502. // Return values are the same as for ReadFile: the file position
  10503. //   or -1 for an error or EOF.
  10504. /////////////////////////////////////////////////////////////
  10505.  
  10506. @DefineFunc @Integer @ReadConditional(@In @QString @filename, 
  10507.             @Out @QString @Outstr, @In @Integer @FilePos)
  10508.  
  10509.    @iTMP1 = @FilePos
  10510. laReadConditionalTop:
  10511.    @iTMP1 = @ReadLine(@filename, @qTMP1,,@iTMP1)
  10512.    @qTMP2 = "@qTMP1"
  10513.    @StripBlanks(@qTMP1)
  10514.  
  10515.    @If (@iCondlReadMode)
  10516.       @If (@StrCmpNos(@qTMP1, @lEndif) == 0)
  10517.          @iCondlReadMode = @False
  10518.          @iTMP1 = @ReadLine(@filename,@qTMP2,,@iTMP1)
  10519.       @ElseIf (((@StrCmpNos(@qTMP1, @lIfOS2) == 0) ||
  10520.                 (@StrCmpNos(@qTMP1, @lIfWin) == 0)) &&
  10521.                 (@iTMP1 != -1))
  10522.          @ErrorExit("@qErrorReadConditionalCondlNotExpected",@iAbort)
  10523.       @ElseIf (@iCondlReadMode != @Platform)
  10524.          @Goto laReadConditionalTop
  10525.       @EndIf
  10526.  
  10527.    //Check for the start of a conditional OS2 section
  10528.    @ElseIf ((@StrCmpNos(@qTMP1, @lIfOS2) == 0) && 
  10529.             (@iTMP1 != -1))
  10530.       @iCondlReadMode = @OS2
  10531.       @If (@Platform != @iCondlReadMode)
  10532.          @Goto laReadConditionalTop
  10533.       @Else
  10534.          @iTMP1 = @ReadLine(@filename, @qTMP2,,@iTMP1)
  10535.       @EndIf
  10536.  
  10537.    //Check for the start of a conditional Windows section
  10538.    @ElseIf ((@StrCmpNos(@qTMP1,@lIfWin) == 0) && 
  10539.             (@iTMP1 != -1))
  10540.       @iCondlReadMode = @Windows
  10541.       @If (@Platform != @iCondlReadMode)
  10542.          @Goto laReadConditionalTop
  10543.       @Else
  10544.          @iTMP1 = @ReadLine(@filename, @qTMP2,,@iTMP1)
  10545.       @EndIf
  10546.  
  10547.    //Check for the end of a conditional section
  10548.    @ElseIf (@StrCmpNos(@qTMP1, @lEndif) == 0)
  10549.       // Error - no #If found
  10550.       @If (!@iCondlReadMode)
  10551.          @ErrorExit("@qErrorReadConditionalEndCondlNotExpected",@iAbort)
  10552.       @Else  //this code should not be reached
  10553.          @iCondlReadMode = @False
  10554.       @EndIf
  10555.    @EndIf
  10556.  
  10557.    @Outstr = @qTMP2
  10558.    
  10559.    @Return(@iTMP1)
  10560. @EndFunc
  10561. //
  10562. //
  10563. //
  10564. //File: Actions /////////////////////////////////////
  10565. //
  10566. //CIDVars: TBD
  10567. //
  10568. //Globals changed: none
  10569. //
  10570. @DefineProto
  10571.    @Integer @DetermineInstallDirectory(@Void)
  10572.    @Void @EventHandler @DetInstDirRBHandler(@In @Int @OldSelected,
  10573.                                             @In @Int @NewSelected,
  10574.                                             @In @Int @RangeStart,
  10575.                                             @In @Int @RangeEnd)
  10576.    @Void @DetInstDirSetHelpText(@Void)
  10577.    @Integer @GetProductDir(@Void)
  10578.    @Void @DoInstallActions(@Void)
  10579.    @Void @EventHandler @InstallActionsRBHandler(@In @Int @OldSelected,
  10580.                                                   @In @Int @NewSelected,
  10581.                                                   @In @Int @RangeStart,
  10582.                                                   @In @Int @RangeEnd)
  10583.    @Void @InstallActionsSetHelpText(@Void)
  10584.  
  10585. @EndProto
  10586. //
  10587. //
  10588. //----------------------------------------------------------
  10589. @DefineFunc @Integer @DetermineInstallDirectory(@Void)
  10590.  
  10591.    @DetermineInstallSysFilename()
  10592.  
  10593.    @If (!@iProductInstalled || @IsNULL(@qInstallPath1) || !@Exists(@qInstallSysFileName))
  10594.  
  10595.       @If (!@CIDBypass(@qForceDetInstDir))
  10596.          @DetInstDirSetHelpText()
  10597.  
  10598. laDetInstDirDlg:
  10599.  
  10600.          @MapEventToFunc(@DlgRBEvent, @DetInstDirRBHandler)
  10601.          @EnableEventMap(@DlgRBEvent)
  10602.  
  10603.          @iDialogRes = @DialogRadio(@qDetInstDirTitle, @qDetInstDirBitmap,
  10604.                                     @iDetInstDirBitmapID, @qDetInstDirText1,
  10605.                                     @qDetInstDirText2, @qDetInstDirHelpText,
  10606.                                     @qEnterInstDirRBText, @qRemoveProdRBText,
  10607.                                     "", "", "", "", "", @qNext,
  10608.                                     @qCancel, "", "", @iDetInstDirRBSelected)
  10609.  
  10610.          @DisableEventMap(@DlgRBEvent)
  10611.  
  10612.          @If (@iDialogRes == 1)
  10613.             @MsgBox(@qErrorInvalidReturn)
  10614.             @Goto laDetInstDirDlg
  10615.          @ElseIf (@iDialogRes == 2)
  10616.             //Next pushbutton pressed. Fall through to postprocessing.
  10617.          @ElseIf (@iDialogRes == 3)
  10618.             @ConfirmCancel()
  10619.             @Goto laDetInstDirDlg
  10620.          @Else
  10621.             @MsgBox(@qErrorInvalidReturn)
  10622.             @Goto laDetInstDirDlg
  10623.          @EndIf
  10624.       @Else
  10625.          @ErrorExit("@qErrorInstallSysNotFound@qInstallSysFilename", 1)
  10626.       @EndIf
  10627.  
  10628. laDetInstDirPostProcessing:
  10629.  
  10630.       @If (@iDetInstDirRBSelected == 1)
  10631.          @iFuncRes = @GetProductDir()
  10632.          @If (@iFuncRes == @iBack)
  10633.             @Goto laDetInstDirDlg
  10634.          @ElseIf (@iFuncRes != @iNext)
  10635.             @MsgBox("@qErrorInvalidReturn GetProductDir")
  10636.             @Goto laDetInstDirPostProcessing
  10637.          @Endif
  10638.       @ElseIf(@iDetInstDirRBSelected == 2)
  10639.          @RemoveDesktopItems()
  10640.          @RemoveRegProdInfo()
  10641.          @RemoveRegUninInfo()
  10642.          @If (!@CIDBypass(@qForceDetInstDir))
  10643.             @iDialogRes = @DialogText(@qProdInfoRemovedTitle,
  10644.                                       @qProdInfoRemovedBitmap,
  10645.                                       @iProdInfoRemovedBitmapID,
  10646.                                       "", @qProdInfoRemovedText, "", "",
  10647.                                       "", "", "", @qFinish, "", "", "")
  10648.          @EndIf
  10649.          @Exit
  10650.       @Else
  10651.          @ErrorExit(@qErrorInvalidReturn, @iAbort)
  10652.       @EndIf
  10653.    @EndIf
  10654.  
  10655.    @Return(@iNext)
  10656.  
  10657. @EndFunc
  10658.  
  10659. //----------------------------------------------------------
  10660. @DefineFunc @Void @EventHandler @DetInstDirRBHandler(@In @Int @OldSelected,
  10661.                                                      @In @Int @NewSelected,
  10662.                                                      @In @Int @RangeStart,
  10663.                                                      @In @Int @RangeEnd)
  10664.   @If (@NewSelected == 1410)
  10665.      @iDetInstDirRBSelected = 1
  10666.   @ElseIf(@NewSelected == 1420)
  10667.      @iDetInstDirRBSelected = 2
  10668.   @Else
  10669.      @ErrorExit(@qErrorInvalidReturn, @iAbort)
  10670.   @EndIf
  10671.   @DetInstDirSetHelpText()
  10672.   @StaticText(510, "@qDetInstDirText2 \n\n @qDetInstDirHelpText")
  10673.   @Return()
  10674. @EndFunc
  10675.  
  10676.  
  10677. //----------------------------------------------------------
  10678. @DefineFunc @Void @DetInstDirSetHelpText(@Void)
  10679.  
  10680.   @If (@iDetInstDirRBSelected == 1)
  10681.      @qDetInstDirHelpText = @qDetInstDirHelp1
  10682.   @ElseIf (@iDetInstDirRBSelected == 2)
  10683.      @qDetInstDirHelpText = @qDetInstDirHelp2
  10684.   @Else
  10685.      @ErrorExit(@qErrorInvalidReturn, @iAbort)
  10686.   @EndIf
  10687.  
  10688.   @Return()
  10689.  
  10690. @EndFunc
  10691.  
  10692.  
  10693. //----------------------------------------------------------
  10694. @DefineFunc @Integer @GetProductDir(@Void)
  10695.  
  10696.    @If (!@CIDBypass(@qForceDetInstDir))
  10697.  
  10698.       @qInstallPath1 = ""
  10699.       @qInstallPath2 = ""
  10700.       @qInstallPath3 = ""
  10701.       @qInstallPath4 = ""
  10702.       @qInstallPath5 = ""
  10703.       @qInstallPath6 = ""
  10704.       @qInstallPath7 = ""
  10705.       @qInstallPath8 = ""
  10706.       @qInstallPath9 = ""
  10707.       @qInstallPath10 = ""
  10708.  
  10709. laGetProductDirDlg:
  10710.  
  10711.       @iDialogRes = @DialogEdit(@qGetProductDirTitle, @qGetProductDirBitmap,
  10712.                                  @iGetProductDirBitmapID, @qGetProductDirText1,
  10713.                                  @qProduct1,
  10714.                                  "", "", "", "", "", "", "", "", "", "",
  10715.                                  @qBack, @qNext, @qCancel, "", "",
  10716.                                  @qInstallPath1, @qInstallPath2,
  10717.                                  @qInstallPath3, @qInstallPath4,
  10718.                                  @qInstallPath5, @qInstallPath6,
  10719.                                  @qInstallPath7, @qInstallPath8,
  10720.                                  @qInstallPath9, @qInstallPath10, "")
  10721.  
  10722.  
  10723.       @If (@iDialogRes == 1)
  10724.          @iDialogRes = @iBack
  10725.       @ElseIf (@iDialogRes == 2)
  10726.          @iDialogRes = @iNext
  10727.       @ElseIf (@iDialogRes == 3)
  10728.           @ConfirmCancel()
  10729.           @Goto laGetProductDirDlg
  10730.       @ElseIf (@iDialogRes == 4)
  10731.          @ErrorExit(@qErrorInvalidReturn, @iAbort)
  10732.       @Else
  10733.          @ErrorExit(@qErrorInvalidReturn, @iAbort)
  10734.       @EndIf
  10735.  
  10736. laGetProductDirPostProcessing:
  10737.       @If(@iDialogRes == @iNext)
  10738.          @iCheckPathResult = @iGetInstDirPathOK
  10739.  
  10740.          @CheckPath(@qInstallPath1, @iCheckPathResult)
  10741.  
  10742.          @If(@iCheckPathResult == @iGetInstDirPathOK)
  10743.             //Do nothing
  10744.          @ElseIf(@iCheckPathResult == @iGetInstDirBadPath)
  10745.             @MsgBox("@qInvalidPath@qGetInstDirError1")
  10746.             @Goto laGetProductDirDlg
  10747.          @ElseIf(@iCheckPathResult == @iGetInstDirBadDrive)
  10748.             @MsgBox("@dInvalidDrive@qGetInstDirError2")
  10749.             @Goto laGetProductDirDlg
  10750.          @ElseIf(@iCheckPathResult == @iGetInstDirNoRoot)
  10751.             @MsgBox("@dInvalidDrive@qGetInstDirError3")
  10752.             @Goto laGetProductDirDlg
  10753.          @ElseIf(@iCheckPathResult == @iGetInstDirInvalidCharacterInPath)
  10754.             @MsgBox("@qInvalidPath@qGetInstDirError4")
  10755.             @Goto laGetProductDirDlg
  10756.          @ElseIf(@iCheckPathResult == @iGetInstDirDriveNotHPFS)
  10757.             @MsgBox("@dInvalidDrive@qGetInstDirError5")
  10758.             @Goto laGetProductDirDlg
  10759.          @ElseIf(@iCheckPathResult == @iGetInstDirLongPath)
  10760.             @MsgBox("@qInvalidPath@qGetInstDirError6")
  10761.             @Goto laGetProductDirDlg
  10762.          @Else
  10763.             @ErrorExit(@qCheckPathResultError, @iAbort)
  10764.          @EndIf
  10765.  
  10766.          //Make sure that the file install.sys exists in the entered directory.
  10767.          @qInstallSysFileName = ""
  10768.          @DetermineInstallSysFilename()
  10769.          @If (!@Exists(@qInstallSysFileName))
  10770.             @MsgBox("@qErrorInstallSysNotFound@qInstallSysFilename@qCRLF@qCRLF@qErrorInstallSysMustRemove")
  10771.             @Goto laGetProductDirDlg
  10772.          @Else
  10773.             @iProductInstalled = @True
  10774.             @RebuildOnlyMode =   @True
  10775.          @EndIf
  10776.       @EndIf
  10777.    @EndIf
  10778.    @Return (@iDialogRes)
  10779. @EndFunc
  10780.  
  10781.  
  10782. //----------------------------------------------------------
  10783. @DefineFunc @Void @DoInstallActions(@Void)
  10784.  
  10785. laInstallActionsDlg:
  10786.    @If (@RebuildMode)
  10787.       @iInstallActionRBSelected = 4
  10788.    @ElseIf (@UninstallMode)
  10789.       @iInstallActionRBSelected = 5
  10790.    @ElseIf (@AddMode)
  10791.       @iInstallActionRBSelected = 2
  10792.    @Else
  10793.       @iInstallActionRBSelected = 3
  10794.    @EndIf
  10795.  
  10796.    @If (!@CIDBypass(@qForceInstallActions))
  10797.       // If rebuild only, then don't display the other radio buttons
  10798.       @If (@RebuildOnlyMode)
  10799.          @qAddRBText = ""
  10800.          @qDeleteRBText = ""
  10801.          @qUpdateRBText = ""
  10802.          @qUninstallRBText = ""
  10803.          @iInstallActionRBSelected = 4
  10804.       @EndIf
  10805.  
  10806.       @InstallActionsSetHelpText()
  10807.  
  10808.       //Disable the actions but uninstall if this is run from the local version
  10809.       @If (!@Exists(@UninstallRedFile))
  10810.          @iInstallActionRBSelected = 5
  10811.          @DialogRadioDisableRB(1,1,1,1,0,1)
  10812.          @InstallActionsSetHelpText()
  10813.       @ElseIf (@iJavaInstall)
  10814.          @DialogRadioDisableRB(0,0,1,0,0,0)
  10815.          @iInstallActionRBSelected = 4
  10816.          @InstallActionsSetHelpText()
  10817.       @EndIf
  10818.  
  10819.  
  10820.       @MapEventToFunc(@DlgRBEvent, @InstallActionsRBHandler)
  10821.       @EnableEventMap(@DlgRBEvent)
  10822.  
  10823.       @iDialogRes = @DialogRadio(@qInstallActionsTitle, @qInstallActionsBitmap,
  10824.                                  @iInstallActionsBitmapID, @qInstallActionsText1,
  10825.                                  @qInstallActionsText2, @qInstallActionHelpText,
  10826.                                  @qDeleteRBText, @qAddRBText, @qUpdateRBText,
  10827.                                  @qRebuildRBText, @qUninstallRBText, "",
  10828.                                  "", @qNext, @qCancel, "", "",
  10829.                                  @iInstallActionRBSelected)
  10830.  
  10831.       @DisableEventMap(@DlgRBEvent)
  10832.  
  10833.       //Reenable the RBs
  10834.       @DialogRadioDisableRB(0,0,0,0,0,0)
  10835.  
  10836.       @If (@iDialogRes == 1)
  10837.          @MsgBox(@qErrorInvalidReturn)
  10838.          @Goto laInstallActionsDlg
  10839.       @ElseIf (@iDialogRes == 2)
  10840.          //Next pushbutton pressed. Fall through to postprocessing.
  10841.       @ElseIf (@iDialogRes == 3)
  10842.          @ConfirmCancel()
  10843.          @Goto laInstallActionsDlg
  10844.       @Else
  10845.          @MsgBox(@qErrorInvalidReturn)
  10846.          @Goto laInstallActionsDlg
  10847.       @EndIf
  10848.    @EndIf
  10849.  
  10850. laInstallActionsPostProcessing:
  10851.  
  10852.    @If(@iInstallActionRBSelected == 1)
  10853.       @AddMode = @False
  10854.       @DeleteMode = @True
  10855.       @UpdateMode = @False
  10856.       @RebuildMode = @False
  10857.       @UninstallMode = @False
  10858.       @IfNewerMode = @False
  10859.    @ElseIf (@iInstallActionRBSelected == 2)
  10860.       @AddMode = @True
  10861.       @DeleteMode = @False
  10862.       @UpdateMode = @False
  10863.       @RebuildMode = @False
  10864.       @UninstallMode = @False
  10865.       @IfNewerMode = @False
  10866.    @ElseIf(@iInstallActionRBSelected == 3)
  10867.       @AddMode = @False
  10868.       @DeleteMode = @False
  10869.       @UpdateMode = @True
  10870.       @RebuildMode = @False
  10871.       @UninstallMode = @False
  10872.       @IfNewerMode = @True
  10873.    @ElseIf(@iInstallActionRBSelected == 4)
  10874.       @AddMode = @False
  10875.       @DeleteMode = @False
  10876.       @UpdateMode = @False
  10877.       @RebuildMode = @True
  10878.       @UninstallMode = @False
  10879.       @IfNewerMode = @False
  10880.    @ElseIf(@iInstallActionRBSelected == 5)
  10881.       @AddMode = @False
  10882.       @DeleteMode = @False
  10883.       @UpdateMode = @False
  10884.       @RebuildMode = @False
  10885.       @UninstallMode = @True
  10886.       @IfNewerMode = @False
  10887.    @Else
  10888.       @ErrorExit(@qErrorInvalidReturn, @iAbort)
  10889.    @EndIf
  10890.    @Return()
  10891.  
  10892. @EndFunc
  10893.  
  10894.  
  10895. //----------------------------------------------------------
  10896. @DefineFunc @Void @EventHandler @InstallActionsRBHandler(@In @Int @OldSelected,
  10897.                                                          @In @Int @NewSelected,
  10898.                                                          @In @Int @RangeStart,
  10899.                                                          @In @Int @RangeEnd)
  10900.   @If (@NewSelected == 1410)
  10901.      @iInstallActionRBSelected = 1
  10902.   @ElseIf(@NewSelected == 1420)
  10903.      @iInstallActionRBSelected = 2
  10904.   @ElseIf(@NewSelected == 1430)
  10905.      @iInstallActionRBSelected = 3
  10906.   @ElseIf(@NewSelected == 1440)
  10907.      @iInstallActionRBSelected = 4
  10908.   @ElseIf(@NewSelected == 1450)
  10909.      @iInstallActionRBSelected = 5
  10910.   @Else
  10911.      @ErrorExit(@qErrorInvalidReturn, @iAbort)
  10912.   @EndIf
  10913.   @InstallActionsSetHelpText()
  10914.   @StaticText(510, "@qInstallActionsText2 \n\n @qInstallActionHelpText")
  10915.   @Return()
  10916. @EndFunc
  10917.  
  10918.  
  10919. //----------------------------------------------------------
  10920. @DefineFunc @Void @InstallActionsSetHelpText(@Void)
  10921.  
  10922.   @If (@iInstallActionRBSelected == 1)
  10923.      @qInstallActionHelpText = @qInstallActionHelp1
  10924.   @ElseIf (@iInstallActionRBSelected == 2)
  10925.      @qInstallActionHelpText = @qInstallActionHelp2
  10926.   @ElseIf (@iInstallActionRBSelected == 3)
  10927.      @qInstallActionHelpText = @qInstallActionHelp3
  10928.   @ElseIf (@iInstallActionRBSelected == 4)
  10929.      @qInstallActionHelpText = @qInstallActionHelp4
  10930.   @ElseIf (@iInstallActionRBSelected == 5)
  10931.      @qInstallActionHelpText = @qInstallActionHelp5
  10932.   @Else
  10933.      @ErrorExit(@qErrorInvalidReturn, @iAbort)
  10934.   @EndIf
  10935.  
  10936.   @Return()
  10937.  
  10938. @EndFunc
  10939. //
  10940. //
  10941. //  FILE: UPDATE
  10942. //
  10943. //
  10944. //--------------------------------------------------------
  10945.  
  10946. @DefineProto
  10947.  
  10948.    @Integer @PrepareUpdate(@Void)
  10949.    @Void @GetCurrentFixpakLevel(@Out @QString @qLevel)
  10950.    @Integer @ConfirmUpdate(@Void)
  10951.    @Integer @ProceedWithUpdate(@Void)
  10952.    @Void @WriteFixpakLevel(@Void)
  10953.  
  10954. @EndProto
  10955.  
  10956. //----------------------------------------------------------
  10957.  
  10958. @DefineFunc @Integer @PrepareUpdate(@Void)
  10959.  
  10960.    @SetCustomFeaturesStringFromFile(@qInstallSysFilename,@qCustomFeatures)
  10961.    @If (@IsNULL(@qCustomFeatures))
  10962.       @ErrorExit("@@PrepareUpdate: @qErrorReadingCustomFeatures", @iAbort)
  10963.    @EndIf
  10964.    @SetGroupsString(@CustomFeaturesToGroups(@qCustomFeatures))
  10965.  
  10966.    @GetCurrentFixpakLevel(@qTMP6)
  10967.  
  10968.    @iTMP6 = @StrtoInt(@qTMP6)
  10969.    @iTMP5 = @StrtoInt(@qFixpakLevel)
  10970.  
  10971.    // If this version is newer, proceed
  10972.    @If (@iTMP5 > @iTMP6)
  10973.       @iDialogRes = @iNext
  10974.    // If the versions are the same, ask
  10975.    @ElseIf (@iTMP5 == @iTMP6)
  10976.       // If it's a CID install, exit
  10977.       @If (@CIDBypass("N"))
  10978.          @Exit
  10979.       @EndIf
  10980.       @If (@ProceedWithUpdate())
  10981.          @iDialogRes = @iNext
  10982.       @Else
  10983.          @iDialogRes = @iBack
  10984.       @EndIf
  10985.    // If the version is older, do not allow to proceed
  10986.    @Else
  10987.       // If it's a CID install, exit
  10988.       @If (@CIDBypass("N"))
  10989.          @Exit
  10990.       @EndIf
  10991.       @MsgBox("@qUpdateErrorOlderVersion")
  10992.       @iDialogRes = @iBack
  10993.    @EndIf
  10994.  
  10995.    @Return(@iDialogRes)
  10996. @EndFunc
  10997.  
  10998. //----------------------------------------------------------
  10999.  
  11000. @DefineFunc @Void @GetCurrentFixpakLevel(@Out @QString @qLevel)
  11001.  
  11002.    @iTMP2 = @Success
  11003.    @If (@Platform == @Windows)
  11004.       @qTMP1 = "SOFTWARE\\@qCompanyName\\@qProductName\\@qProductVersion\\@qInstallKey"
  11005.       @If (@WinRegOpenKeyEx(@HKeyLocalMachine, @qTMP1, @iRegKeyAllAccess,
  11006.                             @iKeyHandle) != 0)
  11007.          @ErrorExit("@GetCurrentFixpakLevelCantOpenKey", @iAbort)
  11008.       @EndIf
  11009.       @qLevel = @GetRegValue(@iKeyHandle, @lFixpak)
  11010.       @WinRegCloseKey(@iKeyHandle)
  11011.    @Else
  11012.       @qLevel = @GetOS2ProductINIString(@qInstallKey,@lFixpak)
  11013.    @EndIf
  11014.  
  11015.    @Return()
  11016. @EndFunc
  11017.  
  11018.  
  11019.  
  11020. //----------------------------------------------------
  11021. @DefineFunc @Integer @ConfirmUpdate(@Void)
  11022.  
  11023. laConfirmInstall:
  11024.  
  11025. @If ( !@CIDBypass("N") )
  11026.    
  11027.    @iDialogRes = @DialogText(@qConfirmTitle, 
  11028.                  @qConfirmBitmap, @iConfirmBitmapID,
  11029.                  @qConfirmUpdateText1, "", "","","","",
  11030.                  "@qBack", @qInstall, @qCancel, "", "")
  11031.  
  11032.    @If     (@iDialogRes == 1)
  11033.       @iDialogRes = @iBack
  11034.    @ElseIf (@iDialogRes == 2)
  11035.       @iDialogRes = @iNext
  11036.    @ElseIf (@iDialogRes == 3)
  11037.       @ConfirmCancel()
  11038.       @Goto laConfirmInstall
  11039.    @ElseIf (@iDialogRes == 4) 
  11040.       @ShowAll("ConfirmInstall", "Remove 4th button test")
  11041.       @Goto laConfirmInstall
  11042.    @ElseIf (@iDialogRes == 5) 
  11043.       @ShowAll("ConfirmInstall", "Remove 5th button test")
  11044.       @Goto laConfirmInstall
  11045.    @Else 
  11046.       @ErrorExit(@qConfirmError, @iAbort)
  11047.    @EndIf
  11048. @Endif
  11049.  
  11050.    @Return(@iDialogRes)
  11051. @EndFunc
  11052.  
  11053. //-----------------------------------------------------
  11054.  
  11055. @DefineFunc @Integer @ProceedWithUpdate(@Void)
  11056.    @iDialogRes = @True
  11057.    @If (!@CIDBypass("@qNO"))
  11058.       @iFuncRes = @Ask(@qProceedWithUpdateTitle, "", 0,
  11059.                        @qProceedWithUpdateText1,
  11060.                        "@lYes", "@lNo")
  11061.       @If (@iFuncRes == 1)
  11062.          @iDialogRes = @True
  11063.       @ElseIf (@iFuncRes == 2)
  11064.          @iDialogRes = @False
  11065.       @Else
  11066.          @ErrorExit("@ProceedWithUpdateBadReturn", @iAbort)
  11067.       @EndIf
  11068.    @EndIf
  11069.    @Return(@iDialogRes)
  11070. @EndFunc
  11071.  
  11072. //------------------------------------------------------
  11073.  
  11074. @DefineFunc @Void @WriteFixpakLevel(@Void)
  11075.  
  11076.    @If (@Platform == @Windows)
  11077.       @SetRegProdValue(@lFixPak, @qFixPakLevel)      
  11078.    @Else
  11079.       @SetRegProdValueOS2(@lFixpak, @qFixpakLevel)
  11080.    @EndIf
  11081.  
  11082.    @Return()
  11083. @EndFunc
  11084. //
  11085. //
  11086. //
  11087. //File: Rebuild /////////////////////////////////////
  11088. //
  11089. //CIDVars: TBD
  11090. //
  11091. //Globals changed: none
  11092. //
  11093. @DefineProto
  11094.    @Integer @DoRebuildDialog(@Void)
  11095.    @Void @EventHandler @RebuildRBHandler(@In @Int @OldSelected,
  11096.                                                @In @Int @NewSelected,
  11097.                                                @In @Int @RangeStart,
  11098.                                                @In @Int @RangeEnd)
  11099.    @Void @RebuildSetHelpText(@Void)
  11100.    @Integer @RebuildConfirmInstallPaths(@Void)
  11101. @EndProto
  11102. //
  11103. //
  11104. //----------------------------------------------------------
  11105. @DefineFunc @Integer @DoRebuildDialog(@Void)
  11106.  
  11107.    @If (!@CIDBypass(@qForceRebuild))
  11108.       @RebuildSetHelpText()
  11109.  
  11110. laRebuildDlg:
  11111.  
  11112.       @If (@iJavaInstall)
  11113.          @DialogRadioDisableRB(0,0,1,0,0,0)
  11114.          @iRebuildRBSelected = 2
  11115.          @RebuildSetHelpText()
  11116.       @EndIf
  11117.       @MapEventToFunc(@DlgRBEvent, @RebuildRBHandler)
  11118.       @EnableEventMap(@DlgRBEvent)
  11119.  
  11120.       @iDialogRes = @DialogRadio(@qRebuildDialogTitle, @qRebuildDialogBitmap,
  11121.                                  @iRebuildDialogBitmapID, @qRebuildDialogText1,
  11122.                                  @qRebuildDialogText2, @qRebuildDialogHelpText,
  11123.                                  @qRebuildDesktopRBText, @qRebuildIfNewerRBText, 
  11124.                                  @qRebuildAllRBText,
  11125.                                  "", "", "",
  11126.                                  @qBack, @qNext, @qCancel, "", "",
  11127.                                  @iRebuildRBSelected)
  11128.  
  11129.       @DisableEventMap(@DlgRBEvent)
  11130.  
  11131.       @If (@iJavaInstall)
  11132.          @DialogRadioDisableRB(0,0,0,0,0,0)
  11133.       @EndIf
  11134.  
  11135.       @If (@iDialogRes == 1)
  11136.          @iDialogRes = @iBack
  11137.       @ElseIf (@iDialogRes == 2)
  11138.          @iDialogRes = @iNext
  11139.       @ElseIf (@iDialogRes == 3)
  11140.          @ConfirmCancel()
  11141.          @Goto laRebuildDlg
  11142.       @ElseIf (@iDialogRes == 4)
  11143.          @ErrorExit(@qErrorInvalidReturn, 1)
  11144.       @Else
  11145.          @ErrorExit(@qErrorInvalidReturn, 1)
  11146.       @EndIf
  11147.    @EndIf
  11148.  
  11149. laRebuildPostProcessing:
  11150.  
  11151.    @If (@iRebuildRBSelected == 1)
  11152.       @RebuildDesktopMode = @True
  11153.       @RebuildAllMode = @False
  11154.       @RebuildIfNewerMode = @False
  11155.    @ElseIf (@iRebuildRBSelected == 2)
  11156.       @RebuildDesktopMode = @False
  11157.       @RebuildIfNewerMode = @True
  11158.       @RebuildAllMode = @False
  11159.       @IfNewerMode = @True
  11160.    @ElseIf (@iRebuildRBSelected == 3)
  11161.       @RebuildDesktopMode = @False
  11162.       @RebuildIfNewerMode = @False
  11163.       @RebuildAllMode = @True
  11164.    @Else
  11165.       @ErrorExit(@qErrorInvalidReturn, @iAbort)
  11166.    @EndIf
  11167.    @Return(@iDialogRes)
  11168.  
  11169. @EndFunc
  11170.  
  11171.  
  11172. //----------------------------------------------------------
  11173. @DefineFunc @Void @EventHandler @RebuildRBHandler(@In @Int @OldSelected,
  11174.                                                          @In @Int @NewSelected,
  11175.                                                          @In @Int @RangeStart,
  11176.                                                          @In @Int @RangeEnd)
  11177.   @If (@NewSelected == 1410)
  11178.      @iRebuildRBSelected = 1
  11179.   @ElseIf(@NewSelected == 1420)
  11180.      @iRebuildRBSelected = 2
  11181.   @ElseIf ((@NewSelected == 1430) && @iJavaInstall)
  11182.      @iRebuildRBSelected = 3
  11183.   @Else
  11184.      @ErrorExit(@qErrorInvalidReturn, @iAbort)
  11185.   @EndIf
  11186.   @RebuildSetHelpText()
  11187.   @StaticText(510, "@qRebuildDialogText2 \n\n @qRebuildDialogHelpText")
  11188.   @Return()
  11189. @EndFunc
  11190.  
  11191.  
  11192. //----------------------------------------------------------
  11193. @DefineFunc @Void @RebuildSetHelpText(@Void)
  11194.  
  11195.   @If (@iRebuildRBSelected == 1)
  11196.      @qRebuildDialogHelpText = @qRebuildDialogHelp1
  11197.   @ElseIf (@iRebuildRBSelected == 2)
  11198.      @qRebuildDialogHelpText = @qRebuildDialogHelp2
  11199.   @ElseIf (@iRebuildRBSelected == 3)
  11200.      @qRebuildDialogHelpText = @qRebuildDialogHelp3
  11201.   @Else
  11202.      @ErrorExit(@qErrorInvalidReturn, @iAbort)
  11203.   @EndIf
  11204.  
  11205.   @Return()
  11206.  
  11207. @EndFunc
  11208.  
  11209.  
  11210. //----------------------------------------------------------
  11211. @DefineFunc @Integer @RebuildConfirmInstallPaths(@Void)
  11212.  
  11213.    @If (!@CIDBypass(@qForceRebuildConfirm))
  11214.       @SetInstallPathsFromFile(@qInstallSysFilename)
  11215.  
  11216. laConfirmPathsDlg:
  11217.  
  11218.       @If (@iSingleDriveEntry && (@Platform == @OS2))
  11219.          @iDialogRes = @Dialog1Edit(@qGetInstDirTitle, @qGetInstDirBitmap,
  11220.                                 @iGetInstDirBitmapID,
  11221.                                 @qConfirmPathsText1, "","","","",
  11222.                                 @qBack,@qNext,@qCancel,"","",
  11223.                                 @qInstallPath1)
  11224.       @Else
  11225.          @iDialogRes = @DialogEdit(@qConfirmPathsTitle, @qConfirmPathsBitmap,
  11226.                                 @iConfirmPathsBitmapID, @qConfirmPathsText1,
  11227.                                 @qProduct1, @qProduct2, @qProduct3,
  11228.                                 @qProduct4, @qProduct5, @qProduct6, @qProduct7,
  11229.                                 @qProduct8, @qProduct9, @qProduct10, "",
  11230.                                 @qBack, @qRebuild, @qCancel, "", "",
  11231.                                 @qInstallPath1, @qInstallPath2,
  11232.                                 @qInstallPath3, @qInstallPath4,
  11233.                                 @qInstallPath5, @qInstallPath6,
  11234.                                 @qInstallPath7, @qInstallPath8,
  11235.                                 @qInstallPath9, @qInstallPath10, "")
  11236.       @EndIf
  11237.  
  11238.  
  11239.       @If (@iDialogRes == 1)
  11240.          @iDialogRes = @iBack
  11241.       @ElseIf (@iDialogRes == 2)
  11242.          @iDialogRes = @iNext
  11243.       @ElseIf (@iDialogRes == 3)
  11244.           @ConfirmCancel()
  11245.           @Goto laConfirmPathsDlg
  11246.       @ElseIf (@iDialogRes == 4)
  11247.          @ErrorExit(@qErrorInvalidReturn, @iAbort)
  11248.       @Else
  11249.          @ErrorExit(@qErrorInvalidReturn, @iAbort)
  11250.       @EndIf
  11251.  
  11252. laRebuildConfirmPostProcessing:
  11253.       @If(@iDialogRes == @iNext)
  11254.          @iCheckPathResult = @iGetInstDirPathOK
  11255.  
  11256.          @CheckPath(@qInstallPath1, @iCheckPathResult)
  11257.  
  11258.  
  11259.          @If(@iCheckPathResult == @iGetInstDirPathOK)
  11260.             //Do nothing
  11261.          @ElseIf(@iCheckPathResult == @iGetInstDirBadPath)
  11262.             @MsgBox("@qInvalidPath@qGetInstDirError1")
  11263.             @Goto laConfirmPathsDlg
  11264.          @ElseIf(@iCheckPathResult == @iGetInstDirBadDrive)
  11265.             @MsgBox("@dInvalidDrive@qGetInstDirError2")
  11266.             @Goto laConfirmPathsDlg
  11267.          @ElseIf(@iCheckPathResult == @iGetInstDirNoRoot)
  11268.             @MsgBox("@dInvalidDrive@qGetInstDirError3")
  11269.             @Goto laConfirmPathsDlg
  11270.          @ElseIf(@iCheckPathResult == @iGetInstDirInvalidCharacterInPath)
  11271.             @MsgBox("@qInvalidPath@qGetInstDirError4")
  11272.             @Goto laConfirmPathsDlg
  11273.          @ElseIf(@iCheckPathResult == @iGetInstDirDriveNotHPFS)
  11274.             @MsgBox("@dInvalidDrive@qGetInstDirError5")
  11275.             @Goto laConfirmPathsDlg
  11276.          @ElseIf(@iCheckPathResult == @iGetInstDirLongPath)
  11277.             @MsgBox("@qInvalidPath@qGetInstDirError6")
  11278.             @Goto laConfirmPathsDlg
  11279.          @Else
  11280.             @ErrorExit(@qCheckPathResultError, @iAbort)
  11281.          @EndIf
  11282.  
  11283.       @EndIf
  11284.    @Else
  11285.       @iDialogRes = @iNext
  11286.    @EndIf
  11287.    @Return (@iDialogRes)
  11288. @EndFunc
  11289.  
  11290. //
  11291. //
  11292. //  FILE: ADD
  11293. //
  11294. //
  11295. //--------------------------------------------------------
  11296.  
  11297. @DefineProto
  11298.  
  11299.    @Integer @PrepareAdd(@Void)
  11300.    @Void @DisableSelected(@In @QString @qFeatures)
  11301.  
  11302. @EndProto
  11303.  
  11304. //----------------------------------------------------------
  11305.  
  11306. @DefineFunc @Integer @PrepareAdd(@Void)
  11307.  
  11308.    @SetCustomFeaturesStringFromFile(@qInstallSysFileName, @qOldFeatures)
  11309.    @If (@IsNULL(@qOldFeatures))
  11310.       @ErrorExit("@@PrepareAdd: @qErrorReadingCustomFeatures", @iAbort)
  11311.    @EndIf
  11312.    @qCustomFeatures = ""
  11313.  
  11314.    @iInstallType = @iInstallTypeCustom
  11315.  
  11316.    @GetCurrentFixpakLevel(@qTMP6)
  11317.  
  11318.    @iTMP6 = @StrtoInt(@qTMP6)
  11319.    @iTMP5 = @StrtoInt(@qFixpakLevel)
  11320.  
  11321.    // If this version is the same, proceed
  11322.    @If (@iTMP5 == @iTMP6)
  11323.       @DisableSelected(@qOldFeatures)
  11324.       @iDialogRes = @iNext
  11325.    // If this version is newer, deny and tell to update
  11326.    @ElseIf (@iTMP5 > @iTMP6)
  11327.       // If it's a CID install, exit
  11328.       @If (@CIDBypass("N"))
  11329.          @ErrorExit("@@PrepareAdd: @qAddErrorNewerVersion",@iAbort)
  11330.       @EndIf
  11331.       @MsgBox("@qAddErrorNewerVersion")
  11332.       @iDialogRes = @iBack
  11333.    // If the version is older, do not allow to proceed
  11334.    @Else
  11335.       @If (@CIDBypass("N"))
  11336.          @ErrorExit("@@PrepareAdd: @qAddErrorOlderVersion",@iAbort)
  11337.       @EndIf
  11338.       @MsgBox("@qAddErrorOlderVersion")
  11339.       @iDialogRes = @iBack
  11340.    @EndIf
  11341.  
  11342.    @Return(@iDialogRes)
  11343. @EndFunc
  11344.  
  11345. //---------------------------------------------------------
  11346.  
  11347.  
  11348. @DefineFunc @Void @DisableSelected(@In @QString @qFeatures)
  11349.  
  11350.    @If (@Strfind(@qFeatures,"01") >= 0)
  11351.       @iCustom1Enable=0
  11352.    @EndIf
  11353.    @If (@Strfind(@qFeatures,"02") >= 0)
  11354.       @iCustom2Enable=0
  11355.    @EndIf
  11356.    @If (@Strfind(@qFeatures,"03") >= 0)
  11357.       @iCustom3Enable=0
  11358.    @EndIf
  11359.    @If (@Strfind(@qFeatures,"04") >= 0)
  11360.       @iCustom4Enable=0
  11361.    @EndIf
  11362.    @If (@Strfind(@qFeatures,"05") >= 0)
  11363.       @iCustom5Enable=0
  11364.    @EndIf
  11365.    @If (@Strfind(@qFeatures,"06") >= 0)
  11366.       @iCustom6Enable=0
  11367.    @EndIf
  11368.    @If (@Strfind(@qFeatures,"07") >= 0)
  11369.       @iCustom7Enable=0
  11370.    @EndIf
  11371.    @If (@Strfind(@qFeatures,"08") >= 0)
  11372.       @iCustom8Enable=0
  11373.    @EndIf
  11374.    @If (@Strfind(@qFeatures,"09") >= 0)
  11375.       @iCustom9Enable=0
  11376.    @EndIf
  11377.    @If (@Strfind(@qFeatures,"10") >= 0)
  11378.       @iCustom10Enable=0
  11379.    @EndIf
  11380.    @If (@Strfind(@qFeatures,"11") >= 0)
  11381.       @iCustom11Enable=0
  11382.    @EndIf
  11383.    @If (@Strfind(@qFeatures,"12") >= 0)
  11384.       @iCustom12Enable=0
  11385.    @EndIf
  11386.    @If (@Strfind(@qFeatures,"13") >= 0)
  11387.       @iCustom13Enable=0
  11388.    @EndIf
  11389.    @If (@Strfind(@qFeatures,"14") >= 0)
  11390.       @iCustom14Enable=0
  11391.    @EndIf
  11392.    @If (@Strfind(@qFeatures,"15") >= 0)
  11393.       @iCustom15Enable=0
  11394.    @EndIf
  11395.    @If (@Strfind(@qFeatures,"16") >= 0)
  11396.       @iCustom16Enable=0
  11397.    @EndIf
  11398.  
  11399.    @Return()
  11400. @EndFunc
  11401. //
  11402. //
  11403. //
  11404. //File: Main
  11405. //CIDVars: n/a
  11406. //
  11407. //Globals changed: none
  11408. //
  11409. @DefineProto
  11410.   //none
  11411. @EndProto
  11412. //
  11413. //
  11414.  
  11415. //
  11416. ////////////////////// MAIN ////////////////////////
  11417. //
  11418. //----------------------------------------------------------
  11419.  
  11420. laSetupTemp:
  11421.    @SetTemp()
  11422.  
  11423. laInitProd:
  11424.    @InitProd()
  11425.  
  11426. laSetBackground:   //Set text, background, bmp of the main window
  11427.    @iFuncRes = @SetDisplay()
  11428.    @LoadBMPBackground(@qBackgroundBMPFile)
  11429.    @LoadBMPProdLogo(@qProdLogoBMPfile)
  11430.   
  11431. laDefaultResponses:
  11432.    @DoResponse(@qDefaultsFilename)
  11433.  
  11434. laProcessCmdLine:
  11435.    @ProcessCmdLine()
  11436.  
  11437.    @iAlreadyRunInstallPre = @False
  11438.  
  11439. laGetInstallStatus:
  11440.    @GetInstallStatus()
  11441.  
  11442. laInstallExitPre:
  11443.    @If (!@iAlreadyRunInstallPre)
  11444.       @InstallExitPre()
  11445.       @iAlreadyRunInstallPre = @True
  11446.    @EndIf
  11447.  
  11448. laJavaUpgradeMode:
  11449.    //For VAJava install, iJavaUpgradeMode might be set by installexitpre
  11450.    @If (@iJavaUpgradeMode)
  11451.       @Goto laDisplayLicense
  11452.    @EndIf
  11453.  
  11454.    @If (@iProductInstalled || @UninstallMode || @RebuildMode || @UpdateMode || @AddMode)
  11455.       @iFuncRes = @DetermineInstallDirectory()
  11456.       @If (@iFuncRes != @iNext)
  11457.          @MsgBox("@qErrorInvalidReturn DetermineInstallDirectory")
  11458.          @Goto laGetInstallStatus
  11459.       @Endif
  11460.       @DetermineInstallSysFilename()
  11461.       @SetInstallPathsFromFile(@qInstallSysFilename)
  11462.       @DoInstallActions()
  11463.    @EndIf
  11464.  
  11465. laAdd:
  11466.    @If (@AddMode)
  11467.       @iFuncRes = @PrepareAdd()
  11468.       @If (@iFuncRes == @iBack)
  11469.          @Goto laGetInstallStatus
  11470.       @ElseIf (@iFuncRes != @iNext)
  11471.          @MsgBox("@qErrorInvalidReturn PrepareUpdate")
  11472.          @Goto laGetInstallStatus
  11473.       @EndIf
  11474.       @Goto laCustomSelect
  11475.    @EndIf
  11476.  
  11477. laUninstall:
  11478.    @If (@UninstallMode)
  11479.       @iFuncRes = @UninstallProduct()
  11480.       @If(@iFuncRes == @iBack)
  11481.          @Goto laGetInstallStatus
  11482.       @ElseIf(@iFuncRes != @iNext)
  11483.          @MsgBox("@qErrorInvalidReturn UninstallProduct")
  11484.          @Goto laUninstall
  11485.       @EndIf
  11486.       @Exit
  11487.    @EndIf
  11488.  
  11489. laRebuild:
  11490.    @If (@RebuildMode)
  11491.       @iFuncRes = @DoRebuildDialog()
  11492.       @If(@iFuncRes == @iBack)
  11493.          @Goto laGetInstallStatus
  11494.       @ElseIf(@iFuncRes != @iNext)
  11495.          @MsgBox("@qErrorInvalidReturn DoRebuildDialog")
  11496.          @Goto laRebuild
  11497.       @EndIf
  11498.       @SetCustomFeaturesStringFromFile(@qInstallSysFileName, @qCustomFeatures)
  11499.       @If (@IsNULL(@qCustomFeatures))
  11500.          @ErrorExit("Rebuild: @qErrorReadingCustomFeatures", @iAbort)
  11501.       @EndIf
  11502.       @SetGroupsString(@CustomFeaturesToGroups(@qCustomFeatures))
  11503.       @If (@RebuildDesktopMode)
  11504.          @Goto laInstallFiles
  11505.       @Else
  11506.          @Goto laCheckInUse
  11507.       @EndIf
  11508.    @EndIf
  11509.  
  11510. laUpdate:
  11511.    @If (@UpdateMode)
  11512.       @iFuncRes = @PrepareUpdate()
  11513.       @If (@iFuncRes == @iBack)
  11514.          @Goto laGetInstallStatus
  11515.       @ElseIf (@iFuncRes != @iNext)
  11516.          @MsgBox("@qErrorInvalidReturn PrepareUpdate")
  11517.          @Goto laUpdate
  11518.       @EndIf
  11519.       @Goto laCheckInUse
  11520.    @EndIf
  11521.  
  11522. laDisplayAutorun:
  11523.    @If (@AutorunMode == @True)
  11524.       @iFuncRes = @DisplayAutorun()
  11525.       @If (@iFuncRes != @iNext)
  11526.           @MsgBox("@qErrorInvalidReturn DisplayAutorun")
  11527.           @Goto laDisplayAutorun
  11528.       @Endif
  11529.    @Endif
  11530.  
  11531. laDisplayCopyright:   //Display the Copyright screen
  11532.    @iFuncRes = @DisplayCopyright()
  11533.    @If (@iFuncRes != @iNext)
  11534.       @MsgBox("@qErrorInvalidReturn DisplayCopyright")
  11535.       @Goto laDisplayCopyright
  11536.    @Endif
  11537.  
  11538. laDisplayWelcome:   //Display the welcome screen
  11539.    @iFuncRes = @DisplayWelcome()
  11540.    @If (@iFuncRes != @iNext)
  11541.       @MsgBox("@qErrorInvalidReturn DisplayWelcome")
  11542.       @Goto laDisplayWelcome
  11543.    @Endif
  11544.  
  11545. laDisplayLicense:
  11546.   //NEW FOR JAVA
  11547.    @If (@iJavaInstall && ((@iProductClass == @iProfessional) || (@iProductClass == @iEnterprise)))
  11548.       @If (@Ask(@qAskReadInstallTxtTitle,"",0,@qAskReadInstallTxtQu,@qNo,@qYes) != 2)
  11549.          @ConfirmCancel()
  11550.          @Goto laInstallExitPre
  11551.       @EndIf
  11552.    @EndIf
  11553.  
  11554.  
  11555.    @iFuncRes = @DisplayLicense()
  11556.    @If(@iFuncRes == @iBack)
  11557.       @If (@iJavaUpgradeMode)
  11558.          @iAlreadyRunInstallPre = @False
  11559.          @Goto laInstallExitPre
  11560.       @EndIf
  11561.       @Goto laDisplayWelcome
  11562.    @ElseIf(@iFuncRes != @iNext)
  11563.       @MsgBox("@qErrorInvalidReturn DisplayLicense")
  11564.       @Goto laDisplayLicense
  11565.    @EndIf
  11566.  
  11567. laCheckPrereqs:
  11568.    @iFuncRes = @CheckPrereqs()
  11569.    @If (@iFuncRes == @iBack)
  11570.       @Goto laDisplayLicense
  11571.    @ElseIf (@iFuncRes != @iNext)
  11572.       @MsgBox("@qErrorInvalidReturn CheckPrereqs")
  11573.       @Goto laCheckPrereqs
  11574.    @Endif
  11575.  
  11576. //laCheckExist:
  11577. //   @iFuncRes = @CheckExisting()
  11578. //   @If (@iFuncRes == @iBack)
  11579. //      @Goto laCheckPrereqs
  11580. //   @ElseIf (@iFuncRes != @iNext)
  11581. //      @MsgBox("@qErrorInvalidReturn CheckExist")
  11582. //      @Goto laCheckExist
  11583. //   @Endif
  11584.  
  11585. laGetInstallType:   //Get the Install type (custom, typical, ...)
  11586.    @iFuncRes = @GetInstallType()
  11587.    @If (@iFuncRes == @iBack)
  11588.       @Goto laCheckPrereqs
  11589.    @ElseIf (@iFuncRes != @iNext)
  11590.       @MsgBox("@qErrorInvalidReturn GetInstallType")
  11591.       @Goto laGetInstallType
  11592.    @Endif
  11593.  
  11594. laCustomSelect:   //Custom Selections
  11595.    @iFuncRes = @CustomSelect()
  11596.    @If (@iFuncRes == @iBack)
  11597.       @If (@AddMode)
  11598.          @Goto laGetInstallStatus
  11599.       @Else
  11600.          @Goto laGetInstallType
  11601.       @EndIf
  11602.    @ElseIf (@iFuncRes != @iNext)
  11603.       @MsgBox("@qErrorInvalidReturn CustomSelect")
  11604.       @Goto laCustomSelect
  11605.    @Endif
  11606.  
  11607. laGetInstallPath:
  11608.    @iFuncRes = @GetInstallPath()
  11609.    @If (@iFuncRes == @iBack)
  11610.       @Goto laCustomSelect
  11611.    @ElseIf (@iFuncRes != @iNext)
  11612.       @MsgBox("@qErrorInvalidReturn GetInstallPath @Eval(@iFuncRes) ")
  11613.       @Goto laGetInstallPath
  11614.    @Endif
  11615.    @ShowAll("MAIN.DAT", "Must write function to set path.  Remove temporary settings.")
  11616.    @OutDrive = @StrIndex(@StrUpr(@qInstallPath1), (@StrFind(@qInstallPath1, ":\\") - 1))
  11617.    @Subdir = @StrDel("@qInstallPath1", 0, (@StrFind(@qInstallPath1, ":\\") + 1))
  11618.  
  11619. laCheckFreeSpace:
  11620.    @iFuncRes = @CheckFreeSpace()
  11621.    @If (@iFuncRes == @iBack)
  11622.       @Goto laGetInstallPath
  11623.    @ElseIf (@iFuncRes != @iNext)
  11624.       @MsgBox("@qErrorInvalidReturn CheckFreeSpace")
  11625.       @Goto laCheckFreeSpace
  11626.    @Endif
  11627.  
  11628. laCheckInUse:
  11629.    @iFuncRes = @CheckInUse()
  11630.    @If (@iFuncRes == @iBack)
  11631.       @Goto laCheckFreeSpace
  11632.    @ElseIf (@iFuncRes != @iNext)
  11633.       @MsgBox("@qErrorInvalidReturn CheckInUse")
  11634.       @Goto laCheckInUse
  11635.    @Endif
  11636.  
  11637. laConfirmInstall:
  11638.    @If (@RebuildMode)
  11639.       @iFuncRes = @RebuildConfirmInstallPaths()
  11640.       @If(@iFuncRes == @iBack)
  11641.          @Goto laRebuild
  11642.       @ElseIf(@iFuncRes != @iNext)
  11643.          @MsgBox("@qErrorInvalidReturn @RebuildConfirmInstallPaths")
  11644.          @Goto laRebuild
  11645.       @EndIf
  11646.    @ElseIf (@UpdateMode)
  11647.       @iFuncRes = @ConfirmUpdate()
  11648.       @If (@iFuncRes == @iBack)
  11649.          @Goto laGetInstallStatus
  11650.       @ElseIf (@iFuncRes != @iNext)
  11651.          @MsgBox("@qErrorInvalidReturn ConfirmUpdate")
  11652.          @Goto laGetInstallStatus
  11653.       @Endif
  11654.    @Else   //First-time install mode
  11655.       @iFuncRes = @ConfirmInstall()
  11656.       @If (@iFuncRes == @iBack)
  11657.          @Goto laCheckInUse
  11658.       @ElseIf (@iFuncRes != @iNext)
  11659.          @MsgBox("@qErrorInvalidReturn ConfirmInstall")
  11660.          @Goto laConfirmInstall
  11661.       @Endif
  11662.    @EndIf
  11663.  
  11664.  
  11665. laInstallFiles:
  11666.  @If (!@RebuildDesktopMode)
  11667. //   @ShowBMP(0, @Eval((@WinScreenCaps(8) - 350) / 2), @Eval((@WinScreenCaps(10) - 60) / 2), "@qCopyFileBMPFile", 2)
  11668.  
  11669.    @CheckMultipleRedFiles()
  11670.    @SetNumberofDisks()
  11671.    @If (@iMultipleRedFiles)
  11672.       @FlushGroups()
  11673.       @FlushOptions()
  11674.  
  11675.       @qGroupsSet = @CustomFeaturesToGroups(@qCustomFeatures)
  11676.  
  11677.       @CopyFilesExitPre()
  11678.  
  11679.       @SetOutDriveSubdir(@qInstallPath1)
  11680.  
  11681.       @DefineDisk
  11682.          @Label = "Disk 1"
  11683.          @BeginLib @UninstallRedFile 
  11684.             @File *.*
  11685.          @EndLib
  11686.       @EndDisk
  11687.  
  11688.       @If ((@StrFind(@qGroupsSet,"A") >= 0) && (@FileSize(@GroupARedFile) != 0))
  11689.          @If (@iGroupAExternalInstall)
  11690.             @SetOutDriveSubDir(@qGroupAExternalInstall)
  11691.          @Else
  11692.             @SetOutPath("A")
  11693.          @Endif
  11694.          @DefineDisk
  11695.             @Label = "Disk 1"
  11696.             @BeginLib @GroupARedFile
  11697.                @File *.*
  11698.             @EndLib
  11699.          @EndDisk
  11700.       @EndIf
  11701.       @If ((@StrFind(@qGroupsSet,"B") >= 0) && (@FileSize(@GroupBRedFile) != 0))       
  11702.          @If (@iGroupBExternalInstall)
  11703.             @SetOutDriveSubDir(@qGroupBExternalInstall)
  11704.          @Else
  11705.             @SetOutPath("B")
  11706.          @Endif
  11707.          @DefineDisk
  11708.             @Label = "Disk 1"
  11709.             @BeginLib @GroupBRedFile
  11710.                @File *.*
  11711.             @EndLib
  11712.          @EndDisk
  11713.       @EndIf
  11714.       @If ((@StrFind(@qGroupsSet,"C") >= 0) && (@FileSize(@GroupCRedFile) != 0))
  11715.          @If (@iGroupCExternalInstall)
  11716.             @SetOutDriveSubDir(@qGroupCExternalInstall)
  11717.          @Else
  11718.             @SetOutPath("C")
  11719.          @Endif
  11720.          @DefineDisk
  11721.             @Label = "Disk 1"
  11722.             @BeginLib @GroupCRedFile
  11723.                @File *.*
  11724.             @EndLib
  11725.          @EndDisk
  11726.       @EndIf
  11727.       @If ((@StrFind(@qGroupsSet,"D") >= 0) && (@FileSize(@GroupDRedFile) != 0))
  11728.          @If (@iGroupDExternalInstall)
  11729.             @SetOutDriveSubDir(@qGroupDExternalInstall)
  11730.          @Else
  11731.             @SetOutPath("D")
  11732.          @Endif
  11733.          @DefineDisk
  11734.             @Label = "Disk 1"
  11735.             @BeginLib @GroupDRedFile
  11736.                @File *.*
  11737.             @EndLib
  11738.          @EndDisk
  11739.       @EndIf
  11740.       @If ((@StrFind(@qGroupsSet,"E") >= 0) && (@FileSize(@GroupERedFile) != 0))
  11741.          @If (@iGroupEExternalInstall)
  11742.             @SetOutDriveSubDir(@qGroupEExternalInstall)
  11743.          @Else
  11744.             @SetOutPath("E")
  11745.          @Endif
  11746.          @DefineDisk
  11747.             @Label = "Disk 1"
  11748.             @BeginLib @GroupERedFile
  11749.                @File *.*
  11750.             @EndLib
  11751.          @EndDisk
  11752.       @EndIf
  11753.       @If ((@StrFind(@qGroupsSet,"F") >= 0) && (@FileSize(@GroupFRedFile) != 0))
  11754.          @If (@iGroupFExternalInstall)
  11755.             @SetOutDriveSubDir(@qGroupFExternalInstall)
  11756.          @Else
  11757.             @SetOutPath("F")
  11758.          @Endif
  11759.          @DefineDisk
  11760.             @Label = "Disk 1"
  11761.             @BeginLib @GroupFRedFile
  11762.                @File *.*
  11763.             @EndLib
  11764.          @EndDisk
  11765.       @EndIf
  11766.       @If ((@StrFind(@qGroupsSet,"G") >= 0) && (@FileSize(@GroupGRedFile) != 0))
  11767.          @If (@iGroupGExternalInstall)
  11768.             @SetOutDriveSubDir(@qGroupGExternalInstall)
  11769.          @Else
  11770.             @SetOutPath("G")
  11771.          @Endif
  11772.          @DefineDisk
  11773.             @Label = "Disk 1"
  11774.             @BeginLib @GroupGRedFile
  11775.                @File *.*
  11776.             @EndLib
  11777.          @EndDisk
  11778.       @EndIf
  11779.       @If ((@StrFind(@qGroupsSet,"H") >= 0) && (@FileSize(@GroupHRedFile) != 0))
  11780.          @If (@iGroupHExternalInstall)
  11781.             @SetOutDriveSubDir(@qGroupHExternalInstall)
  11782.          @Else
  11783.             @SetOutPath("H")
  11784.          @Endif
  11785.          @DefineDisk
  11786.             @Label = "Disk 1"
  11787.             @BeginLib @GroupHRedFile
  11788.                @File *.*
  11789.             @EndLib
  11790.          @EndDisk
  11791.       @EndIf
  11792.  
  11793. @If (@iJavaInstall && (@iProductClass != @iEntry))
  11794.    @LoadBMPBillboard()
  11795. @EndIf
  11796.       @If ((@StrFind(@qGroupsSet,"I") >= 0) && (@FileSize(@GroupIRedFile) != 0))
  11797.          @If (@iGroupIExternalInstall)
  11798.             @SetOutDriveSubDir(@qGroupIExternalInstall)
  11799.          @Else
  11800.             @SetOutPath("I")
  11801.          @Endif
  11802.          @DefineDisk
  11803.             @Label = "Disk 1"
  11804.             @BeginLib @GroupIRedFile
  11805.                @File *.*
  11806.             @EndLib
  11807.          @EndDisk
  11808.       @EndIf
  11809.  
  11810.       @If ((@StrFind(@qGroupsSet,"J") >= 0) && (@FileSize(@GroupJRedFile) != 0))
  11811. @LoadBMPBillboard()
  11812.          @If (@iGroupJExternalInstall)
  11813.             @SetOutDriveSubDir(@qGroupJExternalInstall)
  11814.          @Else
  11815.             @SetOutPath("J")
  11816.          @Endif
  11817.          @DefineDisk
  11818.             @Label = "Disk 1"
  11819.             @BeginLib @GroupJRedFile
  11820.                @File *.*
  11821.             @EndLib
  11822.          @EndDisk
  11823.       @EndIf
  11824.       @If ((@StrFind(@qGroupsSet,"K") >= 0) && (@FileSize(@GroupKRedFile) != 0))
  11825.          @If (@iGroupKExternalInstall)
  11826.             @SetOutDriveSubDir(@qGroupKExternalInstall)
  11827.          @Else
  11828.             @SetOutPath("K")
  11829.          @Endif
  11830.          @DefineDisk
  11831.             @Label = "Disk 1"
  11832.             @BeginLib @GroupKRedFile
  11833.                @File *.*
  11834.             @EndLib
  11835.          @EndDisk
  11836.       @EndIf
  11837.       @If ((@StrFind(@qGroupsSet,"L") >= 0) && (@FileSize(@GroupLRedFile) != 0))         
  11838.          @If (@iGroupLExternalInstall)
  11839.             @SetOutDriveSubDir(@qGroupLExternalInstall)
  11840.          @Else
  11841.             @SetOutPath("L")
  11842.          @Endif
  11843.          @DefineDisk
  11844.             @Label = "Disk 1"
  11845.             @BeginLib @GroupLRedFile
  11846.                @File *.*
  11847.             @EndLib
  11848.          @EndDisk
  11849.       @EndIf
  11850.       @If ((@StrFind(@qGroupsSet,"M") >= 0) && (@FileSize(@GroupMRedFile) != 0))         
  11851.          @If (@iGroupMExternalInstall)
  11852.             @SetOutDriveSubDir(@qGroupMExternalInstall)
  11853.          @Else
  11854.             @SetOutPath("M")
  11855.          @Endif
  11856.          @DefineDisk
  11857.             @Label = "Disk 1"
  11858.             @BeginLib @GroupMRedFile
  11859.                @File *.*
  11860.             @EndLib
  11861.          @EndDisk
  11862.       @EndIf
  11863.       @If ((@StrFind(@qGroupsSet,"N") >= 0) && (@FileSize(@GroupNRedFile) != 0))
  11864.          @If (@iGroupNExternalInstall)
  11865.             @SetOutDriveSubDir(@qGroupNExternalInstall)
  11866.          @Else
  11867.             @SetOutPath("N")
  11868.          @Endif
  11869.          @DefineDisk
  11870.             @Label = "Disk 1"
  11871.             @BeginLib @GroupNRedFile
  11872.                @File *.*
  11873.             @EndLib
  11874.          @EndDisk
  11875.       @EndIf
  11876.       @If ((@StrFind(@qGroupsSet,"O") >= 0) && (@FileSize(@GroupORedFile) != 0))
  11877.          @If (@iGroupOExternalInstall)
  11878.             @SetOutDriveSubDir(@qGroupOExternalInstall)
  11879.          @Else
  11880.             @SetOutPath("O")
  11881.          @Endif
  11882.          @DefineDisk
  11883.             @Label = "Disk 1"
  11884.             @BeginLib @GroupORedFile
  11885.                @File *.*
  11886.             @EndLib
  11887.          @EndDisk
  11888.       @EndIf
  11889.       @If ((@StrFind(@qGroupsSet,"P") >= 0) && (@FileSize(@GroupPRedFile) != 0))
  11890.          @If (@iGroupPExternalInstall)
  11891.             @SetOutDriveSubDir(@qGroupPExternalInstall)
  11892.          @Else
  11893.             @SetOutPath("P")
  11894.          @Endif
  11895.          @DefineDisk
  11896.             @Label = "Disk 1"
  11897.             @BeginLib @GroupPRedFile
  11898.                @File *.*
  11899.             @EndLib
  11900.          @EndDisk
  11901.       @EndIf
  11902.  
  11903.       @If ((@StrFind(@qGroupsSet,"Q") >= 0) && (@FileSize(@GroupQRedFile) != 0))
  11904. @LoadBMPBillboard()
  11905.          @If (@iGroupQExternalInstall)
  11906.             @SetOutDriveSubDir(@qGroupQExternalInstall)
  11907.          @Else
  11908.             @SetOutPath("Q")
  11909.          @Endif
  11910.          @DefineDisk
  11911.             @Label = "Disk 1"
  11912.             @BeginLib @GroupQRedFile
  11913.                @File *.*
  11914.             @EndLib
  11915.          @EndDisk
  11916.       @EndIf
  11917.       @If ((@StrFind(@qGroupsSet,"R") >= 0) && (@FileSize(@GroupRRedFile) != 0))
  11918.          @If (@iGroupRExternalInstall)
  11919.             @SetOutDriveSubDir(@qGroupRExternalInstall)
  11920.          @Else
  11921.             @SetOutPath("R")
  11922.          @Endif
  11923.          @DefineDisk
  11924.             @Label = "Disk 1"
  11925.             @BeginLib @GroupRRedFile
  11926.                @File *.*
  11927.             @EndLib
  11928.          @EndDisk
  11929.       @EndIf
  11930.       @If ((@StrFind(@qGroupsSet,"S") >= 0) && (@FileSize(@GroupSRedFile) != 0))
  11931.          @If (@iGroupSExternalInstall)
  11932.             @SetOutDriveSubDir(@qGroupSExternalInstall)
  11933.          @Else
  11934.             @SetOutPath("S")
  11935.          @Endif
  11936.          @DefineDisk
  11937.             @Label = "Disk 1"
  11938.             @BeginLib @GroupSRedFile
  11939.                @File *.*
  11940.             @EndLib
  11941.          @EndDisk
  11942.       @EndIf
  11943.       @If ((@StrFind(@qGroupsSet,"T") >= 0) && (@FileSize(@GroupTRedFile) != 0))
  11944.          @If (@iGroupTExternalInstall)
  11945.             @SetOutDriveSubDir(@qGroupTExternalInstall)
  11946.          @Else
  11947.             @SetOutPath("T")
  11948.          @Endif
  11949.          @DefineDisk
  11950.             @Label = "Disk 1"
  11951.             @BeginLib @GroupTRedFile
  11952.                @File *.*
  11953.             @EndLib
  11954.          @EndDisk
  11955.       @EndIf
  11956.       @If ((@StrFind(@qGroupsSet,"U") >= 0) && (@FileSize(@GroupURedFile) != 0))
  11957.          @If (@iGroupUExternalInstall)
  11958.             @SetOutDriveSubDir(@qGroupUExternalInstall)
  11959.          @Else
  11960.             @SetOutPath("U")
  11961.          @Endif
  11962.          @DefineDisk
  11963.             @Label = "Disk 1"
  11964.             @BeginLib @GroupURedFile
  11965.                @File *.*
  11966.             @EndLib
  11967.          @EndDisk
  11968.       @EndIf
  11969.       @If ((@StrFind(@qGroupsSet,"V") >= 0) && (@FileSize(@GroupVRedFile) != 0))
  11970.          @If (@iGroupVExternalInstall)
  11971.             @SetOutDriveSubDir(@qGroupVExternalInstall)
  11972.          @Else 
  11973.             @SetOutPath("V")
  11974.          @Endif
  11975.          @DefineDisk
  11976.             @Label = "Disk 1"
  11977.             @BeginLib @GroupVRedFile
  11978.                @File *.*
  11979.             @EndLib
  11980.          @EndDisk
  11981.       @EndIf
  11982.       @If ((@StrFind(@qGroupsSet,"W") >= 0) && (@FileSize(@GroupWRedFile) != 0))
  11983.          @If (@iGroupWExternalInstall)
  11984.             @SetOutDriveSubDir(@qGroupWExternalInstall)
  11985.          @Else
  11986.             @SetOutPath("W")
  11987.          @Endif
  11988.          @DefineDisk
  11989.             @Label = "Disk 1"
  11990.             @BeginLib @GroupWRedFile
  11991.                @File *.*
  11992.             @EndLib
  11993.          @EndDisk
  11994.       @EndIf
  11995.  
  11996.       @If ((@StrFind(@qGroupsSet,"X") >= 0) && (@FileSize(@GroupXRedFile) != 0))
  11997. @LoadBMPBillboard()
  11998.          @If (@iGroupXExternalInstall)
  11999.             @SetOutDriveSubDir(@qGroupXExternalInstall)
  12000.          @Else
  12001.             @SetOutPath("X")
  12002.          @Endif
  12003.          @DefineDisk
  12004.             @Label = "Disk 1"
  12005.             @BeginLib @GroupXRedFile
  12006.                @File *.*
  12007.             @EndLib
  12008.          @EndDisk
  12009.       @EndIf
  12010.       @If ((@StrFind(@qGroupsSet,"Y") >= 0) && (@FileSize(@GroupYRedFile) != 0))
  12011.          @If (@iGroupYExternalInstall)
  12012.             @SetOutDriveSubDir(@qGroupYExternalInstall)
  12013.          @Else
  12014.             @SetOutPath("Y")
  12015.          @Endif
  12016.          @DefineDisk
  12017.             @Label = "Disk 1"
  12018.             @BeginLib @GroupYRedFile
  12019.                @File *.*
  12020.             @EndLib
  12021.          @EndDisk
  12022.       @EndIf
  12023.       @If ((@StrFind(@qGroupsSet,"Z") >= 0) && (@FileSize(@GroupZRedFile) != 0))
  12024.          @If (@iGroupZExternalInstall)
  12025.             @SetOutDriveSubDir(@qGroupZExternalInstall)
  12026.          @Else
  12027.             @SetOutPath("Z")
  12028.          @Endif
  12029.          @DefineDisk
  12030.             @Label = "Disk 1"
  12031.             @BeginLib @GroupZRedFile
  12032.                @File *.*
  12033.             @EndLib
  12034.          @EndDisk
  12035.       @EndIf
  12036.  
  12037.       @CopyFilesExitPost()
  12038.       // Reset the groups that had been set
  12039.       @qGroupsSet = @CustomFeaturesToGroups(@qCustomFeatures)
  12040.       @SetGroupsString(@qGroupsSet)
  12041.  
  12042.  
  12043.    @Else    // !iMultipleRedFiles
  12044.       @If(@OptionGroupsNotEmpty(@qOption1Groups))
  12045.          @SetOutDriveSubdir(@qInstallPath1)
  12046.          @FlushOptions()
  12047.          @SetOption(1)
  12048.          @DefineDisk
  12049.             @Label = "Disk 1"
  12050.             @BeginLib @DataRED
  12051.                 @File *.*
  12052.             @EndLib
  12053.          @EndDisk
  12054.       @EndIf
  12055.  
  12056.       @If(@OptionGroupsNotEmpty(@qOption2Groups))
  12057.          @SetOutDriveSubdir(@qInstallPath2)
  12058.          @FlushOptions()
  12059.          @SetOption(2)
  12060.          @DefineDisk
  12061.             @Label = "Disk 1"
  12062.             @BeginLib @DataRED
  12063.                @File *.*
  12064.             @EndLib
  12065.          @EndDisk
  12066.       @Endif
  12067.  
  12068.       @If(@OptionGroupsNotEmpty(@qOption3Groups))
  12069.          @SetOutDriveSubdir(@qInstallPath3)
  12070.          @FlushOptions()
  12071.          @SetOption(3)
  12072.          @DefineDisk
  12073.             @Label = "Disk 1"
  12074.             @BeginLib @DataRED
  12075.                @File *.*
  12076.             @EndLib
  12077.          @EndDisk
  12078.       @EndIf
  12079.  
  12080.       @If(@OptionGroupsNotEmpty(@qOption4Groups))
  12081.          @SetOutDriveSubdir(@qInstallPath4)
  12082.          @FlushOptions()
  12083.          @SetOption(4)
  12084.          @DefineDisk
  12085.             @Label = "Disk 1"
  12086.             @BeginLib @DataRED
  12087.                @File *.*
  12088.             @EndLib
  12089.          @EndDisk
  12090.       @EndIf
  12091.  
  12092.       @If(@OptionGroupsNotEmpty(@qOption5Groups))
  12093.          @SetOutDriveSubdir(@qInstallPath5)
  12094.          @FlushOptions()
  12095.          @SetOption(5)
  12096.          @DefineDisk
  12097.             @Label = "Disk 1"
  12098.             @BeginLib @DataRED
  12099.                @File *.*
  12100.             @EndLib
  12101.          @EndDisk
  12102.       @EndIf
  12103.  
  12104.       @If(@OptionGroupsNotEmpty(@qOption6Groups))
  12105.          @SetOutDriveSubdir(@qInstallPath6)
  12106.          @FlushOptions()
  12107.          @SetOption(6)
  12108.          @DefineDisk
  12109.             @Label = "Disk 1"
  12110.             @BeginLib @DataRED
  12111.                @File *.*
  12112.             @EndLib
  12113.          @EndDisk
  12114.       @EndIf
  12115.  
  12116.       @If(@OptionGroupsNotEmpty(@qOption7Groups))
  12117.          @SetOutDriveSubdir(@qInstallPath7)
  12118.          @FlushOptions()
  12119.          @SetOption(7)
  12120.          @DefineDisk
  12121.             @Label = "Disk 1"
  12122.             @BeginLib @DataRED
  12123.                @File *.*
  12124.             @EndLib
  12125.          @EndDisk
  12126.       @EndIf
  12127.  
  12128.       @If(@OptionGroupsNotEmpty(@qOption8Groups))
  12129.          @SetOutDriveSubdir(@qInstallPath8)
  12130.          @FlushOptions()
  12131.          @SetOption(8)
  12132.          @DefineDisk
  12133.             @Label = "Disk 1"
  12134.             @BeginLib @DataRED
  12135.                @File *.*
  12136.             @EndLib
  12137.          @EndDisk
  12138.       @EndIf
  12139.  
  12140.       @If(@OptionGroupsNotEmpty(@qOption9Groups))
  12141.          @SetOutDriveSubdir(@qInstallPath9)
  12142.          @FlushOptions()
  12143.          @SetOption(9)
  12144.          @DefineDisk
  12145.             @Label = "Disk 1"
  12146.             @BeginLib @DataRED
  12147.                @File *.*
  12148.             @EndLib
  12149.          @EndDisk
  12150.       @EndIf
  12151.  
  12152.       @If(@OptionGroupsNotEmpty(@qOption10Groups))
  12153.          @SetOutDriveSubdir(@qInstallPath10)
  12154.          @FlushOptions()
  12155.          @SetOption(10)
  12156.          @DefineDisk
  12157.             @Label = "Disk 1"
  12158.             @BeginLib @DataRED
  12159.                @File *.*
  12160.             @EndLib
  12161.          @EndDisk
  12162.       @EndIf
  12163.  
  12164.    @EndIf    // !iMultipleRedFiles
  12165.  
  12166. //   @EraseBMP(0)
  12167.  @EndIf     //  RebuildDeskTopMode
  12168.  @If (@UpdateMode)
  12169.     @WriteFixpakLevel()
  12170.     @Goto laReboot
  12171.  @EndIf
  12172.  
  12173.  
  12174.    @If (@AddMode)
  12175.       @qCustomFeatures = "@qCustomFeatures @qOldFeatures"
  12176.    @ElseIf (@RebuildIfNewerMode)
  12177.       @Goto laInstallExitPost
  12178.    @EndIf
  12179.      
  12180.  
  12181. laInstallSys:
  12182.  
  12183.    @LoadBMPMsg(@qwaitMSGBMPFile1)
  12184.  
  12185. //create the Install.sys file to contain installation information
  12186.    @If (@RebuildMode)
  12187.       @qInstallSysFileName = ""
  12188.    @EndIf
  12189.    @CreateInstallSys()
  12190.  
  12191. laSetDesk:
  12192.    @iFuncRes = @SetDesktop()
  12193.  
  12194. laRegisterProduct:
  12195.    @iFuncRes = @RegisterProduct()
  12196.  
  12197.    @LoadBMPBillboard()
  12198.  
  12199. laSetEnvironment:
  12200.    @iFuncRes = @SetEnvironment()
  12201.  
  12202. laSetProductVars:
  12203.    @iFuncRes = @SetProductVariables()
  12204.  
  12205. laWriteInstallOptions:
  12206.    @iFuncRes = @WriteInstallOptions()
  12207.  
  12208. laRegisterUninstall:
  12209.    @iFuncRes = @RegisterUninstall()
  12210.  
  12211. laRegisterART:   //register with IBM (ART)
  12212.    @iFuncRes = @RegisterART()
  12213.  
  12214. //
  12215. ///////////////////////////// FINISH /////////////////////////////////
  12216. //
  12217. //----------------------------------------------------------
  12218. //??@Finish
  12219.  
  12220. laInstallExitPost:
  12221.    @InstallExitPost()
  12222.  
  12223. laFinish:
  12224. @ShowAll("MainLine:", "@@Finish not working")
  12225.    @If (!@iBypassReadme)
  12226.       @If(!@CIDBypass(@qForceReadme))
  12227.          @If(@Exists("@qInstallPath1\\@qReadmeFile"))
  12228.             @If(@Platform == @OS2)
  12229.                @OS2Exec("e.exe","@qInstallPath1\\@qReadmeFile","",1,3,"","",0,0,0,0,0,0)
  12230.             @Else
  12231.                @WinExec("notepad @qInstallPath1\\@qReadmeFile",1)  //1 means SW_SHOWNORMAL
  12232.             @EndIf
  12233.          @EndIf
  12234.       @EndIf
  12235.    @EndIf
  12236.  
  12237. laReboot:
  12238.    @CleanTemp()
  12239.  
  12240.    @iFuncRes = @AskReboot()
  12241.    @if     (@iAskReboot == 1)
  12242.       @ReBoot("",2)
  12243.    @elseif (@iAskReboot == 2)
  12244.       //Dont reboot
  12245.    @else
  12246.       @ErrorExit("@qAskRebootErrorMsg3",@iAbort)
  12247.    @endif
  12248.    
  12249. //   @EraseBMP(3)
  12250. //   @EraseBMP(2)
  12251. //   @EraseBMP(1)
  12252. //   @EraseBMP(0)
  12253.  
  12254.    @Abort
  12255. //   @Exit()
  12256. //??@EndFinish
  12257.  
  12258.  
  12259.  
  12260.