home *** CD-ROM | disk | FTP | other *** search
/ PC Musician 2000 / PC_Musician_2000.iso / PCMUSIC / MISC / MUSICZIP / INSTALL.BAT < prev    next >
Encoding:
DOS Batch File  |  1996-03-27  |  19.4 KB  |  480 lines

  1. echo off
  2. rem                           *** INSTALL.BAT ***
  3. rem                             (rev. is below)
  4. rem
  5. rem       MUSIC Installation program.  Also handles upgrading.
  6. rem       This version of INSTALL supports installation of MUSIC v3.3.
  7. rem
  8. rem       Syntax: INSTALL [destination_directory]
  9. rem       Notes:
  10. rem            * If a destination directory is provided then it will be used
  11. rem              as the place where MUSIC will be installed to.  If the
  12. rem              destination directory is not provided on the command line
  13. rem              then it defaults to "C:\MUSIC".
  14. rem            * INSTALL.BAT must be run while the current working directory
  15. rem              is set to where the INSTALL.BAT file resides on the
  16. rem              distribution disk or CD.  It *CANNOT* be run like this...
  17. rem                   ((wrong))   C:\) D:INSTALL
  18. rem                   ((right))   D:\MUSIC) INSTALL
  19. rem              It also cannot be run from an already existing MUSIC dir.
  20. rem            * New to MUSIC v3.1 install: the MUSICDOC.* manual files are
  21. rem              no longer included in MUSICZIP.EXE because they made it too
  22. rem              large to run in the 640k base memory for self-extracting ZIP
  23. rem              files.  Now the manual is downloaded seperately for the 
  24. rem              appropriate printer (registered users get all of them):
  25. rem                  DOC_PS.EXE  - creates MUSICDOC.PS for PostScript printers
  26. rem                  DOC_PCL.EXE - creates MUSICDOC.PCL for PCL printers
  27. rem
  28. rem  Install package:
  29. rem     MUSICZIP.EXE == STUFFZIP.EXE == MUSIC.EXE
  30. rem                     INSTALL.BAT     SUMMARY.TXT
  31. rem                     INSTALL.TXT     UPDATES.TXT
  32. rem                     README.MUS      FILE_FMT.TXT
  33. rem                     REGISTER.TXT    CFG.PCL   (MUSIC.CFG for HP PCL)
  34. rem                     CHOICE.COM      CFG.PSL   (for Cannon CaPSL)
  35. rem                                     CFG.NO    (for no printer codes)
  36. rem                                     *.PC      (Printer Config files)
  37. rem                                     MUSIC.DWR (demo main song drawer)
  38. rem                                     MUSIC.SL  (demo Selection List file)
  39. rem                                     *.MUS     (demo song files)
  40. rem                                     XMASZIP.EXE  == MUSIC.DWR (...\XMAS)
  41. rem                                                     *.MUS (Xmas songs)
  42. rem     DOC_PS.EXE   == MUSICDOC.PS
  43. rem     DOC_PCL.EXE  == MUSICDOC.PCL
  44.  
  45. rem -- Make sure running INSTALL from the right directory
  46. if NOT exist install.bat   goto WrongDir
  47. if NOT exist stuffzip.exe  goto WrongDir
  48. if     exist music.exe     goto WrongDir
  49.  
  50. cls
  51. echo ───────────────────────────────────────────────────────────────────────────
  52. echo.
  53. echo                INSTALL.BAT for MUSIC: The Electronic Song Book
  54. echo                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  55. echo                        INSTALL.BAT rev. Mar 27, 1996
  56. echo.
  57. echo ───────────────────────────────────────────────────────────────────────────
  58. echo.
  59. echo INSTALL.BAT syntax:    INSTALL [destination_directory]
  60. echo.
  61. echo            INSTALL must be run while the current working directory is where
  62. echo            INSTALL.BAT is located (like C:\TEMP or C:\).  This directory
  63. echo            can be on a floppy disk, just make sure it isn't write-protected.
  64. echo            The MUSIC Manual install file(s) also need to be here (DOC_PS.EXE
  65. echo            or DOC_PCL.EXE) if you plan on printing the manual.
  66. echo.
  67. echo            Press Ctrl-C to stop the installation (move to a legal directory
  68. echo            and try again) or press any other key to continue.
  69. echo.
  70. echo.
  71. echo First I will display the file README.MUS
  72. echo.
  73. pause
  74. type readme.mus | more
  75.  
  76. pause
  77. cls
  78.  
  79. rem Set the destination directory to "C:\MUSIC" or to user's parameter
  80. If .%1 == . goto SetDefDest
  81.     set Dest=%1
  82.     goto Cont_1
  83. :SetDefDest
  84.     set Dest=C:\MUSIC
  85. :Cont_1
  86.  
  87. :VerifyDest
  88.     echo Installing MUSIC to %dest%
  89.     echo.
  90.     choice "Is this where you want MUSIC to go "
  91.     If ErrorLevel 2 goto Syntax
  92.  
  93. :Inst_32
  94.     echo.
  95.     echo.
  96.     echo Installing MUSIC v3.3 to %dest%
  97.     echo.
  98.     mkdir %dest%
  99.     pause
  100.     rem -- Expand MUSIC files in this staging area
  101.     stuffzip.exe -d
  102.     rem -- Don't overwrite the old MUSIC.EXE yet if one exists so user can
  103.     rem -- see the UPGRADE warning (backup first?), cancel and restart without
  104.     rem -- loosing his original old MUSIC.EXE.  MUSIC32.EXE is renamed later.
  105.     copy /y music.exe %dest%\music32.exe
  106.     rem -- Must delete MUSIC.EXE from the installation directory right away
  107.     rem -- so if the user cancels install and restarts it,
  108.     rem -- the program doesn't abort because it thinks it's being started
  109.     rem -- in the MUSIC home directory.
  110.     del music.exe
  111.     rem -- The /y parameter tells copy not to ask to Overwrite if already there
  112.     copy /y *.txt %dest%
  113.     echo.
  114.     echo.
  115.  
  116.     rem -- Demo Song Drawer (C:\MUSIC)
  117.  
  118.     if NOT exist %dest%\MUSIC.DWR goto InstDemo
  119.     echo.
  120.     echo                             UPGRADING
  121.     echo                             ~~~~~~~~~
  122.     echo It looks like you are upgrading from an older MUSIC version.
  123.     echo I hope you made a backup of your %dest% directory and
  124.     echo all your song drawer directories.  If you didn't and you are
  125.     echo upgrading from v2.0 then you probably should since v3.3 will
  126.     echo convert all your files to the new format.  If you ever want to
  127.     echo go back to using v2.0 then you'll be in trouble because v2.0
  128.     echo cannot read the data files (and song files) as used by v3.3.
  129.     echo If you want to backup before continuing then press Ctrl-C to stop.
  130.     echo.
  131.     pause
  132.     cls
  133.     echo                         DEMO MAIN SONG DRAWER
  134.     echo                         ~~~~~~~~~~~~~~~~~~~~~
  135.     echo MUSIC v3.3 comes with some demo songs which will go in your MUSIC
  136.     echo home directory of %dest% (usually the main song drawer).  Since
  137.     echo you're upgrading I would expect that you don't want these songs;
  138.     echo you may have already gotten them with v2.0.  If you do want the
  139.     echo demo songs and you already have a song drawer at %dest%
  140.     echo then after the installation you will need to "Rebuild this drawer"
  141.     echo which will create for you a song drawer with your old songs that
  142.     echo were already there and the new demo songs.  Until you do this you
  143.     echo will not see your old songs in that song drawer.
  144.     echo.
  145.     echo        1 - Don't install the demo songs
  146.     echo        2 - Install the demo song drawer at %dest%
  147.     echo.
  148.     Choice /c:12 "Choice "
  149.     echo.
  150.     echo.
  151.     If ErrorLevel 2 goto InstDemo
  152.     If ErrorLevel 1 goto SkipDemo
  153. :InstDemo
  154.     rem -- Install the main song drawer in C:\MUSIC (%dest%)
  155.     copy /y music.dwr %dest%
  156.     if exist %dest%\music.sl goto skip_sl
  157.     copy music.sl %dest%
  158. :skip_sl
  159.     copy *.mus %dest%
  160.     echo.
  161.     echo.
  162.     echo *** Demo songs and song drawer created in %dest% ***
  163.     echo.
  164.     pause
  165.  
  166. :SkipDemo
  167.  
  168.     rem -- Christmas Song Drawer
  169.  
  170.     if NOT exist %dest%\XMAS\MUSIC.DWR goto InstXmas
  171.     cls
  172.     echo                         CHRISTMAS SONG DRAWER
  173.     echo                         ~~~~~~~~~~~~~~~~~~~~~
  174.     echo This installation package contains a bunch of traditional Christmas
  175.     echo carols (really old stuff).  If you choose to install them then a new
  176.     echo song drawer will be created for them at %dest%\XMAS.
  177.     echo It looks like you already have a song drawer at the same directory
  178.     echo of %dest%\XMAS so after the installation you will need
  179.     echo to load that song drawer then "Rebuild this drawer"
  180.     echo which will create for you a song drawer with your old songs that
  181.     echo were already there and the new ones.  Until you do this you
  182.     echo will not see your old songs in that song drawer.
  183.     echo Note: Any duplicate files will only be overwritten if the date of
  184.     echo       yours is older than the date of mine (including MUSIC.DWR).
  185.     echo.
  186.     echo        1 - Don't install the demo Christmas songs
  187.     echo        2 - Install the song drawer at %dest%\XMAS
  188.     echo.
  189.     Choice /c:12 "Choice "
  190.     echo.
  191.     echo.
  192.     If ErrorLevel 2 goto InstXmas
  193.     If ErrorLevel 1 goto SkipXmas
  194. :InstXmas
  195.     rem -- Install the Christmas song drawer in C:\MUSIC\XMAS
  196.     mkdir %dest%\XMAS
  197.     rem -- Unzip into the new C:\MUSIC\XMAS directory (-n = overwrite if newer)
  198.     xmaszip.exe -n %dest%\XMAS
  199.     echo.
  200.     echo.
  201.     echo *** Christmas song drawer created in %dest%\XMAS ***
  202.     echo.
  203.     pause
  204.  
  205. :SkipXmas
  206.  
  207.     rem -- Printer Config files (*.PC)
  208.     cls
  209.     echo                         PRINTER CONFIG FILES
  210.     echo                         ~~~~~~~~~~~~~~~~~~~~
  211.     echo Now I am going to copy several Printer Config files (*.PC) to
  212.     echo the MUSIC home directory (%dest%).  If you were using an
  213.     echo older version of MUSIC v3.x and already have PC (Printer Config)
  214.     echo files that you have modified (and kept the same file names)
  215.     echo then you will probably not want to overwrite them with these
  216.     echo new ones.  If you are using DOS v6.0 or greater then you will
  217.     echo be prompted when a PC file is about to be overwritten so you can
  218.     echo choose to skip it (save your old one).  If you have an older DOS
  219.     echo version then I'm not sure if it will ask or not; it may just replace
  220.     echo your old PC file with the new ones without asking.  Below is your
  221.     echo DOS version...
  222.     VER
  223.     echo If you have PC files you want to keep and you have DOS 5 or earlier
  224.     echo then you should press Ctrl-C now to cancel the installation, copy
  225.     echo your .PC files to a safe place, run the install again, then copy
  226.     echo your .PC files back to %dest%.
  227.     echo.
  228.     pause
  229.     rem -- The "/-y" tells copy to ask before overwriting
  230.     copy /-y *.pc %dest%
  231.     echo.
  232.     echo.
  233.     echo *** Printer Config files copied to %dest% ***
  234.     echo.
  235.     echo Note: Most of these PC files are designed to work with LaserJets
  236.     echo       because they play with fonts and stuff for fancy printing
  237.     echo       that most dot matrix type printers can't do.  If you don't
  238.     echo       have a LaserJet printer then read the PRINT section in the
  239.     echo       manual for how to do fancy printing with your printer.  This
  240.     echo       will require you to make your own Printer Config files (with
  241.     echo       the help of MUSIC of course) and the PC files you now have
  242.     echo       will give you good examples of how to do it, even if you
  243.     echo       can't actually use most of them.
  244.     echo.
  245.     pause
  246.  
  247.     rem -- MUSIC.CFG file
  248.     cls
  249.     echo                                MUSIC.CFG
  250.     echo                                ~~~~~~~~~
  251.     echo This installation package contains 3 different configuration files
  252.     echo which are designed to help you with setting up printer codes for
  253.     echo your printer.  Two of these files define the printer codes for you
  254.     echo for two different printers; the third leaves the printer code fields
  255.     echo blank for you to fill in according the codes your printer needs.
  256.     echo If you already have a MUSIC.CFG configuration file setup from an
  257.     echo earlier v3.x then I suggest you simply choose not to have a new
  258.     echo MUSIC.CFG installed; keep your old one.
  259.     echo.
  260.     echo What type of printer do you have?
  261.     echo.
  262.     echo        1 - PCL printer (HP LaserJet II and compatibles)
  263.     echo        2 - CaPSL printer (Canon LBP-8II/8III/8IV, LBP-4/4U/4Lite)
  264.     echo        3 - Neither (I don't have either type of printer but I want
  265.     echo            a MUSIC.CFG configuration file anyway)
  266.     echo        4 - None (I already have a MUSIC.CFG for my printer, don't
  267.     echo            give me a new one)
  268.     echo.
  269.     Choice /c:1234 "Choice "
  270.     echo.
  271.     echo.
  272.     If ErrorLevel 4 goto CFG_None
  273.     If ErrorLevel 3 goto CFG_No
  274.     If ErrorLevel 2 goto CFG_PSL
  275.     If ErrorLevel 1 goto CFG_PCL
  276. :CFG_None
  277.     echo.
  278.     echo No MUSIC.CFG file copied to %dest% since you say you
  279.     echo already have one setup just the way you want it.
  280.     echo If you actually don't have a MUSIC.CFG file already
  281.     echo then don't worry... MUSIC will automatically create
  282.     echo one for you with simple defaults.
  283.     echo.
  284.     pause
  285.     goto Manual
  286.  
  287. :CFG_No
  288.     copy /y cfg.no %dest%\music.cfg
  289.     echo.
  290.     echo You have been given a MUSIC.CFG with no printer codes defined.
  291.     echo If you want fancy printing then you will need to set these
  292.     echo configuration fields yourself.  Reference the manual for how to
  293.     echo do this.  You will also need your printer's manual for a list of
  294.     echo your printer's codes for Bold, Italics, Underline, etc.
  295.     echo If you have a PostScript printer then MUSIC is unable to print to
  296.     echo it at all; you will have to export your printouts to a file then
  297.     echo use your word processor to import the text file and print to your
  298.     echo printer in PostScript.  See the manual.
  299.     echo.
  300.     pause
  301.     goto Manual
  302.  
  303. :CFG_PSL
  304.     copy /y cfg.PSL %dest%\music.cfg
  305.     echo.
  306.     echo You have been given a MUSIC.CFG with the printer codes defined
  307.     echo for the Canon CaPSL printer line (LBP-8II/8III/8IV, LBP-4/4U/4Lite).
  308.     echo Your Printer Config (*.PC) files should work fine on your printer
  309.     echo for doing fancy printing.
  310.     echo.
  311.     pause
  312.     goto Manual
  313.  
  314. :CFG_PCL
  315.     copy /y cfg.PCL %dest%\music.cfg
  316.     echo.
  317.     echo You have been given a MUSIC.CFG with the printer codes defined
  318.     echo for the HP LaserJet II and compatibles (as most are).
  319.     echo Your Printer Config (*.PC) files should work fine on your printer
  320.     echo for doing fancy printing.  If your printouts don't look right then
  321.     echo it may be because your laserjet is in Epson emulation mode in which
  322.     echo case you'll need to make a change to the RESET printer code to place
  323.     echo the printer in standard PCL mode.
  324.     echo.
  325.     pause
  326.     goto Manual
  327.  
  328. :Manual
  329.     cls
  330.     echo                              MUSIC MANUAL
  331.     echo                              ~~~~~~~~~~~~
  332.     echo There are 2 files which represent the two formats of the manual...
  333.     echo      MUSICDOC.PCL - PCL format for HP LaserJet II printers (or clones)
  334.     echo      MUSICDOC.PS  - PostScript version of the same manual
  335.     echo Both of these files are much larger than the MUSIC program itself.
  336.     echo If you print the MUSIC manual then you will only get the MUSICDOC
  337.     echo file that is designed for your printer installed in %dest%.
  338.     echo The PCL version is 700k and the PostScript version is 900k so
  339.     echo you may want to (or need to) delete the proper MUSICDOC file after
  340.     echo the installation is complete.
  341.     echo If you're installing MUSIC to a floppy then you cannot print the manual.
  342.     echo.
  343.     echo You can only print the manual if you have the proper installation file:
  344.     echo     DOC_PS.EXE  - For PostScript printers
  345.     echo     DOC_PCL.EXE - For standard HP (and compatible) printers using PCL
  346.     echo.
  347.     echo Next you will see a list of the MUSIC manual installation files you have...
  348.     echo.
  349.     pause
  350.     echo ------------
  351.     rem -- The /b removes the heading lines and attribute info
  352.     dir /b DOC_*.EXE
  353.     echo ------------
  354.     echo.
  355.     echo Only choose to print a manual if you have its installation file as 
  356.     echo shown above.
  357.     echo.
  358.     echo Print the MUSIC v3.3 Manual?  (about 70 pages)
  359.     echo.
  360.     echo        1 - Don't print the MUSIC manual
  361.     echo        2 - Print to an HP LaserJet II or clone printer (DOC_PCL.EXE)
  362.     echo        3 - Print to any PostScript printer (DOC_PS.EXE)
  363.     echo.
  364.     Choice /c:123 "Choice "
  365.     echo.
  366.     echo.
  367.     If ErrorLevel 3 goto Print_PS
  368.     If ErrorLevel 2 goto Print_PCL
  369.  
  370.     echo If you didn't print the manual because you don't have a LaserJet or
  371.     echo PostScript printer then you can get a printed manual by registering
  372.     echo MUSIC (print and read REGISTER.TXT on just about any printer).
  373.     echo.
  374.     pause
  375.     goto DoneInstall
  376.  
  377. :Print_PS
  378.     rem -- expand MUSICDOC.PS
  379.     doc_ps.exe %dest%
  380.     echo Turn your printer on...
  381.     echo.
  382.     pause
  383.     echo Printing...
  384.     copy %dest%\musicdoc.ps prn
  385.     echo.
  386.     echo The manual has been sent to your PostScript printer.
  387.     echo The file MUSICDOC.PS has been placed in %dest%.
  388.     echo.
  389.     pause
  390.     goto DoneInstall
  391.  
  392. :Print_PCL
  393.     rem -- expand MUSICDOC.PCL
  394.     doc_pcl.exe %dest%
  395.     echo Turn your printer on...
  396.     echo.
  397.     pause
  398.     echo Printing...
  399.     copy /b %dest%\musicdoc.pcl prn
  400.     echo.
  401.     echo The manual has been sent to your PCL printer (HP LaserJet II type).
  402.     echo The file MUSICDOC.PCL has been placed in %dest%.
  403.     echo.
  404.     pause
  405.     goto DoneInstall
  406.  
  407. :DoneInstall
  408.     echo Deleting temporary installation files...
  409.     del cfg.*
  410.     del *.pc
  411.     del music.dwr
  412.     del music.sl
  413.     del *.mus
  414.     del xmaszip.exe
  415.     del *.txt
  416.     del stuffzip.exe
  417.     del readme.mus
  418.     del choice.com
  419.     rem -- Finally replace the old MUSIC.EXE with the new one.
  420.     copy /y %dest%\MUSIC32.EXE %dest%\MUSIC.EXE
  421.     del %dest%\MUSIC32.EXE
  422.     echo.
  423.     echo You should still have the MUSICZIP.EXE file and the INSTALL.BAT file
  424.     echo which is currently running (so I can't deleted it).  You may want to
  425.     echo delete INSTALL.BAT from your installation directory.
  426.     echo If you had problems with the installation then run MUSICZIP.EXE again
  427.     echo to get you the INSTALL.TXT file which will help you do a manual
  428.     echo installation.
  429.     echo.
  430.     echo.
  431.     echo  ───────────────────────────────────────────────────────────────────────────
  432.     echo    To run MUSIC just get to the %dest% directory and enter MUSIC.
  433.     echo    For a list of MUSIC command-line parameters (like Auto-Quick-Load)
  434.     echo    take a look at the manual.
  435.     echo  ───────────────────────────────────────────────────────────────────────────
  436.     echo.
  437.     goto End
  438.  
  439. rem -----------------------------------------------------------------------------
  440. rem -----------------------------------------------------------------------------
  441.  
  442.  
  443. :Syntax
  444.     cls
  445.     echo To specify a different drive and/or directory to install MUSIC,
  446.     echo simply enter it as a parameter when you run INSTALL...
  447.     echo.
  448.     echo              INSTALL C:\ABC123
  449.     goto Cancel
  450.  
  451. :WrongDir
  452.     cls
  453.     echo *** OOPS ***
  454.     echo.
  455.     echo I either didn't find INSTALL.BAT or STUFFZIP.EXE in this directory
  456.     echo or I did find MUSIC.EXE which shouldn't be here.
  457.     echo.
  458.     echo You must run this INSTALL program while your default drive and
  459.     echo directory are set to where the INSTALL.BAT program is located.
  460.     echo For example: you cannot be sitting on drive C: and type D:INSTALL
  461.     echo.
  462.     echo ALSO... you can't run this INSTALL program while in your old MUSIC
  463.     echo directory (for those of you upgrading from an old MUSIC version).
  464.     echo If you already ran MUSICZIP.EXE from inside your old MUSIC directory
  465.     echo then create a new directory (like C:\TEMP), move MUSICZIP.EXE to
  466.     echo there and run it.  Delete INSTALL.*, STUFFZIP.EXE and README.MUS
  467.     echo from your MUSIC directory (the files birthed from MUSICZIP.EXE).
  468.     echo.
  469.     echo Please set your current working directory (and drive) to where
  470.     echo INSTALL.BAT is located (usually C:\TEMP or the root directory C:\)
  471.     echo and run INSTALL again.
  472.     goto Cancel
  473.  
  474. :Cancel
  475.     echo.
  476.     echo.
  477.     echo MUSIC installation cancelled.
  478.  
  479. :End
  480.