Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
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
26 changes: 26 additions & 0 deletions Applications/Games/MagicTheGatheringArena/Online/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
include("engines.wine.quick_script.custom_installer_script");
include("engines.wine.verbs.dxvk");
include("engines.wine.plugins.UseTakeFocus")


var installerImplementation = {
run: function () {
new OnlineInstallerScript()
.name("Magic: The Gathering Arena")
.applicationHomepage("https://magic.wizards.com/")
.url("https://mtgarena.downloads.wizards.com/Live/Windows32/MTGAInstaller.exe")
.author("KREYREN")
.category("Games")
.wineDistribution("staging")
.wineVersion(LATEST_STAGING_VERSION)
.preInstall(function (wine/*, wizard*/) {
wine.DXVK();
wine.UseTakeFocus("N");
})
.executable("MTGAInstaller.exe")
.go();
}
};

/* exported Installer */
var Installer = Java.extend(org.phoenicis.scripts.Installer, installerImplementation);
12 changes: 12 additions & 0 deletions Applications/Games/MagicTheGatheringArena/Online/script.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"scriptName" : "Online",
"id" : "applications.games.magic_the_gathering_arena.online",
"compatibleOperatingSystems" : [
"LINUX"
],
"testingOperatingSystems" : [
"LINUX"
],
"free" : true,
"requiresPatch" : false
}
5 changes: 5 additions & 0 deletions Applications/Games/MagicTheGatheringArena/application.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name" : "Magic: The Gathering Arena",
"id" : "applications.games.magic_the_gathering_arena",
"description" : "Magic: The Gathering Arena is a free-to-play digital collectible card game developed by Wizards of the Coast's internal development studio, Wizards Digital Games Studio.(Wikipedia)"
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions Applications/Games/PC Building Simulator/Steam/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
include("engines.wine.quick_script.steam_script");
include("engines.wine.plugins.virtual_desktop");
include("engines.wine.verbs.corefonts");
include("utils.functions.apps.resources");

var installerImplementation = {
run: function () {
new SteamScript()
.name("PC Building Simulator")
.editor("Claudiu Kiss, The Irregular Corporation")
.author("Zemogiter")
.applicationHomepage("http://www.pcbuildingsim.com/")
.wineVersion(LATEST_DEVELOPMENT_VERSION)
.wineArchitecture("amd64")
.appId(621060)
.preInstall(function (wine, wizard) {
wizard.message(tr("The game is functional but benchmark animations on the monitors are not displayed. Feel free to drop a feedback if you know how to fix this issue."));
wine.corefonts();
var screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
wine.setVirtualDesktop(screenSize.width, screenSize.height);
})
.gameOverlay(false)
.go();
}
};

