;PAGESTREAM 4.0 INSTALLATION SCRIPT
;COPYRIGHT ©2000 SOFTLOGIK PUBLISHING CORPORATION

;ENSURE AMIGAOS 2+
(set ADOS (/ (getversion) 65536))
(if
	(NOT (>= ADOS 37))
	(abort "PageStream requires AmigaOS 2.04 or newer!")
)
(set ASLflag 0)
(set temp (getversion "libs:asl.library"))
(set asl.ver (/ temp 65536))
(set asl.rev (- temp (* asl.ver 65536)))
(IF (< asl.ver 38) (set ASLflag 1))

;CHECK FOR PLUGIN.TYPES
(if (<> (exists "Fonts:_bullet/plugin.types") 1)
	(abort "\n\nYour system is missing the\nFonts:_bullet/plugin.types file.\n\nThis file is required to use Compugraphic Intellifonts in PageStream. You MUST reinstall this file from your AmigaDOS disks after installing PageStream.")
)

;INSTALLATION MODE
(set INflag 0)
(set UNflag 1)

(set imode
	(askchoice
		(prompt
			"\nPageStream requires 4MB of free memory, AmigaOS 2.04 or higher, and 8MB of free hard drive space.\n\nIf you do not have a system capable of running PageStream, abort installation now.\n\nSelect an option before clicking Proceed:\n")
		(choices
			"Install"
			"Uninstall"
		)
		(default 0)
		(help
			"Install requires 8MB of free hard drive space. Uninstall will remove PageStream and all of the files in its directory from your hard drive. Unless you have moved some of its files to another directory, this option will remove all traces of the program from your system. Note that any files you may have stored in its directory, such as graphics, fonts and documents, will also be deleted.\n\n"
		)
	)
)

;UNINSTALL OPTION
(if (= imode UNflag)
	(if
		(askbool
			(prompt
				"The Uninstall option deletes the entire PageStream directory and every file in it. If you have stored any files in it (graphics, documents, fonts, text, etc), they will be permanently deleted.\n\n"
				"Are you really sure you want to do this?\n\n"
				"USE WITH CAUTION!!! THIS CANNOT BE UNDONE!!!")
			(help
				"This option should only be used if you want to remove all traces of PageStream from your computer's hard drive. It is equivalent to removing the assigns and then deleting the PageStream directory.\n\n"
				"USE WITH CAUTION!!! THIS CANNOT BE UNDONE!!!\n\n"
				"Note: This option cannot be used if you have added other assigns to the PageStream directory. i.e., if you have assigned Text: to PageStream:Text, then you must manually remove the assign before this option can be used.")
			(choices "Uninstall" "Cancel")
			(default 0)
		)
		(
			(set deletepath (expandpath "PageStream:"))
			(run "assign fonts: softlogik:fonts remove" (safe))
			(run "avail flush") ; flush libraries & fonts in case they ran PGS this session.
			(makeassign "SoftLogik" (safe))  ; remove the SoftLogik assign
			(makeassign "PageStream" (safe)) ; remove the PageStream assign
			(makeassign "PageStream3" (safe)) ; remove the PageStream assign
			(makeassign "PageStream4" (safe)) ; remove the PageStream assign
			(run (cat "delete " deletepath " all"))
			(run (cat "delete " deletepath ".info"))
			(user 1) ; change user to average so the startup screen won't appear
			(startup "PageStream4"
				(prompt "")
				(help "")
			)
			(user 2) ; change user back to expert. What a brain-dead installer language.
			(message "Uninstall Complete!\n\nPageStream has been removed from your hard drive.")
			(exit "Uninstall Complete!\n\nPageStream has been removed from your hard drive.\n\nSelect either Proceed or Abort to exit." (quiet))
		)
		(
			(exit "Uninstall aborted" (quiet))
		)
	)
)

;IF NOT AN UPGRADE, GET DESTINATION. CREATE MAIN DIRECTORIES. MAKE ASSIGNS.
(set UPflag 1)	; 1 for upgrade, 0 for new install
(set PGSdest (getassign "PageStream" "a"))
(if (= PGSdest "") (getassign "PageStream4" "a"))
(if (= PGSdest "") (getassign "PageStream3" "a"))

