*SOLVED -with ugly hack-* I offer to donate $50 to wine...

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
rja
Level 2
Level 2
Posts: 20
Joined: Fri May 29, 2009 4:19 pm

*SOLVED -with ugly hack-* I offer to donate $50 to wine...

Post by rja »

Hello all,

I offer to donate $50 to wine if somebody can give me the golden tip to get printing going from astro. I have astro (astrology software) running under wine 1.1.22 and it works fine, except for printing -which I really need-. Printing under wine works fine with other apps. I can select the printer (WINEPS using CUPS) without problems, but if I click print, nothing happens. There is also no output in my terminal window indicating an error. Unfortunately the developer of astro has passed away and I cannot ask him how he has setup printing in astro. I know from trying with ResHack that astro is not a win32 app. I otherwise runs fine. I have the program + instructions available for anyone who wants to give it a try. From previous experiences (thank you Rein) I know that you do need 1.1.22, or otherwise the app will not run at all. Please help.

Running Fedora 10 x86_64 with wine 1.1.22
Printer Epson Aculaser C2600

Rembert
Last edited by rja on Tue Jun 09, 2009 1:44 am, edited 2 times in total.
User avatar
dimesio
Moderator
Moderator
Posts: 13369
Joined: Tue Mar 25, 2008 10:30 pm

Re: I offer to donate $50 to wine...

Post by dimesio »

rja wrote: There is also no output in my terminal window indicating an error.
Do you mean there is no output at all, or just nothing labeled "err"?
rja
Level 2
Level 2
Posts: 20
Joined: Fri May 29, 2009 4:19 pm

Post subject: Re: I offer to donate $50 to wine..

Post by rja »

no output at all i'm afraid....
somebody out there must know more then I do, being new to wine... Somebody must have an educated guess as to how this program is trying to print and if it is compatible with wine...I hope. Right now I 'm lost.
ThE_TemPLaR
Level 1
Level 1
Posts: 9
Joined: Tue May 05, 2009 4:43 am

Post by ThE_TemPLaR »

Did cups log anything ? You can check this from the CUPS web interface, which can be reached with this URL http://localhost:631 (, if you didn't change the listening port, that is.)
rja
Level 2
Level 2
Posts: 20
Joined: Fri May 29, 2009 4:19 pm

Post by rja »

looking at jobs, I can see no log of any job...there is nothing there
rja
Level 2
Level 2
Posts: 20
Joined: Fri May 29, 2009 4:19 pm

Post by rja »

I mean I do see the log of the jobs that went wel, but no job appears if I print from astro..
rja
Level 2
Level 2
Posts: 20
Joined: Fri May 29, 2009 4:19 pm

Post by rja »

th following is repeated over and over again, except if i print from a working program other than astro and a print is produced..

