Re: Build and override a simple winelib DLL
Hi, It works, thank you ! Sorry, it was a silly mistake... I added __declspec(dllexport) in mylib_main.c and it was done ! I really appreciate your help, I spent an awful amount of time on it. Best, On Sat, Apr 6, 2013 at 5:42 AM, Charles Davis cdavi...@gmail.com wrote: On Apr 5, 2013, at 10:34 AM, Maxime Sednaoui wrote: Hi, First, I already asked for the same thing at the forum where I've been told to post here for my question Link here : http://forum.winehq.org/viewtopic.php?f=8t=18675 I have a Windows executable that load a really simple DLL (it is a test) and I want to create a Winelib DLL that will override the Windows DLL. Basically, I created mylib_main.c and mylib.spec to build the Winelib DLL with the command: winegcc -mwindows -o mylib.dll.so mylib_main.c -I${WINE_ROOT}/include -shared mylib.spec winebuild -w --def -o libmylib.def --export mylib.spec Now I have mylib.dll.so and I want to override mylib.dll What should I do ? I removed the Windows library but then I got a Page Fault when the function is called. I also tried to configure the override with winecfg or set environment variables like WINEDLLPATH or add a DllMain in my library. I don't understand how to proceed. Is this because of the way I build my library ? Or maybe I forget a step to link it properly ? Actually, it's much simpler than that. Your Winelib DLL doesn't export a function called myfunc(), but the native DLL does. (Try running: $ winedump -jexport mylib.dll to see what I mean.) Your test app LoadLibrary()'s mylib.dll, then GetProcAddress()'s myfunc() from it. (I know this because it doesn't directly call myfunc(). Run: $ winedump -jimport myapp.exe to verify this.) When it does this with your Winelib DLL, GetProcAddress() returns NULL and your program crashes--probably because it doesn't check for NULL before calling the function. (Of course, the whole point of GetProcAddress() is to be able to check if a function exists in a DLL before calling it. If you don't check for NULL, then why bother with it in the first place? But I digress.) Chip
Re: Fresh WineWiki Theme, Straight from the Farm
Hi Kyle, Thanks for the update, and sorry for the late reply! I've actually deployed your theme to production already: http://wiki.winehq.org My only change was this: diff --git a/winewiki.conf b/winewiki.conf index 4e79248..e3da9cc 100644 --- a/winewiki.conf +++ b/winewiki.conf @@ -8,7 +8,8 @@ #RewriteLog /var/log/httpd/rewrite.log # map some static files to their respective locations RewriteRule ^/favicon.ico$ /var/www/wine/wiki/favicon.ico [last] -RewriteRule ^/logo.png$ /var/www/wine/wiki/logo.png [last] +RewriteRule ^/logo_glass.png$ /var/www/wine/wiki/logo_glass.png [last] +RewriteRule ^/logo_text.png$ /var/www/wine/wiki/logo_text.png [last] # map /wiki static files to Moin htdocs RewriteRule ^/wiki/(.*)$ /usr/share/moin/htdocs/$1 [last] # map everything else to server script Dimi. On Sat, Mar 30, 2013 at 5:08 PM, Kyle Auble randomidma...@yahoo.com wrote: So as usual, my estimate of how long it would take was way off, but I'm finally done adapting the WineHQ theme to Moinmoin. It's not perfect, but I feel it's ready to submit for switching over. I've tested it in Firefox, Chromium, Midori, and Opera (briefly in IE8 IE9 too). I did do everything through Moinmoin's stand-alone server, but while I know there always seem to be ghosts in the machine, I'm guessing that Apache shouldn't interfere with layout issues. I mostly followed the WineHQ current WineWiki theme for large things, just tweaking the CSS to make it fit what Moinmoin spits out. I did make more design choices of my own on the smaller stuff though. After wrestling with Moinmoin's theme system, I was surprised how many things are still hard-coded (at least as of v1.5). For example, Moinmoin wraps some things in divs without providing a CSS class for the div, just the child element. The fortune cookie on the RecentChanges page the edit page are two cases of that. The dummy content in the search bar is another tricky one. It's set in the javascript for the search bar (don't remember where it was in the source tree) so I left that one alone. One other tricky issue was handling overflows RTL support. They both seem to work ok in isolation, but go crazy when you mix them. I haven't checked RTL in IE, but if you force an RTL page to overflow in Webkit, it positions things based on what's actually in the window (so the sidebar winds up floating in the middle of the page). Firefox simply doesn't try to apply any of the overflow rules in RTL (which I guess is nice in a Hippocratic sense). Opera alone handled things exactly like I hoped. As for the tables, I think they should display ok now, although I don't know if everyone wants my exact values for paddings such. The old theme had some table-based layout that may have had conflicting CSS rules, but I've div-vied everything up so the only table tags now should be when Moinmoin itself chooses them over a div and well... tables. I've pushed all of the changes to my Bitbucket repo at: https://bitbucket.org/kauble/wine-wiki-migration The refined branch is the one you want although I expect that once the code is hosted at WineHQ's git repo, it would become the new master branch. At that point, I can just reset my repo to point to the WineHQ one as the origin. - Kyle -- Dimi Paun d...@lattica.com Lattica, Inc.
Re: 64bit winelib test app fails on AMD CPU, but works on Intel - need help to identify possible problem, please :)
Hey Marcus, Can you add a printf(plugin %p\n, plugin); after above line? I would suspect things like: - checks for processor features and returns 0x if not found. I added this line to the sources / compiled and tested - here is output: http://pastebin.com/QMtWttRZ I'n not sure what to make of it. I've been trying to nail down what the problem might be on my system (to no avail). It's really strange... I've tried different kernels, different versions of wine, using a binary version of the test app (not compiled on my machine). but nothing seems to work. Jordan
Re: Fresh WineWiki Theme, Straight from the Farm
On Sat, Apr 6, 2013 at 5:14 PM, Dimi Paun wrote: I've actually deployed your theme to production already: http://wiki.winehq.org My only change was this: diff --git a/winewiki.conf b/winewiki.conf index 4e79248..e3da9cc 100644 --- a/winewiki.conf +++ b/winewiki.conf @@ -8,7 +8,8 @@ #RewriteLog /var/log/httpd/rewrite.log # map some static files to their respective locations RewriteRule ^/favicon.ico$ /var/www/wine/wiki/favicon.ico [last] - RewriteRule ^/logo.png$ /var/www/wine/wiki/logo.png [last] + RewriteRule ^/logo_glass.png$ /var/www/wine/wiki/logo_glass.png [last] + RewriteRule ^/logo_text.png$ /var/www/wine/wiki/logo_text.png [last] # map /wiki static files to Moin htdocs RewriteRule ^/wiki/(.*)$ /usr/share/moin/htdocs/$1 [last] # map everything else to server script Oh, cool! Don't worry about taking time to reply, I know when people are busy it's good to follow up just now and then. I'm looking at it right now on some of the computers in my apartment's business office it does seem to be causing IE 8 9 some problems. One of them has Firefox 3 though (they go a while without updates), and even for that old version, there are only a few issues I can see. I'll get my laptop out in a little bit to check it on newer versions of the major browsers, and over the next few days, I'll try to iron out any IE issues and last wrinkles. After that, I guess the next order of business will be to see about moving the repo onto WineHQ. - Kyle