(if (= PGSdest "")
	(
		(set UPflag 0)
		(set PGSdest
			(askdir
				(prompt
					"Select the directory in which you would\n "
					"like the PageStream drawer created.\n")
				(help
					"A drawer named PageStream will be created\n"
					"here to store the program and its files.")
				(default @default-dest)
			)
		)
		(set PGSdest (tackon PGSdest "PageStream"))

		;CREATE PAGESTREAM FOLDER
		(if (<> (exists PGSdest) 2) (makedir PGSdest (infos)))
		(makeassign "PageStream" PGSdest (safe))
		(makeassign "PageStream3" PGSdest (safe))
		(makeassign "PageStream4" PGSdest (safe))

		;CREATE SOFTLOGIK FOLDER
		(set SLdest "PageStream:SoftLogik")
		(if (<> (exists SLdest) 2) (makedir SLdest (infos)))
		(makeassign "SoftLogik" SLdest (safe))

		;CREATE SOFTLOGIK:FONTS FOLDER
		(set FONdest (tackon SLdest "Fonts"))
		(if (<> (exists FONdest) 2) (makedir FONdest (infos)))
		(run "assign fonts: softlogik:fonts add" (safe))

		;ADD ASSIGNS TO USER-STARTUP
		(startup "PageStream"
			(prompt "\n\nAssigns for PageStream: and SoftLogik: must be added to your user-startup file. Is this Ok?")
			(help "The help system, included macros and default setup require the PageStream: assign. The SoftLogik: assign is absolutely required for PageStream to be used. The Fonts: assign adds the SoftLogik:Fonts directory to your normal Fonts: assign so that PageStream's interface fonts will be available to AmigaOS without having to be stored in Sys:Fonts. Skipping this step will lead to problems using PageStream. ")
			(command "Assign PageStream: \"" PGSdest "\"\n")
			(command "Assign PageStream3: \"" PGSdest "\"\n")
			(command "Assign PageStream4: \"" PGSdest "\"\n")
			(command "Assign SoftLogik: \"" SLdest "\"\n")
			(command "Assign Fonts: \"" FONdest "\" ADD\n")
		)

		;ADD REXX TO USER-STARTUP?
		(if
			(startup "ARexx"
				(prompt "The ARexx script language is included with AmigaOS, but it is not available unless you have chosen\nto start it. It is highly recommended that ARexx be started everytime you use PageStream.\n\n"
						"If you would like ARexx started automatically and you have not already done so, click on Proceed to have it started from your User-Startup script. This requires that you have not moved the RexxMast program from your Sys:System directory. Click on Help for more information.")
				(help "If you do not have ARexx started when you use PageStream, you will miss out on some of its features. You will not be able to use many of the included scripts, and parts of the help system will be unavailable to you. You don't have to be a programmer to enjoy the benefits that ARexx will give you in PageStream. Therefore, it is highly recommended that ARexx be loaded each time you start your computer.\n\n"
					  "There are two ways to start ARexx automatically. You can copy Sys:System/RexxMast to your Sys:WBstartup directory, or RexxMast can be started from your User-Startup script. If you have done one of these already, skip this part. If not, this installer can add the appropriate command to your User-Startup script for you.")
				(command "sys:system/rexxmast >NIL:")
			)
			(run "sys:system/rexxmast >NIL:")
		)

		;CHOOSE SCREEN MODE
		(set screen_mode
			(askchoice
				(prompt
					"\nChoose one of the four basic screen modes now. If you don't want to choose one of these modes, choose Workbench, but click on Help for instructions.\n")
				(choices "NTSC:High Res Laced" "PAL:High Res Laced" "DBLNTSC:High Res No Flicker (AGA)" "DBLPAL:High Res No Flicker (AGA)" "Workbench")
				(default 0)
				(help
					"If you use an Amiga 1200 or 4000 and have a standard-size monitor (1080, 1084, 1940, 1942, 1950, 1960, etc), choose DBLNTSC (USA and Canada) or DBLPAL (most other countries); if you have an older Amiga and a standard-size monitor, choose NTSC or PAL. If you a different monitor and don't normally use the NTSC, PAL, DBLNTSC, or DBLPAL modes, choose Workbench and set your screen mode from within PageStream.\n\n"
					"Most people use PageStream on a separate public (non-Workbench) screen. If your Workbench is smaller than 640x281, you must run it on a separate public screen.\n\n"
					"PageStream allows you to change the screen mode at any time by choosing Screen from the System Preferences submenu. You may need to set the Display DPI (screen resolution). A standard NTSC display is 65x55, while a standard PAL display is 65x70."
				)
			)
		)

		;(message "\n\nIf you haven't filled out your registration card yet, do it now while PageStream is being installed.\n\nClick Proceed to begin installation. You will only be prompted to change disks from now on.")
		(message "\n\nIf you haven't filled out your registration card yet, do it now while PageStream is being installed.\n\nClick Proceed to begin installation.")
	)
	(
		;IF AN UPGRADE
		(message "\nThis installer will clean up old 3.0 files that could cause problems. If you experience font-related problems, please restart your computer, uninstall PageStream with this installer. Then reinstall PageStream 3.3a again. Uninstalling will ensure that you have a clean installation. We recommend that you backup files that you have created or installed in the PageStream drawer before doing this because Uninstall will remove all files in this drawer.")
		;(message "\nAfter starting this version of PageStream for the first time, choose Fonts from the System Preferences command in the Project menu, and add or update the font paths to match your font drawer setup.\n\nBecause you have PageStream already installed you may not be required to insert all of the disks.")
		(message "\nAfter starting this version of PageStream for the first time, choose Fonts from the System Preferences command in the Project menu, and add or update the font paths to match your font drawer setup.")
		;DELETE OLD MACRO
		(if (<> (exists "PageStream:Macros") 2) (rename "PageStream:Macros" "PageStream:Scripts"))
		(if (<> (exists "PageStream:Macros.info") 2) (rename "PageStream:Macros.info" "PageStream:Scripts.info"))
		(delete "PageStream:Scripts/duplicatetopage.rexx" (safe))
		(delete "PageStream:Scripts/SetLessonDefaults.rexx" (safe))
		(delete "PageStream:Scripts/SetLessonDefaults.prefs" (safe))
		(delete "PageStream:Scripts/SetRotationPoint.rexx" (safe))
		(delete "PageStream:Scripts/ClearRotationPoint.rexx" (safe))
		(delete "PageStream:Scripts/RotateAboutPoint.rexx" (safe))
		(delete "PageStream:Scripts/StickyNote.rexx" (safe))
		(delete "PageStream:Scripts/PlaceGraphicAt.rexx" (safe))
		(delete "PageStream:Scripts/PrintMacros.rexx" (safe))
		;DELETE OLD CACHED PFB FILES
		(delete "PageStream:Fonts/Intellifonts/91545.pfb" (safe))
		(delete "PageStream:Fonts/Intellifonts/91547.pfb" (safe))
		(delete "PageStream:Fonts/Intellifonts/91546.pfb" (safe))
		(delete "PageStream:Fonts/Intellifonts/91548.pfb" (safe))
		;DELETE OLD FONT FILES
		(delete "PageStream:Fonts/StandardFonts/avnt_do.dmf" (safe))
		(delete "PageStream:Fonts/StandardFonts/avnt_o.dmf" (safe))
		(delete "PageStream:Fonts/StandardFonts/hlvn_bo.dmf" (safe))
		(delete "PageStream:Fonts/StandardFonts/hlvn_o.dmf" (safe))
		(delete "PageStream:Fonts/StandardFonts/cour_bo.dmf" (safe))
		(delete "PageStream:Fonts/StandardFonts/cour_o.dmf" (safe))
		(delete "PageStream:Fonts/StandardFonts/book_di.dmf" (safe))
		(delete "PageStream:Fonts/StandardFonts/book_i.dmf" (safe))
		(delete "PageStream:Fonts/StandardFonts/pala_bi.dmf" (safe))
		(delete "PageStream:Fonts/StandardFonts/pala_i.dmf" (safe))
		(delete "PageStream:Fonts/StandardFonts/schl_bi.dmf" (safe))
		(delete "PageStream:Fonts/StandardFonts/schl_i.dmf" (safe))
		;DELETE OLD EFFECTS
		(delete "SoftLogik:Effects/Tiles.effect" (safe))
		;DELETE OLD FILTERS
		(delete "SoftLogik:Filters/FreehandEPS.gfilter" (safe))
		(delete "SoftLogik:Filters/IFFDTXT.tfilter" (safe))
		(delete "SoftLogik:Filters/WordPerfect5.tfilter" (safe))
		(delete "SoftLogik:Filters/Word.tfilter" (safe))
		(delete "SoftLogik:Filters/PICT.gfilter" (safe))
		(rename "SoftLogik:Filters/Wordworth.dfilter" "SoftLogik:Filters/WordworthDoc.dfilter" (safe))
		;DELETE OLD PRINTERS
		(delete "SoftLogik:Printers/HP.printer" (safe))
		;FOR GERMAN USERS
		(delete "PageStream:PageStream4.rsrc" (safe))
		;DELETE OLD HELP FILES
		(run "delete PageStream:Help/#? all")
		(delete "SoftLogik:Engines/Français.language" (safe))
		(rename "SoftLogik:Engines/English.dictionary" "SoftLogik:Engines/American.dictionary" (safe))
		(delete "SoftLogik:Engines/XPress.codes" (safe))
		(delete "SoftLogik:Engines/ProPage.codes" (safe))
		;CLEANUP AFTER BAD INSTALLER FROM A 3.3BETA
		(run "delete SoftLogik:XPD all")
	)
)
;We now have a valid destination, so tell Installer so the exit page will be correct
(set @default-dest PGSdest)

