home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Today (BR) Volume 2 #10 / CDROMTODAY_v2n10.iso / install / install.dat < prev    next >
Text File  |  1995-06-25  |  17KB  |  471 lines

  1. //BAPI Installation of Science Fiction Archives Demo
  2. //6.20.95  11.30 pm
  3.  
  4.  
  5. @DefineProject
  6.     //Next two lines must match DISK.ID file exactly
  7.     @Name = "Science Fiction Archives"
  8.     @Version = "2D Build 2.0.7 Final Beta"           
  9.  
  10.     @Subdir = "\\SCIFI"
  11.     @OutDrive = C
  12.     @Requires @HardDisk
  13.     @AssumeHardDisk = @TRUE
  14.     @InDiskBell = @FALSE
  15.     @Immediate = @TRUE
  16. @EndProject
  17.  
  18. @DefineVars
  19.     @Integer @WIN          = 3
  20.     @Integer @SFFILES     = 1000   // Size required for files
  21.     @Integer @TSIZE        = @Eval(@SFFILES) // Total Sizes
  22.     @Integer @Red          = @RGB(255,0,0) //DEFINE COLOR RED
  23.     @Integer @Green        = @RGB(0,255,0) //DEFINE COLOR GREEN
  24.     @Integer @Blue         = @RGB(0,0,255) //DEFINE COLOR BLUE
  25.     @Integer @Black        = @RGB(0,0,0)   //DEFINE COLOR BLACK
  26.     @Integer @V            = @VideoCard
  27.     @Integer @UsingOldPM   = @FALSE  // Whether we could access the DDEML.DLL for @ProgramManager() calls
  28.     //@Qstring @WINSYSDIR    = "@WINDIR\\system\\"
  29.     @Qstring @QTDATE       = "1994/11/30"
  30.     @Qstring @GRPNAME      = "@Name" // used for Group Name
  31.     @Qstring @ShowNormal   = "" // used to show group normally
  32.     @Qstring @ShowMin      = "" // used to show group minimized
  33.     @Qstring @ShowIcon     = "" // used to show group iconized
  34.     @Qstring @SG           = "" // used for Show Group command
  35.     @Qstring @PMLIST       = "" // used for the @ProgramManager command
  36.     @Qstring @AI1          = "" // used for Adding Item 1 command   
  37.     @Qstring @AI2          = "" // used for Adding Item 2 command   
  38.     @Qstring @RI1          = "" // used for Replacing Item 1 command   
  39.     @Qstring @RI2          = "" // used for Replacing Item 2 command   
  40.     @Qstring @TTEnable     = "@GetINI("TrueType","TTEnable")"
  41.     @Qstring @DiskAccess   = "@GetINI("386enh","32BitDiskAccess","system.ini")"
  42.     @Qstring @MDriver      = "@GetINI("boot.description","mouse.drv","system.ini")"
  43.     @Qstring @NetDriver    = "@GetINI("boot","network.drv","system.ini")"
  44.     @Qstring @DispDriver   = "@GetINI("boot","display.drv","system.ini")"
  45.     @Qstring @WinShell     = "@GetINI("boot","shell","system.ini")"
  46.     @Qstring @WallPaper    = "@GetINI("desktop","wallpaper")"
  47.     @Qstring @PSwapFile    = "@GetINI("386Enh","PermSwapDOSDrive","system.ini")"
  48.     @Qstring @PSwapSize    = "@GetINI("386Enh","PermSwapSizeK","system.ini")"
  49.     @Integer @InternalTest = @FALSE // for KDC Internal use.
  50. @EndVars
  51.  
  52.  
  53. //---------------------------------------------------------------------
  54. //Intro Screen
  55.  
  56. @BackgroundMode(3,@Blue,@Black)
  57. @Display
  58.  This program will install @Name 
  59.  version @Version  onto your computer system and 
  60.  verify the integrity of the distribution files.
  61. @Prompt="@Name"
  62. @TitlePause
  63. @EndDisplay
  64.  
  65. //-------------------------------------------------------------------
  66. //Prompt for windows group name
  67.  
  68. REENTERGRPNAME:
  69. @DlgCtrlSize(0,6,12,7,45)
  70. @GetString @GRPNAME @Prompt = "Enter Program Manager Group Name"
  71. Please enter a name for the Windows Program group that will 
  72. be created during this installation.  Valid group names may 
  73. contain spaces, and should be a minimum of at least 3 characters 
  74. and a maximum of 25 characters.
  75.  
  76. @EndString
  77.  
  78. @If(@StrLen("@GRPNAME") < 3 || @StrLen("@GRPNAME") > 25)
  79. @Display
  80. You entered an Windows group name invalid group name.  
  81. Please reenter a group name that is 3 - 25 characters long.
  82. @Prompt="Invalid Group Name"
  83. @TitlePause
  84. @EndDisplay
  85. @GOTO REENTERGRPNAME
  86.  
  87. @EndIf // if invalid GRPNAME
  88.  
  89.  
  90. @ShowNormal   = "[ShowGroup(@GrpName, 1)]" // used to show group normally
  91. @ShowMin      = "[ShowGroup(@GrpName, 6)]" // used to show group minimized
  92. @ShowIcon     = "[ShowGroup(@GrpName, 2)]" // used to show group iconized
  93.  
  94. @SG = "@ShowMin"
  95. @If(@ProgramManager("[CreateGroup(@GRPNAME)]@SG") == -1)
  96.     @UsingOldPM = @TRUE
  97. @Endif
  98.  
  99. //------------------------------------------------------------------------
  100. //   Techie info only....Do not show any of this to the screen
  101. /*
  102. @Display
  103.     Your @CPU-based computer has the following system components:                       
  104.  
  105. Today's date ........................................................... @DateToStr(@SystemDate())
  106. Your processor is an .............................................. 80@CPU
  107. Your co-processor is .............................................. @If(@NDP)@!PRESENT @Else@!NOT PRESENT @EndIf
  108. DOS version ............................................................ @OSMajor.@OSMinor
  109. Total RAM memory ..................................................@Eval(@RAMTotal/1024)K
  110. Total EXT memory .................................................. @Eval(@EXTTotal/1024)K
  111. Bootdrive ................................................................. @BootDrive:
  112. Startup Drive and Directory .....................................@StartUpDrive:@StartUpDir
  113. Drive @OutDrive: is ................................................................ @If(@Removable(@outdrive))@!REMOVABLE @Else@!NON-REMOVABLE @EndIf
  114. Drive @OutDrive: formatted capacity .................................... @Eval(@DiskSize(@outdrive)/1024000) MB
  115. Drive @OutDrive: free space remaining ................................ @Eval(@DiskFree(@outdrive)/1024000) MB
  116. The Location of @OutDrive: is ................................................ @if(@DriveRemote(@outdrive))@!REMOTE @Else@!LOCAL @Endif
  117. Windows is located in ............................................ @WindowsDrive:@WindowsDir
  118. Windows version .................................................... @WindowsMajor.@WindowsMinor
  119. Windows current mode of operation ...................... @If(@WindowsMode == 1)@!STANDARD @ElseIf(@WindowsMode == 2)@!ENHANCED @Else@!REAL @EndIf
  120. @Pause
  121. @EndDisplay
  122.  
  123. @Display 
  124. Permanent Swap File Drive .................................@If("@PSwapFile" == "") N/A - TEMP SWAP FILE @Else @PSwapFile @EndIf
  125. Permanent Swap File Size ..................................@If(@StrToInt(@PSwapSize) <= 0) N/A - TEMP SWAP FILE @Else @PSwapSize K @EndIf
  126. True Type Fonts are ............................................ @If("@TTEnable" == "1")@!ENABLED @else@!DISABLED @EndIf
  127. 32BitDiskAccess is .............................................. @DiskAccess
  128. SHELL is ............................................................... @WinShell
  129. Wallpaper is ......................................................... @WallPaper
  130. CD-ROM Drive ..................................................... @If(@CDRomTotal < 1)@!NOT PRESENT @Else @CDRomFirst@!: @EndIf
  131. CD-ROM Driver Version ..................................... @If(@CDRomMajor == 0)@!NOT PRESENT @Else @CDRomMajor.@CDRomMinor@!: @EndIf
  132. Display driver ...................................................... @DispDriver
  133. 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
  134. Video RAM ............................................................ @VideoRam@!K
  135. Network ............................................................... @If(@Netbios)@!PRESENT @Else NOT PRESENT @EndIf
  136. Network Driver is ................................................ @If(@StrLen("@NetDriver") < 1)@!NOT INSTALLED @Else@!@NetDriver @EndIf
  137. Keyboard .............................................................. @If(@keyboard)@!ENHANCED @Else STANDARD @EndIf
  138. Mouse Driver is ................................................... @MDriver
  139. @Pause
  140. @EndDisplay
  141.  
  142. //End of not showing this to the screen
  143. */
  144.  
  145.  
  146. NEWDRIVE:  // re-select drive if needed
  147.  
  148. //Prompt for target drive...CD-Rom, removables, floppies, excluded
  149. @BackgroundMode(3,@Blue,@Black)
  150. @DlgCtrlSize(0,9,15,15,27)
  151. @GetOutDrive @OutDrive @Prompt = "Enter target drive"
  152. @Suppress(0,17)
  153. Please select the drive where you wish
  154. @Name files to be 
  155. installed on your machine.  Any drive
  156. available can be used assuming you have
  157. access rights to the drive you select, and
  158. there is enough space available for installation.
  159. @EndOutDrive
  160.  
  161.  
  162. NEWDIR: // goto label for reselecting the base path (if needed).
  163.  
  164. @BackgroundMode(3,@Blue,@Black)
  165. @DlgCtrlSize(0,7,0,8,35)
  166. @GetSubdir @Subdir @Prompt = "Enter target subdirectory"
  167. Please select the main subdirectory PATH where
  168. you wish @Name files are to 
  169. be installed.  
  170. @EndSubdir
  171.  
  172. //------------------------------------------------------------------------
  173. //Evaluate the selected drive for adequate free space
  174.  
  175. @TSIZE = @Eval((@SFFILES))
  176. @If(@TSIZE*1024 > @DiskFree(@OutDrive))
  177.     @BackgroundMode(3,@Red,@Black)
  178.     @Display
  179.     The @Name requires
  180.     @TSIZE K bytes of free disk space.  
  181.     The drive you have selected has only @Eval(@DiskFree(@OutDrive)/1K) K free.
  182.          
  183.         Please select another drive.
  184.                                     @Pause
  185.  
  186.     @EndDisplay
  187.     @GOTO NEWDRIVE
  188. @EndIf  // tsize>diskfree
  189.  
  190. @BackgroundMode(3,@Blue,@Black)
  191. @SetOption(1600) @ClearOption(1700)
  192.  
  193.  
  194. //-----------------------------------------------------------------------
  195. //Make the subdirectory and copy the files to the subdirectory
  196.  
  197. NONINTERACTIVE:
  198.  
  199. @MkDir("@OutDrive:\\@Subdir")
  200. //@Delete ("@WinDrive:\\@WinSysDir\\scifi.ttf")
  201.  
  202. //-----------------------------------------------------------------------
  203. //Remove fonts, notify Windows, delete font files.
  204.  
  205. @SetINI("FONTS","SciFi Normal (True Type)","","WIN.INI")
  206. @RemoveFont("Scifi.fot")
  207. @Delete ("@WinDrive:\\@WinSysDir\\scifi.fot")
  208. @SetINI("FONTS","SciFi 8, 8, 9, 10, 10, 12, 13, 14, 14, 15, 18, 21, 24 (96 dpi)","","WIN.INI")
  209. @RemoveFont("Scifi.fon")
  210. @Delete ("@WinDrive:\\@WinSysDir\\scifi.fon")
  211.  
  212. //------------------------------------------------------------------------
  213. //Copy Files
  214.  
  215. @DefineDisk
  216.     @Label = "CD 1"
  217.     @File nimoy2d.ex_      @Out nimoy2d.exe
  218.     @File nimoy2d.in_    @Out nimoy2d.ini
  219.     @File lingo.in_        @Out lingo.ini
  220.     @File readme.txt    @Out readme.txt
  221.     @File fileio.dl_       @Out fileio.dll
  222.     @File nimoy.ic_        @Out nimoy.ico
  223.     @File scifi.in_        @Out scifi.ini    
  224.     @File scifi.tt_        @Out @WinDrive:\\@WinSysDir\\scifi.ttf
  225.         @File scifi.f_t        @Out @WinDrive:\\@WinSysDir\\scifi.fot
  226.     @File scifi.f_n        @Out @WinDrive:\\@WinSysDir\\scifi.fon
  227.     
  228. @EndDisk
  229.  
  230. //----------------------------------------------------------------------
  231. //Set up Windows Items with icons
  232.  
  233. @RI1 = "[ReplaceItem(Sci Fi Demo)]"
  234. @AI1 = "[AddItem(@Outdrive:\\@Subdir\\nimoy2d.exe, Sci Fi Demo, @OutDrive:\\@Subdir\\nimoy.ico, 0,,,@OutDrive:\\@Subdir)]"
  235. @RI2 = "[ReplaceItem(Readme)]"
  236. @AI2 = "[AddItem(WRITE.EXE @OutDrive:\\@Subdir\\readme.txt, Readme, @OutDrive:\\@Subdir\\nimoy.ico, 0)]"
  237.  
  238.  
  239. //-----------------------------------------------------------------------
  240. //Add fonts, notify Windows
  241.  
  242. @SetINI("FONTS","SciFi Normal (True Type)","@WinDrive:\\@WinSysDir\\scifi.fot","WIN.INI")
  243. @AddFont("@WinDrive:\\@WinSysDir\\scifi.fot")
  244. @SetINI("FONTS","SciFi 8, 8, 9, 10, 10, 12, 13, 14, 14, 15, 18, 21, 24 (96 dpi)","@WinDrive:\\@WinSysDir\\scifi.fon","WIN.INI")
  245. @AddFont("@WinDrive:\\@WinSysDir\\scifi.fon")
  246.  
  247.  
  248. @Display
  249. @Cls
  250. @Name will now install the necessary 
  251. Windows GROUP and ICONS as well as modify the PIF files 
  252. to reflect the installation path you entered during
  253. the installation.
  254.  
  255. Click the OK button to continue.
  256. @Prompt="@Name"
  257.  
  258.  
  259. @If (!@InternalTest) @TitlePause @EndIf
  260. @EndDisplay
  261.  
  262.  
  263. @If(@WinVersion < 0x30A || @UsingOldPM)
  264.   // Installing under Windows 3.0 or Couldn't access the DDEML.DLL
  265.   @SG = "@ShowNormal"
  266.   @PMLIST = "@SG@AI1"
  267.   @ProgramManager("@PMLIST")
  268. @Else
  269.   // if installing under windows 3.1 or greater & using DDEML.DLL
  270.   @SG = "@SHOWNormal"
  271.   @ProgramManager("@SG@RI1")  @ProgramManager("@SG@AI1")
  272.   @ProgramManager("@SG@RI2")  @ProgramManager("@SG@AI2")
  273.   @SG = "@ShowMin"
  274.   @ProgramManager("@SG")
  275. @EndIf
  276.  
  277.  
  278.  
  279. @If(@WinVersion < 0x30A || @UsingOldPM)
  280.   // Installing under Windows 3.0 or Couldn't access the DDEML.DLL
  281.   @SG = "@ShowNormal"
  282.   @PMLIST = "@SG@AI2"
  283. @Endif
  284.  
  285. //-------------------------------------------------------------------
  286. //Prompts for Quicktime 
  287.  
  288. @GetOption @Prompt = "Quicktime for Windows?"
  289. Quicktime for Windows 2.0.1 or later is 
  290. required for optimal video playback.
  291. Would you like the installer to 
  292. check your system for the 
  293. existence of Quicktime for 
  294. Windows?
  295.  
  296.        @Option 20001 ="Yes"
  297.     @Option 20002= "No"
  298. @EndOption
  299.  
  300.  
  301.  
  302.  
  303. /*////////////////////////////////////////////////////////////////////////
  304. // Make the ProgramManager full screen if started from DOS.  (Whenever a
  305. // program is launched directly from the command line when bringing up
  306. // Windows, the ProgmanManager is iconized, this will make Progman full
  307. // screen again when the installation is finished.
  308. ////////////////////////////////////////////////////////////////////////*/
  309.  
  310. @If(@Platform == @WIN)
  311.     @WinExec("PROGMAN", 1, 0)
  312. @EndIf
  313.  
  314. //---------------------------------------------------------------------
  315. //Check for QTW
  316.  
  317. @If (20001 [= @Option)
  318.     @If (@Exists ("@WindowsDrive:@WinSysDir\\mciqtw.drv"))
  319.     @If  (@FileDate ("@WindowsDrive:\\@WinSysDir\\mciqtw.drv") >= @StrToDate("@QTDate"))
  320.        
  321.         @BackgroundMode(3,@Blue,@Black)
  322.        @Display
  323.        @Cls
  324.            Setup has detected a valid version of 
  325.         Quicktime for Windows in your system
  326.     
  327.     @Prompt="@Name"
  328.        @If (!@InternalTest) @TitlePause @EndIf   
  329.        @EndDisplay
  330.  
  331.         @ElseIf (@FileDate ("@WindowsDrive:\\@WinSysDir\\mciqtw.drv") < @StrToDate("@QTDate"))
  332.  
  333.     //Older QTW version found        
  334.     @GetOption @Prompt = "Install Quicktime for Windows v2.0.1?"
  335.     A previous version of Quicktime for Windows has been detected.  
  336.     When the setup program 
  337.      finishes, do you want 
  338.     to install an updated 
  339.     version of Quicktime 
  340.     for Windows?
  341.  
  342.         @Option 20005 ="Yes"
  343.         @Option 20006= "No"
  344.         @EndOption
  345.         @EndIf //filedate check
  346.  
  347.     @Else
  348.     //No previous QTW version found        
  349.     @GetOption @Prompt = "Install Quicktime for Windows v2.0.1?"
  350.     Install does not detect Quicktime for Windows in your system.
  351.     When the setup program 
  352.      finishes, do you want 
  353.     to install an Quicktime 
  354.     for Windows?
  355.  
  356.     @Option 20005 ="Yes"
  357.     @Option 20006= "No"
  358.     @EndOption
  359.  
  360.     @EndIf  //Exists
  361. @EndIf //Option 20001
  362.  
  363.  
  364.  
  365. //------------------------------------------------------------
  366. //Launch QTW 2.0.1 Installer
  367.  
  368. @If ((20006 [= @Option) || (20002 [= @Option))
  369.    @BackgroundMode(3,@Blue,@Black)
  370.    @Display
  371.    @Cls
  372.        Quicktime for Windows 2.0.1 can be installed manually
  373.     from your cd-rom drive. Choose FILE-->RUN from the
  374.     Windows program manager and select
  375.         
  376.     <cd-rom drive letter:>\scifi_2d\qt_setup\setup.exe
  377.    
  378.     @Prompt="@Name"
  379.    @If (!@InternalTest) @TitlePause @EndIf   
  380.    @EndDisplay
  381. /*
  382.    @GetOption @Prompt = "View README file?"
  383.     Do you wish to read the README file immediately    
  384.     after the installation has finished?
  385.       @Option 30001 = "Yes"
  386.       @Option 30002 = "No"
  387.    @EndOption
  388. */
  389. @EndIf
  390.  
  391. //-------------------------------------------------------------------------------------
  392. //Closing screen
  393.  
  394. @If (20005 [= @Option)
  395.     @Display 
  396.     @Cls
  397.     @Name is finished installing.  If you 
  398.     have any questions or problems, please 
  399.     submit by fax to:
  400.     
  401.         (310) 442-7128
  402.  
  403.  
  404.  
  405.     Hit OK to begin the Quicktime Installation Process
  406.  
  407.     @Prompt="@Name"
  408.     @If (!@InternalTest) @TitlePause @EndIf
  409.     @EndDisplay
  410. @Else
  411.  
  412.     @Display 
  413.     @Cls
  414.     @Name is finished installing.  If you 
  415.     have any questions or problems, please 
  416.     submit by fax to:
  417.     
  418.         (310) 442-7128
  419.     
  420.  
  421.     @Prompt="@Name"
  422.     @If (!@InternalTest) @TitlePause @EndIf
  423.     @EndDisplay
  424.  
  425. @EndIf//Closing Screen
  426.  
  427.  
  428. //-------------------------------------------------------------------------------------
  429. //Finish Block
  430.  
  431. @Finish
  432.  
  433. @If (20005 [= @Option)
  434.     @WinExec("@InDrive:\\scifi_2d\\qt_setup\\setup.exe",3,0)
  435.     @Exit
  436. @EndIf //Install Quicktime
  437.  
  438.  
  439. @EndFinish
  440.  
  441.  
  442.  
  443. /*////////////////////////////////////////////////////////////////////////
  444. // View the README.NOW file with WRITE.EXE if it exists. (Windows only)
  445. ////////////////////////////////////////////////////////////////////////*/
  446.  
  447. /*
  448. @If(@Platform == @WIN && 30001 [= @Option)
  449.     @If(@Exists("@OutDrive:\\@Subdir\\README.TXT") && @Exists("@WindowsDrive:\\@WindowsDir\\WRITE.EXE"))
  450.         @WinExec("WRITE @OutDrive:\\@Subdir\\README.TXT", 3)
  451.         @Exit
  452.     @EndIf
  453. @EndIf
  454. */
  455.  
  456. /*////////////////////////////////////////////////////////////////////////
  457. // Ordinarily you may also wish to have an @FINISH block at this point.  It
  458. // is not required, and only has the advantage of being executed after files
  459. // have been installed if you are not using the @IMMEDIATE mode (see the
  460. // manual for more information regarding @IMMEDIATE and @FINISH).  This
  461. // @FINISH block will also be executed after a @SETCONFIG or @SETAUTOEXEC
  462. // block has been executed.  We did not use either of these last two blocks
  463. // in this script.  They are only necessary if you wish to modify the
  464. // CONFIG.SYS and AUTOEXEC.BAT files during the installation.
  465. ////////////////////////////////////////////////////////////////////////*/
  466.  
  467.  
  468. @Exit
  469. /*End - of - File */
  470.  
  471.