home *** CD-ROM | disk | FTP | other *** search
- ''--------------------------------------------------------------------
- '' AnyTime for Windows specific install functions
- '' Copyright (c) 1993 Individual Software, Inc.
- ''--------------------------------------------------------------------
-
-
- '' Variable for network installs - "0" = Standalone Version, "1" = Network Version
-
- CONST NETINSTALL% = 1
-
- '' Variable for Demo Install "1" = Demo Install
- CONST DEMO% = 1
-
- '' Set Stamp Constants
-
- CONST IDC_STAMP = 2000 ''EUB - See doc for details
-
- '' Set Version number - straight integers, no decimals
-
- CONST NewATWVerVal& = 3000
-
-
- '' Set up product-specific titles, etc.
- SUB SetProductTitles STATIC
- SetTitle "AnyTime for Windows" ''Setup Window Title
- ATWAPP$ = "AnyTime for Windows" ''Text under the icon
- END SUB
-
-
- FUNCTION InfFile() STATIC AS STRING
- InfFile = "ATW.INF"
- END FUNCTION
-
-
- FUNCTION MakeInstDir(D$) STATIC AS STRING
-
- S$ = D$ + ":\ANYWIN"
- MakeInstDir = S$
-
- END FUNCTION
-
-
- SUB AddInfSectionNames(BASE$, BASEINST$) STATIC
- '' These are the base files we can install
- ''--AddListItem BASE$, "Base Files"
- AddListItem BASE$, "Files"
- SetSymbolValue BASEINST$, GetSymbolValue(BASE$)
-
- END SUB
-
-
- SUB RecalcPath STATIC
- CursorSave% = ShowWaitCursor()
- RecalcOptFiles BASEFILES
- RestoreCursor CursorSave%
- END SUB
-
-
- SUB AddOptFiles STATIC
- AddOptFilesToCopyList BASEFILES
- END SUB
-
-
- SUB AddOptFilesToCopyList (ftype%) STATIC
-
- IF GetListItem(CHECKSTATES$, ftype%) = "ON" THEN
- SrcDir$ = GetSymbolValue("STF_SRCDIR")
- IF ftype% = BASEFILES THEN
- ''Base files
- l% = GetListLength(BASEINST$)
- FOR i% = 1 TO l% STEP 1
- AddSectionFilesToCopyList GetListItem(BASEINST$, i%), SrcDir$, DEST$
- NEXT i%
-
- ''----- AddSectionFilesToCopyList "AnyTime", SrcDir$, DEST$
- END IF
- SrcDir$ = ""
- END IF
-
- END SUB
-
-
- SUB SetDriveStatus STATIC
- FITS% = 0
- drive$ = MID$(DEST$, 1, 1)
-
- cost& = 3200000
- free& = GetFreeSpaceForDrive(drive$)
-
- '' i% = DoMsgBox("Total hard disk space required as reported by cost variable = "+str$(cost&), ATWAPP$, MB_OK)
-
-
- IF cost& > free& THEN
- FITS% = 1
- END IF
-
- ReplaceListItem DRIVETEXT$, 1, drive$ + ":"
- ReplaceListItem DRIVETEXT$, 2, STR$(cost& / 1024) + " K"
- ReplaceListItem DRIVETEXT$, 3, STR$(free& / 1024) + " K"
-
- END SUB
-
-
- '' Add billboard dialogs for this app
- SUB AddBillboards STATIC
- AddToBillboardList CUIDLL$, BBD1, "FModelessDlgProc", 100
- ' AddToBillboardList CUIDLL$, BBD6, "FModelessDlgProc", 100
- END SUB
-
-
- CONST IDC_STAMP2 = &H59 ''EUB - See doc for details
- CONST RT_STRING2 = 6 ''EUB
-
- SUB ConfigureApps STATIC
-
- '' This is so Uninstall can find where we're installed
- CreateIniKeyValue WININI$, "AnyTime for Windows", "Directory", DEST$, cmoOverwrite
-
- '' connect ourselves to the Extensions list so File Manager
- '' and others can launch us with a file
- CreateIniKeyValue WININI$, "Extensions", "atw", MakePath(DEST$,"anytime.exe ^.atw"), cmoOverwrite
-
- '' This is the name of the group we'll install into
- GROUP$ = "AnyTime for Windows"
-
- '' Configure base applications
- IF GetListItem(CHECKSTATES$, BASEFILES) = "ON" THEN
-
- MakeGroup:
- '' Create a group for us...
- CreateProgmanGroup GROUP$, "", cmoBackup
-
-
- '' Setup ATW Program
- CreateProgmanItem GROUP$, ATWAPP$, MakePath(DEST$,"ANYTIME.EXE"),"" , cmoOverwrite
- IF GROUP$ <> "STARTUP" THEN
- CreateProgmanItem GROUP$, "Read Me", "write.exe " + MakePath(DEST$, "readme.wri"), "", cmoOverwrite
- END IF
- END IF
-
-
- ''Stamp the ATWABOUT.DLL file
- IF len(STAMP$) > 0 THEN
- StampResource "Files", "ATW About", DEST$, RT_STRING2, IDC_STAMP2, STAMP$, STAMPLEN
- END IF
-
-
- IF DEMO% = 1 THEN
- INSTALLSTAMP$ = MakePath(DEST$,"ATWRES.DLL")
- DISKSTAMP$ = MakePath(CDDRV$,"ATWRES.DLL")
-
- dkw% = StampCurrentTimeDate(INSTALLSTAMP$,10)
- END IF
-
-
- END SUB
-
-
-
- '' Remove all files and directories...
-
- SUB DoUninstall STATIC
-
- END SUB
-
-