;MAKE OTHER DIRECTORIES IF THEY DON'T EXIST

(if (<> (exists "SoftLogik:Engines") 2) (makedir "SoftLogik:Engines" (infos)))
(if (<> (exists "SoftLogik:Engines/Borders") 2) (makedir "SoftLogik:Engines/Borders" (infos)))
(if (<> (exists "SoftLogik:Filters") 2) (makedir "SoftLogik:Filters" (infos)))
(if (<> (exists "SoftLogik:Effects") 2) (makedir "SoftLogik:Effects" (infos)))
(if (<> (exists "SoftLogik:Printers") 2) (makedir "SoftLogik:Printers" (infos)))
(if (<> (exists "SoftLogik:Printers/PPD") 2) (makedir "SoftLogik:Printers/PPD" (infos)))
(if (<> (exists "SoftLogik:Printers/XPD") 2) (makedir "SoftLogik:Printers/XPD" (infos)))
(if (<> (exists "SoftLogik:Libs") 2) (makedir "SoftLogik:Libs" (infos)))
(if (<> (exists "SoftLogik:Colors") 2) (makedir "SoftLogik:Colors" (infos)))
(if (<> (exists "SoftLogik:Special") 2) (makedir "SoftLogik:Special" (infos)))
(if (<> (exists "SoftLogik:Special/Keys") 2) (makedir "SoftLogik:Special/Keys"))

