Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
06ad52f
Merge pull request #1 from PhoenicisOrg/master
ImperatorS79 Aug 28, 2017
86fd07c
Update script.js
ImperatorS79 Aug 28, 2017
a6f232b
Merge pull request #2 from PhoenicisOrg/master
ImperatorS79 Aug 28, 2017
a80aa84
Merge pull request #3 from PhoenicisOrg/master
ImperatorS79 Sep 26, 2017
6da4a59
Merge pull request #4 from PhoenicisOrg/master
ImperatorS79 Mar 19, 2018
4a11f65
Merge pull request #8 from PhoenicisOrg/master
ImperatorS79 Apr 9, 2018
b2d5724
Merge pull request #9 from PhoenicisOrg/master
ImperatorS79 May 7, 2018
b7d1f0f
Merge pull request #10 from PhoenicisOrg/master
ImperatorS79 May 13, 2018
533df6e
Merge pull request #11 from PhoenicisOrg/master
ImperatorS79 May 22, 2018
186e4ed
Merge pull request #12 from PhoenicisOrg/master
ImperatorS79 May 29, 2018
99cf1db
Merge pull request #13 from PhoenicisOrg/master
ImperatorS79 Jun 13, 2018
87999b4
Merge pull request #15 from PhoenicisOrg/master
ImperatorS79 Oct 10, 2018
610b258
Merge pull request #16 from PhoenicisOrg/master
ImperatorS79 Oct 12, 2018
ad2ea01
Merge pull request #17 from PhoenicisOrg/master
ImperatorS79 Jan 12, 2019
10d49cf
Add files via upload
ImperatorS79 Jan 12, 2019
cd2985b
Update script.js
ImperatorS79 Jan 12, 2019
a3b6239
Add files via upload
ImperatorS79 Jan 13, 2019
6a28e76
Update script.js
ImperatorS79 Jan 20, 2019
10a8bb5
Fix oopsie
ImperatorS79 Jan 20, 2019
debf4a1
Update script.js
ImperatorS79 Jan 20, 2019
b50fcc8
Update script.js
ImperatorS79 Jan 20, 2019
d669885
Update script.js
ImperatorS79 Jan 20, 2019
6980d46
Update script.js
ImperatorS79 Jan 20, 2019
e8dbc95
Update script.js
ImperatorS79 Jan 23, 2019
8c28987
Update script.js
ImperatorS79 Jan 23, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions Engines/Wine/Verbs/FAudio/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
include(["engines", "wine", "engine", "object"]);
include(["engines", "wine", "plugins", "override_dll"]);
include(["utils", "functions", "net", "resource"]);
include(["utils", "functions", "filesystem", "files"]);

/**
* Verb to install FAudio
* see: https://github.com/Kron4ek/FAudio-Builds
* @param {String} faudioVersion version of FAudio to downlaod
* @returns {Wine} Wine object
*/
Wine.prototype.faudio = function (faudioVersion) {
if(typeof faudioVersion !== 'string')
faudioVersion = "19.01";

var setupFile = new Resource()
.wizard(this.wizard())
.url("https://github.com/Kron4ek/FAudio-Builds/releases/download/" + faudioVersion + "/faudio-" + faudioVersion + ".tar.xz")
.name("faudio-" + faudioVersion + ".tar.xz")
.get();

new Extractor()
.wizard(this.wizard())
.archive(setupFile)
.to(this.prefixDirectory() + "/FAudio/")
.extract();

var forEach = Array.prototype.forEach;
var sys32dir = this.system32directory();
var sys64dir = this.system64directory();
var faudioDir = this.prefixDirectory() + "/FAudio/faudio-" + faudioVersion;
var self = this;

forEach.call(ls(faudioDir + "/x32"), function (file) {
if (file.endsWith(".dll")) {
cp(faudioDir + "/x32/" + file, sys32dir);
self.overrideDLL()
.set("native", [file])
.do();
}
});

if (this.architecture() == "amd64")
{
forEach.call(ls(faudioDir + "/x64"), function (file) {
if (file.endsWith(".dll")) {
cp(faudioDir + "/x64/" + file, sys64dir);
}
});
}

return this;
}

/**
* Verb to install FAudio
*/
var verbImplementation = {
install: function (container) {
var wine = new Wine();
wine.prefix(container);
var wizard = SetupWizard(InstallationType.VERBS, "FAudio", java.util.Optional.empty());
wine.wizard(wizard);
wine.faudio();
wizard.close();
}
};

/* exported Verb */
var Verb = Java.extend(org.phoenicis.engines.Verb, verbImplementation);
12 changes: 12 additions & 0 deletions Engines/Wine/Verbs/FAudio/script.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"scriptName" : "faudio",
"id" : "faudio",
"compatibleOperatingSystems" : [
"LINUX"
],
"testingOperatingSystems" : [
"LINUX"
],
"free" : true,
"requiresPatch" : false
}