Changeset 52

Show
Ignore:
Timestamp:
02/16/08 10:12:09 (10 months ago)
Author:
cinc
Message:

Check for recent desktop archive added.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/install/install.CMD

    r50 r52  
    4848        /* First phase */ 
    4949 
     50        SAY "" 
     51 
    5052        IF haveMMClasses()=0 THEN DO 
    5153                /* No CWMM classes */ 
     
    6466        END 
    6567 
     68 
     69        bootdrive=getBootDrive() 
     70 
     71        IF bootdrive<>'' THEN DO 
     72                archfile=bootdrive||"\OS2\ARCHIVES\ARCHIVES.$$$" 
     73 
     74                IF doesFileExist(archfile)=1 THEN DO 
     75                        archdate=queryCreationDate(archfile) 
     76                        diffdate=TRANSLATE("781245", DATE("U"),"12345678")-TRANSLATE("781245", archdate,"12345678") 
     77                        IF diffdate>0 THEN DO 
     78                                SAY nlsStrings.64 /* 'There is no fresh desktop (WPS) backup available...' */ 
     79                                SAY "" 
     80                                SAY nlsStrings.65 /* 'Go to the 'Archive' page in the settings of the desktop folder...' */ 
     81                                say '' 
     82                                SAY nlsStrings.66 /* 'Enter <y> if you want to install anyway (not recommended).' */ 
     83                                SAY "" 
     84                                say '>' 
     85                                parse value SysCurPos() with aktzeile aktspalte 
     86                                newposition=SysCurPos(aktzeile-1,2) 
     87                                PARSE pull in 
     88                                IF TRANSLATE(in)<>'Y' THEN EXIT 
     89                        END 
     90                END 
     91        END 
     92 
    6693        /* Welcome screen */ 
    6794        SAY '' 
    68         SAY nlsStrings.1 /* 'Be sure to have a backup of your INI-files!' */ 
    69         SAY nlsStrings.2 /* 'If not abort NOW' */ 
     95        SAY nlsStrings.1 /* 'About to install WPS-Wizard now' */ 
     96        /* SAY nlsStrings.2 */ /* '(You did create a desktop backup, did you?)' */ 
    7097        say '' 
    71         say nlsStrings.3 /* 'Press <ENTER> to install or Ctrl-c to abort.' */ 
     98        say nlsStrings.3 /* 'Enter <i> to install or any other key to abort.' */ 
    7299        say '' 
    73100        say '>' 
    74101        parse value SysCurPos() with aktzeile aktspalte 
    75102        newposition=SysCurPos(aktzeile-1,2) 
    76         pull 
     103        PARSE pull in 
     104        IF TRANSLATE(in)<>'I' THEN EXIT 
    77105 
    78106 
     
    610638 
    611639 
     640/*-------------------------------------------------------------------------*/ 
    612641unexpectedExit: 
    613642 
     
    625654 
    626655 
     656/*-------------------------------------------------------------------------*/ 
    627657/* Check if running on eCS1.2 or later. Will succeed 
    628658 on Warp 4 with installed CWMM classes, too. */ 
     
    641671return found 
    642672 
    643  
     673/*-------------------------------------------------------------------------*/ 
     674doesFileExist: procedure 
     675 
     676IF STREAM(ARG(1),'c', 'query exists')<>'' THEN return 1 
     677 
     678return 0 
     679 
     680/*-------------------------------------------------------------------------*/ 
     681/* returns the creation date in format month/day/year e.g. 02/15/08 */ 
     682queryCreationDate: procedure 
     683 
     684rc= SYSFileTree(arg(1), file, 'F') 
     685 
     686if file.0=1 THEN DO 
     687        PARSE VAR file.1 dat rest 
     688 
     689        dat=RIGHT(dat, 8, 0) 
     690        drop file. 
     691        return dat 
     692END 
     693 
     694return "" 
     695 
     696/*-------------------------------------------------------------------------*/ 
     697/* Query bootdrive */ 
     698GetBootDrive: procedure 
     699parse upper value VALUE('PATH',,'OS2ENVIRONMENT') with '\OS2\INSTALL' -2 boot +2 
     700parse upper value VALUE('PATH',,'OS2ENVIRONMENT') with '\OS2\SYSTEM' -2 boot2 +2 
     701 
     702if boot=boot2 then return boot 
     703 
     704return '' 
     705 
     706/*-------------------------------------------------------------------------*/ 
    644707/**** The following subroutine was appended while building the distribution: 
    645708