D [08/Jun/2009:10:57:15 +0200] CUPS-Get-Printers
D [08/Jun/2009:10:57:15 +0200] cupsdProcessIPPRequest: 23 status_code=0 (successful-ok)
D [08/Jun/2009:10:57:15 +0200] cupsdCloseClient: 23
D [08/Jun/2009:10:57:17 +0200] cupsdAcceptClient: skipping getpeercon()
D [08/Jun/2009:10:57:17 +0200] cupsdAcceptClient: 23 from localhost (Domain)
D [08/Jun/2009:10:57:17 +0200] cupsdAcceptClient: skipping getpeercon()
D [08/Jun/2009:10:57:17 +0200] cupsdAcceptClient: 25 from localhost (Domain)
D [08/Jun/2009:10:57:17 +0200] cupsdCloseClient: 23
D [08/Jun/2009:10:57:17 +0200] cupsdReadClient: 25 POST / HTTP/1.1
D [08/Jun/2009:10:57:17 +0200] cupsdAuthorize: No authentication data provided.
D [08/Jun/2009:10:57:18 +0200] CUPS-Get-Printers
D [08/Jun/2009:10:57:18 +0200] cupsdProcessIPPRequest: 25 status_code=0 (successful-ok)
D [08/Jun/2009:10:57:18 +0200] cupsdCloseClient: 25
D [08/Jun/2009:10:57:20 +0200] cupsdAcceptClient: skipping getpeercon()
D [08/Jun/2009:10:57:20 +0200] cupsdAcceptClient: 23 from localhost (Domain)
D [08/Jun/2009:10:57:20 +0200] cupsdAcceptClient: skipping getpeercon()
D [08/Jun/2009:10:57:20 +0200] cupsdAcceptClient: 25 from localhost (Domain)
D [08/Jun/2009:10:57:20 +0200] cupsdCloseClient: 23
D [08/Jun/2009:10:57:20 +0200] cupsdReadClient: 25 POST / HTTP/1.1
D [08/Jun/2009:10:57:20 +0200] cupsdAuthorize: No authentication data provided.
D [08/Jun/2009:10:57:21 +0200] CUPS-Get-Printers
D [08/Jun/2009:10:57:21 +0200] cupsdProcessIPPRequest: 25 status_code=0 (successful-ok)
D [08/Jun/2009:10:57:21 +0200] cupsdAcceptClient: skipping getpeercon()
D [08/Jun/2009:10:57:21 +0200] cupsdAcceptClient: 23 from localhost (Domain)
D [08/Jun/2009:10:57:21 +0200] cupsdReadClient: 23 POST / HTTP/1.1
D [08/Jun/2009:10:57:21 +0200] cupsdAuthorize: No authentication data provided.
D [08/Jun/2009:10:57:21 +0200] Get-Printer-Attributes ipp://localhost/printers/printer
D [08/Jun/2009:10:57:21 +0200] cupsdProcessIPPRequest: 23 status_code=0 (successful-ok)
D [08/Jun/2009:10:57:21 +0200] cupsdReadClient: 23 GET /printers/printer.ppd HTTP/1.1
D [08/Jun/2009:10:57:21 +0200] cupsdAuthorize: No authentication data provided.
D [08/Jun/2009:10:57:21 +0200] cupsdCloseClient: 23
D [08/Jun/2009:10:57:21 +0200] cupsdAcceptClient: skipping getpeercon()
D [08/Jun/2009:10:57:21 +0200] cupsdAcceptClient: 23 from localhost (Domain)
D [08/Jun/2009:10:57:21 +0200] cupsdReadClient: 23 POST / HTTP/1.1
D [08/Jun/2009:10:57:21 +0200] cupsdAuthorize: No authentication data provided.
D [08/Jun/2009:10:57:21 +0200] Get-Printer-Attributes ipp://localhost/printers/printer
D [08/Jun/2009:10:57:21 +0200] cupsdProcessIPPRequest: 23 status_code=0 (successful-ok)
D [08/Jun/2009:10:57:21 +0200] cupsdReadClient: 23 GET /printers/printer.ppd HTTP/1.1
D [08/Jun/2009:10:57:21 +0200] cupsdAuthorize: No authentication data provided.
D [08/Jun/2009:10:57:21 +0200] cupsdCloseClient: 23
D [08/Jun/2009:10:57:21 +0200] cupsdAcceptClient: skipping getpeercon()
D [08/Jun/2009:10:57:21 +0200] cupsdAcceptClient: 23 from localhost (Domain)
D [08/Jun/2009:10:57:21 +0200] cupsdReadClient: 23 POST / HTTP/1.1
D [08/Jun/2009:10:57:21 +0200] cupsdAuthorize: No authentication data provided.
D [08/Jun/2009:10:57:21 +0200] Get-Printer-Attributes ipp://localhost/printers/printer
D [08/Jun/2009:10:57:21 +0200] cupsdProcessIPPRequest: 23 status_code=0 (successful-ok)
D [08/Jun/2009:10:57:21 +0200] cupsdReadClient: 23 GET /printers/printer.ppd HTTP/1.1
D [08/Jun/2009:10:57:21 +0200] cupsdAuthorize: No authentication data provided.
D [08/Jun/2009:10:57:21 +0200] cupsdCloseClient: 23
D [08/Jun/2009:10:57:21 +0200] cupsdAcceptClient: skipping getpeercon()
D [08/Jun/2009:10:57:21 +0200] cupsdAcceptClient: 23 from localhost (Domain)
D [08/Jun/2009:10:57:21 +0200] cupsdReadClient: 23 POST / HTTP/1.1
D [08/Jun/2009:10:57:21 +0200] cupsdAuthorize: No authentication data provided.
D [08/Jun/2009:10:57:21 +0200] Get-Printer-Attributes ipp://localhost/printers/printer
D [08/Jun/2009:10:57:21 +0200] cupsdProcessIPPRequest: 23 status_code=0 (successful-ok)
D [08/Jun/2009:10:57:21 +0200] cupsdReadClient: 23 GET /printers/printer.ppd HTTP/1.1
D [08/Jun/2009:10:57:21 +0200] cupsdAuthorize: No authentication data provided.
D [08/Jun/2009:10:57:21 +0200] cupsdCloseClient: 23
D [08/Jun/2009:10:57:21 +0200] cupsdAcceptClient: skipping getpeercon()
D [08/Jun/2009:10:57:21 +0200] cupsdAcceptClient: 23 from localhost (Domain)
D [08/Jun/2009:10:57:21 +0200] cupsdReadClient: 23 POST / HTTP/1.1
D [08/Jun/2009:10:57:21 +0200] cupsdAuthorize: No authentication data provided.
D [08/Jun/2009:10:57:21 +0200] Get-Printer-Attributes ipp://localhost/printers/printer
D [08/Jun/2009:10:57:21 +0200] cupsdProcessIPPRequest: 23 status_code=0 (successful-ok)
D [08/Jun/2009:10:57:21 +0200] cupsdReadClient: 23 GET /printers/printer.ppd HTTP/1.1
D [08/Jun/2009:10:57:21 +0200] cupsdAuthorize: No authentication data provided.
D [08/Jun/2009:10:57:21 +0200] cupsdCloseClient: 23
D [08/Jun/2009:10:57:21 +0200] cupsdAcceptClient: skipping getpeercon()
D [08/Jun/2009:10:57:21 +0200] cupsdAcceptClient: 23 from localhost (Domain)
D [08/Jun/2009:10:57:21 +0200] cupsdReadClient: 23 POST / HTTP/1.1
D [08/Jun/2009:10:57:21 +0200] cupsdAuthorize: No authentication data provided.
rein
Level 2
Level 2
Posts: 18
Joined: Mon Mar 23, 2009 11:05 am

