Hi Tom,

On 10/10/17 8:23 PM, Tom Ritter wrote:
Hi all,

I work at Mozilla, and have been the person working there actively
getting Mozilla building with mingw (again); and I recently got it
into our build servers. Mostly I relied on Jacek to write patches I
needed in mingw (as well as help me with the hardest parts of the
build, since he maintained it for so long) - but I think I need to
learn a bit more about mingw so I can start writing patches for it
myself. I'm also idling in #mingw-w64 in OFTC under the handle 'tjr' -
I asked there but was advised to send to the mailing list.

Right now the problem I am grappling with is that I need new d3d11
headers. I understand MinGW gets them from Wine, and they included
them in 2.18 so I had intended to copy them in.

 From what I can see, Wine only has .idl files, so I need to copy the
idl files and then generate a .h with widl. So I figured I'd make sure
I can generate from a clean clone with no local modifications.

Importing from Wine is scripted, but the script for that is not public for quite a while. We used to have it in experimental branch of SVN, but it didn't survive move to Git. I maintain a local copy of it, but I failed to do the right thing and upstream again. I'm attaching it now for anyone interested.

How about we commit the script to the tree? Is mingw-w64-headers directory the right place? Should more of below be part of the script?

I have widl from mingw-w64-tools installed globally, configured with --prefix=/usr/local --target=i686-w64-mingw32. Here is how I use it:

$ cd mingw-w64-headers
$ find . -name \*.h -exec touch {} \;       # a hack to not compile untouched IDLs later
$ ~/path/to/wine-import.sh ~/path/to/wine-git/
$ ./configure --with-widl --host=i686-w64-mingw32
$ make

Then fix things (if needed), review and test changes.

While I was at this, I did update to recent Wine (it also required changes to the script and Makefile.am). I will push it once my test build finishes. There are also a few new IDLs in Wine worth importing. AFAIR they were for Angle.


./configure --with-widl did not find
/usr/local/bin/i686-w64-mingw32-widl because the prefix was wrong (and
not 'x86_64...'); but symlinking /usr/local/bin/i686-w64-mingw32-widl
to /usr/local/bin/widl worked right up to:

/usr/local/bin/widl -DBOOL=WINBOOL -I./include -I./direct-x/include
-Icrt -I./crt -h -o include/windows.storage.h
include/windows.storage.idl
include/windows.foundation.idl:14: error: syntax error, unexpected
aIDENTIFIER, expecting tTYPEDEF

I'm mostly flailing around in the dark, so if anyone can tell me if my
assumptions about what I should be doing are wrong (or right) or what
my widl problem may be that'd be awesome.

Sadly, --with-widl configuration is pretty broken for a while now. It doesn't work for some IDLs and tries to compile others that it shouldn't. That's why I'm careful about what files are when touched (as above) or just use it for single DLLs that I need, like:

$ make direct-x/include/d3d11.h


Thanks,
Jacek

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to