;
; PIO-Install
;

;(effect "center" "horizontal"
;; ( + ( * ( + ( * 256 46) 139) 256) 87)
;; ( + ( * ( + ( * 256 240) 255) 256) 255)
;$2e8b57
;$f0ffff
;)
(set #welcome ( cat "This script will install the icon plugin for PPaint. "
		    "The installation assumes that PPaint resides in the "
		    " directory assigned to PPAINT:.\n"
			"\n  __      "
			"\n //_)     "
			"\n//__) WARE"
		)
)

(message #welcome)
(welcome)
(complete 0)
(if (> @user-level 0)
    (
     (set #ppaint-dir
	(askdir
	    (prompt "Please set the PPaint installation directory.")
	    (default "PPAINT:")
	    (help (cat "No help available. You are"
			"\na) Lost"
			"\nb) Confused"
			"\nc) Bored."
			"\nPlease reboot your brain."))
	)
     )
     (set #ppaint-setup
	(askbool (prompt "Do you want to switch off PPaint's automatic icon generation ?")
		 (choices "Yes" "No")
		 (help (cat "You have to turn off automatic generation of icons"
			    " to enable the advanced features of the personal_icon_io.library."
			    "\nAn EDIT script will set ICONS=0 in the Startup_1.set prefs file."
			    " Note that it leaves an ugly :T/Edit-Backup file on your disk."
			    " You can edit the prefs file with any text editor, so there is"
			    " no danger in selecting No, as long as you change the entry by hand."
			    ))
	)
     )
    )
    ((set #ppaint-dir "PPAINT:") (set #ppaint-setup 1))
)
(set @default-dest #ppaint-dir)
(complete 35)
(copylib (source "library/personal_icon_io.library") (dest (tackon #ppaint-dir "libs")) )
(complete 70)
(if  #ppaint-setup
   ((run "setenv EDITSCRIPT f/ICONS/e/1/0/w")
    (run ("edit \"%s\" with ENV:EDITSCRIPT opt w160" (tackon #ppaint-dir "PPaint_Prefs/Startup_1.set")))
))
(complete 100)
