-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathscript.js
More file actions
60 lines (49 loc) · 2.32 KB
/
script.js
File metadata and controls
60 lines (49 loc) · 2.32 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
include(["engines", "wine", "engine", "object"]);
include(["engines", "wine", "plugins", "override_dll"]);
include(["utils", "functions", "net", "resource"]);
include(["utils", "functions", "filesystem", "files"]);
/**
* Setup DXVK-> https://github.com/doitsujin/dxvk/
* @returns {Wine} Wine object
*/
Wine.prototype.DXVK = function () {
print("NOTE: you need a driver that supports Vulkan enough to run DXVK");
print("NOTE: wine version should be greater or equal to 3.5");
var dxvkVersion = "0.81";
var setupFile = new Resource()
.wizard(this.wizard())
.url("https://github.com/doitsujin/dxvk/releases/download/v" + dxvkVersion + "/dxvk-" + dxvkVersion + ".tar.gz")
.checksum("76af765dfeebc6ba7922ad32968babfa92e15fb1")
.name("dxvk-" + dxvkVersion + ".tar.gz")
.get();
new Extractor()
.wizard(this.wizard())
.archive(setupFile)
.to(this.prefixDirectory() + "/TMP/")
.extract();
var dxvkTmpDir = this.prefixDirectory() + "/TMP/dxvk-" + dxvkVersion;
if (this.architecture() == "x86") {
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());
}
if (this.architecture() == "amd64") {
cp(dxvkTmpDir + "/x32/d3d11.dll", this.system64directory());
cp(dxvkTmpDir + "/x32/dxgi.dll", this.system64directory());
cp(dxvkTmpDir + "/x32/d3d10core.dll", this.system64directory());
cp(dxvkTmpDir + "/x32/d3d10.dll", this.system64directory());
cp(dxvkTmpDir + "/x32/d3d10_1.dll", this.system64directory());
cp(dxvkTmpDir + "/x64/d3d11.dll", this.system32directory());
cp(dxvkTmpDir + "/x64/dxgi.dll", this.system32directory());
cp(dxvkTmpDir + "/x64/d3d10core.dll", this.system32directory());
cp(dxvkTmpDir + "/x64/d3d10.dll", this.system32directory());
cp(dxvkTmpDir + "/x64/d3d10_1.dll", this.system32directory());
}
this.overrideDLL()
.set("native", ["d3d11", "dxgi", "d3d10", "d3d10_1", "d3d10core"])
.do();
remove(this.prefixDirectory() + "/TMP/");
return this;
}