/* exported Installer */
var Installer = Java.extend(org.phoenicis.scripts.Installer, installerImplementation);
11 changes: 11 additions & 0 deletions Applications/Games/PC Building Simulator/Steam/script.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"scriptName" : "Steam",
"id" : "pcbs_steam",
"compatibleOperatingSystems" : [
"MACOSX",
"LINUX"
],
"testingOperatingSystems" : [],
"free" : false,
"requiresPatch" : false
}
5 changes: 5 additions & 0 deletions Applications/Games/PC Building Simulator/application.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name" : "PC Building Simulator",
"id" : "pcbs",
"description" : "Build your very own PC empire, from simple diagnosis and repairs to bespoke, boutique creations that would be the envy of any enthusiast. With an ever-expanding marketplace full of real-world components you can finally stop dreaming of that ultimate PC and get out there, build it and see how it benchmarks in 3DMark!"
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
111 changes: 109 additions & 2 deletions Engines/Wine/Engine/Implementation/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ var engineImplementation = {
return fileExists(this.getLocalDirectory(subCategory, version));
},
install: function (subCategory, version) {
this._installRuntime(this.getWizard());
var parts = subCategory.split("-");
var distribution = parts[0];
var architecture = parts[2];
Expand Down Expand Up @@ -98,6 +99,110 @@ var engineImplementation = {
);
}
},
_installRuntime: function (setupWizard) {
var runtimeJsonPath = this._wineEnginesDirectory + "/runtime.json";
var runtimeJson;
var runtimeJsonFile;
var downloadamd64 = false;
var downloadx86 = false;
if (!fileExists(runtimeJsonPath)) {
mkdir(this._wineEnginesDirectory + "/runtime");
runtimeJsonFile = new Downloader()
.wizard(this._wizard)
.message(tr("Downloading runtime json"))
.url("https://phoenicis.playonlinux.com/index.php/runtime?os=linux")
.to(runtimeJsonPath)
.get();

runtimeJson = JSON.parse(cat(runtimeJsonFile));
downloadamd64 = true;
downloadx86 = true;
}
else {
var oldRuntimeJsonFile = cat(this._wineEnginesDirectory + "/runtime.json");
var oldRuntimeJson = JSON.parse(oldRuntimeJsonFile);

runtimeJsonFile = new Downloader()
.wizard(this._wizard)
.message(tr("Downloading runtime json"))
.url("https://phoenicis.playonlinux.com/index.php/runtime?os=linux")
.to(runtimeJsonPath)
.get();

runtimeJson = JSON.parse(cat(runtimeJsonFile));
var oldCheckSumamd64;
var oldCheckSumx86;
oldRuntimeJson.forEach(function (arch){
if (arch.arch == "amd64") {
oldCheckSumamd64 = arch.sha1sum;
}
else {
oldCheckSumx86 = arch.sha1sum;
}
});
runtimeJson.forEach(function (arch){
if (arch.arch == "amd64" && arch.sha1sum != oldCheckSumamd64){
downloadamd64 = true;
}
else if (arch.arch == "x86" && arch.sha1sum != oldCheckSumx86){
downloadx86 = true;
}
});
}

if (downloadx86 == true) {
remove(this._wineEnginesDirectory + "/runtime/lib");
mkdir(this._wineEnginesDirectory + "/TMP");
that = this;
runtimeJson.forEach(function (arch){
var runtime;

if (arch.arch == "x86") {
runtime = new Downloader()
.wizard(setupWizard)
.url(arch.url)
.message(tr("Downloading x86 runtime"))
.checksum(arch.sha1sum)
.to(that._wineEnginesDirectory + "/TMP/" + arch.url.substring(arch.url.lastIndexOf('/')+1))
.get();

new Extractor()
.wizard(setupWizard)
.archive(runtime)
.to(that._wineEnginesDirectory + "/runtime")
.extract();

}
});
remove(this._wineEnginesDirectory + "/TMP");
}
if (downloadamd64 == true) {
remove(this._wineEnginesDirectory + "/runtime/lib64");
mkdir(this._wineEnginesDirectory + "/TMP");
var that = this;
runtimeJson.forEach(function (arch){
var runtime;

if (arch.arch == "amd64") {
runtime = new Downloader()
.wizard(setupWizard)
.url(arch.url)
.message(tr("Downloading amd64 runtime"))
.checksum(arch.sha1sum)
.to(that._wineEnginesDirectory + "/TMP/" + arch.url.substring(arch.url.lastIndexOf('/')+1))
.get();

new Extractor()
.wizard(setupWizard)
.archive(runtime)
.to(that._wineEnginesDirectory + "/runtime")
.extract();

}
});
remove(this._wineEnginesDirectory + "/TMP");
}
},
_installGecko: function (setupWizard, winePackage, localDirectory) {
if (winePackage.geckoUrl) {
var gecko = new Resource()
Expand Down Expand Up @@ -253,9 +358,11 @@ var engineImplementation = {
ldPath = userData.ldPath + ldPath;
}
if (architecture == "amd64") {
ldPath = this.getLocalDirectory(subCategory, version) + "/lib64/:" + ldPath
ldPath = this._wineEnginesDirectory + "runtime/lib64/:" + this._wineEnginesDirectory + "runtime/lib/:"
+ this.getLocalDirectory(subCategory, version) + "/lib64/:"
+ this.getLocalDirectory(subCategory, version) + "/lib/:"+ ldPath;
} else {
ldPath = this.getLocalDirectory(subCategory, version) + "/lib/:" + ldPath
ldPath = this._wineEnginesDirectory + "runtime/lib/:" + this.getLocalDirectory(subCategory, version) + "/lib/:" + ldPath;
}
environment.put("LD_LIBRARY_PATH", ldPath);

Expand Down
6 changes: 3 additions & 3 deletions Engines/Wine/Engine/Object/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ include("utils.functions.net.download");
include("utils.functions.net.resource");

/* exported LATEST_STABLE_VERSION */
var LATEST_STABLE_VERSION = "4.0";
var LATEST_STABLE_VERSION = "4.0.1";
/* exported LATEST_DEVELOPMENT_VERSION */
var LATEST_DEVELOPMENT_VERSION = "4.7";
var LATEST_DEVELOPMENT_VERSION = "4.8";
/* exported LATEST_STAGING_VERSION */
var LATEST_STAGING_VERSION = "4.7";
var LATEST_STAGING_VERSION = "4.8";
/* exported LATEST_DOS_SUPPORT_VERSION */
var LATEST_DOS_SUPPORT_VERSION = "4.0";

Expand Down
17 changes: 17 additions & 0 deletions Engines/Wine/Plugins/UseTakeFocus/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
include("engines.wine.engine.object");
include("engines.wine.plugins.regedit");

/**
* force the UseTakeFocus
* @param {string} mode ("Y" or "N")
* @returns {Wine} Wine object
*/
Wine.prototype.UseTakeFocus = function (mode) {
var regeditFileContent =
"REGEDIT4\n" +
"\n" +
"[HKEY_CURRENT_USER\\Software\\Wine\\X11 Driver]\n" +
"\"UseTakeFocus\"=\"" + mode + "\"\n";
this.regedit().patch(regeditFileContent);
return this;
};
11 changes: 11 additions & 0 deletions Engines/Wine/Plugins/UseTakeFocus/script.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"scriptName" : "Use Take Focus",
"id" : "engines.wine.plugins.usetakefocus",
"compatibleOperatingSystems" : [
"LINUX",
"MACOSX"
],
"testingOperatingSystems" : [],
"free" : true,
"requiresPatch" : false
}
1 change: 0 additions & 1 deletion Engines/Wine/QuickScript/Origin Script/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ OriginScript.prototype.go = function () {
new Downloader()
.wizard(setupWizard)
.url("https://origin-a.akamaihd.net/Origin-Client-Download/origin/live/OriginThinSetup.exe")
.checksum("01a8a14c7ea34d11eeb65bbc89beee3079638061")
.to(tempFile)
.get();

Expand Down
43 changes: 43 additions & 0 deletions Engines/Wine/Settings/UseTakeFocus/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
include("engines.wine.engine.object");
include("engines.wine.plugins.regedit");
include("engines.wine.plugins.usetakefocus");

/**
* setting to enable/disable UseTakeFocus
*/
var settingImplementation = {
_options: [tr("Default"), tr("Disabled"), tr("Enabled")],
// values which are written into the registry, do not translate!
_registryValues: ["", "N", "Y"], // `Y` is blind code since it's enabled by default on wine-staging it seems
getText: function () {
return tr("UseTakeFocus");
},
getOptions: function () {
return this._options;
},
getCurrentOption: function (container) {
var currentValue = new Wine()
.prefix(container)
.regedit()
.fetchValue(["HKEY_CURRENT_USER", "Software", "Wine", "X11 Driver", "UseTakeFocus"]);
// find matching option (use default if not found)
var index = Math.max(this._registryValues.indexOf(currentValue), 0);
return this._options[index];
},
setOption: function (container, optionIndex) {
if (0 == optionIndex) {
new Wine()
.prefix(container)
.regedit()
.deleteValue("HKEY_CURRENT_USER\\Software\\Wine\\X11 Driver", "UseTakeFocus");
}
else {
new Wine()
.prefix(container)
.UseTakeFocus(this._registryValues[optionIndex]);
}
}
};

/* exported Setting */
var Setting = Java.extend(org.phoenicis.engines.EngineSetting, settingImplementation);
10 changes: 10 additions & 0 deletions Engines/Wine/Settings/UseTakeFocus/script.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"scriptName" : "UseTakeFocus",
"id" : "engines.wine.settings.usetakefocus",
"compatibleOperatingSystems" : [
"LINUX"
],
"testingOperatingSystems" : [],
"free" : true,
"requiresPatch" : false
}
3 changes: 2 additions & 1 deletion Engines/Wine/Verbs/DXVK/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ var verbImplementation = {
.get();
var latestVersion = cat(releaseFile).replaceAll("\\n", "");
// query desired version (default: latest release version)
var versions = ["1.0",
var versions = ["1.1.1",
"1.0.3", "1.0.2", "1.0.1", "1.0",
"0.96", "0.95", "0.94", "0.93", "0.92", "0.91", "0.90",
"0.81", "0.80", "0.72", "0.71", "0.70",
"0.65", "0.64", "0.63", "0.62", "0.61", "0.60",
Expand Down
Loading