Skip to content

Commit

Permalink
build: Ship d9vk from dxvk
Browse files Browse the repository at this point in the history
  • Loading branch information
aeikum committed Dec 18, 2019
1 parent 7d07e03 commit 9e542fa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 60 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
[submodule "FAudio"]
path = FAudio
url = https://github.com/FNA-XNA/FAudio/
[submodule "d9vk"]
path = d9vk
url = https://github.com/ValveSoftware/dxvk/
[submodule "vkd3d"]
path = vkd3d
url = https://github.com/ValveSoftware/vkd3d/
Expand Down
59 changes: 3 additions & 56 deletions build/makefile_base.mak
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,6 @@ DXVK := $(SRCDIR)/dxvk
DXVK_OBJ32 := ./obj-dxvk32
DXVK_OBJ64 := ./obj-dxvk64

D9VK := $(SRCDIR)/d9vk
D9VK_OBJ32 := ./obj-d9vk32
D9VK_OBJ64 := ./obj-d9vk64

VULKAN_HEADERS := $(SRCDIR)/Vulkan-Headers
VULKAN_H_OBJ32 := ./obj-vulkan-headers32
VULKAN_H_OBJ64 := ./obj-vulkan-headers64
Expand Down Expand Up @@ -286,7 +282,6 @@ OBJ_DIRS := $(TOOLS_DIR32) $(TOOLS_DIR64) \
$(WINE_OBJ32) $(WINE_OBJ64) \
$(VRCLIENT_OBJ32) $(VRCLIENT_OBJ64) \
$(DXVK_OBJ32) $(DXVK_OBJ64) \
$(D9VK_OBJ32) $(D9VK_OBJ64) \
$(BISON_OBJ32) $(BISON_OBJ64) \
$(VULKAN_H_OBJ32) $(VULKAN_H_OBJ64) \
$(SPIRV_H_OBJ32) $(SPIRV_H_OBJ64) \
Expand Down Expand Up @@ -449,7 +444,7 @@ $(DIST_FONTS): fonts
ALL_TARGETS += dist
GOAL_TARGETS += dist

dist: $(DIST_TARGETS) wine vrclient lsteamclient steam dxvk d9vk | $(DST_DIR)
dist: $(DIST_TARGETS) wine vrclient lsteamclient steam dxvk | $(DST_DIR)
echo `date '+%s'` `GIT_DIR=$(abspath $(SRCDIR)/.git) git describe --tags` > $(DIST_VERSION)
cp $(DIST_VERSION) $(DST_BASE)/
rm -rf $(abspath $(DIST_PREFIX)) && \
Expand Down Expand Up @@ -1192,6 +1187,7 @@ dxvk64: $(DXVK_CONFIGURE_FILES64)
cp "$(DXVK_OBJ64)"/bin/d3d10.dll "$(DST_DIR)"/lib64/wine/dxvk
cp "$(DXVK_OBJ64)"/bin/d3d10_1.dll "$(DST_DIR)"/lib64/wine/dxvk
cp "$(DXVK_OBJ64)"/bin/d3d10core.dll "$(DST_DIR)"/lib64/wine/dxvk
cp "$(DXVK_OBJ64)"/bin/d3d9.dll "$(DST_DIR)"/lib64/wine/dxvk
if test -e $(SRCDIR)/.git; then ( cd $(SRCDIR) && git submodule status -- dxvk ) > "$(DST_DIR)"/lib64/wine/dxvk/version; fi


Expand All @@ -1203,58 +1199,9 @@ dxvk32: $(DXVK_CONFIGURE_FILES32)
cp "$(DXVK_OBJ32)"/bin/d3d10.dll "$(DST_DIR)"/lib/wine/dxvk/
cp "$(DXVK_OBJ32)"/bin/d3d10_1.dll "$(DST_DIR)"/lib/wine/dxvk/
cp "$(DXVK_OBJ32)"/bin/d3d10core.dll "$(DST_DIR)"/lib/wine/dxvk/
cp "$(DXVK_OBJ32)"/bin/d3d9.dll "$(DST_DIR)"/lib/wine/dxvk/
if test -e $(SRCDIR)/.git; then ( cd $(SRCDIR) && git submodule status -- dxvk ) > "$(DST_DIR)"/lib/wine/dxvk/version; fi

