forked from PhoenicisOrg/scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
35 lines (29 loc) · 917 Bytes
/
script.js
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
const Wine = include("engines.wine.engine.object");
include("engines.wine.plugins.regedit");
var OverrideDLL = function () {
var that = this;
that._regeditFileContent =
"REGEDIT4\n" +
"\n" +
"[HKEY_CURRENT_USER\\Software\\Wine\\DllOverrides]\n";
that.wine = function (wine) {
that._wine = wine;
return that;
};
that.set = function (mode, libraries) {
libraries.forEach(function (library) {
// make sure library does not end with ".dll"
library = library.replace(".dll", "");
that._regeditFileContent += "\"*" + library + "\"=\"" + mode + "\"\n";
});
return that;
};
that.do = function () {
that._wine.regedit().patch(that._regeditFileContent);
return that._wine;
}
};
Wine.prototype.overrideDLL = function () {
return new OverrideDLL()
.wine(this)
};