diff --git a/Applications/Games/MagicTheGatheringArena/Online/script.js b/Applications/Games/MagicTheGatheringArena/Online/script.js new file mode 100644 index 0000000000..f04846991c --- /dev/null +++ b/Applications/Games/MagicTheGatheringArena/Online/script.js @@ -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); diff --git a/Applications/Games/MagicTheGatheringArena/Online/script.json b/Applications/Games/MagicTheGatheringArena/Online/script.json new file mode 100644 index 0000000000..09a15a2f5a --- /dev/null +++ b/Applications/Games/MagicTheGatheringArena/Online/script.json @@ -0,0 +1,12 @@ +{ + "scriptName" : "Online", + "id" : "applications.games.magic_the_gathering_arena.online", + "compatibleOperatingSystems" : [ + "LINUX" + ], + "testingOperatingSystems" : [ + "LINUX" + ], + "free" : true, + "requiresPatch" : false +} diff --git a/Applications/Games/MagicTheGatheringArena/application.json b/Applications/Games/MagicTheGatheringArena/application.json new file mode 100644 index 0000000000..4283a94375 --- /dev/null +++ b/Applications/Games/MagicTheGatheringArena/application.json @@ -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)" +} diff --git a/Applications/Games/MagicTheGatheringArena/miniatures/main.png b/Applications/Games/MagicTheGatheringArena/miniatures/main.png new file mode 100644 index 0000000000..b437b0b277 Binary files /dev/null and b/Applications/Games/MagicTheGatheringArena/miniatures/main.png differ diff --git a/Applications/Games/PC Building Simulator/Steam/script.js b/Applications/Games/PC Building Simulator/Steam/script.js new file mode 100644 index 0000000000..6d2fb6a94d --- /dev/null +++ b/Applications/Games/PC Building Simulator/Steam/script.js @@ -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); diff --git a/Applications/Games/PC Building Simulator/Steam/script.json b/Applications/Games/PC Building Simulator/Steam/script.json new file mode 100644 index 0000000000..ccc5cb3d30 --- /dev/null +++ b/Applications/Games/PC Building Simulator/Steam/script.json @@ -0,0 +1,11 @@ +{ + "scriptName" : "Steam", + "id" : "pcbs_steam", + "compatibleOperatingSystems" : [ + "MACOSX", + "LINUX" + ], + "testingOperatingSystems" : [], + "free" : false, + "requiresPatch" : false +} diff --git a/Applications/Games/PC Building Simulator/application.json b/Applications/Games/PC Building Simulator/application.json new file mode 100644 index 0000000000..9c8a31cf7c --- /dev/null +++ b/Applications/Games/PC Building Simulator/application.json @@ -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!" +} diff --git a/Applications/Games/PC Building Simulator/miniatures/main.png b/Applications/Games/PC Building Simulator/miniatures/main.png new file mode 100644 index 0000000000..c551f98910 Binary files /dev/null and b/Applications/Games/PC Building Simulator/miniatures/main.png differ diff --git a/Engines/Wine/Engine/Implementation/script.js b/Engines/Wine/Engine/Implementation/script.js index 536cbd9b9c..acf7a7dd97 100644 --- a/Engines/Wine/Engine/Implementation/script.js +++ b/Engines/Wine/Engine/Implementation/script.js @@ -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]; @@ -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() @@ -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); diff --git a/Engines/Wine/Engine/Object/script.js b/Engines/Wine/Engine/Object/script.js index 1ff508edd5..aa86da4c8a 100644 --- a/Engines/Wine/Engine/Object/script.js +++ b/Engines/Wine/Engine/Object/script.js @@ -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"; diff --git a/Engines/Wine/Plugins/UseTakeFocus/script.js b/Engines/Wine/Plugins/UseTakeFocus/script.js new file mode 100644 index 0000000000..1df2e52f52 --- /dev/null +++ b/Engines/Wine/Plugins/UseTakeFocus/script.js @@ -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; +}; diff --git a/Engines/Wine/Plugins/UseTakeFocus/script.json b/Engines/Wine/Plugins/UseTakeFocus/script.json new file mode 100644 index 0000000000..7cd3c4165d --- /dev/null +++ b/Engines/Wine/Plugins/UseTakeFocus/script.json @@ -0,0 +1,11 @@ +{ + "scriptName" : "Use Take Focus", + "id" : "engines.wine.plugins.usetakefocus", + "compatibleOperatingSystems" : [ + "LINUX", + "MACOSX" + ], + "testingOperatingSystems" : [], + "free" : true, + "requiresPatch" : false +} diff --git a/Engines/Wine/QuickScript/Origin Script/script.js b/Engines/Wine/QuickScript/Origin Script/script.js index 18863f8ecf..0955ff9e59 100644 --- a/Engines/Wine/QuickScript/Origin Script/script.js +++ b/Engines/Wine/QuickScript/Origin Script/script.js @@ -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(); diff --git a/Engines/Wine/Settings/UseTakeFocus/script.js b/Engines/Wine/Settings/UseTakeFocus/script.js new file mode 100644 index 0000000000..0cad184933 --- /dev/null +++ b/Engines/Wine/Settings/UseTakeFocus/script.js @@ -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); diff --git a/Engines/Wine/Settings/UseTakeFocus/script.json b/Engines/Wine/Settings/UseTakeFocus/script.json new file mode 100644 index 0000000000..9818eb0b25 --- /dev/null +++ b/Engines/Wine/Settings/UseTakeFocus/script.json @@ -0,0 +1,10 @@ +{ + "scriptName" : "UseTakeFocus", + "id" : "engines.wine.settings.usetakefocus", + "compatibleOperatingSystems" : [ + "LINUX" + ], + "testingOperatingSystems" : [], + "free" : true, + "requiresPatch" : false +} diff --git a/Engines/Wine/Verbs/DXVK/script.js b/Engines/Wine/Verbs/DXVK/script.js index dbf1aa5769..6cffb7e610 100644 --- a/Engines/Wine/Verbs/DXVK/script.js +++ b/Engines/Wine/Verbs/DXVK/script.js @@ -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", diff --git a/Engines/Wine/Verbs/dotnet20sp2/script.js b/Engines/Wine/Verbs/dotnet20sp2/script.js new file mode 100644 index 0000000000..4030676965 --- /dev/null +++ b/Engines/Wine/Verbs/dotnet20sp2/script.js @@ -0,0 +1,78 @@ +include("engines.wine.engine.object"); +include("engines.wine.plugins.override_dll"); +include("utils.functions.net.resource"); +include("utils.functions.filesystem.files"); +include("engines.wine.plugins.windows_version"); +include("engines.wine.verbs.remove_mono"); +include("engines.wine.plugins.regedit"); + + + +/** +* Verb to install .NET 2.0 SP2 +* @returns {Wine} Wine object +*/ +Wine.prototype.dotnet20sp2 = function () { + var osVersion = this.windowsVersion(); + this.windowsVersion("winxp"); + var dlls = [ + "ngen.exe", + "regsvcs.exe", + "mscorsvw.exe"]; + this.overrideDLL() + .set("builtin", dlls) + .do(); + this.removeMono(); + + if (this.architecture() == "x86") { + + var setupFile32 = new Resource() + .wizard(this.wizard()) + .url("https://download.microsoft.com/download/c/6/e/c6e88215-0178-4c6c-b5f3-158ff77b1f38/NetFx20SP2_x86.exe") + .checksum("22d776d4d204863105a5db99e8b8888be23c61a7") + .name("NetFx20SP2_x86.exe") + .get(); + + + this.wizard().wait(tr("Please wait while {0} is installed...", ".NET Framework 2.0 SP2")); + this.run(setupFile32, [setupFile32, "/q", "/c:\"install.exe /q\""], null, false, true); + + + remove(this.system32directory() + "/msvcr80.dll"); + remove(this.system32directory() + "/msvcm80.dll"); + remove(this.system32directory() + "/msvcp80.dll"); + } + else { + var setupFile64 = new Resource() + .wizard(this.wizard()) + .url("https://download.microsoft.com/download/c/6/e/c6e88215-0178-4c6c-b5f3-158ff77b1f38/NetFx20SP2_x64.exe") + .checksum("a7cc6c6e5a4ad9cdf3df16a7d277eb09fec429b7") + .name("NetFx20SP2_x64.exe") + .get(); + + + this.wizard().wait(tr("Please wait while {0} is installed...", ".NET Framework 2.0 SP2")); + this.run(setupFile64, [setupFile64, "/q", "/c:\"install.exe /q\""], null, false, true); + } + this.windowsVersion(osVersion); + this.regedit().deleteValue("HKCU\\Software\\Wine\\DllOverrides", "*ngen.exe"); + this.regedit().deleteValue("HKCU\\Software\\Wine\\DllOverrides", "*regsvcs.exe"); + this.regedit().deleteValue("HKCU\\Software\\Wine\\DllOverrides", "*mscorsvw.exe"); + return this; +}; +/** + * Verb to install dotnet20sp2 +*/ +var verbImplementation = { + install: function (container) { + var wine = new Wine(); + wine.prefix(container); + var wizard = SetupWizard(InstallationType.VERBS, "dotnet20sp2", java.util.Optional.empty()); + wine.wizard(wizard); + wine.dotnet20sp2(); + wizard.close(); + } +}; + +/* exported Verb */ +var Verb = Java.extend(org.phoenicis.engines.Verb, verbImplementation); diff --git a/Engines/Wine/Verbs/dotnet20sp2/script.json b/Engines/Wine/Verbs/dotnet20sp2/script.json new file mode 100644 index 0000000000..3591c3ddba --- /dev/null +++ b/Engines/Wine/Verbs/dotnet20sp2/script.json @@ -0,0 +1,11 @@ +{ + "scriptName" : ".NET 2.0 SP2", + "id" : "engines.wine.verbs.dotnet20sp2", + "compatibleOperatingSystems" : [ + "MACOSX", + "LINUX" + ], + "testingOperatingSystems" : [], + "free" : true, + "requiresPatch" : false +} diff --git a/Engines/Wine/Verbs/vcrun6sp6/script.js b/Engines/Wine/Verbs/vcrun6sp6/script.js new file mode 100644 index 0000000000..be8af529e0 --- /dev/null +++ b/Engines/Wine/Verbs/vcrun6sp6/script.js @@ -0,0 +1,50 @@ +include("engines.wine.engine.object"); +include("utils.functions.net.resource"); +include("engines.wine.verbs.luna"); + +/** +* Verb to install vcrun6sp6 +* @returns {Wine} Wine object +*/ +Wine.prototype.vcrun6sp6 = function () { + var toBeCabExtracted = new Resource() + .wizard(this.wizard()) + .url("https://download.microsoft.com/download/1/9/f/19fe4660-5792-4683-99e0-8d48c22eed74/Vs6sp6.exe") + .checksum("2292437a8967349261c810ae8b456592eeb76620") + .name("Vs6sp6.exe") + .get(); + + var setupFile = new CabExtract() + .archive(toBeCabExtracted) + .to(this.prefixDirectory() + "/drive_c/vcrun6sp6/") + .extract(["-L", "-F", "vcredist.exe"]); + + remove(this.system32directory() + "comcat.dll"); + remove(this.system32directory() + "msvcrt.dll"); + remove(this.system32directory() + "oleaut32.dll"); + remove(this.system32directory() + "olepro32.dll"); + remove(this.system32directory() + "stdole2.dll"); + + this.wizard().wait(tr("Please wait while {0} is installed...", "vcrun6sp6")); + this.run(setupFile, "/q", null, false, true); + + return this; +}; + +/** + * Verb to install vcrun6sp6 +*/ +var verbImplementation = { + install: function (container) { + var wine = new Wine(); + wine.prefix(container); + var wizard = SetupWizard(InstallationType.VERBS, "vcrun6sp6", java.util.Optional.empty()); + wine.wizard(wizard); + wine.vcrun6sp6(); + wizard.close(); + } +}; + +/* exported Verb */ +var Verb = Java.extend(org.phoenicis.engines.Verb, verbImplementation); + diff --git a/Engines/Wine/Verbs/vcrun6sp6/script.json b/Engines/Wine/Verbs/vcrun6sp6/script.json new file mode 100644 index 0000000000..ff19733890 --- /dev/null +++ b/Engines/Wine/Verbs/vcrun6sp6/script.json @@ -0,0 +1,11 @@ +{ + "scriptName" : "vcrun6sp6", + "id" : "engines.wine.verbs.vcrun6sp6", + "compatibleOperatingSystems" : [ + "MACOSX", + "LINUX" + ], + "testingOperatingSystems" : [], + "free" : true, + "requiresPatch" : false +} diff --git a/docs/jsdoc/AppResource.html b/docs/jsdoc/AppResource.html index 2642a6fe94..aef89b5b98 100644 --- a/docs/jsdoc/AppResource.html +++ b/docs/jsdoc/AppResource.html @@ -483,7 +483,7 @@

Home

Classes