Skip to content

Commit 9639e62

Browse files
committed
Merge branch 'master' into 5.0-alpha
2 parents 0e53a47 + e120aa5 commit 9639e62

17 files changed

Lines changed: 318 additions & 121 deletions

File tree

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ matrix:
1010
before_install: npm install -g json-align
1111
script:
1212
- find . -name "*.json" -print0 | xargs -0 json-align -i
13+
- git diff
1314
- diffs=$(git diff --name-only | wc -l); if [ $diffs != 0 ]; then exit 1; fi
1415
after_failure:
1516
- echo "Some JSON files are not aligned. Please run json-align."

Applications/Games/Epic Games Launcher/Online/script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var installerImplementation = {
88
.applicationHomepage("https://www.unrealengine.com/download")
99
.author("Plata")
1010
.url("https://launcher-public-service-prod06.ol.epicgames.com/launcher/api/installer/download/EpicGamesLauncherInstaller.msi")
11-
.checksum("15da9dd4eac2ea4da80b602a274235c8537be156")
11+
.checksum("08ee775d59a142032f179baa9a85464ae5dc5940")
1212
.installationArgs(["/q"])
1313
.category("Games")
1414
.executable("EpicGamesLauncher.exe", ["-SkipBuildPatchPrereq", "-OpenGL"])

Applications/Games/STAR WARS - Empire at War - Gold Pack/Local/script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ var installerImplementation = {
2222
.to(wine.prefixDirectory() + "drive_c/users/Public/Documents/EAW_RAM_MPLobby_update.exe")
2323
.get();
2424

25-
wine.runInsidePrefix("/users/Public/Documents/EAW_RAM_MPLobby_update.exe");
25+
wine.runInsidePrefix("/users/Public/Documents/EAW_RAM_MPLobby_update.exe", [], true);
2626
})
2727
.go();
2828
}

Applications/Games/STAR WARS Battlefront II/Local/script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ var installerImplementation = {
1919
.to(wine.prefixDirectory() + "drive_c/Program Files/LucasArts/Star Wars Battlefront II/BFIIUpdateInt1_1.exe")
2020
.get();
2121

22-
wine.runInsidePrefix("/Program Files/LucasArts/Star Wars Battlefront II/BFIIUpdateInt1_1.exe");
22+
wine.runInsidePrefix("/Program Files/LucasArts/Star Wars Battlefront II/BFIIUpdateInt1_1.exe", [], true);
2323

2424
})
2525
.go();

Applications/Games/Subnautica/Steam/script.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var installerImplementation = {
1717
.author("Zemogiter")
1818
.applicationHomepage("https://unknownworlds.com/subnautica/")
1919
.wineDistribution("upstream")
20-
.wineVersion(3.1)
20+
.wineVersion(3.9)
2121
.wineArchitecture("amd64")
2222
.appId(264710)
2323
.preInstall(function (wine/*, wizard*/) {
@@ -32,7 +32,7 @@ var installerImplementation = {
3232

3333
})
3434
.gameOverlay(false)
35-
.executable("Steam.exe", ["-silent", "-applaunch", 264710, "-no-ces-sandbox", "-force-opengl"])
35+
.executable("Steam.exe", ["-silent", "-applaunch", 264710, "-no-ces-sandbox"])
3636
.go();
3737
}
3838
};

Applications/Games/Subnautica/resources/fix.reg

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,9 @@ REGEDIT4
22

33
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
44
"UseTakeFocus"="N"
5+
6+
[HKEY_CURRENT_USER\Software\Wine\AppDefaults\Steam.exe]
7+
"Version"="winxp64"
8+
9+
[HKEY_CURRENT_USER\Software\Wine\AppDefaults\steamwebhelper.exe]
10+
"Version"="winxp64"

