-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild_wined3d.sh
41 lines (33 loc) · 1.15 KB
/
build_wined3d.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
cd wine
echo "=== Building winetools ==="
mkdir -p winetools-build
cd winetools-build
../configure --enable-win64 --without-freetype || exit 1
make __tooldeps__ -j8 || exit 1
cd ..
echo "=== Building wined3d ==="
mkdir -p build-wined3d
cd build-wined3d
../configure \
--enable-win64 \
--without-freetype \
CFLAGS="-O2 -DWINE_NOWINSOCK -DUSE_WIN32_OPENGL -DUSE_WIN32_VULKAN" \
--with-wine-tools=../winetools-build \
VKD3D_CFLAGS="-I/mingw64/include/vkd3d" \
VKD3D_LIBS="-lvkd3d" || exit 1
# !!! Super hacky, soname resolve seems to be broken, so manually patch include/config.h ... !!!
echo '#undef SONAME_LIBVKD3D' >> include/config.h
echo '#undef SONAME_LIBVULKAN' >> include/config.h
echo '#define SONAME_LIBVKD3D "libvkd3d-1.dll"' >> include/config.h
echo '#define SONAME_LIBVULKAN "libvulkan-1.dll"' >> include/config.h
make libs/port -j8 || exit 1
make dlls/wined3d -j8 || exit 1
make dlls/dxgi -j8 || exit 1
make dlls/d3d12 -j8 || exit
cd ../..
echo "=== Copying DLLs ==="
mkdir -p bin
cp wine/build-wined3d/dlls/wined3d/wined3d.dll bin/
cp wine/build-wined3d/dlls/dxgi/dxgi.dll bin/
cp wine/build-wined3d/dlls/d3d12/d3d12.dll bin/