home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD-ROM Today (BR) Volume 2 #10
/
CDROMTODAY_v2n10.iso
/
install
/
install.em1
< prev
next >
Wrap
Text File
|
1995-06-22
|
18KB
|
482 lines
//BAPI Installation of Science Fiction Archives Demo
//6.20.95 11.30 pm
@DefineProject
//Next two lines must match DISK.ID file exactly
@Name = "Science Fiction Archives"
@Version = "2D Build 2.0.5"
@Subdir = "\\SCIFI"
@OutDrive = C
@Requires @HardDisk
@AssumeHardDisk = @TRUE
@InDiskBell = @FALSE
@Immediate = @TRUE
@EndProject
@DefineVars
@Integer @WIN = 3
@Integer @SFFILES = 1000 // Size required for files
@Integer @TSIZE = @Eval(@SFFILES) // Total Sizes
@Integer @Red = @RGB(255,0,0) //DEFINE COLOR RED
@Integer @Green = @RGB(0,255,0) //DEFINE COLOR GREEN
@Integer @Blue = @RGB(0,0,255) //DEFINE COLOR BLUE
@Integer @Black = @RGB(0,0,0) //DEFINE COLOR BLACK
@Integer @V = @VideoCard
@Integer @UsingOldPM = @FALSE // Whether we could access the DDEML.DLL for @ProgramManager() calls
//@Qstring @WINSYSDIR = "@WINDIR\\system\\"
@Qstring @QTDATE = "1994/11/30"
@Qstring @GRPNAME = "@Name" // used for Group Name
@Qstring @ShowNormal = "" // used to show group normally
@Qstring @ShowMin = "" // used to show group minimized
@Qstring @ShowIcon = "" // used to show group iconized
@Qstring @SG = "" // used for Show Group command
@Qstring @PMLIST = "" // used for the @ProgramManager command
@Qstring @AI1 = "" // used for Adding Item 1 command
@Qstring @AI2 = "" // used for Adding Item 2 command
@Qstring @RI1 = "" // used for Replacing Item 1 command
@Qstring @RI2 = "" // used for Replacing Item 2 command
@Qstring @TTEnable = "@GetINI("TrueType","TTEnable")"
@Qstring @DiskAccess = "@GetINI("386enh","32BitDiskAccess","system.ini")"
@Qstring @MDriver = "@GetINI("boot.description","mouse.drv","system.ini")"
@Qstring @NetDriver = "@GetINI("boot","network.drv","system.ini")"
@Qstring @DispDriver = "@GetINI("boot","display.drv","system.ini")"
@Qstring @WinShell = "@GetINI("boot","shell","system.ini")"
@Qstring @WallPaper = "@GetINI("desktop","wallpaper")"
@Qstring @PSwapFile = "@GetINI("386Enh","PermSwapDOSDrive","system.ini")"
@Qstring @PSwapSize = "@GetINI("386Enh","PermSwapSizeK","system.ini")"
@Integer @InternalTest = @FALSE // for KDC Internal use.
@EndVars
//---------------------------------------------------------------------
//Intro Screen
@BackgroundMode(3,@Blue,@Black)
@Display
This program will install @Name
version @Version onto your computer system and
verify the integrity of the distribution files.
@Prompt="@Name"
@TitlePause
@EndDisplay
//------------------------------------------------------------------------
// Techie info only....Do not show any of this to the screen
/*
@Display
Your @CPU-based computer has the following system components:
Today's date ........................................................... @DateToStr(@SystemDate())
Your processor is an .............................................. 80@CPU
Your co-processor is .............................................. @If(@NDP)@!PRESENT @Else@!NOT PRESENT @EndIf
DOS version ............................................................ @OSMajor.@OSMinor
Total RAM memory ..................................................@Eval(@RAMTotal/1024)K
Total EXT memory .................................................. @Eval(@EXTTotal/1024)K
Bootdrive ................................................................. @BootDrive:
Startup Drive and Directory .....................................@StartUpDrive:@StartUpDir
Drive @OutDrive: is ................................................................ @If(@Removable(@outdrive))@!REMOVABLE @Else@!NON-REMOVABLE @EndIf
Drive @OutDrive: formatted capacity .................................... @Eval(@DiskSize(@outdrive)/1024000) MB
Drive @OutDrive: free space remaining ................................ @Eval(@DiskFree(@outdrive)/1024000) MB
The Location of @OutDrive: is ................................................ @if(@DriveRemote(@outdrive))@!REMOTE @Else@!LOCAL @Endif
Windows is located in ............................................ @WindowsDrive:@WindowsDir
Windows version .................................................... @WindowsMajor.@WindowsMinor
Windows current mode of operation ...................... @If(@WindowsMode == 1)@!STANDARD @ElseIf(@WindowsMode == 2)@!ENHANCED @Else@!REAL @EndIf
@Pause
@EndDisplay
@Display
Permanent Swap File Drive .................................@If("@PSwapFile" == "") N/A - TEMP SWAP FILE @Else @PSwapFile @EndIf
Permanent Swap File Size ..................................@If(@StrToInt(@PSwapSize) <= 0) N/A - TEMP SWAP FILE @Else @PSwapSize K @EndIf
True Type Fonts are ............................................ @If("@TTEnable" == "1")@!ENABLED @else@!DISABLED @EndIf
32BitDiskAccess is .............................................. @DiskAccess
SHELL is ............................................................... @WinShell
Wallpaper is ......................................................... @WallPaper
CD-ROM Drive ..................................................... @If(@CDRomTotal < 1)@!NOT PRESENT @Else @CDRomFirst@!: @EndIf
CD-ROM Driver Version ..................................... @If(@CDRomMajor == 0)@!NOT PRESENT @Else @CDRomMajor.@CDRomMinor@!: @EndIf
Display driver ...................................................... @DispDriver
Video card ............................................................@If(@V == 77 || @V == 72) MONO @ElseIf(@V == 69) EGA @ElseIf(@V == 86) VGA or better @ElseIf(@V == 67) CGA @Else UNKNOWN @EndIf
Video RAM ............................................................ @VideoRam@!K
Network ............................................................... @If(@Netbios)@!PRESENT @Else NOT PRESENT @EndIf
Network Driver is ................................................ @If(@StrLen("@NetDriver") < 1)@!NOT INSTALLED @Else@!@NetDriver @EndIf
Keyboard .............................................................. @If(@keyboard)@!ENHANCED @Else STANDARD @EndIf
Mouse Driver is ................................................... @MDriver
@Pause
@EndDisplay
//End of not showing this to the screen
*/
NEWDRIVE: // re-select drive if needed
//Prompt for target drive...CD-Rom, removables, floppies, excluded
@BackgroundMode(3,@Blue,@Black)
@DlgCtrlSize(0,9,15,15,27)
@GetOutDrive @OutDrive @Prompt = "Enter target drive"
@Suppress(0,17)
Please select the drive where you wish
@Name files to be
installed on your machine. Any drive
available can be used assuming you have
access rights to the drive you select, and
there is enough space available for installation.
@EndOutDrive
NEWDIR: // goto label for reselecting the base path (if needed).
@BackgroundMode(3,@Blue,@Black)
@DlgCtrlSize(0,7,0,8,35)
@GetSubdir @Subdir @Prompt = "Enter target subdirectory"
Please select the main subdirectory PATH where
you wish @Name files are to
be installed.
@EndSubdir
//------------------------------------------------------------------------
//Evaluate the selected drive for adequate free space
@TSIZE = @Eval((@SFFILES))
@If(@TSIZE*1024 > @DiskFree(@OutDrive))
@BackgroundMode(3,@Red,@Black)
@Display
The @Name requires
@TSIZE K bytes of free disk space.
The drive you have selected has only @Eval(@DiskFree(@OutDrive)/1K) K free.
Please select another drive.
@Pause
@EndDisplay
@GOTO NEWDRIVE
@EndIf // tsize>diskfree
@BackgroundMode(3,@Blue,@Black)
@SetOption(1600) @ClearOption(1700)
//-----------------------------------------------------------------------
//Make the subdirectory and copy the files to the subdirectory
NONINTERACTIVE:
@MkDir("@OutDrive:\\@Subdir")
//@Delete ("@WinDrive:\\@WinSysDir\\scifi.ttf")
//-----------------------------------------------------------------------
//Remove fonts, notify Windows, delete font files.
@SetINI("FONTS","SciFi Normal (True Type)","","WIN.INI")
@RemoveFont("Scifi.fot")
@Delete ("@WinDrive:\\@WinSysDir\\scifi.fot")
@SetINI("FONTS","SciFi 8, 8, 9, 10, 10, 12, 13, 14, 14, 15, 18, 21, 24 (96 dpi)","","WIN.INI")
@RemoveFont("Scifi.fon")
@Delete ("@WinDrive:\\@WinSysDir\\scifi.fon")
//------------------------------------------------------------------------
//Copy Files
@DefineDisk
@Label = "CD 1"
@File nimoy2d.ex_ @Out nimoy2d.exe
@File nimoy2d.in_ @Out nimoy2d.ini
@File lingo.in_ @Out lingo.ini
@File readme.txt @Out readme.txt
@File fileio.dl_ @Out fileio.dll
@File nimoy.ic_ @Out nimoy.ico
@File scifi.in_ @Out scifi.ini
@File scifi.tt_ @Out @WinDrive:\\@WinSysDir\\scifi.ttf
@File scifi.f_t @Out @WinDrive:\\@WinSysDir\\scifi.fot
@File scifi.f_n @Out @WinDrive:\\@WinSysDir\\scifi.fon
@EndDisk
//-------------------------------------------------------------------
//Prompt for windows group name
REENTERGRPNAME:
@DlgCtrlSize(0,6,12,7,45)
@GetString @GRPNAME @Prompt = "Enter Program Manager Group Name"
Please enter a name for the Windows Program group that will
be created during this installation. Valid group names may
contain spaces, and should be a minimum of at least 3 characters
and a maximum of 25 characters.
@EndString
@If(@StrLen("@GRPNAME") < 3 || @StrLen("@GRPNAME") > 25)
@Display
You entered an Windows group name invalid group name.
Please reenter a group name that is 3 - 25 characters long.
@Prompt="Invalid Group Name"
@TitlePause
@EndDisplay
@GOTO REENTERGRPNAME
@EndIf // if invalid GRPNAME
@ShowNormal = "[ShowGroup(@GrpName, 1)]" // used to show group normally
@ShowMin = "[ShowGroup(@GrpName, 6)]" // used to show group minimized
@ShowIcon = "[ShowGroup(@GrpName, 2)]" // used to show group iconized
@SG = "@ShowMin"
@If(@ProgramManager("[CreateGroup(@GRPNAME)]@SG") == -1)
@UsingOldPM = @TRUE
@Endif
//----------------------------------------------------------------------
//Set up Windows Items with icons
@RI1 = "[ReplaceItem(Sci Fi Demo)]"
@AI1 = "[AddItem(@Outdrive:\\@Subdir\\nimoy2d.exe, Sci Fi Demo, @OutDrive:\\@Subdir\\nimoy.ico, 0,,,@OutDrive:\\@Subdir)]"
@RI2 = "[ReplaceItem(Readme)]"
@AI2 = "[AddItem(WRITE.EXE @OutDrive:\\@Subdir\\readme.txt, Readme, @OutDrive:\\@Subdir\\nimoy.ico, 0)]"
//-----------------------------------------------------------------------
//Add fonts, notify Windows
@SetINI("FONTS","SciFi Normal (True Type)","@WinDrive:\\@WinSysDir\\scifi.fot","WIN.INI")
@AddFont("@WinDrive:\\@WinSysDir\\scifi.fot")
@SetINI("FONTS","SciFi 8, 8, 9, 10, 10, 12, 13, 14, 14, 15, 18, 21, 24 (96 dpi)","@WinDrive:\\@WinSysDir\\scifi.fon","WIN.INI")
@AddFont("@WinDrive:\\@WinSysDir\\scifi.fon")
@Display
@Cls
@Name will now install the necessary
Windows GROUP and ICONS as well as modify the PIF files
to reflect the installation path you entered during
the installation.
Click the OK button to continue.
@Prompt="@Name"
@If (!@InternalTest) @TitlePause @EndIf
@EndDisplay
@If(@WinVersion < 0x30A || @UsingOldPM)
// Installing under Windows 3.0 or Couldn't access the DDEML.DLL
@SG = "@ShowNormal"
@PMLIST = "@SG@AI1"
@ProgramManager("@PMLIST")
@Else
// if installing under windows 3.1 or greater & using DDEML.DLL
@SG = "@SHOWNormal"
@ProgramManager("@SG@RI1") @ProgramManager("@SG@AI1")
@ProgramManager("@SG@RI2") @ProgramManager("@SG@AI2")
@SG = "@ShowMin"
@ProgramManager("@SG")
@EndIf
@If(@WinVersion < 0x30A || @UsingOldPM)
// Installing under Windows 3.0 or Couldn't access the DDEML.DLL
@SG = "@ShowNormal"
@PMLIST = "@SG@AI2"
@Endif
//-------------------------------------------------------------------
//Prompts for Quicktime
@GetOption @Prompt = "Quicktime for Windows?"
Quicktime for Windows 2.0.1 or later is
required for optimal video playback.
Would you like the installer to
check your system for the
existence of Quicktime for
Windows?
@Option 20001 ="Yes"
@Option 20002= "No"
@EndOption
/*////////////////////////////////////////////////////////////////////////
// Make the ProgramManager full screen if started from DOS. (Whenever a
// program is launched directly from the command line when bringing up
// Windows, the ProgmanManager is iconized, this will make Progman full
// screen again when the installation is finished.
////////////////////////////////////////////////////////////////////////*/
@If(@Platform == @WIN)
@WinExec("PROGMAN", 1, 0)
@EndIf
//---------------------------------------------------------------------
//Check for QTW
@If (20001 [= @Option)
@If (@Exists ("@WindowsDrive:@WinSysDir\\mciqtw.drv"))
@If (@FileDate ("@WindowsDrive:\\@WinSysDir\\mciqtw.drv") >= @StrToDate("@qtdate"))
@BackgroundMode(3,@Blue,@Black)
@Display
@Cls
Setup has detected a valid version of
Quicktime for Windows in your system
@Prompt="@Name"
@If (!@InternalTest) @TitlePause @EndIf
@EndDisplay
@EndIf //filedate is good
@ElseIf (@Exists ("@WindowsDrive:@WinSysDir\\mciqtw.drv"))
@If (@FileDate ("@WindowsDrive:\\@WinSysDir\\mciqtw.drv") < @StrToDate("@qtdate"))
//Older QTW version found
@GetOption @Prompt = "Install Quicktime for Windows v2.0.1?"
An previous version of Quicktime for Windows has been detected.
When the setup program
finishes, do you want
to install an updated
version of Quicktime
for Windows?
@Option 20005 ="Yes"
@Option 20006= "No"
@EndOption
@EndIf //filedate is bad
@Else
//No previous QTW version found
@GetOption @Prompt = "Install Quicktime for Windows v2.0.1?"
Install does not detect Quicktime for Windows in your system.
When the setup program
finishes, do you want
to install an Quicktime
for Windows?
@Option 20005 ="Yes"
@Option 20006= "No"
@EndOption
@EndIf //Exists
@EndIf //Option 20001
//------------------------------------------------------------
//Launch QTW 2.0.1 Installer
@If ((20006 [= @Option) || (20002 [= @Option))
@BackgroundMode(3,@Blue,@Black)
@Display
@Cls
Quicktime for Windows 2.0.1 can be installed manually
from your cd-rom drive. Choose FILE-->RUN from the
Windows program manager and select
<cd-rom drive letter:>\scifi_2d\qt_setup\setup.exe
@Prompt="@Name"
@If (!@InternalTest) @TitlePause @EndIf
@EndDisplay
/*
@GetOption @Prompt = "View README file?"
Do you wish to read the README file immediately
after the installation has finished?
@Option 30001 = "Yes"
@Option 30002 = "No"
@EndOption
*/
@EndIf
//-------------------------------------------------------------------------------------
//Closing screen
@If (20005 [= @Option)
@Display
@Cls
@Name is finished installing. If you have any technical
or sales questions, please feel free to contact us at:
Global Interactive
12121 Wilshire Blvd, Suite 1001
Los Angeles, CA 90025
(800) 517-4738 Sales
(310) 442-7128 Fax
Hit OK to begin the Quicktime Installation Process
@Prompt="@Name"
@If (!@InternalTest) @TitlePause @EndIf
@EndDisplay
@Else
@Display
@Cls
@Name is finished installing. If you have any technical
or sales questions, please feel free to contact us at:
Global Interactive
12121 Wilshire Blvd, Suite 1001
Los Angeles, CA 90025
(800) 517-4738 Sales
(310) 442-7128 Fax
@Prompt="@Name"
@If (!@InternalTest) @TitlePause @EndIf
@EndDisplay
@EndIf//Closing Screen
//-------------------------------------------------------------------------------------
//Finish Block
@Finish
@If (20005 [= @Option)
@WinExec("@InDrive:\\scifi_2d\\qt_setup\\setup.exe",3,0)
@Exit
@EndIf //Install Quicktime
@EndFinish
/*////////////////////////////////////////////////////////////////////////
// View the README.NOW file with WRITE.EXE if it exists. (Windows only)
////////////////////////////////////////////////////////////////////////*/
/*
@If(@Platform == @WIN && 30001 [= @Option)
@If(@Exists("@OutDrive:\\@Subdir\\README.TXT") && @Exists("@WindowsDrive:\\@WindowsDir\\WRITE.EXE"))
@WinExec("WRITE @OutDrive:\\@Subdir\\README.TXT", 3)
@Exit
@EndIf
@EndIf
*/
/*////////////////////////////////////////////////////////////////////////
// Ordinarily you may also wish to have an @FINISH block at this point. It
// is not required, and only has the advantage of being executed after files
// have been installed if you are not using the @IMMEDIATE mode (see the
// manual for more information regarding @IMMEDIATE and @FINISH). This
// @FINISH block will also be executed after a @SETCONFIG or @SETAUTOEXEC
// block has been executed. We did not use either of these last two blocks
// in this script. They are only necessary if you wish to modify the
// CONFIG.SYS and AUTOEXEC.BAT files during the installation.
////////////////////////////////////////////////////////////////////////*/
@Exit
/*End - of - File */