Applications/Internet/Internet Explorer 6.0/Online/script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ var installerImplementation = {
5252
wine.overrideDLL()
5353
.set("native", ["inseng"])
5454
.do();
55-
wine.runInsidePrefix("IE 6.0 Full/IE6SETUP.EXE");
55+
wine.runInsidePrefix("IE 6.0 Full/IE6SETUP.EXE", [], true);
5656
wine.overrideDLL()
5757
.set("native,builtin", [
5858
"inetcpl.cpl", "itircl", "itss", "jscript", "mlang",

Engines/Wine/Engine/Implementation/script.js

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,6 @@ var engineImplementation = {
2020
_wineWebServiceUrl : Bean("propertyReader").getProperty("webservice.wine.url"),
2121
_wizard: null,
2222
_workingContainer: "",
23-
_wineServer: function (subCategory, version, parameter) {
24-
var binary = this.getLocalDirectory(subCategory, version) + "/bin/wineserver";
25-
var processBuilder = new java.lang.ProcessBuilder(Java.to([binary, parameter], "java.lang.String[]"));
26-
var environment = processBuilder.environment();
27-
environment.put("WINEPREFIX", this.getContainerDirectory(this.getWorkingContainer()));
28-
processBuilder.inheritIO();
29-
var wineServerProcess = processBuilder.start();
30-
wineServerProcess.waitFor();
31-
},
3223
getLocalDirectory: function (subCategory, version) {
3324
var parts = subCategory.split("-");
3425
var distribution = parts[0];
@@ -208,11 +199,13 @@ var engineImplementation = {
208199
var extensionFile = executable.split(".").pop();
209200

210201
if (extensionFile == "msi") {
211-
return this.run("msiexec", ["/i", executable].concat(args), captureOutput);
202+
var msiArgs = org.apache.commons.lang.ArrayUtils.addAll(["/i", executable], args);
203+
return this.run("msiexec", msiArgs, workingDir, captureOutput, wait, userData);
212204
}
213205

214206
if (extensionFile == "bat") {
215-
return this.run("start", ["/Unix", executable].concat(args), captureOutput);
207+
var batArgs = org.apache.commons.lang.ArrayUtils.addAll(["/Unix", executable], args);
208+
return this.run("start", batArgs, workingDir, captureOutput, wait, userData);
216209
}
217210

218211
// do not run 64bit executable in 32bit prefix
@@ -269,7 +262,6 @@ var engineImplementation = {
269262

270263
if (wait) {
271264
process.waitFor();
272-
this._wineServer(subCategory, version, "-w");
273265
}
274266

275267
if (captureOutput) {

Engines/Wine/Engine/Object/script.js

Lines changed: 51 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ include(["utils", "functions", "net", "resource"]);
77
/* exported LATEST_STABLE_VERSION */
88
var LATEST_STABLE_VERSION = "3.0.2";
99
/* exported LATEST_DEVELOPMENT_VERSION */
10-
var LATEST_DEVELOPMENT_VERSION = "3.13";
10+
var LATEST_DEVELOPMENT_VERSION = "3.15";
1111
/* exported LATEST_STAGING_VERSION */
1212
var LATEST_STAGING_VERSION = "3.2";
1313

@@ -128,11 +128,20 @@ Wine.prototype.binPath = function (subCategory, version) {
128128

129129
/**
130130
*
131-
* @param executable
132-
* @param args
131+
* @param {string} executable
132+
* @param {array} [args = []]
133+
* @param {boolean} [wait=false]
133134
*/
134-
Wine.prototype.runInsidePrefix = function (executable, args) {
135-
return this.run(this.prefixDirectory() + "/drive_c/" + executable, args, this.prefixDirectory(), false, true);
135+
Wine.prototype.runInsidePrefix = function (executable, args, wait) {
136+
if (!args) {
137+
args = [];
138+
} else if (typeof args === 'string' || args instanceof String) {
139+
args = [args];
140+
}
141+
if (!wait) {
142+
wait = false;
143+
}
144+
return this.run(this.prefixDirectory() + "/drive_c/" + executable, args, this.prefixDirectory(), false, wait);
136145
};
137146

138147
/**
@@ -207,12 +216,48 @@ Wine.prototype.programFiles = function () {
207216
}
208217
};
209218

219+
/**
220+
* executes wineserver in current prefix
221+
* @param {string} wineserver parameter
222+
*/
223+
Wine.prototype.wineServer = function (parameter) {
224+
var workingContainerDirectory = this._implementation.getContainerDirectory(this._implementation.getWorkingContainer());
225+
if (fileExists(workingContainerDirectory)) {
226+
var configFactory = Bean("compatibleConfigFileFormatFactory");
227+
var containerConfiguration = configFactory.open(workingContainerDirectory + "/phoenicis.cfg");
228+
var distribution = containerConfiguration.readValue("wineDistribution", "upstream");
229+
var architecture = containerConfiguration.readValue("wineArchitecture", "x86");
230+
var operatingSystem = this._OperatingSystemFetcher.fetchCurrentOperationSystem().getWinePackage();
231+
var subCategory = distribution + "-" + operatingSystem + "-" + architecture;
232+
var version = containerConfiguration.readValue("wineVersion");
233+
var binary = this._implementation.getLocalDirectory(subCategory, version) + "/bin/wineserver";
234+
var processBuilder = new java.lang.ProcessBuilder(Java.to([binary, parameter], "java.lang.String[]"));
235+
var environment = processBuilder.environment();
236+
environment.put("WINEPREFIX", this._implementation.getContainerDirectory(this._implementation.getWorkingContainer()));
237+
processBuilder.inheritIO();
238+
var wineServerProcess = processBuilder.start();
239+
wineServerProcess.waitFor();
240+
}
241+
else {
242+
print("Wine prefix \"" + this.getWorkingContainer() + "\" does not exist!");
243+
}
244+
};
245+
246+
/**
247+
* wait until wineserver finishes
248+
* @returns {Wine}
249+
*/
250+
Wine.prototype.wait = function () {
251+
this.wineServer("-w");
252+
return this;
253+
};
254+
210255
/**
211256
* kill wine server
212257
* @returns {Wine}
213258
*/
214259
Wine.prototype.kill = function () {
215-
this._wineServer("-k");
260+
this.wineServer("-k");
216261
return this;
217262
};
218263

Engines/Wine/QuickScript/Installer Script/script.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@ InstallerScript.prototype.go = function () {
3737
var shownArchitectures = ["x86 (recommended)", "amd64"];
3838
var selectedArchitecture = setupWizard.menu(tr("Please select the wine architecture."), shownArchitectures, "x86 (recommended)");
3939
this._wineArchitecture = architectures[selectedArchitecture.index];
40-
wine.architecture(this._wineArchitecture); // do this here to show correct values for distribution
4140

42-
var distributions = wine.availableDistributions();
41+
var distributions = wine.availableDistributions(this._wineArchitecture);
4342
var shownDistributions = [];
4443
for (var distributionIdx in distributions) {
4544
if (distributions[distributionIdx] == "upstream") {
@@ -51,9 +50,10 @@ InstallerScript.prototype.go = function () {
5150
}
5251
var selectedDistribution = setupWizard.menu(tr("Please select the wine distribution."), shownDistributions, "upstream (recommended)");
5352
this._wineDistribution = distributions[selectedDistribution.index];
54-
wine.distribution(this._wineDistribution); // do this here to show correct values for version
5553

56-
var versions = wine.availableVersions();
54+
var operatingSystemFetcher = Bean("operatingSystemFetcher");
55+
var operatingSystem = operatingSystemFetcher.fetchCurrentOperationSystem().getWinePackage();
56+
var versions = wine.availableVersions(this._wineDistribution + "-" + operatingSystem + "-" + this._wineArchitecture);
5757
var shownVersions = [];
5858
for (var versionIdx in versions) {
5959
if (versions[versionIdx] == LATEST_STABLE_VERSION) {

0 commit comments

Comments
 (0)