forked from PhoenicisOrg/scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
49 lines (36 loc) · 1.24 KB
/
script.js
File metadata and controls
49 lines (36 loc) · 1.24 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
const Wine = include("engines.wine.engine.object");
const Resource = include("utils.functions.net.resource");
const Optional = Java.type("java.util.Optional");
include("engines.wine.plugins.windows_version");
/**
* Verb to install adobeair
*/
class AdobeAir {
constructor(wine) {
this.wine = wine;
}
go() {
const wizard = this.wine.wizard();
// Using Windows XP to workaround the wine bug 43506
// See https://bugs.winehq.org/show_bug.cgi?id=43506
const currentWindowsVersion = this.wine.windowsVersion();
this.wine.windowsVersion("winxp");
const adobeair = new Resource()
.wizard(wizard)
.url("https://airdownload.adobe.com/air/win/download/latest/AdobeAIRInstaller.exe")
.name("AdobeAIRInstaller.exe")
.get();
this.wine.run(adobeair);
this.wine.wait();
this.wine.windowsVersion(currentWindowsVersion);
}
static install(container) {
const wine = new Wine();
const wizard = SetupWizard(InstallationType.VERBS, "adobeair", Optional.empty());
wine.prefix(container);
wine.wizard(wizard);
new AdobeAir(wine).go();
wizard.close();
}
}
module.default = AdobeAir;