home *** CD-ROM | disk | FTP | other *** search
- /***INSTALL-Procedure for WKSHELL/2 (ENGLISH !!)***/
-
- signal on halt name SignalHandler /* Exception handler */
- call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
- call SysLoadFuncs
-
- /* ******************************************* */
- SourceDrive=""
- SourceDir="\ENGLISH\"
- ExeDest="C:\WKSHELL\"
- DllDest="C:\WKSHELL\"
- File.0 = 5
- File.1="WKSHELLE.EXE"
- File.2="WKSHELLE.HLP"
- File.3="WKSHELLE.INF"
- File.4="WKSLISTE.CMD"
- File.5="UNZIP.EXE"
- Dll.0 = 3
- Dll.1= "dde4cc.dll"
- Dll.2= "dde4mbs.dll"
- Dll.3= "wks_mui.dll"
- global_again=1
-
- /* ******************************************* */
- call InitColors
-
- rc = SysFileTree("insteng.cmd", dummy, "F" ,"*****") /* GET CD-ROM-Letter */
- if dummy.0 > 0 then do
- SourceDrive=substr(dummy.1,38,2)
- end
- else do
- say
- say
- say bred||"ERROR :"
- say bred||"Please change first to your CD-drive and then start INSTENG.CMD"
- say normal
- exit
- end
-
- do while global_again = 1
- Men = MainMenu()
- if Men="1" then do
- call GotoXY 5,21
- a = charout(,byellow||"Enter driveletter of your CD-ROM ? ")
- SourceDrive=Translate(SysGetKey('NOECHO'))
- SourceDrive=SourceDrive || ":"
- end
- if Men="2" then do
- call GotoXY 5,21
- a = charout(,byellow||"New WK-Shell/2 directory : ")
- pull ExeDest
- if right(ExeDest,1) \= "\" then
- ExeDest=ExeDest||"\"
- end
- if Men="3" then do
- call GotoXY 5,21
- a = charout(,byellow||"New DLL directory : ")
- pull DllDest
- if right(DllDest,1) \= "\" then
- DllDest=DllDest||"\"
- end
- if Men="4" then do
- say normal
- Installed=1
- Call Install
- end
- if Men="5" then do
- call SysCls
- global_again=0
- say "The End...!"
- if Installed=1 then do
- say
- say "You can run WK-Shell/2 from your harddisk by entering :"
- say bred||ExeDest||"WKSHELLE.EXE"||" "||SourceDrive
- say bcyan||"The parameter <"||SourceDrive||"> is necessary to find the CD-ROM."
- end
- say normal
- exit
- end
- end
-
-
- /* ******************************************* */
- MainMenu:
- call SysCls
- a = charout(,byellow||"┌──────────────────────────────────────────────────────────────────────────────┐")
- a = charout(,"│ WK-Shell/2 INSTALL │")
- a = charout(,"├──────────────────────────────────────────────────────────────────────────────┤")
- a = charout(,"│ │")
- a = charout(,"│ │")
- a = charout(,"│ │")
- a = charout(,"│ │")
- a = charout(,"│ │")
- a = charout(,"│ │")
- a = charout(,"│ │")
- a = charout(,"├──────────────────────────────────────────────────────────────────────────────┤")
- a = charout(,"│ │")
- a = charout(,"│ │")
- a = charout(,"│ │")
- a = charout(,"│ │")
- a = charout(,"│ │")
- a = charout(,"├──────────────────────────────────────────────────────────────────────────────┤")
- a = charout(,"│ │")
- a = charout(,"│ │")
- a = charout(,"│ │")
- a = charout(,"├──────────────────────────────────────────────────────────────────────────────┤")
- a = charout(,"│ │")
- a = charout(,"└────────────────────────────────────────────────────────────────────(C)'94 WOK┘")
- call GotoXY 5,4
- a = charout(,bcyan||"1) CD-ROM drive : "||bred||SourceDrive)
- call GotoXY 5,6
- a = charout(,bcyan||"2) WK-Shell/2-directory : "||bred||ExeDest)
- call GotoXY 5,8
- a = charout(,bcyan||"3) DLL-directory : "||bred||DllDest)
- call GotoXY 5,12
- a = charout(,bcyan||"4) INSTALL NOW ! ")
- call GotoXY 5,14
- a = charout(,bcyan||"5) EXIT! Out'a here...! ")
- call GotoXY 5,18
- a = charout(,bcyan||"_ <--- Your choice ? ")
- call GotoXY 5,18
- again=1
- do while again=1
- MM_key=Translate(SysGetKey('NOECHO'))
- if MM_key="1"|,
- MM_key="2"|,
- MM_key="3"|,
- MM_key="4"|,
- MM_key="5" then do
- again=0
- say MM_key
- end
- end
- return MM_key
-
-
- // ******************** INSTALL ***************************
- Install:
- call SysCls
- Error = 0
- do i = 1 to File.0 /* Copy EXE-Files */
- Source=SourceDrive||SourceDir||File.i
- if FileExists(Source) = 0 then do
- say bred||"ERROR: Sourcefile not found: "||Source
- 'pause'
- Error=1
- Installed = 0
- say normal
- end
- else 'xcopy 'Source ExeDest
- end
- do i = 1 to Dll.0 /* Copy DLL-Files */
- Source=SourceDrive||SourceDir||Dll.i
- if FileExists(Source) = 0 then do
- say bred||"ERROR: Sourcefile not found: "||Source
- 'pause'
- Error=1
- Installed = 0
- say normal
- end
- else 'xcopy ' Source DllDest
- end
- 'pause'
- if Error = 0 then do /* Make Desktop-Object ? */
- MM_input=""
- do while MM_input\="Y" & MM_input\="N" /* Security question */
- say bcyan
- say "Create a Desktop-Object for WK-Shell/2 (Y/N) ?"
- pull MM_input
- end /* do while */
- if MM_input = "Y" then
- call MakeObject
- end
- return
-
- /* *+++++++++++++++++++++++++++ */
- SignalHandler:
- call SysCls
- say bred||"Unterbrechung !"
- say normal
- exit
-
-
- /* ******************************** */
- FileExists: procedure
- Maske = arg(1)
- rc = SysFileTree(Maske, dummy, "FO" ,"*****")
- if dummy.0 > 0 then
- return 1
- else
- return 0
-
- /* ******************************+ */
- MakeObject:
- SetupString="TITLE=WK-Shell/2 (E);OBJECTID=<WKSHELL2E>;ASSOCFILTER=*.IDX;EXENAME="||ExeDest||"WKSHELLE.EXE;PARAMETERS="||SourceDrive
- rc=SysCreateObject("WPProgram",,
- ExeDest||"WKSHELLE.EXE",,
- "<WP_DESKTOP>",,
- SetupString)
- if rc=0 then do
- say "WPS-Object could NOT be created."
- pause
- end
- else do
- say "WPS-Objekt successfully created."
- end
- return
-
-
-
-
-
- /* ***********************************************
- * Set Color Strings for AnsiColor
- *********************************************** */
- InitColors:
- esc = '1B'x /* define ESCape character */
- red = esc||"[31m" /* ANSI.SYS-control for red foreground */
- yellow = esc||"[33m" /* ANSI.SYS-control for yellow foreground */
- cyan = esc||"[36m" /* ANSI.SYS-control for cyan foreground */
- normal = esc||"[0m" /* ANSI.SYS-control for resetting attributes to normal */
- bright = esc||"[1m" /* ANSI.SYS-control for bright foreground colors */
- bred = bright || red
- byellow = bright || yellow
- bcyan = bright || cyan
- upline = esc||'[1A' /* Cursor one line up */
-
- RETURN
-
- /* ************************************************
- * WhereX()
- ************************************************ */
- WhereX: procedure
- parse value SysCurPos() with W_z W_s
- return W_s
-
- /* ************************************************
- * WhereY()
- ************************************************ */
- WhereY: procedure
- parse value SysCurPos() with W_z W_s
- return W_z
-
- /* ************************************************
- * GotoXY(x,y)
- ************************************************ */
- GotoXY: procedure
- G_s=arg(1)
- G_z=arg(2)
- G_dummy=SysCurPos(G_z, G_S)
- return
-
-
-