(if (<> (exists "PageStream:Fonts") 2) (makedir "PageStream:Fonts" (infos)))
(if (<> (exists "PageStream:Fonts/Intellifonts") 2) (makedir "PageStream:Fonts/Intellifonts" (infos)))
(if (<> (exists "PageStream:Fonts/StandardFonts") 2) (makedir "PageStream:Fonts/StandardFonts" (infos)))
(if (<> (exists "PageStream:Fonts/SoftLogikFonts") 2) (makedir "PageStream:Fonts/SoftLogikFonts" (infos)))
(if (<> (exists "PageStream:Fonts/StudioFonts") 2) (makedir "PageStream:Fonts/StudioFonts" (infos)))

(if (<> (exists "PageStream:Graphics") 2) (makedir "PageStream:Graphics" (infos)))
(if (<> (exists "PageStream:Text") 2) (makedir "PageStream:Text" (infos)))
(if (<> (exists "PageStream:Documents") 2) (makedir "PageStream:Documents" (infos)))
(if (<> (exists "PageStream:Documents/Templates") 2) (makedir "PageStream:Documents/Templates" (infos)))
(if (<> (exists "PageStream:Documents/Backups") 2) (makedir "PageStream:Documents/Backups" (infos)))

(if (<> (exists "PageStream:Macros") 2) (rename "PageStream:Macros" "PageStream:Scripts"))
(if (<> (exists "PageStream:Macros.info") 2) (rename "PageStream:Macros.info" "PageStream:Scripts.info"))
(if (<> (exists "PageStream:Scripts") 2) (makedir "PageStream:Scripts" (infos)))
(if (<> (exists "PageStream:Scripts/TextClips") 2) (makedir "PageStream:Scripts/TextClips" (infos)))
(if (<> (exists "PageStream:Scripts/TemplateData") 2) (makedir "PageStream:Scripts/TemplateData" (infos)))
(if (<> (exists "PageStream:Help") 2) (makedir "PageStream:Help" (infos)))