D9VK_CONFIGURE_FILES32 := $(D9VK_OBJ32)/build.ninja
D9VK_CONFIGURE_FILES64 := $(D9VK_OBJ64)/build.ninja

# 64bit-configure. Remove coredata file if already configured (due to e.g. makefile changing)
$(D9VK_CONFIGURE_FILES64): $(MAKEFILE_DEP) $(D9VK)/build-win64.txt | $(D9VK_OBJ64)
if [ -e "$(abspath $(D9VK_OBJ64))"/build.ninja ]; then \
rm -f "$(abspath $(D9VK_OBJ64))"/meson-private/coredata.dat; \
fi
cd "$(abspath $(D9VK))" && \
PATH="$(abspath $(SRCDIR))/glslang/bin/:$(PATH)" \
meson --prefix="$(abspath $(D9VK_OBJ64))" --cross-file "$(abspath $(D9VK))/build-win64.txt" $(MESON_STRIP_ARG) --buildtype=release -Denable_dxgi=false -Denable_d3d10=false -Denable_d3d11=false "$(abspath $(D9VK_OBJ64))"

# 32-bit configure. Remove coredata file if already configured (due to e.g. makefile changing)
$(D9VK_CONFIGURE_FILES32): $(MAKEFILE_DEP) $(D9VK)/build-win32.txt | $(D9VK_OBJ32)
if [ -e "$(abspath $(D9VK_OBJ32))"/build.ninja ]; then \
rm -f "$(abspath $(D9VK_OBJ32))"/meson-private/coredata.dat; \
fi
cd "$(abspath $(D9VK))" && \
PATH="$(abspath $(SRCDIR))/glslang/bin/:$(PATH)" \
meson --prefix="$(abspath $(D9VK_OBJ32))" --cross-file "$(abspath $(D9VK))/build-win32.txt" $(MESON_STRIP_ARG) --buildtype=release -Denable_dxgi=false -Denable_d3d10=false -Denable_d3d11=false "$(abspath $(D9VK_OBJ32))"

## d9vk goals
D9VK_TARGETS = d9vk d9vk_configure d9vk32 d9vk64 d9vk_configure32 d9vk_configure64

ALL_TARGETS += $(D9VK_TARGETS)
GOAL_TARGETS_LIBS += d9vk

.PHONY: $(D9VK_TARGETS)

d9vk_configure: $(D9VK_CONFIGURE_FILES32) $(D9VK_CONFIGURE_FILES64)

d9vk_configure64: $(D9VK_CONFIGURE_FILES64)

d9vk_configure32: $(D9VK_CONFIGURE_FILES32)

d9vk: d9vk32 d9vk64

d9vk64: $(D9VK_CONFIGURE_FILES64)
env PATH="$(abspath $(SRCDIR))/glslang/bin/:$(PATH)" ninja -C "$(D9VK_OBJ64)" install
mkdir -p "$(DST_DIR)/lib64/wine/dxvk"
cp "$(D9VK_OBJ64)"/bin/d3d9.dll "$(DST_DIR)"/lib64/wine/dxvk
if test -e $(SRCDIR)/.git; then ( cd $(SRCDIR) && git submodule status -- d9vk ) > "$(DST_DIR)"/lib64/wine/dxvk/d9vk_version; fi


d9vk32: $(D9VK_CONFIGURE_FILES32)
env PATH="$(abspath $(SRCDIR))/glslang/bin/:$(PATH)" ninja -C "$(D9VK_OBJ32)" install
mkdir -p "$(DST_DIR)"/lib/wine/dxvk
cp "$(D9VK_OBJ32)"/bin/d3d9.dll "$(DST_DIR)"/lib/wine/dxvk/
if test -e $(SRCDIR)/.git; then ( cd $(SRCDIR) && git submodule status -- d9vk ) > "$(DST_DIR)"/lib/wine/dxvk/d9vk_version; fi

endif # NO_DXVK

# Vulkan-Headers
Expand Down
1 change: 0 additions & 1 deletion d9vk
Submodule d9vk deleted from 7126fd

0 comments on commit 9e542fa

Please sign in to comment.