In honor of .net 1.1 installing on today's git, here's a version of winetricks that knows how to grab and run the installer. Amusingly, I noticed that there are dozens of scripts out there that do this... it seems to be not uncommon in the windows world.
As always, winetricks is at http://kegel.com/wine/winetricks
and its source repository is at http://winezeug.googlecode.com
BTW if anybody has any other small whiny things that almost but not quite fit in winehq, I'd be happy to consider hosting them in the winezeug repository. - Dan
Thank you for update. I also notice that the version of comctl32 and gdiplus that installed from winetricks are quite old. I have to manually copy those files from my win-xp to make my application work. Could you also consider revise them?
Dan Kegel wrote:
In honor of .net 1.1 installing on today's git, here's a version of winetricks that knows how to grab and
On Tue, Feb 26, 2008 at 5:25 PM, bill lam cbill.lam@gmail.com wrote:
Thank you for update. I also notice that the version of comctl32 and gdiplus that installed from winetricks are quite old. I have to manually copy those files from my win-xp to make my application work. Could you also consider revise them?
Which apps? What version of comctl32 and gdiplus do they require?
According to http://msdn2.microsoft.com/en-us/library/bb776779(VS.85).aspx comctl32 version 6 is nonredistributable, which means it might be a bit of a challenge to find a free download from microsoft.com that offers it. - Dan
Dan Kegel wrote:
On Tue, Feb 26, 2008 at 5:25 PM, bill lam cbill.lam@gmail.com wrote:
Thank you for update. I also notice that the version of comctl32 and gdiplus that installed from winetricks are quite old. I have to manually copy those files from my win-xp to make my application work. Could you also consider revise them?
Which apps? What version of comctl32 and gdiplus do they require?
According to http://msdn2.microsoft.com/en-us/library/bb776779(VS.85).aspx comctl32 version 6 is nonredistributable, which means it might be a bit of a challenge to find a free download from microsoft.com that offers it.
- Dan
Dan:
What version of comctl32 is packaged with VB6SP5 (if I remember this correctly, the files are on my work machine which I cannot access from here)? That package is freely redistributable from what I remember and is available from Microsoft.
James McKenzie
Dan Kegel wrote:
Which apps? What version of comctl32 and gdiplus do they require?
depends.exe show the following info for comctl32
COMCTL32.DLL from win-xp File Ver 5.82.2900.2180 Product Ver 6.0.2900.2180
COMCTL32.DLL from cc580 File Ver 5.80.2614.3600 Product Ver 5.0.2614.3600
The last time that I used the old comctl32, the bmp inside toolbar cannot display, just black holes. I tested again today, it work correctly even with the old comctl32. May be I forgot exactly where it failed or may be I had updated wine from .53 to .55. Anyway I will stick to the old comctl32 and report failure if it happen again.
regards,
Dan Kegel wrote:
Which apps? What version of comctl32 and gdiplus do they require?
I check version of gdiplus from pp viewer 2003 (winetricks) and that from win-xp, they are the same version. I must had use my old version from win-me that caused problem. Sorry for the noise.
In current wine version *.55, the built-in version of comctl32 does work for my app so that I do not need the native comctl32 anymore. Now only odbc and gdiplus need to be overrided.
Thank you to all wine developers.
regards,
On Wed, Feb 27, 2008 at 7:00 AM, bill lam cbill.lam@gmail.com wrote:
In current wine version *.55, the built-in version of comctl32 does work for my app so that I do not need the native comctl32 anymore. Now only odbc and gdiplus need to be overrided.
What app is this, and what is it about Wine's gdiplus that makes you need to override it? Does the app crash, or does it just look bad? If it crashes, what's the crash log?
Dan Kegel wrote:
What app is this, and what is it about Wine's gdiplus that makes you need to override it? Does the app crash, or does it just look bad? If it crashes, what's the crash log?
The app is a package called 'platimg' of J language.
I had reported this and I believed that it is the negative stride that caused the problem.
NB. load and decode a jpeg file into 2D integer matrix with each integer NB. for one pixel element. readimg1 'picture.jpg'
where definition of readimg1 is as follows
readimg1=: 3 : 0 GdiplusStartup (TOK=.,_1);GdiplusStartupInput;0 GdipCreateBitmapFromFile y;BMP=.,_1 z=. bmpARGB {.BMP GdiplusShutdown {.TOK z )
bmpARGB=: 3 : 0 DATA=. i.4%~#BitmapData GdipBitmapLockBits y;0;ImageLockModeRead;PixelFormat32bppARGB;DATA 'w h s f p r'=. DATA z=. (h,w)$memr p,0,(w*h),JINT GdipBitmapUnLockBits y;DATA GdipDisposeImage y z )
Here GdipBitmapLockBits has 2 issues,
1. GdipBitmapLockBits accept a null for rect (the second argument) to stands for the entire region. I can workaround this by calling GdipGetImageWidth and GdipGetImageHeight to construct the rect. However
2. the data returned GdipBitmapLockBits does not point a valid bitmap data, so the when trying memory read in the following z=. (h,w)$memr p,0,(w*h),JINT J gives raise a domain error. (but no crash, so that no crash log)
Scripts of J can be difficult to understand, but since this example calls gdiplus api so that you can follow it without much difficulty and write an equivalent c program to test it.
current version of J can be downloaded here. http://www.jsoftware.com/beta.htm after installation, run package manager that comes with J to install the platimg addon.
regards,
On Wed, Feb 27, 2008 at 8:48 AM, bill lam cbill.lam@gmail.com wrote:
The app is a package called 'platimg' of J language.
I had reported this and I believed that it is the negative stride that caused the problem.
Where did you report it? I can't find a bug report.
Would you like to file a Wine bug, or should I?
NB. load and decode a jpeg file into 2D integer matrix with each integer NB. for one pixel element. readimg1 'picture.jpg'
where definition of readimg1 is as follows
readimg1=: 3 : 0 GdiplusStartup (TOK=.,_1);GdiplusStartupInput;0 GdipCreateBitmapFromFile y;BMP=.,_1 z=. bmpARGB {.BMP GdiplusShutdown {.TOK z )
bmpARGB=: 3 : 0 DATA=. i.4%~#BitmapData GdipBitmapLockBits y;0;ImageLockModeRead;PixelFormat32bppARGB;DATA 'w h s f p r'=. DATA z=. (h,w)$memr p,0,(w*h),JINT GdipBitmapUnLockBits y;DATA GdipDisposeImage y z )
Here GdipBitmapLockBits has 2 issues,
- GdipBitmapLockBits accept a null for rect (the second argument) to stands for
the entire region. I can workaround this by calling GdipGetImageWidth and GdipGetImageHeight to construct the rect. However
- the data returned GdipBitmapLockBits does not point a valid bitmap data, so
the when trying memory read in the following z=. (h,w)$memr p,0,(w*h),JINT J gives raise a domain error. (but no crash, so that no crash log)
Scripts of J can be difficult to understand, but since this example calls gdiplus api so that you can follow it without much difficulty and write an equivalent c program to test it.
current version of J can be downloaded here. http://www.jsoftware.com/beta.htm after installation, run package manager that comes with J to install the platimg addon.
Cool, thanks. I also see it's documented here: http://olegykj.sourceforge.net/scripts/platimg.htm - Dan
Dan Kegel wrote:
Where did you report it? I can't find a bug report.
not formal report, just post to this forum days ago.
Would you like to file a Wine bug, or should I?
Could you please file a Wine bug. It is easier for you to write an equivalent C script to reproduce the bug than I. And I'm not sure if any wine developers will be able to testing using J if I report it in the current format.
regards,
I patched platimg to work with negative stride and now it works with wine built-in gdiplus.
FYI, native gdiplus gives a top-down bitmap but wine's gdiplus gives a bottom-up. It is not a bug in wine's but might causes compatibility problem.
On Thu, Feb 28, 2008 at 10:07 PM, bill lam cbill.lam@gmail.com wrote:
I patched platimg to work with negative stride and now it works with wine built-in gdiplus.
FYI, native gdiplus gives a top-down bitmap but wine's gdiplus gives a bottom-up. It is not a bug in wine's but might causes compatibility problem.
How is it not a bug?
James Hawkins wrote:
On Thu, Feb 28, 2008 at 10:07 PM, bill lam cbill.lam@gmail.com wrote:
I patched platimg to work with negative stride and now it works with wine built-in gdiplus.
FYI, native gdiplus gives a top-down bitmap but wine's gdiplus gives a bottom-up. It is not a bug in wine's but might causes compatibility problem.
How is it not a bug?
If the user beware this possibility and write a more secure code, GdipBitmapLockBits from wine's gdiplus will work.
However this is another bug in wine gdiplus in that value return from GdipGetImageWidth ( and GdipGetImageHeight ?) will often be 1 pixel less than actual value, eg a jpeg of size 800x600 will be reported as 799x600. The larger the picture size, the more often it goes wrong.
regards,
On Fri, Feb 29, 2008 at 1:51 AM, bill lam cbill.lam@gmail.com wrote:
However this is another bug in wine gdiplus in that value return from GdipGetImageWidth ( and GdipGetImageHeight ?) will often be 1 pixel less than actual value, eg a jpeg of size 800x600 will be reported as 799x600. The larger the picture size, the more often it goes wrong.
Can you file a bug on bugzilla and provide a sample image / test code to demonstrate this problem?
Lei Zhang wrote:
Can you file a bug on bugzilla and provide a sample image / test code to demonstrate this problem?
Done.
Test code is as follows, beware of line wrap.
NB. tested on J602 beta / wine 0.9.56 NB. script to demostrate bug in GdipGetImageWidth GdipGetImageHeight NB. ========================================================= require 'dll'
s=. 'Ok GenericError InvalidParameter OutOfMemory ObjectBusy InsufficientBuffer ' s=. s,'NotImplemented Win32Error WrongState Aborted FileNotFound ValueOverflow ' s=. s,'AccessDenied UnknownImageFormat FontFamilyNotFound FontStyleNotFound ' s=. s,'NotTrueTypeFont UnsupportedGdiplusVersion GdiplusNotInitialized ' s=. ;:s,'PropertyNotFound PropertyNotSupported ProfileNotFound'
assi=: {::&s assert 0=]
cdi=: (&cd)(assi@)
PixelFormat32bppARGB=: 16b26200a
GdiplusStartup =: 'gdiplus GdiplusStartup > i *i *i i ' &cd GdiplusShutdown =: 'gdiplus GdiplusShutdown > n i ' &cd
GdipCreateBitmapFromFile =: 'gdiplus GdipCreateBitmapFromFile > i *w *i ' cdi GdipDisposeImage =: 'gdiplus GdipDisposeImage > i i ' cdi
GdipBitmapLockBits =: 'gdiplus GdipBitmapLockBits > i i *i i i *i ' &cd GdipBitmapUnLockBits =: 'gdiplus GdipBitmapUnlockBits > i i *i ' cdi
GdipGetImageWidth =: 'gdiplus GdipGetImageWidth > i i *i ' &cd GdipGetImageHeight =: 'gdiplus GdipGetImageHeight > i i *i ' &cd
ImageLockModeRead=: 1 GUID=: 'WWWWXXYYZZZZZZZZ' BitmapData=: 'WdthHghtStrdFrmtScanRsrv' GdiplusStartupInput=: 1 0 0 0
readimg1=: 3 : 0 DATA=. i.4%~#BitmapData assi GdiplusStartup (TOK=. ,_1);GdiplusStartupInput;0 assi GdipCreateBitmapFromFile y;(BMP=. ,_1) assi GdipGetImageWidth ({.BMP);(Width=. ,_1) assi GdipGetImageHeight ({.BMP);(Height=. ,_1) 1!:2&2 'GdipGetImageWidth GdipGetImageHeight ', ": Width,Height rt=. 0 0, Width, Height assi GdipBitmapLockBits ({.BMP);rt;ImageLockModeRead;PixelFormat32bppARGB;DATA 'w h s f p r'=. DATA 1!:2&2 'width height stride format scan0 res ', ":DATA z=. |.^:(s<0) w&{."1^:(w~:|s%4) (h,|s%4)$memr p,((s<0)*s*<:h),(h*<.|s%4),JINT GdipBitmapUnLockBits ({.BMP);DATA GdipDisposeImage {.BMP GdiplusShutdown {.TOK '' ) NB. =========================================================
NB. run the script readimg1 'z:/tmp/2083.jpg'
bill lam wrote:
If the user beware this possibility and write a more secure code, GdipBitmapLockBits from wine's gdiplus will work.
However this is another bug in wine gdiplus in that value return from GdipGetImageWidth ( and GdipGetImageHeight ?) will often be 1 pixel less than actual value, eg a jpeg of size 800x600 will be reported as 799x600. The larger the picture size, the more often it goes wrong.
This is a bug and should be reported. If this happens for any jpeg file then an attached file is unnecessary, but if you provide one that is 'more better' and will help.
James McKenzie