home *** CD-ROM | disk | FTP | other *** search
- ; Aladdin 4D Installer Utility
- ;
- ; For Aladdin 4D Release 5.0
- ;
- ; This installation should NOT be used to update an old version of
- ; Aladdin. It CAN update new (and beta) versions of Aladdin. (hopefully)
- ;
- ; Written by Thomas Krehbiel
- ; Copyright © 1996 Nova Design, Inc.
- ;
-
- (
-
- ;================================================================
- ; Procedure Definitions
- ;================================================================
-
-
- ;================================================================
- ; Setup
- ;================================================================
-
- ; script variables...
-
- (set programname "Aladdin 4D 5.0") ; name of program
- (set drawername "Aladdin4D") ; name of drawer to make for program
- (set assignname "Aladdin4D") ; assign to make for program
- (set diskname1 "Aladdin_Disk1:") ; install disk name
- (set diskname2 "Aladdin_Disk2:") ; second install disk name
- (set diskname3 "Aladdin_Disk3:") ; third install disk name
- (set diskname4 "Aladdin_Disk4:") ; fourth install disk name
- (set diskname5 "Aladdin_Disk5:") ; fifth install disk name
- (set bytesreq "6.0MB") ; HD space required
-
- ; system information...
-
- (set osver (/ (getversion) 65536)) ; os version
- (set cputype (database "cpu")) ; cpu type
-
- ;================================================================
- ; Text Strings, for relatively easy localization
- ;================================================================
-
- (set #msg-pickdrawer-prompt
- (cat
- "Select the directory where you would like to install the "
- programname " software. WARNING: Do not install over an "
- "old (4.x or earlier) copy of Aladdin."))
- (set #msg-pickdrawer-help
- @askdir-help)
-
- (set #warning-writeover-v5-part1
- "The version of Aladdin 4D in `")
- (set #warning-writeover-v5-part2
- "' will be updated. If this is correct, click 'Proceed'.")
-
- (set #warning-writeover-v4
- (cat
- "We strongly recommend not attempting to install this version "
- "of Aladdin 4D into a directory containing an earlier copy "
- "(4.x or earlier) of Aladdin."))
-
- (set #msg-drawername-prompt
- (cat
- "This installation will create a drawer named '" drawername "'. "
- "If you would like to change the name of the drawer, type the new "
- "name below. Otherwise, click 'Proceed' to continue."))
- (set #msg-drawername-help
- @askstring-help)
-
- (set #warning-confirmname-part1
- (cat
- programname " will be installed in a new drawer called '"))
- (set #warning-confirmname-part2
- "'. If this is correct, click 'Proceed'.")
-
- (set #msg-cpuversion-prompt
- "Select which version of the software to install:")
- (set #msg-cpuversion-help
- (cat
- "If you have a faster processor, you may choose to install "
- "a special version of " programname " optimized for faster "
- "processors."))
- (set #msg-cpuversion-all
- "Install All Versions")
- (set #msg-cpuversion-68020
- "Install 68020/68030 Version")
- (set #msg-cpuversion-68040
- "Install 68040 Version")
-
- ;-------------------
- ; Pick a default directory for the installation...
- (working "set initialdir")
- (set initialdir @default-dest) ; defaults to biggest drive
-
- (if (getassign "Aladdin4D")
- (
- (set initialdir (getassign "Aladdin4D"))
- )
- )
-
- ;-------------------
- ; Ask where to install it...
- (set wheredir
- (askdir
- (prompt #msg-pickdrawer-prompt)
- (help #msg-pickdrawer-help)
- (default initialdir)
- )
- )
-
- ;-------------------
- ; Determine whether we are upgrading or installing new
- (if (exists (tackon wheredir "support/alad.library"))
- (
- ; Installing into a directory where Aladdin already exists
- (set writeover 1)
-
- (if (exists (tackon wheredir "support/apptek.library"))
- (
- ; Upgrading a version of Aladdin 4D 5.x (possibly a beta)
- (set writeoverV5 1)
- (message
- #warning-writeover-v5-part1
- wheredir
- #warning-writeover-v5-part2)
- )
- ; else
- (
- (message #warning-writeover-v4)
- )
- )
-
- )
- ; else
- (
- ; Assume we are to create a new directory.
-
- ; Ask expert user the name of the drawer to create
- (if (> @user-level 1)
- (set drawername
- (askstring
- (prompt #msg-drawername-prompt)
- (help #msg-drawername-help)
- (default drawername)
- )
- )
- )
- (set wheredir (tackon wheredir drawername))
- (set writeover 0)
- (message
- #warning-confirmname-part1
- wheredir
- #warning-confirmname-part2)
- )
- )
-
- ;-------------------
- ; Ask which versions of modules the user wants to install.
- (set cpu
- (askchoice
- (prompt #msg-cpuversion-prompt)
- (help #msg-cpuversion-help)
- (choices
- #msg-cpuversion-all
- #msg-cpuversion-68020
- #msg-cpuversion-68040
- )
- (default 0)
- )
- )
-
- (set cpu_all 0)
- (set cpu_68020 1)
- (set cpu_68040 2)
-
-
-
- ;-------------------
- ; Create destination directory if it doesn't already exist.
- ;(onerror
- ; (abort "Cannot create directory `%ls'. (There may be a file "
- ; "already there with the same name.)" wheredir)
- ;)
- (makedir wheredir (infos))
-
- (set @default-dest wheredir)
-
- ;-------------------
- ; Copy LHEX to RAM: for speediness
- (copyfiles
- (prompt "")
- (help "")
- (source "")
- (dest "RAM:")
- (choices "lhex")
- )
-
- ;-------------------
- ; Adjust current settings
-
- (if writeover
- (
-
- ; These tools had their names changed:
- (delete (tackon wheredir "Tools/Sweep"))
- (delete (tackon wheredir "Tools/Slant.as"))
-
- (if writeoverV5
- (
-
- (if (= cpu 1)
- (
- (delete (tackon wheredir "Aladdin4D_040"))
- (delete (tackon wheredir "Aladdin4D_040.info"))
- (delete (tackon wheredir "support/engine040.library"))
- )
- )
-
- (if (= cpu 2)
- (
- (delete (tackon wheredir "Aladdin4D"))
- (delete (tackon wheredir "Aladdin4D.info"))
- (delete (tackon wheredir "support/engine.library"))
- )
- )
-
- )
- )
-
- )
- )
-
- ; make directories we'll definitely need:
- (makedir (tackon wheredir "Support"))
- (makedir (tackon wheredir "Support/Def"))
- (makedir (tackon wheredir "Support/Def/Defaults"))
- (makedir (tackon wheredir "Help"))
-
- ;================================================================
- ; DISK 1
- ;================================================================
-
- (complete 0)
-
- (set temp (+ (= cpu cpu_all) (= cpu cpu_68020)))
- (if temp
- (
- (working "Installing 68020/030-Specific Files...")
- (run ("RAM:lhex >CON:0/0//60/lhex/AUTO -a -f \"-w=%s\" x %sProgram020.lha" wheredir diskname1))
- (if (= (exists (tackon wheredir "Aladdin4D.info")) 0)
- (
- (run ("RAM:lhex >CON:0/0//60/lhex/AUTO -a -f \"-w=%s\" x %sIcons020.lha" wheredir diskname1))
- (tooltype
- (prompt "")
- (help "")
- (dest (tackon wheredir "Aladdin4D"))
- (noposition)
- )
- )
- )
- )
- )
-
- (set temp (+ (= cpu cpu_all) (= cpu cpu_68040)))
- (if temp
- (
- (working "Installing 68040-Specific Files...")
- (run ("RAM:lhex >CON:0/0//60/lhex/AUTO -a -f \"-w=%s\" x %sProgram040.lha" wheredir diskname1))
- (if (= (exists (tackon wheredir "Aladdin4D_040.info")) 0)
- (
- (run ("RAM:lhex >CON:0/0//60/lhex/AUTO -a -f \"-w=%s\" x %sIcons040.lha" wheredir diskname1))
- (tooltype
- (prompt "")
- (help "")
- (dest (tackon wheredir "Aladdin4D_040"))
- (noposition)
- )
- )
- )
- )
- )
-
- (if (exists (tackon diskname1 "Docs.lha"))
- (
- (working "Installing Documents...")
- (run ("RAM:lhex >CON:0/0//60/lhex/AUTO -a -f \"-w=%s\" x %sDocs.lha" wheredir diskname1))
- (if (exists (tackon wheredir "Docs/ReleaseNotes.doc"))
- (
- (run ("Run >NIL: <NIL: SYS:Utilities/More \"%s/Docs/ReleaseNotes.doc\"" wheredir))
- )
- )
- )
- )
-
- ;(if (exists (tackon diskname1 "Rexx.lha"))
- ; (
- ; (working "Installing Arexx Programs...")
- ; (run ("RAM:lhex >CON:0/0//60/lhex/AUTO -a -f \"-w=%s\" x %sRexx.lha" wheredir diskname1))
- ; )
- ;)
-
- ;(working "Installing Addendum Document...")
- ;(copyfiles
- ; (prompt "")
- ; (help @copyfiles-help)
- ; (source diskname1)
- ; (dest wheredir)
- ; (choices "Addendum_2.1a" "Addendum_2.1a.info")
- ;)
-
- ;================================================================
- ; DISK 2
- ;================================================================
-
- (complete 20)
-
- (askdisk
- (prompt "Please insert Installation Disk 2 in any drive.")
- (help "")
- (dest (substr diskname2 0 (- (strlen diskname2) 1)))
- (assigns)
- )
-
- (if (< osver 39)
- (
- (if (= 0 (exists "SYS:Utilities/AmigaGuide"))
- (
- (working "Installing AmigaGuide utility...")
- (run ("RAM:lhex >CON:0/0//60/lhex/AUTO -a -f \"-w=SYS:Utilities\" x %sAG34.lha" diskname2))
- )
- )
- )
- )
-
- (if (exists (tackon diskname2 "Libs.lha"))
- (
- (working "Installing Libraries...")
-
- (run ("RAM:lhex >CON:0/0//60/lhex/AUTO -a -f -w=RAM: x %sLibs.lha" diskname2))
-
- (if (exists "RAM:amigaguide.library")
- (
- (if (< osver 39) ; only needed for < OS 3.0
- (
- (copylib
- (prompt "amigaguide.library is required to use the online "
- "help features of Aladdin 4D.")
- (help @copylib-help)
- (source "RAM:amigaguide.library")
- (dest "LIBS:")
- (confirm)
- )
- )
- )
- (delete "RAM:amigaguide.library")
- )
- )
- (if (exists "RAM:dctv.library")
- (
- (copylib
- (prompt "dctv.library is required for loading DCTV "
- "images and rendering to the DCTV.")
- (help @copylib-help)
- (source "RAM:dctv.library")
- (dest "LIBS:")
- (confirm)
- )
- (delete "RAM:dctv.library")
- )
- )
- (if (exists "RAM:thumbnail.library")
- (
- (delete (tackon wheredir "thumbnail.library"))
- (copylib
- (prompt "thumbnail.library is required to use "
- "visual thumbnail requesters.")
- (help @copylib-help)
- (source "RAM:thumbnail.library")
- (dest "LIBS:")
- (confirm)
- )
- (delete "RAM:thumbnail.library")
- )
- )
- (if (exists "RAM:reqtools.library")
- (
- (if (< osver 38) ; only needed for < OS 2.1
- (
- (copylib
- (prompt "reqtools.library is required under Workbench 2.04 "
- "for selection of screen modes.")
- (help @copylib-help)
- (source "RAM:reqtools.library")
- (dest "LIBS:")
- (confirm)
- )
- )
- )
- (delete "RAM:reqtools.library")
- )
- )
-
- )
- )
-
- (if (exists (tackon diskname2 "Support.lha"))
- (
- (working "Installing Support Files...")
- (run ("RAM:lhex >CON:0/0//60/lhex/AUTO -a -f \"-w=%s\" x %sSupport.lha" wheredir diskname2))
- )
- )
-
- (if (exists (tackon diskname2 "Tools.lha"))
- (
- (working "Installing Tools...")
- (run ("RAM:lhex >CON:0/0//60/lhex/AUTO -a -f \"-w=%s\" x %sTools.lha" wheredir diskname2))
- )
- )
-
- (if (exists (tackon diskname2 "Handlers.lha"))
- (
- (working "Installing Handlers...")
- (run ("RAM:lhex >CON:0/0//60/lhex/AUTO -a -f \"-w=%s\" x %sHandlers.lha" wheredir diskname2))
- )
- )
-
- (if (exists (tackon diskname2 "Fonts.lha"))
- (
- (working "Installing Aladdin Font Files...")
- (run ("RAM:lhex >CON:0/0//60/lhex/AUTO -a -f \"-w=%s\" x %sFonts.lha" wheredir diskname2))
- )
- )
-
- ;================================================================
- ; DISK 3
- ;================================================================
-
- (complete 40)
-
- (askdisk
- (prompt "Please insert Installation Disk 3 in any drive.")
- (help "")
- (dest (substr diskname3 0 (- (strlen diskname3) 1)))
- (assigns)
- )
-
- (if (exists (tackon diskname3 "Help.lha"))
- (
- (working "Installing Help Files...")
- (run ("RAM:lhex >CON:0/0//60/lhex/AUTO -a -f \"-w=%s\" x %sHelp.lha" wheredir diskname3))
- )
- )
-
- (if (exists (tackon diskname3 "SampleFiles.lha"))
- (
- (working "Installing Default Settings Files...")
- (run ("RAM:lhex >CON:0/0//60/lhex/AUTO -a -f \"-w=%s\" x %sSampleFiles.lha" wheredir diskname3))
- )
- )
-
- (if (exists (tackon diskname3 "SampleDrawings.lha"))
- (
- (working "Installing Sample Drawing Files...")
- (run ("RAM:lhex >CON:0/0//60/lhex/AUTO -a -f \"-w=%s\" x %sSampleDrawings.lha" wheredir diskname3))
- )
- )
-
- (if (exists (tackon diskname3 "SamplePictures.lha"))
- (
- (working "Installing Sample Pictures...")
- (run ("RAM:lhex >CON:0/0//60/lhex/AUTO -a -f \"-w=%s\" x %sSamplePictures.lha" wheredir diskname3))
- )
- )
-
- (if (exists (tackon diskname3 "SampleTextures.lha"))
- (
- (working "Installing Sample Textures...")
- (run ("RAM:lhex >CON:0/0//60/lhex/AUTO -a -f \"-w=%s\" x %sSampleTextures.lha" wheredir diskname3))
- )
- )
-
- (if (exists (tackon diskname3 "Magic.lha"))
- (
-
- (working "Installing MAGIC Files...")
- (run ("RAM:lhex >CON:0/0//60/lhex/AUTO -a -f \"-w=%s\" x %sMagic.lha" wheredir diskname3))
-
- (copyfiles
- (prompt "If you want the MAGIC utility automatically "
- "started each time you reboot, select `Proceed "
- "With Copy'. Otherwise select `Skip This Part' "
- "to run the MAGIC utility manually.")
- (help "The MAGIC system is used for sharing 24-bit image "
- "data between applications while they are running. "
- "For Aladdin 4D, this allows a program such as ImageFX "
- "to edit texture imagery directly.")
- (source (tackon wheredir "MAGIC/MagicServer"))
- (dest "SYS:WBStartup")
- (confirm)
- )
-
- )
- )
-
- ;================================================================
- ; DISK 4
- ;================================================================
-
- (complete 60)
-
- (askdisk
- (prompt "Please insert Installation Disk 4 in any drive.")
- (help "")
- (dest (substr diskname4 0 (- (strlen diskname4) 1)))
- (assigns)
- )
-
- (if (exists (tackon diskname4 "SampleFlares.lha"))
- (
- (working "Installing Sample Flare Textures...")
- (run ("RAM:lhex >CON:0/0//60/lhex/AUTO -a -f \"-w=%s\" x %sSampleFlares.lha" wheredir diskname4))
- )
- )
-
- ;================================================================
- ; DISK 5
- ;================================================================
-
- (complete 80)
-
- (askdisk
- (prompt "Please insert Installation Disk 5 in any drive.")
- (help "")
- (dest (substr diskname5 0 (- (strlen diskname5) 1)))
- (assigns)
- )
-
- (if (exists (tackon diskname5 "Examples.lha"))
- (
- (working "Installing Example Projects...")
- (run ("RAM:lhex >CON:0/0//60/lhex/AUTO -a -f \"-w=%s\" x %sExamples.lha" wheredir diskname5))
- )
- )
-
- ;================================================================
- ; Miscellaneous stuff
- ;================================================================
-
- (run "Delete RAM:lhex QUIET")
-
- ;(if (> @user-level 1)
- ; (
- ; (set theassign
- ; (askstring
- ; (prompt "Select an Assign name for the ImageFX drawer: "
- ; "(Do NOT include a trailing colon (:)!)")
- ; (help @askstring-help)
- ; (default assignname)
- ; )
- ; )
- ; )
- ; ; else
- ; (
- ; (set theassign assignname)
- ; )
- ;)
- (set theassign assignname)
- (set theassign2 "Aladdin4DTools")
- (set theassign3 "Aladdin4DHelp")
- (set theassign4 "Aladdin4DDef")
-
- (working "Setting Icon Tool Types...")
-
- (if (>= osver 39)
- (
- (set guideprog "MultiView")
- )
- ; else
- (
- (set guideprog "AmigaGuide")
- )
- )
-
- (tooltype
- (prompt "")
- (help "")
- (dest (tackon wheredir "Aladdin4D.guide"))
- (setdefaulttool ("%ls" guideprog))
- )
-
- (if (exists (tackon wheredir "README"))
- (
- (if (>= osver 39)
- (
- (tooltype
- (prompt "")
- (help "")
- (dest (tackon wheredir "README"))
- (setdefaulttool "MultiView")
- )
- )
- ; else
- (
- (tooltype
- (prompt "")
- (help "")
- (dest (tackon wheredir "README"))
- (setdefaulttool "More")
- )
- )
- )
- )
- )
-
- ;(set norexxmast (run "sys:rexxc/tcc"))
- ;
- (set runrexxmast 0)
- ;(if norexxmast
- ; (
- ; ; Ask expert user if he wants to run RexxMast
- ; (set runrexxmast 1)
- ; (if (> @user-level 1)
- ; (set runrexxmast
- ; (askbool
- ; (prompt "The RexxMast server software is not currently running. "
- ; "Would you like to start RexxMast automatically at each reboot?" )
- ; (help "ImageFX requires the RexxMast software to be running before you "
- ; "can use any Arexx programs.")
- ; (default 1)
- ; )
- ; )
- ; )
- ; )
- ;)
-
- (set defaultcmds
- (cat
- ("Assign \"%ls:\" \"%ls\"\n" theassign wheredir)
- ("Assign \"%ls:\" \"%ls\"\n" theassign2 (cat theassign ":Tools"))
- ("Assign \"%ls:\" \"%ls\"\n" theassign3 (cat theassign ":Help"))
- ("Assign \"%ls:\" \"%ls\"" theassign4 (cat theassign ":Support/Def/Defaults"))
- )
- )
-
- (if runrexxmast
- (
- (set cmds (cat defaultcmds "\nRexxMast >NIL: <NIL:"))
- (run "sys:rexxc/RexxMast") ; run it now, too.
- )
- ; else
- (
- (set cmds defaultcmds)
- )
- )
-
- (onerror
- (message
- "Cannot update your user-startup file (this is probably because of some "
- "non-standard modifications that were made to the file). You will "
- "need to add the following commands to `s:user-startup' manually:\n" cmds
- )
- )
-
- (startup "Aladdin 4D"
- (prompt
- "Do you want to add the following commands to your "
- "user-startup file?\n" cmds
- )
- (help @startup-help)
- (command cmds)
- )
-
- ; fix up amigaguide path (not necessary?)
-
- ;(if (= 0 writeover)
- ; (
- ;
- ; (set setupagpath 1)
- ; (if (> @user-level 1)
- ; (set setupagpath
- ; (askbool
- ; (prompt "The installation will now add a line to ENV:AmigaGuide/Path.")
- ; (help "This is sometimes needed to allow AmigaGuide help to find ImageFX's help files.")
- ; (choices "Proceed" "Skip This Part")
- ; (default 1)
- ; )
- ; )
- ; )
- ;
- ; (if setupagpath
- ; (
- ;
- ; (if (= 0 (exists "ENV:AmigaGuide/Path"))
- ; (
- ; (makedir "ENV:AmigaGuide")
- ; (textfile
- ; (dest "ENV:AmigaGuide/Path")
- ; (help "")
- ; (prompt "")
- ; (append ("\"%ls:Help\"" theassign))
- ; )
- ; )
- ; ; else
- ; (
- ; (textfile
- ; (dest "RAM:temp_ag_path")
- ; (help "")
- ; (prompt "")
- ; (include "ENV:AmigaGuide/Path")
- ; (append ("\n\"%ls:Help\"" theassign))
- ; )
- ; (copyfiles
- ; (prompt "")
- ; (help "")
- ; (source "RAM:temp_ag_path")
- ; (dest "ENV:AmigaGuide")
- ; (newname "Path")
- ; )
- ; )
- ; )
- ; (copyfiles
- ; (prompt "")
- ; (help "")
- ; (source "ENV:AmigaGuide")
- ; (dest "ENVARC:AmigaGuide")
- ; (all)
- ; )
- ; (delete "RAM:temp_ag_path")
- ;
- ; )
- ; )
- ;
- ; )
- ;)
-
- (if (>= osver 39)
- (
- ; remove any existing alad.library from memory if we can...
- (run "avail flush")
- )
- )
-
- ; make necessary assigns so we can run the program right away...
- (makeassign theassign wheredir)
- (makeassign theassign2 (tackon wheredir "Tools"))
- (makeassign theassign3 (tackon wheredir "Help"))
- (makeassign theassign4 (tackon wheredir "Support/Def/Defaults"))
-
- ; Get rid of the old "Aladdin 4D V5" section -- it's obsolete now.
- ; I wish there was a better way to do this. Maybe I'll write a program
- ; someday to sniff out and delete sections from user-startup.
- ;(startup "Aladdin 4D V5"
- ; (prompt "")
- ; (help "")
- ; (command "")
- ;)
-
- (complete 100)
-
- (message "Please be sure to fill out and return your registration card! "
- "Note that the program serial number can be found on the label "
- "of disk 1.")
-
- ; Installation complete!
- )
-
- ;-----------------------------------------------------------------------
- ; Revision History:
- ;
- ; 07.07.96 tek
- ; Cleaned up for beta release attempt.
- ;
- ; 30.07.96 tek
- ; Cleaned up for another beta release attempt.
- ;
- ; 09.08.96 tek
- ; I think fixed the problem with makeassign. Moved them to the very
- ; end anyway in case of problems.
- ;
- ; 13.08.96 tek
- ; Cleaned up library installation. Added reqtools.library for OS 2.04 users.
- ;
- ; 27.07.97 tek
- ; Moved help files to disk 3.
- ;
-