home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-04-08 | 31.9 KB | 1,499 lines |
- ''***************************************************************************
- '' File : INST_MV.MST
- ''***************************************************************************
-
- ''$DEFINE DEBUG ''Define for script development/debugging
-
- '$INCLUDE 'inst_mv.con'
- '$INCLUDE 'inst_mv.glb'
- '$INCLUDE 'inst_mv.dec'
- '$INCLUDE 'setupapi.inc'
- '$INCLUDE 'msdetect.inc'
- '$INCLUDE 'conf_mv.mst'
-
- ''***************************************************************************
- '' Function : INIT
- ''***************************************************************************
-
- INIT:
-
- '' Check on version
-
- major% = GetWindowsMajorVersion()
- minor% = GetWindowsMinorVersion()
-
- '' Ensure 3.1 or above
-
- IF ( (major% < 3) OR ( (major% = 3) AND (minor% < 1) ) ) THEN
-
- '' Display message box as warning
-
- mess_ret% = DoMsgBox("Setup requires version 3.1 of Windows or above to install correctly","Setup",MB_OK)
-
- '' Drop out BEFORE attempting to call the DLL
-
- END
-
- END IF
-
- '' Set exit procedure
-
- ON ERROR GOTO QUIT
-
- '' Do initialisation required in case exit occurs
-
- HELPPROC$ = "FHelpDlgProc"
- ZoomWindow(HwndFrame())
-
- CUIDLL$ = "mv_inst.dll"
- g_wait_cursor% = -1
-
- '' Look for installation level
-
- src_inf$ = GetSymbolValue("STF_SRCINFPATH")
- IF src_inf$ = "" THEN
- src_inf$ = GetSymbolValue("STF_CWDDIR")
- END IF
- temp_file$ = src_inf$ + "X.INS"
-
- IF DoesFileExist(temp_file$,femExist) = 1 THEN
-
- '' Set global to indicate that X values should be around
-
- g_X_in_inf_file% = TRUE%
-
- '' Logo bitmap is displayed and our title set up
-
- g_product_name$ = "MultiView/X"
- SetBitmap CUIDLL$, LOGO_X
-
- ELSE
-
- '' Not expecting an X installation
-
- g_X_in_inf_file% = FALSE%
-
- '' Logo bitmap is displayed and our title set up
-
- g_product_name$ = "MultiView DeskTop"
- SetBitmap CUIDLL$, LOGO
-
- END IF
-
- g_tempdir$ = GetSymbolValue("STF_CWDDIR")
-
- ''msg% = DoMsgBox(g_tempdir$,"temp dir", MB_OK)
-
- '' DEV619 Get the windows operating system ie 3.1, 95, ot NT
- g_i_WinVersion% = Is32BitOperatingSystem(g_tempdir)
-
-
- SetTitle "Installation of " + g_product_name$
-
- '' Set up initial symbol tables et cetera
-
- PerformInitialisation
-
- '' Check files on the system for existing installation
-
- g_first_inst% = TestFirstInstallation%
-
- '' Display welcome box - No longer needed
-
- '' DisplayWelcomeDialog
-
- '' Check for first installation
-
- IF (g_first_inst% = TRUE%) THEN
-
- '' Take input from serial number and key if not previously installed
-
- CheckSerialKey
-
- '' Now get path for installation - note return values, etc, are set
- '' up in the global symbol table. Only done if not upgrading
-
- if ( GetSymbolValue(INST_METHOD$) = "2" ) THEN
- '' KEVFIX 16-07-96 Upgrade of serial & modem code to 5.01 new rs232
- BFXNetType$ = GetIniKeyString(MakePath(g_win_dir$, "mview.ini"), "Install Network", "cursel")
- IF BFXNetType$ = "direct" THEN
- CreateIniKeyValue MakePath(g_win_dir$, "mview.ini"),"Install Network","cursel","rs232",cmoAll
- ELSE
- IF BFXNetType$ = "modem" THEN
- CreateIniKeyValue MakePath(g_win_dir$, "mview.ini"),"Install Network","cursel","modem232",cmoAll
- ENDIF
- ENDIF
- UpgradeSerialSupport
- ELSE
-
- GetInstallationPath
-
- ENDIF
-
- ELSE
-
- '' Need to check if demo version installed
-
- CheckForDemoInstallation(HwndFrame())
-
- g_change_serial_no$ = GetSymbolValue("ChangeSerialNo")
-
- '' DEV 453
- IF ( g_change_serial_no$ = "FALSE" ) THEN
-
- '' Do nothing
-
- ELSE
-
- '' Change of serial number is required - BFX471
-
- CheckSerialKey
-
- burn_ok% = burn(MakePath(g_path_name$,"MVIEW.EXE"), TRUE%, FALSE%, "99/99999999", 2)
-
- IF burn_ok% = FALSE% THEN
-
- burn_ok% = burn(MakePath(g_path_name$,"MVIEW.EXE"), TRUE%, FALSE%, "JSBJSBJSB??", 2)
-
- ENDIF
-
- burn_ok% = burn(MakePath(g_path_name$,"MXFER.EXE"), TRUE%, FALSE%, "99/99999999", 1)
-
- IF burn_ok% = FALSE% THEN
-
- burn_ok% = burn(MakePath(g_path_name$,"MXFER.EXE"), TRUE%, FALSE%, "JSBJSBJSB??", 1)
-
- ENDIF
-
- ENDIF
-
- ENDIF
-
- RESTART_INST:
-
- '' Now go to standard install dialog to pick off options needed
-
- GetSystemConfiguration
-
- '' First test for all flags set, disk space OK etc
-
- inst_ok% = TestInstallationSetup%
-
- '' If this is OK then perform the installation
-
- IF inst_ok% = TRUE% THEN
-
- PerformInstallation
-
- ELSE
-
- CheckReconfigOption
-
- '' Re-run config section
-
- GOTO RESTART_INST
-
- ENDIF
-
- '' Test if program manager group option needed (first installation) and if win32 printing program is to be called
-
- IF g_first_inst% = TRUE% THEN
-
- '' do the win32 printing install
-
- ConfigPrinter
-
- '' Get required name, etc, for progman group
-
- ProgmanGroupOption
-
- ELSE
-
- '' See if X is around
-
- IF g_X_in_inf_file% = TRUE% THEN
-
- AddXProgmanDetails
-
- END IF
-
- ENDIF
-
- '' Display exit box - this can reflect error or standard exit OK
-
- ExitDialog
-
- '' End of function : INIT
-
- ''***************************************************************************
- '' Function : PerformInitialisation
- ''***************************************************************************
-
- SUB PerformInitialisation STATIC
-
- '' Set up strings for dialog
-
- InitialiseStrings(HwndFrame())
-
- '' Check initialisation successful - BFX 205
-
- IF GetSymbolValue(INITIALISE_DONE$) = "No" THEN
-
- '' Initialisation unsuccessful
-
- g_exit_flag% = EXIT_ERROR%
-
- '' Exit program
-
- ExitDialog
-
- ENDIF
-
- '' Get drive and directory with windows on
-
- g_win_dir$ = GetWindowsDir
- g_win_drive$ = MID$(GetWindowsDir, 1, 1)
-
- '' Initialise global path name value and VSL name
-
- g_path_name$ = GetSymbolValue(PATH_NAME$)
- g_vsl_name$ = MakePath(g_path_name$, "VSL")
- g_tcp_dir$ = MakePath(g_path_name$, "TCP")
- g_sys_dir$ = MakePath(g_win_dir$, "SYSTEM")
- g_setup_dir$ = MakePath(g_path_name$, "SETUP")
-
- '' BFX184
- g_language_dir$ = MakePath(g_path_name$, "LANGUAGE")
-
- '' BFX310
- g_script_dir$ = MakePath(g_path_name$, "SCRIPT")
-
-
- '' Set up path for the file information (.INF) file
-
- g_src_inf$ = GetSymbolValue("STF_SRCINFPATH")
-
- IF g_src_inf$ = "" THEN
- g_src_inf$ = GetSymbolValue("STF_CWDDIR")
- END IF
-
-
- '' Read all information from the disk layout file
-
- file_name$ = g_src_inf$ + "MVIEWF.INF"
- ReadInfFile file_name$
-
- '' Set up source directory
-
- g_src_inf$ = GetSymbolValue("STF_SRCDIR")
-
- '' Initialise drive, status and overflow symbols
-
- FOR i_loop% = 1 TO 4 STEP 1
-
- AddListItem STATUSTEXT$, ""
-
- NEXT i_loop%
-
- FOR i_loop% = 1 TO 4 STEP 1
-
- AddListItem BIGLIST$, ""
-
- NEXT i_loop%
-
- FOR i_loop% = 1 TO 6 STEP 1
-
- AddListItem DRIVETEXT$, ""
-
- NEXT i_loop%
-
- FOR i_loop% = 1 TO 26 STEP 1
-
- AddListItem EXTRA$, "0"
-
- NEXT i_loop%
-
- '' Set all global flags to defaults
-
- actual_install% = FALSE%
- g_exit_flag% = EXIT_OK%
- g_first_inst% = TRUE%
- g_host_set% = TRUE%
- g_network_set% = TRUE%
- g_JSB_set% = TRUE%
- g_tcpip_ok% = TRUE%
- g_add_auto% = FALSE%
-
- g_update_all% = TRUE%
- g_update_desk% = TRUE%
- g_update_net% = TRUE%
- g_update_X% = TRUE%
-
- '' BFX440 - initialise g_change_serial_no as FALSE
- g_change_serial_no$ = "FALSE"
-
- END SUB
-
- '' End of function : PerformInitialisation
-
- ''***************************************************************************
- '' Function : DisplayWelcomeDialog
- ''***************************************************************************
-
- SUB DisplayWelcomeDialog STATIC
-
- STARTWELCOME:
-
- '' Display standard message box
-
- dialog_return$ = UIStartDlg(CUIDLL$, WELCOME, "Welcome",APPHELP, HELP_PROC$)
-
- SELECT CASE dialog_return$
-
- CASE REACTIVATE$
-
- '' Simply redisplay dialog
-
- GOTO STARTWELCOME
-
- CASE EXIT_VAL$
-
- '' Set exit flag to incomplete
-
- g_exit_flag% = EXIT_INCOMPLETE%
-
- '' Call exit procedure
-
- ExitDialog
-
- '' Redisplay dialog
-
- GOTO STARTWELCOME
-
- CASE ELSE
-
- '' Remove welcome window and continue
-
- UIPop 1
-
- END SELECT
-
- END SUB
-
- '' End of function : DisplayWelcomeDialog
-
- ''***************************************************************************
- '' Function : CheckSerialKey
- ''***************************************************************************
-
- SUB CheckSerialKey STATIC
-
- '' BFX440 - Display information dialog for serial no and activation key
-
- '' BFX572 - Popup message if it is not an upgrade
-
- Upgrade$ = GetSymbolValue("Product_Upgrade")
-
- IF ( g_change_serial_no$ = "FALSE" ) AND (Upgrade$ <> "Yes" ) THEN
-
- SetSymbolValue "PopupSymbol", "2"
-
- dialog_return$ = UIStartDLg(CUIDLL$, POPUP_MESSAGE, "PopupMessage" ,APPHELP, HELP_PROC$)
-
- ENDIF
-
- STARTKEY:
-
- '' Serialisation key checking - if Continue then assume this is OK as
- '' dialog routine will do actual checking
-
- dialog_return$ = UIStartDlg(CUIDLL$, SERIALISE, "Serialise",APPHELP, HELP_PROC$)
-
- SELECT CASE dialog_return$
-
- CASE REACTIVATE$
-
- '' Simply redisplay dialog
-
- GOTO STARTKEY
-
- CASE EXIT_VAL$
-
- UIPop 2
-
- '' Set exit flag to incomplete
-
- g_exit_flag% = EXIT_INCOMPLETE%
-
- '' Call exit procedure
-
- ExitDialog
-
- '' Redisplay dialog - continue must have been requested
-
- IF ( g_change_serial_no$ = "FALSE" ) AND (P_Upgrade$ <> "Yes" ) THEN
-
- SetSymbolValue "PopupSymbol", "2"
-
- dialog_return$ = UIStartDLg(CUIDLL$, POPUP_MESSAGE, "PopupMessage" ,APPHELP, HELP_PROC$)
-
- ENDIF
-
- '' Redisplay dialog - continue must have been requested
-
- GOTO STARTKEY
-
- CASE ELSE
-
- '' BFX440 - Remove serialise window and continue - else assumed as OK
-
- IF ( g_change_serial_no$ = "FALSE" ) AND (P_Upgrade$ <> "Yes" ) THEN
-
- UIPop 2
- ELSE
-
- UIPop 1
- ENDIF
-
- END SELECT
-
- END SUB
-
- '' End of function : CheckSerialKey
-
- ''***************************************************************************
- '' Function : GetInstallationPath
- ''***************************************************************************
-
- SUB GetInstallationPath STATIC
-
- STARTPATH:
-
- '' Call path dialog - needs help function adding
-
- dialog_return$ = UIStartDlg(CUIDLL$, DESTPATH, "PathName",APPHELP, HELP_PROC$)
-
- SELECT CASE dialog_return$
-
- CASE REACTIVATE$
-
- '' Simply redisplay dialog
-
- GOTO STARTPATH
-
- CASE EXIT_VAL$
-
- '' Set exit flag to incomplete
-
- g_exit_flag% = EXIT_INCOMPLETE%
-
- '' Call exit procedure
-
- ExitDialog
-
- '' Redisplay dialog - continue must have been requested
-
- GOTO STARTPATH
-
- CASE ELSE
-
- '' Assume Continue - check path is valid. First take name
- '' from symbol table
-
- new_name$ = GetSymbolValue(PATH_NAME$)
-
- '' Ensure that this is valid
-
- '' BFX171
-
- IF (GetSymbolValue(VALID_PATH$) = "0") THEN
-
- '' Call basic error message box
-
- DisplayBadPathMessage
-
- '' Re-display full dialog box
-
- GOTO STARTPATH
-
- ENDIF
-
- '' At this point the path is acceptable so continue - store path
-
- g_path_name$ = new_name$
- g_vsl_name$ = MakePath(g_path_name$, "VSL")
- g_tcp_dir$ = MakePath(g_path_name$, "TCP")
- g_setup_dir$ = MakePath(g_path_name$, "SETUP")
-
- '' BFX184
- g_language_dir$ = MakePath(g_path_name$, "LANGUAGE")
-
- '' BFX310
- g_script_dir$ = MakePath(g_path_name$, "SCRIPT")
-
- '' Remove path dialog
-
- UIPop 1
-
- END SELECT
-
- END SUB
-
- '' End of function : GetInstallationPath
-
- ''***************************************************************************
- '' Function : DisplayBadPathMessage
- ''***************************************************************************
-
- SUB DisplayBadPathMessage STATIC
-
- STARTBADPATH:
-
- '' Call bad path dialog
-
- dialog_return$ = UIStartDlg(CUIDLL$, BADPATH, "BadPath",0, "")
-
- SELECT CASE dialog_return$
-
- CASE REACTIVATE$
-
- '' Simply redisplay dialog
-
- GOTO STARTBADPATH
-
- CASE ELSE
-
- '' Remove bad path dialog
-
- UIPop 1
-
- END SELECT
-
- END SUB
-
- '' End of function : DisplayBadPathMessage
-
- ''***************************************************************************
- '' Function : GetSystemConfiguration
- ''***************************************************************************
-
- SUB GetSystemConfiguration STATIC
-
- STARTCONFIG:
-
- '' Set up size values
-
- CalculateSizeNeeded
-
- '' Now display values
-
- SetDriveStatus
-
- '' Call configuration box - help needs adding
-
- dialog_return$ = UIStartDlg(CUIDLL$, CUSTINST2, "MainConfig",APPHELP, HELP_PROC$)
-
- SELECT CASE dialog_return$
-
- CASE REACTIVATE$
-
- '' Simply redisplay dialog
-
- GOTO STARTCONFIG
-
- CASE EXIT_VAL$
-
- '' Set exit flag to incomplete
-
- g_exit_flag% = EXIT_INCOMPLETE%
-
- '' Call exit procedure - i.e. query user's wish to exit
-
- ExitDialog
-
- '' Restart dialog - if continue was called then re-initialise
- '' the dialog box in case disk space, etc, has changed since
- '' the request to exit was made
-
- GOTO STARTCONFIG
-
- CASE INSTALL$
-
- '' Remove current window and continue with installation
-
- UIPop 1
-
- CASE X_WARN$
-
- '' Test for warning message
-
- tcp_ok% = DisplayTCPWarning%
-
- IF tcp_ok% = TRUE% THEN
-
- '' Remove current window and continue with installation
-
- UIPop 1
-
- ELSE
-
- '' Re-display
-
- GOTO STARTCONFIG
-
- END IF
-
- CASE X_WARN_HOST$
-
- '' Test for warning message
-
- tcp_ok% = DisplayTCPWarning%
-
- IF tcp_ok% = TRUE% THEN
-
- GetHostNameForSystem
-
- '' If host was set OK then continue
-
- IF g_host_set% = TRUE% THEN
-
- UIPop 1
-
- ELSE
-
- '' Otherwise clear flag and re-configure
-
- g_host_set% = TRUE%
-
- GOTO STARTCONFIG
-
- ENDIF
-
- ELSE
-
- '' Re-display
-
- GOTO STARTCONFIG
-
- END IF
-
- CASE JSB_INST_WARN$
-
- '' BFX532: Following code commented out as warning dialog is
- '' no longer required
-
- '' Test for warning message
-
- '' jsb_ok% = DisplayJSBWarning%
-
- ''IF jsb_ok% = TRUE% THEN
-
- '' Remove current window and continue with installation
-
- UIPop 1
-
- ''ELSE
-
- '' Re-display
-
- '' GOTO STARTCONFIG
-
- '' END IF
-
- '' ..BFX532
-
- CASE GETCONFIG_WARN$
-
- '' Test for warning message
-
- jsb_ok% = DisplayJSBWarning%
-
- IF jsb_ok% = TRUE% THEN
-
- GetJSBConfiguration
-
- '' If JSB set value is OK then continue with installation
-
- IF g_JSB_set% = TRUE% THEN
-
- '' Remove current window and continue with installation
-
- UIPop 1
-
- ELSE
-
- '' Otherwise clear flag and re-configure
-
- g_JSB_set% = TRUE%
-
- GOTO STARTCONFIG
-
- ENDIF
-
- ELSE
-
- '' Re-display
-
- GOTO STARTCONFIG
-
- END IF
-
- CASE JSB_CONFIG_ADD$
-
- GetJSBConfiguration
-
- '' If JSB set value is OK then continue with installation
-
- IF g_JSB_set% = TRUE% THEN
-
- '' Remove current window and continue with installation
-
- UIPop 1
-
- ELSE
-
- '' Otherwise clear flag and re-configure
-
- g_JSB_set% = TRUE%
-
- GOTO STARTCONFIG
-
- ENDIF
-
- CASE HOST_NAME_ADD$
-
- GetHostNameForSystem
-
- '' If host was set OK then continue
-
- IF g_host_set% = TRUE% THEN
-
- UIPop 1
-
- ELSE
-
- '' Otherwise clear flag and re-configure
-
- g_host_set% = TRUE%
-
- GOTO STARTCONFIG
-
- ENDIF
-
- CASE DESKTOP$
-
- '' Call desktop configuration function
-
- GetDesktopConfigurationOptions
-
- '' Return to the main dialog
-
- GOTO STARTCONFIG
-
- CASE X_OPTION$
-
- '' Call X configuration function
-
- GetXConfigurationOptions
-
- '' Return to the main dialog
-
- GOTO STARTCONFIG
-
- CASE NET_OPTION$
-
- '' Call Network configuration function
-
- GetNetworkConfigurationOptions
-
- '' Return to the main dialog
-
- GOTO STARTCONFIG
-
- CASE ELSE
-
- '' Exit as an error - should never happen
-
- g_exit_flag% = EXIT_ERROR%
-
- '' Call exit procedure - this will exit regardless
-
- ExitDialog
-
- END SELECT
-
- END SUB
-
- '' End of function : GetSystemConfiguration
-
- ''***************************************************************************
- '' Function : PerformInstallation
- ''***************************************************************************
-
- SUB PerformInstallation STATIC
-
- '' Set global to actual install
-
- actual_install% = TRUE%
-
- '' Build copy list
-
- ClearCopyList
- AddApplicationFiles
- AddDesktopFiles
- AddNetworkFiles
- AddXFiles
-
- '' Add billboards if this is first installation
-
- ClearBillboardList
-
- '' See if x application files are going on
-
- x_add$ = GetSymbolValue("X_Addition")
-
- IF g_first_inst = TRUE% OR x_add$ = "Yes" THEN
-
- FOR i_loop% = 1 TO NUM_BOARDS STEP 1
-
- AddToBillBoardList CUIDLL$, BILLBOARD1, "FModelessDlgProc", 1
-
- NEXT i_loop%
-
- END IF
-
- '' Set the position of the copy gauge away from dead centre
-
- width% = GetScreenWidth()
- height% = GetScreenHeight()
-
- '' Get new position for dialog - note 190 & 90 lifted from GAUGE.DLG and
- '' this will need changing if necessary
-
- new_pos_x% = ReturnDialogPixels( DIALOG_WIDTH, 190, width% )
- new_pos_y% = ReturnDialogPixels( DIALOG_HEIGHT, 90, height% )
-
- SetCopyGaugePosition new_pos_x%, new_pos_y%
-
- CopyFilesInCopyList
-
- '' Now do a hard copy to overwrite the .LST file with the one needed
- '' for hard disk operations if a first installation
-
- x_add$ = GetSymbolValue("X_Addition")
-
- IF ( (g_first_inst% = TRUE%) OR (x_add$ = "Yes") ) THEN
-
- CopyFile MakePath(g_setup_dir$,"SETUP.NEW"), MakePath(g_setup_dir$,"SETUP.LST"), cmoOverwrite, 0
-
- END IF
-
- '' Copy required translation DLL to translat.dll - BFX184
-
- translat_dll$ = GetSymbolValue ( LANGUAGE$ )
-
- IF DoesFileExist ( MakePath(g_language_dir$, translat_dll$), femRead ) = 1 THEN
-
- CopyFile MakePath(g_language_dir$, translat_dll$), MakePath(g_path_name$,"TRANSLAT.DLL"), cmoOverwrite, 0
-
- ENDIF
-
- '' Check symbol if 'C' wants to force autoupdate
-
- test_auto$ = GetSymbolValue("ForceAutoCheck")
-
- '' If an update to files is required, get values
-
- IF ( (g_first_inst% = TRUE%) OR (g_add_auto% = TRUE%) OR (test_auto$ = "Yes") ) THEN
-
- '' BFX532: Only ask for autoexec updating if not upgrading
-
- IF ( GetSymbolValue ( INST_METHOD$ ) = "2" ) THEN
-
- ELSE
-
- '' Get level of autoexec updating required
-
- TestAutoExec
-
- ENDIF
-
- '' ...bfx532
-
- END IF
-
- '' Update .INI files for latest values
-
- UpdateAllFiles(HwndFrame())
-
-
- '' Get terminal type here if this is a first installation
-
- '' BFX530 handle errros when updating files
-
- F_Error$ = "No"
-
- F_Error$ = GetSymbolValue("File_Error")
-
- IF F_Error$ = "Yes" THEN
-
- g_exit_flag% = EXIT_ERROR%
-
- '' Call exit procedure - this will exit regardless
-
- ExitDialog
-
- END IF
-
- '' Get terminal type here if this is a first installation
-
- IF ( GetSymbolValue ( INST_METHOD$ ) <> "2" ) AND ( g_first_inst% = TRUE% ) THEN
-
- GetTermLogin
-
- ENDIF
-
- '' Clear remaining values
-
- RemoveSymbol("DesktopNames")
- RemoveSymbol("DesktopOptions")
- RemoveSymbol("NetworkOptions")
- RemoveSymbol("XNames")
-
- '' If this is first installation then add serial number to desktop
-
- IF (g_first_inst% = TRUE%) THEN
-
- burn_ok% = burn(MakePath(g_path_name$,"MVIEW.EXE"), TRUE%, FALSE%, "NULL", 2)
-
- burn_ok% = burn(MakePath(g_path_name$,"MXFER.EXE"), TRUE%, FALSE%, "NULL", 1)
-
- ELSE
-
- burn_ok% = TRUE
-
- ENDIF
-
- '' See if burn OK
-
- IF burn_ok% THEN
-
- '' Do nothing
-
- ELSE
-
- '' Inform user
-
- SerialisationFailed
-
- '' Flag error
-
- g_exit_flag% = EXIT_ERROR%
-
- '' Call exit procedure - this will exit regardless
-
- ExitDialog
-
- END IF
-
- END SUB
-
- '' End of function : PerformInstallation
-
- ''***************************************************************************
- '' Function : ProgmanGroupOption
- ''***************************************************************************
-
- SUB ProgmanGroupOption STATIC
-
- STARTPROGMAN:
-
- '' Offer new or add to existing group - needs help function
-
- dialog_return$ = UIStartDlg(CUIDLL$, PROGMANGROUP, "ProgmanOption",APPHELP, HELP_PROC$)
-
- SELECT CASE dialog_return$
-
- CASE REACTIVATE$
-
- '' Simply redisplay dialog
-
- GOTO STARTPROGMAN
-
- CASE ELSE
-
- '' Assume continue has been selected - remove dialog and
- '' add group
-
- UIPop 1
-
- AddNewProgmanDetails
-
- END SELECT
-
- END SUB
-
- '' End of function : ProgmanGroupOption
-
- ''***************************************************************************
- '' Function : HostAddressFunction
- ''***************************************************************************
-
- SUB HostAddressFunction STATIC
-
- STARTHOSTADDRESS:
-
- '' Offer new or add to existing group - needs help function
-
- dialog_return$ = UIStartDlg(CUIDLL$, HOSTADDRESS, "GetHostAddress",0, "")
-
- SELECT CASE dialog_return$
-
- CASE REACTIVATE$
-
- '' Simply redisplay dialog
-
- GOTO STARTHOSTADDRESS
-
- CASE ELSE
-
- '' Assume continue has been selected - remove dialog
-
- UIPop 1
-
- END SELECT
-
- END SUB
-
- '' End of function : HostAddressFunction
-
- ''***************************************************************************
- '' Function : ExitDialog
- ''***************************************************************************
-
- SUB ExitDialog STATIC
-
- SELECT CASE g_exit_flag%
-
- CASE EXIT_INCOMPLETE%
-
- STARTQUERY:
- '' Display query exit
-
- dialog_return$ = UIStartDlg(CUIDLL$, ASKQUIT, "ExitQuery", 0, "")
-
- SELECT CASE dialog_return$
-
- CASE REACTIVATE$
-
- '' Simply redisplay dialog
-
- GOTO STARTQUERY
-
- CASE EXIT_VAL$
-
- '' Clear dialog
-
- UIPop 1
-
- '' Call exit procedure and don't change exit flag
-
- ExitDialogAction
-
- CASE ELSE
-
- '' Reset exit flag to OK
-
- g_exit_flag% = EXIT_OK%
-
- '' Clear dialog
-
- UIPop 1
-
- END SELECT '' For dialog returns
-
- CASE ELSE
-
- '' Call Dialog to perform exit action as this is where an error
- '' or full installation has occurred
-
- ExitDialogAction
-
- END SELECT
-
- END SUB
-
- '' End of function : ExitDialog
-
- ''***************************************************************************
- '' Function : ExitDialogAction
- ''***************************************************************************
-
- SUB ExitDialogAction STATIC
-
- '' Reset cursor if necessary
-
- IF g_wait_cursor% <> -1 THEN
-
- RestoreCursor g_wait_cursor%
- g_wait_cursor% = -1
-
- END IF
-
- '' An exit has been requested - clear any dialogs
-
- UIPopAll
-
- '' This checks local copies of unlisted drivers. Added here at CUT I
- '' to avoid leaving the files behind if an error exit occurs during
- '' installation. If files don't exist then this call will have no
- '' effect.
-
- DeleteUnlistedDrivers(HwndFrame())
-
- '' Switch on the setting of the global error flag
-
- SELECT CASE g_exit_flag%
-
- CASE EXIT_OK%
-
- force$ = GetSymbolValue ("ForceAuto")
-
- IF ( (g_add_auto% = TRUE%) OR (force$ = "Yes")) THEN
-
- '' All installation and configuration OK - autoexec changed
-
- SetSymbolValue "ExitSymbol" , "1"
-
- ELSE
-
- '' All installation and configuration OK
-
- SetSymbolValue "ExitSymbol" , "2"
-
- END IF
-
- CASE EXIT_INCOMPLETE%
-
- '' Installation was not completed
-
- SetSymbolValue "ExitSymbol" , "3"
-
- '' Update any files
-
- TestRestoreFiles
-
- CASE EXIT_ERROR%
-
- '' Display error message
-
- SetSymbolValue "ExitSymbol" , "4"
-
- '' Update any files
-
- TestRestoreFiles
-
- CASE EXIT_WINDOWS%
-
- '' Display error message
-
- SetSymbolValue "ExitSymbol" , "6"
-
- CASE ELSE
-
- '' Exit flag has been corrupted - treat as special case
- '' of error exit
-
- SetSymbolValue "ExitSymbol" , "5"
-
- '' Update any files
-
- TestRestoreFiles
-
- END SELECT
-
- '' Display dialog
-
- STARTEXITMESSAGE:
-
- '' Call exit message
-
- '' BFX490 Tonyr : Execute the readme.txt file after a succesfull exit
-
- '' BFX532: Added code to give user option to display readme.txt
- '' if a successful installation
-
- IF ( g_exit_flag% = EXIT_OK%) AND ( g_first_inst% = TRUE%) THEN
-
- dialog_return$ = UIStartDlg(CUIDLL$, EXIT_AND_README, "ExitMessage",0, "")
-
- ELSE
-
- dialog_return$ = UIStartDlg(CUIDLL$, EXITQUIT, "ExitMessage",0, "")
-
- END IF
-
- SELECT CASE dialog_return$
-
- CASE REACTIVATE$
-
- '' Simply redisplay dialog
-
- GOTO STARTEXITMESSAGE
-
- CASE EXIT_VAL$
-
- '' Remove dialog
-
- UIPop 1
-
- CASE ELSE
-
- '' Remove dialog
-
- UIPop 1
-
- IF ( g_exit_flag% = EXIT_OK%) AND ( g_first_inst% = TRUE%) THEN
-
- '' Display readme file
-
- ExecReadmeFile(MakePath(g_path_name$,"README.TXT"))
-
- '' BFX572 Load X readme as well if X version found.
-
- IF g_X_in_inf_file% = TRUE% THEN
-
- ExecReadmeFile(MakePath(g_path_name$,"README_X.TXT"))
-
- END IF
-
- ENDIF
-
- END SELECT
-
- '' Setup script finished - note this is the only standard exit
-
- END
-
- END SUB
-
- '' End of function : ExitDialogAction
-
- ''***************************************************************************
- '' Function : TestFirstInstallation
- ''***************************************************************************
-
- FUNCTION TestFirstInstallation% STATIC
-
- '' Check value of symbol set up from DLL
-
- first$ = GetSymbolValue(FIRST_INST$)
-
- '' Set flag to true or false
-
- IF first$ = "Yes" THEN
-
- TestFirstInstallation% = TRUE%
-
- '' Store source string
-
- CreateIniKeyValue MakePath(g_win_dir$, "mview.ini"),"Install Path","Source",g_src_inf$, cmoOverwrite
-
- ELSE
-
- TestFirstInstallation% = FALSE%
-
- '' Update source string with stored value
-
- g_src_inf$ = GetIniKeyString(MakePath(g_win_dir$, "mview.ini"),"Install Path","Source")
-
- END IF
-
- END FUNCTION
-
- '' End of function : TestFirstInstallation
-
- ''***************************************************************************
- '' Function : DisplayTCPWarning
- ''***************************************************************************
-
- FUNCTION DisplayTCPWarning% STATIC
-
- STARTWARN:
-
- dialog_return$ = UIStartDlg(CUIDLL$, TCPWARNING, "TCPWarning",0, "")
-
- SELECT CASE dialog_return$
-
- CASE REACTIVATE$
-
- '' Simply redisplay dialog
-
- GOTO STARTWARN
-
- CASE EXIT_VAL$
-
- '' Set return to FALSE
-
- DisplayTCPWarning% = FALSE%
-
- '' Remove dialog and continue
-
- UIPop 1
-
- CASE ELSE
-
- '' Set return to TRUE - assuming continue
-
- DisplayTCPWarning% = TRUE%
-
- '' Remove dialog and continue
-
- UIPop 1
-
- END SELECT
-
- END FUNCTION
-
- '' End of function : DisplayTCPWarning
-
- ''***************************************************************************
- '' Function : DisplayJSBWarning
- ''***************************************************************************
-
- FUNCTION DisplayJSBWarning% STATIC
-
- STARTJSBWARN:
-
- dialog_return$ = UIStartDlg(CUIDLL$, JSBWARNING, "JSBWarning",0, "")
-
- SELECT CASE dialog_return$
-
- CASE REACTIVATE$
-
- '' Simply redisplay dialog
-
- GOTO STARTJSBWARN
-
- CASE EXIT_VAL$
-
- '' Set return to FALSE
-
- DisplayJSBWarning% = FALSE%
-
- '' Remove dialog and continue
-
- UIPop 1
-
- CASE ELSE
-
- '' Set return to TRUE - assuming continue
-
- DisplayJSBWarning% = TRUE%
-
- '' Remove dialog and continue
-
- UIPop 1
-
- END SELECT
-
- END FUNCTION
-
- '' End of function : DisplayJSBWarning
-
- ''***************************************************************************
- '' Function : TestAutoExec
- ''***************************************************************************
-
- SUB TestAutoExec STATIC
-
- '' Get type of autoexec update required - done in 'C' section
-
- STARTAUTO:
-
- dialog_return$ = UIStartDlg(CUIDLL$, AUTOEXEC, "AutoexecCheck",0, "")
-
- SELECT CASE dialog_return$
-
- CASE REACTIVATE$
-
- '' Simply redisplay dialog
-
- GOTO STARTAUTO
-
- CASE ELSE
-
- '' Remove dialog and continue
-
- UIPop 1
-
- END SELECT
-
- END SUB
-
- ''End of function : TestAutoExec
-
- ''***************************************************************************
- '' Function : TestRestoreFiles
- ''***************************************************************************
-
- SUB TestRestoreFiles STATIC
-
- '' If this is first installation or an X addition to an existing setup
- '' tidy up the .ini files
-
- '' See if x application files are going on
-
- x_add$ = GetSymbolValue("X_Addition")
-
- if ( (g_first_inst% = TRUE%) OR (x_add$ = "Yes") ) THEN
-
- '' Remove MVIEW.ini file
-
- RemoveFile g_win_dir$ + "MVIEW.INI", cmoForce
-
- '' Rename .BAK file
-
- IF (DoesFileExist(GetWindowsDir() + "MVIEW.BAK", femExists) ) THEN
-
- RenameFile g_win_dir$ + "MVIEW.BAK", "MVIEW.INI"
-
- ENDIF
-
- '' Remove BUTTONS.ini file
-
- RemoveFile g_win_dir$ + "BUTTONS.INI", cmoForce
-
- '' Rename .BAK file
-
- IF (DoesFileExist(GetWindowsDir() + "BUTTONS.BAK", femExists) ) THEN
-
- RenameFile g_win_dir$ + "BUTTONS.BAK", "BUTTONS.INI"
-
- ENDIF
-
- ENDIF
-
- END SUB
-
- '' End of function : TestRestoreFiles
-
- ''***************************************************************************
- '' Function : QUIT
- ''***************************************************************************
-
- QUIT:
-
- '' Set global error flag
-
- g_exit_flag% = EXIT_ERROR%
-
- '' Call standard error dialog - this token is used to allow use of
- '' ON ERROR GOTO command
-
- ExitDialog
-
- END
-
- ''End of function : QUIT
-