Changeset 49
- Timestamp:
- Dec 17, 2014, 1:36:21 PM (11 years ago)
- Author:
- Alex Taylor
- Message:
-
Updates for v0.50:
Moved much of the PPD-import logic into a shared function.
Automatically reimport previously-imported PPDs when updating to a new version of a known PostScript driver.
Ask if the user wants to update the active copy of a driver when the repository version is updated.
Fixed error in locating cupswiz.exe when the desktop object doesn't exist.
Fixed broken update of PRDESC.LST when upgrading to a new version of a known PostScript driver.
- Location:
- trunk
- Files:
-
- 4 added
- 6 edited
- gui/printer/manager/PRINTOOL.VRP (modified) (1 diff)
- gui/printer/manager/PRINTOOL.VRX (modified) (12 diffs)
- gui/printer/manager/printm_en.txt (modified) (1 diff)
- gui/printer/manager/readme.txt (modified) (3 diffs)
- gui/printer/manager/wpi (added)
- gui/printer/manager/wpi/makewpi.cmd (added)
- gui/printer/manager/wpi/printman.wis (added)
- gui/printer/manager/wpi/rxprtutl.dll (added)
- gui/shared/PrManUtl.VRS (modified) (3 diffs)
- pin/src/conv_ppd.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/printer/manager/PRINTOOL.VRP
r39 r49 2 2 VRX: PRINTOOL.VRX 3 3 VXOFile: VROBJEX 4 MacroPath: VRM: (削除) G:\netlabs\svn\ecups\trunk\gui\printer\manager (削除ここまで)5 EXEPath: (削除) G:\netlabs\svn\ecups\trunk\gui\printer\manager (削除ここまで)\PRINTMAN.EXE4 MacroPath: VRM:(追記) E:\DEVELOPMENT\VXREXX\Projects\PrintTool (追記ここまで) 5 EXEPath: (追記) E:\Development\VXREXX\Projects\PrintTool (追記ここまで)\PRINTMAN.EXE 6 6 RunParameters: 7 7 RunDirectory: 8 VRXWindow: __VREMainWindow,1,5 (削除) 54 (削除ここまで),4095,6697,80469 VRXWindow: __VRESectionListWindow,1,6 (削除) 87 (削除ここまで),16044,4204,405910 VRXWindow: __VREToolsWindow,1,6 (削除) 87,14309,4963,166 (削除ここまで)911 VRXWindow: __VREWindListWindow,1,4 (削除) 902 (削除ここまで),16044,3505,40598 VRXWindow: __VREMainWindow,1,5(追記) 06 (追記ここまで),4095,6697,8046 9 VRXWindow: __VRESectionListWindow,1,6(追記) 14 (追記ここまで),16044,4204,4059 10 VRXWindow: __VREToolsWindow,1,6(追記) 38,14309,5472,165 (追記ここまで)9 11 VRXWindow: __VREWindListWindow,1,4(追記) 854 (追記ここまで),16044,3505,4059 12 12 UserFile: 1 13 13 UserWindow: WN_MAIN,1 -
trunk/gui/printer/manager/PRINTOOL.VRX
r48 r49 507 507 * possible situations. 508 508 */ 509 ImportPPD: PROCEDURE EXPOSE globals. (削除) (削除ここまで)509 ImportPPD: PROCEDURE EXPOSE globals.(追記) driver_path (追記ここまで) 510 510 ARG driver, ppdfile 511 511 IF driver == '' THEN driver = 'PSCRIPT' … … 522 522 WHEN status == 1 THEN NOP 523 523 524 /* An installable ( (削除) working) copy of the driver could not be located, but (削除ここまで)525 * (削除) (削除ここまで)we found an installed (in use) version whence we can grab the files.524 /* An installable ((追記) distribution) copy of the driver could not be located, (追記ここまで) 525 * (追記) but (追記ここまで)we found an installed (in use) version whence we can grab the files. 526 526 */ 527 527 WHEN status == 2 THEN DO … … 588 588 */ 589 589 590 /** TODO should move all below this into a new shared function **/ 590 /**** Moved all below this into a shared function 591 591 592 592 CALL LINEOUT globals.!log1, 'Driver source: ' driver_path … … 782 782 IF ok == 1 THEN 783 783 ok = VRCopyFile( workdir'\OUT\AUXPRINT.PAK', target'\AUXPRINT.PAK') 784 (追記) (追記ここまで) 784 785 IF ok == 1 THEN DO 785 786 /* Copy the updated files to \OS2\DLL\<driver>, replacing any 786 787 * existing copies. (This prevents problems if the OS/2 driver 787 * installation (削除) doesn't/fails to copy them, which can happen under (削除ここまで)788 * (削除) some (削除ここまで)circumstances.)788 * installation (追記) fails to copy them, which can happen under some (追記ここまで) 789 * (追記) (追記ここまで)circumstances.) 789 790 */ 790 791 IF VRFileExists( globals.!os2dir'\DLL\'driver'\'driver'.DRV') THEN DO … … 814 815 CALL VRRmDir( workdir ) 815 816 816 RETURN 0 817 ****/ 818 819 ok = PinWrapper( 1, driver, ppdfile ) 820 821 RETURN ok 817 822 818 823 /*:VRX Init … … 890 895 LoadSettings: PROCEDURE EXPOSE globals. 891 896 892 globals.!version = '0. (削除) 46 (削除ここまで)'893 globals.!copyright = '2013 (削除) (削除ここまで)'897 globals.!version = '0.(追記) 50 (追記ここまで)' 898 globals.!copyright = '2013(追記) -2014 (追記ここまで)' 894 899 895 900 me = VRGet('Application', 'Program') … … 1194 1199 END 1195 1200 ELSE DO 1196 cupswiz = Stream( globals.!cupsdir'\cups (削除) \cups (削除ここまで)wiz.exe', 'C', 'QUERY EXISTS')1201 cupswiz = Stream( globals.!cupsdir'\cups(追記) (追記ここまで)wiz.exe', 'C', 'QUERY EXISTS') 1197 1202 _workdir = VRParseFilePath( cupswiz, 'DP') 1198 1203 _parms = '' … … 1203 1208 IF ppd_file <> '' & VRFileExists( ppd_file ) THEN 1204 1209 _parms = _parms ppd_file 1210 (追記) CALL LINEOUT globals.!log1, 'Launching CUPS wizard with: start' cupswiz _parms (追記ここまで) 1205 1211 ADDRESS CMD 'start' cupswiz _parms 1206 1212 CALL DIRECTORY od 1207 1213 CALL Quit 1208 1214 END 1215 (追記) ELSE DO (追記ここまで) 1216 (追記) CALL LINEOUT globals.!log1, 'Failed to locate CUPS wizard.' (追記ここまで) 1217 (追記) END (追記ここまで) 1218 (追記) (追記ここまで) 1209 1219 1210 1220 RETURN … … 1387 1397 END 1388 1398 driver = VRGet('DDCB_IMPORTDRV', 'Value') 1389 ok = ImportPPD( driver, new_ppd ) (削除) (削除ここまで)1399 ok = ImportPPD( driver, new_ppd )(追記) /* Also sets driver_path variable */ (追記ここまで) 1390 1400 1391 1401 SELECT … … 1439 1449 IF message <> '' THEN 1440 1450 CALL VRMessage VRWindow(), _message, _mbtitle, _mbicon 1451 (追記) (追記ここまで) 1452 (追記) IF ok == 0 THEN DO (追記ここまで) 1453 (追記) /* The PPD was imported into the driver install directory. Now we should (追記ここまで) 1454 (追記) * ask the user if they want to actually install this printer driver so (追記ここまで) 1455 (追記) * that existing printer objects can use it. (追記ここまで) 1456 (追記) */ (追記ここまで) 1457 (追記) _new_model = GetNameFromPPD( new_ppd ) (追記ここまで) 1458 (追記) _btns.0 = 2 (追記ここまで) 1459 (追記) _btns.1 = NLSGetMessage( 14 ) (追記ここまで) 1460 (追記) _btns.2 = NLSGetMessage( 15 ) (追記ここまで) 1461 (追記) _create = VRMessage( VRWindow(), NLSGetMessage( 240, _new_model ) || '0d0d0a'x ||, (追記ここまで) 1462 (追記) NLSGetMessage( 241 ), NLSGetMessage( 239 ), 'Q', '_btns.', 1, 2 ) (追記ここまで) 1463 (追記) IF _create == 1 THEN DO (追記ここまで) 1464 (追記) _ipd = InstallPrintDriver( driver, driver_path, _new_model ) (追記ここまで) 1465 (追記) IF _ipd <> 0 THEN (追記ここまで) 1466 (追記) CALL VRMessage VRWindow(), NLSGetMessage( 168, driver'.'_new_model ), NLSGetMessage( 13 ), 'E' (追記ここまで) 1467 (追記) END (追記ここまで) 1468 (追記) END (追記ここまで) 1441 1469 1442 1470 CALL SW_IMPORT_Close … … 1588 1616 1589 1617 ok = CopyPrinterPak( new_drv, drv_target ) 1618 (追記) (追記ここまで) 1619 (追記) /* Update any previously-imported PPDs for this driver (追記ここまで) 1620 (追記) */ (追記ここまで) 1621 (追記) IF ok == 1 THEN DO (追記ここまで) 1622 (追記) /* TODO use drv_target and parse it for pmdx directly */ (追記ここまで) 1623 (追記) driver_path = GetDriverSource( drv_stem ) /* Also sets pmdx */ (追記ここまで) 1624 (追記) IF pmdx == '' THEN (追記ここまで) 1625 (追記) driver_repo = 0 (追記ここまで) 1626 (追記) ELSE (追記ここまで) 1627 (追記) driver_repo = 1 (追記ここまで) 1628 (追記) pwok = PinWrapper( 0, drv_stem, '') (追記ここまで) 1629 (追記) IF pwok <> 0 THEN DO (追記ここまで) 1630 (追記) CALL CHAROUT globals.!log1, 'Encountered error' pwok 'from PIN wrapper:' (追記ここまで) 1631 (追記) SELECT (追記ここまで) 1632 (追記) WHEN ok == 3 THEN CALL LINEOUT globals.!log1, 'Invalid path specified' (追記ここまで) 1633 (追記) WHEN ok == 4 THEN CALL LINEOUT globals.!log1, 'Failed to copy driver files' (追記ここまで) 1634 (追記) WHEN ok == 5 THEN CALL LINEOUT globals.!log1, 'Failed to create directory' (追記ここまで) 1635 (追記) WHEN ok == 6 THEN CALL LINEOUT globals.!log1, 'PPD import failed' (追記ここまで) 1636 (追記) WHEN ok == 7 THEN CALL LINEOUT globals.!log1, 'Error updating PRDESC.LST' (追記ここまで) 1637 (追記) OTHERWISE CALL LINEOUT globals.!log1, 'Unknown error' (追記ここまで) 1638 (追記) END (追記ここまで) 1639 (追記) ok = 0 (追記ここまで) 1640 (追記) END (追記ここまで) 1641 (追記) END (追記ここまで) 1642 (追記) (追記ここまで) 1590 1643 IF existing & ok == 1 THEN DO 1591 CALL UpdatePrDesc (削除) new_drv, drv_target'\'new_drv (削除ここまで)1644 CALL UpdatePrDesc (追記) drv_name, drv_target'\'drv_name (追記ここまで) 1592 1645 END 1593 1646 IF ok == 0 THEN DO … … 1597 1650 ELSE 1598 1651 CALL VRMessage VRWindow(), NLSGetMessage( 193 ), NLSGetMessage( 16 ), 'I' 1652 (追記) (追記ここまで) 1653 (追記) new_drv = drv_target'\'drv_name (追記ここまで) 1599 1654 END 1600 1655 END -
trunk/gui/printer/manager/printm_en.txt
r39 r49 251 251 PTM0237I: You cannot import a PPD file unless you have either CUPS or at least one legacy PostScript driver installed. 252 252 PTM0238I: The PPD has been imported. 253 PTM0239 (削除) ?: (削除ここまで)254 PTM0240 (削除) ?: (削除ここまで)255 PTM0241 (削除) ?: (削除ここまで)253 PTM0239(追記) I: Install Driver? (追記ここまで) 254 PTM0240(追記) I: The driver "%1" is now available. Do you want to install this driver? (追記ここまで) 255 PTM0241(追記) I: (Saying 'Yes' will allow existing printer objects to use this driver.) (追記ここまで) 256 256 PTM0242?: 257 257 PTM0243?: -
trunk/gui/printer/manager/readme.txt
r48 r49 1 1 PM Printer Manager 2 Version 0. (削除) 46 (削除ここまで)2 Version 0.(追記) 50 (追記ここまで) 3 3 4 4 Printer Manager is a new graphical printer management tool designed to 5 5 replace several older, separate programs by integrating their functions 6 in one, centralize (削除) (削除ここまで)utility:6 in one, centralize(追記) d (追記ここまで) utility: 7 7 - INSTPDR.EXE (done) 8 8 - ECSPRINT.EXE (done) … … 16 16 - WPTOOLS.DLL (widely available, included with eCS) 17 17 - PR1UTIL.DLL (widely available, included with eCS 2.x) 18 - VROBJEX.DLL (included here, to be included in eCS 2.2) 18 - VROBJEX.DLL (available from http://trac.netlabs.org/vxapps, 19 included in eCS 2.2) 19 20 - RXPRTUTL.DLL (included here) 20 21 … … 71 72 -- 72 73 Alex Taylor 73 (削除) May (削除ここまで)201474 (追記) December (追記ここまで) 2014 -
trunk/gui/shared/PrManUtl.VRS
r45 r49 275 275 copyfile = drv_dir'\AUXPRINT.PAK' 276 276 IF STREAM( copyfile, 'C', 'QUERY EXISTS') <> '' THEN DO 277 ok = VRCopyFile( copyfile, newdrvdir'\AUXPRINT.PAK' (削除) (削除ここまで)277 ok = VRCopyFile( copyfile, newdrvdir'\AUXPRINT.PAK'(追記) ) (追記ここまで) 278 278 CALL LINEOUT globals.!log1, ' -' copyfile ':' ok 279 279 END … … 760 760 761 761 762 (追記) /*:VRX PinWrapper (追記ここまで) 763 (追記) */ (追記ここまで) 764 (追記) /* Wrapper for PIN, which performs the following tasks: (追記ここまで) 765 (追記) * - Create a temporary working directory & copy the PrinterPak files there. (追記ここまで) 766 (追記) * - Pre-process the PPD file to make it ready for import, and saves it in (追記ここまで) 767 (追記) * a driver-specific 'saved PPDs' directory for future use. (追記ここまで) 768 (追記) * - Uses PIN to import the PPD into our temporary working copy of the driver. (追記ここまで) 769 (追記) * - Copy the updated driver back to our installable copy. (追記ここまで) 770 (追記) * - If update_all is 1 then also do the following: (追記ここまで) 771 (追記) * - If the driver is actually installed, copy the updated driver back (追記ここまで) 772 (追記) * over the installed version as well. (追記ここまで) 773 (追記) * - If this is a 'shipped' driver (i.e. one listed in PRDRV.LST) then (追記ここまで) 774 (追記) * add the newly-defined printer to PRDESC.LST. (追記ここまで) 775 (追記) */ (追記ここまで) 776 (追記) PinWrapper: PROCEDURE EXPOSE globals. driver_path driver_repo (追記ここまで) 777 (追記) ARG update_all, driver, ppdfile (追記ここまで) 778 (追記) (追記ここまで) 779 (追記) CALL LINEOUT globals.!log1, 'Driver source: ' driver_path (追記ここまで) 780 (追記) (追記ここまで) 781 (追記) workdir = SysTempFileName( globals.!tmpdir'\PPD_????') (追記ここまで) 782 (追記) ok = VRMkDir( workdir ) (追記ここまで) 783 (追記) IF ok == 1 THEN ok = VrMkDir( workdir'\OUT') (追記ここまで) 784 (追記) IF ok <> 1 THEN (追記ここまで) 785 (追記) RETURN 5 /** RC=5 failed to create directory */ (追記ここまで) 786 (追記) (追記ここまで) 787 (追記) CALL LINEOUT globals.!log1, 'Temporary directory: ' workdir (追記ここまで) 788 (追記) (追記ここまで) 789 (追記) SELECT (追記ここまで) 790 (追記) WHEN driver == 'ECUPS' THEN ppddir = globals.!repository'\PPD_E' (追記ここまで) 791 (追記) WHEN driver == 'ECUPS-HP' THEN ppddir = globals.!repository'\PPD_EHP' (追記ここまで) 792 (追記) WHEN driver == 'PSPRINT' THEN ppddir = globals.!repository'\PPD_PS' (追記ここまで) 793 (追記) WHEN driver == 'PSPRINT2' THEN ppddir = globals.!repository'\PPD_PS2' (追記ここまで) 794 (追記) WHEN driver == 'PSCRIPT2' THEN ppddir = globals.!repository'\PPD2' (追記ここまで) 795 (追記) WHEN driver == 'GUTENPRT' THEN ppddir = globals.!repository'\PPD_GP' (追記ここまで) 796 (追記) OTHERWISE ppddir = globals.!repository'\PPD' (追記ここまで) 797 (追記) END (追記ここまで) 798 (追記) (追記ここまで) 799 (追記) /* Make sure ppddir (for keeping PPD files) exists */ (追記ここまで) 800 (追記) CALL SysFileTree ppddir, 'dirs.', 'DO' (追記ここまで) 801 (追記) IF dirs.0 == 0 THEN DO (追記ここまで) 802 (追記) ok = VRMkDir( ppddir ) (追記ここまで) 803 (追記) IF ok <> 1 THEN (追記ここまで) 804 (追記) RETURN 5 /** RC=5 failed to create directory */ (追記ここまで) 805 (追記) END (追記ここまで) 806 (追記) (追記ここまで) 807 (追記) CALL LINEOUT globals.!log1, 'Directory for PPD files:' ppddir (追記ここまで) 808 (追記) (追記ここまで) 809 (追記) /*** (追記ここまで) 810 (追記) *** Now do the actual work. (追記ここまで) 811 (追記) ***/ (追記ここまで) 812 (追記) (追記ここまで) 813 (追記) /* Copy the needed driver files to our working directories. (追記ここまで) 814 (追記) */ (追記ここまで) 815 (追記) drvr_dir = VRParseFileName( driver_path, 'DP') (追記ここまで) 816 (追記) drv_out = workdir'\OUT\'driver'.DRV' (追記ここまで) 817 (追記) pin_exe = workdir'\PIN.EXE' (追記ここまで) 818 (追記) ppd_exe = workdir'\PPDENC.EXE' (追記ここまで) 819 (追記) ok = VRCopyFile( driver_path, drv_out ) (追記ここまで) 820 (追記) IF ok == 1 THEN ok = VRCopyFile( drvr_dir'\PIN.EXE', pin_exe ) (追記ここまで) 821 (追記) IF ok == 1 THEN ok = VRCopyFile( drvr_dir'\PPDENC.EXE', ppd_exe ) (追記ここまで) 822 (追記) IF ok == 0 THEN DO (追記ここまで) 823 (追記) RETURN 4 /*** RC=4 Failed to copy driver files ***/ (追記ここまで) 824 (追記) END (追記ここまで) 825 (追記) (追記ここまで) 826 (追記) /* Set up the output redirection. (追記ここまで) 827 (追記) */ (追記ここまで) 828 (追記) nq = RXQUEUE('CREATE') (追記ここまで) 829 (追記) oq = RXQUEUE('SET', nq ) (追記ここまで) 830 (追記) (追記ここまで) 831 (追記) /* If we are importing a new PPD file, prep it first. (追記ここまで) 832 (追記) * (If ppdfile is undefined, it means we are reimporting a directory of (追記ここまで) 833 (追記) * previously-imported PPDs, and we can assume they are already prepped.) (追記ここまで) 834 (追記) */ (追記ここまで) 835 (追記) IF ppdfile <> '' THEN DO (追記ここまで) 836 (追記) (追記ここまで) 837 (追記) /* If the PPD file is compressed, uncompress it. (追記ここまで) 838 (追記) */ (追記ここまで) 839 (追記) IF VRParseFilePath( ppdfile, 'E') == 'GZ' THEN DO (追記ここまで) 840 (追記) decppd = workdir'\' || VRParseFilePath( ppdfile, 'N') (追記ここまで) 841 (追記) CALL LINEOUT globals.!log1, 'Decompressing' ppdfile 'to' decppd (追記ここまで) 842 (追記) ADDRESS CMD '@'globals.!programs.!gzip '-c -d' ppdfile '| RXQUEUE' nq (追記ここまで) 843 (追記) DO QUEUED() (追記ここまで) 844 (追記) PARSE PULL line (追記ここまで) 845 (追記) CALL LINEOUT decppd, line (追記ここまで) 846 (追記) END (追記ここまで) 847 (追記) CALL LINEOUT decppd (追記ここまで) 848 (追記) ppdfile = decppd (追記ここまで) 849 (追記) END (追記ここまで) 850 (追記) (追記ここまで) 851 (追記) IF VRFileExists( ppdfile ) == 0 THEN DO (追記ここまで) 852 (追記) CALL LINEOUT globals.!log1, 'PPD file' ppdfile 'could not be found.' (追記ここまで) 853 (追記) RETURN 6 /** RC=6 PPD import failed **/ (追記ここまで) 854 (追記) END (追記ここまで) 855 (追記) (追記ここまで) 856 (追記) ppd_use = ppddir'\' || VRParseFileName( ppdfile, 'NE') (追記ここまで) 857 (追記) (追記ここまで) 858 (追記) /* Now we have to clean up and validate the PPD file so PIN can use it. (追記ここまで) 859 (追記) * First, PPDENC converts the codepage if necessary, and copies the results (追記ここまで) 860 (追記) * to our working directory. (追記ここまで) 861 (追記) */ (追記ここまで) 862 (追記) CALL LINEOUT globals.!log1, 'Converting PPD with:' ppd_exe ppdfile ppd_use (追記ここまで) 863 (追記) ADDRESS CMD '@'ppd_exe ppdfile ppd_use '2>NUL | RXQUEUE' nq (追記ここまで) 864 (追記) DO QUEUED() (追記ここまで) 865 (追記) PULL output (追記ここまで) 866 (追記) CALL LINEOUT globals.!log2, output (追記ここまで) 867 (追記) END (追記ここまで) 868 (追記) CALL LINEOUT globals.!log2, '' (追記ここまで) 869 (追記) CALL LINEOUT globals.!log2 (追記ここまで) 870 (追記) (追記ここまで) 871 (追記) IF VRFileExists( ppd_use ) == 0 THEN DO (追記ここまで) 872 (追記) CALL LINEOUT globals.!log1, 'Hmm,' ppd_use 'was not created. Copying manually.' (追記ここまで) 873 (追記) CALL VRCopyFile ppdfile, ppd_use (追記ここまで) 874 (追記) END (追記ここまで) 875 (追記) (追記ここまで) 876 (追記) /* Next we strip out some problematic PPD statements which are often (追記ここまで) 877 (追記) * encountered in (for example) CUPS-based PPD files. (追記ここまで) 878 (追記) */ (追記ここまで) 879 (追記) CALL CleanPPD ppd_use, globals.!log1 (追記ここまで) 880 (追記) (追記ここまで) 881 (追記) END (追記ここまで) 882 (追記) (追記ここまで) 883 (追記) /* Preparation complete. Now do the import. (追記ここまで) 884 (追記) */ (追記ここまで) 885 (追記) count = 0 (追記ここまで) 886 (追記) ADDRESS CMD '@'pin_exe 'ppd' ppddir drv_out '2>NUL | RXQUEUE' nq (追記ここまで) 887 (追記) DO QUEUED() (追記ここまで) 888 (追記) PARSE PULL output (追記ここまで) 889 (追記) CALL LINEOUT globals.!log2, output (追記ここまで) 890 (追記) PARSE VAR output . 'OK (' nickname (追記ここまで) 891 (追記) IF nickname <> '' THEN DO (追記ここまで) 892 (追記) count = count + 1 (追記ここまで) 893 (追記) newprinters.count = STRIP( nickname, 'T', ')') (追記ここまで) 894 (追記) END (追記ここまで) 895 (追記) END (追記ここまで) 896 (追記) newprinters.0 = count (追記ここまで) 897 (追記) CALL LINEOUT globals.!log2, '' (追記ここまで) 898 (追記) CALL LINEOUT globals.!log2 (追記ここまで) 899 (追記) (追記ここまで) 900 (追記) /* End the output redirection. (追記ここまで) 901 (追記) */ (追記ここまで) 902 (追記) CALL RXQUEUE 'SET', oq (追記ここまで) 903 (追記) CALL RXQUEUE 'DELETE', nq (追記ここまで) 904 (追記) (追記ここまで) 905 (追記) IF newprinters.0 == 0 THEN DO (追記ここまで) 906 (追記) RETURN 6 /** RC=6 PPD import failed **/ (追記ここまで) 907 (追記) END (追記ここまで) 908 (追記) (追記ここまで) 909 (追記) /*** (追記ここまで) 910 (追記) *** Post-import processing. (追記ここまで) 911 (追記) ***/ (追記ここまで) 912 (追記) (追記ここまで) 913 (追記) IF ( driver_repo == 1 ) & ( update_all <> 0 ) THEN DO (追記ここまで) 914 (追記) /* If we're working out of the repository, we need to update the (追記ここまで) 915 (追記) * driver table in PRDESC.LST to add the new driver(s). (追記ここまで) 916 (追記) */ (追記ここまで) 917 (追記) (追記ここまで) 918 (追記) CALL LINEOUT globals.!log1, 'Updating' globals.!prdesc 'with new entries from' drv_out (追記ここまで) 919 (追記) (追記ここまで) 920 (追記) /* -- This causes a SYS3175 in the .DRV for some reason... (追記ここまで) 921 (追記) ok = UpdatePrDesc( driver'.DRV', drv_out ) (追記ここまで) 922 (追記) IF ok <> 0 THEN (追記ここまで) 923 (追記) CALL LINEOUT globals.!log1, 'Failed to update' globals.!prdesc '(are EAs on' drv_out ' valid?)' (追記ここまで) 924 (追記) */ (追記ここまで) 925 (追記) (追記ここまで) 926 (追記) count = 0 (追記ここまで) 927 (追記) (追記ここまで) 928 (追記) /* First, copy all lines that don't refer to the driver just updated */ (追記ここまで) 929 (追記) CALL LINEIN globals.!prdesc, 1, 0 (追記ここまで) 930 (追記) DO WHILE LINES( globals.!prdesc ) (追記ここまで) 931 (追記) _next = LINEIN( globals.!prdesc ) (追記ここまで) 932 (追記) PARSE UPPER VAR _next . ':' _rest (追記ここまで) 933 (追記) _tail = SUBSTR( _rest, LASTPOS('(', _rest )) (追記ここまで) 934 (追記) PARSE VAR _tail '('_prdrv')' . (追記ここまで) 935 (追記) IF _prdrv == driver'.DRV' THEN ITERATE (追記ここまで) 936 (追記) count = count + 1 (追記ここまで) 937 (追記) defs.count = _next (追記ここまで) 938 (追記) END (追記ここまで) 939 (追記) CALL STREAM globals.!prdesc, 'C', 'CLOSE' (追記ここまで) 940 (追記) (追記ここまで) 941 (追記) /* Next, create a new list for the updated driver and merge that in */ (追記ここまで) 942 (追記) newlist = workdir'\'driver'.LST' (追記ここまで) 943 (追記) CALL CreateDriverList drv_out, newlist (追記ここまで) 944 (追記) DO WHILE LINES( newlist ) (追記ここまで) 945 (追記) _line = LINEIN( newlist ) (追記ここまで) 946 (追記) count = count + 1 (追記ここまで) 947 (追記) defs.count = _line (追記ここまで) 948 (追記) END (追記ここまで) 949 (追記) CALL STREAM newlist, 'C', 'CLOSE' (追記ここまで) 950 (追記) defs.0 = count (追記ここまで) 951 (追記) (追記ここまで) 952 (追記) /* Now sort the list and recreate PRDESC.LST */ (追記ここまで) 953 (追記) CALL SysStemSort 'defs.',, 'I' (追記ここまで) 954 (追記) prdesc_tmp = workdir'\PRDESC.LST' (追記ここまで) 955 (追記) IF STREAM( prdesc_tmp, 'C', 'QUERY EXISTS') <> '' THEN (追記ここまで) 956 (追記) CALL VRDeleteFile prdesc_tmp (追記ここまで) 957 (追記) DO i = 1 TO defs.0 (追記ここまで) 958 (追記) CALL LINEOUT prdesc_tmp, defs.i (追記ここまで) 959 (追記) END (追記ここまで) 960 (追記) CALL LINEOUT prdesc_tmp (追記ここまで) 961 (追記) ok = VRCopyFile( prdesc_tmp, globals.!prdesc ) (追記ここまで) 962 (追記) IF ok == 0 THEN DO (追記ここまで) 963 (追記) RETURN 7 /** RC=7 Error updating PRDESC.LST **/ (追記ここまで) 964 (追記) END (追記ここまで) 965 (追記) CALL VRDeleteFile prdesc_tmp (追記ここまで) 966 (追記) (追記ここまで) 967 (追記) END (追記ここまで) 968 (追記) (追記ここまで) 969 (追記) /* Finally, copy the updated driver files. (追記ここまで) 970 (追記) */ (追記ここまで) 971 (追記) target = VRParseFilePath( driver_path, 'DP') (追記ここまで) 972 (追記) CALL LINEOUT globals.!log1, 'Copying files from' workdir'\OUT to' target (追記ここまで) 973 (追記) CALL PRReplaceModule target'\'driver'.DRV', '', '' (追記ここまで) 974 (追記) ok = VRCopyFile( workdir'\OUT\'driver'.DRV', target'\'driver'.DRV') (追記ここまで) 975 (追記) IF ok == 1 THEN (追記ここまで) 976 (追記) ok = VRCopyFile( workdir'\OUT\AUXPRINT.PAK', target'\AUXPRINT.PAK') (追記ここまで) 977 (追記) (追記ここまで) 978 (追記) IF ( ok == 1 ) & ( update_all <> 0 ) THEN DO (追記ここまで) 979 (追記) /* Copy the updated files to \OS2\DLL\<driver>, replacing any (追記ここまで) 980 (追記) * existing copies. (This prevents problems if the OS/2 driver (追記ここまで) 981 (追記) * installation fails to copy them, which can happen under some (追記ここまで) 982 (追記) * circumstances.) (追記ここまで) 983 (追記) */ (追記ここまで) 984 (追記) IF VRFileExists( globals.!os2dir'\DLL\'driver'\'driver'.DRV') THEN DO (追記ここまで) 985 (追記) CALL VRCopyFile workdir'\OUT\AUXPRINT.PAK',, (追記ここまで) 986 (追記) globals.!os2dir'\DLL\'driver'\AUXPRINT.PAK' (追記ここまで) 987 (追記) CALL PRReplaceModule globals.!os2dir'\DLL\'driver'\'driver'.DRV', '', '' (追記ここまで) 988 (追記) CALL VRCopyFile workdir'\OUT\'driver'.DRV', globals.!os2dir'\DLL\'driver'\'driver'.DRV' (追記ここまで) 989 (追記) END (追記ここまで) 990 (追記) END (追記ここまで) 991 (追記) IF ok == 0 THEN DO (追記ここまで) 992 (追記) CALL LINEOUT globals.!log1, VRError() (追記ここまで) 993 (追記) RETURN 4 /*** RC=4 Failed to copy driver files ***/ (追記ここまで) 994 (追記) END (追記ここまで) 995 (追記) (追記ここまで) 996 (追記) CALL LINEOUT globals.!log1, newprinters.0 'printers imported successfully.' (追記ここまで) 997 (追記) DO i = 1 TO newprinters.0 (追記ここまで) 998 (追記) CALL LINEOUT globals.!log1, ' ->' newprinters.i (追記ここまで) 999 (追記) END (追記ここまで) 1000 (追記) CALL LINEOUT globals.!log1, '' (追記ここまで) 1001 (追記) CALL LINEOUT globals.!log1 (追記ここまで) 1002 (追記) (追記ここまで) 1003 (追記) /* Clean up our work directories. (追記ここまで) 1004 (追記) */ (追記ここまで) 1005 (追記) CALL VRDeleteFile workdir'\OUT\*' (追記ここまで) 1006 (追記) CALL VRDeleteFile workdir'\*' (追記ここまで) 1007 (追記) CALL VRRmDir( workdir'\OUT') (追記ここまで) 1008 (追記) CALL VRRmDir( workdir ) (追記ここまで) 1009 (追記) (追記ここまで) 1010 (追記) RETURN 0 (追記ここまで) 1011 (追記) (追記ここまで) 1012 (追記) (追記ここまで) 762 1013 /*:VRX UpdatePrDesc 763 1014 */ … … 781 1032 CALL STREAM globals.!prdesc, 'C', 'CLOSE' 782 1033 783 DO i = 1 TO (削除) (削除ここまで)devs.01034 DO i = 1 TO (追記) new (追記ここまで)devs.0 784 1035 _count = _count + 1 785 1036 prdefs._count = newdevs.i':' newdevs.i '('driver')' -
trunk/pin/src/conv_ppd.c
r3 r49 103 103 #include <ctype.h> 104 104 #ifndef __KLIBC__ 105 (削除) (削除ここまで)#include <builtin.h>105 (追記) (追記ここまで)#include <builtin.h> 106 106 #else 107 (削除) (削除ここまで)typedef INT *PINT;108 (削除) (削除ここまで)#define strcmpi strcmp107 (追記) (追記ここまで)typedef INT *PINT; 108 (追記) (追記ここまで)#define strcmpi strcmp 109 109 #endif 110 110 … … 809 809 if( str == NULL || *str == 0 ) return; 810 810 811 (削除) (削除ここまで)while( (*str) !=0 ) str++; // find the end of the string811 (追記) (追記ここまで)while( (*str) !=0 ) str++; // find the end of the string 812 812 str--; // get to last character (step over 0) 813 813 while( isblank(*str) ) str--; // see if the character is blank, keep backstepping … … 1217 1217 if (desPpd.desItems.iResDpi == 0) 1218 1218 { 1219 (追記) #if 0 (追記ここまで) 1219 1220 desPpd.desItems.iResDpi = 300; 1221 (追記) #else (追記ここまで) 1222 (追記) desPpd.desItems.iResDpi = 1440; // workaround for WordPro printing problem (追記ここまで) 1223 (追記) #endif (追記ここまで) 1220 1224 } 1221 1225 … … 1381 1385 i = SkipBlank(px); 1382 1386 px += i; 1383 desPpd.desPage.iCustomPageSizeMinHeight = (削除) atoi(px); (削除ここまで)1387 desPpd.desPage.iCustomPageSizeMinHeight = (追記) (SHORT)atoi(px); // ALT (追記ここまで) 1384 1388 i = MovePast( px, ' ' ); 1385 1389 px += i; 1386 desPpd.desPage.iCustomPageSizeMaxHeight = (削除) atoi(px); (削除ここまで)1390 desPpd.desPage.iCustomPageSizeMaxHeight = (追記) (SHORT)atoi(px); // ALT (追記ここまで) 1387 1391 } 1388 1392 } … … 2362 2366 if(stricmp(pCompare,"Resolution")==0) 2363 2367 { 2364 (削除) (削除ここまで)ULONG uiResStr;2365 (削除) (削除ここまで)// we are in resolution processing2366 (削除) (削除ここまで)uiResStr = uiStrLen + MovePast( pbPrBuffer + uiStrLen, ':' );2367 (削除) (削除ここまで)uiResStr += SkipBlank( pbPrBuffer + uiResStr );2368 (削除) (削除ここまで)if(strnicmp(pbPrBuffer+uiResStr,"\"\"",2)==0)2369 (削除) (削除ここまで){2370 (削除) (削除ここまで)// we found a empty resolution string so skip this one2371 (削除) (削除ここまで)bSkipEntry = TRUE;2372 (削除) } (削除ここまで)2368 (追記) (追記ここまで)ULONG uiResStr; 2369 (追記) (追記ここまで)// we are in resolution processing 2370 (追記) (追記ここまで)uiResStr = uiStrLen + MovePast( pbPrBuffer + uiStrLen, ':' ); 2371 (追記) (追記ここまで)uiResStr += SkipBlank( pbPrBuffer + uiResStr ); 2372 (追記) (追記ここまで)if(strnicmp(pbPrBuffer+uiResStr,"\"\"",2)==0) 2373 (追記) (追記ここまで){ 2374 (追記) (追記ここまで)// we found a empty resolution string so skip this one 2375 (追記) (追記ここまで)bSkipEntry = TRUE; 2376 (追記) } (追記ここまで) 2373 2377 } 2374 2378
Note:
See TracChangeset
for help on using the changeset viewer.