;** DISK 1 **

;INSTALL PAGESTREAM (PGS.lha)
(working "Installing PageStream...\n\n\nOrder the TextFX extension ($50) so that you can\nwarp text inside of shapes, and bend text on curves!\n\nCall 715-367-7667 to order!")
(copyfiles (source "PageStream4") (dest "PageStream:") (infos) (nogauge))
(copyfiles (source "PageStream4.prefs") (dest "PageStream:") (infos) (nogauge))

;INSTALL README (Read.lha)
(copyfiles (source "ReadMe.Now") (dest "PageStream:") (infos) (nogauge))

;CREATE PREF FILES IF REQUIRED
(if
	(<> (exists "PageStream:PageStream4.prefs") 1)
	(
		(if
			(= (exists "PageStream:PageStream3.prefs") 1)
			(
				(copyfiles (source "PageStream:PageStream3.prefs") (dest "PageStream:")(newname "PageStream4.prefs") (nogauge))
			)
			(
				(set NTSCflag 0)
				(set PALflag 1)
				(set DNTSCflag 2)
				(set DPALflag 3)
				(set WBflag 4)
				(set NTSC "NTSC:High Res Laced' -1 8\n")
				(set NTSC204 "NTSC:Hires-Interlace' -1 8\n")
				(set PAL "PAL:High Res Laced' -1 8\n")
				(set PAL204 "PAL:Hires-Interlace' -1 8\n")
				(set DNTSC "DBLNTSC:High Res No Flicker' -1 8\n")
				(set DPAL "DBLPAL:High Res No Flicker' -1 8\n")
				(set PREF "PREFERENCE FILE\nSCREEN Public -1 -1 2 '")
				(if (AND (= screen_mode NTSCflag) (> ADOS 37)) (set preffile (cat PREF NTSC)))
				(if (AND (= screen_mode NTSCflag) (< ADOS 39)) (set preffile (cat PREF NTSC204)))
				(if (AND (= screen_mode PALflag) (> ADOS 37)) (set preffile (cat PREF PAL)))
				(if (AND (= screen_mode PALflag) (< ADOS 39)) (set preffile (cat PREF PAL204)))
				(if (= screen_mode DNTSCflag) (set preffile (cat PREF DNTSC)))
				(if (= screen_mode DPALflag) (set preffile (cat PREF DPAL)))
				(if (= screen_mode WBflag) (set preffile "PREFERENCE FILE\n"))

				(textfile
					(dest "PageStream:PageStream4.prefs")
					(append preffile)
					(safe)
				)
				(textfile
					(dest "PageStream:BME.prefs")
					(append preffile)
					(safe)
				)
			)
		)
	)
)


;** DISK 2 **

;INSTALL HELP FILES (HHV.lha & Help.lha)
(working "Installing Help Files...\n\n\nOrder Borders Volume 1 ($40) for PageStream.\n60 Basic Borders including coupon, map,\nand symbol designs!\n\nCall 715-367-7667 to order!")
;(run "ram:lhex >NIL: <NIL: -qfw=PageStream: x PageStream3Disk2:HHV.LHA")
(copyfiles (source "HHV") (dest "PageStream:") (infos) (nogauge))
;(run "ram:lhex >NIL: <NIL: -qfw=PageStream:Help x PageStream3Disk2:Help.LHA")
(copyfiles (source "Help") (dest "PageStream:Help") (all) (nogauge))

;INSTALL TUTORIAL FILES (Graphics.lha, Text.lha, Documents.lha)
;(run "ram:lhex >NIL: <NIL: -qfw=PageStream:Graphics x PageStream3Disk2:Graphics.LHA")
(copyfiles (source "Graphics") (dest "PageStream:Graphics") (all) (files) (optional) (nogauge))
;(run "ram:lhex >NIL: <NIL: -qfw=PageStream:Text x PageStream3Disk2:Text.LHA")
(copyfiles (source "Text") (dest "PageStream:Text") (all) (files) (optional) (nogauge))
;(run "ram:lhex >NIL: <NIL: -qfw=PageStream:Documents x PageStream3Disk2:Documents.LHA")
(copyfiles (source "Documents") (dest "PageStream:Documents") (all) (files) (optional) (nogauge))

