home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: InfoMgt
/
InfoMgt.zip
/
party14.zip
/
INSTALL.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1996-08-17
|
4KB
|
155 lines
/* Party/2 1.4 Installations-Script */
Call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
Call SysLoadFuncs
Parse Arg InstallDir
Signal On Halt Name ErrorHandler
Call SysCls
Say
Say
Say
Say " Party/2 1.4 Installation "
Say " ------------------------ "
If InstallDir=" " Then Do
Say
Say " Bitte geben Sie das Verzeichnis in das Sie Party/2"
Say " installieren möchten an, oder drücken Sie <Enter>"
Say " um in das aktuelle Verzeichnis zu installieren, oder"
Say " drücken Sie 'Q'<Enter> um abzubrechen."
Say
Say " Beispiel: C:\OS2\PARTY<Enter>"
Say
Say " Eingabe: "
Parse Value SysCurPos() with Row Col
Col=Col+17
Row=Row-1
Call SysCurPos Row, Col
Pull InstallDir
If (InstallDir="Q")|(InstallDir="q") Then Exit
End
Say
CurrentDir = directory()
If (InstallDir=" ") Then InstallDir=CurrentDir
If (CurrentDir\=directory(InstallDir)) Then Do
Command = '@CD 'directory(CurrentDir)
Command
Call SysFileTree InstallDir, FileDirectory, 'D'
If FileDirectory.0='0' Then Do
Say " Das Installationsverzeichnis "InstallDir" wird erstellt . . ."
rc=SysMkDir(InstallDir)
If rc\=0 Then Do
Say
Say " Schade. Das Installationsverzeichnis konnte nicht er-"
Say " stellt werden. Haben Sie einen unzulässigen Pfad angegeben?"
Say " Bitte starten Sie das Installations-Script erneut."
Say
Exit
End
End
Say " Die Dateien werden nach "InstallDir" kopiert. . ." /* Now copy files */
Call FileCopy 'INSTALL.CMD', InstallDir
Call FileCopy 'PARTY.EXE', InstallDir
Call FileCopy 'PARTY.HLP', InstallDir
Call FileCopy 'PARTY.BMP', InstallDir
Call FileCopy 'PARTY.WAV', InstallDir
Call FileCopy 'PARTY14.DAT', InstallDir
Call FileCopy 'History.txt', InstallDir
Call FileCopy 'LiesMich', InstallDir
Call FileCopy '19xx.cmd', InstallDir
END
Say " Das Online-Handbuch wird aus der Hilfe-Datei erstellt, bitte etwas Geduld... "
q = "Party.hlp"
LastChar = substr(InstallDir,length(InstallDir),1)
If LastChar = "\" Then z = InstallDir"Party.inf"
Else z = InstallDir"\Party.inf"
s = SAY Stream("Party.hlp", "c", "open read")
If LastChar = "\" Then sw = SAY Stream(InstallDir"Party.inf", "c", "open write")
Else sw = SAY Stream(InstallDir"\Party.inf", "c", "open write")
Zeichen = Charin(q)
CALL Charout z, Zeichen
Zeichen = Charin(q)
CALL Charout z, Zeichen
Zeichen = Charin(q)
CALL Charout z, Zeichen
Zeichen = Charin(q)
CALL Charout z,"" /* dies ist das einzige unterschiedliche Byte von HLP und INF */
/* manchmal könnte man meinen bei IBM arbeiten nur Idioten */
DO WHILE Chars("Party.hlp") > 0
Zeichen = Charin(q)
CALL Charout z, Zeichen
END
s = SAY Stream("Party.hlp", "c", "close")
If LastChar = "\" Then s = SAY Stream(InstallDir"Party.inf", "c", "close")
Else s = SAY Stream(InstallDir"\Party.inf", "c", "close")
Say " Das Programmobjekt wird erstellt . . ."
LastChar = substr(InstallDir,length(InstallDir),1)
If LastChar = "\" Then SetupString="EXENAME="InstallDir"PARTY.EXE;STARTUPDIR="InstallDir
Else SetupString="EXENAME="InstallDir"\PARTY.EXE;STARTUPDIR="InstallDir
rc=SysCreateObject("WPProgram","Party/2 1.4","<WP_DESKTOP>",SetupString,UPDATE)
If rc=0 Then Do
Say
Say " Das Programmobjekt konnte nicht erstellt werden."
Exit
End
Say " Die LiesMich - Datei wird angezeigt."
Command='@E LiesMich'
Command
Say
Say " Party/2 1.4 wurde erfolgreich installiert."
Exit
/******* FileCopy procedure */
FileCopy: Arg FileName, Destination
Command='@Copy 'FileName' 'Destination' >NUL'
Command
If rc\=0 Then Do
Say
Say " Fehler beim Kopieren der Datei."
Say " Möglicherweise ist das Ziellaufwerk schreibgeschützt"
Say " oder die Datei ist nicht vorhanden."
Exit
End
Return
/******* ErrorHandler procedure */
ErrorHandler:
Call SysCls
Say " Unbekannter Fehler! Die Installation wird abgebrochen."
Exit