Changeset 24 for trunk/gui/printer
- Timestamp:
- Apr 5, 2013, 9:14:35 PM (12 years ago)
- Location:
- trunk/gui/printer/cupswiz
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/printer/cupswiz/cupswiz.VRP
r21 r24 1 1 VX-REXX OS/2 V2.14 Build B3 2 2 VRX: cupswiz.VRX 3 MacroPath: VRM: E:\DEVELOPMENT\VXREXX\Projects\cupswiz3 MacroPath: VRM:G:\netlabs\svn\ecups\trunk\gui\printer\cupswiz 4 4 EXEPath: 5 5 RunParameters: … … 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 71,16679 VRXWindow: __VREToolsWindow,1,1686,9877,4968,1669 10 10 VRXWindow: __VREWindListWindow,1,5228,11804,2650,3891 11 11 UserFile: 1 -
trunk/gui/printer/cupswiz/cupswiz.VRX
r23 r24 101 101 */ 102 102 return 103 /*:VRX CheckPrograms 104 */ 105 CheckPrograms: PROCEDURE EXPOSE globals. 106 107 /* Make sure CUPS.PDR is installed. 108 */ 109 cups_pdr = VRGetIni('PM_PORT_DRIVER', 'CUPS', 'System') 110 IF cups_pdr == '' THEN DO 111 cups_pdr = STREAM( globals.!bootdrv'\OS2\DLL\CUPS.PDR', 'C', 'QUERY EXISTS') 112 IF cups_pdr == '' THEN DO 113 CALL VRMessage VRWindow(),, 114 NLSGetMessage( 78, globals.!bootdrv'\OS2\DLL\CUPS.PDR'),, /* 78: The required program %1 is not installed... */ 115 NLSGetMessage( 79 ), 'E' /* 79: Missing File */ 116 CALL Quit 117 END 118 ELSE CALL VRSetIni('PM_PORT_DRIVER', 'CUPS', cups_pdr, 'System') 119 END 120 121 /* Make sure \TCPIP\BIN\CUPSLPR.EXE (required by CUPS.PDR) is installed. 122 */ 123 tcpipbin = SysSearchPath('PATH', 'inetd.exe') 124 IF tcpipbin <> '' THEN 125 tcpipbin = VRParseFileName( tcpipbin, 'DP') 126 ELSE 127 tcpipbin = globals.!bootdrv'\TCPIP\BIN' 128 IF \VRFileExists( tcpipbin'\cupslpr.exe') & (SysSearchPath('PATH', 'cupslpr.exe') == '') THEN DO 129 CALL VRMessage VRWindow(),, 130 NLSGetMessage( 78, 'CUPSLPR.EXE'),, 131 NLSGetMessage( 79 ), 'E' 132 CALL Quit 133 END 134 135 /* Make sure GZIP.EXE is installed (required for unpacking PPDs). 136 */ 137 gzip_exe = SysSearchPath('PATH', 'gzip.exe') 138 IF gzip_exe == '' THEN gzip_exe = STREAM( DIRECTORY() || '\gzip.exe', 'C', 'QUERY EXISTS') 139 IF gzip_exe == '' THEN DO 140 CALL VRMessage VRWindow(), NLSGetMessage( 78, 'GZIP.EXE'), NLSGetMessage( 79 ), 'E' 141 CALL Quit 142 END 143 144 RETURN 145 103 146 /*:VRX CHK_CREATEPM_Click 104 147 */ … … 169 212 END 170 213 214 /* Temporary until we can offer user configuration: 215 */ 216 PARSE UPPER VALUE VALUE('LANG',,'OS2ENVIRONMENT') WITH 1 . 4 _ctry 6 . 217 IF ( WORDPOS( _ctry, 'US CA MX BO CO VE PH CL') > 0 ) THEN 218 page = 'Letter' 219 ELSE 220 page = 'A4' 221 cups_cmd = cups_cmd '-o media='page 222 171 223 CALL LINEOUT globals.!log1, 'Creating CUPS printer using:' 172 224 CALL LINEOUT globals.!log1, ' ' cups_cmd … … 244 296 CALL LINEOUT globals.!log1, 'CreatePrinterObject(' prnt_drv',' printer_model, 245 297 ',' port_name',' queue_name',' printer_title ') RC =' ok 246 END 247 248 IF ok <> 0 THEN 298 IF ok <> 0 THEN DO 299 CALL LINEOUT globals.!log1, 'Failed to create printer object; trying again with generic driver.' 300 ok = CreatePrinterObject( prnt_drv, 'Generic Postscript Printer',, 301 port_name, queue_name, printer_title ) 302 CALL LINEOUT globals.!log1, 'CreatePrinterObject(' prnt_drv', Generic Postscript Printer', 303 ',' port_name',' queue_name',' printer_title ') RC =' ok 304 END 305 END 306 307 IF ok <> 0 THEN DO 308 CALL LINEOUT globals.!log1, 'Printer object creation failed.' 309 IF SysIni('SYSTEM', 'PM_SPOOLER_PRINTER', 'ALL:', 'prt_keys.') == '' THEN DO 310 DO i = 1 TO prt_keys.0 311 key_val = SysIni('SYSTEM', 'PM_SPOOLER_PRINTER', prt_keys.0 ) 312 PARSE VAR key_val _kport ';' _ktitle ';' . 313 IF ( _kport == port_name ) & ( _ktitle == printer_title ) THEN DO 314 CALL LINEOUT globals.!log1, 'Cleaning INI entry:' prt_keys.0 '=' key_val 315 CALL SysIni 'SYSTEM', 'PM_SPOOLER_PRINTER_DESCR', prt_keys.0, 'DELETE:' 316 CALL LINEOUT globals.!log1, 'Cleaning INI entry:' prt_keys.0 '=' key_val 317 CALL SysIni 'SYSTEM', 'PM_SPOOLER_PRINTER', prt_keys.0, 'DELETE:' 318 LEAVE 319 END 320 END 321 END 322 CALL LINEOUT globals.!log1, 'Deleting port' port_name 249 323 CALL DeletePort port_name 324 END 250 325 ELSE IF port_ok == 1 THEN DO 251 326 CALL VRMessage VRWindow(),, … … 293 368 cups_ppd = globals.!prt_ppd 294 369 IF cups_ppd == '' THEN 295 cups_ppd = STREAM( globals.!cupsdir'\etc\cups\ppd 'globals.!prt_name'.ppd', 'C', 'QUERY EXISTS')370 cups_ppd = STREAM( globals.!cupsdir'\etc\cups\ppd\'globals.!prt_name'.ppd', 'C', 'QUERY EXISTS') 296 371 IF cups_ppd == '' THEN 297 372 CALL PromptForPMName … … 929 1004 CALL LoadSettings 930 1005 CALL SetLanguage 1006 CALL CheckPrograms 931 1007 932 1008 IF InitArgs.0 > 0 THEN globals.!cupsdir = InitArgs.1 … … 1638 1714 CALL NLSSetText 'SW_ABOUT', 'Caption', 10 /* 10: Product Information */ 1639 1715 CALL NLSSetText 'DT_ABOUT1', 'Caption', 11 /* 11: eCups Printer Install Utility */ 1640 CALL NLSSetText 'DT_ABOUT2', 'Caption', 12, ' 0.99' /* 12: Version %1 */1716 CALL NLSSetText 'DT_ABOUT2', 'Caption', 12, '1.00' /* 12: Version %1 */ 1641 1717 CALL NLSSetText 'DT_ABOUT3', 'Caption', 13, '2010, 2013' /* 13: (C) %1 Alex Taylor */ 1642 1718 CALL NLSSetText 'PB_ABOUT', 'Caption', 2 /* 10: Product Information */ -
trunk/gui/printer/cupswiz/cupswzen.mkm
r20 r24 42 42 CWZ0032I: Detected network printer (%1) "%2" at %3 43 43 CWZ0033I: Detected network printer %1 at %2 44 CWZ0034I: Networkprinter (manual configuration)44 CWZ0034I: Other printer (manual configuration) 45 45 CWZ0035I: Local printer: %1 46 46 CWZ0036?: … … 92 92 CWZ0076I: Could not read printer name from %1. 93 93 CWZ0077I: Invalid PPD 94 CWZ0078 ?:95 CWZ0079 ?:94 CWZ0078I: The required program %1 is not installed. Please check your installation or contact support. 95 CWZ0079I: Missing File 96 96 ; 97 97 ; Network settings dialog -
trunk/gui/printer/cupswiz/readme.1st
r23 r24 1 1 CUPSWIZ - CUPS printer-creation wizard 2 Version 0.992 Version 1.01 3 3 4 4 This program is simple graphical front-end for creating CUPS-based printers … … 57 57 should have a bldlevel of 1.03 (February 2011) or later. (With earlier 58 58 versions, you will be required to restart the WPS after creating a 59 printer.) 59 printer.) This also requires CUPSLPR.EXE to be installed on your PATH 60 (preferably in the \TCPIP\BIN directory). 60 61 61 62 (If you installed CUPS on your system from WarpIN packages, all of the -
trunk/gui/printer/cupswiz/todo
r18 r24 1 - Check to make sure CUPS.PDR is installed, and (offer to) install if missing. 2 - Ditto for gzip.exe and cupsport.exe 1 - Offer to install CUPS.PDR if missing? 3 2 - Ditto for ECUPS/ECUPS-HP/PSPRINT driver (...somehow) 4 3 - Offer the option to show both simplified/expert drivers.
Note:
See TracChangeset
for help on using the changeset viewer.