// Mesa prerelease installation file

// create directory if necessary
@directory      ABCD:      %1
@cd             ABCD:      %1

// Make sure template directory is there
@directory      ABCD:      %1\TEMPLATE

// copy default files
@copy        ABCD:      %0\README.TXT %1\README.TXT
@copy        ABCD:      %0\LICENSE.TXT %1\LICENSE.TXT

// copy unzip
@copy        ABCD:      %0\UNZIP.EXE %1\UNZIP.EXE

// copy program files
@pgm            A:      3 %1\unzip -o %0\program1.zip

// copy doc files
@pgm            B:      3 %1\unzip -o %0\docs.zip

// copy default templates
@pgm            D:      3 %1\unzip -o %0\template.zip

// flip disks
@disk          AC:      %0\disk.2

// copy program files
@pgm            A:      3 %1\unzip -o %0\program2.zip

// copy example files
@pgm            C:      3 %1\unzip -o %0\examples.zip


// replace the wppalet.dll
@mcopy          A: %1\wppalets.dl_ %1\wppalets.dll %1\wppalets.bkp
@del            A: %1\wppalets.dl_
@del            A: %1\wppalets.bkp

// replace the mesaprt.dll
@mcopy          A: %1\mesaprt.dl_ %1\mesaprt.dll %1\mesaprt.bkp
@del            A: %1\mesaprt.dl_
@del            A: %1\mesaprt.bkp

// unzip isn't needed anymore, delete it
@del         ABCD:      %1\UNZIP.EXE


// save installation path
@setini A: * MesaPR INSTALLATIONPATH %1

// Register Workplace Shell classes
// the new palettes
@class          E:      WPLineWidthPalette %1\WPPALETS.dll
@class          E:      WPLineStylePalette %1\WPPALETS.dll
@class          E:      WPMarkerPalette    %1\WPPALETS.dll
@class          E:      WPPatternPalette   %1\WPPALETS.dll

// the file classes
@class          E:      WPMesaFile         %1\MESAPRT.dll
@class          E:      WPMesaTemplateFile %1\MESAPRT.dll
@class          E:      WPMesaBackupFile   %1\MESAPRT.dll



// create objects
@var:           F:      <MESA2PR> 5
@wps:           F:
WPFolder
"Mesa 2|PreRelease"
OBJECTID=%5;
<WP_DESKTOP>
REPL

@wps:           F:
WPProgram
"Read Me!"
EXENAME=E.EXE;STARTUPDIR=%1;PARAMETERS=README.TXT;OBJECTID=<XXM2README>;
%5
R

@wps:           F:
WPProgram
"Mesa 2|PreRelease"
EXENAME=%1//Mesa2.EXE;STARTUPDIR=%1;OBJECTID=<XXM2EXE>;
%5
R

@wps:           (FB):
WPProgram
"Mesa 2 Online Documentation"
EXENAME=VIEW.EXE;STARTUPDIR=%1;PARAMETERS=MESA2DOC.INF;OBJECTID=<XXMESDOC>;
%5
R

@wps:           F:
WPPatternPalette
"Pattern Palette"
OBJECTID=<WP_PATPAL>;
%5
R

@wps:           F:
WPLineWidthPalette
"Line Width Palette"
OBJECTID=<WP_LINEWPAL>;
%5
R

@wps:           F:
WPLineStylePalette
"Line Style Palette"
OBJECTID=<WP_LINEPAL>;
%5
R

@wps:           F:
WPMarkerPalette
"Marker Palette"
OBJECTID=<WP_MARKPAL>;
%5
R

@WPS            F:
WPShadow
"Color Palette"
ShadowID=<WP_HIRESCLRPAL>;
%5
R

@WPS            F:
WPShadow
"Font Palette"
ShadowID=<WP_FNTPAL>;
%5
R


// add the templates as INI entries
@SETINI         D:      %1\Mesa2.INI  Mesa2 "lastTemplate 1" %1\TEMPLATE\Invoice.M2T
@SETINI         D:      %1\Mesa2.INI  Mesa2 "lastTemplate 2" %1\TEMPLATE\Expense.M2T


// Update CONFIG.SYS
@config         G:      %2\CONFIG.SYS %2\CONFIG.BAK LIBPATH .; START
@config         G:      %2\CONFIG.SYS %2\CONFIG.BAK "SET HELP" %1; END

