Changeset 21
- Timestamp:
- Feb 25, 2013, 6:33:09 AM (13 years ago)
- Location:
- trunk/gui/printer/cupswiz
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/printer/cupswiz/cupswiz.VRP
r20 r21 7 7 VRXWindow: __VREMainWindow,1,614,2554,5770,9106 8 8 VRXWindow: __VRESectionListWindow,1,675,11804,4529,3891 9 VRXWindow: __VREToolsWindow,1,1686,9877,49 65,16639 VRXWindow: __VREToolsWindow,1,1686,9877,4971,1667 10 10 VRXWindow: __VREWindListWindow,1,5228,11804,2650,3891 11 11 UserFile: 1 -
trunk/gui/printer/cupswiz/cupswiz.VRX
r20 r21 236 236 */ 237 237 238 result= InstallPrintDriver( prnt_drv, driver_path, printer_model )239 CALL LINEOUT globals.!log1, 'InstallPrintDriver(' prnt_drv',' driver_path',' printer_model ') RC =' result240 241 IF result == 0 THEN242 result= CreatePrinterObject( prnt_drv, printer_model,,243 244 CALL LINEOUT globals.!log1, 'CreatePrinterObject(' prnt_drv',' printer_model,245 ',' port_name',' queue_name',' printer_title,246 ') RC =' result247 248 IF result<> 0 THEN238 ok = InstallPrintDriver( prnt_drv, driver_path, printer_model ) 239 CALL LINEOUT globals.!log1, 'InstallPrintDriver(' prnt_drv',' driver_path',' printer_model ') RC =' ok 240 241 IF ok == 0 THEN DO 242 ok = CreatePrinterObject( prnt_drv, printer_model,, 243 port_name, queue_name, printer_title ) 244 CALL LINEOUT globals.!log1, 'CreatePrinterObject(' prnt_drv',' printer_model, 245 ',' port_name',' queue_name',' printer_title ') RC =' ok 246 END 247 248 IF ok <> 0 THEN 249 249 CALL DeletePort port_name 250 250 ELSE IF port_ok == 1 THEN DO … … 254 254 END 255 255 256 RETURN result256 RETURN ok 257 257 258 258 /*:VRX CreatePrinter … … 278 278 IF ok <> 0 THEN DO 279 279 CALL LINEOUT globals.!log1, 'PPD import failed:' ok 280 CALL VRMessage VRWindow(), NLSGetMessage( 69 ),, /* 69: The printer parameters could not ... PPD file. */ 281 NLSGetMessage( 70 ), 'W' /* 70: Error importing PPD file */ 282 CALL PromptForPMName 283 /* RETURN 1 RC=1 PPD import failed **/ 280 buttons.1 = NLSGetMessage( 2 ) /* 2: OK */ 281 buttons.2 = NLSGetMessage( 3 ) /* 3: Cancel */ 282 buttons.0 = 2 283 ok = VRMessage( VRWindow(), NLSGetMessage( 69 ),, /* 69: The printer parameters could not ... PPD file. */ 284 NLSGetMessage( 70 ), 'W',, /* 70: Error importing PPD file */ 285 'buttons.', 1, 2 ) 286 IF ok == 1 THEN 287 CALL PromptForPMName 288 ELSE 289 RETURN 1 /* RC=1 PPD import failed **/ 284 290 END 285 291 END … … 769 775 * to our working directory. 770 776 */ 771 ADDRESS CMD '@'ppd_exe ppdfile ppd_use '2>NUL 1| RXQUEUE' nq 777 CALL LINEOUT globals.!log1, 'Converting PPD with:' ppd_exe ppdfile ppd_use 778 ADDRESS CMD '@'ppd_exe ppdfile ppd_use '2>NUL | RXQUEUE' nq 772 779 DO QUEUED() 773 780 PULL output … … 777 784 CALL LINEOUT globals.!log2 778 785 786 IF VRFileExists( ppd_use ) == 0 THEN DO 787 CALL LINEOUT globals.!log1, 'Hmm,' ppd_use 'was not created. Copying manually.' 788 CALL VRCopyFile ppdfile, ppd_use 789 END 790 779 791 /* Next we strip out some problematic lines used which are often encountered 780 792 * in (e.g.) CUPS-based PPD files. … … 785 797 */ 786 798 count = 0 787 ADDRESS CMD '@'pin_exe 'ppd' ppddir drv_out '2>NUL 1| RXQUEUE' nq799 ADDRESS CMD '@'pin_exe 'ppd' ppddir drv_out '2>NUL | RXQUEUE' nq 788 800 DO QUEUED() 789 801 PARSE PULL output … … 863 875 */ 864 876 target = VRParseFilePath( driver_path, 'DP') 865 ok = VRCopyFile( workdir'\OUT\*', target ) 877 CALL LINEOUT globals.!log1, 'Copying files from' workdir'\OUT to' target 878 ADDRESS CMD '@UNLOCK' target'\'driver'.DRV 2>NUL 1>NUL' 879 ok = VRCopyFile( workdir'\OUT\'driver'.DRV', target'\'driver'.DRV') 880 IF ok == 1 THEN 881 ok = VRCopyFile( workdir'\OUT\AUXPRINT.PAK', target'\AUXPRINT.PAK') 866 882 IF ok == 1 THEN DO 867 883 /* Copy the updated files to \OS2\DLL\<driver>, replacing any … … 873 889 CALL VRCopyFile workdir'\OUT\AUXPRINT.PAK',, 874 890 globals.!os2dir'\DLL\'driver'\AUXPRINT.PAK' 891 ADDRESS CMD '@UNLOCK' workdir'\OUT\'driver'.DRV 2>NUL 1>NUL' 875 892 CALL VRCopyFile workdir'\OUT\'driver'.DRV',, 876 893 globals.!os2dir'\DLL\'driver'\'driver'.DRV' 877 894 END 878 895 END 879 IF ok == 0 THEN 896 IF ok == 0 THEN DO 897 CALL LINEOUT globals.!log1, VRError() 880 898 RETURN 3 /*** RC=3 Failed to copy driver files ***/ 899 END 881 900 882 901 CALL LINEOUT globals.!log1, newprinters.0 'printers imported successfully.' … … 1619 1638 CALL NLSSetText 'SW_ABOUT', 'Caption', 10 /* 10: Product Information */ 1620 1639 CALL NLSSetText 'DT_ABOUT1', 'Caption', 11 /* 11: eCups Printer Install Utility */ 1621 CALL NLSSetText 'DT_ABOUT2', 'Caption', 12, '0.9 7' /* 12: Version %1 */1622 CALL NLSSetText 'DT_ABOUT3', 'Caption', 13, '2010, 201 2' /* 13: (C) %1 Alex Taylor */1640 CALL NLSSetText 'DT_ABOUT2', 'Caption', 12, '0.98' /* 12: Version %1 */ 1641 CALL NLSSetText 'DT_ABOUT3', 'Caption', 13, '2010, 2013' /* 13: (C) %1 Alex Taylor */ 1623 1642 CALL NLSSetText 'PB_ABOUT', 'Caption', 2 /* 10: Product Information */ 1624 1643
Note:
See TracChangeset
for help on using the changeset viewer.