home *** CD-ROM | disk | FTP | other *** search
- echo off
- rem *** INSTALL.BAT ***
- rem (rev. is below)
- rem
- rem MUSIC Installation program. Also handles upgrading.
- rem This version of INSTALL supports installation of MUSIC v3.3.
- rem
- rem Syntax: INSTALL [destination_directory]
- rem Notes:
- rem * If a destination directory is provided then it will be used
- rem as the place where MUSIC will be installed to. If the
- rem destination directory is not provided on the command line
- rem then it defaults to "C:\MUSIC".
- rem * INSTALL.BAT must be run while the current working directory
- rem is set to where the INSTALL.BAT file resides on the
- rem distribution disk or CD. It *CANNOT* be run like this...
- rem ((wrong)) C:\) D:INSTALL
- rem ((right)) D:\MUSIC) INSTALL
- rem It also cannot be run from an already existing MUSIC dir.
- rem * New to MUSIC v3.1 install: the MUSICDOC.* manual files are
- rem no longer included in MUSICZIP.EXE because they made it too
- rem large to run in the 640k base memory for self-extracting ZIP
- rem files. Now the manual is downloaded seperately for the
- rem appropriate printer (registered users get all of them):
- rem DOC_PS.EXE - creates MUSICDOC.PS for PostScript printers
- rem DOC_PCL.EXE - creates MUSICDOC.PCL for PCL printers
- rem
- rem Install package:
- rem MUSICZIP.EXE == STUFFZIP.EXE == MUSIC.EXE
- rem INSTALL.BAT SUMMARY.TXT
- rem INSTALL.TXT UPDATES.TXT
- rem README.MUS FILE_FMT.TXT
- rem REGISTER.TXT CFG.PCL (MUSIC.CFG for HP PCL)
- rem CHOICE.COM CFG.PSL (for Cannon CaPSL)
- rem CFG.NO (for no printer codes)
- rem *.PC (Printer Config files)
- rem MUSIC.DWR (demo main song drawer)
- rem MUSIC.SL (demo Selection List file)
- rem *.MUS (demo song files)
- rem XMASZIP.EXE == MUSIC.DWR (...\XMAS)
- rem *.MUS (Xmas songs)
- rem DOC_PS.EXE == MUSICDOC.PS
- rem DOC_PCL.EXE == MUSICDOC.PCL
-
- rem -- Make sure running INSTALL from the right directory
- if NOT exist install.bat goto WrongDir
- if NOT exist stuffzip.exe goto WrongDir
- if exist music.exe goto WrongDir
-
- cls
- echo ───────────────────────────────────────────────────────────────────────────
- echo.
- echo INSTALL.BAT for MUSIC: The Electronic Song Book
- echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- echo INSTALL.BAT rev. Mar 27, 1996
- echo.
- echo ───────────────────────────────────────────────────────────────────────────
- echo.
- echo INSTALL.BAT syntax: INSTALL [destination_directory]
- echo.
- echo INSTALL must be run while the current working directory is where
- echo INSTALL.BAT is located (like C:\TEMP or C:\). This directory
- echo can be on a floppy disk, just make sure it isn't write-protected.
- echo The MUSIC Manual install file(s) also need to be here (DOC_PS.EXE
- echo or DOC_PCL.EXE) if you plan on printing the manual.
- echo.
- echo Press Ctrl-C to stop the installation (move to a legal directory
- echo and try again) or press any other key to continue.
- echo.
- echo.
- echo First I will display the file README.MUS
- echo.
- pause
- type readme.mus | more
-
- pause
- cls
-
- rem Set the destination directory to "C:\MUSIC" or to user's parameter
- If .%1 == . goto SetDefDest
- set Dest=%1
- goto Cont_1
- :SetDefDest
- set Dest=C:\MUSIC
- :Cont_1
-
- :VerifyDest
- echo Installing MUSIC to %dest%
- echo.
- choice "Is this where you want MUSIC to go "
- If ErrorLevel 2 goto Syntax
-
- :Inst_32
- echo.
- echo.
- echo Installing MUSIC v3.3 to %dest%
- echo.
- mkdir %dest%
- pause
- rem -- Expand MUSIC files in this staging area
- stuffzip.exe -d
- rem -- Don't overwrite the old MUSIC.EXE yet if one exists so user can
- rem -- see the UPGRADE warning (backup first?), cancel and restart without
- rem -- loosing his original old MUSIC.EXE. MUSIC32.EXE is renamed later.
- copy /y music.exe %dest%\music32.exe
- rem -- Must delete MUSIC.EXE from the installation directory right away
- rem -- so if the user cancels install and restarts it,
- rem -- the program doesn't abort because it thinks it's being started
- rem -- in the MUSIC home directory.
- del music.exe
- rem -- The /y parameter tells copy not to ask to Overwrite if already there
- copy /y *.txt %dest%
- echo.
- echo.
-
- rem -- Demo Song Drawer (C:\MUSIC)
-
- if NOT exist %dest%\MUSIC.DWR goto InstDemo
- echo.
- echo UPGRADING
- echo ~~~~~~~~~
- echo It looks like you are upgrading from an older MUSIC version.
- echo I hope you made a backup of your %dest% directory and
- echo all your song drawer directories. If you didn't and you are
- echo upgrading from v2.0 then you probably should since v3.3 will
- echo convert all your files to the new format. If you ever want to
- echo go back to using v2.0 then you'll be in trouble because v2.0
- echo cannot read the data files (and song files) as used by v3.3.
- echo If you want to backup before continuing then press Ctrl-C to stop.
- echo.
- pause
- cls
- echo DEMO MAIN SONG DRAWER
- echo ~~~~~~~~~~~~~~~~~~~~~
- echo MUSIC v3.3 comes with some demo songs which will go in your MUSIC
- echo home directory of %dest% (usually the main song drawer). Since
- echo you're upgrading I would expect that you don't want these songs;
- echo you may have already gotten them with v2.0. If you do want the
- echo demo songs and you already have a song drawer at %dest%
- echo then after the installation you will need to "Rebuild this drawer"
- echo which will create for you a song drawer with your old songs that
- echo were already there and the new demo songs. Until you do this you
- echo will not see your old songs in that song drawer.
- echo.
- echo 1 - Don't install the demo songs
- echo 2 - Install the demo song drawer at %dest%
- echo.
- Choice /c:12 "Choice "
- echo.
- echo.
- If ErrorLevel 2 goto InstDemo
- If ErrorLevel 1 goto SkipDemo
- :InstDemo
- rem -- Install the main song drawer in C:\MUSIC (%dest%)
- copy /y music.dwr %dest%
- if exist %dest%\music.sl goto skip_sl
- copy music.sl %dest%
- :skip_sl
- copy *.mus %dest%
- echo.
- echo.
- echo *** Demo songs and song drawer created in %dest% ***
- echo.
- pause
-
- :SkipDemo
-
- rem -- Christmas Song Drawer
-
- if NOT exist %dest%\XMAS\MUSIC.DWR goto InstXmas
- cls
- echo CHRISTMAS SONG DRAWER
- echo ~~~~~~~~~~~~~~~~~~~~~
- echo This installation package contains a bunch of traditional Christmas
- echo carols (really old stuff). If you choose to install them then a new
- echo song drawer will be created for them at %dest%\XMAS.
- echo It looks like you already have a song drawer at the same directory
- echo of %dest%\XMAS so after the installation you will need
- echo to load that song drawer then "Rebuild this drawer"
- echo which will create for you a song drawer with your old songs that
- echo were already there and the new ones. Until you do this you
- echo will not see your old songs in that song drawer.
- echo Note: Any duplicate files will only be overwritten if the date of
- echo yours is older than the date of mine (including MUSIC.DWR).
- echo.
- echo 1 - Don't install the demo Christmas songs
- echo 2 - Install the song drawer at %dest%\XMAS
- echo.
- Choice /c:12 "Choice "
- echo.
- echo.
- If ErrorLevel 2 goto InstXmas
- If ErrorLevel 1 goto SkipXmas
- :InstXmas
- rem -- Install the Christmas song drawer in C:\MUSIC\XMAS
- mkdir %dest%\XMAS
- rem -- Unzip into the new C:\MUSIC\XMAS directory (-n = overwrite if newer)
- xmaszip.exe -n %dest%\XMAS
- echo.
- echo.
- echo *** Christmas song drawer created in %dest%\XMAS ***
- echo.
- pause
-
- :SkipXmas
-
- rem -- Printer Config files (*.PC)
- cls
- echo PRINTER CONFIG FILES
- echo ~~~~~~~~~~~~~~~~~~~~
- echo Now I am going to copy several Printer Config files (*.PC) to
- echo the MUSIC home directory (%dest%). If you were using an
- echo older version of MUSIC v3.x and already have PC (Printer Config)
- echo files that you have modified (and kept the same file names)
- echo then you will probably not want to overwrite them with these
- echo new ones. If you are using DOS v6.0 or greater then you will
- echo be prompted when a PC file is about to be overwritten so you can
- echo choose to skip it (save your old one). If you have an older DOS
- echo version then I'm not sure if it will ask or not; it may just replace
- echo your old PC file with the new ones without asking. Below is your
- echo DOS version...
- VER
- echo If you have PC files you want to keep and you have DOS 5 or earlier
- echo then you should press Ctrl-C now to cancel the installation, copy
- echo your .PC files to a safe place, run the install again, then copy
- echo your .PC files back to %dest%.
- echo.
- pause
- rem -- The "/-y" tells copy to ask before overwriting
- copy /-y *.pc %dest%
- echo.
- echo.
- echo *** Printer Config files copied to %dest% ***
- echo.
- echo Note: Most of these PC files are designed to work with LaserJets
- echo because they play with fonts and stuff for fancy printing
- echo that most dot matrix type printers can't do. If you don't
- echo have a LaserJet printer then read the PRINT section in the
- echo manual for how to do fancy printing with your printer. This
- echo will require you to make your own Printer Config files (with
- echo the help of MUSIC of course) and the PC files you now have
- echo will give you good examples of how to do it, even if you
- echo can't actually use most of them.
- echo.
- pause
-
- rem -- MUSIC.CFG file
- cls
- echo MUSIC.CFG
- echo ~~~~~~~~~
- echo This installation package contains 3 different configuration files
- echo which are designed to help you with setting up printer codes for
- echo your printer. Two of these files define the printer codes for you
- echo for two different printers; the third leaves the printer code fields
- echo blank for you to fill in according the codes your printer needs.
- echo If you already have a MUSIC.CFG configuration file setup from an
- echo earlier v3.x then I suggest you simply choose not to have a new
- echo MUSIC.CFG installed; keep your old one.
- echo.
- echo What type of printer do you have?
- echo.
- echo 1 - PCL printer (HP LaserJet II and compatibles)
- echo 2 - CaPSL printer (Canon LBP-8II/8III/8IV, LBP-4/4U/4Lite)
- echo 3 - Neither (I don't have either type of printer but I want
- echo a MUSIC.CFG configuration file anyway)
- echo 4 - None (I already have a MUSIC.CFG for my printer, don't
- echo give me a new one)
- echo.
- Choice /c:1234 "Choice "
- echo.
- echo.
- If ErrorLevel 4 goto CFG_None
- If ErrorLevel 3 goto CFG_No
- If ErrorLevel 2 goto CFG_PSL
- If ErrorLevel 1 goto CFG_PCL
- :CFG_None
- echo.
- echo No MUSIC.CFG file copied to %dest% since you say you
- echo already have one setup just the way you want it.
- echo If you actually don't have a MUSIC.CFG file already
- echo then don't worry... MUSIC will automatically create
- echo one for you with simple defaults.
- echo.
- pause
- goto Manual
-
- :CFG_No
- copy /y cfg.no %dest%\music.cfg
- echo.
- echo You have been given a MUSIC.CFG with no printer codes defined.
- echo If you want fancy printing then you will need to set these
- echo configuration fields yourself. Reference the manual for how to
- echo do this. You will also need your printer's manual for a list of
- echo your printer's codes for Bold, Italics, Underline, etc.
- echo If you have a PostScript printer then MUSIC is unable to print to
- echo it at all; you will have to export your printouts to a file then
- echo use your word processor to import the text file and print to your
- echo printer in PostScript. See the manual.
- echo.
- pause
- goto Manual
-
- :CFG_PSL
- copy /y cfg.PSL %dest%\music.cfg
- echo.
- echo You have been given a MUSIC.CFG with the printer codes defined
- echo for the Canon CaPSL printer line (LBP-8II/8III/8IV, LBP-4/4U/4Lite).
- echo Your Printer Config (*.PC) files should work fine on your printer
- echo for doing fancy printing.
- echo.
- pause
- goto Manual
-
- :CFG_PCL
- copy /y cfg.PCL %dest%\music.cfg
- echo.
- echo You have been given a MUSIC.CFG with the printer codes defined
- echo for the HP LaserJet II and compatibles (as most are).
- echo Your Printer Config (*.PC) files should work fine on your printer
- echo for doing fancy printing. If your printouts don't look right then
- echo it may be because your laserjet is in Epson emulation mode in which
- echo case you'll need to make a change to the RESET printer code to place
- echo the printer in standard PCL mode.
- echo.
- pause
- goto Manual
-
- :Manual
- cls
- echo MUSIC MANUAL
- echo ~~~~~~~~~~~~
- echo There are 2 files which represent the two formats of the manual...
- echo MUSICDOC.PCL - PCL format for HP LaserJet II printers (or clones)
- echo MUSICDOC.PS - PostScript version of the same manual
- echo Both of these files are much larger than the MUSIC program itself.
- echo If you print the MUSIC manual then you will only get the MUSICDOC
- echo file that is designed for your printer installed in %dest%.
- echo The PCL version is 700k and the PostScript version is 900k so
- echo you may want to (or need to) delete the proper MUSICDOC file after
- echo the installation is complete.
- echo If you're installing MUSIC to a floppy then you cannot print the manual.
- echo.
- echo You can only print the manual if you have the proper installation file:
- echo DOC_PS.EXE - For PostScript printers
- echo DOC_PCL.EXE - For standard HP (and compatible) printers using PCL
- echo.
- echo Next you will see a list of the MUSIC manual installation files you have...
- echo.
- pause
- echo ------------
- rem -- The /b removes the heading lines and attribute info
- dir /b DOC_*.EXE
- echo ------------
- echo.
- echo Only choose to print a manual if you have its installation file as
- echo shown above.
- echo.
- echo Print the MUSIC v3.3 Manual? (about 70 pages)
- echo.
- echo 1 - Don't print the MUSIC manual
- echo 2 - Print to an HP LaserJet II or clone printer (DOC_PCL.EXE)
- echo 3 - Print to any PostScript printer (DOC_PS.EXE)
- echo.
- Choice /c:123 "Choice "
- echo.
- echo.
- If ErrorLevel 3 goto Print_PS
- If ErrorLevel 2 goto Print_PCL
-
- echo If you didn't print the manual because you don't have a LaserJet or
- echo PostScript printer then you can get a printed manual by registering
- echo MUSIC (print and read REGISTER.TXT on just about any printer).
- echo.
- pause
- goto DoneInstall
-
- :Print_PS
- rem -- expand MUSICDOC.PS
- doc_ps.exe %dest%
- echo Turn your printer on...
- echo.
- pause
- echo Printing...
- copy %dest%\musicdoc.ps prn
- echo.
- echo The manual has been sent to your PostScript printer.
- echo The file MUSICDOC.PS has been placed in %dest%.
- echo.
- pause
- goto DoneInstall
-
- :Print_PCL
- rem -- expand MUSICDOC.PCL
- doc_pcl.exe %dest%
- echo Turn your printer on...
- echo.
- pause
- echo Printing...
- copy /b %dest%\musicdoc.pcl prn
- echo.
- echo The manual has been sent to your PCL printer (HP LaserJet II type).
- echo The file MUSICDOC.PCL has been placed in %dest%.
- echo.
- pause
- goto DoneInstall
-
- :DoneInstall
- echo Deleting temporary installation files...
- del cfg.*
- del *.pc
- del music.dwr
- del music.sl
- del *.mus
- del xmaszip.exe
- del *.txt
- del stuffzip.exe
- del readme.mus
- del choice.com
- rem -- Finally replace the old MUSIC.EXE with the new one.
- copy /y %dest%\MUSIC32.EXE %dest%\MUSIC.EXE
- del %dest%\MUSIC32.EXE
- echo.
- echo You should still have the MUSICZIP.EXE file and the INSTALL.BAT file
- echo which is currently running (so I can't deleted it). You may want to
- echo delete INSTALL.BAT from your installation directory.
- echo If you had problems with the installation then run MUSICZIP.EXE again
- echo to get you the INSTALL.TXT file which will help you do a manual
- echo installation.
- echo.
- echo.
- echo ───────────────────────────────────────────────────────────────────────────
- echo To run MUSIC just get to the %dest% directory and enter MUSIC.
- echo For a list of MUSIC command-line parameters (like Auto-Quick-Load)
- echo take a look at the manual.
- echo ───────────────────────────────────────────────────────────────────────────
- echo.
- goto End
-
- rem -----------------------------------------------------------------------------
- rem -----------------------------------------------------------------------------
-
-
- :Syntax
- cls
- echo To specify a different drive and/or directory to install MUSIC,
- echo simply enter it as a parameter when you run INSTALL...
- echo.
- echo INSTALL C:\ABC123
- goto Cancel
-
- :WrongDir
- cls
- echo *** OOPS ***
- echo.
- echo I either didn't find INSTALL.BAT or STUFFZIP.EXE in this directory
- echo or I did find MUSIC.EXE which shouldn't be here.
- echo.
- echo You must run this INSTALL program while your default drive and
- echo directory are set to where the INSTALL.BAT program is located.
- echo For example: you cannot be sitting on drive C: and type D:INSTALL
- echo.
- echo ALSO... you can't run this INSTALL program while in your old MUSIC
- echo directory (for those of you upgrading from an old MUSIC version).
- echo If you already ran MUSICZIP.EXE from inside your old MUSIC directory
- echo then create a new directory (like C:\TEMP), move MUSICZIP.EXE to
- echo there and run it. Delete INSTALL.*, STUFFZIP.EXE and README.MUS
- echo from your MUSIC directory (the files birthed from MUSICZIP.EXE).
- echo.
- echo Please set your current working directory (and drive) to where
- echo INSTALL.BAT is located (usually C:\TEMP or the root directory C:\)
- echo and run INSTALL again.
- goto Cancel
-
- :Cancel
- echo.
- echo.
- echo MUSIC installation cancelled.
-
- :End
-