;INSTALL EFFECTS (Effects.lha)
(working "Installing Support Files...\n\n\nOrder Borders Volume 1 ($40) for PageStream.\n60 Basic Borders including coupon, map,\nand symbol designs!\n\nCall 715-367-7667 to order!")
;(run "ram:lhex >NIL: <NIL: -qfw=SoftLogik:Effects x PageStream3Disk2:Effects.LHA")
(copyfiles (source "SoftLogik/Effects") (dest "SoftLogik:Effects") (all) (files) (nogauge))


;** DISK 3 **

;INSTALL BORDERS (Borders.lha)
(working "Installing Border Samples...\n\n\nOrder Borders Volume 1 ($40) for PageStream.\n60 Basic Borders including coupon, map,\nand symbol designs!\n\nCall 715-367-7667 to order!")
;(run "ram:lhex >NIL: <NIL: -qfw=SoftLogik:Engines/Borders x PageStream3Disk3:Borders.LHA")
(copyfiles (source "SoftLogik/Engines/Borders") (dest "SoftLogik:Engines/Borders") (all) (files) (nogauge))

;INSTALL ENGINES & LANGUAGE (Engines.lha & Language.lha)
(working "Installing Support Files...\n\n\nOrder Borders Volume 1 ($40) for PageStream.\n60 Basic Borders including coupon, map,\nand symbol designs!\n\nCall 715-367-7667 to order!")
;(run "ram:lhex >NIL: <NIL: -qfw=SoftLogik:Engines x PageStream3Disk3:Engines.LHA")
;(run "ram:lhex >NIL: <NIL: -qfw=SoftLogik:Engines x PageStream3Disk3:Languages.LHA")
(copyfiles (source "SoftLogik/Engines") (dest "SoftLogik:Engines") (all) (files) (nogauge))

;INSTALL FILTERS (Filters.lha)
(working "Installing Support Files...\n\n\nOrder Borders Volume 2 ($40) for PageStream.\n60 Geometric Borders including decorative, nature,\nclassical, and music designs!\n\nCall 715-367-7667 to order!")
;(run "ram:lhex >NIL: <NIL: -qfw=SoftLogik:Filters x PageStream3Disk3:Filters.LHA")
(copyfiles (source "SoftLogik/Filters") (dest "SoftLogik:Filters") (all) (files) (nogauge))

;INSTALL PRINTER DRIVERS (Printers.lha)
;(run "ram:lhex >NIL: <NIL: -qfw=SoftLogik:Printers x PageStream3Disk3:Printers.LHA")
(copyfiles (source "SoftLogik/Printers") (dest "SoftLogik:Printers") (all) (files) (nogauge))

;INSTALL LIBS (Libs.lha)
;(run "ram:lhex >NIL: <NIL: -qfw=SoftLogik:Libs x PageStream3Disk3:Libs.LHA")
(copyfiles (source "SoftLogik/Libs") (dest "SoftLogik:Libs") (all) (files) (nogauge))


;** DISK 4 **

;REQUEST DISK 4
;(askdisk
;	(prompt "\n\n\nPlease insert the disk labeled \"Disk4 Amiga v3.3a\".")
;	(help
;		"You must insert this disk in a floppy drive to complete the installation. If you are missing this disk or if the installer does not accept the disk, contact SoftLogik for assistance.")
;	(dest "PageStream3Disk4")
;)

;INSTALL BME (BME.lha)
(working "Installing BME...\n\n\nOrder the TrueType Font Engine ($25) so that\nyou can use TrueType fonts with PageStream!\n\nCall 715-367-7667 to order!")
;(run "ram:lhex >NIL: <NIL: -qfw=PageStream: x PageStream3Disk4:BME.LHA")
(copyfiles (source "BME") (dest "PageStream:") (infos) (nogauge))

