Category : BASIC Source Code
Archive   : VINST8.ZIP
Filename : SETUP1.GLB

 
Output of file : SETUP1.GLB contained in archive : VINST8.ZIP
DefInt A-Z

' ----------------------------------------------------
' Globals for this program only - defined at bottom of
' this module.
' ----------------------------------------------------
Global gCrLf$
Global gProgName$
Global gTitleName$
Global gDefaultDrv$
Global gDefaultDir$
Global gIconName$
Global gGroupName$
Global gExeName$
Global gNumGroups%
Global gArrayAllGroups$(1 To 50)
Global gAllowChange%
Global gNumDirectories%
Global gCancelCommand%
Global gRenPath$
Global gRenFile$
Global gSkip%
Global gHelpPath$
Global gDupReturn%
Global gTmpSource$
Global gTmpCopyOver%
Global gTmpSize&
Global gDirSizesF&(1 To 3)
Global gDirSizes&()
Global gFontName$
Global gInstallDir%()
Global gFrameWidth%
Global gUnName$

' ----------------------------------------------------
' General global constants
' ----------------------------------------------------
Global Const NULL_ZERO = 0&
Global Const MODAL = 1
Global Const MODELESS = 0


' ----------------------------------------------------
' OF_EXIST paramter simply causes a test for a files
' existence. OpenFile will return the file handle if
' it exists or OpenFile returns -1 if the file does not
' exist.
' ----------------------------------------------------
Global Const OF_EXIST = &H4000


Type ADir
Dir As String * 128
Dependent As String * 1
Title As String * 16
IsGreyed As Integer
End Type
Global gArrayDirectories() As ADir



' ----------------------------------------------------
' Structure used to save returned values from OpenFile
' NOTE: note the normal 4 byte "reserved" field in
' the OFSTRUCT needs to be changed to two byte
' fields r1 and r2.
' NOTE: This type definition must appear before the
' API declaration because lpReOpenBuff is
' defined "AS OFSTRUCT" in the OpenFile API
' function declaration
' ----------------------------------------------------
Type OFSTRUCT
cBytes As String * 1
fFixedDisk As String * 1
nErrCode As Integer
r1 As Integer
r2 As Integer
szPathName As String * 128
End Type


' ----------------------------------------------------
' Array of all files except those going to Windows and
' Windows/System directory
' ----------------------------------------------------
Type WS2Array
sFileName As String * 12
lFileSize As Long
sDir As String * 128
iDirNum As Integer
End Type
Global gAllFiles() As WS2Array


' ----------------------------------------------------
' Array of files going to Windows and Windows/System
' directory -- also Help files
' ----------------------------------------------------
Type WSArray
sFileName As String * 12
lFileSize As Long
End Type
Global gSysArray() As WSArray
Global gWinArray() As WSArray
Global gHelpArray() As WSArray


' ----------------------------------------------------
' This type is used by array of drives
' ----------------------------------------------------
Type DrvArray
cDrive As String * 1
DirSize As Long
End Type


' ----------------------------------------------------
' This type is used in Dest_Dir
' ----------------------------------------------------
Type AFiles
cTitle As String * 16
iCheck As Integer
cPath As String * 78
cSize As String * 8
iDependent As Integer
iGreyed As Integer
End Type


' ----------------------------------------------------
' Globals for 3-d look on form
' ----------------------------------------------------
Global Const CTLRECESSED = 0 ' Frame is recessed.
Global Const CTLRAISED = -1 ' Frame is raised.
Global Const BKGNDGRAY = 192 ' Background Gray.
Global Const DARKGRAY = 64 ' Dark Gray.
Global Const LIGHTGRAY = 255 ' Light Gray (white).
Global Const DEFAULTWIDTH = 1 ' Default Frame Width


' --------------------------------------------------------
' Windows Declares
' --------------------------------------------------------
Declare Function GetWindowsDirectory% Lib "Kernel" (ByVal lpBuffer$, ByVal nSize%)
Declare Function GetSystemDirectory% Lib "Kernel" (ByVal lpBuffer$, ByVal nSize%)
Declare Function BitBlt Lib "Gdi" (ByVal destHdc%, ByVal X%, ByVal Y%, ByVal W%, ByVal H%, ByVal srcHdc%, ByVal srcX%, ByVal srcY%, ByVal Rop&)
Declare Function OpenFile% Lib "Kernel" (ByVal lpFileName$, lpReOpenBuff As OFSTRUCT, ByVal wStyle%)