Re: I offer to donate $50 to wine...

Post by rein »

rja wrote:Hello all,

I offer to donate $50 to wine if somebody can give me the golden tip to get printing going from astro. I have astro (astrology software) running under wine 1.1.22 and it works fine, except for printing -which I really need-. Printing under wine works fine with other apps. I can select the printer (WINEPS using CUPS) without problems, but if I click print, nothing happens. There is also no output in my terminal window indicating an error.

Rembert
From another message I understand that you build wine now yourself successfully. So you can try the following terrible hack:

Code: Select all

index 9e86706..9621d3a 100644
--- a/dlls/comdlg32/printdlg16.c
+++ b/dlls/comdlg32/printdlg16.c
@@ -487,6 +487,7 @@ BOOL16 WINAPI PrintDlg16(
                        GlobalUnlock16(lppd->hDevNames);
                }
            }
+            strcpy( di->pDriverPath, "wineps16");
            PRINTDLG_CreateDevNames16(&(lppd->hDevNames),
                    di->pDriverPath,
                    pi->pPrinterName,
I don't know how a patch will survive the formatting of this forum. But since it is single line patch you should should be able to manually patch the file.

Rebuild and see if it works as it works here.
rja
Level 2
Level 2
Posts: 20
Joined: Fri May 29, 2009 4:19 pm

Post by rja »

that's great Rein, but you overestimate me. I have put your code in a file and got:

[rembert@fdbk wine-1.1.22]$ patch -p1 < astroprintwine.patch
patching file dlls/comdlg32/printdlg16.c
Hunk #1 FAILED at 487.
1 out of 1 hunk FAILED -- saving rejects to file dlls/comdlg32/printdlg16.c.rej

How to do this manually I have no clue...

Rembert
austin987
Wine Developer
Wine Developer
Posts: 2383
Joined: Fri Feb 22, 2008 8:19 pm

I offer to donate $50 to wine...

Post by austin987 »

On Mon, Jun 8, 2009 at 2:34 PM, rja<[email protected]> wrote:
that's great Rein, but you overestimate me. I have put your code in a file and got:

[rembert@fdbk wine-1.1.22]$ patch -p1 < astroprintwine.patch
patching file dlls/comdlg32/printdlg16.c
Hunk #1 FAILED at 487.
1 out of 1 hunk FAILED -- saving rejects to file dlls/comdlg32/printdlg16.c.rej

How to do this manually I have no clue...
Open dlls/comdlg32/printdlg16.c in a text editor and add that line in.

--
-Austin
rja
Level 2
Level 2
Posts: 20
Joined: Fri May 29, 2009 4:19 pm

Post by rja »

ok, so now printdlg16.c looks like

if (lppd->hDevNames != 0) {
WORD locks;
if((locks = (GlobalFlags16(lppd->hDevNames)&GMEM_LOCKCOUNT))) {
WARN("hDevNames has %d locks on it. Unlocking it now\n", locks);
while(locks--)
GlobalUnlock16(lppd->hDevNames);
}
}
strcpy( di->pDriverPath, "wineps16");
PRINTDLG_CreateDevNames16(&(lppd->hDevNames),
di->pDriverPath,
pi->pPrinterName,
pi->pPortName

Right?
austin987
Wine Developer
Wine Developer
Posts: 2383
Joined: Fri Feb 22, 2008 8:19 pm

I offer to donate $50 to wine...

Post by austin987 »

On Mon, Jun 8, 2009 at 3:13 PM, rja<[email protected]> wrote:
ok, so now printdlg16.c looks like

if (lppd->hDevNames != 0) {
               WORD locks;
               if((locks = (GlobalFlags16(lppd->hDevNames)&GMEM_LOCKCOUNT))) {
                   WARN("hDevNames has %d locks on it. Unlocking it now\n", locks);
                   while(locks--)
                       GlobalUnlock16(lppd->hDevNames);
               }
           }
               strcpy( di->pDriverPath, "wineps16");
           PRINTDLG_CreateDevNames16(&(lppd->hDevNames),
                   di->pDriverPath,
                   pi->pPrinterName,
                   pi->pPortName

Right?





Yes.

--
-Austin
rja
Level 2
Level 2
Posts: 20
Joined: Fri May 29, 2009 4:19 pm

Post by rja »

WINE JUST EARNED $50!!!!!!!!!!!!!!!!!!!!!!

It works...How did you do it Rein, what is there to understand?

R:)mbert
rja
Level 2
Level 2
Posts: 20
Joined: Fri May 29, 2009 4:19 pm

Post by rja »

just a minor thing...

I could not print consecutively (without restarting the program) In the wine registry I changed the printer port to lpt1 and now I can print multiple jobs without restarting astro. It just needs a longer time to spool.

jeee, now I wished I could understand why this works...

I just paypalled my $50 as promised. keep up the good work guys...
rein
Level 2
Level 2
Posts: 18
Joined: Mon Mar 23, 2009 11:05 am

Post by rein »

rja wrote:just a minor thing...

jeee, now I wished I could understand why this works...

I just paypalled my $50 as promised. keep up the good work guys...
Please understand why I called this change a "hack". It is not the correct way to do it and this change is not becoming part of the official Wine. It is a quick solution to get you going, perhaps finding more interesting problems and give me some time to study this thing.
Until I (or another dev) fixes the real underlying problems you will need to apply this patch every time that you upgrade wine.

I'll let you know when any progress is made.
rja
Level 2
Level 2
Posts: 20
Joined: Fri May 29, 2009 4:19 pm

Post by rja »

thanks anyway, I'll try to be more interesting the next time :oops:
rein
Level 2
Level 2
Posts: 18
Joined: Mon Mar 23, 2009 11:05 am

Post by rein »

rja wrote:thanks anyway, I'll try to be more interesting the next time :oops:
I expressed myself poorly. This problem was/is interesting:
16 bits programs are getting rare these days.
Perhaps with the help of the patch you can find more of them.
Locked