Skip to content

Commit

Permalink
Update DXVK: auto install dlls (#874)
Browse files Browse the repository at this point in the history
  • Loading branch information
ImperatorS79 committed Mar 2, 2019
1 parent 6c9bb85 commit 1ee07fe
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions Engines/Wine/Verbs/DXVK/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,26 +43,32 @@ Wine.prototype.DXVK = function (dxvkVersion) {
.to(this.prefixDirectory() + "/TMP/")
.extract();

var forEach = Array.prototype.forEach;
var sys32dir = this.system32directory();
var dxvkTmpDir = this.prefixDirectory() + "/TMP/dxvk-" + dxvkVersion;
var self = this;

cp(dxvkTmpDir + "/x32/d3d11.dll", this.system32directory());
cp(dxvkTmpDir + "/x32/dxgi.dll", this.system32directory());
cp(dxvkTmpDir + "/x32/d3d10core.dll", this.system32directory());
cp(dxvkTmpDir + "/x32/d3d10.dll", this.system32directory());
cp(dxvkTmpDir + "/x32/d3d10_1.dll", this.system32directory());
//Copy 32 bits dll to system* and apply override
forEach.call(ls(dxvkTmpDir + "/x32"), function (file) {
if (file.endsWith(".dll")) {
cp(dxvkTmpDir + "/x32/" + file, sys32dir);
self.overrideDLL()
.set("native", [file])
.do();
}
});

if (this.architecture() == "amd64") {
cp(dxvkTmpDir + "/x64/d3d11.dll", this.system64directory());
cp(dxvkTmpDir + "/x64/dxgi.dll", this.system64directory());
cp(dxvkTmpDir + "/x64/d3d10core.dll", this.system64directory());
cp(dxvkTmpDir + "/x64/d3d10.dll", this.system64directory());
cp(dxvkTmpDir + "/x64/d3d10_1.dll", this.system64directory());
if (this.architecture() == "amd64")
{
var sys64dir = this.system64directory();
//Copy 64 bits dll to system*
forEach.call(ls(dxvkTmpDir + "/x64"), function (file) {
if (file.endsWith(".dll")) {
cp(dxvkTmpDir + "/x64/" + file, sys64dir);
}
});
}

this.overrideDLL()
.set("native", ["d3d11", "dxgi", "d3d10", "d3d10_1", "d3d10core"])
.do();

remove(this.prefixDirectory() + "/TMP/");

return this;
Expand Down

0 comments on commit 1ee07fe

Please sign in to comment.