;***************************************************************************
; * $VER: Install Plug-Ins (04-31-98)
; * Script written by Eckhard Ludwig
;***************************************************************************

(set #defaultdest "DOpus5:")
(set #current_version "3.9")
(set #lng @language)

;****************************************************************************

(set #intro1 (cat 
		"Opus MPEGA PPC " 
		#current_version 
		"\nThe Definitive MPEG Audio Player for Directory Opus5\n"
		"Written ©1998 by Eckhard Ludwig"
		))

;***************************************************************************
; deutsche Texte
;***************************************************************************

(if (= #lng "deutsch")
(
(set #Opt 1)
(set #INFO  (cat	"Dieser Skript installiert eine neue Bedienoberfläche im Commodore64 Design :-).\n\n"
			"Die Buttonbank benötigt die newicons.library 40.1 (NewIcons4 muß installiert sein). "
			"Für die Opus5 Workbench sind 32 oder mehr Farben empfohlen. "
))
(set ButtonPrompt  	"Kopiere Buttonbank ...")
(set #createdir  	"Erstelle Verzeichnis ...")
(set #t_oldinstaller
		(cat
			"Die benutzte Version des Programmes Installer ist leider zu alt!"
			" Benötigt wird Version 43.3 oder neuer. Die Konfiguration kann"
			" fortgesetzt werden, es können allerdings Fehler auftreten!\n\n"
			"Möchten sie fortfahren?"
		))
(set #t_oldinstallerhelp 
		(cat
			" Die aktuelle Version des Installers findest du im AMINET im util/misc Directory."
			" Der aktuelle File Name ist \"Installer-43_3.lha\":\n"
			" <URL:ftp://ftp.germany.aminet.org/pub/aminet/util/misc/Installer-43_3.lha"
		))

(set #exitMsg   (cat
			"Aktivieren der neuen Buttonleiste:\n"
			"Starte das OpusMPEGA Konfigurationsprogramm. Wähle bei der Einstellung 'Buttonleiste wählen' die Datei OpusMPEGA_image.commodore.\n"
			"Beende OpusMPEGA, selektiere nach einen neuen Aufruf im Menü des Applicationsicon den Punkt 'Player Buttonleiste'.\n\n"
			"Viel Spaß mit OpusMPEGA\nfür Directory Opus5.5+ wünscht\nEckhard Ludwig")
		)
)

;******************************************************************************************************
; english

(
(set #Opt 2)

(set #info 	(cat 	"You install a plug-ins for OpusMPEGA.\n\n" 
			"This Plugins represents a new graphic user surface.\n"
			"newicon.library V40.1 is required!\n"
))

(set ButtonPrompt  	"Copy buttons ...")
(set #createdir  	"Create Dir ...")

(set #t_oldinstaller
		(cat
			" You have an old version of the Installer. I'll probably"
			" need version 43.3 or greater. You can continue anyway"
			" but there is no guarantee it will work as it's supposed"
			" to do.\n\n"
			" Do you wish to continue anyway?"
	))
(set #exitMsg   (cat	"The new GUI is called over the OpusMPEGA appicon with selection of the menu option 'Player buttons'.\n"
			"Run first Prefs/OpusMPEGA and select as Buttonbank 'OpusMPEGA_image.commodore'!\n."
			"Much fun with Opus MPEGA for DirectoryOpus5.5+ wish you\nEckhard Ludwig")
		)
))

;***************************************************************************

(if (< @installer-version (+ (* 43 65536) 3))
(
	(if (not (askbool
		(prompt #t_oldinstaller)
		(help #t_oldinstallerhelp)
	))
	(
		(abort (cat "\n\n" #t_oldinstallerhelp))
	))
))

;***************************************************************************

(message #intro1 "\n\n" #INFO)
(welcome)


;***************************************************************************
; copy buttons
;***************************************************************************

(copyfiles
   	(prompt ButtonPrompt)
   	(help @copyfiles-help)
     	(source "buttons")
     	(dest (tackon #defaultdest "Buttons"))
     	(optional "force" "askuser")
     	(safe)
     	(pattern "#?")
     	(files)
)

(makedir (tackon #defaultdest "Images/OpusMPEGA.Commodore")
 (prompt #createdir)
)

(copyfiles
   	(prompt ButtonPrompt)
   	(help @copyfiles-help)
     	(source "Images/OpusMPEGA.Commodore")
     	(dest (tackon #defaultdest "Images/OpusMPEGA.Commodore"))
     	(optional "force" "askuser")
     	(safe)
     	(pattern "#?")
     	(files)
)

(exit #exitMsg (quiet))