;INSTALL PAGELINER (PL.lha)
(working "Installing PageLiner...\n\n\nOrder Borders Volume 1 and 2 ($60 package)\nto create stunning borders in PageStream!\n\nCall 715-367-7667 to order!")
;(run "ram:lhex >NIL: <NIL: -qfw=PageStream: x PageStream3Disk4:PL.LHA")
(copyfiles (source "PageLiner") (dest "PageStream:") (infos) (nogauge))

;INSTALL DEFAULT STYLES AND COLORS (DefStyles.lha & DefColor.lha)
(working "Installing Support Files...\n\n\nOrder Borders Volume 1 and 2 ($60 package)\nto create stunning borders in PageStream!\n\nCall 715-367-7667 to order!")
;(run "ram:lhex >NIL: <NIL: -qfw=PageStream: x PageStream3Disk4:DefColor.LHA")
(if
	(<> (exists "PageStream:PageStream4.colors") 1)
	(
		(if
			(= (exists "PageStream:PageStream3.colors") 1)
			(
				(copyfiles (source "PageStream:PageStream3.colors") (dest "PageStream:") (newname "PageStream4.colors") (nogauge))
			)
			(
				(copyfiles (source "PageStream4.colors") (dest "PageStream:") (nogauge))
			)
		)
	)
)
;(run "ram:lhex >NIL: <NIL: -qfw=PageStream: x PageStream3Disk4:DefStyles.LHA")
(if
	(<> (exists "PageStream:PageStream4.styles") 1)
	(
		(if
			(= (exists "PageStream:PageStream3.styles") 1)
			(
				(copyfiles (source "PageStream:PageStream3.styles") (dest "PageStream:") (newname "PageStream4.styles") (nogauge))
			)
			(
				(copyfiles (source "PageStream4.styles") (dest "PageStream:") (nogauge))
			)
		)
	)
)

;INSTALL INTERFACE FONTS (SysFonts.lha)
;(run "lhex >NIL: <NIL: -qfw=PageStream: x Install/SysFonts.LHA")
(copyfiles (source "SoftLogik/Fonts") (dest "SoftLogik:Fonts") (all) (files) (nogauge))

;INSTALL SPECIAL (Special.lha)
;(run "ram:lhex >NIL: <NIL: -qfw=SoftLogik:Special x PageStream3Disk4:Special.LHA")
(copyfiles (source "SoftLogik/Special") (dest "SoftLogik:Special") (all) (files) (nogauge))

;INSTALL SPELLING DICTIONARY (Spell.lha)
;(run "ram:lhex >NIL: <NIL: -qfw=SoftLogik:Engines x PageStream3Disk4:Spell.LHA")

;INSTALL COLOR LIBRARIES (Colors.lha)
;(run "ram:lhex >NIL: <NIL: -qfw=SoftLogik:Colors x PageStream3Disk4:Colors.LHA")
(copyfiles (source "SoftLogik/Colors") (dest "SoftLogik:Colors") (all) (files) (nogauge))

;INSTALL PPD FILES (ppd.lha)
;(run "ram:lhex >NIL: <NIL: -qfw=SoftLogik:Printers/PPD x PageStream3Disk4:PPD.LHA")
(copyfiles (source "SoftLogik/Printers/PPD") (dest "SoftLogik:Printers/PPD") (all) (nogauge))

;INSTALL FONT PREFS (FontPrefs.lha)
;(run "ram:lhex >NIL: <NIL: -qfw=PageStream: x PageStream3Disk4:FontPrefs.LHA")
(if
	(<> (exists "PageStream:PageStream4.fontprefs") 1)
	(
		(if
			(= (exists "PageStream:PageStream3.fontprefs") 1)
			(
				(copyfiles (source "PageStream:PageStream3.fontprefs") (dest "PageStream:") (newname "PageStream4.fontprefs") (nogauge))
			)
			(
				(copyfiles (source "PageStream4.fontprefs") (dest "PageStream:") (nogauge))
			)
		)
	)
)

;INSTALL SCRIPTS (Scripts.lha)
;(run "ram:lhex >NIL: <NIL: -qfw=PageStream:Scripts x PageStream3Disk4:Scripts.LHA")
(copyfiles (source "Scripts") (dest "PageStream:Scripts") (all) (files) (nogauge))
;(run "ram:lhex >NIL: <NIL: -qfw=PageStream:Scripts/TemplateData x PageStream3Disk4:TemplateData.LHA")
(copyfiles (source "Scripts/TemplateData") (dest "PageStream:Scripts/TemplateData") (all) (files) (nogauge))

