Ignore:
Timestamp:
Jul 15, 2017, 1:19:09 PM (8 years ago)
Author:
Alex Taylor
Message:

Incremented version to 0.7.
Fix population of shipped driver list when opening Install Driver dialog.
Fix installation of non-PostScript drivers from Drivers tab (parsing of DFFF EA type).
Refresh properly when deleting the only printer, driver, or port.
Add 'ArcaOS' to branding logic.
Added more logging (still needs work).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/shared/PrManUtl.VRS

    r51 r58  
    1111        drv_path = STREAM( drv_path, 'C', 'QUERY EXISTS')
    1212RETURN drv_path
     13
     14
     15/*:VRX         GetDriverFileList
     16*/
     17GetDriverFileList: PROCEDURE
     18    PARSE ARG eaname, driver
     19    filelist = ''
     20
     21    /* Read the list of required driver files from the EAs, and copy them
     22     * all to the target directory.
     23     */
     24    IF SysGetEA( driver, eaname, 'reqfiles') == 0 THEN DO
     25        PARSE VAR reqfiles 1 eatype 3 .
     26        eatype = C2X( eatype )
     27
     28        IF eatype == 'FDFF' THEN DO         /* Single ASCII value from byte 5 */
     29            PARSE VAR reqfiles 5 filelist
     30        END
     31        ELSE IF eatype = 'DEFF' THEN DO     /* Single-type list from byte 7 */
     32            PARSE VAR reqfiles 7 fl_type 9 fl_items
     33
     34            /* Parse the first value out of the list.  The first two bytes are the
     35             * length of the value.
     36             */
     37            PARSE VAR fl_items 1 i_len 3 i_val
     38            len = C2D( REVERSE( i_len ))
     39            filelist = SUBSTR( i_val, 1, len )
     40        END
     41        ELSE IF eatype = 'DFFF' THEN DO     /* Multi-type list from byte 7 */
     42            PARSE VAR reqfiles 7 fl_items
     43
     44            /* Parse the first value out of the list.  The first two bytes are the
     45             * data type; this should always be ASCII ('FDFF') so we can skip it.
     46             * The following word holds the length of the value.
     47             */
     48            PARSE VAR fl_items 3 i_len 5 i_val
     49            len = C2D( REVERSE( i_len ))
     50            filelist = SUBSTR( i_val, 1, len )
     51        END
     52        filelist = TRANSLATE( filelist, ' ', ',')
     53    END
     54
     55RETURN filelist
    1356
    1457
     
    244287     * all to the target directory.
    245288     */
     289/**** OLD
    246290    IF SysGetEA( driver, 'REQUIREDDRIVERFILES', 'reqfiles') == 0 THEN DO
    247291        PARSE VAR reqfiles 5 filelist
     
    255299        DROP filelist
    256300    END
     301****/
     302    filelist = GetDriverFileList('REQUIREDDRIVERFILES', driver )
     303    IF filelist <> '' THEN DO
     304        DO i = 1 TO WORDS( filelist )
     305            copyfile = drv_dir'\' || WORD( filelist, i )
     306            ok = VRCopyFile( copyfile, newdrvdir'\' || WORD( filelist, i ))
     307            CALL LINEOUT globals.!log1, ' -' copyfile '(REQUIRED):' ok
     308        END
     309        DROP copyfile
     310        DROP filelist
     311    END
    257312    ELSE RETURN 0
    258313
    259314    /* If there are optional files defined as well, try to copy those also.
    260315     */
     316/**** OLD
    261317    IF SysGetEA( driver, 'OPTIONALDRIVERFILES', 'reqfiles') == 0 THEN DO
    262318        PARSE VAR reqfiles 5 filelist
     
    265321            copyfile = drv_dir'\' || WORD( filelist, i )
    266322            IF STREAM( copyfile, 'C', 'QUERY EXISTS') == '' THEN ITERATE
     323            ok = VRCopyFile( copyfile, newdrvdir'\' || WORD( filelist, i ))
     324            CALL LINEOUT globals.!log1, ' -' copyfile '(OPTIONAL):' ok
     325        END
     326        DROP copyfile
     327        DROP filelist
     328    END
     329****/
     330    filelist = GetDriverFileList('OPTIONALDRIVERFILES', driver )
     331    IF filelist <> '' THEN DO
     332        DO i = 1 TO WORDS( filelist )
     333            copyfile = drv_dir'\' || WORD( filelist, i )
    267334            ok = VRCopyFile( copyfile, newdrvdir'\' || WORD( filelist, i ))
    268335            CALL LINEOUT globals.!log1, ' -' copyfile '(OPTIONAL):' ok
Note: See TracChangeset for help on using the changeset viewer.