Declare Function WinExec% Lib "Kernel" (ByVal lpCmdLine$, ByVal nCmdShow%)
Declare Function FindWindow Lib "User" (ByVal lpClassName As Any, ByVal lpCaption As Any)
Declare Sub SetActiveWindow Lib "User" (ByVal hWnd)

Declare Function GetPrivateProfileString% Lib "Kernel" (ByVal lpApplicationName$, ByVal lpKeyName$, ByVal lpDefault$, ByVal lpReturnedString$, ByVal nSize%, ByVal lpFileName$)
Declare Function GetPrivateProfileInt% Lib "Kernel" (ByVal lpApplicationName$, ByVal lpKeyName$, ByVal nDefault%, ByVal lpFileName$)

Declare Function GetProfileString% Lib "Kernel" (ByVal lpAppName As String, ByVal lpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Integer)
Declare Function GetProfileInt% Lib "Kernel" (ByVal lpAppName$, ByVal lpKeyName$, ByVal nDefault%)

Declare Function WritePrivateProfileString% Lib "Kernel" (ByVal lpApplicationName$, ByVal lpKeyName$, ByVal lpString$, ByVal lplFileName$)
Declare Function WriteProfileString% Lib "Kernel" (ByVal lpApplicationName$, ByVal lpKeyName$, ByVal lpString$)

Declare Function GetVersion% Lib "Kernel" ()
Declare Function GetModuleHandle% Lib "kernel" (ByVal ModuleName$)
Declare Function GlobalCompact& Lib "KERNEL" (ByVal dwMinFree&)
Declare Function GetModuleFileName% Lib "kernel" (ByVal hModule%, ByVal ModuleName$, ByVal nSize%)


' --------------------------------------------------------
' Setup Kit Declares
' --------------------------------------------------------
Declare Sub GetFileVersion Lib "SETUPKIT.DLL" (ByVal FileName$, ByVal szBuf$, ByVal LenBuf%)
Declare Function DiskSpaceFree& Lib "SETUPKIT.DLL" ()
Declare Function AllocUnit& Lib "SETUPKIT.DLL" ()
Declare Function SetTime% Lib "SETUPKIT.DLL" (ByVal A$, ByVal b$)
Declare Function VerInstallFile& Lib "VER.DLL" (ByVal Flags%, ByVal SrcFile$, ByVal DestFile$, ByVal SrcPath$, ByVal DestPath$, ByVal CurrDir$, ByVal TmpFile$, lpwTmpFileLen%)


' --------------------------------------------------------
' MsgBox parameters
' --------------------------------------------------------
Global Const MB_OK = 0 ' OK button only
Global Const MB_OKCANCEL = 1 ' OK and Cancel buttons
Global Const MB_ABORTRETRYIGNORE = 2 ' Abort, Retry, and Ignore buttons
Global Const MB_YESNOCANCEL = 3 ' Yes, No, and Cancel buttons
Global Const MB_YESNO = 4 ' Yes and No buttons
Global Const MB_RETRYCANCEL = 5 ' Retry and Cancel buttons
Global Const MB_ICONSTOP = 16 ' Critical message
Global Const MB_ICONQUESTION = 32 ' Warning query
Global Const MB_ICONEXCLAMATION = 48 ' Warning message
Global Const MB_ICONINFORMATION = 64 ' Information message

Global Const MB_APPLMODAL = 0 ' Application Modal Message Box
Global Const MB_DEFBUTTON1 = 0 ' First button is default
Global Const MB_DEFBUTTON2 = 256 ' Second button is default
Global Const MB_DEFBUTTON3 = 512 ' Third button is default
Global Const MB_SYSTEMMODAL = 4096 ' System Modal


' --------------------------------------------------------
' MsgBox return values
' --------------------------------------------------------
Global Const IDOK = 1 ' OK button pressed
Global Const IDCANCEL = 2 ' Cancel button pressed
Global Const IDABORT = 3 ' Abort button pressed
Global Const IDRETRY = 4 ' Retry button pressed
Global Const IDIGNORE = 5 ' Ignore button pressed
Global Const IDYES = 6 ' Yes button pressed
Global Const IDNO = 7 ' No button pressed


