home *** CD-ROM | disk | FTP | other *** search
/ Smithsonian Institution Dinosaur Museum / DINOSAUR_MUSEUM.ISO / pc / mswin / 5.rul next >
Text File  |  1994-07-27  |  7KB  |  214 lines

  1. // This is the InstallSHIELD installation script described above:
  2.  
  3. // Corrections to InstallSHIELD 2.0 Sample Script found in the User's Guide
  4. // on Pages 82-83
  5.  
  6. // InstallSHIELD Script file for My Program
  7.  
  8. // Copyright 1993 Stirling Technologies, Inc.
  9. declare
  10.     #define         SPACE_NEEDED            13000000
  11. //
  12.     string szText [ 255 ], szTemp [255];
  13.     number nSpace, nTemp;
  14.     string szDisk [ 3 ], szDefPath [255 ];
  15.     string szBitmapPath [ 255 ];
  16.     string szResultPath [ 255 ];
  17.     //   (LINE 20)
  18.     string szProgramPath [ 255 ];
  19.     string szHelpPath [ 255 ];
  20.     string szWorkingPath [ 255 ];
  21.     string szReadme [ 255 ];
  22.     string szNotePad [ 255 ];
  23.     string szIconPath [ 255 ];
  24.     string szFontPath [ 255 ];
  25. // new variables
  26.     
  27.     number nDx;
  28.     number nDy;
  29.     BOOL  bDone;
  30.     string szExt [ 255 ];
  31.     string szTagFile [ 255 ];
  32.     number nResult;
  33.     number nDisk;      
  34.     string szFileBase [ 255 ];
  35. program
  36. anyword:
  37.     SetColor( STATUSBAR, RED );
  38.     SetColor( BACKGROUND, BK_BLUE );
  39.  
  40.     SetFont( FONT_TITLE, STYLE_NORMAL, "Times New Roman" );
  41.     //SetTitle( "Installing Dinosaur Museum", 30, RED );
  42.     Enable( BITMAPFADE );
  43.     Enable( EXIT );
  44.     Disable ( HELP );
  45.     Disable ( PAUSE );
  46.     Disable ( INFO );
  47.     Disable ( FEEDBACK_FULL );
  48.     Enable ( STATUS );
  49.     //    (LINE 40)
  50.     Enable ( INDVFILESTATUS );
  51.     Enable ( BACKGROUND );
  52.     // TARGETDIR  = "c:\\WINDOWS" ;
  53.     //GetDisk( TARGETDIR, szDisk );
  54.     TARGETDIR = "C:\\DINOSAUR.CD\\";
  55.     // szDisk = "c:"
  56.     szDefPath = "C:\\Dinosaur.cd";
  57.     // szDefPath = "c:\\rshield" ;
  58.     // SRCDIR = "A:\\"
  59.     szBitmapPath = SRCDIR;
  60.     szBitmapPath = szBitmapPath ^ "Dino.BMP" ;
  61.  
  62.     GetExtents(nDx,nDy);
  63.           nDx = nDx/2;
  64.     nDx = (nDx+-170);
  65.  PlaceBitmap( szBitmapPath, 101, nDx, 50 , UPPER_RIGHT );
  66.      //GetExtent(Dx,dy);     dx=dx/2     dx=dx-50% of width    
  67.      //PlaceBitmap(xzbitmappath,101,dx,50,upperleft);
  68.     SetStatusWindow( 10, "Installing Dinosaur Museum" );
  69. TargetLocation:
  70.  
  71.     //if  (AskYesNo ("The installer assumes you want to install on C:\\, and that Windows is in C:\\Windows.  If this is not the case, select NO.", YES ) = NO ) then MessageBox( "Installation terminated by the user", WARNING);
  72.     //exit;     //   (LINE 60)
  73.     //endif;
  74.     AskPath( "Where do you want to install Dinosaur Museum?",
  75.               szDefPath, szResultPath);
  76.     if LAST_RESULT = FALSE then call
  77.          ConfirmCancel;
  78.     endif;
  79.     if szResultPath = SRCDIR then
  80.         MessageBox ( "You entered the source directory path...",
  81.               SEVERE );
  82.     goto TargetLocation;
  83.     endif;
  84.  
  85.     TARGETDIR = szResultPath;
  86.  
  87.     CreateDir( szResultPath );
  88.     if LAST_RESULT = 0 then goto DirCreated; endif;
  89.       MessageBox( "Unable to create directory.",
  90.                  SEVERE );
  91.     goto TargetLocation;
  92. DirCreated:
  93.     //        LINE (   79  )
  94.     GetDiskSpace( szResultPath );
  95.     if LAST_RESULT < SPACE_NEEDED then
  96.         MessageBox ( "Not enough space on the drive.", SEVERE );
  97.     goto TargetLocation;
  98.     endif;
  99.     TARGETDIR = szResultPath;
  100.     SetStatusWindow( 10, "Ready to copy files." );
  101.  
  102.     //  Ask user to enter a disk in drive.
  103.     //  Check to see if compress.exe file exists on this disk
  104.     //  If it does, then it must be the right disk.
  105.  
  106.     //                     END OF ORIGINAL STUFF HERE;
  107.     //                     END OF ORIGINAL STUFF HERE;
  108.     //                     END OF ORIGINAL STUFF HERE;
  109.     //  Assume TARGETDIR points to a directory entered by your user.
  110.  //      PlaceBitmap( " ", 101, 150, 50 , UPPER_RIGHT , REMOVE );
  111.     SetStatusWindow( 15, "Creating Dinosaur Museum Program Group." );
  112.  
  113.     szProgramPath = szResultPath ^ "Dinosaur.exe";
  114.     szWorkingPath = szResultPath;
  115.     szIconPath    = szResultPath ^ "Dinosaur.exe";
  116.     //         LINE  (  120 )
  117.     AddProgItemEx( "Dinosaur Museum",
  118.                "Dinosaur Museum",
  119.                szProgramPath,
  120.                szResultPath,
  121.                szIconPath,
  122.                0,
  123.                "",
  124.                NULL );
  125.  
  126.     SetStatusWindow( 25, "Copying Main program.");
  127. //
  128. //      DINOSAUR MUSEUM     DINOSAUR MUSEUM     DINOSAUR MUSEUM
  129. //
  130.     szWorkingPath = SRCDIR;
  131.     SRCDIR        = szWorkingPath ^ "Archives";
  132. //        szFontPath    = WINDIR;
  133. //      TARGETDIR     = szFontPath;
  134.  
  135.     CopyFile("APQT.VDR","APQT.VDR");
  136.     CopyFile("Dinosaur.exe","Dinosaur.exe");
  137. //
  138. //
  139. //      WINDOWS       WINDOWS       WINDOWS       WINDOWS       WINDOWS    
  140. //
  141. //        SRCDIR        = szWorkingPath ^ "Archives\Windows";
  142.     szFontPath    = WINDIR;
  143.     TARGETDIR     = szFontPath;
  144.  
  145.     CopyFile("QTW.INI","QTW.INI");
  146. //
  147.     SetStatusWindow( 50, "Copying System Files." );
  148. //      FONTS         FONTS         FONTS         FONTS         FONTS         FONTS      
  149. //      SYSTEM      SYSTEM      SYSTEM      SYSTEM      SYSTEM      SYSTEM     
  150. //
  151. //        SRCDIR        = szWorkingPath ^ "Archives\System";
  152.     szFontPath    = WINDIR ^ "System";
  153.     TARGETDIR     = szFontPath;
  154.  
  155.     CopyFile("MCHICAGO.FON","MCHICAGO.FON");
  156.     CopyFile("MGENEVA.FON","MGENEVA.FON");
  157.     CopyFile("MHELVET.FON","MHELVET.FON");
  158.     CopyFile("MHELVETN.FON","MHELVETN.FON");
  159.     CopyFile("COMMDLG.DLL","COMMDLG.DLL");
  160.     CopyFile("SHELL.DLL","SHELL.DLL");
  161. //
  162.     CopyFile("QTIM.DLL","QTIM.DLL");
  163.     CopyFile("QCMC.DLL","QCMC.DLL");
  164.     CopyFile("QTIMCMGR.DLL","QTIMCMGR.DLL");
  165.     CopyFile("QTJPEG.DLL","QTJPEG.DLL");
  166.     CopyFile("QTRAW.DLL","QTRAW.DLL");
  167.     CopyFile("QTRLE.DLL","QTRLE.DLL");
  168.     CopyFile("QTNOTIFY.EXE","QTNOTIFY.EXE");
  169.     CopyFile("QTRPZA.DLL","QTRPZA.DLL");
  170.  
  171.     SetStatusWindow( 75, "Updating Font list" );
  172.     //            LINE ( 140 )
  173. WriteProfString (
  174. "WIN.INI", "FONTS", "Mac Chicago 12",  "MCHICAGO.FON");
  175.  
  176. WriteProfString (
  177. "WIN.INI", "FONTS", "Mac Geneva 9,12,14",  "MGENEVA.FON");
  178.  
  179.  
  180. WriteProfString (
  181. "WIN.INI", "FONTS", "Mac Helvetica 9,12,14,18,24",  "MHELVET.FON");
  182.  
  183. WriteProfString (
  184. "WIN.INI", "FONTS", "Mac N Helvetica Narrow 10,12,14,18,24",  "MHELVETN.FON");
  185.  
  186.  
  187.     //RESTART WINDOWS!!!
  188.     MessageBox( "You MUST restart Windows for changes to take place!", INFORMATION);
  189.  
  190.         //           LINE ( 160  )
  191.         TARGETDIR = szResultPath;
  192.         szReadme = TARGETDIR ^ "README";
  193.         szNotePad = "NOTEPAD" + " " + szReadme ;
  194.  
  195. AskYesNo ( "Installation is complete, would you like to RESTART Windows", YES );
  196. if LAST_RESULT = YES then System (SYS_BOOTWIN);
  197. endif;
  198.  
  199. //              AskYesNo("Would you like to read the README file now?", YES ); 
  200.      //if LAST_RESULT = NO then exit;
  201.      //     endif;
  202.  
  203.     // LaunchApp ( "NOTEPAD c:\\CSBS\\readme" );
  204.   //    LaunchApp( "NOTEPAD.EXE", szReadme );
  205.     
  206.  
  207.     exit;
  208.  
  209. ConfirmCancel:
  210. AskYesNo ( "Are you sure want to cancel this installation", NO );
  211. if LAST_RESULT = NO then return; endif;
  212.  
  213. exit;
  214.