protonscr

Document ability to use mingw-w64-tools

vkd3dopen
HansKristian-Work/vkd3d-proton#315 · opened 2020-10-25 by shmerl · updated 2020-10-25 · 10 comments · github
Sshmerl 2020-10-25 github

On Debian, there is an option to install mingw-w64-tools instead of wine64-tools to get widl for building. It provides:

/usr/bin/i686-w64-mingw32-widl
/usr/bin/x86_64-w64-mingw32-widl

https://tracker.debian.org/pkg/mingw-w64

Mmisyltoad maintainer 2020-10-25 github

I don't get it?

When building standalone it uses MinGW widl anyway.
(ie. https://github.com/HansKristian-Work/vkd3d-proton/blob/master/build-win64.txt#L6)

Sshmerl 2020-10-25 github

Yeah, it picks it up. But I mean in the readme, you can mention that widl can be obtained from something besides Wine (it says there you need Wine).

mingw-w64-tools is a lot smaller than wine64-tools.

Mmisyltoad maintainer 2020-10-25 github

It does state that:
wine (for widl) [for native builds]

You only need it for native (ie. .so and not .dll) builds which you shouldn't be using.

Sshmerl 2020-10-25 github

Hm, I tried to build the dll and it complained that widl wasn't found and failed. Let me try again without widl.

Sshmerl 2020-10-25 github

Yep:

meson --cross-file build-win64.txt -Denable_standalone_d3d12=True --buildtype release --prefix $HOME/mnt/vmshare/vkd3d-64 build.64
The Meson build system
Version: 0.55.3
Source dir: /home/user/build/vkd3d-proton
Build dir: /home/user/build/vkd3d-proton/build.64
Build type: cross build
Project name: vkd3d
Project version: 1.1
C compiler for the build machine: cc (gcc 10.2.0 "cc (Debian 10.2.0-15) 10.2.0")
C linker for the build machine: cc ld.bfd 2.35.1
C compiler for the host machine: x86_64-w64-mingw32-gcc (gcc 10.0.0 "x86_64-w64-mingw32-gcc (GCC) 10-posix 20200525")
C linker for the host machine: x86_64-w64-mingw32-gcc ld.bfd 2.35
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: x86_64
Host machine cpu: x86_64
Target machine cpu family: x86_64
Target machine cpu: x86_64
Program widl found: NO

meson.build:50:0: ERROR: Program 'widl' not found
Sshmerl 2020-10-25 github

Oh. You mean widl is always needed, but for .dll it uses mingw widl, and for .so it needs wine widl?

Mmisyltoad maintainer 2020-10-25 github

It should do ye, unless something is broken

Sshmerl 2020-10-25 github

Then you can mention that widl is needed from mingw tools in case of dll, just to be clear. Because apparently on Debian it requires an extra package.

Jjp7677 2020-10-25 github

May be it is a bit implicit, but the readme already says so:
Mingw-w64 compiler, headers and tools (at least version 7.0) [for cross-builds for d3d12.dll which are default]

Sshmerl 2020-10-25 github

I guess, but since widl already is featured for .so explicitly, it would make it a bit more clear to mention it for .dll build too.

At least I had no idea it was needed until the build failure :)

DLLs