' --------------------------------------------------------
' VerInstallFile() flags
' --------------------------------------------------------
Global Const VIFF_FORCEINSTALL% = &H1
Global Const VIFF_DONTDELETEOLD% = &H2
Global Const OF_DELETE% = &H200

Global Const VIF_TEMPFILE& = &H1
Global Const VIF_MISMATCH& = &H2
Global Const VIF_SRCOLD& = &H4
Global Const VIF_DIFFLANG& = &H8
Global Const VIF_DIFFCODEPG& = &H10
Global Const VIF_DIFFTYPE& = &H20
Global Const VIF_WRITEPROT& = &H40
Global Const VIF_FILEINUSE& = &H80
Global Const VIF_OUTOFSPACE& = &H100
Global Const VIF_ACCESSVIOLATION& = &H200
Global Const VIF_SHARINGVIOLATION& = &H400
Global Const VIF_CANNOTCREATE& = &H800
Global Const VIF_CANNOTDELETE& = &H1000
Global Const VIF_CANNOTRENAME& = &H2000
Global Const VIF_CANNOTDELETECUR& = &H4000
Global Const VIF_OUTOFMEMORY& = &H8000
Global Const VIF_CANNOTREADSRC& = &H10000
Global Const VIF_CANNOTREADDST& = &H20000
Global Const VIF_BUFFTOOSMALL& = &H40000

' -------------------------------------------------------
' Definitions of globals
' -------------------------------------------------------
' gGroupName$ -- Default name of the new group (if create new group), from INI, retreived in GetIniParms
' gExeName$ --Name of the EXE file(s), from INI, retreived in GetIniParms
' gDefaultDrv$ -- Drive letter of Default drive (one character), from INI, retreived in GetIniParms
' gDefaultDir$ -- Initial default directory to install executable, from INI, retreived in GetIniParms, can be modified in Dest_Dir form
' gNumGroups% -- Number of groups in ProgMan, set in GetProgMan, use in form PickGroup
' gArrayAllGroups$(1 To 50) -- Assumes no more than 50 groups in ProgMan, set in GetProgMan, use in form PickGroup
' gAllowChange% -- Determies if Dest_Dir form is used, from INI, retreived in GetIniParms0
' gNumDirectories% -- Number of different directories to install to, from INI, retreived in GetIniParms0, used in many places
' gCancelCommand% -- Hit Cancel Button?, used in many places
' gRenPath$ -- Used to rename an existing file, used to return info from File_Exists form
' gRenFile$ -- Used to rename an existing file, used to return info from File_Exists form
' gTmpSource$ -- Needed for File_Exists
' gTmpCopyOver% -- Needed for File_Exists
' gTmpSize& -- Needed for File_Exists
' gSkip% -- Skip the file? Used to return info from File_Exists form
' gHelpPath$ -- The HELP file path, from INI, retreived in GetIniParms0, can be modified in Dest_Dir form
' gDupReturn% -- Return from Duplicate_Icon form
' gDirSizesF&(1 To 3) -- Uncorrected sizes of files in Win(1), Sys(2), and Help(3)
' gDirSizes&() -- Uncorrected sizes of files for each directory (can be 1 to 99)
' gFontName$ -- based on Win 3.0 or 3.1
' gInstallDir%() -- Array of all directories (except Win, Sys, and Help) telling whether to install or not - set in Dest_Dir
' gFrameWidth% -- Width of 3d frame (in pixels) - Used in 3-Draw.BAS, set in several forms

' gArrayDirectories() -- Array of directories based on type ADir (.Dir, .Dependent, .Title, .IsGreyed)
' gAllFiles() -- Array of files in all directories (except Win, System, and Help) based on the type WS2Array (sFileName, lFileSize, sDir, iDirNum)
' gWinArray() -- Array of files in Windows directory based on the type WSArray(sFileName, lFileSize)
' gSysArray() -- Array of files in System directory based on the type WSArray(sFileName, lFileSize)
' gHelpArray() -- Array of files in Help directory based on the type WSArray(sFileName, lFileSize)
' gUnName$ -- name of uninstall ini file



  3 Responses to “Category : BASIC Source Code
Archive   : VINST8.ZIP
Filename : SETUP1.GLB

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/