home *** CD-ROM | disk | FTP | other *** search
- // BINCODE.H - The header file
-
-
- // The following must be defined as _either_ SIMPLESETUP or COMPLEXSETUP
- //
- // Be sure to have these same lines in bincode1.h!!!
-
- //#define SIMPLESETUP
- #define COMPLEXSETUP
-
-
- #define WINPROC long FAR PASCAL
- #define DLGPROC BOOL FAR PASCAL
- #define WINDOWS_PARAMS HWND hWnd, unsigned msg, WORD wParam, LONG lParam
- #define DIALOG_PARAMS HWND hDlg, unsigned msg, WORD wParam, LONG lParam
-
- /************************ Function Prototypes *******************************/
-
- //----------------- BINCODE.C's Functions ----------------------------------
-
- int PASCAL WinMain ( HANDLE, HANDLE, LPSTR, int );
- BOOL CheckForEnoughDiskSpace ( void );
- int DisplayDialogBox ( LPSTR, FARPROC );
- WINPROC WndProc ( WINDOWS_PARAMS );
- void BackupProgmanIniFile ( void );
-
- //----------------- IO.C's Functions ----------------------------------------
-
- BOOL DosCopy ( LPSTR, LPSTR );
- BOOL CopyFile ( LPSTR, LPSTR, LPSTR, BOOL );
- void DosDelete ( char * );
- int DosMakeDir ( LPSTR );
- void InfFileOpen ( void );
- void InfFileClose ( void );
- int FileRead ( HANDLE, LPSTR, WORD );
- void CheckForCRLFandComment ( WORD *, WORD, LPSTR );
- int PositionInfPointer ( LPSTR );
-
- BOOL InitLZExpand ( BOOL );
- void DeInitLZExpand ( void );
- BOOL DosExpandCopy ( LPSTR, LPSTR );
-
- //----------------- DIALOGS.C's Functions -----------------------------------
-
- void CenterDialog ( HWND );
- BOOL ReallyCancel ( HWND );
- DLGPROC StartUpDlgProc ( DIALOG_PARAMS );
- BOOL FixupDirectory ( char * );
- DLGPROC InstallDirDlgProc ( DIALOG_PARAMS );
-
- #ifdef COMPLEXSETUP
-
- int IndexGivenIndex ( int );
- void AddItem ( HWND, HWND, int, BOOL );
- BOOL InPreviousSelection ( int *, int *, int, int );
- DLGPROC SelectDlgProc ( DIALOG_PARAMS );
-
- #endif
-
- DLGPROC InsertDiskDlgProc ( DIALOG_PARAMS );
- LPSTR CreateSourceDir ( int );
- LPSTR CreateSourceDisk ( int );
- void ChangeSourceDir ( int );
- LPSTR CreateDestDir ( int );
- DLGPROC FileCopyDlgProc ( DIALOG_PARAMS );
- void GetNextFileNumber ( int *, int * );
- DLGPROC IconCopyDlgProc ( DIALOG_PARAMS );
-
- //----------------- PARSE.C's Functions -------------------------------------
-
- BOOL JunkCharacter ( char );
- BOOL LoadLine ( void );
- void ParseLine ( char *, int * );
- void AddDiskInfo ( void );
- void FillDiskInfoStructures ( void );
- void SetFlags ( char *, int * );
- void AddFileInfo ( int * );
- void FillFileInfoStructures ( void );
- void AddDirInfo ( void );
- void FillDirInfoStructures ( void );
- void AddProgmanInfo ( void );
- void FillProgmanInfoStructures ( void );
- int TokenValue ( char * );
- void FillGlobalInfoStructures ( void );
-
-
- //----------------- PROGDDE.C's Functions -----------------------------------
-
- WINPROC ddeWndProc ( WINDOWS_PARAMS );
- BOOL ddeInit ( HANDLE );
- BOOL ddeTerminate ( HWND );
- void SetProgmanSize ( void );
- HWND ddeSendInitiate ( ATOM, ATOM );
- HWND ddeInitiate ( LPSTR, LPSTR );
- BOOL ddeWait ( HWND );
- BOOL ddeExec ( HWND, LPSTR );
- BOOL fmActivate ( PSTR );
- BOOL fmMinimize ( PSTR );
- HWND ProgmanManageGroup ( LPSTR, LPSTR, BOOL );
- BOOL ProgManClose ( void );
- BOOL ProgmanAddItem ( PSTR, PSTR );
-
- //----------------- DOS.ASM's Gloabl Functions ------------------------------
-
- extern LONG FAR PASCAL DosDiskFreeSpace ( int iDrive );
- extern int FAR PASCAL DosMkDir ( LPSTR szDir );
- extern int FAR PASCAL DosValidDir ( LPSTR szDir );
-
- /****************************************************************************/
-
- #define INFFILENAME "SETUP.INF" // .INF file name
-
- #define MAXFILES 50 // Must equal or surpass number of files in
- // INF file.
-
- #define MAXDISKS 5 // Must equal or surpass number of disks
- #define MAXDIRS 5 // Must equal or surpass number of child
- // child directories + 1 (parent)
-
- #define CHUNKSIZE (WORD)8192 // INF file cache size
- #define SECTIONSIZE (WORD)32768 // Max size of a INF section
-
- #define ID_PACKAGENAME 1 // .INF file parse section tokens
- #define ID_CAPTIONNAME 2
-
-
- typedef struct
- {
- BOOL bSelected; // TRUE copies the file
- BOOL bCompressed; // TRUE uses DosExpandCopy vs DosCopy
- BOOL bInvisible; // TRUE allows user to select file
- BOOL bProgmanIcon; // TRUE puts this file in ProgMan
- int ExtraFiles; // Number of dependant preceding files
- int Index; // Position in listbox (if visible)
-
- char ProgmanGroupNumber; // progman group number
- char DiskNumber; // Installation Disk Number
- char DirectoryNumber; // Destination Directory number
-
- LONG BytesRequired; // Size of file, in bytes
-
- char szMasterSrcDir[64]; // Source directory on floppy
- char szFileName[64]; // Source file name
- char szProgManName[32]; // Progman name
- char szDescription[80]; // Description of the program (listbox entry)
- char szComment[80]; // Comment about the program (info box)
- } FILEINFO;
-
- typedef struct
- {
- char DiskNumber; // Installation disk number, 0-9, A-Z
- char szSrcDir[64]; // Source directory
- char szDiskTitle[64]; // Name of disk
- } DISKINFO;
-
- typedef struct
- {
- char szDirectory[64]; // Name of destination directory
- char szDescription[64]; // Description of Destination directory
- } DIRINFO;
-
- typedef struct
- {
- char szCaption[64]; // Name of the caption on the window
- char szGroupFilename[64]; // Name of the filename of the group
- } PMANINFO;
-
- #ifdef INMAIN
-
- unsigned char Buffer[16385]; // Disk copy buffer
-
- int NumFiles; // Number of files in .INF
- int NumDisks; // Number of disks
- int NumDirs; // Number of directories
- int NumPManGroups; // Number of Progman Group Windows
- FILEINFO FileInfo[MAXFILES]; // Actual .INF file, all parsed up
- DISKINFO DiskInfo[MAXDISKS]; // Actual .INF file, all parsed up
- DIRINFO DirInfo [MAXDIRS]; // Actual .INF file, all parsed up
- PMANINFO PManInfo[MAXDIRS]; // Actual .INF file, all parsed up
- HANDLE hInfFile; // .INF File handle
- HANDLE hBuffer; // Cache for Inf file Section
- HANDLE hBuffer1; // Cache for .INF file
- LPSTR szBuffer; // .INF file section information
- LPSTR szBuffer1; // .INF file cache pointer
- HANDLE ghInst; // Instance
- HWND ghWnd; // Parent Handle
- HWND ghWndDDE; // DDE Window Handle
- char szCurrentInstallDir[80]; // Where SETUP.EXE was run from
-
- char szPackageName[80];
- char szCaptionName[80];
- char szAppName[] = "BINCODE";
-
- BOOL CopyError;
-
-
- #endif
- #ifndef INMAIN
-
- extern unsigned char Buffer[16385];
- extern int NumFiles;
- extern int NumDisks;
- extern int NumDirs;
- extern int NumPManGroups;
- extern FILEINFO FileInfo[MAXFILES];
- extern DISKINFO DiskInfo[MAXDISKS];
- extern DIRINFO DirInfo [MAXDIRS];
- extern PMANINFO PManInfo[MAXDIRS];
- extern HANDLE hInfFile;
- extern HANDLE hBuffer;
- extern HANDLE hBuffer1;
- extern LPSTR szBuffer;
- extern LPSTR szBuffer1;
- extern HANDLE ghInst;
- extern HWND ghWnd;
- extern HWND ghWndDDE;
- extern char szCurrentInstallDir[80];
- extern char szPackageName[80];
- extern char szCaptionName[80];
- extern char szAppName[];
- extern BOOL CopyError;
-
- #endif