;INSTALL NONPOSTSCRIPT PRINTER DESCRIPTIONS (XPD.lha)
(run "ram:lhex >NIL: <NIL: -qfw=SoftLogik:Printers/XPD x PageStream3Disk4:XPD.LHA")
(copyfiles (source "SoftLogik/Printers/XPD") (dest "SoftLogik:Printers/XPD") (all) (files) (nogauge))

;INSTALL CS FONTS (Times and Triumvirate) (FontsCS.lha)
(working "Installing Fonts...\n\n\nOrder the TextFX extension ($50) so that you can\nwarp text inside of shapes, and bend text on curves!\n\nCall 715-367-7667 to order!")
;(run "ram:lhex >NIL: <NIL: -qfw=PageStream:Fonts/Intellifonts x PageStream3Disk4:FontsCS.LHA")
(copyfiles (source "Fonts/Intellifonts") (dest "PageStream:Fonts/Intellifonts") (all) (files) (nogauge))

;UPDATE ASL.LIBRARY? (ASLlib.lha)
;(if
;	(= ASLflag 1)
;	(
;		(working ("ASL.library version %ld.%ld" asl.ver asl.rev " detected. Updating to version 38.36...\n\nDistributed under license from Commodore."))
;		(run "ram:lhex >NIL: <NIL: -qfw=Libs: x PageStream3Disk4:ASLlib.LHA")
;	)
;)


;** DISK 5 **

;REQUEST DISK 5
;(askdisk
;	(prompt "\n\n\nPlease insert the disk labeled \"Disk5 Amiga v3.3a\".")
;	(help
;		"You must insert this disk in a floppy drive to complete the installation. If you are missing this disk or if the installer does not accept the disk, contact SoftLogik for assistance.")
;	(dest "PageStream3Disk5")
;)

;INSTALL OTHER FONTS (FontsSL.lha, Fonts35.lha, FontsST.lha, & FontsCG.LHA)
(working "Installing Fonts...\n\n\nOrder Direct Templates ($30) to get matching templates for 488 Paper Direct® papers.\n\nCall 715-367-7667 to order!")
;(run "ram:lhex >NIL: <NIL: -qfw=PageStream:Fonts/SoftLogikFonts x PageStream3Disk5:FontsSL.LHA")
(copyfiles (source "Fonts/SoftlogikFonts") (dest "PageStream:Fonts/SoftLogikFonts") (all) (files) (nogauge))

(working "Installing Fonts...\n\n\nOrder Gary's Effects ($25) to get 12 more effects\nfor BME and PageStream!\n\nCall 715-367-7667 to order!")
;(run "ram:lhex >NIL: <NIL: -qfw=PageStream:Fonts/StandardFonts x PageStream3Disk5:Fonts35.LHA")
(copyfiles (source "Fonts/StandardFonts") (dest "PageStream:Fonts/StandardFonts") (all) (files) (nogauge))

(working "Installing Fonts...\n\n\nOrder the JPEG filter ($25) so that you can import and export JPEG images!\n\nCall 715-367-7667 to order!")
;(run "ram:lhex >NIL: <NIL: -qfw=PageStream:Fonts/StudioFonts x PageStream3Disk5:FontsST.LHA")
(copyfiles (source "Fonts/StudioFonts") (dest "PageStream:Fonts/StudioFonts") (all) (files) (nogauge))

;(working "Installing Fonts...\n\n\nOrder the Wordworth Document Filter ($25) so that you can\nopen Wordworth documents directly into PageStream!\n\nCall 715-367-7667 to order!")
;(run "ram:lhex >NIL: <NIL: -qfw=PageStream:Fonts/Intellifonts x PageStream3Disk5:FontsCG.LHA")

;DISPLAY README
(IF (> (run "Sys:Utilities/MultiView PageStream:ReadMe.Now") 0)
	(IF (> (run "Sys:Utilities/AmigaGuide PageStream:ReadMe.Now") 0)
		(run "More PageStream:ReadMe.Now")
	)
)

(exit "PageStream has been successfully installed.\n\nIf this is your first version of PageStream, remember to send in your registration card to receive your permanent password.")
