home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga MA Magazine 1998 #3
/
amigamamagazinepolishissue1998.iso
/
bazy
/
v2.1
/
comic.install
< prev
next >
Wrap
Text File
|
1997-06-08
|
18KB
|
507 lines
;
; Installationsskript zur Comicverwaltung
;
; Andreas Zottmann, 16.7.94
;
; 14.4.95 : makedir comdat eingefügt
; 8.6.97 : Änderungen für V2.1
;
; $Id: Comic.install 1.3 1997/06/08 17:41:11 andreas Exp $
;
(welcome "Comic-Verwaltung Installation")
(if
(=
(askchoice
(prompt "\n What language do you want to use ?\n\n"
"Welche Sprache wünschen Sie ?\n")
(help "\n Select the language you want to use in the program.\n\n"
"Wählen Sie die Sprache, die sie im Programm verwenden "
"wollen.")
(choices "english" "deutsch")
(default 1)
)
1
)
(set @language "deutsch")
(set @language "english")
)
(debug @language)
(set #englisch ( = @language "english") )
(if #englisch
(
; Betriebsystemversion testen
(set #OS (/ (getversion ) 65536 ) )
(if (< #OS 36)
(
(set #Antwort
(askbool
(prompt "OS 2.0 or more is needed.\n"
"Do you want to install the program inspite\n"
"of that ?\n"
)
(choices "Yes" "No")
(default 1)
(help
"The program needs OS 2.0 or higher, but the number\n"
"of your operating system is too small, so you\n"
"can't use the program.\n"
"You should abort the installation.\n"
)
)
)
(if (= 0 #Antwort)
( ; abbrechen
(abort "Installation aborted because OS 2.0 needed.")
)
)
)
)
(set #dir
(askdir
(prompt "Select a directory for the program. A drawer\ncomic is created.")
(help "Select a directory / drawer in which the program\n"
"and the documentation shall be installed.\n"
"If you have installed an older version choose\n"
"the same directory.\n"
)
(default "work:")
)
)
(set #dir (tackon #dir "comic"))
(set @default-dir #dir)
(set @default-dest #dir)
(set #altesDir @execute-dir)
;unwriteprotect old files
(protect (tackon #dir ".Product-Info") "+wd" )
(protect (tackon #dir "comic") "+wd")
(protect (tackon #dir "comic.info") "+wd")
(protect (tackon #dir "Comic.e.guide") "+wd")
(protect (tackon #dir "Comic.e.guide.info") "+wd")
(protect (tackon #dir "Instcomic") "+wd")
(protect (tackon #dir "Instcomic.info") "+wd")
(protect (tackon #dir "comp/Voreinstellung") "+wd")
(protect (tackon #dir "comp/Titel") "+wd")
(if (AND (exists (tackon #dir "comp/Voreinstellung"))
(exists (tackon #dir "comp/Titel"))
)
( (set #Antwort
(askbool
(prompt "The needed files 'Voreinstellung' and "
"'Titel' exist already.\n"
"Do you want to use "
"them or install new files ?"
)
(choices "use old files" "install new files")
(default 1) ; alte Dateien
(help "If you have used the 'Comic-Manager-Demo', these "
"files were created for the demo. If you want to "
"use your data from the demo you should select "
"'use old files', but then it's not possible "
"to change the number of conditions and the price "
"unit. This is possible, if you choose "
"'install new files', but your old files are removed.\n"
"If you have installed the non Demo Version 2.0 you "
"must use the old files !\n"
)
)
)
)
(
(set #Antwort 0)
)
)
(if (= 1 #Antwort) ; alte Dateien verwenden
(
; comp und comdat nicht kopieren
; InstComic braucht nicht gestartet zu werden
(set Muster "~(comp|comdat|InstComic#?)")
; konvertiere alte Daten
(debug "Konvertierungsprogramm wird gestartet")
; Konvertierungsprogramm starten
(copyfiles
(prompt "copy 'convertVor'")
(source "convertVor")
(dest #dir)
(optional fail force)
)
(set @execute-dir #dir)
(run "convertVor")
; convertVor löschen
(delete (tackon #dir "convertVor"))
; rename
(delete (tackon #dir "comp/Voreinstellung.old"))
(rename (tackon #dir "comp/Voreinstellung")
(tackon #dir "comp/Voreinstellung.old")
(prompt "rename Voreinstellung")
)
(rename (tackon #dir "comp/Voreinstellung.neu")
(tackon #dir "comp/Voreinstellung")
(prompt "rename Voreinstellung.neu"))
)
(
(set Muster "#?")
; eventuell existierende Dateien umbenennen
(delete (tackon #dir "comp/Voreinstellung.old"))
(delete (tackon #dir "comp/Titel.old"))
(rename (tackon #dir "comp/Voreinstellung")
(tackon #dir "comp/Voreinstellung.old")
(prompt "rename Voreinstellung"))
(rename (tackon #dir "comp/Titel")
(tackon #dir "comp/Titel.old")
(prompt "rename Titel"))
)
)
(copyfiles
(prompt "copy 'english'")
(source "english")
(pattern Muster)
(dest #dir)
(infos)
(optional fail force)
)
(copyfiles
(prompt "copy .Product-Info")
(source ".Product-Info")
(dest #dir)
(optional fail force)
)
; falls #dir/comdat nicht existiert : anlegen
(if (NOT (exists (tackon #dir "comdat")))
(makedir (tackon #dir "comdat")
(prompt "making directory comdat")
)
)
(debug #Antwort)
(if (= 0 #Antwort) ; neue Dateien anlegen
(
(message
"Now the installation program Instcomic is started. It lets "
"you choose two important parameters :\n\n"
" a) the number of conditions\n\n"
" b) the price unit \n\n"
"Please read the help info if you install the Comic-Manager "
"the first time"
(help
"parameters :\n"
" a) the number of conditions\n\n"
"When you use Comic-Manager you have to assign a condition "
"to each of your numbers. The condition is a digit from "
"0 to 9 which determines the quality of the comic book. "
"0 is the best condition. You have to choose the number of "
"conditions that you want. You can't change this value "
"later, so you should be very careful, what you choose. "
"I suggest that you first write a list for yourself "
"with criteria a number must fullfill to be in a certain "
"condition. With this list you can decide how many "
"conditions you want. \n"
"The maximal possible number of conditions is 10, the "
"minimal is 1. In the later case no conditions will be "
"used, i.e. no information about the condition of a number "
"is stored.\n\n"
" b) the price unit\n\n"
"You can choose a unit from 0.01 to 100.0. When you use "
"prices in the Comic-Manager, they will be rounded to this "
"unit. If you choose for example the unit 0.50 only prices "
"like 0.00, 0.50, 1.00, 1.50 ... are possible, with the "
"unit 0.10 0.00, 0.10, 0.20, 0.30 ... would be "
"possible.\n"
"This unit also determines the maximal price. I suggest to "
"choose a unit of 0.10 or 0.50. The higher values should "
"be used in countries, where the unit of the currency has "
"a small value.\n\n"
"Warning ! Be very careful what you choose because you "
"can't change this values."
)
(all)
)
(debug "Instcomic wird in " #dir " gestartet")
; Installationsprogramm starten
(set @execute-dir #dir)
(run "Instcomic")
; InstComic löschen
(delete (tackon #dir "Instcomic")
(prompt "delete installation program 'Instcomic'")
(help "'Instcomic' is a program that creates some "
"files which are needed in Comic-Manager.\n\n"
"You don't need this program later, so it can "
"be deleted."
)
(confirm)
)
(if (NOT (exists (tackon #dir "Instcomic")))
( ; .info auch löschen
(delete (tackon #dir "Instcomic.info"))
)
)
)
)
(if (exists (tackon #dir "comicDemo"))
( ; Demo Version loeschen
(delete (tackon #dir "comicDemo"))
)
)
(if (exists (tackon #dir "comicDemo.info"))
(delete (tackon #dir "comicDemo.info"))
)
; zurückspringen
(set @execute-dir #altesDir)
)
( ; deutsch
; Betriebsystemversion testen
(set #OS (/ (getversion ) 65536 ) )
(if (< #OS 36)
(
(set #Antwort
(askbool
(prompt "Es wird mindestens OS 2.0 benötigt\n"
"Wollen Sie das Programm trotzdem installieren ?"
)
(choices "Ja" "Nein")
(default 1)
(help
"Das Programm benötigt OS 2.0 oder höher.\n"
"Ihre Betriebssystemversion ist zu gering, so daß\n"
"Sie das Programm nicht verwenden können.\n"
"Sie sollten es also nicht installieren.\n"
)
)
)
(if (= 0 #Antwort)
( ; abbrechen
(abort "Installation wurde abgebrochen wegen\n"
"zu niedriger Betriegssystemversion.\n"
)
)
)
)
)
(set #dir
(askdir
(prompt "Verzeichnis für das Programm wählen.\n Ein Verzeichnis comic wird erstellt")
(help "\n Wählen Sie bitte ein Verzeichnis, in dem "
"das Programm und die Dokumentation "
"installiert werden sollen. \n"
"Wenn Sie bereits eine ältere Version installiert "
"haben, so wählen Sie bitte deren Verzeichnis.\n"
)
(default "work:")
)
)
(set #dir (tackon #dir "comic"))
(set @default-dir #dir)
(set @default-dest #dir)
(set #altesDir @execute-dir)
;unwriteprotect old files
(protect (tackon #dir ".Product-Info") "+wd")
(protect (tackon #dir "comic") "+wd")
(protect (tackon #dir "comic.info") "+wd")
(protect (tackon #dir "Comic.guide") "+wd")
(protect (tackon #dir "Comic.guide.info") "+wd")
(protect (tackon #dir "Instcomic") "+wd")
(protect (tackon #dir "Instcomic.info") "+wd")
(protect (tackon #dir "comp/Voreinstellung") "+wd")
(protect (tackon #dir "comp/Titel") "+wd")
(if (AND (exists (tackon #dir "comp/Voreinstellung"))
(exists (tackon #dir "comp/Titel"))
)
( (set #Antwort
(askbool
(prompt "Die benötigten Dateien 'Voreinstellung' und "
"'Titel' existieren bereits. Wollen Sie diese "
"verwenden oder neue installieren ?"
)
(choices "verwende alte Dateien"
"installiere neue Dateien"
)
(default 1) ; alte Dateien
(help "Wenn Sie die Demo Version der 'Comic-Verwaltung' "
"verwendet haben, so wurden die existierenden Dateien "
"von diesem Programm verwendet. Wenn Sie Ihre "
"bisherigen Daten weiterverwenden wollen, so sollten "
"Sie 'verwende alte Dateien' wählen. Wenn Sie "
"stattdessen 'installiere neue Dateien' wählen, "
"so haben Sie die Möglichkeit die Anzahl der Zustände "
"und die Preiseinheit zu ändern, allerdings gehen "
"dabei Ihre bisherigen Daten verloren."
"( Sie können sie natürlich vorher ausdrucken, und "
"nachher wieder eingeben. )\n"
"Wenn Sie die Vollversion 2.0 installiert haben, so "
"verwenden Sie die alten Dateien weiter !\n"
)
)
)
)
(
(set #Antwort 0)
)
)
(if (= 1 #Antwort) ; alte Dateien verwenden
(
; comp und comdat nicht kopieren
; InstComic braucht nicht gestartet zu werden
(set Muster "~(comp|comdat|InstComic#?)")
; konvertiere alte Daten
(debug "Konvertierungsprogramm wird gestartet")
; Konvertierungsprogramm starten
(copyfiles
(prompt "copy 'convertVor'")
(source "convertVor")
(dest #dir)
(optional fail force)
)
(set @execute-dir #dir)
(run "convertVor")
; convertVor löschen
(delete (tackon #dir "convertVor"))
; rename
(delete (tackon #dir "comp/Voreinstellung.old"))
(rename (tackon #dir "comp/Voreinstellung")
(tackon #dir "comp/Voreinstellung.old")
(prompt "rename Voreinstellung")
)
(rename (tackon #dir "comp/Voreinstellung.neu")
(tackon #dir "comp/Voreinstellung")
(prompt "rename Voreinstellung.neu"))
)
(
(set Muster "#?")
; eventuell existierende Dateien umbenennen
(delete (tackon #dir "comp/Voreinstellung.old"))
(delete (tackon #dir "comp/Titel.old"))
(rename (tackon #dir "comp/Voreinstellung")
(tackon #dir "comp/Voreinstellung.old")
(prompt "rename Voreinstellung"))
(rename (tackon #dir "comp/Titel")
(tackon #dir "comp/Titel.old")
(prompt "rename Titel"))
)
)
(copyfiles
(prompt "copy 'deutsch'")
(source "deutsch")
(pattern Muster)
(dest #dir)
(infos)
(optional fail force)
)
(copyfiles
(prompt "copy .Product-Info")
(source ".Product-Info")
(dest #dir)
(optional fail force)
)
; falls #dir/comdat nicht existiert : anlegen
(if (NOT (exists (tackon #dir "comdat")))
(makedir (tackon #dir "comdat")
(prompt "Lege Verzeichnis comdat an")
)
)
(set #altesDir @execute-dir)
(debug #Antwort)
(if (= 0 #Antwort) ; neue Dateien anlegen
(
(message "Es wird jetzt das Installationsprogramm InstComic "
"gestartet. Während der Installation haben Sie die "
"Möglichkeit zwei wichtige Parameter einzustellen.\n\n"
"Die Parameter sind : \n"
" a) die Anzahl der Zustände\n"
" b) die Preiseinheit \n"
"Wenn Sie die Comic-Verwaltung zum ersten mal installieren "
"lesen Sie bitte den Hilfe Text."
(help
"a) die Anzahl der Zustände\n\n"
"Bei der Comic-Verwaltung müssen Sie jedem Heft, das Sie "
"eingeben, einen Zustand zuweisen, d.h. Sie müssen die "
"Qualität des Hefts beurteilen. Der Bereich von 'sehr "
"guter Zustand' bis 'nicht mehr sammelwürdig' wird dabei "
"durch die Zahlen 0, 1, 2, ... dargestellt. \n"
"Bei der Installation müssen Sie angeben, wieviele "
"Zustände Sie unterscheiden wollen. Da dieser Wert später "
"nicht mehr geändert werden kann empfehle ich Ihnen, daß "
"Sie sich zuerst die Kriterien überlegen, nach denen Sie "
"Ihre Hefte beurteilen wollen, und diese aufschreiben. "
"(Falls Sie einen Comic- oder Roman-Preiskatalog besitzen, "
"so können Sie darin u.U. entsprechende Kriterien finden.) "
"Mit dieser Liste können Sie dann entscheiden, wieviele "
"Zustände sie wünschen. Sie können maximal 10 Zustände "
"wählen und minimal einen. In diesem Fall "
"wird ohne Zustände gearbeitet, d.h. es wird keine "
"Information über den Zustand eines Hefts gespeichert.\n\n"
" b) die Preiseinheit\n\n"
"Hier können Sie als Einheit einen Wert von 0.01 bis 100.0 "
"eingeben. Wenn Sie dann in der Comic-Verwaltung Preise "
"eingeben, so wird immer auf diese Einheit gerundet, d.h. "
"wenn Sie die Einheit 0.50 wählen, so werden nur die "
"Preise 0.00, 0.50, 1.00, 1.50 ... zugelassen, mit der "
"Einheit 0.10 wären es 0.00, 0.10, 0.20, ... . Allerdings "
"wird durch diese Einheit auch der maximal mögliche Preis "
"festgelegt.\n"
"Ich empfehle als Einheit einen Wert von 0.10 oder 0.50.\n"
"Die höheren Werte sind für Währungen gedacht, bei denen "
"eine Einheit weniger wert ist.\n\n"
"Achtung ! Überlegen Sie sich Ihre Eingaben sehr genau, \n"
"da sie später nicht mehr geändert werden können.\n"
)
(all))
(debug "Instcomic wird in " #dir " gestartet")
; Installationsprogramm starten
(set @execute-dir #dir)
(run "Instcomic")
; InstComic löschen
(delete (tackon #dir "Instcomic")
(prompt "lösche Installationsprogramm 'Instcomic'")
(help "'Instcomic' ist ein Programm, daß einige Dateien "
"anlegt, die die Comic-Verwaltung benötigt.\n\n"
"Dieses Programm wird nach der Installation nicht "
"mehr benötigt, so daß es gelöscht werden kann."
)
(confirm)
)
(if (NOT (exists (tackon #dir "Instcomic")))
( ; .info auch löschen
(delete (tackon #dir "Instcomic.info"))
)
)
)
)
(if (exists (tackon #dir "comicDemo"))
( ; Demo Version loeschen
(delete (tackon #dir "comicDemo"))
)
)
(if (exists (tackon #dir "comicDemo.info"))
(delete (tackon #dir "comicDemo.info"))
)
; zurückspringen
(set @execute-dir #altesDir)
)
)
(if (= @user-level 0)
(set #Meldung
("Die Comic-Verwaltung wurde auf work: installiert."
"Comic-Verwaltung (german) is installed to "
"work: . If you want the english version don't use 'novice' "
"for installation."
)
)
)
(exit #Meldung)