From 523527dc8d8c4bb0dfd346019e7971822b7110a4 Mon Sep 17 00:00:00 2001 From: Marc Arndt Date: Sun, 1 Sep 2019 00:15:15 +0200 Subject: [PATCH 1/8] - introduce the module system to the verbs with a first letter between a and d --- Applications/Games/Anno 2070/Local/script.js | 21 +- Applications/Games/Anno 2070/Uplay/script.js | 4 +- Applications/Games/Audiosurf/Steam/script.js | 4 +- .../Games/Blizzard app/Online/script.js | 4 +- .../Local/script.js | 4 +- .../Games/DC Universe Online/Online/script.js | 4 +- .../Online/script.js | 8 +- .../Games/Elite:Dangerous/Steam/script.js | 14 +- .../Games/GOG Galaxy/Online/script.js | 4 +- .../Games/Hearthstone/Online/script.js | 4 +- .../Heroes of the Storm/Online/script.js | 4 +- .../Steam/script.js | 4 +- .../Games/League of Legends/Online/script.js | 4 +- .../Games/Lego Rock Raiders/Local/script.js | 21 +- .../Online/script.js | 8 +- .../Niko: Through The Dream/Steam/script.js | 4 +- Applications/Games/Overwatch/Online/script.js | 8 +- .../PC Building Simulator/Steam/script.js | 4 +- .../Q.U.B.E: Director's Cut/Steam/script.js | 4 +- Applications/Games/RimWorld/Local/script.js | 8 +- Applications/Games/RimWorld/Steam/script.js | 8 +- .../Local/script.js | 4 +- .../Steam/script.js | 4 +- .../Online/script.js | 4 +- .../Games/Space Colony/Steam/script.js | 8 +- .../Games/Space Engineers/Steam/script.js | 44 ++- .../Games/Star Craft II/Online/script.js | 4 +- Applications/Games/Steam/Online/script.js | 4 +- .../Subnautica Below Zero/Steam/script.js | 8 +- Applications/Games/Subnautica/Steam/script.js | 8 +- Applications/Games/The Sims 3/Local/script.js | 4 +- Applications/Games/The Sims 3/Steam/script.js | 4 +- .../The Witcher 3: Wild Hunt/Steam/script.js | 9 +- .../Games/Total War Rome II/Steam/script.js | 4 +- .../Games/Unholy Heights/Steam/script.js | 4 +- Applications/Games/Uplay/Online/script.js | 4 +- .../Online/script.js | 4 +- .../Steam/script.js | 8 +- Applications/Games/osu!/Online/script.js | 8 +- .../Wine/QuickScript/Steam Script/script.js | 4 +- .../Wine/QuickScript/Uplay Script/script.js | 4 +- Engines/Wine/Verbs/D9VK/script.js | 151 ++++++---- Engines/Wine/Verbs/DXVK/script.js | 213 +++++++++----- Engines/Wine/Verbs/adobeair/script.js | 56 ++-- Engines/Wine/Verbs/amstream/script.js | 136 +++++---- Engines/Wine/Verbs/atmlib/script.js | 82 +++--- Engines/Wine/Verbs/corefonts/script.js | 274 +++++++++--------- Engines/Wine/Verbs/crypt32/script.js | 42 +-- Engines/Wine/Verbs/d3drm/script.js | 84 +++--- Engines/Wine/Verbs/d3dx10/script.js | 200 +++++++------ Engines/Wine/Verbs/d3dx11/script.js | 106 ++++++- Engines/Wine/Verbs/d3dx9/script.js | 249 ++++++++-------- Engines/Wine/Verbs/devenum/script.js | 90 +++--- Engines/Wine/Verbs/dotnet20/script.js | 97 ++++--- Engines/Wine/Verbs/dotnet20sp2/script.js | 123 ++++---- Engines/Wine/Verbs/dotnet40/script.js | 120 ++++---- Engines/Wine/Verbs/dotnet45/script.js | 107 ++++--- Engines/Wine/Verbs/dotnet452/script.js | 95 +++--- Engines/Wine/Verbs/dotnet46/script.js | 88 +++--- Engines/Wine/Verbs/dotnet461/script.js | 89 +++--- Engines/Wine/Verbs/dotnet462/script.js | 89 +++--- Engines/Wine/Verbs/dotnet472/script.js | 89 +++--- 62 files changed, 1623 insertions(+), 1250 deletions(-) diff --git a/Applications/Games/Anno 2070/Local/script.js b/Applications/Games/Anno 2070/Local/script.js index d33e46a7a5..001e8780d9 100644 --- a/Applications/Games/Anno 2070/Local/script.js +++ b/Applications/Games/Anno 2070/Local/script.js @@ -1,11 +1,11 @@ const LocalInstallerScript = include("engines.wine.quick_script.local_installer_script"); -const {touch, writeToFile, chmod} = include("utils.functions.filesystem.files"); +const { touch, writeToFile, chmod } = include("utils.functions.filesystem.files"); include("engines.wine.plugins.virtual_desktop"); include("engines.wine.plugins.override_dll"); -include("engines.wine.verbs.corefonts"); -include("engines.wine.verbs.crypt32"); -include("engines.wine.verbs.d3dx10"); +const Corefonts = include("engines.wine.verbs.corefonts"); +const Crypt32 = include("engines.wine.verbs.crypt32"); +const D3DX10 = include("engines.wine.verbs.d3dx10"); new LocalInstallerScript() .name("Anno 2070") @@ -16,17 +16,16 @@ new LocalInstallerScript() .executable("Anno5.exe") .wineVersion("3.16") .wineDistribution("upstream") - .preInstall(function (wine) { + .preInstall(function(wine) { wine.setVirtualDesktop(); - wine.crypt32(); - wine.corefonts(); - wine.d3dx10(); - wine - .overrideDLL() + new Crypt32(wine).go(); + new Corefonts(wine).go(); + new D3DX10(wine).go(); + wine.overrideDLL() .set("native, builtin", ["winhttp", "msvcrt40", "msvcr100", "crypt32"]) .do(); }) - .postInstall(function (wine) { + .postInstall(function(wine) { var versionFile = wine.prefixDirectory() + "/drive_c/Ubisoft/Related Designs/ANNO 2070/update/version.txt"; touch(versionFile); writeToFile( diff --git a/Applications/Games/Anno 2070/Uplay/script.js b/Applications/Games/Anno 2070/Uplay/script.js index e06786875c..44ed3dd27e 100644 --- a/Applications/Games/Anno 2070/Uplay/script.js +++ b/Applications/Games/Anno 2070/Uplay/script.js @@ -1,6 +1,6 @@ const UplayScript = include("engines.wine.quick_script.uplay_script"); -include("engines.wine.verbs.corefonts"); +const Corefonts = include("engines.wine.verbs.corefonts"); include("engines.wine.plugins.virtual_desktop"); new UplayScript() @@ -13,5 +13,5 @@ new UplayScript() .appId(22) .preInstall(function (wine /*, wizard*/) { wine.setVirtualDesktop(); - wine.corefonts(); + new Corefonts(wine).go(); }); diff --git a/Applications/Games/Audiosurf/Steam/script.js b/Applications/Games/Audiosurf/Steam/script.js index fa19015cb3..00c5929f89 100644 --- a/Applications/Games/Audiosurf/Steam/script.js +++ b/Applications/Games/Audiosurf/Steam/script.js @@ -1,6 +1,6 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); include("engines.wine.verbs.quicktime76"); -include("engines.wine.verbs.corefonts"); +const Corefonts = include("engines.wine.verbs.corefonts"); include("engines.wine.verbs.tahoma"); new SteamScript() @@ -10,6 +10,6 @@ new SteamScript() .appId(12900) .preInstall(function (wine /*, wizard*/) { wine.quicktime76(); - wine.corefonts(); + new Corefonts(wine).go(); wine.tahoma(); }); diff --git a/Applications/Games/Blizzard app/Online/script.js b/Applications/Games/Blizzard app/Online/script.js index 1c87463cb7..c7ff218387 100644 --- a/Applications/Games/Blizzard app/Online/script.js +++ b/Applications/Games/Blizzard app/Online/script.js @@ -1,6 +1,6 @@ const OnlineInstallerScript = include("engines.wine.quick_script.online_installer_script"); include("engines.wine.verbs.vcrun2015"); -include("engines.wine.verbs.corefonts"); +const Corefonts = include("engines.wine.verbs.corefonts"); new OnlineInstallerScript() .name("Blizzard app") @@ -16,5 +16,5 @@ new OnlineInstallerScript() .wineDistribution("staging") .preInstall(function (wine /*, wizard*/) { wine.vcrun2015(); - wine.corefonts(); + new Corefonts(wine).go(); }); diff --git a/Applications/Games/Command and Conquer - Tiberium Wars/Local/script.js b/Applications/Games/Command and Conquer - Tiberium Wars/Local/script.js index 79babe2b94..cf77e55e82 100644 --- a/Applications/Games/Command and Conquer - Tiberium Wars/Local/script.js +++ b/Applications/Games/Command and Conquer - Tiberium Wars/Local/script.js @@ -3,7 +3,7 @@ const {LATEST_STAGING_VERSION} = include("engines.wine.engine.versions"); include("engines.wine.plugins.csmt"); include("engines.wine.plugins.windows_version"); -include("engines.wine.verbs.d3dx9"); +const D3DX9 = include("engines.wine.verbs.d3dx9"); new LocalInstallerScript() .name("Command and Conquer - Tiberium Wars") @@ -15,6 +15,6 @@ new LocalInstallerScript() .wineDistribution("staging") .preInstall(function (wine /*, wizard*/) { wine.windowsVersion("winxp"); - wine.d3dx9(); + new D3DX9(wine).go(); wine.enableCSMT(); }); diff --git a/Applications/Games/DC Universe Online/Online/script.js b/Applications/Games/DC Universe Online/Online/script.js index 57328bdc1d..23b93efd55 100644 --- a/Applications/Games/DC Universe Online/Online/script.js +++ b/Applications/Games/DC Universe Online/Online/script.js @@ -1,6 +1,6 @@ const OnlineInstallerScript = include("engines.wine.quick_script.online_installer_script"); include("engines.wine.verbs.vcrun2012"); -include("engines.wine.verbs.d3dx9"); +const D3DX9 = include("engines.wine.verbs.d3dx9"); new OnlineInstallerScript() .name("DC Universe Online") @@ -12,5 +12,5 @@ new OnlineInstallerScript() .executable("LaunchPad.exe") .preInstall(function (wine /*, wizard*/) { wine.vcrun2012(); - wine.d3dx9(); + new D3DX9(wine).go(); }); diff --git a/Applications/Games/Earth Eternal - Valkal's Shadow/Online/script.js b/Applications/Games/Earth Eternal - Valkal's Shadow/Online/script.js index 3aa44d3ab8..633b0e3307 100644 --- a/Applications/Games/Earth Eternal - Valkal's Shadow/Online/script.js +++ b/Applications/Games/Earth Eternal - Valkal's Shadow/Online/script.js @@ -2,8 +2,8 @@ const OnlineInstallerScript = include("engines.wine.quick_script.online_installe const {LATEST_STAGING_VERSION} = include("engines.wine.engine.versions"); include("engines.wine.plugins.windows_version"); -include("engines.wine.verbs.corefonts"); -include("engines.wine.verbs.d3dx9"); +const Corefonts = include("engines.wine.verbs.corefonts"); +const D3DX9 = include("engines.wine.verbs.d3dx9"); include("engines.wine.verbs.vcrun2008"); new OnlineInstallerScript() @@ -19,7 +19,7 @@ new OnlineInstallerScript() .wineDistribution("staging") .preInstall(function (wine /*, wizard*/) { wine.windowsVersion("winxp"); - wine.corefonts(); - wine.d3dx9(); + new Corefonts(wine).go(); + new D3DX9(wine).go(); wine.vcrun2008(); }); diff --git a/Applications/Games/Elite:Dangerous/Steam/script.js b/Applications/Games/Elite:Dangerous/Steam/script.js index f11e544a7d..af2e8f62d2 100644 --- a/Applications/Games/Elite:Dangerous/Steam/script.js +++ b/Applications/Games/Elite:Dangerous/Steam/script.js @@ -1,19 +1,19 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); -include("engines.wine.verbs.corefonts"); -include("engines.wine.verbs.dotnet45"); +const Corefonts = include("engines.wine.verbs.corefonts"); +const DotNET45 = include("engines.wine.verbs.dotnet45"); include("engines.wine.verbs.vcrun2015"); -include("engines.wine.verbs.dxvk"); +const DXVK = include("engines.wine.verbs.dxvk"); new SteamScript() .name("Elite:Dangerous") .editor("Frontier Developments") .author("ImperatorS79") .wineArchitecture("amd64") - .preInstall(function (wine /*, wizard*/) { - wine.dotnet45(); - wine.corefonts(); + .preInstall(function(wine /*, wizard*/) { + new DotNET45(wine).go(); + new Corefonts(wine).go(); wine.vcrun2015(); - wine.DXVK(); + new DXVK(wine).go(); }) .appId(359320); diff --git a/Applications/Games/GOG Galaxy/Online/script.js b/Applications/Games/GOG Galaxy/Online/script.js index cac6089505..029ba0d2e6 100644 --- a/Applications/Games/GOG Galaxy/Online/script.js +++ b/Applications/Games/GOG Galaxy/Online/script.js @@ -2,7 +2,7 @@ const OnlineInstallerScript = include("engines.wine.quick_script.online_installe const {LATEST_STAGING_VERSION} = include("engines.wine.engine.versions"); const {remove, lns} = include("utils.functions.filesystem.files"); -include("engines.wine.verbs.corefonts"); +const Corefonts = include("engines.wine.verbs.corefonts"); include("engines.wine.verbs.vcrun2017"); include("engines.wine.verbs.xact"); @@ -19,7 +19,7 @@ new OnlineInstallerScript() .wineVersion(LATEST_STAGING_VERSION) .wineDistribution("staging") .preInstall(function (wine /*, wizard*/) { - wine.corefonts(); + new Corefonts(wine).go(); wine.vcrun2017(); // Probably needed for self-updater wine.xact(); // Required by a couple of games diff --git a/Applications/Games/Hearthstone/Online/script.js b/Applications/Games/Hearthstone/Online/script.js index d03168076d..6095f71396 100644 --- a/Applications/Games/Hearthstone/Online/script.js +++ b/Applications/Games/Hearthstone/Online/script.js @@ -2,7 +2,7 @@ const OnlineInstallerScript = include("engines.wine.quick_script.online_installe const {LATEST_STAGING_VERSION} = include("engines.wine.engine.versions"); include("engines.wine.verbs.vcrun2015"); -include("engines.wine.verbs.corefonts"); +const Corefonts = include("engines.wine.verbs.corefonts"); new OnlineInstallerScript() .name("Hearthstone") @@ -16,5 +16,5 @@ new OnlineInstallerScript() .wineDistribution("staging") .preInstall(function (wine /*, wizard*/) { wine.vcrun2015(); - wine.corefonts(); + new Corefonts(wine).go(); }); diff --git a/Applications/Games/Heroes of the Storm/Online/script.js b/Applications/Games/Heroes of the Storm/Online/script.js index e96431a03c..03a3303ee6 100644 --- a/Applications/Games/Heroes of the Storm/Online/script.js +++ b/Applications/Games/Heroes of the Storm/Online/script.js @@ -3,7 +3,7 @@ const {LATEST_STAGING_VERSION} = include("engines.wine.engine.versions"); include("engines.wine.plugins.windows_version"); include("engines.wine.verbs.vcrun2015"); -include("engines.wine.verbs.corefonts"); +const Corefonts = include("engines.wine.verbs.corefonts"); new OnlineInstallerScript() .name("Heroes of the Storm") @@ -19,5 +19,5 @@ new OnlineInstallerScript() .preInstall(function (wine /*, wizard*/) { wine.windowsVersion("winxp"); wine.vcrun2015(); - wine.corefonts(); + new Corefonts(wine).go(); }); diff --git a/Applications/Games/It came from space and ate our brains/Steam/script.js b/Applications/Games/It came from space and ate our brains/Steam/script.js index dbc54270cd..4e34bbdccb 100644 --- a/Applications/Games/It came from space and ate our brains/Steam/script.js +++ b/Applications/Games/It came from space and ate our brains/Steam/script.js @@ -1,6 +1,6 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); -include("engines.wine.verbs.d3dx10"); +const D3DX10 = include("engines.wine.verbs.d3dx10"); new SteamScript() .name("It came from space, and ate our brains") @@ -8,5 +8,5 @@ new SteamScript() .author("madoar") .appId(342620) .preInstall(function (wine /*, wizard*/) { - wine.d3dx10(); + new D3DX10(wine).go(); }); diff --git a/Applications/Games/League of Legends/Online/script.js b/Applications/Games/League of Legends/Online/script.js index 30590ba83d..0b4dcd3bef 100644 --- a/Applications/Games/League of Legends/Online/script.js +++ b/Applications/Games/League of Legends/Online/script.js @@ -7,7 +7,7 @@ include("engines.wine.plugins.csmt"); include("engines.wine.plugins.override_dll"); include("engines.wine.plugins.windows_version"); include("engines.wine.verbs.sandbox"); -include("engines.wine.verbs.d3dx9"); +const D3DX9 = include("engines.wine.verbs.d3dx9"); // Installs League of Legends @@ -100,7 +100,7 @@ new CustomInstallerScript() .wineVersion(LATEST_STAGING_VERSION) .preInstall(function (wine /*, wizard*/) { wine.windowsVersion("winxp"); - wine.d3dx9(); + new D3DX9(wine).go(); wine .overrideDLL() .set("native, builtin", ["atl120", "msvcp120", "msvcr120", "vcomp120", "msvcp140"]) diff --git a/Applications/Games/Lego Rock Raiders/Local/script.js b/Applications/Games/Lego Rock Raiders/Local/script.js index e3babe66ac..0c399e6fbc 100644 --- a/Applications/Games/Lego Rock Raiders/Local/script.js +++ b/Applications/Games/Lego Rock Raiders/Local/script.js @@ -1,11 +1,11 @@ const LocalInstallerScript = include("engines.wine.quick_script.local_installer_script"); const Downloader = include("utils.functions.net.download"); -const {Extractor} = include("utils.functions.filesystem.extract"); +const { Extractor } = include("utils.functions.filesystem.extract"); -include("engines.wine.verbs.amstream"); +const Amstream = include("engines.wine.verbs.amstream"); include("engines.wine.verbs.quartz"); -include("engines.wine.verbs.devenum"); -include("engines.wine.verbs.d3drm"); +const Devenum = include("engines.wine.verbs.devenum"); +const D3drm = include("engines.wine.verbs.d3drm"); new LocalInstallerScript() .name("Lego Rock Raiders") @@ -15,14 +15,17 @@ new LocalInstallerScript() .executable("LegoRR.exe") .wineVersion("3.0.3") .wineDistribution("upstream") - .preInstall(function (wine, wizard) { - wine.amstream(); + .preInstall(function(wine, wizard) { + new Amstream(wine).go(); + wine.quartz(); - wine.devenum(); - wine.d3drm(); + + new Devenum(wine).go(); + new D3drm(wine).go(); + wizard.message(tr("When the game ask to install DirectX Media click yes. Click no when it ask for DirectX 6.")); }) - .postInstall(function (wine, wizard) { + .postInstall(function(wine, wizard) { wizard.message( tr( "This game needs a copy protection patch to work. It may be illegal in your country to patch copy protection. You must patch the game yourself." diff --git a/Applications/Games/Magic The Gathering Arena/Online/script.js b/Applications/Games/Magic The Gathering Arena/Online/script.js index 86875a4569..441c23d18c 100644 --- a/Applications/Games/Magic The Gathering Arena/Online/script.js +++ b/Applications/Games/Magic The Gathering Arena/Online/script.js @@ -1,7 +1,7 @@ const OnlineInstallerScript = include("engines.wine.quick_script.online_installer_script"); -const {LATEST_STAGING_VERSION} = include("engines.wine.engine.versions"); +const { LATEST_STAGING_VERSION } = include("engines.wine.engine.versions"); -include("engines.wine.verbs.dxvk"); +const DXVK = include("engines.wine.verbs.dxvk"); include("engines.wine.plugins.usetakefocus"); new OnlineInstallerScript() @@ -12,8 +12,8 @@ new OnlineInstallerScript() .category("Games") .wineDistribution("staging") .wineVersion(LATEST_STAGING_VERSION) - .preInstall(function (wine /*, wizard*/) { - wine.DXVK(); + .preInstall(function(wine /*, wizard*/) { + new DXVK(wine).go(); wine.UseTakeFocus("N"); }) .executable("MtgaLauncher.exe"); diff --git a/Applications/Games/Niko: Through The Dream/Steam/script.js b/Applications/Games/Niko: Through The Dream/Steam/script.js index ae4933a52d..34903db857 100644 --- a/Applications/Games/Niko: Through The Dream/Steam/script.js +++ b/Applications/Games/Niko: Through The Dream/Steam/script.js @@ -1,6 +1,6 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); include("engines.wine.plugins.managed"); -include("engines.wine.verbs.dotnet40"); +const DotNET40 = include("engines.wine.verbs.dotnet40"); new SteamScript() .name("Niko: Through The Dream") @@ -8,7 +8,7 @@ new SteamScript() .author("Plata") .appId(296550) .postInstall(function (wine /*, wizard*/) { - wine.dotnet40(); + new DotNET40(wine).go(); wine .setManagedForApplication() .set("NIKO.exe", false) diff --git a/Applications/Games/Overwatch/Online/script.js b/Applications/Games/Overwatch/Online/script.js index bd61d6a9fa..b37224bc2c 100644 --- a/Applications/Games/Overwatch/Online/script.js +++ b/Applications/Games/Overwatch/Online/script.js @@ -4,8 +4,8 @@ const {LATEST_STAGING_VERSION} = include("engines.wine.engine.versions"); include("engines.wine.plugins.windows_version"); include("engines.wine.plugins.override_dll"); include("engines.wine.verbs.vcrun2015"); -include("engines.wine.verbs.corefonts"); -include("engines.wine.verbs.dxvk"); +const Corefonts = include("engines.wine.verbs.corefonts"); +const DXVK = include("engines.wine.verbs.dxvk"); new OnlineInstallerScript() .name("Overwatch") @@ -22,10 +22,10 @@ new OnlineInstallerScript() .preInstall(function (wine /*, wizard*/) { wine.windowsVersion("win7"); wine.vcrun2015(); - wine.corefonts(); + new Corefonts(wine).go(); wine .overrideDLL() .set("disabled", ["nvapi", "nvapi64"]) .do(); - wine.DXVK(); + new DXVK(wine).go(); }); diff --git a/Applications/Games/PC Building Simulator/Steam/script.js b/Applications/Games/PC Building Simulator/Steam/script.js index 750dcc015c..45231debb7 100644 --- a/Applications/Games/PC Building Simulator/Steam/script.js +++ b/Applications/Games/PC Building Simulator/Steam/script.js @@ -2,7 +2,7 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); const {LATEST_DEVELOPMENT_VERSION} = include("engines.wine.engine.versions"); include("engines.wine.plugins.virtual_desktop"); -include("engines.wine.verbs.corefonts"); +const Corefonts = include("engines.wine.verbs.corefonts"); new SteamScript() @@ -19,7 +19,7 @@ new SteamScript() "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(); + new Corefonts(wine).go(); wine.setVirtualDesktop(); }) .gameOverlay(false); diff --git a/Applications/Games/Q.U.B.E: Director's Cut/Steam/script.js b/Applications/Games/Q.U.B.E: Director's Cut/Steam/script.js index 533f2c7e67..0206194f73 100644 --- a/Applications/Games/Q.U.B.E: Director's Cut/Steam/script.js +++ b/Applications/Games/Q.U.B.E: Director's Cut/Steam/script.js @@ -1,5 +1,5 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); -include("engines.wine.verbs.dotnet40"); +const DotNET40 = include("engines.wine.verbs.dotnet40"); new SteamScript() .name("QUBE: Director's Cut") @@ -7,5 +7,5 @@ new SteamScript() .author("Plata") .appId(239430) .preInstall(function (wine /*, wizard*/) { - wine.dotnet40(); + new DotNET40(wine).go(); }); diff --git a/Applications/Games/RimWorld/Local/script.js b/Applications/Games/RimWorld/Local/script.js index 950289572b..179dab6431 100644 --- a/Applications/Games/RimWorld/Local/script.js +++ b/Applications/Games/RimWorld/Local/script.js @@ -1,7 +1,7 @@ const LocalInstallerScript = include("engines.wine.quick_script.local_installer_script"); include("engines.wine.verbs.vcrun2017"); -include("engines.wine.verbs.d3dx9"); -include("engines.wine.verbs.corefonts"); +const D3DX9 = include("engines.wine.verbs.d3dx9"); +const Corefonts = include("engines.wine.verbs.corefonts"); new LocalInstallerScript() .name("RimWorld") @@ -12,6 +12,6 @@ new LocalInstallerScript() .executable("RimWorld.exe") .preInstall(function (wine) { wine.vcrun2017(); - wine.d3dx9(); - wine.corefonts(); + new D3DX9(wine).go(); + new Corefonts(wine).go(); }); diff --git a/Applications/Games/RimWorld/Steam/script.js b/Applications/Games/RimWorld/Steam/script.js index 90c3da90b5..dc5abc0bc8 100644 --- a/Applications/Games/RimWorld/Steam/script.js +++ b/Applications/Games/RimWorld/Steam/script.js @@ -1,7 +1,7 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); include("engines.wine.verbs.vcrun2017"); -include("engines.wine.verbs.d3dx9"); -include("engines.wine.verbs.corefonts"); +const D3DX9 = include("engines.wine.verbs.d3dx9"); +const Corefonts = include("engines.wine.verbs.corefonts"); new SteamScript() .name("RimWorld") @@ -11,7 +11,7 @@ new SteamScript() .wineArchitecture("amd64") .appId(294100) .preInstall(function (wine) { - wine.corefonts(); + new Corefonts(wine).go(); wine.vcrun2017(); - wine.d3dx9(); + new D3DX9(wine).go(); }); diff --git a/Applications/Games/STAR WARS - Empire at War - Gold Pack/Local/script.js b/Applications/Games/STAR WARS - Empire at War - Gold Pack/Local/script.js index d265e1c33d..37682923cb 100644 --- a/Applications/Games/STAR WARS - Empire at War - Gold Pack/Local/script.js +++ b/Applications/Games/STAR WARS - Empire at War - Gold Pack/Local/script.js @@ -1,7 +1,7 @@ const LocalInstallerScript = include("engines.wine.quick_script.local_installer_script"); const Downloader = include("utils.functions.net.download"); -include("engines.wine.verbs.d3dx9"); +const D3DX9 = include("engines.wine.verbs.d3dx9"); new LocalInstallerScript() .name("STAR WARS™ Empire at War: Gold Pack") @@ -10,7 +10,7 @@ new LocalInstallerScript() .category("Games") .executable("LaunchEAW.exe") .preInstall(function (wine/*, wizard */) { - wine.d3dx9(); + new D3DX9(wine).go(); }) .postInstall(function (wine, wizard) { new Downloader() diff --git a/Applications/Games/STAR WARS - Empire at War - Gold Pack/Steam/script.js b/Applications/Games/STAR WARS - Empire at War - Gold Pack/Steam/script.js index 8cebbd2e77..11a2dade4c 100644 --- a/Applications/Games/STAR WARS - Empire at War - Gold Pack/Steam/script.js +++ b/Applications/Games/STAR WARS - Empire at War - Gold Pack/Steam/script.js @@ -1,5 +1,5 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); -include("engines.wine.verbs.d3dx9"); +const D3DX9 = include("engines.wine.verbs.d3dx9"); new SteamScript() .name("STAR WARS™ Empire at War: Gold Pack") @@ -7,5 +7,5 @@ new SteamScript() .author("ImperatorS79") .appId(32470) .preInstall(function (wine /*, wizard*/) { - wine.d3dx9(); + new D3DX9(wine).go(); }); diff --git a/Applications/Games/STAR WARS: The Old Republic/Online/script.js b/Applications/Games/STAR WARS: The Old Republic/Online/script.js index fa807d6d67..dda359d21b 100644 --- a/Applications/Games/STAR WARS: The Old Republic/Online/script.js +++ b/Applications/Games/STAR WARS: The Old Republic/Online/script.js @@ -2,7 +2,7 @@ const OnlineInstallerScript = include("engines.wine.quick_script.online_installe const {writeToFile} = include("utils.functions.filesystem.files"); const {LATEST_STAGING_VERSION} = include("engines.wine.engine.versions"); -include("engines.wine.verbs.d3dx9"); +const D3DX9 = include("engines.wine.verbs.d3dx9"); new OnlineInstallerScript() .name("STAR WARS™: The Old Republic") @@ -17,7 +17,7 @@ new OnlineInstallerScript() .executable("launcher.exe") .preInstall(function (wine /*, wizard*/) { //it seems it brings better performance - wine.d3dx9(); + new D3DX9(wine).go(); }) .postInstall(function (wine /*, wizard*/) { //without that the launcher is unable to download the game diff --git a/Applications/Games/Space Colony/Steam/script.js b/Applications/Games/Space Colony/Steam/script.js index f46597bd02..0cc34c3e53 100644 --- a/Applications/Games/Space Colony/Steam/script.js +++ b/Applications/Games/Space Colony/Steam/script.js @@ -2,8 +2,8 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); const {LATEST_DEVELOPMENT_VERSION} = include("engines.wine.engine.versions"); include("engines.wine.verbs.vcrun2010"); -include("engines.wine.verbs.dotnet40"); -include("engines.wine.verbs.d3dx9"); +const DotNET40 = include("engines.wine.verbs.dotnet40"); +const D3DX9 = include("engines.wine.verbs.d3dx9"); new SteamScript() .name("Space Colony") @@ -14,6 +14,6 @@ new SteamScript() .appId(297920) .preInstall(function (wine) { wine.vcrun2010(); - wine.dotnet40(); - wine.d3dx9(); + new DotNET40(wine).go(); + new D3DX9(wine).go(); }); diff --git a/Applications/Games/Space Engineers/Steam/script.js b/Applications/Games/Space Engineers/Steam/script.js index d7ce0b08dd..d8d43c565e 100644 --- a/Applications/Games/Space Engineers/Steam/script.js +++ b/Applications/Games/Space Engineers/Steam/script.js @@ -1,7 +1,8 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); -include("engines.wine.verbs.dotnet472"); + +const DotNET472 = include("engines.wine.verbs.dotnet472"); include("engines.wine.verbs.vcrun2017"); -include("engines.wine.verbs.dxvk"); +const DXVK = include("engines.wine.verbs.dxvk"); include("engines.wine.verbs.faudio"); include("engines.wine.plugins.override_dll"); @@ -13,15 +14,40 @@ new SteamScript() .wineVersion("4.14") .wineDistribution("upstream") .wineArchitecture("amd64") - .preInstall(function (wine, wizard) { - wine.dotnet472(); + .preInstall(function(wine, wizard) { + new DotNET472(wine).go(); wine.vcrun2017(); - wine.DXVK(); + new DXVK(wine).go(); wine.faudio(); wine.overrideDLL() - .set("native, builtin", ["msvcr120", "xaudio2_0", "xaudio2_1", "xaudio2_2", "xaudio2_3", "xaudio2_4", "xaudio2_5", "xaudio2_6", "xaudio2_7", "xaudio2_8", "xaudio2_9", "x3daudio1_3", "x3daudio1_4", "x3daudio1_5", "x3daudio1_6", "x3daudio1_7"]) + .set("native, builtin", [ + "msvcr120", + "xaudio2_0", + "xaudio2_1", + "xaudio2_2", + "xaudio2_3", + "xaudio2_4", + "xaudio2_5", + "xaudio2_6", + "xaudio2_7", + "xaudio2_8", + "xaudio2_9", + "x3daudio1_3", + "x3daudio1_4", + "x3daudio1_5", + "x3daudio1_6", + "x3daudio1_7" + ]) .do(); - wizard.message(tr("You have to install libjpeg62 and libjpeg62-dev or else the thumbnails in New Game menu will be dispalyed as magenta rectangles.")); - wizard.message(tr("Due to JIT compiler issues and the way this game uses multithreating, there are audio stutters. This script will attempt to minimize them but you might also have to enter the alsoft-conf command in terminal and set sample depth to 32bit float and period size to 2048.")); + wizard.message( + tr( + "You have to install libjpeg62 and libjpeg62-dev or else the thumbnails in New Game menu will be dispalyed as magenta rectangles." + ) + ); + wizard.message( + tr( + "Due to JIT compiler issues and the way this game uses multithreating, there are audio stutters. This script will attempt to minimize them but you might also have to enter the alsoft-conf command in terminal and set sample depth to 32bit float and period size to 2048." + ) + ); }) - .executable("Steam.exe", ["-silent", "-applaunch", "244850", "-no-cef-sandbox", "-skipintro"]) + .executable("Steam.exe", ["-silent", "-applaunch", "244850", "-no-cef-sandbox", "-skipintro"]); diff --git a/Applications/Games/Star Craft II/Online/script.js b/Applications/Games/Star Craft II/Online/script.js index 1cec491f82..3b61901b88 100644 --- a/Applications/Games/Star Craft II/Online/script.js +++ b/Applications/Games/Star Craft II/Online/script.js @@ -1,6 +1,6 @@ const OnlineInstallerScript = include("engines.wine.quick_script.online_installer_script"); include("engines.wine.verbs.vcrun2015"); -include("engines.wine.verbs.corefonts"); +const Corefonts = include("engines.wine.verbs.corefonts"); new OnlineInstallerScript() .name("Star Craft II") @@ -13,5 +13,5 @@ new OnlineInstallerScript() .executable("Battle.net.exe") .preInstall(function (wine /*, wizard*/) { wine.vcrun2015(); - wine.corefonts(); + new Corefonts(wine).go(); }); diff --git a/Applications/Games/Steam/Online/script.js b/Applications/Games/Steam/Online/script.js index 795b0b4027..1ce97d57da 100644 --- a/Applications/Games/Steam/Online/script.js +++ b/Applications/Games/Steam/Online/script.js @@ -1,7 +1,7 @@ const OnlineInstallerScript = include("engines.wine.quick_script.online_installer_script"); const {LATEST_STAGING_VERSION} = include("engines.wine.engine.versions"); -include("engines.wine.verbs.corefonts"); +const Corefonts = include("engines.wine.verbs.corefonts"); include("engines.wine.plugins.windows_version"); new OnlineInstallerScript() @@ -23,6 +23,6 @@ new OnlineInstallerScript() .setOsForApplication() .set("steamwebhelper.exe", "winxp") .do(); - wine.corefonts(); + new Corefonts(wine).go(); }) .executable("Steam.exe", ["-no-cef-sandbox"]); diff --git a/Applications/Games/Subnautica Below Zero/Steam/script.js b/Applications/Games/Subnautica Below Zero/Steam/script.js index 7b415e70e7..4a8fbd415e 100644 --- a/Applications/Games/Subnautica Below Zero/Steam/script.js +++ b/Applications/Games/Subnautica Below Zero/Steam/script.js @@ -3,8 +3,8 @@ const {LATEST_STABLE_VERSION} = include("engines.wine.engine.versions"); include("engines.wine.plugins.virtual_desktop"); include("engines.wine.verbs.vcrun2013"); -include("engines.wine.verbs.corefonts"); -include("engines.wine.verbs.dxvk"); +const Corefonts = include("engines.wine.verbs.corefonts"); +const DXVK = include("engines.wine.verbs.dxvk"); new SteamScript() .name("Subnautica Below Zero") @@ -20,8 +20,8 @@ new SteamScript() tr("You can make the game smoother by using this: https://github.com/lutris/lutris/wiki/How-to:-Esync") ); wine.vcrun2013(); - wine.corefonts(); - wine.DXVK(); + new Corefonts(wine).go(); + new DXVK(wine).go(); wine.setVirtualDesktop(); }) .gameOverlay(false); diff --git a/Applications/Games/Subnautica/Steam/script.js b/Applications/Games/Subnautica/Steam/script.js index c084fd03a1..e59dd6d4ee 100644 --- a/Applications/Games/Subnautica/Steam/script.js +++ b/Applications/Games/Subnautica/Steam/script.js @@ -3,8 +3,8 @@ const {LATEST_STABLE_VERSION} = include("engines.wine.engine.versions"); include("engines.wine.plugins.virtual_desktop"); include("engines.wine.verbs.vcrun2013"); -include("engines.wine.verbs.corefonts"); -include("engines.wine.verbs.dxvk"); +const Corefonts = include("engines.wine.verbs.corefonts"); +const DXVK = include("engines.wine.verbs.dxvk"); new SteamScript() .name("Subnautica") @@ -20,8 +20,8 @@ new SteamScript() tr("You can make the game smoother by using this: https://github.com/lutris/lutris/wiki/How-to:-Esync") ); wine.vcrun2013(); - wine.corefonts(); - wine.DXVK(); + new Corefonts(wine).go(); + new DXVK(wine).go(); wine.setVirtualDesktop(); }) .postInstall(function (wine, wizard) { diff --git a/Applications/Games/The Sims 3/Local/script.js b/Applications/Games/The Sims 3/Local/script.js index bcfee1977c..7c6f7998ce 100644 --- a/Applications/Games/The Sims 3/Local/script.js +++ b/Applications/Games/The Sims 3/Local/script.js @@ -3,7 +3,7 @@ const LocalInstallerScript = include("engines.wine.quick_script.local_installer_ include("engines.wine.verbs.vcrun2010"); include("engines.wine.verbs.tahoma"); include("engines.wine.verbs.mfc42"); -include("engines.wine.verbs.dotnet20"); +const DotNET20 = include("engines.wine.verbs.dotnet20"); new LocalInstallerScript() .name("The Sims 3") @@ -16,5 +16,5 @@ new LocalInstallerScript() wine.mfc42(); wine.tahoma(); wine.vcrun2010(); - wine.dotnet20(); + new DotNET20(wine).go(); }); diff --git a/Applications/Games/The Sims 3/Steam/script.js b/Applications/Games/The Sims 3/Steam/script.js index 71a44b4094..f1338c3e34 100644 --- a/Applications/Games/The Sims 3/Steam/script.js +++ b/Applications/Games/The Sims 3/Steam/script.js @@ -1,6 +1,6 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); -include("engines.wine.verbs.dotnet20"); +const DotNET20 = include("engines.wine.verbs.dotnet20"); include("engines.wine.verbs.vcrun2010"); include("engines.wine.verbs.tahoma"); include("engines.wine.verbs.mfc42"); @@ -14,7 +14,7 @@ new SteamScript() .wineVersion("4.0-rc2") .appId(47890) .preInstall(function (wine /*, wizard*/) { - wine.dotnet20(); + new DotNET20(wine).go(); wine.mfc42(); wine.tahoma(); wine.vcrun2010(); diff --git a/Applications/Games/The Witcher 3: Wild Hunt/Steam/script.js b/Applications/Games/The Witcher 3: Wild Hunt/Steam/script.js index 4056cfdd9b..9609e1ca72 100644 --- a/Applications/Games/The Witcher 3: Wild Hunt/Steam/script.js +++ b/Applications/Games/The Witcher 3: Wild Hunt/Steam/script.js @@ -1,7 +1,7 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); -const {LATEST_STAGING_VERSION} = include("engines.wine.engine.versions"); +const { LATEST_STAGING_VERSION } = include("engines.wine.engine.versions"); -include("engines.wine.verbs.dxvk"); +const DXVK = include("engines.wine.verbs.dxvk"); new SteamScript() .name("The Witcher 3: Wild Hunt") @@ -11,11 +11,12 @@ new SteamScript() .wineDistribution("staging") .wineArchitecture("amd64") .appId(292030) - .preInstall(function (wine, wizard) { + .preInstall(function(wine, wizard) { wizard.message( tr( "Please ensure you have the latest drivers (415.25 minimum for NVIDIA and mesa 19 for AMD) or else this game will not work." ) ); - wine.DXVK(); + + new DXVK(wine).go(); }); diff --git a/Applications/Games/Total War Rome II/Steam/script.js b/Applications/Games/Total War Rome II/Steam/script.js index 67586821df..f133532191 100644 --- a/Applications/Games/Total War Rome II/Steam/script.js +++ b/Applications/Games/Total War Rome II/Steam/script.js @@ -1,7 +1,7 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); const {LATEST_STAGING_VERSION} = include("engines.wine.engine.versions"); -include("engines.wine.verbs.d3dx9"); +const D3DX9 = include("engines.wine.verbs.d3dx9"); include("engines.wine.verbs.vcrun2005"); include("engines.wine.verbs.vcrun2008"); include("engines.wine.verbs.vcrun2010"); @@ -14,7 +14,7 @@ new SteamScript() .wineVersion(LATEST_STAGING_VERSION) .wineDistribution("staging") .postInstall(function (wine, wizard) { - wine.d3dx9(); + new D3DX9(wine).go(); wine.vcrun2005(); wine.vcrun2008(); wine.vcrun2010(); diff --git a/Applications/Games/Unholy Heights/Steam/script.js b/Applications/Games/Unholy Heights/Steam/script.js index fbb639b6f0..636c6a7241 100644 --- a/Applications/Games/Unholy Heights/Steam/script.js +++ b/Applications/Games/Unholy Heights/Steam/script.js @@ -1,7 +1,7 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); const {LATEST_STAGING_VERSION} = include("engines.wine.engine.versions"); -include("engines.wine.verbs.dotnet40"); +const DotNET40 = include("engines.wine.verbs.dotnet40"); new SteamScript() .name("Unholy Heights") @@ -11,5 +11,5 @@ new SteamScript() .wineVersion(LATEST_STAGING_VERSION) .wineDistribution("staging") .preInstall(function (wine /*, wizard*/) { - wine.dotnet40(); + new DotNET40(wine).go(); }); diff --git a/Applications/Games/Uplay/Online/script.js b/Applications/Games/Uplay/Online/script.js index 50175073e2..50682c6d11 100644 --- a/Applications/Games/Uplay/Online/script.js +++ b/Applications/Games/Uplay/Online/script.js @@ -2,7 +2,7 @@ const OnlineInstallerScript = include("engines.wine.quick_script.online_installe const {LATEST_STAGING_VERSION} = include("engines.wine.engine.versions"); include("engines.wine.plugins.windows_version"); -include("engines.wine.verbs.corefonts"); +const Corefonts = include("engines.wine.verbs.corefonts"); new OnlineInstallerScript() .name("Uplay") @@ -15,7 +15,7 @@ new OnlineInstallerScript() .wineVersion(LATEST_STAGING_VERSION) .wineDistribution("staging") .preInstall(function (wine /*, wizard*/) { - wine.corefonts(); + new Corefonts(wine).go(); wine .setOsForApplication() .set("upc.exe", "winvista") diff --git a/Applications/Games/Warcraft III Expansion Set/Online/script.js b/Applications/Games/Warcraft III Expansion Set/Online/script.js index 3175214141..813f3cfe32 100644 --- a/Applications/Games/Warcraft III Expansion Set/Online/script.js +++ b/Applications/Games/Warcraft III Expansion Set/Online/script.js @@ -3,7 +3,7 @@ const {LATEST_STAGING_VERSION} = include("engines.wine.engine.versions"); include("engines.wine.plugins.windows_version"); include("engines.wine.verbs.vcrun2015"); -include("engines.wine.verbs.corefonts"); +const Corefonts = include("engines.wine.verbs.corefonts"); new OnlineInstallerScript() .name("Warcraft III Expansion Set") @@ -18,6 +18,6 @@ new OnlineInstallerScript() .wineDistribution("staging") .preInstall(function (wine /*, wizard*/) { wine.windowsVersion("winxp"); - wine.corefonts(); + new Corefonts(wine).go(); wine.vcrun2015(); }); diff --git a/Applications/Games/Warlock - Master of the Arcane/Steam/script.js b/Applications/Games/Warlock - Master of the Arcane/Steam/script.js index ff014f703f..872d4f2859 100644 --- a/Applications/Games/Warlock - Master of the Arcane/Steam/script.js +++ b/Applications/Games/Warlock - Master of the Arcane/Steam/script.js @@ -1,8 +1,8 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); const {LATEST_STAGING_VERSION} = include("engines.wine.engine.versions"); -include("engines.wine.verbs.corefonts"); -include("engines.wine.verbs.d3dx9"); +const Corefonts = include("engines.wine.verbs.corefonts"); +const D3DX9 = include("engines.wine.verbs.d3dx9"); include("engines.wine.verbs.tahoma"); include("engines.wine.verbs.vcrun2005"); include("engines.wine.verbs.vcrun2008"); @@ -15,8 +15,8 @@ new SteamScript() .wineVersion(LATEST_STAGING_VERSION) .wineDistribution("staging") .preInstall(function (wine /*, wizard*/) { - wine.corefonts(); - wine.d3dx9(); + new Corefonts(wine).go(); + new D3DX9(wine).go(); wine.tahoma(); wine.vcrun2005(); wine.vcrun2008(); diff --git a/Applications/Games/osu!/Online/script.js b/Applications/Games/osu!/Online/script.js index f239e5f96b..05a5df54bb 100644 --- a/Applications/Games/osu!/Online/script.js +++ b/Applications/Games/osu!/Online/script.js @@ -1,8 +1,8 @@ const OnlineInstallerScript = include("engines.wine.quick_script.online_installer_script"); const {LATEST_DEVELOPMENT_VERSION} = include("engines.wine.engine.versions"); -include("engines.wine.verbs.dotnet45"); -include("engines.wine.verbs.corefonts"); +const DotNET45 = include("engines.wine.verbs.dotnet45"); +const Corefonts = include("engines.wine.verbs.corefonts"); new OnlineInstallerScript() .name("osu!") @@ -15,6 +15,6 @@ new OnlineInstallerScript() .url("https://m1.ppy.sh/r/osu!install.exe") .preInstall(function (wine /*, wizard*/) { //maybe needs cjkfonts or set sound driver to alsa - wine.corefonts(); - wine.dotnet45(); + new Corefonts(wine).go(); + new DotNET45(wine).go(); }); diff --git a/Engines/Wine/QuickScript/Steam Script/script.js b/Engines/Wine/QuickScript/Steam Script/script.js index 606ce6f73f..a30ccc9c30 100644 --- a/Engines/Wine/QuickScript/Steam Script/script.js +++ b/Engines/Wine/QuickScript/Steam Script/script.js @@ -4,7 +4,7 @@ const Wine = include("engines.wine.engine.object"); const {cat, fileExists, writeToFile, createTempFile} = include("utils.functions.filesystem.files"); include("engines.wine.verbs.luna"); -include("engines.wine.verbs.corefonts"); +const Corefonts = include("engines.wine.verbs.corefonts"); include("engines.wine.plugins.override_dll"); include("engines.wine.plugins.windows_version"); @@ -111,7 +111,7 @@ module.default = class SteamScript extends QuickScript { .prefix(this._name, this._wineDistribution, this._wineArchitecture, this._wineVersion) .luna(); - wine.corefonts(); + new Corefonts(wine).go(); // Steam must be started once such that config.vdf is created (see fixCertificateIssue()) setupWizard.wait(tr("Please follow the steps of the Steam setup. Then, wait until Steam is updated, log in and finally close Steam completely so the installation of \"{0}\" can continue.", this._name)); diff --git a/Engines/Wine/QuickScript/Uplay Script/script.js b/Engines/Wine/QuickScript/Uplay Script/script.js index abbe38c387..444cf956b0 100644 --- a/Engines/Wine/QuickScript/Uplay Script/script.js +++ b/Engines/Wine/QuickScript/Uplay Script/script.js @@ -4,7 +4,7 @@ const Wine = include("engines.wine.engine.object"); const {fileExists, createTempFile} = include("utils.functions.filesystem.files"); include("engines.wine.verbs.luna"); -include("engines.wine.verbs.corefonts"); +const Corefonts = include("engines.wine.verbs.corefonts"); include("engines.wine.plugins.windows_version"); module.default = class UplayScript extends QuickScript { @@ -52,7 +52,7 @@ module.default = class UplayScript extends QuickScript { .prefix(this._name, this._wineDistribution, this._wineArchitecture, this._wineVersion) .luna(); - wine.corefonts(); + new Corefonts(wine).go(); setupWizard.message(tr("Please ensure that winbind is installed before you continue.")); setupWizard.wait(tr("Please follow the steps of the Uplay setup.\n\nUncheck \"Run Uplay\" or close Uplay completely after the setup so that the installation of \"{0}\" can continue.", this._name)); diff --git a/Engines/Wine/Verbs/D9VK/script.js b/Engines/Wine/Verbs/D9VK/script.js index afa41ff970..fd256b0885 100644 --- a/Engines/Wine/Verbs/D9VK/script.js +++ b/Engines/Wine/Verbs/D9VK/script.js @@ -1,93 +1,118 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); -const {Extractor} = include("utils.functions.filesystem.extract"); -const {ls, cp, remove} = include("utils.functions.filesystem.files"); +const { Extractor } = include("utils.functions.filesystem.extract"); +const { ls, cp, remove } = include("utils.functions.filesystem.files"); + +const operatingSystemFetcher = Bean("operatingSystemFetcher"); + +const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.override_dll"); /** * Verb to install D9VK - * see: https://github.com/Joshua-Ashton/d9vk/ * - * @param {String} d9vkVersion D9VK version to download - * @returns {Wine} Wine object + * see: https://github.com/Joshua-Ashton/d9vk/ */ -Wine.prototype.D9VK = function (d9vkVersion) { - var operatingSystemFetcher = Bean("operatingSystemFetcher"); +class D9VKVerb { + constructor(wine) { + this.wine = wine; + } - print("NOTE: Wine version should be greater or equal to 3.10"); + /** + * Specifies the D9VK version to download + * + * @param {string} d9vkVersion + * @returns {D9VKVerb} + */ + withVersion(d9vkVersion) { + this.d9vkVersion = d9vkVersion; - if (operatingSystemFetcher.fetchCurrentOperationSystem() != "Linux") { - this.wizard().message(tr("D9VK might not work correctly on macOS. This is depending on Metal api support and MoltenVK compatibility layer advancement")); - } - else { - this.wizard().message(tr("Please ensure you have the latest drivers (418.30 minimum for NVIDIA and mesa 19 for AMD) or else D9VK might not work correctly.")); + return this; } - if (typeof d9vkVersion !== 'string') { - d9vkVersion = "0.12"; - } + go() { + const wizard = this.wine.wizard(); + const prefixDirectory = this.wine.prefixDirectory(); + const system32directory = this.wine.system32directory(); - var setupFile = new Resource() - .wizard(this.wizard()) - .url("https://github.com/Joshua-Ashton/d9vk/releases/download/" + d9vkVersion + "/d9vk-" + d9vkVersion + ".tar.gz") - .name("d9vk-" + d9vkVersion + ".tar.gz") - .get(); - - new Extractor() - .wizard(this.wizard()) - .archive(setupFile) - .to(this.prefixDirectory() + "/TMP/") - .extract(); - - var forEach = Array.prototype.forEach; - var sys32dir = this.system32directory(); - var d9vkTmpDir = this.prefixDirectory() + "/TMP/d9vk-" + d9vkVersion; - var self = this; - - //Copy 32 bits dll to system* and apply override - forEach.call(ls(d9vkTmpDir + "/x32"), function (file) { - if (file.endsWith(".dll")) { - cp(d9vkTmpDir + "/x32/" + file, sys32dir); - self.overrideDLL() - .set("native", [file]) - .do(); + print("NOTE: Wine version should be greater or equal to 3.10"); + + if (operatingSystemFetcher.fetchCurrentOperationSystem() != "Linux") { + wizard.message( + tr( + "D9VK might not work correctly on macOS. This is depending on Metal api support and MoltenVK compatibility layer advancement" + ) + ); + } else { + wizard.message( + tr( + "Please ensure you have the latest drivers (418.30 minimum for NVIDIA and mesa 19 for AMD) or else D9VK might not work correctly." + ) + ); + } + + if (typeof this.d9vkVersion !== "string") { + this.d9vkVersion = "0.12"; } - }); - if (this.architecture() == "amd64") { - var sys64dir = this.system64directory(); - //Copy 64 bits dll to system* - forEach.call(ls(d9vkTmpDir + "/x64"), function (file) { + var setupFile = new Resource() + .wizard(wizard) + .url( + `https://github.com/Joshua-Ashton/d9vk/releases/download/${this.d9vkVersion}/d9vk-${this.d9vkVersion}.tar.gz` + ) + .name(`d9vk-${this.d9vkVersion}.tar.gz`) + .get(); + + new Extractor() + .wizard(wizard) + .archive(setupFile) + .to(`${prefixDirectory}/TMP/`) + .extract(); + + const d9vkTmpDir = `${prefixDirectory}/TMP/d9vk-${this.d9vkVersion}`; + + // copy 32 bits dll to system* and apply override + ls(`${d9vkTmpDir}/x32`).forEach(file => { if (file.endsWith(".dll")) { - cp(d9vkTmpDir + "/x64/" + file, sys64dir); + cp(`${d9vkTmpDir}/x32/${file}`, system32directory); + + this.wine + .overrideDLL() + .set("native", [file]) + .do(); } }); - } - remove(this.prefixDirectory() + "/TMP/"); + if (this.architecture() == "amd64") { + const system64directory = this.wine.system64directory(); - return this; -} + // copy 64 bits dll to system* + ls(d9vkTmpDir + "/x64").forEach(file => { + if (file.endsWith(".dll")) { + cp(`${d9vkTmpDir}/x64/${file}`, system64directory); + } + }); + } -/** - * Verb to install D9VK - */ -// eslint-disable-next-line no-unused-vars -module.default = class D9VKVerb { - constructor() { - // do nothing + remove(`${prefixDirectory}/TMP/`); } - install(container) { - var wine = new Wine(); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "D9VK", Optional.empty()); + + const versions = ["0.12", "0.11", "0.10"]; + const selectedVersion = wizard.menu(tr("Please select the version."), versions, "0.12"); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "D9VK", java.util.Optional.empty()); - var versions = ["0.12", "0.11", "0.10"]; - var selectedVersion = wizard.menu(tr("Please select the version."), versions, "0.12"); wine.wizard(wizard); + // install selected version - wine.D9VK(selectedVersion.text); + new D9VKVerb(wine).withVersion(selectedVersion.text).go(); + wizard.close(); } } + +module.default = D9VKVerb; diff --git a/Engines/Wine/Verbs/DXVK/script.js b/Engines/Wine/Verbs/DXVK/script.js index ec17de3548..9bf1b1b815 100644 --- a/Engines/Wine/Verbs/DXVK/script.js +++ b/Engines/Wine/Verbs/DXVK/script.js @@ -1,121 +1,174 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); -const {Extractor} = include("utils.functions.filesystem.extract"); -const {ls, cp, cat, remove} = include("utils.functions.filesystem.files"); +const { Extractor } = include("utils.functions.filesystem.extract"); +const { ls, cp, cat, remove } = include("utils.functions.filesystem.files"); + +const operatingSystemFetcher = Bean("operatingSystemFetcher"); + +const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.override_dll"); /** * Verb to install DXVK - * see: https://github.com/doitsujin/dxvk/ * - * @param {String} dxvkVersion DXVK version to download - * @returns {Wine} Wine object + * see: https://github.com/doitsujin/dxvk/ */ -Wine.prototype.DXVK = function (dxvkVersion) { - var operatingSystemFetcher = Bean("operatingSystemFetcher"); +class DXVK { + constructor(wine) { + this.wine = wine; + } - print("NOTE: wine version should be greater or equal to 3.10"); + /** + * Sets the DXVK version to download + * + * @param {string} dxvkVersion The DXVK version to download + * @returns {DXVK} + */ + withVersion(dxvkVersion) { + this.dxvkVersion = dxvkVersion; - if (operatingSystemFetcher.fetchCurrentOperationSystem() != "Linux") { - this.wizard().message(tr("DXVK might not work correctly on macOS. This is depending on Metal api support and MoltenVK compatibility layer advancement")); - } - else { - this.wizard().message(tr("Please ensure you have the latest drivers (418.30 minimum for NVIDIA and mesa 19 for AMD) or else DXVK might not work correctly.")); + return this; } - if (typeof dxvkVersion !== 'string') { - var releaseFile = new Resource() - .wizard(this.wizard()) - .url("https://raw.githubusercontent.com/doitsujin/dxvk/master/RELEASE") - .name("RELEASE.txt") - .get(); - dxvkVersion = cat(releaseFile).replaceAll("\\n", ""); - } + go() { + const wizard = this.wine.wizard(); + const prefixDirectory = this.wine.prefixDirectory(); + const sys32dir = this.wine.system32directory(); + + print("NOTE: wine version should be greater or equal to 3.10"); + + if (operatingSystemFetcher.fetchCurrentOperationSystem() != "Linux") { + wizard.message( + tr( + "DXVK might not work correctly on macOS. This is depending on Metal api support and MoltenVK compatibility layer advancement" + ) + ); + } else { + wizard.message( + tr( + "Please ensure you have the latest drivers (418.30 minimum for NVIDIA and mesa 19 for AMD) or else DXVK might not work correctly." + ) + ); + } + + if (typeof this.dxvkVersion !== "string") { + const releaseFile = new Resource() + .wizard(wizard) + .url("https://raw.githubusercontent.com/doitsujin/dxvk/master/RELEASE") + .name("RELEASE.txt") + .get(); - var setupFile = new Resource() - .wizard(this.wizard()) - .url("https://github.com/doitsujin/dxvk/releases/download/v" + dxvkVersion + "/dxvk-" + dxvkVersion + ".tar.gz") - .name("dxvk-" + dxvkVersion + ".tar.gz") - .get(); - - new Extractor() - .wizard(this.wizard()) - .archive(setupFile) - .to(this.prefixDirectory() + "/TMP/") - .extract(); - - var forEach = Array.prototype.forEach; - var sys32dir = this.system32directory(); - var dxvkTmpDir = this.prefixDirectory() + "/TMP/dxvk-" + dxvkVersion; - var self = this; - - //Copy 32 bits dll to system* and apply override - forEach.call(ls(dxvkTmpDir + "/x32"), function (file) { - if (file.endsWith(".dll")) { - cp(dxvkTmpDir + "/x32/" + file, sys32dir); - self.overrideDLL() - .set("native", [file]) - .do(); + this.dxvkVersion = cat(releaseFile).replaceAll("\\n", ""); } - }); - if (this.architecture() == "amd64") { - var sys64dir = this.system64directory(); - //Copy 64 bits dll to system* - forEach.call(ls(dxvkTmpDir + "/x64"), function (file) { + const setupFile = new Resource() + .wizard(wizard) + .url( + `https://github.com/doitsujin/dxvk/releases/download/v${this.dxvkVersion}/dxvk-${this.dxvkVersion}.tar.gz` + ) + .name(`dxvk-${this.dxvkVersion}.tar.gz`) + .get(); + + new Extractor() + .wizard(wizard) + .archive(setupFile) + .to(`${prefixDirectory}/TMP/`) + .extract(); + + const dxvkTmpDir = `${prefixDirectory}/TMP/dxvk-${this.dxvkVersion}`; + + //Copy 32 bits dll to system* and apply override + ls(`${dxvkTmpDir}/x32`).forEach(file => { if (file.endsWith(".dll")) { - cp(dxvkTmpDir + "/x64/" + file, sys64dir); + cp(`${dxvkTmpDir}/x32/${file}`, sys32dir); + + this.wine + .overrideDLL() + .set("native", [file]) + .do(); } }); - } - remove(this.prefixDirectory() + "/TMP/"); + if (this.wine.architecture() == "amd64") { + const sys64dir = this.wine.system64directory(); - return this; -} + //Copy 64 bits dll to system* + ls(`${dxvkTmpDir}/x64`).forEach(file => { + if (file.endsWith(".dll")) { + cp(`${dxvkTmpDir}/x64/${file}`, sys64dir); + } + }); + } -/** - * Verb to install DXVK - */ -// eslint-disable-next-line no-unused-vars -module.default = class DXVKVerb { - constructor() { - // do nothing + remove(`${prefixDirectory}/TMP/`); } - install(container) { - var wine = new Wine(); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "DXVK", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "DXVK", java.util.Optional.empty()); + wine.wizard(wizard); // get latest release version - var releaseFile = new Resource() + const releaseFile = new Resource() .wizard(wizard) .url("https://raw.githubusercontent.com/doitsujin/dxvk/master/RELEASE") .name("RELEASE.txt") .get(); - var latestVersion = cat(releaseFile).replaceAll("\\n", ""); + const latestVersion = cat(releaseFile).replaceAll("\\n", ""); + // query desired version (default: latest release version) - var versions = [ - "1.2.2", "1.2.1", "1.2", + const versions = [ + "1.2.2", + "1.2.1", + "1.2", "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", - "0.54", "0.53", "0.52", "0.51", "0.50", - "0.42", "0.41", "0.40", - "0.31", "0.30", - "0.21", "0.20" + "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", + "0.54", + "0.53", + "0.52", + "0.51", + "0.50", + "0.42", + "0.41", + "0.40", + "0.31", + "0.30", + "0.21", + "0.20" ]; - var selectedVersion = wizard.menu(tr("Please select the version."), versions, latestVersion); - wine.wizard(wizard); + const selectedVersion = wizard.menu(tr("Please select the version."), versions, latestVersion); + // install selected version - wine.DXVK(selectedVersion.text); + new DXVK(wine).withVersion(selectedVersion.text).go(); wizard.close(); } } + +module.default = DXVK; diff --git a/Engines/Wine/Verbs/adobeair/script.js b/Engines/Wine/Verbs/adobeair/script.js index cccd475559..b054d7cdd8 100644 --- a/Engines/Wine/Verbs/adobeair/script.js +++ b/Engines/Wine/Verbs/adobeair/script.js @@ -1,52 +1,48 @@ 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 - * - * @returns {Wine} Wine object */ -Wine.prototype.adobeair = function () { - const adobeair = new Resource() - .wizard(this.wizard()) - .url("https://airdownload.adobe.com/air/win/download/latest/AdobeAIRInstaller.exe") - .name("AdobeAIRInstaller.exe") - .get(); - - // Using Windows XP to workaround the wine bug 43506 - // See https://bugs.winehq.org/show_bug.cgi?id=43506 - const currentWindowsVersion = this.windowsVersion(); +class AdobeAirVerb { + constructor(wine) { + this.wine = wine; + } - this.windowsVersion("winxp"); + go() { + // 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.run(adobeair); - this.wait(); + this.wine.windowsVersion("winxp"); - this.windowsVersion(currentWindowsVersion); + const adobeair = new Resource() + .wizard(this.wizard()) + .url("https://airdownload.adobe.com/air/win/download/latest/AdobeAIRInstaller.exe") + .name("AdobeAIRInstaller.exe") + .get(); - return this; -}; + this.wine.run(adobeair); + this.wine.wait(); -/** - * Verb to install adobeair - */ -// eslint-disable-next-line no-unused-vars -module.default = class AdobeAirVerb { - constructor() { - // do nothing + this.wine.windowsVersion(currentWindowsVersion); } - install(container) { + static install(container) { const wine = new Wine(); - wine.prefix(container); + const wizard = SetupWizard(InstallationType.VERBS, "adobeair", Optional.empty()); - const wizard = SetupWizard(InstallationType.VERBS, "adobeair", java.util.Optional.empty()); + wine.prefix(container); wine.wizard(wizard); - wine.adobeair(); + new AdobeAirVerb(wine).go(); wizard.close(); } -} +}; + +module.default = AdobeAirVerb; diff --git a/Engines/Wine/Verbs/amstream/script.js b/Engines/Wine/Verbs/amstream/script.js index f5dc4fa345..74e94bbd5b 100644 --- a/Engines/Wine/Verbs/amstream/script.js +++ b/Engines/Wine/Verbs/amstream/script.js @@ -1,7 +1,9 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); -const {cp, remove} = include("utils.functions.filesystem.files"); -const {CabExtract} = include("utils.functions.filesystem.extract"); +const { cp, remove } = include("utils.functions.filesystem.files"); +const { CabExtract } = include("utils.functions.filesystem.extract"); + +const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.override_dll"); include("engines.wine.plugins.regsvr32"); @@ -9,68 +11,94 @@ include("engines.wine.verbs.luna"); /** * Verb to install amstream - * - * @returns {Wine} Wine object */ -Wine.prototype.amstream = function () { - var setupFile = new Resource() - .wizard(this.wizard()) - .url("https://download.microsoft.com/download/0/A/F/0AFB5316-3062-494A-AB78-7FB0D4461357/windows6.1-KB976932-X86.exe") - .checksum("c3516bc5c9e69fee6d9ac4f981f5b95977a8a2fa") - .name("windows6.1-KB976932-X86.exe") - .get(); - - this.wizard().wait(tr("Please wait while {0} is installed...", "amstream")); - - remove(this.system32directory() + "/amstream.dll"); - - new CabExtract() - .archive(setupFile) - .to(this.system32directory()) - .extract(["-L", "-F", "x86_microsoft-windows-directshow-other_31bf3856ad364e35_6.1.7601.17514_none_0f58f1e53efca91e/amstream.dll"]); - - cp(this.system32directory() + "/x86_microsoft-windows-directshow-other_31bf3856ad364e35_6.1.7601.17514_none_0f58f1e53efca91e/amstream.dll", this.system32directory()); - this.regsvr32().install("amstream.dll"); - - if (this.architecture() == "amd64") { - var setupFilex64 = new Resource() - .wizard(this.wizard()) - .url("https://download.microsoft.com/download/0/A/F/0AFB5316-3062-494A-AB78-7FB0D4461357/windows6.1-KB976932-X64.exe") - .checksum("74865ef2562006e51d7f9333b4a8d45b7a749dab") - .name("windows6.1-KB976932-X64.exe") +class AmstreamVerb { + constructor(wine) { + this.wine = wine; + } + + go() { + const wizard = this.wine.wizard(); + const system32directory = this.wine.system32directory(); + + const setupFile = new Resource() + .wizard(wizard) + .url( + "https://download.microsoft.com/download/0/A/F/0AFB5316-3062-494A-AB78-7FB0D4461357/windows6.1-KB976932-X86.exe" + ) + .checksum("c3516bc5c9e69fee6d9ac4f981f5b95977a8a2fa") + .name("windows6.1-KB976932-X86.exe") .get(); - this.wizard().wait(tr("Please wait while {0} is installed...", "amstream")); - remove(this.system64directory() + "/amstream.dll"); + + wizard.wait(tr("Please wait while {0} is installed...", "amstream")); + + remove(`${system32directory}/amstream.dll`); + new CabExtract() - .archive(setupFilex64) - .to(this.system64directory()) - .extract(["-L", "-F", "amd64_microsoft-windows-directshow-other_31bf3856ad364e35_6.1.7601.17514_none_6b778d68f75a1a54/amstream.dll"]); - cp(this.system64directory() + "/amd64_microsoft-windows-directshow-other_31bf3856ad364e35_6.1.7601.17514_none_6b778d68f75a1a54/amstream.dll", this.system64directory()); - this.regsvr64().install("amstream.dll"); - } + .archive(setupFile) + .to(system32directory) + .extract([ + "-L", + "-F", + "x86_microsoft-windows-directshow-other_31bf3856ad364e35_6.1.7601.17514_none_0f58f1e53efca91e/amstream.dll" + ]); - this.overrideDLL() - .set("native,builtin", ["amstream"]) - .do(); + cp( + `${system32directory}/x86_microsoft-windows-directshow-other_31bf3856ad364e35_6.1.7601.17514_none_0f58f1e53efca91e/amstream.dll`, + system32directory + ); - return this; -}; + this.wine.regsvr32().install("amstream.dll"); -/** - * Verb to install amstream - */ -// eslint-disable-next-line no-unused-vars -module.default = class AmstreamVerb { - constructor() { - // do nothing + if (this.architecture() == "amd64") { + const system64directory = this.wine.system64directory(); + + const setupFilex64 = new Resource() + .wizard(wizard) + .url( + "https://download.microsoft.com/download/0/A/F/0AFB5316-3062-494A-AB78-7FB0D4461357/windows6.1-KB976932-X64.exe" + ) + .checksum("74865ef2562006e51d7f9333b4a8d45b7a749dab") + .name("windows6.1-KB976932-X64.exe") + .get(); + + wizard.wait(tr("Please wait while {0} is installed...", "amstream")); + + remove(`${system64directory}/amstream.dll`); + + new CabExtract() + .archive(setupFilex64) + .to(system64directory) + .extract([ + "-L", + "-F", + "amd64_microsoft-windows-directshow-other_31bf3856ad364e35_6.1.7601.17514_none_6b778d68f75a1a54/amstream.dll" + ]); + cp( + `${system64directory}/amd64_microsoft-windows-directshow-other_31bf3856ad364e35_6.1.7601.17514_none_6b778d68f75a1a54/amstream.dll`, + system64directory + ); + + this.wine.regsvr64().install("amstream.dll"); + } + + this.wine + .overrideDLL() + .set("native,builtin", ["amstream"]) + .do(); } - install(container) { - var wine = new Wine(); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "amstream", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "amstream", java.util.Optional.empty()); wine.wizard(wizard); - wine.amstream(); + + new AmstreamVerb(wine).go(); + wizard.close(); } } + +module.default = AmstreamVerb; diff --git a/Engines/Wine/Verbs/atmlib/script.js b/Engines/Wine/Verbs/atmlib/script.js index 6abd9e84de..5dee7b74fd 100644 --- a/Engines/Wine/Verbs/atmlib/script.js +++ b/Engines/Wine/Verbs/atmlib/script.js @@ -1,53 +1,57 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); -const {CabExtract} = include("utils.functions.filesystem.extract"); -const {remove} = include("utils.functions.filesystem.files"); +const { CabExtract } = include("utils.functions.filesystem.extract"); +const { remove } = include("utils.functions.filesystem.files"); -/** - * Verb to install atmlib - * - * @returns {Wine} Wine object - */ -Wine.prototype.atmlib = function () { - var setupFile = new Resource() - .wizard(this.wizard()) - .url("https://ftp.gnome.org/mirror/archive/ftp.sunet.se/pub/security/vendor/microsoft/win2000/Service_Packs/usa/W2KSP4_EN.EXE") - .checksum("fadea6d94a014b039839fecc6e6a11c20afa4fa8") - .name("W2ksp4_EN.exe") - .get(); - - new CabExtract() - .archive(setupFile) - .wizard(this.wizard()) - .to(this.system32directory()) - .extract(); - - new CabExtract() - .archive(this.system32directory() + "/i386/atmlib.dl_") - .wizard(this.wizard()) - .to(this.system32directory()) - .extract(); - - remove(this.system32directory() + "/i386/"); - - return this; -}; +const Optional = Java.type("java.util.Optional"); /** * Verb to install atmlib */ -// eslint-disable-next-line no-unused-vars -module.default = class AtmlibVerb { - constructor() { - // do nothing +class AtmlibVerb { + constructor(wine) { + this.wine = wine; } - install(container) { - var wine = new Wine(); + go() { + const wizard = this.wine.wizard(); + const system32directory = this.wine.system32directory(); + + const setupFile = new Resource() + .wizard(wizard) + .url( + "https://ftp.gnome.org/mirror/archive/ftp.sunet.se/pub/security/vendor/microsoft/win2000/Service_Packs/usa/W2KSP4_EN.EXE" + ) + .checksum("fadea6d94a014b039839fecc6e6a11c20afa4fa8") + .name("W2ksp4_EN.exe") + .get(); + + new CabExtract() + .archive(setupFile) + .wizard(wizard) + .to(system32directory) + .extract(); + + new CabExtract() + .archive(`${system32directory}/i386/atmlib.dl_`) + .wizard(wizard) + .to(system32directory) + .extract(); + + remove(`${system32directory}/i386/`); + } + + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "atmlib", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "atmlib", java.util.Optional.empty()); wine.wizard(wizard); - wine.atmlib(); + + new AtmlibVerb(wine).go(); + wizard.close(); } } + +module.default = AtmlibVerb; diff --git a/Engines/Wine/Verbs/corefonts/script.js b/Engines/Wine/Verbs/corefonts/script.js index 8a490e2d9b..5f619dee27 100644 --- a/Engines/Wine/Verbs/corefonts/script.js +++ b/Engines/Wine/Verbs/corefonts/script.js @@ -2,157 +2,157 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); const { CabExtract } = include("utils.functions.filesystem.extract"); +const Optional = Java.type("java.util.Optional"); + include("engines.wine.plugins.register_font"); include("engines.wine.verbs.luna"); /** * Verb to install corefonts - * - * @returns {Wine} Wine object */ -Wine.prototype.corefonts = function () { - const fontResources = [ - new Resource() - .wizard(this.wizard()) - .url("https://mirrors.kernel.org/gentoo/distfiles/arial32.exe") - .checksum("6d75f8436f39ab2da5c31ce651b7443b4ad2916e") - .name("arial32.exe") - .get(), - - new Resource() - .wizard(this.wizard()) - .url("https://mirrors.kernel.org/gentoo/distfiles/arialb32.exe") - .checksum("d45cdab84b7f4c1efd6d1b369f50ed0390e3d344") - .name("arialb32.exe") - .get(), - - new Resource() - .wizard(this.wizard()) - .url("https://mirrors.kernel.org/gentoo/distfiles/comic32.exe") - .checksum("2371d0327683dcc5ec1684fe7c275a8de1ef9a51") - .name("comic32.exe") - .get(), - - new Resource() - .wizard(this.wizard()) - .url("https://mirrors.kernel.org/gentoo/distfiles/courie32.exe") - .checksum("06a745023c034f88b4135f5e294fece1a3c1b057") - .name("courie32.exe") - .get(), - - new Resource() - .wizard(this.wizard()) - .url("https://mirrors.kernel.org/gentoo/distfiles/georgi32.exe") - .checksum("90e4070cb356f1d811acb943080bf97e419a8f1e") - .name("georgi32.exe") - .get(), - - new Resource() - .wizard(this.wizard()) - .url("https://mirrors.kernel.org/gentoo/distfiles/impact32.exe") - .checksum("86b34d650cfbbe5d3512d49d2545f7509a55aad2") - .name("impact32.exe") - .get(), - - new Resource() - .wizard(this.wizard()) - .url("https://mirrors.kernel.org/gentoo/distfiles/times32.exe") - .checksum("20b79e65cdef4e2d7195f84da202499e3aa83060") - .name("times32.exe") - .get(), - - new Resource() - .wizard(this.wizard()) - .url("https://mirrors.kernel.org/gentoo/distfiles/trebuc32.exe ") - .checksum("50aab0988423efcc9cf21fac7d64d534d6d0a34a") - .name("trebuc32.exe") - .get(), - - new Resource() - .wizard(this.wizard()) - .url("https://mirrors.kernel.org/gentoo/distfiles/verdan32.exe ") - .checksum("f5b93cedf500edc67502f116578123618c64a42a") - .name("verdan32.exe") - .get(), - - new Resource() - .wizard(this.wizard()) - .url("https://mirrors.kernel.org/gentoo/distfiles/webdin32.exe ") - .checksum("2fb4a42c53e50bc70707a7b3c57baf62ba58398f") - .name("webdin32.exe") - .get() - ]; - - const progressBar = this.wizard().progressBar(tr("Please wait...")); - progressBar.setText(tr("Installing {0}...", tr("fonts"))); - progressBar.setProgressPercentage(0); - - fontResources.reduce((numInstalledFonts, fontResource) => { - progressBar.setText(tr("Installing {0}...", tr("fonts"))); - progressBar.setProgressPercentage((numInstalledFonts * 100) / fontResources.length); - - new CabExtract() - .archive(fontResource) - .wizard(this.wizard()) - .to(this.fontDirectory()) - .extract(); - - return numInstalledFonts + 1; - }, 0); - - this.registerFont() - .set("Arial", "Arial.TTF") - .set("Arial Bold", "Arialbd.TTF") - .set("Arial Bold Italic", "Arialbi.TTF") - .set("Arial Italic", "Ariali.TTF") - .set("Arial Black", "AriBlk.TTF") - .set("Comic Sans MS", "Comic.TTF") - .set("Comic Sans MS Bold", "Comicbd.TTF") - .set("Courier New", "Cour.TTF") - .set("Courier New Bold", "CourBD.TTF") - .set("Courier New Bold Italic", "CourBI.TTF") - .set("Courier New Italic", "Couri.TTF") - .set("Georgia", "Georgia.TTF") - .set("Georgia Bold", "Georgiab.TTF") - .set("Georgia Bold Italic", "Georgiaz.TTF") - .set("Georgia Italic", "Georgiai.TTF") - .set("Impact", "Impact.TTF") - .set("Times New Roman", "Times.TTF") - .set("Times New Roman Bold", "Timesbd.TTF") - .set("Times New Roman Bold Italic", "Timesbi.TTF") - .set("Times New Roman Italic", "Timesi.TTF") - .set("Trebucet MS", "Trebuc.TTF") - .set("Trebucet MS Bold", "Trebucbd.TTF") - .set("Trebucet MS Bold Italic", "Trebucbi.TTF") - .set("Trebucet MS Italic", "Trebucit.TTF") - .set("Verdana", "Verdana.TTF") - .set("Verdana Bold", "Verdanab.TTF") - .set("Verdana Bold Italic", "Verdanaz.TTF") - .set("Verdana Italic", "Verdanai.TTF") - .set("Webdings", "Webdings.TTF") - .do(); - - return this; -}; +class CorefontsVerb { + constructor(wine) { + this.wine = wine; + } -/** - * Verb to install corefonts - */ -module.default = class CorefontsVerb { - constructor() { - // do nothing + go() { + const wizard = this.wine.wizard(); + const fontDirectory = this.wine.fontDirectory(); + + const fontResources = [ + new Resource() + .wizard(wizard) + .url("https://mirrors.kernel.org/gentoo/distfiles/arial32.exe") + .checksum("6d75f8436f39ab2da5c31ce651b7443b4ad2916e") + .name("arial32.exe") + .get(), + + new Resource() + .wizard(wizard) + .url("https://mirrors.kernel.org/gentoo/distfiles/arialb32.exe") + .checksum("d45cdab84b7f4c1efd6d1b369f50ed0390e3d344") + .name("arialb32.exe") + .get(), + + new Resource() + .wizard(wizard) + .url("https://mirrors.kernel.org/gentoo/distfiles/comic32.exe") + .checksum("2371d0327683dcc5ec1684fe7c275a8de1ef9a51") + .name("comic32.exe") + .get(), + + new Resource() + .wizard(wizard) + .url("https://mirrors.kernel.org/gentoo/distfiles/courie32.exe") + .checksum("06a745023c034f88b4135f5e294fece1a3c1b057") + .name("courie32.exe") + .get(), + + new Resource() + .wizard(wizard) + .url("https://mirrors.kernel.org/gentoo/distfiles/georgi32.exe") + .checksum("90e4070cb356f1d811acb943080bf97e419a8f1e") + .name("georgi32.exe") + .get(), + + new Resource() + .wizard(wizard) + .url("https://mirrors.kernel.org/gentoo/distfiles/impact32.exe") + .checksum("86b34d650cfbbe5d3512d49d2545f7509a55aad2") + .name("impact32.exe") + .get(), + + new Resource() + .wizard(wizard) + .url("https://mirrors.kernel.org/gentoo/distfiles/times32.exe") + .checksum("20b79e65cdef4e2d7195f84da202499e3aa83060") + .name("times32.exe") + .get(), + + new Resource() + .wizard(wizard) + .url("https://mirrors.kernel.org/gentoo/distfiles/trebuc32.exe ") + .checksum("50aab0988423efcc9cf21fac7d64d534d6d0a34a") + .name("trebuc32.exe") + .get(), + + new Resource() + .wizard(wizard) + .url("https://mirrors.kernel.org/gentoo/distfiles/verdan32.exe ") + .checksum("f5b93cedf500edc67502f116578123618c64a42a") + .name("verdan32.exe") + .get(), + + new Resource() + .wizard(wizard) + .url("https://mirrors.kernel.org/gentoo/distfiles/webdin32.exe ") + .checksum("2fb4a42c53e50bc70707a7b3c57baf62ba58398f") + .name("webdin32.exe") + .get() + ]; + + const progressBar = wizard.progressBar(tr("Please wait...")); + progressBar.setText(tr("Installing {0}...", tr("fonts"))); + progressBar.setProgressPercentage(0); + + fontResources.reduce((numInstalledFonts, fontResource) => { + progressBar.setText(tr("Installing {0}...", tr("fonts"))); + progressBar.setProgressPercentage((numInstalledFonts * 100) / fontResources.length); + + new CabExtract() + .archive(fontResource) + .wizard(wizard) + .to(fontDirectory) + .extract(); + + return numInstalledFonts + 1; + }, 0); + + this.wine + .registerFont() + .set("Arial", "Arial.TTF") + .set("Arial Bold", "Arialbd.TTF") + .set("Arial Bold Italic", "Arialbi.TTF") + .set("Arial Italic", "Ariali.TTF") + .set("Arial Black", "AriBlk.TTF") + .set("Comic Sans MS", "Comic.TTF") + .set("Comic Sans MS Bold", "Comicbd.TTF") + .set("Courier New", "Cour.TTF") + .set("Courier New Bold", "CourBD.TTF") + .set("Courier New Bold Italic", "CourBI.TTF") + .set("Courier New Italic", "Couri.TTF") + .set("Georgia", "Georgia.TTF") + .set("Georgia Bold", "Georgiab.TTF") + .set("Georgia Bold Italic", "Georgiaz.TTF") + .set("Georgia Italic", "Georgiai.TTF") + .set("Impact", "Impact.TTF") + .set("Times New Roman", "Times.TTF") + .set("Times New Roman Bold", "Timesbd.TTF") + .set("Times New Roman Bold Italic", "Timesbi.TTF") + .set("Times New Roman Italic", "Timesi.TTF") + .set("Trebucet MS", "Trebuc.TTF") + .set("Trebucet MS Bold", "Trebucbd.TTF") + .set("Trebucet MS Bold Italic", "Trebucbi.TTF") + .set("Trebucet MS Italic", "Trebucit.TTF") + .set("Verdana", "Verdana.TTF") + .set("Verdana Bold", "Verdanab.TTF") + .set("Verdana Bold Italic", "Verdanaz.TTF") + .set("Verdana Italic", "Verdanai.TTF") + .set("Webdings", "Webdings.TTF") + .do(); } install(container) { const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "corefonts", Optional.empty()); wine.prefix(container); - - const wizard = SetupWizard(InstallationType.VERBS, "corefonts", java.util.Optional.empty()); - wine.wizard(wizard); - wine.corefonts(); + + new CorefontsVerb(wine).go(); wizard.close(); } -}; +} + +module.default = CorefontsVerb; diff --git a/Engines/Wine/Verbs/crypt32/script.js b/Engines/Wine/Verbs/crypt32/script.js index 8e45812b4a..618da90b08 100644 --- a/Engines/Wine/Verbs/crypt32/script.js +++ b/Engines/Wine/Verbs/crypt32/script.js @@ -1,37 +1,39 @@ const Wine = include("engines.wine.engine.object"); +const Optional = Java.type("java.util.Optional"); + include("engines.wine.plugins.override_dll"); include("engines.wine.verbs.sp3extract"); /** * Verb to install crypt32 - * - * @returns {Wine} Wine object */ -Wine.prototype.crypt32 = function () { - this.sp3extract("crypt32.dll"); - this.sp3extract("msasn1.dll"); +class Crypt32Verb { + constructor(wine) { + this.wine = wine; + } - this.overrideDLL() - .set("native, builtin", ["crypt32"]) - .do(); -}; + go() { + this.wine.sp3extract("crypt32.dll"); + this.wine.sp3extract("msasn1.dll"); -/** - * Verb to install crypt32 - */ -// eslint-disable-next-line no-unused-vars -module.default = class Crypt32Verb { - constructor() { - // do nothing + this.wine + .overrideDLL() + .set("native, builtin", ["crypt32"]) + .do(); } - install(container) { - var wine = new Wine(); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "crypt32", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "crypt32", java.util.Optional.empty()); wine.wizard(wizard); - wine.crypt32(); + + new Crypt32Verb(wine).go(); + wizard.close(); } } + +module.default = Crypt32Verb; diff --git a/Engines/Wine/Verbs/d3drm/script.js b/Engines/Wine/Verbs/d3drm/script.js index 8d280b50a9..0df27755f1 100644 --- a/Engines/Wine/Verbs/d3drm/script.js +++ b/Engines/Wine/Verbs/d3drm/script.js @@ -1,57 +1,63 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); -const {CabExtract} = include("utils.functions.filesystem.extract"); +const { CabExtract } = include("utils.functions.filesystem.extract"); + +const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.override_dll"); include("engines.wine.verbs.luna"); /** * Verb to install d3drm - * - * @returns {Wine} Wine object */ -Wine.prototype.d3drm = function () { - var setupFile = new Resource() - .wizard(this.wizard()) - .url("https://download.microsoft.com/download/E/E/1/EE17FF74-6C45-4575-9CF4-7FC2597ACD18/directx_feb2010_redist.exe") - .checksum("a97c820915dc20929e84b49646ec275760012a42") - .name("directx_feb2010_redist.exe") - .get(); - - this.wizard().wait(tr("Please wait while {0} is installed...", "d3drm")); - - new CabExtract() - .archive(setupFile) - .to(this.prefixDirectory() + "/drive_c/d3drm/") - .extract(["-L", "-F", "dxnt.cab"]); - - new CabExtract() - .archive(this.prefixDirectory() + "/drive_c/d3drm/dxnt.cab") - .to(this.system32directory()) - .extract(["-L", "-F", "d3drm.dll"]); - - this.overrideDLL() - .set("native", ["d3drm"]) - .do(); - - return this; -}; +class D3drmVerb { + constructor(wine) { + this.wine = wine; + } -/** - * Verb to install d3drm - */ -// eslint-disable-next-line no-unused-vars -module.default = class D3drmVerb { - constructor() { - // do nothing + go() { + const wizard = this.wine.wizard(); + const prefixDirectory = this.wine.prefixDirectory(); + const system32directory = this.wine.system32directory(); + + const setupFile = new Resource() + .wizard(wizard) + .url( + "https://download.microsoft.com/download/E/E/1/EE17FF74-6C45-4575-9CF4-7FC2597ACD18/directx_feb2010_redist.exe" + ) + .checksum("a97c820915dc20929e84b49646ec275760012a42") + .name("directx_feb2010_redist.exe") + .get(); + + wizard.wait(tr("Please wait while {0} is installed...", "d3drm")); + + new CabExtract() + .archive(setupFile) + .to(`${prefixDirectory}/drive_c/d3drm/`) + .extract(["-L", "-F", "dxnt.cab"]); + + new CabExtract() + .archive(`${prefixDirectory}/drive_c/d3drm/dxnt.cab`) + .to(system32directory) + .extract(["-L", "-F", "d3drm.dll"]); + + this.wine + .overrideDLL() + .set("native", ["d3drm"]) + .do(); } - install(container) { - var wine = new Wine(); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "d3drm", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "d3drm", java.util.Optional.empty()); wine.wizard(wizard); + wine.d3drm(); + wizard.close(); } } + +module.default = D3drmVerb; diff --git a/Engines/Wine/Verbs/d3dx10/script.js b/Engines/Wine/Verbs/d3dx10/script.js index ea94366615..0df80dafae 100644 --- a/Engines/Wine/Verbs/d3dx10/script.js +++ b/Engines/Wine/Verbs/d3dx10/script.js @@ -2,15 +2,31 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); const { CabExtract } = include("utils.functions.filesystem.extract"); +const Optional = Java.type("java.util.Optional"); + include("engines.wine.plugins.override_dll"); /** * Verb to install D3DX10 - * - * @returns {Wine} Wine object */ -Wine.prototype.d3dx10 = function () { - const extractDirectXtoSystemDirectory = (progressBar, filesToExtract, destination, pattern) => { +class D3DX10Verb { + constructor(wine) { + this.wine = wine; + } + + /** + * Extracts DirectX10 to the system directory + * + * @param {*} progressBar The progress bar + * @param {*} filesToExtract A list of files to be extracted + * @param {*} destination The destination folder + * @param {*} pattern The file pattern used during extraction + * @returns {void} + */ + extractDirectXToSystemDirectory(progressBar, filesToExtract, destination, pattern) { + const wizard = this.wine.wizard(); + const prefixDirectory = this.wine.prefixDirectory(); + filesToExtract.reduce((numberOfExtractedFiles, cabFile) => { print(tr("Extracting {0}...", cabFile)); @@ -18,110 +34,112 @@ Wine.prototype.d3dx10 = function () { progressBar.setProgressPercentage((numberOfExtractedFiles * 100) / filesToExtract.length); new CabExtract() - .archive(this.prefixDirectory() + "/drive_c/d3dx10/" + cabFile) + .wizard(wizard) + .archive(`${prefixDirectory}/drive_c/d3dx10/${cabFile}`) .to(destination) .extract(["-L", "-F", pattern]); return numberOfExtractedFiles + 1; }, 0); - }; - - const setupFile = new Resource() - .wizard(this.wizard()) - .url( - "http://download.microsoft.com/download/8/4/A/84A35BF1-DAFE-4AE8-82AF-AD2AE20B6B14/directx_Jun2010_redist.exe" - ) - .checksum("f8f1217f666bf2f6863631a7d5e5fb3a8d1542df") - .name("directx_Jun2010_redist.exe") - .get(); - - const progressBar = this.wizard().progressBar(tr("Please wait...")); - progressBar.setText(tr("Extracting {0}...", "DirectX 10")); - progressBar.setProgressPercentage(0); - - new CabExtract() - .archive(setupFile) - .to(this.prefixDirectory() + "/drive_c/d3dx10/") - .extract(["-L", "-F", "*d3dx10*x86*"]); - - const filesToExtractx86 = [ - "apr2007_d3dx10_33_x86.cab", - "aug2007_d3dx10_35_x86.cab", - "aug2008_d3dx10_39_x86.cab", - "aug2009_d3dx10_42_x86.cab", - "dec2006_d3dx10_00_x86.cab", - "jun2007_d3dx10_34_x86.cab", - "jun2008_d3dx10_38_x86.cab", - "jun2010_d3dx10_43_x86.cab", - "mar2008_d3dx10_37_x86.cab", - "mar2009_d3dx10_41_x86.cab", - "nov2007_d3dx10_36_x86.cab", - "nov2008_d3dx10_40_x86.cab" - ]; - - extractDirectXtoSystemDirectory(progressBar, filesToExtractx86, this.system32directory(), "d3dx10*.dll"); - - if (this.architecture() == "amd64") { + } + + go() { + const wizard = this.wine.wizard(); + const prefixDirectory = this.wine.prefixDirectory(); + const system32directory = this.wine.system32directory(); + + const setupFile = new Resource() + .wizard(wizard) + .url( + "http://download.microsoft.com/download/8/4/A/84A35BF1-DAFE-4AE8-82AF-AD2AE20B6B14/directx_Jun2010_redist.exe" + ) + .checksum("f8f1217f666bf2f6863631a7d5e5fb3a8d1542df") + .name("directx_Jun2010_redist.exe") + .get(); + + const progressBar = wizard.progressBar(tr("Please wait...")); + progressBar.setText(tr("Extracting {0}...", "DirectX 10")); + progressBar.setProgressPercentage(0); + new CabExtract() + .wizard(wizard) .archive(setupFile) - .to(this.prefixDirectory() + "/drive_c/d3dx10/") - .extract(["-L", "-F", "*d3dx10*x64*"]); - - const filesToExtractx64 = [ - "apr2007_d3dx10_33_x64.cab", - "aug2007_d3dx10_35_x64.cab", - "aug2008_d3dx10_39_x64.cab", - "aug2009_d3dx10_42_x64.cab", - "dec2006_d3dx10_00_x64.cab", - "jun2007_d3dx10_34_x64.cab", - "jun2008_d3dx10_38_x64.cab", - "jun2010_d3dx10_43_x64.cab", - "mar2008_d3dx10_37_x64.cab", - "mar2009_d3dx10_41_x64.cab", - "nov2007_d3dx10_36_x64.cab", - "nov2008_d3dx10_40_x64.cab" + .to(`${prefixDirectory}/drive_c/d3dx10/`) + .extract(["-L", "-F", "*d3dx10*x86*"]); + + const filesToExtractx86 = [ + "apr2007_d3dx10_33_x86.cab", + "aug2007_d3dx10_35_x86.cab", + "aug2008_d3dx10_39_x86.cab", + "aug2009_d3dx10_42_x86.cab", + "dec2006_d3dx10_00_x86.cab", + "jun2007_d3dx10_34_x86.cab", + "jun2008_d3dx10_38_x86.cab", + "jun2010_d3dx10_43_x86.cab", + "mar2008_d3dx10_37_x86.cab", + "mar2009_d3dx10_41_x86.cab", + "nov2007_d3dx10_36_x86.cab", + "nov2008_d3dx10_40_x86.cab" ]; - extractDirectXtoSystemDirectory(progressBar, filesToExtractx64, this.system64directory(), "d3dx10*.dll"); - } + this.extractDirectXToSystemDirectory(progressBar, filesToExtractx86, system32directory, "d3dx10*.dll"); - this.overrideDLL() - .set("native", [ - "d3dx10_33", - "d3dx10_34", - "d3dx10_35", - "d3dx10_36", - "d3dx10_37", - "d3dx10_38", - "d3dx10_39", - "d3dx10_40", - "d3dx10_41", - "d3dx10_42", - "d3dx10_43" - ]) - .do(); - - return this; -}; + if (this.architecture() == "amd64") { + const system64directory = this.wine.system64directory(); -/** - * Verb to install D3DX10 - */ -module.default = class D3DX10Verb { - constructor() { - // do nothing + new CabExtract() + .wizard(wizard) + .archive(setupFile) + .to(`${prefixDirectory}/drive_c/d3dx10/`) + .extract(["-L", "-F", "*d3dx10*x64*"]); + + const filesToExtractx64 = [ + "apr2007_d3dx10_33_x64.cab", + "aug2007_d3dx10_35_x64.cab", + "aug2008_d3dx10_39_x64.cab", + "aug2009_d3dx10_42_x64.cab", + "dec2006_d3dx10_00_x64.cab", + "jun2007_d3dx10_34_x64.cab", + "jun2008_d3dx10_38_x64.cab", + "jun2010_d3dx10_43_x64.cab", + "mar2008_d3dx10_37_x64.cab", + "mar2009_d3dx10_41_x64.cab", + "nov2007_d3dx10_36_x64.cab", + "nov2008_d3dx10_40_x64.cab" + ]; + + this.extractDirectXToSystemDirectory(progressBar, filesToExtractx64, system64directory, "d3dx10*.dll"); + } + + this.wine + .overrideDLL() + .set("native", [ + "d3dx10_33", + "d3dx10_34", + "d3dx10_35", + "d3dx10_36", + "d3dx10_37", + "d3dx10_38", + "d3dx10_39", + "d3dx10_40", + "d3dx10_41", + "d3dx10_42", + "d3dx10_43" + ]) + .do(); } - install(container) { + static install(container) { const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "d3dx10", Optional.empty()); wine.prefix(container); - - const wizard = SetupWizard(InstallationType.VERBS, "d3dx10", java.util.Optional.empty()); - wine.wizard(wizard); - wine.d3dx10(); + + new D3DX10Verb(wine).go(); wizard.close(); } -}; +} + +module.default = D3DX10Verb; diff --git a/Engines/Wine/Verbs/d3dx11/script.js b/Engines/Wine/Verbs/d3dx11/script.js index 75acab41c5..9ecc926833 100644 --- a/Engines/Wine/Verbs/d3dx11/script.js +++ b/Engines/Wine/Verbs/d3dx11/script.js @@ -2,6 +2,8 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); const { CabExtract } = include("utils.functions.filesystem.extract"); +const Optional = Java.type("java.util.Optional"); + include("engines.wine.plugins.override_dll"); /** @@ -9,7 +11,7 @@ include("engines.wine.plugins.override_dll"); * * @returns {Wine} Wine object */ -Wine.prototype.d3dx11 = function () { +Wine.prototype.d3dx11 = function() { const extractDirectXtoSystemDirectory = (progressBar, filesToExtract, destination, pattern) => { filesToExtract.reduce((numberOfExtractedFiles, cabFile) => { print(tr("Extracting {0}...", cabFile)); @@ -75,21 +77,105 @@ Wine.prototype.d3dx11 = function () { /** * Verb to install D3DX11 */ -module.default = class D3DX11Verb { - constructor() { - // do nothing +class D3DX11Verb { + constructor(wine) { + this.wine = wine; } - install(container) { - const wine = new Wine(); + /** + * Extracts DirectX11 to the system directory + * + * @param {*} progressBar The progress bar + * @param {*} filesToExtract A list of files to extract + * @param {*} destination The destination folder + * @param {*} pattern The file pattern used during extraction + * @returns {void} + */ + extractDirectXToSystemDirectory(progressBar, filesToExtract, destination, pattern) { + const wizard = this.wine.wizard(); + const prefixDirectory = this.wine.prefixDirectory(); - wine.prefix(container); + filesToExtract.reduce((numberOfExtractedFiles, cabFile) => { + print(tr("Extracting {0}...", cabFile)); + + progressBar.setText(tr("Extracting {0}...", "DirectX 11")); + progressBar.setProgressPercentage((numberOfExtractedFiles * 100) / filesToExtract.length); + + new CabExtract() + .wizard(wizard) + .archive(`${prefixDirectory}/drive_c/d3dx11/${cabFile}`) + .to(destination) + .extract(["-L", "-F", pattern]); + + return numberOfExtractedFiles + 1; + }, 0); + } - const wizard = SetupWizard(InstallationType.VERBS, "d3dx11", java.util.Optional.empty()); + go() { + const wizard = this.wine.wizard(); + const prefixDirectory = this.wine.prefixDirectory(); + const system32directory = this.wine.system32directory(); + + const setupFile = new Resource() + .wizard(wizard) + .url( + "http://download.microsoft.com/download/8/4/A/84A35BF1-DAFE-4AE8-82AF-AD2AE20B6B14/directx_Jun2010_redist.exe" + ) + .checksum("7c1fc2021cf57fed3c25c9b03cd0c31a") + .algorithm("MD5") + .name("directx_Jun2010_redist.exe") + .get(); + + const progressBar = wizard.progressBar(tr("Please wait...")); + progressBar.setText(tr("Extracting {0}...", "DirectX 11")); + progressBar.setProgressPercentage(0); + new CabExtract() + .wizard(wizard) + .archive(setupFile) + .to(`${prefixDirectory}/drive_c/d3dx11/`) + .extract(["-L", "-F", "*d3dx11*x86*"]); + + const filesToExtractx86 = ["Aug2009_d3dx11_42_x86.cab", "Jun2010_d3dx11_43_x86.cab"]; + + this.extractDirectXToSystemDirectory(progressBar, filesToExtractx86, system32directory, "*.dll"); + + if (this.architecture() == "amd64") { + const system64directory = this.wine.system64directory(); + + new CabExtract() + .wizard(wizard) + .archive(setupFile) + .to(`${prefixDirectory}/drive_c/d3dx11/`) + .extract(["-L", "-F", "*d3dx11*x64*"]); + + const filesToExtractx64 = [ + "Aug2009_d3dx11_42_x86.cab", + "Jun2010_d3dx11_43_x86.cab", + "Aug2009_d3dx11_42_x64.cab", + "Jun2010_d3dx11_43_x64.cab" + ]; + + this.extractDirectXToSystemDirectory(progressBar, filesToExtractx64, system64directory, "*.dll"); + } + + this.wine + .overrideDLL() + .set("native, builtin", ["d3dx11_42", "d3dx11_43"]) + .do(); + } + + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "d3dx11", Optional.empty()); + + wine.prefix(container); wine.wizard(wizard); - wine.d3dx11(); + + new D3DX11Verb(wine).go(); wizard.close(); } -}; +} + +module.default = D3DX11Verb; diff --git a/Engines/Wine/Verbs/d3dx9/script.js b/Engines/Wine/Verbs/d3dx9/script.js index 6ba005fa80..ea6f236adc 100644 --- a/Engines/Wine/Verbs/d3dx9/script.js +++ b/Engines/Wine/Verbs/d3dx9/script.js @@ -2,15 +2,31 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); const { CabExtract } = include("utils.functions.filesystem.extract"); +const Optional = Java.type("java.util.Optional"); + include("engines.wine.plugins.override_dll"); /** * Verb to install D3DX9 - * - * @returns {Wine} Wine object */ -Wine.prototype.d3dx9 = function () { - const extractDirectXtoSystemDirectory = (progressBar, filesToExtract, destination, pattern) => { +class D3DX9Verb { + constructor(wine) { + this.wine = wine; + } + + /** + * Extracts DirectX9 to the system directory + * + * @param {*} progressBar The progress bar + * @param {*} filesToExtract A list of files to extract + * @param {*} destination The destination folder + * @param {*} pattern The file pattern used during extraction + * @returns {void} + */ + extractDirectXToSystemDirectory(progressBar, filesToExtract, destination, pattern) { + const wizard = this.wine.wizard(); + const prefixDirectory = this.wine.prefixDirectory(); + filesToExtract.reduce((numberOfExtractedFiles, cabFile) => { print(tr("Extracting {0}...", cabFile)); @@ -18,134 +34,137 @@ Wine.prototype.d3dx9 = function () { progressBar.setProgressPercentage((numberOfExtractedFiles * 100) / filesToExtract.length); new CabExtract() - .archive(this.prefixDirectory() + "/drive_c/d3dx9/" + cabFile) + .wizard(wizard) + .archive(`${prefixDirectory}/drive_c/d3dx9/${cabFile}`) .to(destination) .extract(["-L", "-F", pattern]); return numberOfExtractedFiles + 1; }, 0); - }; - - const setupFile = new Resource() - .wizard(this.wizard()) - .url( - "http://download.microsoft.com/download/8/4/A/84A35BF1-DAFE-4AE8-82AF-AD2AE20B6B14/directx_Jun2010_redist.exe" - ) - .checksum("f8f1217f666bf2f6863631a7d5e5fb3a8d1542df") - .name("directx_Jun2010_redist.exe") - .get(); - - const progressBar = this.wizard().progressBar(tr("Please wait...")); - progressBar.setText(tr("Extracting {0}...", "DirectX 9")); - progressBar.setProgressPercentage(0); - - new CabExtract() - .archive(setupFile) - .to(this.prefixDirectory() + "/drive_c/d3dx9/") - .extract(["-L", "-F", "*d3dx9*x86*"]); - - const filesToExtractx86 = [ - "apr2007_d3dx9_33_x86.cab", - "aug2007_d3dx9_35_x86.cab", - "apr2005_d3dx9_25_x86.cab", - "apr2006_d3dx9_30_x86.cab", - "aug2005_d3dx9_27_x86.cab", - "aug2008_d3dx9_39_x86.cab", - "aug2009_d3dx9_42_x86.cab", - "dec2006_d3dx9_32_x86.cab", - "dec2005_d3dx9_28_x86.cab", - "feb2005_d3dx9_24_x86.cab", - "feb2006_d3dx9_29_x86.cab", - "jun2007_d3dx9_34_x86.cab", - "jun2008_d3dx9_38_x86.cab", - "jun2005_d3dx9_26_x86.cab", - "jun2010_d3dx9_43_x86.cab", - "mar2008_d3dx9_37_x86.cab", - "mar2009_d3dx9_41_x86.cab", - "nov2007_d3dx9_36_x86.cab", - "nov2008_d3dx9_40_x86.cab", - "oct2006_d3dx9_31_x86.cab" - ]; - extractDirectXtoSystemDirectory(progressBar, filesToExtractx86, this.system32directory(), "d3dx9*.dll"); - - if (this.architecture() == "amd64") { + } + + go() { + const wizard = this.wine.wizard(); + const prefixDirectory = this.wine.prefixDirectory(); + const system32directory = this.wine.system32directory(); + + const setupFile = new Resource() + .wizard(wizard) + .url( + "http://download.microsoft.com/download/8/4/A/84A35BF1-DAFE-4AE8-82AF-AD2AE20B6B14/directx_Jun2010_redist.exe" + ) + .checksum("f8f1217f666bf2f6863631a7d5e5fb3a8d1542df") + .name("directx_Jun2010_redist.exe") + .get(); + + const progressBar = wizard.progressBar(tr("Please wait...")); + progressBar.setText(tr("Extracting {0}...", "DirectX 9")); + progressBar.setProgressPercentage(0); + new CabExtract() + .wizard(wizard) .archive(setupFile) - .to(this.prefixDirectory() + "/drive_c/d3dx9/") - .extract(["-L", "-F", "*d3dx9*x64*"]); - - const filesToExtractx64 = [ - "APR2007_d3dx9_33_x64.cab", - "AUG2007_d3dx9_35_x64.cab", - "Apr2005_d3dx9_25_x64.cab", - "Apr2006_d3dx9_30_x64.cab", - "Aug2005_d3dx9_27_x64.cab", - "Aug2008_d3dx9_39_x64.cab", - "Aug2009_d3dx9_42_x64.cab", - "DEC2006_d3dx9_32_x64.cab", - "Dec2005_d3dx9_28_x64.cab", - "Feb2005_d3dx9_24_x64.cab", - "Feb2006_d3dx9_29_x64.cab", - "JUN2007_d3dx9_34_x64.cab", - "JUN2008_d3dx9_38_x64.cab", - "Jun2005_d3dx9_26_x64.cab", - "Jun2010_d3dx9_43_x64.cab", - "Mar2008_d3dx9_37_x64.cab", - "Mar2009_d3dx9_41_x64.cab", - "Nov2007_d3dx9_36_x64.cab", - "Nov2008_d3dx9_40_x64.cab", - "OCT2006_d3dx9_31_x64.cab" + .to(`${prefixDirectory}/drive_c/d3dx9/`) + .extract(["-L", "-F", "*d3dx9*x86*"]); + + const filesToExtractx86 = [ + "apr2007_d3dx9_33_x86.cab", + "aug2007_d3dx9_35_x86.cab", + "apr2005_d3dx9_25_x86.cab", + "apr2006_d3dx9_30_x86.cab", + "aug2005_d3dx9_27_x86.cab", + "aug2008_d3dx9_39_x86.cab", + "aug2009_d3dx9_42_x86.cab", + "dec2006_d3dx9_32_x86.cab", + "dec2005_d3dx9_28_x86.cab", + "feb2005_d3dx9_24_x86.cab", + "feb2006_d3dx9_29_x86.cab", + "jun2007_d3dx9_34_x86.cab", + "jun2008_d3dx9_38_x86.cab", + "jun2005_d3dx9_26_x86.cab", + "jun2010_d3dx9_43_x86.cab", + "mar2008_d3dx9_37_x86.cab", + "mar2009_d3dx9_41_x86.cab", + "nov2007_d3dx9_36_x86.cab", + "nov2008_d3dx9_40_x86.cab", + "oct2006_d3dx9_31_x86.cab" ]; - extractDirectXtoSystemDirectory(progressBar, filesToExtractx64, this.system64directory(), "d3dx9*.dll"); - } + this.extractDirectXToSystemDirectory(progressBar, filesToExtractx86, system32directory, "d3dx9*.dll"); - this.overrideDLL() - .set("native", [ - "d3dx9_24", - "d3dx9_25", - "d3dx9_26", - "d3dx9_27", - "d3dx9_28", - "d3dx9_29", - "d3dx9_30", - "d3dx9_31", - "d3dx9_32", - "d3dx9_33", - "d3dx9_34", - "d3dx9_35", - "d3dx9_36", - "d3dx9_37", - "d3dx9_38", - "d3dx9_39", - "d3dx9_40", - "d3dx9_41", - "d3dx9_42", - "d3dx9_43" - ]) - .do(); - - return this; -}; + if (this.architecture() == "amd64") { + const system64directory = this.wine.system64directory(); -/** - * Verb to install D3DX9 - */ -module.default = class D3DX9Verb { - constructor() { - // do nothing + new CabExtract() + .wizard(wizard) + .archive(setupFile) + .to(`${prefixDirectory}/drive_c/d3dx9/`) + .extract(["-L", "-F", "*d3dx9*x64*"]); + + const filesToExtractx64 = [ + "APR2007_d3dx9_33_x64.cab", + "AUG2007_d3dx9_35_x64.cab", + "Apr2005_d3dx9_25_x64.cab", + "Apr2006_d3dx9_30_x64.cab", + "Aug2005_d3dx9_27_x64.cab", + "Aug2008_d3dx9_39_x64.cab", + "Aug2009_d3dx9_42_x64.cab", + "DEC2006_d3dx9_32_x64.cab", + "Dec2005_d3dx9_28_x64.cab", + "Feb2005_d3dx9_24_x64.cab", + "Feb2006_d3dx9_29_x64.cab", + "JUN2007_d3dx9_34_x64.cab", + "JUN2008_d3dx9_38_x64.cab", + "Jun2005_d3dx9_26_x64.cab", + "Jun2010_d3dx9_43_x64.cab", + "Mar2008_d3dx9_37_x64.cab", + "Mar2009_d3dx9_41_x64.cab", + "Nov2007_d3dx9_36_x64.cab", + "Nov2008_d3dx9_40_x64.cab", + "OCT2006_d3dx9_31_x64.cab" + ]; + + this.extractDirectXToSystemDirectory(progressBar, filesToExtractx64, system64directory, "d3dx9*.dll"); + } + + this.wine + .overrideDLL() + .set("native", [ + "d3dx9_24", + "d3dx9_25", + "d3dx9_26", + "d3dx9_27", + "d3dx9_28", + "d3dx9_29", + "d3dx9_30", + "d3dx9_31", + "d3dx9_32", + "d3dx9_33", + "d3dx9_34", + "d3dx9_35", + "d3dx9_36", + "d3dx9_37", + "d3dx9_38", + "d3dx9_39", + "d3dx9_40", + "d3dx9_41", + "d3dx9_42", + "d3dx9_43" + ]) + .do(); } - install(container) { + static install(container) { const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "d3dx9", Optional.empty()); wine.prefix(container); - - const wizard = SetupWizard(InstallationType.VERBS, "d3dx9", java.util.Optional.empty()); - wine.wizard(wizard); - wine.d3dx9(); + + new D3DX9Verb(wine).go(); wizard.close(); } -}; +} + +module.default = D3DX9Verb; diff --git a/Engines/Wine/Verbs/devenum/script.js b/Engines/Wine/Verbs/devenum/script.js index b051315f67..7c0e73030a 100644 --- a/Engines/Wine/Verbs/devenum/script.js +++ b/Engines/Wine/Verbs/devenum/script.js @@ -1,6 +1,8 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); -const {CabExtract} = include("utils.functions.filesystem.extract"); +const { CabExtract } = include("utils.functions.filesystem.extract"); + +const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.override_dll"); include("engines.wine.plugins.regsvr32"); @@ -8,52 +10,58 @@ include("engines.wine.verbs.luna"); /** * Verb to install devenum - * - * @returns {Wine} Wine object */ -Wine.prototype.devenum = function () { - var setupFile = new Resource() - .wizard(this.wizard()) - .url("https://download.microsoft.com/download/E/E/1/EE17FF74-6C45-4575-9CF4-7FC2597ACD18/directx_feb2010_redist.exe") - .checksum("a97c820915dc20929e84b49646ec275760012a42") - .name("directx_feb2010_redist.exe") - .get(); - - this.wizard().wait(tr("Please wait while {0} is installed...", "devenum")); - - new CabExtract() - .archive(setupFile) - .to(this.prefixDirectory() + "/drive_c/devenum/") - .extract(["-L", "-F", "dxnt.cab"]); - - new CabExtract() - .archive(this.prefixDirectory() + "/drive_c/devenum/dxnt.cab") - .to(this.system32directory()) - .extract(["-L", "-F", "devenum.dll"]); - - this.regsvr32().install("devenum.dll"); - this.overrideDLL() - .set("native", ["devenum"]) - .do(); - - return this; -}; +class DevenumVerb { + constructor(wine) { + this.wine = wine; + } -/** - * Verb to install devenum - */ -// eslint-disable-next-line no-unused-vars -module.default = class DevenumVerb { - constructor() { - // do nothing + go() { + const wizard = this.wine.wizard(); + const prefixDirectory = this.wine.prefixDirectory(); + const system32directory = this.wine.system32directory(); + + const setupFile = new Resource() + .wizard(wizard) + .url( + "https://download.microsoft.com/download/E/E/1/EE17FF74-6C45-4575-9CF4-7FC2597ACD18/directx_feb2010_redist.exe" + ) + .checksum("a97c820915dc20929e84b49646ec275760012a42") + .name("directx_feb2010_redist.exe") + .get(); + + wizard.wait(tr("Please wait while {0} is installed...", "devenum")); + + new CabExtract() + .wizard(wizard) + .archive(setupFile) + .to(`${prefixDirectory}/drive_c/devenum/`) + .extract(["-L", "-F", "dxnt.cab"]); + + new CabExtract() + .wizard(wizard) + .archive(`${prefixDirectory}/drive_c/devenum/dxnt.cab`) + .to(system32directory) + .extract(["-L", "-F", "devenum.dll"]); + + this.wine.regsvr32().install("devenum.dll"); + this.wine + .overrideDLL() + .set("native", ["devenum"]) + .do(); } - install(container) { - var wine = new Wine(); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "devenum", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "devenum", java.util.Optional.empty()); wine.wizard(wizard); - wine.devenum(); + + new DevenumVerb(wine).go(); + wizard.close(); } } + +module.default = DevenumVerb; diff --git a/Engines/Wine/Verbs/dotnet20/script.js b/Engines/Wine/Verbs/dotnet20/script.js index 850b2f4555..d054bfece7 100644 --- a/Engines/Wine/Verbs/dotnet20/script.js +++ b/Engines/Wine/Verbs/dotnet20/script.js @@ -1,6 +1,8 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); -const {remove} = include("utils.functions.filesystem.files"); +const { remove } = include("utils.functions.filesystem.files"); + +const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.override_dll"); include("engines.wine.plugins.windows_version"); @@ -8,50 +10,69 @@ include("engines.wine.verbs.remove_mono"); /** * Verb to install .NET 2.0 - * - * @returns {Wine} Wine object */ -Wine.prototype.dotnet20 = function () { - var osVersion = this.windowsVersion(); +class DotNET20 { + constructor(wine) { + this.wine = wine; + } - if (this.architecture() == "x86") { - this.windowsVersion("win2k"); + go() { + const wizard = this.wine.wizard(); + const windowsVersion = this.wine.windowsVersion(); + const system32directory = this.wine.system32directory(); - var setupFile32 = new Resource() - .wizard(this.wizard()) - .url("https://download.lenovo.com/ibmdl/pub/pc/pccbbs/thinkvantage_en/dotnetfx.exe") - .checksum("a3625c59d7a2995fb60877b5f5324892a1693b2a") - .name("dotnetfx.exe") - .get(); + if (this.wine.architecture() == "x86") { + this.wine.windowsVersion("win2k"); - this.removeMono(); + const setupFile32 = new Resource() + .wizard(wizard) + .url("https://download.lenovo.com/ibmdl/pub/pc/pccbbs/thinkvantage_en/dotnetfx.exe") + .checksum("a3625c59d7a2995fb60877b5f5324892a1693b2a") + .name("dotnetfx.exe") + .get(); - this.wizard().wait(tr("Please wait while {0} is installed...", ".NET Framework 2.0")); - this.run(setupFile32, ["/q:a", "/c:install.exe /q"], null, false, true); + this.wine.removeMono(); - this.windowsVersion(osVersion); + wizard.wait(tr("Please wait while {0} is installed...", ".NET Framework 2.0")); - 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/a/3/f/a3f1bf98-18f3-4036-9b68-8e6de530ce0a/NetFx64.exe") - .checksum("e59cca309463a5d98daeaada83d1b05fed5126c5") - .name("NetFx64.exe") - .get(); - - this.removeMono(); - - this.wizard().wait(tr("Please wait while {0} is installed...", ".NET Framework 2.0")); - this.run(setupFile64, ["/q:a", "/c:install.exe /q"], null, false, true) + this.wine.run(setupFile32, ["/q:a", "/c:install.exe /q"], null, false, true); + + this.wine.windowsVersion(windowsVersion); + + remove(`${system32directory}/msvcr80.dll`); + remove(`${system32directory}/msvcm80.dll`); + remove(`${system32directory}/msvcp80.dll`); + } else { + const setupFile64 = new Resource() + .wizard(wizard) + .url("https://download.microsoft.com/download/a/3/f/a3f1bf98-18f3-4036-9b68-8e6de530ce0a/NetFx64.exe") + .checksum("e59cca309463a5d98daeaada83d1b05fed5126c5") + .name("NetFx64.exe") + .get(); + + this.wine.removeMono(); + + wizard.wait(tr("Please wait while {0} is installed...", ".NET Framework 2.0")); + + this.wine.run(setupFile64, ["/q:a", "/c:install.exe /q"], null, false, true); + } + + //This is in winetricks source, but does not seem to work + //this.wizard().wait(tr("Please wait while executing ngen...")); + //this.run(this.prefixDirectory() + "/drive_c/windows/Microsoft.NET/Framework/v2.0.50727/ngen.exe", "executequeueditems", null, false, true); } - //This is in winetricks source, but does not seem to work - //this.wizard().wait(tr("Please wait while executing ngen...")); - //this.run(this.prefixDirectory() + "/drive_c/windows/Microsoft.NET/Framework/v2.0.50727/ngen.exe", "executequeueditems", null, false, true); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "dotnet20", Optional.empty()); + + wine.prefix(container); + wine.wizard(wizard); + + new DotNET20(wine).go(); + + wizard.close(); + } +} - return this; -}; +module.default = DotNET20; diff --git a/Engines/Wine/Verbs/dotnet20sp2/script.js b/Engines/Wine/Verbs/dotnet20sp2/script.js index 1a0540799b..5bc311d999 100644 --- a/Engines/Wine/Verbs/dotnet20sp2/script.js +++ b/Engines/Wine/Verbs/dotnet20sp2/script.js @@ -1,6 +1,8 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); -const {remove} = include("utils.functions.filesystem.files"); +const { remove } = include("utils.functions.filesystem.files"); + +const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.override_dll"); include("engines.wine.plugins.windows_version"); @@ -8,74 +10,77 @@ include("engines.wine.plugins.regedit"); include("engines.wine.verbs.remove_mono"); /** - * Verb to install .NET 2.0 SP2 - * - * @returns {Wine} Wine object + * Verb to install dotnet20sp2 */ -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"); +class Dotnet20SP2 { + constructor(wine) { + this.wine = wine; } - 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(); + go() { + const wizard = this.wine.wizard(); + const osVersion = this.wine.windowsVersion(); + const system32directory = this.wine.system32directory(); - 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"); + this.wine.windowsVersion("winxp"); - return this; -}; + this.wine + .overrideDLL() + .set("builtin", ["ngen.exe", "regsvcs.exe", "mscorsvw.exe"]) + .do(); -/** - * Verb to install dotnet20sp2 - */ -// eslint-disable-next-line no-unused-vars -module.default = class Dotnet20SP2Verb { - constructor() { - // do nothing + this.wine.removeMono(); + + if (this.wine.architecture() == "x86") { + const setupFile32 = new Resource() + .wizard(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(); + + wizard.wait(tr("Please wait while {0} is installed...", ".NET Framework 2.0 SP2")); + + this.wine.run(setupFile32, [setupFile32, "/q", '/c:"install.exe /q"'], null, false, true); + + remove(`${system32directory}/msvcr80.dll`); + remove(`${system32directory}/msvcm80.dll`); + remove(`${system32directory}/msvcp80.dll`); + } else { + const setupFile64 = new Resource() + .wizard(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(); + + wizard.wait(tr("Please wait while {0} is installed...", ".NET Framework 2.0 SP2")); + + this.wine.run(setupFile64, [setupFile64, "/q", '/c:"install.exe /q"'], null, false, true); + } + + this.wine.windowsVersion(osVersion); + + this.wine.regedit().deleteValue("HKCU\\Software\\Wine\\DllOverrides", "*ngen.exe"); + this.wine.regedit().deleteValue("HKCU\\Software\\Wine\\DllOverrides", "*regsvcs.exe"); + this.wine.regedit().deleteValue("HKCU\\Software\\Wine\\DllOverrides", "*mscorsvw.exe"); } - install(container) { - var wine = new Wine(); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "dotnet20sp2", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "dotnet20sp2", java.util.Optional.empty()); wine.wizard(wizard); - wine.dotnet20sp2(); + + new Dotnet20SP2(wine).go(); + wizard.close(); } } + +module.default = DotNET20SP2; diff --git a/Engines/Wine/Verbs/dotnet40/script.js b/Engines/Wine/Verbs/dotnet40/script.js index 91f39e594d..94bc892e05 100755 --- a/Engines/Wine/Verbs/dotnet40/script.js +++ b/Engines/Wine/Verbs/dotnet40/script.js @@ -1,85 +1,103 @@ 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.override_dll"); include("engines.wine.plugins.windows_version"); include("engines.wine.plugins.regedit"); include("engines.wine.verbs.remove_mono"); - /** * Verb to install .NET 4.0 - * - * @returns {Wine} Wine object */ -Wine.prototype.dotnet40 = function () { - if (this.architecture() == "amd64") { - print(tr("This package ({0}) may not fully work on a 64-bit installation. 32-bit prefixes may work better.", "dotnet40")); +class DotNET40 { + constructor(wine) { + this.wine = wine; } - var osVersion = this.windowsVersion(); + go() { + const wizard = this.wine.wizard(); + const windowsVersion = this.wine.windowsVersion(); + + if (this.wine.architecture() == "amd64") { + print( + tr( + "This package ({0}) may not fully work on a 64-bit installation. 32-bit prefixes may work better.", + "dotnet40" + ) + ); + } - var setupFile = new Resource() - .wizard(this.wizard()) - .url("http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe") - .checksum("58da3d74db353aad03588cbb5cea8234166d8b99") - .name("dotNetFx40_Full_x86_x64.exe") - .get(); + const setupFile = new Resource() + .wizard(wizard) + .url( + "http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe" + ) + .checksum("58da3d74db353aad03588cbb5cea8234166d8b99") + .name("dotNetFx40_Full_x86_x64.exe") + .get(); - this.removeMono(); + this.wine.removeMono(); - this.windowsVersion("winxp"); + this.wine.windowsVersion("winxp"); - this.overrideDLL() - .set("builtin", ["fusion"]) - .do(); + this.wine + .overrideDLL() + .set("builtin", ["fusion"]) + .do(); - this.wizard().wait(tr("Please wait while {0} is installed...", ".NET Framework 4.0")); - this.run(setupFile, [setupFile, "/q", "/c:\"install.exe /q\""], null, false, true); + wizard.wait(tr("Please wait while {0} is installed...", ".NET Framework 4.0")); - this.wizard().wait(tr("Please wait...")); - this.regedit().deleteValue("HKCU\\Software\\Wine\\DllOverrides", "*fusion"); + this.wine.run(setupFile, [setupFile, "/q", '/c:"install.exe /q"'], null, false, true); - this.overrideDLL() - .set("native", ["mscoree"]) - .do(); + wizard.wait(tr("Please wait...")); - this.wizard().wait(tr("Please wait...")); - var regeditFileContent = "REGEDIT4\n" + - "\n" + - "[HKEY_LOCAL_MACHINE\\Software\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full]\n" + - "\"Install\"=dword:0001\n" + - "\"Version\"=\"4.0.30319\""; + this.wine.regedit().deleteValue("HKCU\\Software\\Wine\\DllOverrides", "*fusion"); - this.regedit().patch(regeditFileContent); + this.wine + .overrideDLL() + .set("native", ["mscoree"]) + .do(); - //This is in winetricks source, but does not seem to work - //this.wizard().wait(tr("Please wait while executing ngen...")); - //this.run(this.prefixDirectory() + "/drive_c/windows/Microsoft.NET/Framework/v4.0.30319/ngen.exe", "executequeueditems", null, false, true); + wizard.wait(tr("Please wait...")); - this.windowsVersion(osVersion); + const regeditFileContent = + "REGEDIT4\n" + + "\n" + + "[HKEY_LOCAL_MACHINE\\Software\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full]\n" + + '"Install"=dword:0001\n' + + '"Version"="4.0.30319"'; - return this; -}; + this.wine.regedit().patch(regeditFileContent); -/** - * Verb to install .NET 4.0 - */ -// eslint-disable-next-line no-unused-vars -module.default = class Dotnet40Verb { - constructor() { - // do nothing + //This is in winetricks source, but does not seem to work + //this.wizard().wait(tr("Please wait while executing ngen...")); + //this.run(this.prefixDirectory() + "/drive_c/windows/Microsoft.NET/Framework/v4.0.30319/ngen.exe", "executequeueditems", null, false, true); + + this.wine.windowsVersion(windowsVersion); } - install(container) { - var wine = new Wine(); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "dotnet40", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "dotnet40", java.util.Optional.empty()); + wine.wizard(wizard); + if (wine.architecture() == "amd64") { - wizard.message(tr("This package ({0}) may not fully work on a 64-bit installation. 32-bit prefixes may work better.", "dotnet40")); + wizard.message( + tr( + "This package ({0}) may not fully work on a 64-bit installation. 32-bit prefixes may work better.", + "dotnet40" + ) + ); } - wine.wizard(wizard); - wine.dotnet40(); + + new DotNET40(wine).go(); + wizard.close(); } } + +module.default = DotNET40; diff --git a/Engines/Wine/Verbs/dotnet45/script.js b/Engines/Wine/Verbs/dotnet45/script.js index bc8738209f..5979a94952 100755 --- a/Engines/Wine/Verbs/dotnet45/script.js +++ b/Engines/Wine/Verbs/dotnet45/script.js @@ -1,76 +1,95 @@ 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.override_dll"); include("engines.wine.plugins.windows_version"); include("engines.wine.plugins.regedit"); include("engines.wine.verbs.remove_mono"); -include("engines.wine.verbs.dotnet40"); +const DotNET40 = include("engines.wine.verbs.dotnet40"); /** * Verb to install .NET 4.5 - * @returns {Wine} Wine object */ -Wine.prototype.dotnet45 = function () { - if (this.architecture() == "amd64") { - print(tr("This package ({0}) may not fully work on a 64-bit installation. 32-bit prefixes may work better.", "dotnet45")); +class DotNET45 { + constructor(wine) { + this.wine = wine; } - var osVersion = this.windowsVersion(); + go() { + const wizard = this.wine.wizard(); + const windowsVersion = this.wine.windowsVersion(); - var setupFile = new Resource() - .wizard(this.wizard()) - .url("http://download.microsoft.com/download/b/a/4/ba4a7e71-2906-4b2d-a0e1-80cf16844f5f/dotnetfx45_full_x86_x64.exe") - .checksum("b2ff712ca0947040ca0b8e9bd7436a3c3524bb5d") - .name("dotnetfx45_full_x86_x64.exe") - .get(); + if (this.architecture() == "amd64") { + print( + tr( + "This package ({0}) may not fully work on a 64-bit installation. 32-bit prefixes may work better.", + "dotnet45" + ) + ); + } - this.removeMono(); + const setupFile = new Resource() + .wizard(wizard) + .url( + "http://download.microsoft.com/download/b/a/4/ba4a7e71-2906-4b2d-a0e1-80cf16844f5f/dotnetfx45_full_x86_x64.exe" + ) + .checksum("b2ff712ca0947040ca0b8e9bd7436a3c3524bb5d") + .name("dotnetfx45_full_x86_x64.exe") + .get(); - this.dotnet40(); - this.windowsVersion("win7"); + this.wine.removeMono(); - this.overrideDLL() - .set("builtin", ["fusion"]) - .do(); + new DotNET40(this.wine).go(); - this.wizard().wait(tr("Please wait while {0} is installed...", ".NET Framework 4.5")); - this.run(setupFile, [setupFile, "/q", "/c:\"install.exe /q\""], null, false, true); + this.wine.windowsVersion("win7"); - this.wizard().wait(tr("Please wait...")); - this.regedit().deleteValue("HKCU\\Software\\Wine\\DllOverrides", "*fusion"); + this.wine + .overrideDLL() + .set("builtin", ["fusion"]) + .do(); - this.overrideDLL() - .set("native", ["mscoree"]) - .do(); + wizard.wait(tr("Please wait while {0} is installed...", ".NET Framework 4.5")); - this.windowsVersion(osVersion); + this.wine.run(setupFile, [setupFile, "/q", '/c:"install.exe /q"'], null, false, true); - if (osVersion != "win2003") { - print(tr("{0} applications can have issues when windows version is not set to \"win2003\"", ".NET 4.5")); - } + wizard.wait(tr("Please wait...")); - return this; -}; + this.wine.regedit().deleteValue("HKCU\\Software\\Wine\\DllOverrides", "*fusion"); -/** - * Verb to install .NET 4.5 - */ -// eslint-disable-next-line no-unused-vars -module.default = class Dotnet45Verb { - constructor() { - // do nothing + this.wine + .overrideDLL() + .set("native", ["mscoree"]) + .do(); + + this.wine.windowsVersion(windowsVersion); + + if (windowsVersion != "win2003") { + print(tr('{0} applications can have issues when windows version is not set to "win2003"', ".NET 4.5")); + } } - install(container) { - var wine = new Wine(); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "dotnet45", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "dotnet45", java.util.Optional.empty()); + wine.wizard(wizard); + if (wine.architecture() == "amd64") { - wizard.message(tr("This package ({0}) may not fully work on a 64-bit installation. 32-bit prefixes may work better.", "dotnet45")); + wizard.message( + tr( + "This package ({0}) may not fully work on a 64-bit installation. 32-bit prefixes may work better.", + "dotnet45" + ) + ); } - wine.wizard(wizard); - wine.dotnet45(); + + new DotNET45(wine).go(); + wizard.close(); } } + +module.default = DotNET45; diff --git a/Engines/Wine/Verbs/dotnet452/script.js b/Engines/Wine/Verbs/dotnet452/script.js index 5969adbcbd..635bc03361 100755 --- a/Engines/Wine/Verbs/dotnet452/script.js +++ b/Engines/Wine/Verbs/dotnet452/script.js @@ -1,74 +1,81 @@ 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.override_dll"); include("engines.wine.plugins.windows_version"); include("engines.wine.plugins.regedit"); include("engines.wine.verbs.remove_mono"); -include("engines.wine.verbs.dotnet40"); - +const DotNET40 = include("engines.wine.verbs.dotnet40"); /** * Verb to install .NET 4.5.2 - * - * @returns {Wine} Wine object */ -Wine.prototype.dotnet452 = function () { - print(tr("This package ({0}) does not work currently. Use it only for testing!", "dotnet452")); +class DotNET452 { + constructor(wine) { + this.wine = wine; + } - var osVersion = this.windowsVersion(); + go() { + const wizard = this.wine.wizard(); + const windowsVersion = this.wine.windowsVersion(); - var setupFile = new Resource() - .wizard(this.wizard()) - .url("https://download.microsoft.com/download/E/2/1/E21644B5-2DF2-47C2-91BD-63C560427900/NDP452-KB2901907-x86-x64-AllOS-ENU.exe") - .checksum("89f86f9522dc7a8a965facce839abb790a285a63") - .name("NDP452-KB2901907-x86-x64-AllOS-ENU.exe") - .get(); + print(tr("This package ({0}) does not work currently. Use it only for testing!", "dotnet452")); - this.removeMono(); + const setupFile = new Resource() + .wizard(wizard) + .url( + "https://download.microsoft.com/download/E/2/1/E21644B5-2DF2-47C2-91BD-63C560427900/NDP452-KB2901907-x86-x64-AllOS-ENU.exe" + ) + .checksum("89f86f9522dc7a8a965facce839abb790a285a63") + .name("NDP452-KB2901907-x86-x64-AllOS-ENU.exe") + .get(); - this.dotnet40(); - this.windowsVersion("win7"); + this.wine.removeMono(); - this.overrideDLL() - .set("builtin", ["fusion"]) - .do(); + new DotNET40(this.wine).go(); - this.wizard().wait(tr("Please wait while {0} is installed...", ".NET Framework 4.5.2")); - this.run(setupFile, [setupFile, "/q", "/c:\"install.exe /q\""], null, false, true); + this.wine.windowsVersion("win7"); - this.wizard().wait(tr("Please wait...")); - this.regedit().deleteValue("HKCU\\Software\\Wine\\DllOverrides", "*fusion"); + this.wine + .overrideDLL() + .set("builtin", ["fusion"]) + .do(); - this.overrideDLL() - .set("native", ["mscoree"]) - .do(); + wizard.wait(tr("Please wait while {0} is installed...", ".NET Framework 4.5.2")); - this.windowsVersion(osVersion); + this.wine.run(setupFile, [setupFile, "/q", '/c:"install.exe /q"'], null, false, true); - if (osVersion != "win2003") { - print(tr("{0} applications can have issues when windows version is not set to \"win2003\"", ".NET 4.5.2")); - } + wizard.wait(tr("Please wait...")); - return this; -}; + this.wine.regedit().deleteValue("HKCU\\Software\\Wine\\DllOverrides", "*fusion"); -/** - * Verb to install .NET 4.5.2 - */ -// eslint-disable-next-line no-unused-vars -module.default = class Dotnet452Verb { - constructor() { - // do nothing + this.wine + .overrideDLL() + .set("native", ["mscoree"]) + .do(); + + this.wine.windowsVersion(windowsVersion); + + if (windowsVersion != "win2003") { + print(tr('{0} applications can have issues when windows version is not set to "win2003"', ".NET 4.5.2")); + } } - install(container) { - var wine = new Wine(); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "dotnet452", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "dotnet452", java.util.Optional.empty()); - wizard.message(tr("This package ({0}) does not work currently. Use it only for testing!", "dotnet452")); wine.wizard(wizard); - wine.dotnet452(); + + wizard.message(tr("This package ({0}) does not work currently. Use it only for testing!", "dotnet452")); + + new DotNET452(wine).go(); + wizard.close(); } } + +module.default = DotNET452; diff --git a/Engines/Wine/Verbs/dotnet46/script.js b/Engines/Wine/Verbs/dotnet46/script.js index f5621ba435..fbf5b15134 100755 --- a/Engines/Wine/Verbs/dotnet46/script.js +++ b/Engines/Wine/Verbs/dotnet46/script.js @@ -1,69 +1,77 @@ 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.override_dll"); include("engines.wine.plugins.windows_version"); include("engines.wine.plugins.regedit"); include("engines.wine.verbs.remove_mono"); -include("engines.wine.verbs.dotnet45"); +const DotNET45 = include("engines.wine.verbs.dotnet45"); /** * Verb to install .NET 4.6 - * - * @returns {Wine} Wine object */ -Wine.prototype.dotnet46 = function () { - print(tr("This package ({0}) does not work currently. Use it only for testing!", "dotnet46")); +class DotNET46 { + constructor(wine) { + this.wine = wine; + } - var osVersion = this.windowsVersion(); + go() { + const wizard = this.wine.wizard(); + const windowsVersion = this.wine.windowsVersion(); - var setupFile = new Resource() - .wizard(this._wizard) - .url("https://download.microsoft.com/download/C/3/A/C3A5200B-D33C-47E9-9D70-2F7C65DAAD94/NDP46-KB3045557-x86-x64-AllOS-ENU.exe") - .checksum("3049a85843eaf65e89e2336d5fe6e85e416797be") - .name("NDP46-KB3045557-x86-x64-AllOS-ENU.exe") - .get(); + print(tr("This package ({0}) does not work currently. Use it only for testing!", "dotnet46")); - this.removeMono(); + const setupFile = new Resource() + .wizard(wizard) + .url( + "https://download.microsoft.com/download/C/3/A/C3A5200B-D33C-47E9-9D70-2F7C65DAAD94/NDP46-KB3045557-x86-x64-AllOS-ENU.exe" + ) + .checksum("3049a85843eaf65e89e2336d5fe6e85e416797be") + .name("NDP46-KB3045557-x86-x64-AllOS-ENU.exe") + .get(); - this.dotnet45(); - this.windowsVersion("win7"); + this.wine.removeMono(); - this.overrideDLL() - .set("builtin", ["fusion"]) - .do(); + new DotNET45(this.wine).go(); - this.wizard().wait(tr("Please wait while {0} is installed...", ".NET Framework 4.6")); - this.run(setupFile, [setupFile, "/q", "/c:\"install.exe /q\""], null, false, true); + this.wine.windowsVersion("win7"); - this.wizard().wait(tr("Please wait...")); - this.regedit().deleteValue("HKCU\\Software\\Wine\\DllOverrides", "*fusion"); + this.wine + .overrideDLL() + .set("builtin", ["fusion"]) + .do(); - this.overrideDLL() - .set("native", ["mscoree"]) - .do(); + wizard.wait(tr("Please wait while {0} is installed...", ".NET Framework 4.6")); - this.windowsVersion(osVersion); + this.wine.run(setupFile, [setupFile, "/q", '/c:"install.exe /q"'], null, false, true); - return this; -}; + wizard.wait(tr("Please wait...")); -/** - * Verb to install .NET 4.6 - */ -// eslint-disable-next-line no-unused-vars -module.default = class Dotnet46Verb { - constructor() { - // do nothing + this.wine.regedit().deleteValue("HKCU\\Software\\Wine\\DllOverrides", "*fusion"); + + this.wine + .overrideDLL() + .set("native", ["mscoree"]) + .do(); + + this.wine.windowsVersion(windowsVersion); } - install(container) { - var wine = new Wine(); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "dotnet46", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "dotnet46", java.util.Optional.empty()); - wizard.message(tr("This package ({0}) does not work currently. Use it only for testing!", "dotnet46")); wine.wizard(wizard); - wine.dotnet46(); + + wizard.message(tr("This package ({0}) does not work currently. Use it only for testing!", "dotnet46")); + + new DotNET46(wine).go(); + wizard.close(); } } + +module.default = DotNET46; diff --git a/Engines/Wine/Verbs/dotnet461/script.js b/Engines/Wine/Verbs/dotnet461/script.js index 20351ebfd1..ddbd333ede 100755 --- a/Engines/Wine/Verbs/dotnet461/script.js +++ b/Engines/Wine/Verbs/dotnet461/script.js @@ -1,70 +1,77 @@ 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.override_dll"); include("engines.wine.plugins.windows_version"); include("engines.wine.plugins.regedit"); include("engines.wine.verbs.remove_mono"); -include("engines.wine.verbs.dotnet46"); - +const DotNET46 = include("engines.wine.verbs.dotnet46"); /** * Verb to install .NET 4.6.1 - * - * @returns {Wine} Wine object */ -Wine.prototype.dotnet461 = function () { - print(tr("This package ({0}) does not work currently. Use it only for testing!", "dotnet461")); +class DotNET461 { + constructor(wine) { + this.wine = wine; + } - var osVersion = this.windowsVersion(); + go() { + const wizard = this.wine.wizard(); + const windowsVersion = this.wine.windowsVersion(); - var setupFile = new Resource() - .wizard(this._wizard) - .url("https://download.microsoft.com/download/E/4/1/E4173890-A24A-4936-9FC9-AF930FE3FA40/NDP461-KB3102436-x86-x64-AllOS-ENU.exe") - .checksum("83d048d171ff44a3cad9b422137656f585295866") - .name("NDP461-KB3102436-x86-x64-AllOS-ENU.exe") - .get(); + print(tr("This package ({0}) does not work currently. Use it only for testing!", "dotnet461")); - this.removeMono(); + const setupFile = new Resource() + .wizard(wizard) + .url( + "https://download.microsoft.com/download/E/4/1/E4173890-A24A-4936-9FC9-AF930FE3FA40/NDP461-KB3102436-x86-x64-AllOS-ENU.exe" + ) + .checksum("83d048d171ff44a3cad9b422137656f585295866") + .name("NDP461-KB3102436-x86-x64-AllOS-ENU.exe") + .get(); - this.dotnet46(); - this.windowsVersion("win7"); + this.wine.removeMono(); - this.overrideDLL() - .set("builtin", ["fusion"]) - .do(); + new DotNET46(this.wine).go(); - this.wizard().wait(tr("Please wait while {0} is installed...", ".NET Framework 4.6.1")); - this.run(setupFile, [setupFile, "/q", "/norestart"], null, false, true); + this.wine.windowsVersion("win7"); - this.wizard().wait(tr("Please wait...")); - this.regedit().deleteValue("HKCU\\Software\\Wine\\DllOverrides", "*fusion"); + this.wine + .overrideDLL() + .set("builtin", ["fusion"]) + .do(); - this.overrideDLL() - .set("native", ["mscoree"]) - .do(); + wizard.wait(tr("Please wait while {0} is installed...", ".NET Framework 4.6.1")); - this.windowsVersion(osVersion); + this.wine.run(setupFile, [setupFile, "/q", "/norestart"], null, false, true); - return this; -}; + wizard.wait(tr("Please wait...")); -/** - * Verb to install .NET 4.6.1 - */ -// eslint-disable-next-line no-unused-vars -module.default = class Dotnet461Verb { - constructor() { - // do nothing + this.wine.regedit().deleteValue("HKCU\\Software\\Wine\\DllOverrides", "*fusion"); + + this.wine + .overrideDLL() + .set("native", ["mscoree"]) + .do(); + + this.wine.windowsVersion(windowsVersion); } - install(container) { - var wine = new Wine(); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "dotnet461", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "dotnet461", java.util.Optional.empty()); - wizard.message(tr("This package ({0}) does not work currently. Use it only for testing!", "dotnet461")); wine.wizard(wizard); - wine.dotnet461(); + + wizard.message(tr("This package ({0}) does not work currently. Use it only for testing!", "dotnet461")); + + new DotNET461(wine).go(); + wizard.close(); } } + +module.default = DotNET461; diff --git a/Engines/Wine/Verbs/dotnet462/script.js b/Engines/Wine/Verbs/dotnet462/script.js index 1772c4f823..8e6fcf29a8 100755 --- a/Engines/Wine/Verbs/dotnet462/script.js +++ b/Engines/Wine/Verbs/dotnet462/script.js @@ -1,70 +1,77 @@ 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.override_dll"); include("engines.wine.plugins.windows_version"); include("engines.wine.plugins.regedit"); include("engines.wine.verbs.remove_mono"); -include("engines.wine.verbs.dotnet461"); - +const DotNET461 = include("engines.wine.verbs.dotnet461"); /** * Verb to install .NET 4.6.2 - * - * @returns {Wine} Wine object */ -Wine.prototype.dotnet462 = function () { - print(tr("This package ({0}) does not work currently. Use it only for testing!", "dotnet462")); +class DotNET462 { + constructor(wine) { + this.wine = wine; + } - var osVersion = this.windowsVersion(); + go() { + const wizard = this.wine.wizard(); + const windowsVersion = this.wine.windowsVersion(); - var setupFile = new Resource() - .wizard(this._wizard) - .url("https://download.microsoft.com/download/F/9/4/F942F07D-F26F-4F30-B4E3-EBD54FABA377/NDP462-KB3151800-x86-x64-AllOS-ENU.exe") - .checksum("a70f856bda33d45ad0a8ad035f73092441715431") - .name("NDP462-KB3151800-x86-x64-AllOS-ENU.exe") - .get(); + print(tr("This package ({0}) does not work currently. Use it only for testing!", "dotnet462")); - this.removeMono(); + const setupFile = new Resource() + .wizard(wizard) + .url( + "https://download.microsoft.com/download/F/9/4/F942F07D-F26F-4F30-B4E3-EBD54FABA377/NDP462-KB3151800-x86-x64-AllOS-ENU.exe" + ) + .checksum("a70f856bda33d45ad0a8ad035f73092441715431") + .name("NDP462-KB3151800-x86-x64-AllOS-ENU.exe") + .get(); - this.dotnet461(); - this.windowsVersion("win7"); + this.wine.removeMono(); - this.overrideDLL() - .set("builtin", ["fusion"]) - .do(); + new DotNET461(this.wine).go(); - this.wizard().wait(tr("Please wait while {0} is installed...", ".NET Framework 4.6.2")); - this.run(setupFile, [setupFile, "/sfxlang:1027", "/q", "/norestart"], null, false, true); + this.wine.windowsVersion("win7"); - this.wizard().wait(tr("Please wait...")); - this.regedit().deleteValue("HKCU\\Software\\Wine\\DllOverrides", "*fusion"); + this.wine + .overrideDLL() + .set("builtin", ["fusion"]) + .do(); - this.overrideDLL() - .set("native", ["mscoree"]) - .do(); + wizard.wait(tr("Please wait while {0} is installed...", ".NET Framework 4.6.2")); - this.windowsVersion(osVersion); + this.wine.run(setupFile, [setupFile, "/sfxlang:1027", "/q", "/norestart"], null, false, true); - return this; -}; + wizard.wait(tr("Please wait...")); -/** - * Verb to install .NET 4.6.2 - */ -// eslint-disable-next-line no-unused-vars -module.default = class Dotnet462Verb { - constructor() { - // do nothing + this.wine.regedit().deleteValue("HKCU\\Software\\Wine\\DllOverrides", "*fusion"); + + this.wine + .overrideDLL() + .set("native", ["mscoree"]) + .do(); + + this.wine.windowsVersion(windowsVersion); } - install(container) { - var wine = new Wine(); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "dotnet462", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "dotnet462", java.util.Optional.empty()); - wizard.message(tr("This package ({0}) does not work currently. Use it only for testing!", "dotnet462")); wine.wizard(wizard); - wine.dotnet462(); + + wizard.message(tr("This package ({0}) does not work currently. Use it only for testing!", "dotnet462")); + + new DotNET462(wine).go(); + wizard.close(); } } + +module.default = DotNET462; diff --git a/Engines/Wine/Verbs/dotnet472/script.js b/Engines/Wine/Verbs/dotnet472/script.js index d1fb6af5e7..13a18d9928 100755 --- a/Engines/Wine/Verbs/dotnet472/script.js +++ b/Engines/Wine/Verbs/dotnet472/script.js @@ -1,70 +1,77 @@ 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.override_dll"); include("engines.wine.plugins.windows_version"); include("engines.wine.plugins.regedit"); include("engines.wine.verbs.remove_mono"); -include("engines.wine.verbs.dotnet462"); - +const DotNET462 = include("engines.wine.verbs.dotnet462"); /** * Verb to install .NET 4.7.2 - * - * @returns {Wine} Wine object */ -Wine.prototype.dotnet472 = function () { - print(tr("This package ({0}) does not work currently. Use it only for testing!", "dotnet472")); +class DotNET472 { + constructor(wine) { + this.wine = wine; + } - var osVersion = this.windowsVersion(); + go() { + const wizard = this.wine.wizard(); + const windowsVersion = this.wine.windowsVersion(); - var setupFile = new Resource() - .wizard(this._wizard) - .url("https://download.microsoft.com/download/6/E/4/6E48E8AB-DC00-419E-9704-06DD46E5F81D/NDP472-KB4054530-x86-x64-AllOS-ENU.exe") - .checksum("31fc0d305a6f651c9e892c98eb10997ae885eb1e") - .name("NDP472-KB4054530-x86-x64-AllOS-ENU.exe") - .get(); + print(tr("This package ({0}) does not work currently. Use it only for testing!", "dotnet472")); - this.removeMono(); + const setupFile = new Resource() + .wizard(wizard) + .url( + "https://download.microsoft.com/download/6/E/4/6E48E8AB-DC00-419E-9704-06DD46E5F81D/NDP472-KB4054530-x86-x64-AllOS-ENU.exe" + ) + .checksum("31fc0d305a6f651c9e892c98eb10997ae885eb1e") + .name("NDP472-KB4054530-x86-x64-AllOS-ENU.exe") + .get(); - this.dotnet462(); - this.windowsVersion("win7"); + this.wine.removeMono(); - this.overrideDLL() - .set("builtin", ["fusion"]) - .do(); + new DotNET462(this.wine).go(); - this.wizard().wait(tr("Please wait while {0} is installed...", ".NET Framework 4.7.2")); - this.run(setupFile, [setupFile, "/sfxlang:1027", "/q", "/norestart"], null, false, true); + this.wine.windowsVersion("win7"); - this.wizard().wait(tr("Please wait...")); - this.regedit().deleteValue("HKCU\\Software\\Wine\\DllOverrides", "*fusion"); + this.wine + .overrideDLL() + .set("builtin", ["fusion"]) + .do(); - this.overrideDLL() - .set("native", ["mscoree"]) - .do(); + wizard.wait(tr("Please wait while {0} is installed...", ".NET Framework 4.7.2")); - this.windowsVersion(osVersion); + this.wine.run(setupFile, [setupFile, "/sfxlang:1027", "/q", "/norestart"], null, false, true); - return this; -}; + wizard.wait(tr("Please wait...")); -/** - * Verb to install .NET 4.7.2 - */ -// eslint-disable-next-line no-unused-vars -module.default = class Dotnet472Verb { - constructor() { - // do nothing + this.wine.regedit().deleteValue("HKCU\\Software\\Wine\\DllOverrides", "*fusion"); + + this.wine + .overrideDLL() + .set("native", ["mscoree"]) + .do(); + + this.wine.windowsVersion(windowsVersion); } - install(container) { - var wine = new Wine(); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "dotnet472", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "dotnet472", java.util.Optional.empty()); - wizard.message(tr("This package ({0}) does not work currently. Use it only for testing!", "dotnet472")); wine.wizard(wizard); - wine.dotnet472(); + + wizard.message(tr("This package ({0}) does not work currently. Use it only for testing!", "dotnet472")); + + new DotNET472(wine).go(); + wizard.close(); } } + +module.default = DotNET472; From 1875c9a9d0283215f774b6a8e21b2097fcb7bab9 Mon Sep 17 00:00:00 2001 From: Marc Arndt Date: Sun, 1 Sep 2019 11:45:39 +0200 Subject: [PATCH 2/8] - update all verbs including uplay --- .../Steam/script.js | 10 +- .../Steam/script.js | 4 +- .../Steam/script.js | 4 +- .../Steam/script.js | 4 +- Applications/Games/Audiosurf/Steam/script.js | 11 +- Applications/Games/Far Cry 2/Steam/script.js | 8 +- .../Games/League of Legends/Online/script.js | 2 +- .../Games/Lego Rock Raiders/Local/script.js | 6 +- .../Games/Mirror's Edge/Steam/script.js | 10 +- .../Rayman Legends/Steam (Demo)/script.js | 4 +- .../Games/Rayman Legends/Steam/script.js | 4 +- .../Games/Space Engineers/Steam/script.js | 4 +- Applications/Games/The Sims 3/Local/script.js | 10 +- Applications/Games/The Sims 3/Steam/script.js | 10 +- .../Steam (Demo)/script.js | 4 +- .../Tom Clancy's The Division/Steam/script.js | 4 +- .../Trackmania Turbo/Steam (Demo)/script.js | 4 +- .../Games/Trackmania Turbo/Steam/script.js | 4 +- .../Steam/script.js | 4 +- .../Games/Wildlife Park 2/Local/script.js | 6 +- .../Games/Wildlife Park 2/Steam/script.js | 6 +- .../Internet Explorer 6.0/Online/script.js | 23 ++- .../Internet Explorer 7.0/Online/script.js | 67 ++++---- .../Adobe Acrobat Reader DC/Online/script.js | 10 +- Engines/Wine/QuickScript/GoG Script/script.js | 11 +- .../QuickScript/Installer Script/script.js | 6 +- .../Wine/QuickScript/Origin Script/script.js | 7 +- .../Wine/QuickScript/Steam Script/script.js | 6 +- .../Wine/QuickScript/Uplay Script/script.js | 6 +- Engines/Wine/QuickScript/Zip Script/script.js | 14 +- Engines/Wine/Verbs/FAudio/script.js | 119 +++++++------- Engines/Wine/Verbs/PhysX/script.js | 52 +++--- Engines/Wine/Verbs/QuickTime 7.6/script.js | 61 ++++--- Engines/Wine/Verbs/Remove Mono/script.js | 65 ++++---- Engines/Wine/Verbs/Tahoma/script.js | 83 +++++----- Engines/Wine/Verbs/Uplay/script.js | 52 +++--- Engines/Wine/Verbs/amstream/script.js | 4 +- Engines/Wine/Verbs/corefonts/script.js | 4 +- Engines/Wine/Verbs/d3drm/script.js | 4 +- Engines/Wine/Verbs/devenum/script.js | 2 +- Engines/Wine/Verbs/dotnet20/script.js | 6 +- Engines/Wine/Verbs/dotnet20sp2/script.js | 4 +- Engines/Wine/Verbs/dotnet40/script.js | 4 +- Engines/Wine/Verbs/dotnet45/script.js | 4 +- Engines/Wine/Verbs/dotnet452/script.js | 4 +- Engines/Wine/Verbs/dotnet46/script.js | 4 +- Engines/Wine/Verbs/dotnet461/script.js | 4 +- Engines/Wine/Verbs/dotnet462/script.js | 4 +- Engines/Wine/Verbs/dotnet472/script.js | 4 +- Engines/Wine/Verbs/gallium9/script.js | 153 ++++++++++-------- Engines/Wine/Verbs/gdiplus/script.js | 65 ++++---- Engines/Wine/Verbs/luna/script.js | 64 ++++---- Engines/Wine/Verbs/mfc42/script.js | 91 ++++++----- Engines/Wine/Verbs/msls31/script.js | 48 ++++-- Engines/Wine/Verbs/mspatcha/script.js | 97 +++++------ Engines/Wine/Verbs/msxml3/script.js | 62 +++---- Engines/Wine/Verbs/msxml6/script.js | 95 ++++++----- Engines/Wine/Verbs/quartz/script.js | 94 ++++++----- Engines/Wine/Verbs/sandbox/script.js | 49 +++--- Engines/Wine/Verbs/secur32/script.js | 125 ++++++++------ Engines/Wine/Verbs/vcrun2003/script.js | 2 +- Engines/Wine/Verbs/vcrun2005/script.js | 2 +- Engines/Wine/Verbs/vcrun2008/script.js | 2 +- Engines/Wine/Verbs/vcrun2010/script.js | 2 +- Engines/Wine/Verbs/vcrun2012/script.js | 2 +- Engines/Wine/Verbs/vcrun2013/script.js | 2 +- Engines/Wine/Verbs/vcrun2015/script.js | 2 +- Engines/Wine/Verbs/vcrun2017/script.js | 2 +- Engines/Wine/Verbs/vcrun6sp6/script.js | 2 +- 69 files changed, 937 insertions(+), 781 deletions(-) diff --git a/Applications/Games/Age of Empires III: Complete Collection/Steam/script.js b/Applications/Games/Age of Empires III: Complete Collection/Steam/script.js index 11a3195d94..455e54c0e0 100644 --- a/Applications/Games/Age of Empires III: Complete Collection/Steam/script.js +++ b/Applications/Games/Age of Empires III: Complete Collection/Steam/script.js @@ -1,16 +1,16 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); include("engines.wine.plugins.override_dll"); -include("engines.wine.verbs.mfc42"); +const Mfc42 = include("engines.wine.verbs.mfc42"); new SteamScript() .name("Age of Empires® III: Complete Collection") .editor("Microsoft Studios") .author("Quentin PARIS") .appId(105450) - .postInstall(function (wine /*, wizard*/) { - wine.mfc42(); - wine - .overrideDLL() + .postInstall(function(wine /*, wizard*/) { + new Mfc42(wine).go(); + + wine.overrideDLL() .set("native, builtin", ["pidgen"]) .do(); }); diff --git a/Applications/Games/Assassin's Creed IV Black Flag/Steam/script.js b/Applications/Games/Assassin's Creed IV Black Flag/Steam/script.js index af3a61e84a..b5748e78a7 100644 --- a/Applications/Games/Assassin's Creed IV Black Flag/Steam/script.js +++ b/Applications/Games/Assassin's Creed IV Black Flag/Steam/script.js @@ -1,7 +1,7 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); const {LATEST_STAGING_VERSION} = include("engines.wine.engine.versions"); -include("engines.wine.verbs.uplay"); +const Uplay = include("engines.wine.verbs.uplay"); new SteamScript() .name("Assassin’s Creed® IV Black Flag™") @@ -12,5 +12,5 @@ new SteamScript() .wineDistribution("staging") .postInstall(function (wine /*, wizard*/) { // the automatically installed Uplay version does not update properly - wine.uplay(); + new Uplay(wine).go(); }); diff --git a/Applications/Games/Assassin's Creed Revelations/Steam/script.js b/Applications/Games/Assassin's Creed Revelations/Steam/script.js index c155e4f1f3..791b6f560b 100644 --- a/Applications/Games/Assassin's Creed Revelations/Steam/script.js +++ b/Applications/Games/Assassin's Creed Revelations/Steam/script.js @@ -1,7 +1,7 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); const {LATEST_STAGING_VERSION} = include("engines.wine.engine.versions"); -include("engines.wine.verbs.uplay"); +const Uplay = include("engines.wine.verbs.uplay"); new SteamScript() .name("Assassin's Creed® Revelations") @@ -11,5 +11,5 @@ new SteamScript() .wineVersion(LATEST_STAGING_VERSION) .wineDistribution("staging") .postInstall(function (wine /*, wizard*/) { - wine.uplay(); + new Uplay(wine).go(); }); diff --git a/Applications/Games/Assassin's Creed: Brotherhood/Steam/script.js b/Applications/Games/Assassin's Creed: Brotherhood/Steam/script.js index 7bfe4d26d2..e0bd6b60cc 100644 --- a/Applications/Games/Assassin's Creed: Brotherhood/Steam/script.js +++ b/Applications/Games/Assassin's Creed: Brotherhood/Steam/script.js @@ -1,7 +1,7 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); const {LATEST_STAGING_VERSION} = include("engines.wine.engine.versions"); -include("engines.wine.verbs.uplay"); +const Uplay = include("engines.wine.verbs.uplay"); new SteamScript() .name("Assassin’s Creed® Brotherhood") @@ -11,5 +11,5 @@ new SteamScript() .wineVersion(LATEST_STAGING_VERSION) .wineDistribution("staging") .postInstall(function (wine /*, wizard*/) { - wine.uplay(); + new Uplay(wine).go(); }); diff --git a/Applications/Games/Audiosurf/Steam/script.js b/Applications/Games/Audiosurf/Steam/script.js index 00c5929f89..815f583ba8 100644 --- a/Applications/Games/Audiosurf/Steam/script.js +++ b/Applications/Games/Audiosurf/Steam/script.js @@ -1,15 +1,16 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); -include("engines.wine.verbs.quicktime76"); + +const QuickTime76 = include("engines.wine.verbs.quicktime76"); const Corefonts = include("engines.wine.verbs.corefonts"); -include("engines.wine.verbs.tahoma"); +const Tahoma = include("engines.wine.verbs.tahoma"); new SteamScript() .name("Audiosurf") .editor("Dylan Fitterer") .author("Brainzyy") .appId(12900) - .preInstall(function (wine /*, wizard*/) { - wine.quicktime76(); + .preInstall(function(wine /*, wizard*/) { + new QuickTime76(wine).go(); new Corefonts(wine).go(); - wine.tahoma(); + new Tahoma(wine).go(); }); diff --git a/Applications/Games/Far Cry 2/Steam/script.js b/Applications/Games/Far Cry 2/Steam/script.js index 537ca09e13..ac7b088b0f 100644 --- a/Applications/Games/Far Cry 2/Steam/script.js +++ b/Applications/Games/Far Cry 2/Steam/script.js @@ -1,8 +1,8 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); -const {LATEST_STAGING_VERSION} = include("engines.wine.engine.versions"); +const { LATEST_STAGING_VERSION } = include("engines.wine.engine.versions"); include("engines.wine.plugins.csmt"); -include("engines.wine.verbs.secur32"); +const Secur32 = include("engines.wine.verbs.secur32"); new SteamScript() .name("Far Cry® 2") @@ -11,7 +11,7 @@ new SteamScript() .wineVersion(LATEST_STAGING_VERSION) .wineDistribution("staging") .appId(19900) - .preInstall(function (wine /*, wizard*/) { - wine.secur32(); + .preInstall(function(wine /*, wizard*/) { + new Secur32(wine).go(); wine.enableCSMT(); }); diff --git a/Applications/Games/League of Legends/Online/script.js b/Applications/Games/League of Legends/Online/script.js index 0b4dcd3bef..b2d9b71e4a 100644 --- a/Applications/Games/League of Legends/Online/script.js +++ b/Applications/Games/League of Legends/Online/script.js @@ -6,7 +6,7 @@ const Resource = include("utils.functions.net.resource"); include("engines.wine.plugins.csmt"); include("engines.wine.plugins.override_dll"); include("engines.wine.plugins.windows_version"); -include("engines.wine.verbs.sandbox"); +const Sandbox = include("engines.wine.verbs.sandbox"); const D3DX9 = include("engines.wine.verbs.d3dx9"); // Installs League of Legends diff --git a/Applications/Games/Lego Rock Raiders/Local/script.js b/Applications/Games/Lego Rock Raiders/Local/script.js index 0c399e6fbc..cb69b44a8c 100644 --- a/Applications/Games/Lego Rock Raiders/Local/script.js +++ b/Applications/Games/Lego Rock Raiders/Local/script.js @@ -3,7 +3,7 @@ const Downloader = include("utils.functions.net.download"); const { Extractor } = include("utils.functions.filesystem.extract"); const Amstream = include("engines.wine.verbs.amstream"); -include("engines.wine.verbs.quartz"); +const Quartz = include("engines.wine.verbs.quartz"); const Devenum = include("engines.wine.verbs.devenum"); const D3drm = include("engines.wine.verbs.d3drm"); @@ -17,9 +17,7 @@ new LocalInstallerScript() .wineDistribution("upstream") .preInstall(function(wine, wizard) { new Amstream(wine).go(); - - wine.quartz(); - + new Quartz(wine).go(); new Devenum(wine).go(); new D3drm(wine).go(); diff --git a/Applications/Games/Mirror's Edge/Steam/script.js b/Applications/Games/Mirror's Edge/Steam/script.js index 31485b018d..6f1f547aad 100644 --- a/Applications/Games/Mirror's Edge/Steam/script.js +++ b/Applications/Games/Mirror's Edge/Steam/script.js @@ -1,16 +1,16 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); include("engines.wine.plugins.managed"); -include("engines.wine.verbs.physx"); +const PhysX = include("engines.wine.verbs.physx"); new SteamScript() .name("Mirror's Edge™") .editor("DICE") .author("Plata") .appId(17410) - .preInstall(function (wine /*, wizard*/) { - wine.physx(); - wine - .setManagedForApplication() + .preInstall(function(wine /*, wizard*/) { + new PhysX(wine).go(); + + wine.setManagedForApplication() .set("MirrorsEdge.exe", false) .do(); }); diff --git a/Applications/Games/Rayman Legends/Steam (Demo)/script.js b/Applications/Games/Rayman Legends/Steam (Demo)/script.js index 4658717b7d..6c3f832b2d 100644 --- a/Applications/Games/Rayman Legends/Steam (Demo)/script.js +++ b/Applications/Games/Rayman Legends/Steam (Demo)/script.js @@ -1,7 +1,7 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); const {LATEST_STAGING_VERSION} = include("engines.wine.engine.versions"); -include("engines.wine.verbs.uplay"); +const Uplay = include("engines.wine.verbs.uplay"); new SteamScript() .name("Rayman® Legends (Demo)") @@ -11,5 +11,5 @@ new SteamScript() .wineVersion(LATEST_STAGING_VERSION) .wineDistribution("staging") .postInstall(function (wine /*, wizard*/) { - wine.uplay(); + new Uplay(wine).go(); }); diff --git a/Applications/Games/Rayman Legends/Steam/script.js b/Applications/Games/Rayman Legends/Steam/script.js index e6208af6c4..e927f232ae 100644 --- a/Applications/Games/Rayman Legends/Steam/script.js +++ b/Applications/Games/Rayman Legends/Steam/script.js @@ -1,7 +1,7 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); const {LATEST_STAGING_VERSION} = include("engines.wine.engine.versions"); -include("engines.wine.verbs.uplay"); +const Uplay = include("engines.wine.verbs.uplay"); new SteamScript() .name("Rayman® Legends") @@ -11,5 +11,5 @@ new SteamScript() .wineVersion(LATEST_STAGING_VERSION) .wineDistribution("staging") .postInstall(function (wine /*, wizard*/) { - wine.uplay(); + new Uplay(wine).go(); }); diff --git a/Applications/Games/Space Engineers/Steam/script.js b/Applications/Games/Space Engineers/Steam/script.js index d8d43c565e..6c4c9b5550 100644 --- a/Applications/Games/Space Engineers/Steam/script.js +++ b/Applications/Games/Space Engineers/Steam/script.js @@ -3,7 +3,7 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); const DotNET472 = include("engines.wine.verbs.dotnet472"); include("engines.wine.verbs.vcrun2017"); const DXVK = include("engines.wine.verbs.dxvk"); -include("engines.wine.verbs.faudio"); +const FAudio = include("engines.wine.verbs.faudio"); include("engines.wine.plugins.override_dll"); new SteamScript() @@ -18,7 +18,7 @@ new SteamScript() new DotNET472(wine).go(); wine.vcrun2017(); new DXVK(wine).go(); - wine.faudio(); + new FAudio(wine).go(); wine.overrideDLL() .set("native, builtin", [ "msvcr120", diff --git a/Applications/Games/The Sims 3/Local/script.js b/Applications/Games/The Sims 3/Local/script.js index 7c6f7998ce..26f5ba3c37 100644 --- a/Applications/Games/The Sims 3/Local/script.js +++ b/Applications/Games/The Sims 3/Local/script.js @@ -1,8 +1,8 @@ const LocalInstallerScript = include("engines.wine.quick_script.local_installer_script"); include("engines.wine.verbs.vcrun2010"); -include("engines.wine.verbs.tahoma"); -include("engines.wine.verbs.mfc42"); +const Tahoma = include("engines.wine.verbs.tahoma"); +const Mfc42 = include("engines.wine.verbs.mfc42"); const DotNET20 = include("engines.wine.verbs.dotnet20"); new LocalInstallerScript() @@ -12,9 +12,9 @@ new LocalInstallerScript() .author("Zemogiter") .category("Games") .executable("Sims3Launcher.exe", ["xgamma -gamma 1"]) - .preInstall(function (wine) { - wine.mfc42(); - wine.tahoma(); + .preInstall(function(wine) { + new Mfc42(wine).go(); + new Tahoma(wine).go(); wine.vcrun2010(); new DotNET20(wine).go(); }); diff --git a/Applications/Games/The Sims 3/Steam/script.js b/Applications/Games/The Sims 3/Steam/script.js index f1338c3e34..3403a39008 100644 --- a/Applications/Games/The Sims 3/Steam/script.js +++ b/Applications/Games/The Sims 3/Steam/script.js @@ -2,8 +2,8 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); const DotNET20 = include("engines.wine.verbs.dotnet20"); include("engines.wine.verbs.vcrun2010"); -include("engines.wine.verbs.tahoma"); -include("engines.wine.verbs.mfc42"); +const Tahoma = include("engines.wine.verbs.tahoma"); +const Mfc42 = include("engines.wine.verbs.mfc42"); new SteamScript() .name("The Sims 3") @@ -13,10 +13,10 @@ new SteamScript() .wineDistribution("upstream") .wineVersion("4.0-rc2") .appId(47890) - .preInstall(function (wine /*, wizard*/) { + .preInstall(function(wine /*, wizard*/) { new DotNET20(wine).go(); - wine.mfc42(); - wine.tahoma(); + new Mfc42(wine).go(); + new Tahoma(wine).go(); wine.vcrun2010(); }) .gameOverlay(false) diff --git a/Applications/Games/Tom Clancy's The Division/Steam (Demo)/script.js b/Applications/Games/Tom Clancy's The Division/Steam (Demo)/script.js index a8e18666ce..83432eb259 100644 --- a/Applications/Games/Tom Clancy's The Division/Steam (Demo)/script.js +++ b/Applications/Games/Tom Clancy's The Division/Steam (Demo)/script.js @@ -1,7 +1,7 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); const {LATEST_STAGING_VERSION} = include("engines.wine.engine.versions"); -include("engines.wine.verbs.uplay"); +const Uplay = include("engines.wine.verbs.uplay"); new SteamScript() .name("Tom Clancy’s The Division™ (Demo)") @@ -12,5 +12,5 @@ new SteamScript() .wineDistribution("staging") .wineArchitecture("amd64") .postInstall(function (wine /*, wizard*/) { - wine.uplay(); + new Uplay(wine).go(); }); diff --git a/Applications/Games/Tom Clancy's The Division/Steam/script.js b/Applications/Games/Tom Clancy's The Division/Steam/script.js index 55bd0c6463..51e0455201 100644 --- a/Applications/Games/Tom Clancy's The Division/Steam/script.js +++ b/Applications/Games/Tom Clancy's The Division/Steam/script.js @@ -1,7 +1,7 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); const {LATEST_STAGING_VERSION} = include("engines.wine.engine.versions"); -include("engines.wine.verbs.uplay"); +const Uplay = include("engines.wine.verbs.uplay"); new SteamScript() .name("Tom Clancy’s The Division™") @@ -12,5 +12,5 @@ new SteamScript() .wineDistribution("staging") .wineArchitecture("amd64") .postInstall(function (wine /*, wizard*/) { - wine.uplay(); + new Uplay(wine).go(); }); diff --git a/Applications/Games/Trackmania Turbo/Steam (Demo)/script.js b/Applications/Games/Trackmania Turbo/Steam (Demo)/script.js index 4a3255a455..9369748516 100644 --- a/Applications/Games/Trackmania Turbo/Steam (Demo)/script.js +++ b/Applications/Games/Trackmania Turbo/Steam (Demo)/script.js @@ -1,7 +1,7 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); const {LATEST_STAGING_VERSION} = include("engines.wine.engine.versions"); -include("engines.wine.verbs.uplay"); +const Uplay = include("engines.wine.verbs.uplay"); new SteamScript() .name("Trackmania® Turbo (Demo)") @@ -11,5 +11,5 @@ new SteamScript() .wineVersion(LATEST_STAGING_VERSION) .wineDistribution("staging") .postInstall(function (wine /*, wizard*/) { - wine.uplay(); + new Uplay(wine).go(); }); diff --git a/Applications/Games/Trackmania Turbo/Steam/script.js b/Applications/Games/Trackmania Turbo/Steam/script.js index 4603d5b03d..2ac62a309d 100644 --- a/Applications/Games/Trackmania Turbo/Steam/script.js +++ b/Applications/Games/Trackmania Turbo/Steam/script.js @@ -1,7 +1,7 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); const {LATEST_STAGING_VERSION} = include("engines.wine.engine.versions"); -include("engines.wine.verbs.uplay"); +const Uplay = include("engines.wine.verbs.uplay"); new SteamScript() .name("Trackmania® Turbo") @@ -11,5 +11,5 @@ new SteamScript() .wineVersion(LATEST_STAGING_VERSION) .wineDistribution("staging") .postInstall(function (wine /*, wizard*/) { - wine.uplay(); + new Uplay(wine).go(); }); diff --git a/Applications/Games/Warlock - Master of the Arcane/Steam/script.js b/Applications/Games/Warlock - Master of the Arcane/Steam/script.js index 872d4f2859..355d059e7a 100644 --- a/Applications/Games/Warlock - Master of the Arcane/Steam/script.js +++ b/Applications/Games/Warlock - Master of the Arcane/Steam/script.js @@ -3,7 +3,7 @@ const {LATEST_STAGING_VERSION} = include("engines.wine.engine.versions"); const Corefonts = include("engines.wine.verbs.corefonts"); const D3DX9 = include("engines.wine.verbs.d3dx9"); -include("engines.wine.verbs.tahoma"); +const Tahoma = include("engines.wine.verbs.tahoma"); include("engines.wine.verbs.vcrun2005"); include("engines.wine.verbs.vcrun2008"); @@ -17,7 +17,7 @@ new SteamScript() .preInstall(function (wine /*, wizard*/) { new Corefonts(wine).go(); new D3DX9(wine).go(); - wine.tahoma(); + new Tahoma(wine).go(); wine.vcrun2005(); wine.vcrun2008(); }); diff --git a/Applications/Games/Wildlife Park 2/Local/script.js b/Applications/Games/Wildlife Park 2/Local/script.js index 00ae2b32a5..49a2ef32da 100644 --- a/Applications/Games/Wildlife Park 2/Local/script.js +++ b/Applications/Games/Wildlife Park 2/Local/script.js @@ -1,6 +1,7 @@ const LocalInstallerScript = include("engines.wine.quick_script.local_installer_script"); + include("engines.wine.plugins.virtual_desktop"); -include("engines.wine.verbs.quartz"); +const Quartz = include("engines.wine.verbs.quartz"); new LocalInstallerScript() .name("Wildlife Park 2") @@ -15,6 +16,7 @@ new LocalInstallerScript() "On first run the game might not go into full screen. If that happens go to options and set the resolution to 1280x960. You will be asked to close the game in order to apply the new settings. Click Yes. Once you start the game again you should see a window where you can set your game resolution to match your screen." ) ); - wine.quartz(); + + new Quartz(wine).go(); wine.setVirtualDesktop(); }); diff --git a/Applications/Games/Wildlife Park 2/Steam/script.js b/Applications/Games/Wildlife Park 2/Steam/script.js index 9170435d04..286ebb006e 100644 --- a/Applications/Games/Wildlife Park 2/Steam/script.js +++ b/Applications/Games/Wildlife Park 2/Steam/script.js @@ -1,6 +1,7 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); + include("engines.wine.plugins.virtual_desktop"); -include("engines.wine.verbs.quartz"); +const Quartz = include("engines.wine.verbs.quartz"); new SteamScript() .name("Wildlife Park 2") @@ -14,7 +15,8 @@ new SteamScript() "On first run the game might not go into full screen. If that happens go to options and set the resolution to 1280x960. You will be asked to close the game in order to apply the new settings. Click Yes. Once you start the game again you should see a window where you can set your game resolution to match your screen." ) ); - wine.quartz(); + + new Quartz(wine).go(); wine.setVirtualDesktop(); }) .gameOverlay(false); diff --git a/Applications/Internet/Internet Explorer 6.0/Online/script.js b/Applications/Internet/Internet Explorer 6.0/Online/script.js index cda3b54039..5b8db6ee35 100644 --- a/Applications/Internet/Internet Explorer 6.0/Online/script.js +++ b/Applications/Internet/Internet Explorer 6.0/Online/script.js @@ -1,9 +1,9 @@ const PlainInstaller = include("utils.functions.apps.plain_installer"); const Resource = include("utils.functions.net.resource"); -const {CabExtract} = include("utils.functions.filesystem.extract"); +const { CabExtract } = include("utils.functions.filesystem.extract"); const Wine = include("engines.wine.engine.object"); -const {LATEST_STABLE_VERSION} = include("engines.wine.engine.versions"); -const {remove} = include("utils.functions.filesystem.files"); +const { LATEST_STABLE_VERSION } = include("engines.wine.engine.versions"); +const { remove } = include("utils.functions.filesystem.files"); const WineShortcut = include("engines.wine.shortcuts.wine"); const AppResource = include("utils.functions.apps.resources"); @@ -11,7 +11,7 @@ include("engines.wine.plugins.override_dll"); include("engines.wine.plugins.regedit"); include("engines.wine.plugins.regsvr32"); include("engines.wine.plugins.windows_version"); -include("engines.wine.verbs.msls31"); +const Msls31 = include("engines.wine.verbs.msls31"); new PlainInstaller().withScript(() => { var appsManager = Bean("repositoryManager"); @@ -30,8 +30,9 @@ new PlainInstaller().withScript(() => { var wine = new Wine() .wizard(setupWizard) .prefix("InternetExplorer6", "upstream", "x86", LATEST_STABLE_VERSION) - .create() - .msls31(); + .create(); + + new Msls31(wine).go(); wine.windowsVersion("win2k"); @@ -52,7 +53,7 @@ new PlainInstaller().withScript(() => { "browseui", "iseng", "inetcpl" - ].forEach(function (dll) { + ].forEach(function(dll) { remove(wine.prefixDirectory() + "/drive_c/windows/system32/" + dll + ".dll"); }); @@ -65,13 +66,11 @@ new PlainInstaller().withScript(() => { .extract(["-F", "inseng.dll"]); wine.run("iexplore", ["-unregserver"], null, false, true); - wine - .overrideDLL() + wine.overrideDLL() .set("native", ["inseng"]) .do(); wine.runInsidePrefix("IE 6.0 Full/IE6SETUP.EXE", [], true); - wine - .overrideDLL() + wine.overrideDLL() .set("native,builtin", [ "inetcpl.cpl", "itircl", @@ -144,7 +143,7 @@ new PlainInstaller().withScript(() => { var progressBar = setupWizard.progressBar(tr("Please wait...")); var i = 1; - librariesToRegister.forEach(function (dll) { + librariesToRegister.forEach(function(dll) { progressBar.setProgressPercentage((i * 100) / librariesToRegister.length); progressBar.setText(tr("Installing {0}...", dll)); wine.regsvr32().install(dll); diff --git a/Applications/Internet/Internet Explorer 7.0/Online/script.js b/Applications/Internet/Internet Explorer 7.0/Online/script.js index d3020199a2..71c4ee1806 100644 --- a/Applications/Internet/Internet Explorer 7.0/Online/script.js +++ b/Applications/Internet/Internet Explorer 7.0/Online/script.js @@ -1,14 +1,14 @@ const PlainInstaller = include("utils.functions.apps.plain_installer"); const Resource = include("utils.functions.net.resource"); const Wine = include("engines.wine.engine.object"); -const {LATEST_STABLE_VERSION} = include("engines.wine.engine.versions"); -const {remove} = include("utils.functions.filesystem.files"); +const { LATEST_STABLE_VERSION } = include("engines.wine.engine.versions"); +const { remove } = include("utils.functions.filesystem.files"); const WineShortcut = include("engines.wine.shortcuts.wine"); include("engines.wine.plugins.override_dll"); include("engines.wine.plugins.regsvr32"); include("engines.wine.plugins.windows_version"); -include("engines.wine.verbs.sandbox"); +const Sandbox = include("engines.wine.verbs.sandbox"); new PlainInstaller().withScript(() => { var appsManager = Bean("repositoryManager"); @@ -20,12 +20,13 @@ new PlainInstaller().withScript(() => { var wine = new Wine() .wizard(setupWizard) .prefix("InternetExplorer7", "upstream", "x86", LATEST_STABLE_VERSION) - .create() - .sandbox(); + .create(); + + new Sandbox(wine).go(); + wine.run("iexplore", ["-unregserver"], null, false, true); - wine - .overrideDLL() + wine.overrideDLL() .set("native,builtin", [ "itircl", "itss", @@ -45,7 +46,7 @@ new PlainInstaller().withScript(() => { // delete existing IE, otherwise installer will abort with "newer IE installed" remove(wine.prefixDirectory() + "/drive_c/" + wine.programFiles() + "/Internet Explorer/iexplore.exe"); ["itircl", "itss", "jscript", "mlang", "mshtml", "msimtf", "shdoclc", "shdocvw", "shlwapi", "urlmon"].forEach( - function (dll) { + function(dll) { remove(wine.prefixDirectory() + "/drive_c/windows/system32/" + dll + ".dll"); } ); @@ -84,145 +85,145 @@ new PlainInstaller().withScript(() => { switch (setupLanguage) { case "English": ie7link = - "http://download.microsoft.com/download/3/8/8/38889dc1-848c-4bf2-8335-86c573ad86d9/IE7-WindowsXP-x86-enu.exe"; + "http://download.microsoft.com/download/3/8/8/38889dc1-848c-4bf2-8335-86c573ad86d9/IE7-WindowsXP-x86-enu.exe"; ie7installer = "IE7-WindowsXP-x86-enu.exe"; ie7md5 = "ea16789f6fc1d2523f704e8f9afbe906"; break; case "French": ie7link = - "http://download.microsoft.com/download/d/7/6/d7635233-5433-45aa-981b-4690ae90b785/IE7-WindowsXP-x86-fra.exe"; + "http://download.microsoft.com/download/d/7/6/d7635233-5433-45aa-981b-4690ae90b785/IE7-WindowsXP-x86-fra.exe"; ie7installer = "IE7-WindowsXP-x86-fra.exe"; ie7md5 = "77c9bdd28f220f2c31fc23d73125eef7"; break; case "German": ie7link = - "http://download.microsoft.com/download/6/b/c/6bcfcbcd-d634-44f9-8231-c4b05323770a/IE7-WindowsXP-x86-deu.exe"; + "http://download.microsoft.com/download/6/b/c/6bcfcbcd-d634-44f9-8231-c4b05323770a/IE7-WindowsXP-x86-deu.exe"; ie7installer = "IE7-WindowsXP-x86-deu.exe"; ie7md5 = "b704d4f7956af137294e72c30799cabe"; break; case "Arabic": ie7link = - "http://download.microsoft.com/download/f/5/e/f5ec8dec-a76d-4866-88a3-8bd6be368c8d/IE7-WindowsXP-x86-ara.exe"; + "http://download.microsoft.com/download/f/5/e/f5ec8dec-a76d-4866-88a3-8bd6be368c8d/IE7-WindowsXP-x86-ara.exe"; ie7installer = "IE7-WindowsXP-x86-ara.exe"; ie7md5 = "d6788008595b2e241b0616b4d84652b1"; break; case "Chinese (Simplified)": ie7link = - "http://download.microsoft.com/download/4/1/8/418981a4-6ef9-4de6-befc-1a53e886cb62/IE7-WindowsXP-x86-chs.exe"; + "http://download.microsoft.com/download/4/1/8/418981a4-6ef9-4de6-befc-1a53e886cb62/IE7-WindowsXP-x86-chs.exe"; ie7installer = "IE7-WindowsXP-x86-chs.exe"; ie7md5 = "9bbf568537e6ff060954bc710b5e648e"; break; case "Chinese (Traditional, Taiwan)": ie7link = - "http://download.microsoft.com/download/4/a/5/4a5a86de-af85-432e-979c-fa69e5d781db/IE7-WindowsXP-x86-cht.exe"; + "http://download.microsoft.com/download/4/a/5/4a5a86de-af85-432e-979c-fa69e5d781db/IE7-WindowsXP-x86-cht.exe"; ie7installer = "IE7-WindowsXP-x86-cht.exe"; ie7md5 = "193bf89a4556eca1ac244bedbe7ab5aa"; break; case "Czech": ie7link = - "http://download.microsoft.com/download/6/c/9/6c933e30-c659-438e-9bc0-6e050e329d14/IE7-WindowsXP-x86-csy.exe"; + "http://download.microsoft.com/download/6/c/9/6c933e30-c659-438e-9bc0-6e050e329d14/IE7-WindowsXP-x86-csy.exe"; ie7installer = "IE7-WindowsXP-x86-csy.exe"; ie7md5 = "88859df39f3048a742756eb629483c02"; break; case "Danish": ie7link = - "http://download.microsoft.com/download/9/f/b/9fbfc1cb-47ea-4364-9829-830e5c5b8b09/IE7-WindowsXP-x86-dan.exe"; + "http://download.microsoft.com/download/9/f/b/9fbfc1cb-47ea-4364-9829-830e5c5b8b09/IE7-WindowsXP-x86-dan.exe"; ie7installer = "IE7-WindowsXP-x86-dan.exe"; ie7md5 = "1d752313b9bcfc088392a204bd00a130"; break; case "Dutch": ie7link = - "http://download.microsoft.com/download/4/3/3/433d9e80-2b31-4bf3-844f-c11eece20da5/IE7-WindowsXP-x86-nld.exe"; + "http://download.microsoft.com/download/4/3/3/433d9e80-2b31-4bf3-844f-c11eece20da5/IE7-WindowsXP-x86-nld.exe"; ie7installer = "IE7-WindowsXP-x86-nld.exe"; ie7md5 = "752244327d5fb2bb9d3f4636a3ce10c7"; break; case "Finnish": ie7link = - "http://download.microsoft.com/download/3/9/6/396ee8cb-0f76-47ab-86b1-3c2ad0752bc3/IE7-WindowsXP-x86-fin.exe"; + "http://download.microsoft.com/download/3/9/6/396ee8cb-0f76-47ab-86b1-3c2ad0752bc3/IE7-WindowsXP-x86-fin.exe"; ie7installer = "IE7-WindowsXP-x86-fin.exe"; ie7md5 = "bc67ebaf7bf69763bcc7a6109360527d"; break; case "Greek": ie7link = - "http://download.microsoft.com/download/f/3/f/f3fc00ed-8b5d-4e36-81f0-fe0d722993e2/IE7-WindowsXP-x86-ell.exe"; + "http://download.microsoft.com/download/f/3/f/f3fc00ed-8b5d-4e36-81f0-fe0d722993e2/IE7-WindowsXP-x86-ell.exe"; ie7installer = "IE7-WindowsXP-x86-ell.exe"; ie7md5 = "9974e80af2c470581cb3c58332cd9f0a"; break; case "Hebrew": ie7link = - "http://download.microsoft.com/download/5/8/7/587bbf05-6132-4a49-a81d-765082ce8246/IE7-WindowsXP-x86-heb.exe"; + "http://download.microsoft.com/download/5/8/7/587bbf05-6132-4a49-a81d-765082ce8246/IE7-WindowsXP-x86-heb.exe"; ie7installer = "IE7-WindowsXP-x86-heb.exe"; ie7md5 = "19eb048477c1cb70e0b68405d2569d22"; break; case "Hungarian": ie7link = - "http://download.microsoft.com/download/7/2/c/72c09e25-5635-43f9-9f62-56a8f87c58a5/IE7-WindowsXP-x86-hun.exe"; + "http://download.microsoft.com/download/7/2/c/72c09e25-5635-43f9-9f62-56a8f87c58a5/IE7-WindowsXP-x86-hun.exe"; ie7installer = "IE7-WindowsXP-x86-hun.exe"; ie7md5 = "ae8e824392642166d52d33a5dab55c5d"; break; case "Italian": ie7link = - "http://download.microsoft.com/download/3/9/0/3907f96d-1bbd-499a-b6bd-5d69789ddb54/IE7-WindowsXP-x86-ita.exe"; + "http://download.microsoft.com/download/3/9/0/3907f96d-1bbd-499a-b6bd-5d69789ddb54/IE7-WindowsXP-x86-ita.exe"; ie7installer = "IE7-WindowsXP-x86-ita.exe"; ie7md5 = "510a2083dfb4e42209d845968861a2df"; break; case "Japanese": ie7link = - "http://download.microsoft.com/download/d/4/8/d488b16c-877d-474d-912f-bb88e358055d/IE7-WindowsXP-x86-jpn.exe"; + "http://download.microsoft.com/download/d/4/8/d488b16c-877d-474d-912f-bb88e358055d/IE7-WindowsXP-x86-jpn.exe"; ie7installer = "IE7-WindowsXP-x86-jpn.exe"; ie7md5 = "13934f80870d549493197b5cb0995112"; break; case "Korean": ie7link = - "http://download.microsoft.com/download/1/0/a/10ad8b7f-2354-420d-aae3-ddcff81554fb/IE7-WindowsXP-x86-kor.exe"; + "http://download.microsoft.com/download/1/0/a/10ad8b7f-2354-420d-aae3-ddcff81554fb/IE7-WindowsXP-x86-kor.exe"; ie7installer = "IE7-WindowsXP-x86-kor.exe"; ie7md5 = "3cc8e93f191f726e5ec9b23349a261c0"; break; case "Norwegian": ie7link = - "http://download.microsoft.com/download/a/a/3/aa317f65-e818-458c-a36f-9f0feb017744/IE7-WindowsXP-x86-nor.exe"; + "http://download.microsoft.com/download/a/a/3/aa317f65-e818-458c-a36f-9f0feb017744/IE7-WindowsXP-x86-nor.exe"; ie7installer = "IE7-WindowsXP-x86-nor.exe"; ie7md5 = "7450388c1dd004f63b39ade2868da9bd"; break; case "Polish": ie7link = - "http://download.microsoft.com/download/6/a/0/6a01b4fa-66e5-4447-8f36-9330a8725ecd/IE7-WindowsXP-x86-plk.exe"; + "http://download.microsoft.com/download/6/a/0/6a01b4fa-66e5-4447-8f36-9330a8725ecd/IE7-WindowsXP-x86-plk.exe"; ie7installer = "IE7-WindowsXP-x86-plk.exe"; ie7md5 = "09677cc0df807cd9fb0a834eeecbfec9"; break; case "Portuguese (Brazil)": ie7link = - "http://download.microsoft.com/download/e/9/8/e98bd8ac-3122-4079-bb70-d19b5d5ef875/IE7-WindowsXP-x86-ptb.exe"; + "http://download.microsoft.com/download/e/9/8/e98bd8ac-3122-4079-bb70-d19b5d5ef875/IE7-WindowsXP-x86-ptb.exe"; ie7installer = "IE7-WindowsXP-x86-ptb.exe"; ie7md5 = "ec5098a90641f4c3c248582ed8d7cf8c"; break; case "Portuguese (Portugal)": ie7link = - "http://download.microsoft.com/download/9/9/0/99012553-0eea-402d-99e9-bdc2f4ee26a9/IE7-WindowsXP-x86-ptg.exe"; + "http://download.microsoft.com/download/9/9/0/99012553-0eea-402d-99e9-bdc2f4ee26a9/IE7-WindowsXP-x86-ptg.exe"; ie7installer = "IE7-WindowsXP-x86-ptg.exe"; ie7md5 = "5882c9721261d564220e4f776a811197"; break; case "Russian": ie7link = - "http://download.microsoft.com/download/d/4/e/d4e2d315-2493-44a4-8135-b5310b4a50a4/IE7-WindowsXP-x86-rus.exe"; + "http://download.microsoft.com/download/d/4/e/d4e2d315-2493-44a4-8135-b5310b4a50a4/IE7-WindowsXP-x86-rus.exe"; ie7installer = "IE7-WindowsXP-x86-rus.exe"; ie7md5 = "db8d6f76a16a690458c65b831bfe14a4"; break; case "Spanish": ie7link = - "http://download.microsoft.com/download/4/c/4/4c4fc47b-974c-4dc9-b189-2820f68b4535/IE7-WindowsXP-x86-esn.exe"; + "http://download.microsoft.com/download/4/c/4/4c4fc47b-974c-4dc9-b189-2820f68b4535/IE7-WindowsXP-x86-esn.exe"; ie7installer = "IE7-WindowsXP-x86-esn.exe"; ie7md5 = "0b90933978f8f39589b4bd6e457d8899"; break; case "Swedish": ie7link = - "http://download.microsoft.com/download/1/2/3/12311242-faa8-4edf-a0c4-86bf4e029a54/IE7-WindowsXP-x86-sve.exe"; + "http://download.microsoft.com/download/1/2/3/12311242-faa8-4edf-a0c4-86bf4e029a54/IE7-WindowsXP-x86-sve.exe"; ie7installer = "IE7-WindowsXP-x86-sve.exe"; ie7md5 = "7a569708bd72ab99289064008609bfa8"; break; case "Turkish": ie7link = - "http://download.microsoft.com/download/4/e/7/4e77d531-5c33-4f9b-a5c9-ea29fb79cc56/IE7-WindowsXP-x86-trk.exe"; + "http://download.microsoft.com/download/4/e/7/4e77d531-5c33-4f9b-a5c9-ea29fb79cc56/IE7-WindowsXP-x86-trk.exe"; ie7installer = "IE7-WindowsXP-x86-trk.exe"; ie7md5 = "71a39c77bcfd1e2299e99cb7433e5856"; break; @@ -298,7 +299,7 @@ new PlainInstaller().withScript(() => { var progressBar = setupWizard.progressBar("Please wait..."); var i = 1; - librairiesToRegister.forEach(function (dll) { + librairiesToRegister.forEach(function(dll) { progressBar.setProgressPercentage((i * 100) / librairiesToRegister.length); progressBar.setText(tr("Installing {0}...", dll)); wine.regsvr32().install(dll); diff --git a/Applications/Office/Adobe Acrobat Reader DC/Online/script.js b/Applications/Office/Adobe Acrobat Reader DC/Online/script.js index 8708c175a2..4aff6db055 100644 --- a/Applications/Office/Adobe Acrobat Reader DC/Online/script.js +++ b/Applications/Office/Adobe Acrobat Reader DC/Online/script.js @@ -1,7 +1,7 @@ const OnlineInstallerScript = include("engines.wine.quick_script.online_installer_script"); -const {LATEST_STAGING_VERSION} = include("engines.wine.engine.versions"); +const { LATEST_STAGING_VERSION } = include("engines.wine.engine.versions"); -include("engines.wine.verbs.mspatcha"); +const Mspatcha = include("engines.wine.verbs.mspatcha"); include("engines.wine.plugins.windows_version"); new OnlineInstallerScript() @@ -15,10 +15,10 @@ new OnlineInstallerScript() .checksum("98b2b838e6c4663fefdfd341dfdc596b1eff355c") .category("Office") .executable("AcroRd32.exe") - .preInstall(function (wine /*, wizard*/) { - wine.mspatcha(); + .preInstall(function(wine /*, wizard*/) { + new Mspatcha(wine).go(); }) - .postInstall(function (wine /*, wizard*/) { + .postInstall(function(wine /*, wizard*/) { // fix broken dialogs (e.g. preferences) wine.windowsVersion("winxp"); }); diff --git a/Engines/Wine/QuickScript/GoG Script/script.js b/Engines/Wine/QuickScript/GoG Script/script.js index 02ddf652a0..d6bbc17841 100644 --- a/Engines/Wine/QuickScript/GoG Script/script.js +++ b/Engines/Wine/QuickScript/GoG Script/script.js @@ -1,9 +1,9 @@ const Wine = include("engines.wine.engine.object"); const QuickScript = include("engines.wine.quick_script.quick_script"); const Downloader = include("utils.functions.net.download"); -const {createTempDir} = include("utils.functions.filesystem.files"); +const { createTempDir } = include("utils.functions.filesystem.files"); -include("engines.wine.verbs.gdiplus"); +const GDIPlus = include("engines.wine.verbs.gdiplus"); module.default = class GogScript extends QuickScript { constructor() { @@ -76,7 +76,7 @@ module.default = class GogScript extends QuickScript { .wizard(setupWizard) .to(tmpDirectory) .headers({ - "Authorization": "Bearer " + this._token["access_token"], + Authorization: "Bearer " + this._token["access_token"], "User-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:64.0) Gecko/20100101 Firefox/64.0" }) .get(); @@ -112,7 +112,8 @@ module.default = class GogScript extends QuickScript { this._preInstall(wine, setupWizard); - wine.gdiplus(); + new GDIPlus(wine).go(); + wine.run(setupFile, [], wine.prefixDirectory() + "/drive_c/", true, true); this._postInstall(wine, setupWizard); @@ -121,4 +122,4 @@ module.default = class GogScript extends QuickScript { setupWizard.close(); } -} +}; diff --git a/Engines/Wine/QuickScript/Installer Script/script.js b/Engines/Wine/QuickScript/Installer Script/script.js index 0a566e8377..8ec42ed6ae 100644 --- a/Engines/Wine/QuickScript/Installer Script/script.js +++ b/Engines/Wine/QuickScript/Installer Script/script.js @@ -3,7 +3,7 @@ const Wine = include("engines.wine.engine.object"); const {LATEST_STABLE_VERSION} = include("engines.wine.engine.versions"); const {fileName} = include("utils.functions.filesystem.files"); -include("engines.wine.verbs.luna"); +const Luna = include("engines.wine.verbs.luna"); const operatingSystemFetcher = Bean("operatingSystemFetcher"); @@ -76,7 +76,9 @@ module.default = class InstallerScript extends QuickScript { } // setup the prefix - wine.prefix(this._name, this._wineDistribution, this._wineArchitecture, this._wineVersion).luna(); + wine.prefix(this._name, this._wineDistribution, this._wineArchitecture, this._wineVersion); + + new Luna(wine).go(); this._preInstall(wine, setupWizard); diff --git a/Engines/Wine/QuickScript/Origin Script/script.js b/Engines/Wine/QuickScript/Origin Script/script.js index f393b5a59b..e23133355b 100644 --- a/Engines/Wine/QuickScript/Origin Script/script.js +++ b/Engines/Wine/QuickScript/Origin Script/script.js @@ -3,7 +3,7 @@ const Downloader = include("utils.functions.net.download"); const Wine = include("engines.wine.engine.object"); const {createTempFile} = include("utils.functions.filesystem.files"); -include("engines.wine.verbs.luna"); +const Luna = include("engines.wine.verbs.luna"); module.default = class OriginScript extends QuickScript { constructor() { @@ -38,8 +38,9 @@ module.default = class OriginScript extends QuickScript { const wine = new Wine() .wizard(setupWizard) - .prefix(this._name, this._wineDistribution, this._wineArchitecture, this._wineVersion) - .luna(); + .prefix(this._name, this._wineDistribution, this._wineArchitecture, this._wineVersion); + + new Luna(wine).go(); //Origin does not have an install command setupWizard.message(tr("Download \"{0}\" in Origin and shut it down once \"{0}\" is installed", this._name)); diff --git a/Engines/Wine/QuickScript/Steam Script/script.js b/Engines/Wine/QuickScript/Steam Script/script.js index a30ccc9c30..d4a464a070 100644 --- a/Engines/Wine/QuickScript/Steam Script/script.js +++ b/Engines/Wine/QuickScript/Steam Script/script.js @@ -3,7 +3,7 @@ const Downloader = include("utils.functions.net.download"); const Wine = include("engines.wine.engine.object"); const {cat, fileExists, writeToFile, createTempFile} = include("utils.functions.filesystem.files"); -include("engines.wine.verbs.luna"); +const Luna = include("engines.wine.verbs.luna"); const Corefonts = include("engines.wine.verbs.corefonts"); include("engines.wine.plugins.override_dll"); include("engines.wine.plugins.windows_version"); @@ -108,9 +108,9 @@ module.default = class SteamScript extends QuickScript { const wine = new Wine() .wizard(setupWizard) - .prefix(this._name, this._wineDistribution, this._wineArchitecture, this._wineVersion) - .luna(); + .prefix(this._name, this._wineDistribution, this._wineArchitecture, this._wineVersion); + new Luna(wine).go(); new Corefonts(wine).go(); // Steam must be started once such that config.vdf is created (see fixCertificateIssue()) diff --git a/Engines/Wine/QuickScript/Uplay Script/script.js b/Engines/Wine/QuickScript/Uplay Script/script.js index 444cf956b0..e136c87ae6 100644 --- a/Engines/Wine/QuickScript/Uplay Script/script.js +++ b/Engines/Wine/QuickScript/Uplay Script/script.js @@ -3,7 +3,7 @@ const Downloader = include("utils.functions.net.download"); const Wine = include("engines.wine.engine.object"); const {fileExists, createTempFile} = include("utils.functions.filesystem.files"); -include("engines.wine.verbs.luna"); +const Luna = include("engines.wine.verbs.luna"); const Corefonts = include("engines.wine.verbs.corefonts"); include("engines.wine.plugins.windows_version"); @@ -49,9 +49,9 @@ module.default = class UplayScript extends QuickScript { const wine = new Wine() .wizard(setupWizard) - .prefix(this._name, this._wineDistribution, this._wineArchitecture, this._wineVersion) - .luna(); + .prefix(this._name, this._wineDistribution, this._wineArchitecture, this._wineVersion); + new Luna(wine).go(); new Corefonts(wine).go(); setupWizard.message(tr("Please ensure that winbind is installed before you continue.")); diff --git a/Engines/Wine/QuickScript/Zip Script/script.js b/Engines/Wine/QuickScript/Zip Script/script.js index 65e3d316e3..af9de0e887 100644 --- a/Engines/Wine/QuickScript/Zip Script/script.js +++ b/Engines/Wine/QuickScript/Zip Script/script.js @@ -1,9 +1,9 @@ const QuickScript = include("engines.wine.quick_script.quick_script"); const Downloader = include("utils.functions.net.download"); const Wine = include("engines.wine.engine.object"); -const {Extractor} = include("utils.functions.filesystem.extract"); +const { Extractor } = include("utils.functions.filesystem.extract"); -include("engines.wine.verbs.luna"); +const Luna = include("engines.wine.verbs.luna"); module.default = class ZipScript extends QuickScript { constructor() { @@ -28,9 +28,11 @@ module.default = class ZipScript extends QuickScript { const wine = new Wine() .wizard(setupWizard) .prefix(this._name, this._wineDistribution, this._wineArchitecture, this._wineVersion) - .create() - .luna() - .wait(); + .create(); + + new Luna(wine).go(); + + wine.wait(); this._preInstall(wine, setupWizard); @@ -65,4 +67,4 @@ module.default = class ZipScript extends QuickScript { setupWizard.close(); } -} +}; diff --git a/Engines/Wine/Verbs/FAudio/script.js b/Engines/Wine/Verbs/FAudio/script.js index 344a23083e..80eaa0d653 100644 --- a/Engines/Wine/Verbs/FAudio/script.js +++ b/Engines/Wine/Verbs/FAudio/script.js @@ -1,81 +1,90 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); -const {Extractor} = include("utils.functions.filesystem.extract"); -const {ls, cp} = include("utils.functions.filesystem.files"); +const { Extractor } = include("utils.functions.filesystem.extract"); +const { ls, cp } = include("utils.functions.filesystem.files"); + +const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.override_dll"); /** * 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 (this.architecture() != "amd64") { - throw "FAudio does not support 32bit architecture."; +class FAudio { + constructor(wine) { + this.wine = wine; } - if (typeof faudioVersion !== "string") { - faudioVersion = "19.06.07"; + + /** + * Sets the used FAudio version + * + * @param {string} faudioVersion The version of FAudio to downlaod + * @returns {FAudio} + */ + withVersion(faudioVersion) { + this.faudioVersion = faudioVersion; + + return this; } - 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 sys64dir = this.system64directory(); - var faudioDir = this.prefixDirectory() + "/FAudio/faudio-" + faudioVersion; - var self = this; - - forEach.call(ls(faudioDir + "/x64"), function (file) { - if (file.endsWith(".dll")) { - cp(faudioDir + "/x64/" + file, sys64dir); - self.overrideDLL() - .set("native", [file]) - .do(); + go() { + const wizard = this.wine.wizard(); + const prefixDirectory = this.wine.prefixDirectory(); + const system64directory = this.wine.system64directory(); + + if (this.wine.architecture() != "amd64") { + throw "FAudio does not support 32bit architecture."; } - }); - return this; -}; + if (typeof this.faudioVersion !== "string") { + this.faudioVersion = "19.06.07"; + } -/** - * Verb to install FAudio - */ -// eslint-disable-next-line no-unused-vars -module.default = class FAudioVerb { - constructor() { - // do nothing - } + const setupFile = new Resource() + .wizard(wizard) + .url( + `https://github.com/Kron4ek/FAudio-Builds/releases/download/${this.faudioVersion}/faudio-${this.faudioVersion}.tar.xz` + ) + .name(`faudio-${this.faudioVersion}.tar.xz`) + .get(); - install(container) { - const wizard = SetupWizard(InstallationType.VERBS, "FAudio", java.util.Optional.empty()); - const versions = ["19.06.07", "19.06", "19.05", "19.04", "19.03", "19.02", "19.01"]; + new Extractor() + .wizard(wizard) + .archive(setupFile) + .to(`${prefixDirectory}/FAudio/`) + .extract(); - const selectedVersion = wizard.menu(tr("Please select the version."), versions, "19.06.07"); + const faudioDir = `${prefixDirectory}/FAudio/faudio-${this.faudioVersion}`; + ls(`${faudioDir}/x64`).forEach(file => { + if (file.endsWith(".dll")) { + cp(`${faudioDir}/x64/${file}`, system64directory); + + this.wine + .overrideDLL() + .set("native", [file]) + .do(); + } + }); + } + + static install(container) { const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "FAudio", Optional.empty()); + wine.prefix(container); wine.wizard(wizard); + + const versions = ["19.06.07", "19.06", "19.05", "19.04", "19.03", "19.02", "19.01"]; + + const selectedVersion = wizard.menu(tr("Please select the version."), versions, "19.06.07"); + // install selected version - wine.faudio(selectedVersion.text); + new FAudio(wine).withVersion(selectedVersion.text).go(); wizard.close(); } } + +module.default = FAudio; diff --git a/Engines/Wine/Verbs/PhysX/script.js b/Engines/Wine/Verbs/PhysX/script.js index 61eca9476f..0a9469b53c 100644 --- a/Engines/Wine/Verbs/PhysX/script.js +++ b/Engines/Wine/Verbs/PhysX/script.js @@ -1,42 +1,44 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); -include("engines.wine.verbs.luna"); +const Optional = Java.type("java.util.Optional"); + +const Luna = include("engines.wine.verbs.luna"); /** * Verb to install Nvidia PhysX - * - * @returns {Wine} Wine object */ -Wine.prototype.physx = function () { - var setupFile = new Resource() - .wizard(this.wizard()) - .url("http://uk.download.nvidia.com/Windows/9.14.0702/PhysX-9.14.0702-SystemSoftware.msi") - .checksum("81e2d38e2356e807ad80cdf150ed5acfff839c8b") - .name("PhysX-9.14.0702-SystemSoftware.msi") - .get(); +class PhysX { + constructor(wine) { + this.wine = wine; + } - this.wizard().wait(tr("Please wait while {0} is installed...", "PhysX")); - this.run("msiexec", ["/i", setupFile, "/q"], null, false, true); + go() { + const wizard = this.wine.wizard(); - return this; -}; + const setupFile = new Resource() + .wizard(wizard) + .url("http://uk.download.nvidia.com/Windows/9.14.0702/PhysX-9.14.0702-SystemSoftware.msi") + .checksum("81e2d38e2356e807ad80cdf150ed5acfff839c8b") + .name("PhysX-9.14.0702-SystemSoftware.msi") + .get(); -/** - * Verb to install Nvidia PhysX - */ -// eslint-disable-next-line no-unused-vars -module.default = class PhysXVerb { - constructor() { - // do nothing + wizard.wait(tr("Please wait while {0} is installed...", "PhysX")); + + this.wine.run("msiexec", ["/i", setupFile, "/q"], null, false, true); } - install(container) { - var wine = new Wine(); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "physx", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "physx", java.util.Optional.empty()); wine.wizard(wizard); - wine.physx(); + + new PhysX(wine).go(); + wizard.close(); } } + +module.default = PhysX; diff --git a/Engines/Wine/Verbs/QuickTime 7.6/script.js b/Engines/Wine/Verbs/QuickTime 7.6/script.js index 8bd2a6ec64..6eecb2679d 100644 --- a/Engines/Wine/Verbs/QuickTime 7.6/script.js +++ b/Engines/Wine/Verbs/QuickTime 7.6/script.js @@ -1,40 +1,55 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); +const Optional = Java.type("java.util.Optional"); + /** * Verb to install QuickTime 7.6 - * - * @returns {Wine} Wine object */ -Wine.prototype.quicktime76 = function () { - var setupFile = new Resource() - .wizard(this.wizard()) - .url("http://appldnld.apple.com/QuickTime/041-0025.20101207.Ptrqt/QuickTimeInstaller.exe") - .checksum("1eec8904f041d9e0ad3459788bdb690e45dbc38e") - .name("QuickTimeInstaller.exe") - .get(); +class QuickTime76 { + constructor(wine) { + this.wine = wine; + } - this.wizard().wait(tr("Please wait while {0} is installed...", "QuickTime")); - this.run(setupFile, ["ALLUSERS=1", "DESKTOP_SHORTCUTS=0", "QTTaskRunFlags=0", "QTINFO.BISQTPRO=1", "SCHEDULE_ASUW=0", "REBOOT_REQUIRED=No"], null, false, true); + go() { + const wizard = this.wine.wizard(); - return this; -}; + const setupFile = new Resource() + .wizard(wizard) + .url("http://appldnld.apple.com/QuickTime/041-0025.20101207.Ptrqt/QuickTimeInstaller.exe") + .checksum("1eec8904f041d9e0ad3459788bdb690e45dbc38e") + .name("QuickTimeInstaller.exe") + .get(); -/** - * Verb to install QuickTime 7.6 - */ -// eslint-disable-next-line no-unused-vars -module.default = class QuickTime76Verb { - constructor() { - // do nothing + wizard.wait(tr("Please wait while {0} is installed...", "QuickTime")); + + this.wine.run( + setupFile, + [ + "ALLUSERS=1", + "DESKTOP_SHORTCUTS=0", + "QTTaskRunFlags=0", + "QTINFO.BISQTPRO=1", + "SCHEDULE_ASUW=0", + "REBOOT_REQUIRED=No" + ], + null, + false, + true + ); } - install(container) { - var wine = new Wine(); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "quicktime76", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "quicktime76", java.util.Optional.empty()); wine.wizard(wizard); + wine.quicktime76(); + wizard.close(); } } + +module.default = QuickTime76; diff --git a/Engines/Wine/Verbs/Remove Mono/script.js b/Engines/Wine/Verbs/Remove Mono/script.js index 415cc61c92..6261f18752 100644 --- a/Engines/Wine/Verbs/Remove Mono/script.js +++ b/Engines/Wine/Verbs/Remove Mono/script.js @@ -1,48 +1,55 @@ const Wine = include("engines.wine.engine.object"); -const {remove} = include("utils.functions.filesystem.files"); +const { remove } = include("utils.functions.filesystem.files"); + +const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.regedit"); /** * Verb to remove mono - * - * @returns {Wine} Wine object */ -Wine.prototype.removeMono = function () { - if (this.uninstall("Mono")) { - this.wizard().wait(tr("Please wait...")); - this.regedit().deleteKey("HKLM\\Software\\Microsoft\\.NETFramework\\v2.0.50727\\SBSDisabled"); +class RemoveMono { + constructor(wine) { + this.wine = wine; + } - this.wizard().wait(tr("Please wait...")); - this.regedit().deleteKey("HKLM\\Software\\Microsoft\\NET Framework Setup\\NDP\\v3.5"); + go() { + const wizard = this.wine.wizard(); + const system32directory = this.wine.system32directory(); + const system64directory = this.wine.system64directory(); - this.wizard().wait(tr("Please wait...")); - this.regedit().deleteKey("HKLM\\Software\\Microsoft\\NET Framework Setup\\NDP\\v4"); + if (this.wine.uninstall("Mono")) { + wizard.wait(tr("Please wait...")); - remove(this.system32directory() + "/mscoree.dll"); - if (this.architecture() == "amd64") { - remove(this.system64directory() + "/mscoree.dll"); - } - } + this.wine.regedit().deleteKey("HKLM\\Software\\Microsoft\\.NETFramework\\v2.0.50727\\SBSDisabled"); - return this; -}; + wizard.wait(tr("Please wait...")); -/** - * Verb to remove mono - */ -// eslint-disable-next-line no-unused-vars -module.default = class RemoveMonoVerb { - constructor() { - // do nothing + this.wine.regedit().deleteKey("HKLM\\Software\\Microsoft\\NET Framework Setup\\NDP\\v3.5"); + + wizard.wait(tr("Please wait...")); + + this.wine.regedit().deleteKey("HKLM\\Software\\Microsoft\\NET Framework Setup\\NDP\\v4"); + + remove(`${system32directory}/mscoree.dll`); + + if (this.wine.architecture() == "amd64") { + remove(`${system64directory}/mscoree.dll`); + } + } } - install(container) { - var wine = new Wine(); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "remove_mono", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "remove_mono", java.util.Optional.empty()); wine.wizard(wizard); - wine.removeMono(); + + new RemoveMono(wine).go(); + wizard.close(); } } + +module.default = RemoveMono; diff --git a/Engines/Wine/Verbs/Tahoma/script.js b/Engines/Wine/Verbs/Tahoma/script.js index 93f52135a0..648ac4416f 100644 --- a/Engines/Wine/Verbs/Tahoma/script.js +++ b/Engines/Wine/Verbs/Tahoma/script.js @@ -1,55 +1,60 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); -const {cp} = include("utils.functions.filesystem.files"); -const {CabExtract} = include("utils.functions.filesystem.extract"); +const { cp } = include("utils.functions.filesystem.files"); +const { CabExtract } = include("utils.functions.filesystem.extract"); + +const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.register_font"); -include("engines.wine.verbs.luna"); +const Luna = include("engines.wine.verbs.luna"); /** * Verb to install the Tahoma font - * - * @returns {Wine} Wine object */ -Wine.prototype.tahoma = function () { - var tahoma = new Resource() - .wizard(this.wizard()) - .url("https://master.dl.sourceforge.net/project/corefonts/OldFiles/IELPKTH.CAB") - .checksum("40c3771ba4ce0811fe18a7a7903e40fcce46422d") - .name("IELPKTH.CAB") - .get(); - - new CabExtract() - .archive(tahoma) - .to(this.prefixDirectory() + "/drive_c/tahoma/") - .extract(["-L", "-F", "tahoma*.tff"]); - - cp(this.prefixDirectory() + "/drive_c/tahoma/tahoma.ttf", this.fontDirectory()); - cp(this.prefixDirectory() + "/drive_c/tahoma/tahomabd.ttf", this.fontDirectory()); - - this.registerFont() - .set("Tahoma", "tahoma.ttf") - .set("Tahoma Bold", "tahomabd.ttf") - .do(); - - return this; -}; +class Tahoma { + constructor(wine) { + this.wine = wine; + } -/** - * Verb to install the Tahoma font - */ -// eslint-disable-next-line no-unused-vars -module.default = class TahomaVerb { - constructor() { - // do nothing + go() { + const wizard = this.wine.wizard(); + const prefixDirectory = this.wine.prefixDirectory(); + const fontDirectory = this.wine.fontDirectory(); + + const tahoma = new Resource() + .wizard(wizard) + .url("https://master.dl.sourceforge.net/project/corefonts/OldFiles/IELPKTH.CAB") + .checksum("40c3771ba4ce0811fe18a7a7903e40fcce46422d") + .name("IELPKTH.CAB") + .get(); + + new CabExtract() + .wizard(wizard) + .archive(tahoma) + .to(`${prefixDirectory}/drive_c/tahoma/`) + .extract(["-L", "-F", "tahoma*.tff"]); + + cp(`${prefixDirectory}/drive_c/tahoma/tahoma.ttf`, fontDirectory); + cp(`${prefixDirectory}/drive_c/tahoma/tahomabd.ttf`, fontDirectory); + + this.wine + .registerFont() + .set("Tahoma", "tahoma.ttf") + .set("Tahoma Bold", "tahomabd.ttf") + .do(); } - install(container) { - var wine = new Wine(); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "tahoma", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "tahoma", java.util.Optional.empty()); wine.wizard(wizard); - wine.tahoma(); + + new Tahoma(wine).go(); + wizard.close(); } } + +module.default = Tahoma; diff --git a/Engines/Wine/Verbs/Uplay/script.js b/Engines/Wine/Verbs/Uplay/script.js index 73a98ac6b1..59f6254840 100644 --- a/Engines/Wine/Verbs/Uplay/script.js +++ b/Engines/Wine/Verbs/Uplay/script.js @@ -1,39 +1,45 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); +const Optional = Java.type("java.util.Optional"); + /** * Verb to install Uplay - * - * @returns {Wine} Wine object */ -Wine.prototype.uplay = function () { - var setupFile = new Resource() - .wizard(this.wizard()) - .url("https://ubistatic3-a.akamaihd.net/orbit/launcher_installer/UplayInstaller.exe") - .name("UplayInstaller.exe") - .get(); +class Uplay { + constructor(wine) { + this.wine = wine; + } - this.wizard().wait(tr("Please follow the steps of the Uplay setup.\n\nUncheck \"Run Uplay\" or close Uplay completely after the setup so that the installation can continue.")); - this.run(setupFile, [], null, false, true); + go() { + const wizard = this.wine.wizard(); - return this; -}; + const setupFile = new Resource() + .wizard(wizard) + .url("https://ubistatic3-a.akamaihd.net/orbit/launcher_installer/UplayInstaller.exe") + .name("UplayInstaller.exe") + .get(); -/** - * Verb to install Uplay - */ -// eslint-disable-next-line no-unused-vars -module.default = class UplayVerb { - constructor() { - // do nothing + wizard.wait( + tr( + 'Please follow the steps of the Uplay setup.\n\nUncheck "Run Uplay" or close Uplay completely after the setup so that the installation can continue.' + ) + ); + + this.wine.run(setupFile, [], null, false, true); } - install(container) { - var wine = new Wine(); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "uplay", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "uplay", java.util.Optional.empty()); wine.wizard(wizard); - wine.uplay(); + + new Uplay(wine).go(); + wizard.close(); } } + +module.default = Uplay; diff --git a/Engines/Wine/Verbs/amstream/script.js b/Engines/Wine/Verbs/amstream/script.js index 74e94bbd5b..0b794a5ce1 100644 --- a/Engines/Wine/Verbs/amstream/script.js +++ b/Engines/Wine/Verbs/amstream/script.js @@ -7,7 +7,7 @@ const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.override_dll"); include("engines.wine.plugins.regsvr32"); -include("engines.wine.verbs.luna"); +const Luna = include("engines.wine.verbs.luna"); /** * Verb to install amstream @@ -35,6 +35,7 @@ class AmstreamVerb { remove(`${system32directory}/amstream.dll`); new CabExtract() + .wizard(wizard) .archive(setupFile) .to(system32directory) .extract([ @@ -67,6 +68,7 @@ class AmstreamVerb { remove(`${system64directory}/amstream.dll`); new CabExtract() + .wizard(wizard) .archive(setupFilex64) .to(system64directory) .extract([ diff --git a/Engines/Wine/Verbs/corefonts/script.js b/Engines/Wine/Verbs/corefonts/script.js index 5f619dee27..19ae16d27c 100644 --- a/Engines/Wine/Verbs/corefonts/script.js +++ b/Engines/Wine/Verbs/corefonts/script.js @@ -5,7 +5,7 @@ const { CabExtract } = include("utils.functions.filesystem.extract"); const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.register_font"); -include("engines.wine.verbs.luna"); +const Luna = include("engines.wine.verbs.luna"); /** * Verb to install corefonts @@ -100,8 +100,8 @@ class CorefontsVerb { progressBar.setProgressPercentage((numInstalledFonts * 100) / fontResources.length); new CabExtract() - .archive(fontResource) .wizard(wizard) + .archive(fontResource) .to(fontDirectory) .extract(); diff --git a/Engines/Wine/Verbs/d3drm/script.js b/Engines/Wine/Verbs/d3drm/script.js index 0df27755f1..8bf285d80e 100644 --- a/Engines/Wine/Verbs/d3drm/script.js +++ b/Engines/Wine/Verbs/d3drm/script.js @@ -5,7 +5,7 @@ const { CabExtract } = include("utils.functions.filesystem.extract"); const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.override_dll"); -include("engines.wine.verbs.luna"); +const Luna = include("engines.wine.verbs.luna"); /** * Verb to install d3drm @@ -32,11 +32,13 @@ class D3drmVerb { wizard.wait(tr("Please wait while {0} is installed...", "d3drm")); new CabExtract() + .wizard(wizard) .archive(setupFile) .to(`${prefixDirectory}/drive_c/d3drm/`) .extract(["-L", "-F", "dxnt.cab"]); new CabExtract() + .wizard(wizard) .archive(`${prefixDirectory}/drive_c/d3drm/dxnt.cab`) .to(system32directory) .extract(["-L", "-F", "d3drm.dll"]); diff --git a/Engines/Wine/Verbs/devenum/script.js b/Engines/Wine/Verbs/devenum/script.js index 7c0e73030a..10fa3c2401 100644 --- a/Engines/Wine/Verbs/devenum/script.js +++ b/Engines/Wine/Verbs/devenum/script.js @@ -6,7 +6,7 @@ const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.override_dll"); include("engines.wine.plugins.regsvr32"); -include("engines.wine.verbs.luna"); +const Luna = include("engines.wine.verbs.luna"); /** * Verb to install devenum diff --git a/Engines/Wine/Verbs/dotnet20/script.js b/Engines/Wine/Verbs/dotnet20/script.js index d054bfece7..f560bd7d2c 100644 --- a/Engines/Wine/Verbs/dotnet20/script.js +++ b/Engines/Wine/Verbs/dotnet20/script.js @@ -6,7 +6,7 @@ const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.override_dll"); include("engines.wine.plugins.windows_version"); -include("engines.wine.verbs.remove_mono"); +const RemoveMono = include("engines.wine.verbs.remove_mono"); /** * Verb to install .NET 2.0 @@ -31,7 +31,7 @@ class DotNET20 { .name("dotnetfx.exe") .get(); - this.wine.removeMono(); + new RemoveMono(this.wine).go(); wizard.wait(tr("Please wait while {0} is installed...", ".NET Framework 2.0")); @@ -50,7 +50,7 @@ class DotNET20 { .name("NetFx64.exe") .get(); - this.wine.removeMono(); + new RemoveMono(this.wine).go(); wizard.wait(tr("Please wait while {0} is installed...", ".NET Framework 2.0")); diff --git a/Engines/Wine/Verbs/dotnet20sp2/script.js b/Engines/Wine/Verbs/dotnet20sp2/script.js index 5bc311d999..81c08d738a 100644 --- a/Engines/Wine/Verbs/dotnet20sp2/script.js +++ b/Engines/Wine/Verbs/dotnet20sp2/script.js @@ -7,7 +7,7 @@ const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.override_dll"); include("engines.wine.plugins.windows_version"); include("engines.wine.plugins.regedit"); -include("engines.wine.verbs.remove_mono"); +const RemoveMono = include("engines.wine.verbs.remove_mono"); /** * Verb to install dotnet20sp2 @@ -29,7 +29,7 @@ class Dotnet20SP2 { .set("builtin", ["ngen.exe", "regsvcs.exe", "mscorsvw.exe"]) .do(); - this.wine.removeMono(); + new RemoveMono(this.wine).go(); if (this.wine.architecture() == "x86") { const setupFile32 = new Resource() diff --git a/Engines/Wine/Verbs/dotnet40/script.js b/Engines/Wine/Verbs/dotnet40/script.js index 94bc892e05..4ddb4b86ee 100755 --- a/Engines/Wine/Verbs/dotnet40/script.js +++ b/Engines/Wine/Verbs/dotnet40/script.js @@ -6,7 +6,7 @@ const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.override_dll"); include("engines.wine.plugins.windows_version"); include("engines.wine.plugins.regedit"); -include("engines.wine.verbs.remove_mono"); +const RemoveMono = include("engines.wine.verbs.remove_mono"); /** * Verb to install .NET 4.0 @@ -38,7 +38,7 @@ class DotNET40 { .name("dotNetFx40_Full_x86_x64.exe") .get(); - this.wine.removeMono(); + new RemoveMono(this.wine).go(); this.wine.windowsVersion("winxp"); diff --git a/Engines/Wine/Verbs/dotnet45/script.js b/Engines/Wine/Verbs/dotnet45/script.js index 5979a94952..f7540feb3b 100755 --- a/Engines/Wine/Verbs/dotnet45/script.js +++ b/Engines/Wine/Verbs/dotnet45/script.js @@ -6,7 +6,7 @@ const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.override_dll"); include("engines.wine.plugins.windows_version"); include("engines.wine.plugins.regedit"); -include("engines.wine.verbs.remove_mono"); +const RemoveMono = include("engines.wine.verbs.remove_mono"); const DotNET40 = include("engines.wine.verbs.dotnet40"); /** @@ -39,7 +39,7 @@ class DotNET45 { .name("dotnetfx45_full_x86_x64.exe") .get(); - this.wine.removeMono(); + new RemoveMono(this.wine).go(); new DotNET40(this.wine).go(); diff --git a/Engines/Wine/Verbs/dotnet452/script.js b/Engines/Wine/Verbs/dotnet452/script.js index 635bc03361..f60c73cb9a 100755 --- a/Engines/Wine/Verbs/dotnet452/script.js +++ b/Engines/Wine/Verbs/dotnet452/script.js @@ -6,7 +6,7 @@ const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.override_dll"); include("engines.wine.plugins.windows_version"); include("engines.wine.plugins.regedit"); -include("engines.wine.verbs.remove_mono"); +const RemoveMono = include("engines.wine.verbs.remove_mono"); const DotNET40 = include("engines.wine.verbs.dotnet40"); /** @@ -32,7 +32,7 @@ class DotNET452 { .name("NDP452-KB2901907-x86-x64-AllOS-ENU.exe") .get(); - this.wine.removeMono(); + new RemoveMono(this.wine).go(); new DotNET40(this.wine).go(); diff --git a/Engines/Wine/Verbs/dotnet46/script.js b/Engines/Wine/Verbs/dotnet46/script.js index fbf5b15134..9e564fb389 100755 --- a/Engines/Wine/Verbs/dotnet46/script.js +++ b/Engines/Wine/Verbs/dotnet46/script.js @@ -6,7 +6,7 @@ const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.override_dll"); include("engines.wine.plugins.windows_version"); include("engines.wine.plugins.regedit"); -include("engines.wine.verbs.remove_mono"); +const RemoveMono = include("engines.wine.verbs.remove_mono"); const DotNET45 = include("engines.wine.verbs.dotnet45"); /** @@ -32,7 +32,7 @@ class DotNET46 { .name("NDP46-KB3045557-x86-x64-AllOS-ENU.exe") .get(); - this.wine.removeMono(); + new RemoveMono(this.wine).go(); new DotNET45(this.wine).go(); diff --git a/Engines/Wine/Verbs/dotnet461/script.js b/Engines/Wine/Verbs/dotnet461/script.js index ddbd333ede..f665b5fa54 100755 --- a/Engines/Wine/Verbs/dotnet461/script.js +++ b/Engines/Wine/Verbs/dotnet461/script.js @@ -6,7 +6,7 @@ const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.override_dll"); include("engines.wine.plugins.windows_version"); include("engines.wine.plugins.regedit"); -include("engines.wine.verbs.remove_mono"); +const RemoveMono = include("engines.wine.verbs.remove_mono"); const DotNET46 = include("engines.wine.verbs.dotnet46"); /** @@ -32,7 +32,7 @@ class DotNET461 { .name("NDP461-KB3102436-x86-x64-AllOS-ENU.exe") .get(); - this.wine.removeMono(); + new RemoveMono(this.wine).go(); new DotNET46(this.wine).go(); diff --git a/Engines/Wine/Verbs/dotnet462/script.js b/Engines/Wine/Verbs/dotnet462/script.js index 8e6fcf29a8..df93f0a2a1 100755 --- a/Engines/Wine/Verbs/dotnet462/script.js +++ b/Engines/Wine/Verbs/dotnet462/script.js @@ -6,7 +6,7 @@ const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.override_dll"); include("engines.wine.plugins.windows_version"); include("engines.wine.plugins.regedit"); -include("engines.wine.verbs.remove_mono"); +const RemoveMono = include("engines.wine.verbs.remove_mono"); const DotNET461 = include("engines.wine.verbs.dotnet461"); /** @@ -32,7 +32,7 @@ class DotNET462 { .name("NDP462-KB3151800-x86-x64-AllOS-ENU.exe") .get(); - this.wine.removeMono(); + new RemoveMono(this.wine).go(); new DotNET461(this.wine).go(); diff --git a/Engines/Wine/Verbs/dotnet472/script.js b/Engines/Wine/Verbs/dotnet472/script.js index 13a18d9928..22f1fb72ad 100755 --- a/Engines/Wine/Verbs/dotnet472/script.js +++ b/Engines/Wine/Verbs/dotnet472/script.js @@ -6,7 +6,7 @@ const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.override_dll"); include("engines.wine.plugins.windows_version"); include("engines.wine.plugins.regedit"); -include("engines.wine.verbs.remove_mono"); +const RemoveMono = include("engines.wine.verbs.remove_mono"); const DotNET462 = include("engines.wine.verbs.dotnet462"); /** @@ -32,7 +32,7 @@ class DotNET472 { .name("NDP472-KB4054530-x86-x64-AllOS-ENU.exe") .get(); - this.wine.removeMono(); + new RemoveMono(this.wine).go(); new DotNET462(this.wine).go(); diff --git a/Engines/Wine/Verbs/gallium9/script.js b/Engines/Wine/Verbs/gallium9/script.js index e2c2e7f546..43b32b69c1 100644 --- a/Engines/Wine/Verbs/gallium9/script.js +++ b/Engines/Wine/Verbs/gallium9/script.js @@ -1,102 +1,113 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); -const {Extractor} = include("utils.functions.filesystem.extract"); -const {remove, lns} = include("utils.functions.filesystem.files"); +const { Extractor } = include("utils.functions.filesystem.extract"); +const { remove, lns } = include("utils.functions.filesystem.files"); + +const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.override_dll"); /** * Verb to install Gallium 9 Standalone * see: https://github.com/iXit/wine-nine-standalone/ - * - * @param {String} gallium9Version Gallium 9 Standalone version to download - * @returns {Wine} Wine object */ -Wine.prototype.gallium9 = function (gallium9Version) { - if (typeof gallium9Version !== "string") { - gallium9Version = "0.4"; +class Gallium9 { + constructor(wine) { + this.wine = wine; } - this.wizard().message( - tr( - "Using Gallium 9 requires to have a driver supporting the Gallium 9 state tracker, as well as d3dapater9.so installed (ex: libd3d9adapter-mesa package). Please be sure it is installed (both 32 and 64 bits)." - ) - ); - - const setupFile = new Resource() - .wizard(this.wizard()) - .url( - "https://github.com/iXit/wine-nine-standalone/releases/download/v" + - gallium9Version + - "/gallium-nine-standalone-v" + - gallium9Version + - ".tar.gz" - ) - .name("gallium-nine-standalone-v" + gallium9Version + ".tar.gz") - .get(); - - new Extractor() - .wizard(this.wizard()) - .archive(setupFile) - .to(this.prefixDirectory()) - .extract(); - - remove(this.system32directory() + "/d3d9.dll"); - lns( - this.prefixDirectory() + "/gallium-nine-standalone/lib32/d3d9-nine.dll.so", - this.system32directory() + "/d3d9-nine.dll" - ); - lns( - this.prefixDirectory() + "/gallium-nine-standalone/bin32/ninewinecfg.exe.so", - this.system32directory() + "/ninewinecfg.exe" - ); - lns(this.system32directory() + "/d3d9-nine.dll", this.system32directory() + "/d3d9.dll"); - - if (this.architecture() == "amd64") { - remove(this.system64directory() + "/d3d9.dll"); - lns( - this.prefixDirectory() + "/gallium-nine-standalone/lib64/d3d9-nine.dll.so", - this.system64directory() + "/d3d9-nine.dll" + /** + * Sets the used gallium9 version + * + * @param {string} gallium9Version The Gallium 9 Standalone version to download + * @returns {Gallium9} + */ + withVersion(gallium9Version) { + this.gallium9Version = gallium9Version; + + return this; + } + + go() { + const wizard = this.wine.wizard(); + const prefixDirectory = this.wine.prefixDirectory(); + const system32directory = this.wine.system32directory(); + + if (typeof gallium9Version !== "string") { + gallium9Version = "0.4"; + } + + this.wizard().message( + tr( + "Using Gallium 9 requires to have a driver supporting the Gallium 9 state tracker, as well as d3dapater9.so installed (ex: libd3d9adapter-mesa package). Please be sure it is installed (both 32 and 64 bits)." + ) ); + + const setupFile = new Resource() + .wizard(wizard) + .url( + `https://github.com/iXit/wine-nine-standalone/releases/download/v${this.gallium9Version}/gallium-nine-standalone-v${this.gallium9Version}.tar.gz` + ) + .name(`gallium-nine-standalone-v${this.gallium9Version}.tar.gz`) + .get(); + + new Extractor() + .wizard(wizard) + .archive(setupFile) + .to(prefixDirectory) + .extract(); + + remove(`${system32directory}/d3d9.dll`); + + lns(`${prefixDirectory}/gallium-nine-standalone/lib32/d3d9-nine.dll.so`, `${system32directory}/d3d9-nine.dll`); lns( - this.prefixDirectory() + "/gallium-nine-standalone/bin64/ninewinecfg.exe.so", - this.system64directory() + "/ninewinecfg.exe" + `${prefixDirectory}/gallium-nine-standalone/bin32/ninewinecfg.exe.so`, + `${system32directory}/ninewinecfg.exe` ); - lns(this.system64directory() + "/d3d9-nine.dll", this.system64directory() + "/d3d9.dll"); + lns(`${system32directory}/d3d9-nine.dll`, `${system32directory}/d3d9.dll`); - this.run(this.system64directory() + "ninewinecfg.exe", ["-e"], null, false, true); - } else { - this.run(this.system32directory() + "ninewinecfg.exe", ["-e"], null, false, true); - } + if (this.wine.architecture() == "amd64") { + const system64directory = this.wine.system64directory(); - this.overrideDLL() - .set("native", ["d3d9"]) - .do(); + remove(`${system64directory}/d3d9.dll`); - return this; -}; + lns( + `${prefixDirectory}/gallium-nine-standalone/lib64/d3d9-nine.dll.so`, + `${system64directory}/d3d9-nine.dll` + ); + lns( + `${prefixDirectory}/gallium-nine-standalone/bin64/ninewinecfg.exe.so`, + `${system64directory}/ninewinecfg.exe` + ); + lns(`${system64directory}/d3d9-nine.dll`, `${system64directory}/d3d9.dll`); -/** - * Verb to install Gallium 9 Standalone - */ -// eslint-disable-next-line no-unused-vars -module.default = class Gallium9Verb { - constructor() { - // do nothing + this.wine.run(`${system64directory}ninewinecfg.exe`, ["-e"], null, false, true); + } else { + this.wine.run(`${system32directory}ninewinecfg.exe`, ["-e"], null, false, true); + } + + this.wine + .overrideDLL() + .set("native", ["d3d9"]) + .do(); } - install(container) { - const wizard = SetupWizard(InstallationType.VERBS, "gallium9", java.util.Optional.empty()); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "gallium9", Optional.empty()); + const versions = ["0.4", "0.3", "0.2"]; const selectedVersion = wizard.menu(tr("Please select the version."), versions, "0.4"); - const wine = new Wine(); wine.prefix(container); wine.wizard(wizard); + // install selected version - wine.gallium9(selectedVersion.text); + new Gallium9(wine).withVersion(selectedVersion.text).go(); wizard.close(); } } + +module.default = Gallium9; diff --git a/Engines/Wine/Verbs/gdiplus/script.js b/Engines/Wine/Verbs/gdiplus/script.js index 4a1b2ce0fa..54ca7ab51b 100644 --- a/Engines/Wine/Verbs/gdiplus/script.js +++ b/Engines/Wine/Verbs/gdiplus/script.js @@ -1,49 +1,56 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); -const {cp} = include("utils.functions.filesystem.files"); +const { cp } = include("utils.functions.filesystem.files"); + +const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.override_dll"); /** * Verb to install gdiplus - * - * @returns {Wine} Wine object */ -Wine.prototype.gdiplus = function () { - var setupFile = new Resource() - .wizard(this.wizard()) - .url("http://download.microsoft.com/download/a/b/c/abc45517-97a0-4cee-a362-1957be2f24e1/WindowsXP-KB975337-x86-ENU.exe") - .checksum("b9a84bc3de92863bba1f5eb1d598446567fbc646") - .name("WindowsXP-KB975337-x86-ENU.exe") - .get(); +class GDIPlus { + constructor(wine) { + this.wine = wine; + } - this.wizard().wait(tr("Please wait while {0} is installed...", "GDI+")); - this.run(setupFile, ["/extract:C:\\Tmp", "/q"], null, true, true); + go() { + const wizard = this.wine.wizard(); + const prefixDirectory = this.wine.prefixDirectory(); + const system32directory = this.wine.system32directory(); - this.overrideDLL() - .set("native", ["gdiplus"]) - .do(); + const setupFile = new Resource() + .wizard(wizard) + .url( + "http://download.microsoft.com/download/a/b/c/abc45517-97a0-4cee-a362-1957be2f24e1/WindowsXP-KB975337-x86-ENU.exe" + ) + .checksum("b9a84bc3de92863bba1f5eb1d598446567fbc646") + .name("WindowsXP-KB975337-x86-ENU.exe") + .get(); - cp(this.prefixDirectory() + "/drive_c/Tmp/asms/10/msft/windows/gdiplus/gdiplus.dll", this.system32directory()); + wizard.wait(tr("Please wait while {0} is installed...", "GDI+")); - return this; -}; + this.wine.run(setupFile, ["/extract:C:\\Tmp", "/q"], null, true, true); -/** - * Verb to install gdiplus - */ -// eslint-disable-next-line no-unused-vars -module.default = class GdiplusVerb { - constructor() { - // do nothing + this.wine + .overrideDLL() + .set("native", ["gdiplus"]) + .do(); + + cp(`${prefixDirectory}/drive_c/Tmp/asms/10/msft/windows/gdiplus/gdiplus.dll`, system32directory); } - install(container) { - var wine = new Wine(); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "gdiplus", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "gdiplus", java.util.Optional.empty()); wine.wizard(wizard); - wine.gdiplus(); + + new GDIPlus(wine).go(); + wizard.close(); } } + +module.default = GDIPlus; diff --git a/Engines/Wine/Verbs/luna/script.js b/Engines/Wine/Verbs/luna/script.js index f521e58338..91ad54f72e 100644 --- a/Engines/Wine/Verbs/luna/script.js +++ b/Engines/Wine/Verbs/luna/script.js @@ -1,53 +1,55 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); -const {mkdir, cp} = include("utils.functions.filesystem.files"); +const { mkdir, cp } = include("utils.functions.filesystem.files"); + +const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.regedit"); /** * Verb to install luna - * - * @returns {Wine} Wine object */ -Wine.prototype.luna = function () { - var lunaStyle = new Resource() - .wizard(this.wizard()) - .url("https://repository.playonlinux.com/divers/luna.msstyles") - .checksum("50a71767f90c1d3d86ca188a84393f2d39664311") - .name("luna.msstyles") - .get(); +class Luna { + constructor(wine) { + this.wine = wine; + } - var lunaReg = new Resource() - .wizard(this.wizard()) - .url("https://repository.playonlinux.com/divers/luna.reg") - .checksum("074e655d391ae87527f4cc50ba822a8aad83a09f") - .name("luna.reg") - .get(); + go() { + const wizard = this.wine.wizard(); + const prefixDirectory = this.wine.prefixDirectory(); + const lunaStyle = new Resource() + .wizard(wizard) + .url("https://repository.playonlinux.com/divers/luna.msstyles") + .checksum("50a71767f90c1d3d86ca188a84393f2d39664311") + .name("luna.msstyles") + .get(); - mkdir(this.prefixDirectory() + "/drive_c/windows/Resources/Themes/luna/"); - cp(lunaStyle, this.prefixDirectory() + "/drive_c/windows/Resources/Themes/luna/"); + const lunaReg = new Resource() + .wizard(wizard) + .url("https://repository.playonlinux.com/divers/luna.reg") + .checksum("074e655d391ae87527f4cc50ba822a8aad83a09f") + .name("luna.reg") + .get(); - this.regedit().open(lunaReg); + mkdir(`${prefixDirectory}/drive_c/windows/Resources/Themes/luna/`); - return this; -}; + cp(lunaStyle, `${prefixDirectory}/drive_c/windows/Resources/Themes/luna/`); -/** - * Verb to install luna - */ -// eslint-disable-next-line no-unused-vars -module.default = class LunaVerb { - constructor() { - // do nothing + this.wine.regedit().open(lunaReg); } - install(container) { + static install(container) { var wine = new Wine(); + var wizard = SetupWizard(InstallationType.VERBS, "luna", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "luna", java.util.Optional.empty()); wine.wizard(wizard); - wine.luna(); + + new Luna(wine).go(); + wizard.close(); } } + +module.default = Luna; diff --git a/Engines/Wine/Verbs/mfc42/script.js b/Engines/Wine/Verbs/mfc42/script.js index 920cde2776..ade268ae13 100644 --- a/Engines/Wine/Verbs/mfc42/script.js +++ b/Engines/Wine/Verbs/mfc42/script.js @@ -1,60 +1,63 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); -const {CabExtract} = include("utils.functions.filesystem.extract"); -const {remove} = include("utils.functions.filesystem.files"); +const { CabExtract } = include("utils.functions.filesystem.extract"); +const { remove } = include("utils.functions.filesystem.files"); + +const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.override_dll"); /** * Verb to install mfc42.dll and mfc42u.dll - * - * @returns {Wine} Wine object */ -Wine.prototype.mfc42 = function () { - var setupFile = new Resource() - .wizard(this.wizard()) - .url("http://download.microsoft.com/download/vc60pro/Update/2/W9XNT4/EN-US/VC6RedistSetup_deu.exe") - .checksum("a8c4dd33e281c166488846a10edf97ff0ce37044") - .name("VC6RedistSetup_deu.exe") - .get(); - - remove(this.system32directory() + "/mfc42.dll"); - remove(this.system32directory() + "/mfc42u.dll"); - - new CabExtract() - .archive(setupFile) - .wizard(this.wizard()) - .to(this.system32directory()) - .extract(); - - new CabExtract() - .archive(this.system32directory() + "/vcredist.exe") - .wizard(this.wizard()) - .to(this.system32directory()) - .extract(['-F', 'mfc42*.dll']); - - this.overrideDLL() - .set("native, builtin", ["mfc42", "mfc42u"]) - .do(); - - return this; -}; +class Mfc42 { + constructor(wine) { + this.wine = wine; + } -/** - * Verb to install mfc42.dll and mfc42u.dll - */ -// eslint-disable-next-line no-unused-vars -module.default = class Mfc42Verb { - constructor() { - // do nothing + go() { + const wizard = this.wine.wizard(); + const system32directory = this.wine.system32directory(); + + const setupFile = new Resource() + .wizard(wizard) + .url("http://download.microsoft.com/download/vc60pro/Update/2/W9XNT4/EN-US/VC6RedistSetup_deu.exe") + .checksum("a8c4dd33e281c166488846a10edf97ff0ce37044") + .name("VC6RedistSetup_deu.exe") + .get(); + + remove(`${system32directory}/mfc42.dll`); + remove(`${system32directory}/mfc42u.dll`); + + new CabExtract() + .wizard(wizard) + .archive(setupFile) + .to(system32directory) + .extract(); + + new CabExtract() + .wizard(wizard) + .archive(`${system32directory}/vcredist.exe`) + .to(system32directory) + .extract(["-F", "mfc42*.dll"]); + + this.wine + .overrideDLL() + .set("native, builtin", ["mfc42", "mfc42u"]) + .do(); } - install(container) { - var wine = new Wine(); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "mfc42", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "mfc42", java.util.Optional.empty()); wine.wizard(wizard); - wine.mfc42(); + + new Mfc42(wine).go(); + wizard.close(); } } + +module.default = Mfc42; diff --git a/Engines/Wine/Verbs/msls31/script.js b/Engines/Wine/Verbs/msls31/script.js index b8ee2f7ec6..7a9ea9cee8 100644 --- a/Engines/Wine/Verbs/msls31/script.js +++ b/Engines/Wine/Verbs/msls31/script.js @@ -1,14 +1,16 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); -const {CabExtract} = include("utils.functions.filesystem.extract"); -const {remove} = include("utils.functions.filesystem.files"); +const { CabExtract } = include("utils.functions.filesystem.extract"); +const { remove } = include("utils.functions.filesystem.files"); + +const Optional = Java.type("java.util.Optional"); /** * Verb to install msls31.dll * * @returns {Wine} Wine object */ -Wine.prototype.msls31 = function () { +Wine.prototype.msls31 = function() { var setupFile = new Resource() .wizard(this.wizard()) .url("ftp://ftp.hp.com/pub/softlib/software/msi/InstMsiW.exe") @@ -30,18 +32,42 @@ Wine.prototype.msls31 = function () { /** * Verb to install msls31.dll */ -// eslint-disable-next-line no-unused-vars -module.default = class Msls31Verb { - constructor() { - // do nothing +class Msls31 { + constructor(wine) { + this.wine = wine; + } + + go() { + const wizard = this.wine.wizard(); + const system32directory = this.wine.system32directory(); + + const setupFile = new Resource() + .wizard(wizard) + .url("ftp://ftp.hp.com/pub/softlib/software/msi/InstMsiW.exe") + .checksum("4fc3bf0dc96b5cf5ab26430fac1c33c5c50bd142") + .name("InstMsiW.exe") + .get(); + + remove(`${system32directory}/msls31.dll`); + + new CabExtract() + .wizard(wizard) + .archive(setupFile) + .to(system32directory) + .extract(["-F", "msls31.dll"]); } - install(container) { - var wine = new Wine(); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "msls31", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "msls31", java.util.Optional.empty()); wine.wizard(wizard); - wine.msls31(); + + new Msls31(wine).go(); + wizard.close(); } } + +module.default = Msls31; diff --git a/Engines/Wine/Verbs/mspatcha/script.js b/Engines/Wine/Verbs/mspatcha/script.js index 2f0b56389b..3bbcc45946 100644 --- a/Engines/Wine/Verbs/mspatcha/script.js +++ b/Engines/Wine/Verbs/mspatcha/script.js @@ -1,62 +1,67 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); -const {CabExtract} = include("utils.functions.filesystem.extract"); -const {remove} = include("utils.functions.filesystem.files"); +const { CabExtract } = include("utils.functions.filesystem.extract"); +const { remove } = include("utils.functions.filesystem.files"); + +const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.override_dll"); /** * Verb to install mspatcha - * - * @returns {Wine} Wine object */ -Wine.prototype.mspatcha = function () { - //Inspired from winetricks mspatcha, but with a link Phoenicis can understand - var setupFile = new Resource() - .wizard(this.wizard()) - .url("https://ftp.gnome.org/mirror/archive/ftp.sunet.se/pub/security/vendor/microsoft/win2000/Service_Packs/usa/W2KSP4_EN.EXE") - .checksum("fadea6d94a014b039839fecc6e6a11c20afa4fa8") - .name("W2ksp4_EN.exe") - .get(); - - remove(this.system32directory() + "/mspatcha.dll"); - - new CabExtract() - .archive(setupFile) - .wizard(this.wizard()) - .to(this.system32directory()) - .extract(); - - new CabExtract() - .archive(this.system32directory() + "/i386/mspatcha.dl_") - .wizard(this.wizard()) - .to(this.system32directory()) - .extract(); - - remove(this.system32directory() + "/i386/"); - - this.overrideDLL() - .set("native, builtin", ["mspatcha"]) - .do(); - - return this; -}; +class Mspatcha { + constructor(wine) { + this.wine = wine; + } -/** - * Verb to install mspatcha - */ -// eslint-disable-next-line no-unused-vars -module.default = class MspatchaVerb { - constructor() { - // do nothing + go() { + const wizard = this.wine.wizard(); + const system32directory = this.wine.system32directory(); + + //Inspired from winetricks mspatcha, but with a link Phoenicis can understand + const setupFile = new Resource() + .wizard(wizard) + .url( + "https://ftp.gnome.org/mirror/archive/ftp.sunet.se/pub/security/vendor/microsoft/win2000/Service_Packs/usa/W2KSP4_EN.EXE" + ) + .checksum("fadea6d94a014b039839fecc6e6a11c20afa4fa8") + .name("W2ksp4_EN.exe") + .get(); + + remove(`${system32directory}/mspatcha.dll`); + + new CabExtract() + .wizard(wizard) + .archive(setupFile) + .to(system32directory) + .extract(); + + new CabExtract() + .wizard(wizard) + .archive(`${system32directory}/i386/mspatcha.dl_`) + .to(system32directory) + .extract(); + + remove(`${system32directory}/i386/`); + + this.wine + .overrideDLL() + .set("native, builtin", ["mspatcha"]) + .do(); } - install(container) { - var wine = new Wine(); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "mspatcha", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "mspatcha", java.util.Optional.empty()); wine.wizard(wizard); - wine.mspatcha(); + + new Mspatcha(wine).go(); + wizard.close(); } } + +module.default = Mspatcha; diff --git a/Engines/Wine/Verbs/msxml3/script.js b/Engines/Wine/Verbs/msxml3/script.js index 03bc2c1d5e..25c2f2c91c 100644 --- a/Engines/Wine/Verbs/msxml3/script.js +++ b/Engines/Wine/Verbs/msxml3/script.js @@ -1,49 +1,53 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); -const {remove} = include("utils.functions.filesystem.files"); +const { remove } = include("utils.functions.filesystem.files"); + +const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.override_dll"); /** * Verb to install msxml3 - * - * @returns {Wine} Wine object */ -Wine.prototype.msxml3 = function () { - var setupFile32 = new Resource() - .wizard(this.wizard()) - .url("https://media.codeweavers.com/pub/other/msxml3.msi") - .checksum("d4c2178dfb807e1a0267fce0fd06b8d51106d913") - .name("msxml3.msi") - .get(); +class Msxml3 { + constructor(wine) { + this.wine = wine; + } - remove(this.system32directory() + "/msxml3.dll"); + go() { + const wizard = this.wine.wizard(); + const system32directory = this.wine.system32directory(); - this.overrideDLL() - .set("native", ["msxml3"]) - .do(); + const setupFile32 = new Resource() + .wizard(wizard) + .url("https://media.codeweavers.com/pub/other/msxml3.msi") + .checksum("d4c2178dfb807e1a0267fce0fd06b8d51106d913") + .name("msxml3.msi") + .get(); - this.wizard().wait(tr("Please wait while {0} is installed...", "msxml3")); - this.run(setupFile32, ["/q:a", "/c:msxml3.msi /q"], null, false, true); + remove(`${system32directory}/msxml3.dll`); - return this; -}; + this.wine + .overrideDLL() + .set("native", ["msxml3"]) + .do(); -/** - * Verb to install msxml3 - */ -// eslint-disable-next-line no-unused-vars -module.default = class Msxml3Verb { - constructor() { - // do nothing + wizard.wait(tr("Please wait while {0} is installed...", "msxml3")); + + this.wine.run(setupFile32, ["/q:a", "/c:msxml3.msi /q"], null, false, true); } - install(container) { - var wine = new Wine(); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "msxml3", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "msxml3", java.util.Optional.empty()); wine.wizard(wizard); - wine.msxml3(); + + new Msxml3(wine).go(); + wizard.close(); } } + +module.default = Msxml3; diff --git a/Engines/Wine/Verbs/msxml6/script.js b/Engines/Wine/Verbs/msxml6/script.js index c5610ff10c..9ff0c4abaa 100644 --- a/Engines/Wine/Verbs/msxml6/script.js +++ b/Engines/Wine/Verbs/msxml6/script.js @@ -1,64 +1,73 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); -const {remove} = include("utils.functions.filesystem.files"); +const { remove } = include("utils.functions.filesystem.files"); + +const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.override_dll"); /** * Verb to install msxml6 - * - * @returns {Wine} Wine object */ -Wine.prototype.msxml6 = function () { - if (this.architecture() == "amd64") { - var setupFile64 = new Resource() - .wizard(this.wizard()) - .url("https://download.microsoft.com/download/e/a/f/eafb8ee7-667d-4e30-bb39-4694b5b3006f/msxml6_x64.msi") - .checksum("ca0c0814a9c7024583edb997296aad7cb0a3cbf7") - .name("msxml6_x64.msi") - .get(); - } else { - var setupFile32 = new Resource() - .wizard(this.wizard()) - .url("https://download.microsoft.com/download/e/a/f/eafb8ee7-667d-4e30-bb39-4694b5b3006f/msxml6_x86.msi") - .checksum("5125220e985b33c946bbf9f60e2b222c7570bfa2") - .name("msxml6_x86.msi") - .get(); +class Msxml6 { + constructor(wine) { + this.wine = wine; } - remove(this.system32directory() + "/msxml6.dll"); + go() { + const wizard = this.wine.wizard(); + const system32directory = this.wine.system32directory(); + const system64directory = this.wine.system64directory(); - this.overrideDLL() - .set("native,builtin", ["msxml6"]) - .do(); + remove(`${system32directory}/msxml6.dll`); - if (this.architecture() == "amd64") { - remove(this.system64directory() + "/msxml6.dll") - this.wizard().wait(tr("Please wait while {0} is installed...", "msxml6")); - this.run(setupFile64, ["/q:a", "/c:msxml6_x64.msi /q"], null, false, true); - } else { - this.wizard().wait(tr("Please wait while {0} is installed...", "msxml6")); - this.run(setupFile32, ["/q:a", "/c:msxml6_x86.msi /q"], null, false, true); - } + this.wine + .overrideDLL() + .set("native,builtin", ["msxml6"]) + .do(); - return this; -}; + if (this.wine.architecture() == "amd64") { + remove(`${system64directory}/msxml6.dll`); -/** - * Verb to install msxml6 - */ -// eslint-disable-next-line no-unused-vars -module.default = class Msxml6Verb { - constructor() { - // do nothing + const setupFile64 = new Resource() + .wizard(wizard) + .url( + "https://download.microsoft.com/download/e/a/f/eafb8ee7-667d-4e30-bb39-4694b5b3006f/msxml6_x64.msi" + ) + .checksum("ca0c0814a9c7024583edb997296aad7cb0a3cbf7") + .name("msxml6_x64.msi") + .get(); + + wizard.wait(tr("Please wait while {0} is installed...", "msxml6")); + + this.run(setupFile64, ["/q:a", "/c:msxml6_x64.msi /q"], null, false, true); + } else { + const setupFile32 = new Resource() + .wizard(wizard) + .url( + "https://download.microsoft.com/download/e/a/f/eafb8ee7-667d-4e30-bb39-4694b5b3006f/msxml6_x86.msi" + ) + .checksum("5125220e985b33c946bbf9f60e2b222c7570bfa2") + .name("msxml6_x86.msi") + .get(); + + wizard.wait(tr("Please wait while {0} is installed...", "msxml6")); + + this.run(setupFile32, ["/q:a", "/c:msxml6_x86.msi /q"], null, false, true); + } } - install(container) { - var wine = new Wine(); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "msxml6", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "msxml6", java.util.Optional.empty()); wine.wizard(wizard); - wine.msxml6(); + + new Msxml6(wine).go(); + wizard.close(); } } + +module.default = Msxml6; diff --git a/Engines/Wine/Verbs/quartz/script.js b/Engines/Wine/Verbs/quartz/script.js index bfee727169..cd66d10ffd 100644 --- a/Engines/Wine/Verbs/quartz/script.js +++ b/Engines/Wine/Verbs/quartz/script.js @@ -1,62 +1,68 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); -const {CabExtract} = include("utils.functions.filesystem.extract"); -const {remove} = include("utils.functions.filesystem.files"); +const { CabExtract } = include("utils.functions.filesystem.extract"); +const { remove } = include("utils.functions.filesystem.files"); + +const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.override_dll"); include("engines.wine.plugins.regsvr32"); /** * Verb to install quartz - * - * @returns {Wine} Wine object */ -Wine.prototype.quartz = function () { - var setupFile = new Resource() - .wizard(this.wizard()) - .url("https://download.microsoft.com/download/E/E/1/EE17FF74-6C45-4575-9CF4-7FC2597ACD18/directx_feb2010_redist.exe") - .checksum("a97c820915dc20929e84b49646ec275760012a42") - .name("directx_feb2010_redist.exe") - .get(); - - new CabExtract() - .archive(setupFile) - .wizard(this.wizard()) - .to(this.prefixDirectory() + "/TMP/") - .extract(["-L", "-F", "dxnt.cab"]); - - new CabExtract() - .archive(this.prefixDirectory() + "/TMP/dxnt.cab") - .wizard(this.wizard()) - .to(this.system32directory()) - .extract(["-L", "-F", "quartz.dll"]); - - remove(this.prefixDirectory() + "/TMP/"); - - this.regsvr32().install("quartz.dll"); - - this.overrideDLL() - .set("native, builtin", ["quartz"]) - .do() - - return this; -} +class Quartz { + constructor(wine) { + this.wine = wine; + } -/** - * Verb to install quartz - */ -// eslint-disable-next-line no-unused-vars -module.default = class QuartzVerb { - constructor() { - // do nothing + go() { + const wizard = this.wine.wizard(); + const prefixDirectory = this.wine.prefixDirectory(); + const system32directory = this.wine.system32directory(); + + var setupFile = new Resource() + .wizard(wizard) + .url( + "https://download.microsoft.com/download/E/E/1/EE17FF74-6C45-4575-9CF4-7FC2597ACD18/directx_feb2010_redist.exe" + ) + .checksum("a97c820915dc20929e84b49646ec275760012a42") + .name("directx_feb2010_redist.exe") + .get(); + + new CabExtract() + .wizard(wizard) + .archive(setupFile) + .to(`${prefixDirectory}/TMP/`) + .extract(["-L", "-F", "dxnt.cab"]); + + new CabExtract() + .wizard(wizard) + .archive(`${prefixDirectory}/TMP/dxnt.cab`) + .to(system32directory) + .extract(["-L", "-F", "quartz.dll"]); + + remove(`${prefixDirectory}/TMP/`); + + this.wine.regsvr32().install("quartz.dll"); + + this.wine + .overrideDLL() + .set("native, builtin", ["quartz"]) + .do(); } - install(container) { - var wine = new Wine(); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "quartz", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "quartz", java.util.Optional.empty()); wine.wizard(wizard); + wine.quartz(); + wizard.close(); } } + +module.default = Quartz; diff --git a/Engines/Wine/Verbs/sandbox/script.js b/Engines/Wine/Verbs/sandbox/script.js index d5a5decae0..fd889a68d0 100644 --- a/Engines/Wine/Verbs/sandbox/script.js +++ b/Engines/Wine/Verbs/sandbox/script.js @@ -1,39 +1,42 @@ const Wine = include("engines.wine.engine.object"); -const {remove, lns} = include("utils.functions.filesystem.files"); +const { remove, lns } = include("utils.functions.filesystem.files"); + +const propertyReader = Bean("propertyReader"); + +const Optional = Java.type("java.util.Optional"); /** * Verb to install a sandbox - * - * @returns {Wine} Wine object */ -Wine.prototype.sandbox = function () { - var tmp = Bean("propertyReader").getProperty("application.user.tmp"); - var resources = Bean("propertyReader").getProperty("application.user.resources"); +class Sandbox { + constructor(wine) { + this.wine = wine; + } - remove(this.prefixDirectory() + "/dosdevices/z:"); - remove(this.prefixDirectory() + "/dosdevices/y:"); + go() { + const prefixDirectory = this.wine.prefixDirectory(); - lns(tmp, this.prefixDirectory() + "/dosdevices/z:"); - lns(resources, this.prefixDirectory() + "/dosdevices/y:"); + const tmp = propertyReader.getProperty("application.user.tmp"); + const resources = propertyReader.getProperty("application.user.resources"); - return this; -}; + remove(`${prefixDirectory}/dosdevices/z:`); + remove(`${prefixDirectory}/dosdevices/y:`); -/** - * Verb to install a sandbox - */ -// eslint-disable-next-line no-unused-vars -module.default = class SandboxVerb { - constructor() { - // do nothing + lns(tmp, `${prefixDirectory}/dosdevices/z:`); + lns(resources, `${prefixDirectory}/dosdevices/y:`); } - install(container) { - var wine = new Wine(); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "sandbox", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "sandbox", java.util.Optional.empty()); wine.wizard(wizard); - wine.sandbox(); + + new Sandbox(wine).go(); + wizard.close(); } } + +module.default = Sandbox; diff --git a/Engines/Wine/Verbs/secur32/script.js b/Engines/Wine/Verbs/secur32/script.js index 6ec67d39ce..ff48fd0017 100644 --- a/Engines/Wine/Verbs/secur32/script.js +++ b/Engines/Wine/Verbs/secur32/script.js @@ -1,74 +1,97 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); -const {CabExtract} = include("utils.functions.filesystem.extract"); -const {cp, remove} = include("utils.functions.filesystem.files"); +const { CabExtract } = include("utils.functions.filesystem.extract"); +const { cp, remove } = include("utils.functions.filesystem.files"); + +const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.override_dll"); /** * Verb to install secur32 - * - * @returns {Wine} Wine object */ -Wine.prototype.secur32 = function () { - var setupFilex86 = new Resource() - .wizard(this.wizard()) - .url("https://download.microsoft.com/download/0/A/F/0AFB5316-3062-494A-AB78-7FB0D4461357/windows6.1-KB976932-X86.exe") - .checksum("c3516bc5c9e69fee6d9ac4f981f5b95977a8a2fa") - .name("windows6.1-KB976932-X86.exe") - .get(); - - new CabExtract() - .archive(setupFilex86) - .wizard(this.wizard()) - .to(this.prefixDirectory() + "/TMP/") - .extract(["-L", "-F", "x86_microsoft-windows-lsa_31bf3856ad364e35_6.1.7601.17514_none_a851f4adbb0d5141/secur32.dll"]); - - cp(this.prefixDirectory() + "/TMP/" + "x86_microsoft-windows-lsa_31bf3856ad364e35_6.1.7601.17514_none_a851f4adbb0d5141/secur32.dll", this.system32directory()); - - remove(this.prefixDirectory() + "/TMP/"); - - if (this.architecture() == "amd64") { - var setupFilex64 = new Resource() - .wizard(this.wizard()) - .url("https://download.microsoft.com/download/0/A/F/0AFB5316-3062-494A-AB78-7FB0D4461357/windows6.1-KB976932-X64.exe") - .checksum("74865ef2562006e51d7f9333b4a8d45b7a749dab") - .name("windows6.1-KB976932-X64.exe") +class Secur32 { + constructor(wine) { + this.wine = wine; + } + + go() { + const wizard = this.wine.wizard(); + const prefixDirectory = this.wine.prefixDirectory(); + const system32directory = this.wine.system32directory(); + const system64directory = this.wine.system64directory(); + + const setupFilex86 = new Resource() + .wizard(wizard) + .url( + "https://download.microsoft.com/download/0/A/F/0AFB5316-3062-494A-AB78-7FB0D4461357/windows6.1-KB976932-X86.exe" + ) + .checksum("c3516bc5c9e69fee6d9ac4f981f5b95977a8a2fa") + .name("windows6.1-KB976932-X86.exe") .get(); new CabExtract() - .archive(setupFilex64) - .wizard(this.wizard()) - .to(this.prefixDirectory() + "/TMP/") - .extract(["-L", "-F", "amd64_microsoft-windows-lsa_31bf3856ad364e35_6.1.7601.17514_none_04709031736ac277/secur32.dll"]); + .wizard(wizard) + .archive(setupFilex86) + .to(`${prefixDirectory}/TMP/`) + .extract([ + "-L", + "-F", + "x86_microsoft-windows-lsa_31bf3856ad364e35_6.1.7601.17514_none_a851f4adbb0d5141/secur32.dll" + ]); - cp(this.prefixDirectory() + "/TMP/" + "amd64_microsoft-windows-lsa_31bf3856ad364e35_6.1.7601.17514_none_04709031736ac277/secur32.dll", this.system64directory()); + cp( + `${prefixDirectory}/TMP/x86_microsoft-windows-lsa_31bf3856ad364e35_6.1.7601.17514_none_a851f4adbb0d5141/secur32.dll`, + system32directory + ); - remove(this.prefixDirectory() + "/TMP/"); - } + remove(`${prefixDirectory}/TMP/`); - this.overrideDLL() - .set("native, builtin", ["secur32"]) - .do() + if (this.architecture() == "amd64") { + const setupFilex64 = new Resource() + .wizard(wizard) + .url( + "https://download.microsoft.com/download/0/A/F/0AFB5316-3062-494A-AB78-7FB0D4461357/windows6.1-KB976932-X64.exe" + ) + .checksum("74865ef2562006e51d7f9333b4a8d45b7a749dab") + .name("windows6.1-KB976932-X64.exe") + .get(); - return this; -} + new CabExtract() + .wizard(wizard) + .archive(setupFilex64) + .to(`${prefixDirectory}/TMP/`) + .extract([ + "-L", + "-F", + "amd64_microsoft-windows-lsa_31bf3856ad364e35_6.1.7601.17514_none_04709031736ac277/secur32.dll" + ]); -/** - * Verb to install secur32 - */ -// eslint-disable-next-line no-unused-vars -module.default = class Secur32Verb { - constructor() { - // do nothing + cp( + `${prefixDirectory}/TMP/amd64_microsoft-windows-lsa_31bf3856ad364e35_6.1.7601.17514_none_04709031736ac277/secur32.dll`, + system64directory + ); + + remove(`${prefixDirectory}/TMP/`); + } + + this.wine + .overrideDLL() + .set("native, builtin", ["secur32"]) + .do(); } - install(container) { - var wine = new Wine(); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "secur32", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "secur32", java.util.Optional.empty()); wine.wizard(wizard); - wine.secur32(); + + new Secur32(wine).go(); + wizard.close(); } } + +module.default = Secur32; diff --git a/Engines/Wine/Verbs/vcrun2003/script.js b/Engines/Wine/Verbs/vcrun2003/script.js index a1b75af41d..64954b1345 100644 --- a/Engines/Wine/Verbs/vcrun2003/script.js +++ b/Engines/Wine/Verbs/vcrun2003/script.js @@ -2,7 +2,7 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); const { cp } = include("utils.functions.filesystem.files"); -include("engines.wine.verbs.luna"); +const Luna = include("engines.wine.verbs.luna"); /** * Verb to install vcrun2003 diff --git a/Engines/Wine/Verbs/vcrun2005/script.js b/Engines/Wine/Verbs/vcrun2005/script.js index 12c8982243..191031e5ea 100644 --- a/Engines/Wine/Verbs/vcrun2005/script.js +++ b/Engines/Wine/Verbs/vcrun2005/script.js @@ -1,7 +1,7 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); -include("engines.wine.verbs.luna"); +const Luna = include("engines.wine.verbs.luna"); include("engines.wine.plugins.override_dll"); /** diff --git a/Engines/Wine/Verbs/vcrun2008/script.js b/Engines/Wine/Verbs/vcrun2008/script.js index d51d96f26f..b6f7edf4f2 100644 --- a/Engines/Wine/Verbs/vcrun2008/script.js +++ b/Engines/Wine/Verbs/vcrun2008/script.js @@ -1,7 +1,7 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); -include("engines.wine.verbs.luna"); +const Luna = include("engines.wine.verbs.luna"); include("engines.wine.plugins.override_dll"); /** diff --git a/Engines/Wine/Verbs/vcrun2010/script.js b/Engines/Wine/Verbs/vcrun2010/script.js index 0f2bbe649d..d585c66d63 100644 --- a/Engines/Wine/Verbs/vcrun2010/script.js +++ b/Engines/Wine/Verbs/vcrun2010/script.js @@ -1,7 +1,7 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); -include("engines.wine.verbs.luna"); +const Luna = include("engines.wine.verbs.luna"); include("engines.wine.plugins.override_dll"); /** diff --git a/Engines/Wine/Verbs/vcrun2012/script.js b/Engines/Wine/Verbs/vcrun2012/script.js index 8c5f990d09..731a455a44 100644 --- a/Engines/Wine/Verbs/vcrun2012/script.js +++ b/Engines/Wine/Verbs/vcrun2012/script.js @@ -1,7 +1,7 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); -include("engines.wine.verbs.luna"); +const Luna = include("engines.wine.verbs.luna"); include("engines.wine.plugins.override_dll"); /** diff --git a/Engines/Wine/Verbs/vcrun2013/script.js b/Engines/Wine/Verbs/vcrun2013/script.js index 7822e75c71..91341ecbc4 100644 --- a/Engines/Wine/Verbs/vcrun2013/script.js +++ b/Engines/Wine/Verbs/vcrun2013/script.js @@ -1,7 +1,7 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); -include("engines.wine.verbs.luna"); +const Luna = include("engines.wine.verbs.luna"); include("engines.wine.plugins.override_dll"); /** diff --git a/Engines/Wine/Verbs/vcrun2015/script.js b/Engines/Wine/Verbs/vcrun2015/script.js index 3af7edef3a..997a93f14e 100644 --- a/Engines/Wine/Verbs/vcrun2015/script.js +++ b/Engines/Wine/Verbs/vcrun2015/script.js @@ -1,7 +1,7 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); -include("engines.wine.verbs.luna"); +const Luna = include("engines.wine.verbs.luna"); include("engines.wine.plugins.override_dll"); /** diff --git a/Engines/Wine/Verbs/vcrun2017/script.js b/Engines/Wine/Verbs/vcrun2017/script.js index 924cc63395..7712a45f25 100644 --- a/Engines/Wine/Verbs/vcrun2017/script.js +++ b/Engines/Wine/Verbs/vcrun2017/script.js @@ -1,7 +1,7 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); -include("engines.wine.verbs.luna"); +const Luna = include("engines.wine.verbs.luna"); include("engines.wine.plugins.override_dll"); /** diff --git a/Engines/Wine/Verbs/vcrun6sp6/script.js b/Engines/Wine/Verbs/vcrun6sp6/script.js index 8fa265598d..e596be256f 100644 --- a/Engines/Wine/Verbs/vcrun6sp6/script.js +++ b/Engines/Wine/Verbs/vcrun6sp6/script.js @@ -3,7 +3,7 @@ const Resource = include("utils.functions.net.resource"); const {CabExtract} = include("utils.functions.filesystem.extract"); const {remove} = include("utils.functions.filesystem.files"); -include("engines.wine.verbs.luna"); +const Luna = include("engines.wine.verbs.luna"); /** * Verb to install vcrun6sp6 From 7d7e47a93b9cbfe4e22032a4a13950f8ad78ddbe Mon Sep 17 00:00:00 2001 From: Marc Arndt Date: Sun, 1 Sep 2019 15:18:22 +0200 Subject: [PATCH 3/8] - change the remaining verbs --- .../Games/Blizzard app/Online/script.js | 7 +- .../Games/DC Universe Online/Online/script.js | 7 +- .../Online/script.js | 8 +- .../Games/Elite:Dangerous/Steam/script.js | 4 +- .../Games/GOG Galaxy/Online/script.js | 16 +- .../Games/Hearthstone/Online/script.js | 8 +- .../Heroes of the Storm/Online/script.js | 11 +- Applications/Games/Overwatch/Online/script.js | 16 +- .../Games/Quantum Conundrum/Steam/script.js | 7 +- Applications/Games/RimWorld/Local/script.js | 7 +- Applications/Games/RimWorld/Steam/script.js | 7 +- .../Games/Space Colony/Steam/script.js | 8 +- .../Games/Space Engineers/Steam/script.js | 4 +- .../Games/Sprouts Adventure/Local/script.js | 7 +- .../Games/Star Craft II/Online/script.js | 9 +- .../Subnautica Below Zero/Steam/script.js | 10 +- Applications/Games/Subnautica/Steam/script.js | 12 +- Applications/Games/The Sims 3/Local/script.js | 4 +- Applications/Games/The Sims 3/Steam/script.js | 4 +- .../Games/Total War Rome II/Steam/script.js | 17 +- .../Online/script.js | 11 +- .../Steam/script.js | 12 +- .../Office/ElsterFormular/Online/script.js | 7 +- Engines/Wine/Verbs/VK9/script.js | 151 ++++--- Engines/Wine/Verbs/Windows XP SP 3/script.js | 80 ++-- Engines/Wine/Verbs/crypt32/script.js | 6 +- Engines/Wine/Verbs/vcrun2003/script.js | 57 ++- Engines/Wine/Verbs/vcrun2005/script.js | 67 ++- Engines/Wine/Verbs/vcrun2008/script.js | 89 ++-- Engines/Wine/Verbs/vcrun2010/script.js | 88 ++-- Engines/Wine/Verbs/vcrun2012/script.js | 90 ++-- Engines/Wine/Verbs/vcrun2013/script.js | 80 ++-- Engines/Wine/Verbs/vcrun2015/script.js | 78 +++- Engines/Wine/Verbs/vcrun2017/script.js | 117 ++--- Engines/Wine/Verbs/vcrun6sp6/script.js | 83 ++-- Engines/Wine/Verbs/vulkanSDK/script.js | 118 ++--- Engines/Wine/Verbs/xact/script.js | 420 ++++++++++-------- 37 files changed, 947 insertions(+), 780 deletions(-) diff --git a/Applications/Games/Blizzard app/Online/script.js b/Applications/Games/Blizzard app/Online/script.js index c7ff218387..22052bf26c 100644 --- a/Applications/Games/Blizzard app/Online/script.js +++ b/Applications/Games/Blizzard app/Online/script.js @@ -1,5 +1,6 @@ const OnlineInstallerScript = include("engines.wine.quick_script.online_installer_script"); -include("engines.wine.verbs.vcrun2015"); + +const Vcrun2015 = include("engines.wine.verbs.vcrun2015"); const Corefonts = include("engines.wine.verbs.corefonts"); new OnlineInstallerScript() @@ -14,7 +15,7 @@ new OnlineInstallerScript() .executable("Battle.net.exe") .wineVersion("3.19") .wineDistribution("staging") - .preInstall(function (wine /*, wizard*/) { - wine.vcrun2015(); + .preInstall(function(wine /*, wizard*/) { + new Vcrun2015(wine).go(); new Corefonts(wine).go(); }); diff --git a/Applications/Games/DC Universe Online/Online/script.js b/Applications/Games/DC Universe Online/Online/script.js index 23b93efd55..610b9fc639 100644 --- a/Applications/Games/DC Universe Online/Online/script.js +++ b/Applications/Games/DC Universe Online/Online/script.js @@ -1,5 +1,6 @@ const OnlineInstallerScript = include("engines.wine.quick_script.online_installer_script"); -include("engines.wine.verbs.vcrun2012"); + +const Vcrun2012 = include("engines.wine.verbs.vcrun2012"); const D3DX9 = include("engines.wine.verbs.d3dx9"); new OnlineInstallerScript() @@ -10,7 +11,7 @@ new OnlineInstallerScript() .url("https://launch.daybreakgames.com/installer/DCUO_setup.exe") .category("Games") .executable("LaunchPad.exe") - .preInstall(function (wine /*, wizard*/) { - wine.vcrun2012(); + .preInstall(function(wine /*, wizard*/) { + new Vcrun2012(wine).go(); new D3DX9(wine).go(); }); diff --git a/Applications/Games/Earth Eternal - Valkal's Shadow/Online/script.js b/Applications/Games/Earth Eternal - Valkal's Shadow/Online/script.js index 633b0e3307..f61acb9460 100644 --- a/Applications/Games/Earth Eternal - Valkal's Shadow/Online/script.js +++ b/Applications/Games/Earth Eternal - Valkal's Shadow/Online/script.js @@ -1,10 +1,10 @@ const OnlineInstallerScript = include("engines.wine.quick_script.online_installer_script"); -const {LATEST_STAGING_VERSION} = include("engines.wine.engine.versions"); +const { LATEST_STAGING_VERSION } = include("engines.wine.engine.versions"); include("engines.wine.plugins.windows_version"); const Corefonts = include("engines.wine.verbs.corefonts"); const D3DX9 = include("engines.wine.verbs.d3dx9"); -include("engines.wine.verbs.vcrun2008"); +const Vcrun2008 = include("engines.wine.verbs.vcrun2008"); new OnlineInstallerScript() .name("Earth Eternal - Valkal's Shadow") @@ -17,9 +17,9 @@ new OnlineInstallerScript() .executable("Spark.exe", ["http://live.theanubianwar.com/Release/Current/EarthEternal.car"]) .wineVersion(LATEST_STAGING_VERSION) .wineDistribution("staging") - .preInstall(function (wine /*, wizard*/) { + .preInstall(function(wine /*, wizard*/) { wine.windowsVersion("winxp"); new Corefonts(wine).go(); new D3DX9(wine).go(); - wine.vcrun2008(); + new Vcrun2008(wine).go(); }); diff --git a/Applications/Games/Elite:Dangerous/Steam/script.js b/Applications/Games/Elite:Dangerous/Steam/script.js index af2e8f62d2..a523d49dcf 100644 --- a/Applications/Games/Elite:Dangerous/Steam/script.js +++ b/Applications/Games/Elite:Dangerous/Steam/script.js @@ -2,7 +2,7 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); const Corefonts = include("engines.wine.verbs.corefonts"); const DotNET45 = include("engines.wine.verbs.dotnet45"); -include("engines.wine.verbs.vcrun2015"); +const Vcrun2015 = include("engines.wine.verbs.vcrun2015"); const DXVK = include("engines.wine.verbs.dxvk"); new SteamScript() @@ -13,7 +13,7 @@ new SteamScript() .preInstall(function(wine /*, wizard*/) { new DotNET45(wine).go(); new Corefonts(wine).go(); - wine.vcrun2015(); + new Vcrun2015(wine).go(); new DXVK(wine).go(); }) .appId(359320); diff --git a/Applications/Games/GOG Galaxy/Online/script.js b/Applications/Games/GOG Galaxy/Online/script.js index 029ba0d2e6..48bf8171e0 100644 --- a/Applications/Games/GOG Galaxy/Online/script.js +++ b/Applications/Games/GOG Galaxy/Online/script.js @@ -1,10 +1,10 @@ const OnlineInstallerScript = include("engines.wine.quick_script.online_installer_script"); -const {LATEST_STAGING_VERSION} = include("engines.wine.engine.versions"); -const {remove, lns} = include("utils.functions.filesystem.files"); +const { LATEST_STAGING_VERSION } = include("engines.wine.engine.versions"); +const { remove, lns } = include("utils.functions.filesystem.files"); const Corefonts = include("engines.wine.verbs.corefonts"); -include("engines.wine.verbs.vcrun2017"); -include("engines.wine.verbs.xact"); +const Vcrun2017 = include("engines.wine.verbs.vcrun2017"); +const Xact = include("engines.wine.verbs.xact"); new OnlineInstallerScript() .name("GOG Galaxy") @@ -18,10 +18,12 @@ new OnlineInstallerScript() .wineArchitecture("amd64") .wineVersion(LATEST_STAGING_VERSION) .wineDistribution("staging") - .preInstall(function (wine /*, wizard*/) { + .preInstall(function(wine /*, wizard*/) { new Corefonts(wine).go(); - wine.vcrun2017(); // Probably needed for self-updater - wine.xact(); // Required by a couple of games + // Probably needed for self-updater + new Vcrun2017(wine).go(); + // Required by a couple of games + new Xact(wine).go(); // GOG Galaxy doesn't properly install without a symlink between // drive_c/ProgramData and drive_c/users/Public diff --git a/Applications/Games/Hearthstone/Online/script.js b/Applications/Games/Hearthstone/Online/script.js index 6095f71396..568212bd8f 100644 --- a/Applications/Games/Hearthstone/Online/script.js +++ b/Applications/Games/Hearthstone/Online/script.js @@ -1,7 +1,7 @@ const OnlineInstallerScript = include("engines.wine.quick_script.online_installer_script"); -const {LATEST_STAGING_VERSION} = include("engines.wine.engine.versions"); +const { LATEST_STAGING_VERSION } = include("engines.wine.engine.versions"); -include("engines.wine.verbs.vcrun2015"); +const Vcrun2015 = include("engines.wine.verbs.vcrun2015"); const Corefonts = include("engines.wine.verbs.corefonts"); new OnlineInstallerScript() @@ -14,7 +14,7 @@ new OnlineInstallerScript() .executable("Battle.net.exe") .wineVersion(LATEST_STAGING_VERSION) .wineDistribution("staging") - .preInstall(function (wine /*, wizard*/) { - wine.vcrun2015(); + .preInstall(function(wine /*, wizard*/) { + new Vcrun2015(wine).go(); new Corefonts(wine).go(); }); diff --git a/Applications/Games/Heroes of the Storm/Online/script.js b/Applications/Games/Heroes of the Storm/Online/script.js index 03a3303ee6..459849b78f 100644 --- a/Applications/Games/Heroes of the Storm/Online/script.js +++ b/Applications/Games/Heroes of the Storm/Online/script.js @@ -1,8 +1,8 @@ const OnlineInstallerScript = include("engines.wine.quick_script.online_installer_script"); -const {LATEST_STAGING_VERSION} = include("engines.wine.engine.versions"); +const { LATEST_STAGING_VERSION } = include("engines.wine.engine.versions"); include("engines.wine.plugins.windows_version"); -include("engines.wine.verbs.vcrun2015"); +const Vcrun2015 = include("engines.wine.verbs.vcrun2015"); const Corefonts = include("engines.wine.verbs.corefonts"); new OnlineInstallerScript() @@ -13,11 +13,12 @@ new OnlineInstallerScript() .url("https://eu.battle.net/download/getInstaller?os=win&installer=Heroes-of-the-Storm-Setup.exe") .category("Games") .executable("Heroes of the Storm.exe") -//The checksum is different each time you download + //The checksum is different each time you download .wineVersion(LATEST_STAGING_VERSION) .wineDistribution("staging") - .preInstall(function (wine /*, wizard*/) { + .preInstall(function(wine /*, wizard*/) { wine.windowsVersion("winxp"); - wine.vcrun2015(); + + new Vcrun2015(wine).go(); new Corefonts(wine).go(); }); diff --git a/Applications/Games/Overwatch/Online/script.js b/Applications/Games/Overwatch/Online/script.js index b37224bc2c..50f6c5da25 100644 --- a/Applications/Games/Overwatch/Online/script.js +++ b/Applications/Games/Overwatch/Online/script.js @@ -1,9 +1,9 @@ const OnlineInstallerScript = include("engines.wine.quick_script.online_installer_script"); -const {LATEST_STAGING_VERSION} = include("engines.wine.engine.versions"); +const { LATEST_STAGING_VERSION } = include("engines.wine.engine.versions"); include("engines.wine.plugins.windows_version"); include("engines.wine.plugins.override_dll"); -include("engines.wine.verbs.vcrun2015"); +const Vcrun2015 = include("engines.wine.verbs.vcrun2015"); const Corefonts = include("engines.wine.verbs.corefonts"); const DXVK = include("engines.wine.verbs.dxvk"); @@ -13,19 +13,21 @@ new OnlineInstallerScript() .applicationHomepage("http://www.playoverwatch.com/") .author("ImperatorS79, kreyren") .url("https://eu.battle.net/download/getInstaller?os=win&installer=Overwatch-Setup.exe") -//The checksum is different each time you download + //The checksum is different each time you download .wineVersion(LATEST_STAGING_VERSION) .wineDistribution("staging") .wineArchitecture("amd64") .category("Games") .executable("Battle.net.exe") - .preInstall(function (wine /*, wizard*/) { + .preInstall(function(wine /*, wizard*/) { wine.windowsVersion("win7"); - wine.vcrun2015(); + + new Vcrun2015(wine).go(); new Corefonts(wine).go(); - wine - .overrideDLL() + + wine.overrideDLL() .set("disabled", ["nvapi", "nvapi64"]) .do(); + new DXVK(wine).go(); }); diff --git a/Applications/Games/Quantum Conundrum/Steam/script.js b/Applications/Games/Quantum Conundrum/Steam/script.js index 089952c418..66f6f66eb4 100644 --- a/Applications/Games/Quantum Conundrum/Steam/script.js +++ b/Applications/Games/Quantum Conundrum/Steam/script.js @@ -1,11 +1,12 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); -include("engines.wine.verbs.vcrun2008"); + +const Vcrun2008 = include("engines.wine.verbs.vcrun2008"); new SteamScript() .name("Quantum Conundrum") .editor("Square Enix") .author("Plata") .appId(200010) - .preInstall(function (wine /*, wizard*/) { - wine.vcrun2008(); + .preInstall(function(wine /*, wizard*/) { + new Vcrun2008(wine).go(); }); diff --git a/Applications/Games/RimWorld/Local/script.js b/Applications/Games/RimWorld/Local/script.js index 179dab6431..6e73ad2006 100644 --- a/Applications/Games/RimWorld/Local/script.js +++ b/Applications/Games/RimWorld/Local/script.js @@ -1,5 +1,6 @@ const LocalInstallerScript = include("engines.wine.quick_script.local_installer_script"); -include("engines.wine.verbs.vcrun2017"); + +const Vcrun2017 = include("engines.wine.verbs.vcrun2017"); const D3DX9 = include("engines.wine.verbs.d3dx9"); const Corefonts = include("engines.wine.verbs.corefonts"); @@ -10,8 +11,8 @@ new LocalInstallerScript() .applicationHomepage("https://rimworldgame.com/") .wineArchitecture("amd64") .executable("RimWorld.exe") - .preInstall(function (wine) { - wine.vcrun2017(); + .preInstall(function(wine) { + new Vcrun2017(wine).go(); new D3DX9(wine).go(); new Corefonts(wine).go(); }); diff --git a/Applications/Games/RimWorld/Steam/script.js b/Applications/Games/RimWorld/Steam/script.js index dc5abc0bc8..8f19509285 100644 --- a/Applications/Games/RimWorld/Steam/script.js +++ b/Applications/Games/RimWorld/Steam/script.js @@ -1,5 +1,6 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); -include("engines.wine.verbs.vcrun2017"); + +const Vcrun2017 = include("engines.wine.verbs.vcrun2017"); const D3DX9 = include("engines.wine.verbs.d3dx9"); const Corefonts = include("engines.wine.verbs.corefonts"); @@ -10,8 +11,8 @@ new SteamScript() .applicationHomepage("https://rimworldgame.com/") .wineArchitecture("amd64") .appId(294100) - .preInstall(function (wine) { + .preInstall(function(wine) { new Corefonts(wine).go(); - wine.vcrun2017(); + new Vcrun2017(wine).go(); new D3DX9(wine).go(); }); diff --git a/Applications/Games/Space Colony/Steam/script.js b/Applications/Games/Space Colony/Steam/script.js index 0cc34c3e53..21db03f77b 100644 --- a/Applications/Games/Space Colony/Steam/script.js +++ b/Applications/Games/Space Colony/Steam/script.js @@ -1,7 +1,7 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); -const {LATEST_DEVELOPMENT_VERSION} = include("engines.wine.engine.versions"); +const { LATEST_DEVELOPMENT_VERSION } = include("engines.wine.engine.versions"); -include("engines.wine.verbs.vcrun2010"); +const Vcrun2010 = include("engines.wine.verbs.vcrun2010"); const DotNET40 = include("engines.wine.verbs.dotnet40"); const D3DX9 = include("engines.wine.verbs.d3dx9"); @@ -12,8 +12,8 @@ new SteamScript() .wineDistribution("upstream") .wineVersion(LATEST_DEVELOPMENT_VERSION) .appId(297920) - .preInstall(function (wine) { - wine.vcrun2010(); + .preInstall(function(wine) { + new Vcrun2010(wine).go(); new DotNET40(wine).go(); new D3DX9(wine).go(); }); diff --git a/Applications/Games/Space Engineers/Steam/script.js b/Applications/Games/Space Engineers/Steam/script.js index 6c4c9b5550..c39aa016ef 100644 --- a/Applications/Games/Space Engineers/Steam/script.js +++ b/Applications/Games/Space Engineers/Steam/script.js @@ -1,7 +1,7 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); const DotNET472 = include("engines.wine.verbs.dotnet472"); -include("engines.wine.verbs.vcrun2017"); +const Vcrun2017 = include("engines.wine.verbs.vcrun2017"); const DXVK = include("engines.wine.verbs.dxvk"); const FAudio = include("engines.wine.verbs.faudio"); include("engines.wine.plugins.override_dll"); @@ -16,7 +16,7 @@ new SteamScript() .wineArchitecture("amd64") .preInstall(function(wine, wizard) { new DotNET472(wine).go(); - wine.vcrun2017(); + new Vcrun2017(wine).go(); new DXVK(wine).go(); new FAudio(wine).go(); wine.overrideDLL() diff --git a/Applications/Games/Sprouts Adventure/Local/script.js b/Applications/Games/Sprouts Adventure/Local/script.js index 84255cbe93..530b7f850a 100644 --- a/Applications/Games/Sprouts Adventure/Local/script.js +++ b/Applications/Games/Sprouts Adventure/Local/script.js @@ -1,5 +1,5 @@ const LocalInstallerScript = include("engines.wine.quick_script.local_installer_script"); -include("engines.wine.verbs.vcrun2005"); +const Vcrun2005 = include("engines.wine.verbs.vcrun2005"); new LocalInstallerScript() .name("Sprouts Adventure") @@ -8,9 +8,10 @@ new LocalInstallerScript() .author("Zemogiter") .category("Games") .executable("Sprouts Adventure.CRC") - .preInstall(function (wine, wizard) { + .preInstall(function(wine, wizard) { wizard.message( tr("This game requires winebind (for Ubuntu) or samba and libwbclient/lib32-libwbclient (for Arch Linux).") ); - wine.vcrun2005(); + + new Vcrun2005(wine).go(); }); diff --git a/Applications/Games/Star Craft II/Online/script.js b/Applications/Games/Star Craft II/Online/script.js index 3b61901b88..e7ede4bead 100644 --- a/Applications/Games/Star Craft II/Online/script.js +++ b/Applications/Games/Star Craft II/Online/script.js @@ -1,5 +1,6 @@ const OnlineInstallerScript = include("engines.wine.quick_script.online_installer_script"); -include("engines.wine.verbs.vcrun2015"); + +const Vcrun2015 = include("engines.wine.verbs.vcrun2015"); const Corefonts = include("engines.wine.verbs.corefonts"); new OnlineInstallerScript() @@ -8,10 +9,10 @@ new OnlineInstallerScript() .applicationHomepage("http://eu.battle.net/sc2/") .author("ImperatorS79") .url("https://eu.battle.net/download/getInstaller?os=win&installer=StarCraft-II-Setup.exe") -// The checksum changes each time you download + // The checksum changes each time you download .category("Games") .executable("Battle.net.exe") - .preInstall(function (wine /*, wizard*/) { - wine.vcrun2015(); + .preInstall(function(wine /*, wizard*/) { + new Vcrun2015(wine).go(); new Corefonts(wine).go(); }); diff --git a/Applications/Games/Subnautica Below Zero/Steam/script.js b/Applications/Games/Subnautica Below Zero/Steam/script.js index 4a8fbd415e..d275411ef2 100644 --- a/Applications/Games/Subnautica Below Zero/Steam/script.js +++ b/Applications/Games/Subnautica Below Zero/Steam/script.js @@ -1,8 +1,8 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); -const {LATEST_STABLE_VERSION} = include("engines.wine.engine.versions"); +const { LATEST_STABLE_VERSION } = include("engines.wine.engine.versions"); include("engines.wine.plugins.virtual_desktop"); -include("engines.wine.verbs.vcrun2013"); +const Vcrun2013 = include("engines.wine.verbs.vcrun2013"); const Corefonts = include("engines.wine.verbs.corefonts"); const DXVK = include("engines.wine.verbs.dxvk"); @@ -15,13 +15,15 @@ new SteamScript() .wineVersion(LATEST_STABLE_VERSION) .wineArchitecture("amd64") .appId(848450) - .preInstall(function (wine, wizard) { + .preInstall(function(wine, wizard) { wizard.message( tr("You can make the game smoother by using this: https://github.com/lutris/lutris/wiki/How-to:-Esync") ); - wine.vcrun2013(); + + new Vcrun2013(wine).go(); new Corefonts(wine).go(); new DXVK(wine).go(); + wine.setVirtualDesktop(); }) .gameOverlay(false); diff --git a/Applications/Games/Subnautica/Steam/script.js b/Applications/Games/Subnautica/Steam/script.js index e59dd6d4ee..83d1955652 100644 --- a/Applications/Games/Subnautica/Steam/script.js +++ b/Applications/Games/Subnautica/Steam/script.js @@ -1,8 +1,8 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); -const {LATEST_STABLE_VERSION} = include("engines.wine.engine.versions"); +const { LATEST_STABLE_VERSION } = include("engines.wine.engine.versions"); include("engines.wine.plugins.virtual_desktop"); -include("engines.wine.verbs.vcrun2013"); +const Vcrun2013 = include("engines.wine.verbs.vcrun2013"); const Corefonts = include("engines.wine.verbs.corefonts"); const DXVK = include("engines.wine.verbs.dxvk"); @@ -15,16 +15,18 @@ new SteamScript() .wineVersion(LATEST_STABLE_VERSION) .wineArchitecture("amd64") .appId(264710) - .preInstall(function (wine, wizard) { + .preInstall(function(wine, wizard) { wizard.message( tr("You can make the game smoother by using this: https://github.com/lutris/lutris/wiki/How-to:-Esync") ); - wine.vcrun2013(); + + new Vcrun2013(wine).go(); new Corefonts(wine).go(); new DXVK(wine).go(); + wine.setVirtualDesktop(); }) - .postInstall(function (wine, wizard) { + .postInstall(function(wine, wizard) { wizard.message( tr( "Due to a potential confilct with Vulkan, shader mods break the game (the executable file works but no window is displayed)." diff --git a/Applications/Games/The Sims 3/Local/script.js b/Applications/Games/The Sims 3/Local/script.js index 26f5ba3c37..3ffec105ab 100644 --- a/Applications/Games/The Sims 3/Local/script.js +++ b/Applications/Games/The Sims 3/Local/script.js @@ -1,6 +1,6 @@ const LocalInstallerScript = include("engines.wine.quick_script.local_installer_script"); -include("engines.wine.verbs.vcrun2010"); +const Vcrun2010 = include("engines.wine.verbs.vcrun2010"); const Tahoma = include("engines.wine.verbs.tahoma"); const Mfc42 = include("engines.wine.verbs.mfc42"); const DotNET20 = include("engines.wine.verbs.dotnet20"); @@ -15,6 +15,6 @@ new LocalInstallerScript() .preInstall(function(wine) { new Mfc42(wine).go(); new Tahoma(wine).go(); - wine.vcrun2010(); + new Vcrun2010(wine).go(); new DotNET20(wine).go(); }); diff --git a/Applications/Games/The Sims 3/Steam/script.js b/Applications/Games/The Sims 3/Steam/script.js index 3403a39008..c10f1566aa 100644 --- a/Applications/Games/The Sims 3/Steam/script.js +++ b/Applications/Games/The Sims 3/Steam/script.js @@ -1,7 +1,7 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); const DotNET20 = include("engines.wine.verbs.dotnet20"); -include("engines.wine.verbs.vcrun2010"); +const Vcrun2010 = include("engines.wine.verbs.vcrun2010"); const Tahoma = include("engines.wine.verbs.tahoma"); const Mfc42 = include("engines.wine.verbs.mfc42"); @@ -17,7 +17,7 @@ new SteamScript() new DotNET20(wine).go(); new Mfc42(wine).go(); new Tahoma(wine).go(); - wine.vcrun2010(); + new Vcrun2010(wine).go(); }) .gameOverlay(false) .executable("Steam.exe", ["-silent", "-applaunch", 47890, "-no-ces-sandbox", "xgamma -gamma 1"]); diff --git a/Applications/Games/Total War Rome II/Steam/script.js b/Applications/Games/Total War Rome II/Steam/script.js index f133532191..ec957cbea2 100644 --- a/Applications/Games/Total War Rome II/Steam/script.js +++ b/Applications/Games/Total War Rome II/Steam/script.js @@ -1,10 +1,10 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); -const {LATEST_STAGING_VERSION} = include("engines.wine.engine.versions"); +const { LATEST_STAGING_VERSION } = include("engines.wine.engine.versions"); const D3DX9 = include("engines.wine.verbs.d3dx9"); -include("engines.wine.verbs.vcrun2005"); -include("engines.wine.verbs.vcrun2008"); -include("engines.wine.verbs.vcrun2010"); +const Vcrun2005 = include("engines.wine.verbs.vcrun2005"); +const Vcrun2008 = include("engines.wine.verbs.vcrun2008"); +const Vcrun2010 = include("engines.wine.verbs.vcrun2010"); new SteamScript() .name("Total War: ROME II") @@ -13,11 +13,12 @@ new SteamScript() .appId(214950) .wineVersion(LATEST_STAGING_VERSION) .wineDistribution("staging") - .postInstall(function (wine, wizard) { + .postInstall(function(wine, wizard) { new D3DX9(wine).go(); - wine.vcrun2005(); - wine.vcrun2008(); - wine.vcrun2010(); + new Vcrun2005(wine).go(); + new Vcrun2008(wine).go(); + new Vcrun2010(wine).go(); + wizard.message( tr( "If you are experiencing issues with game (e.g. it crashes at start or rendering is broken), you can try to enable de OpenGL renderer, by modifying :\n\n gfx_device_type to 2\n\n in the {0}/drive_c/users/USERNAME/Application Data/The Creative Assembly/Rome2/scripts/preferences_script.txt", diff --git a/Applications/Games/Warcraft III Expansion Set/Online/script.js b/Applications/Games/Warcraft III Expansion Set/Online/script.js index 813f3cfe32..d9b4ca0f2a 100644 --- a/Applications/Games/Warcraft III Expansion Set/Online/script.js +++ b/Applications/Games/Warcraft III Expansion Set/Online/script.js @@ -1,8 +1,8 @@ const OnlineInstallerScript = include("engines.wine.quick_script.online_installer_script"); -const {LATEST_STAGING_VERSION} = include("engines.wine.engine.versions"); +const { LATEST_STAGING_VERSION } = include("engines.wine.engine.versions"); include("engines.wine.plugins.windows_version"); -include("engines.wine.verbs.vcrun2015"); +const Vcrun2015 = include("engines.wine.verbs.vcrun2015"); const Corefonts = include("engines.wine.verbs.corefonts"); new OnlineInstallerScript() @@ -11,13 +11,14 @@ new OnlineInstallerScript() .applicationHomepage("http://www.blizzard.com/en-gb/games/war3/") .author("Grimler91") .url("https://www.battle.net/download/getInstaller?os=win&installer=Warcraft-III-Setup.exe") -// The checksum changes each time you download + // The checksum changes each time you download .category("Games") .executable("Warcraft III.exe") .wineVersion(LATEST_STAGING_VERSION) .wineDistribution("staging") - .preInstall(function (wine /*, wizard*/) { + .preInstall(function(wine /*, wizard*/) { wine.windowsVersion("winxp"); + new Corefonts(wine).go(); - wine.vcrun2015(); + new Vcrun2015(wine).go(); }); diff --git a/Applications/Games/Warlock - Master of the Arcane/Steam/script.js b/Applications/Games/Warlock - Master of the Arcane/Steam/script.js index 355d059e7a..6e15c329aa 100644 --- a/Applications/Games/Warlock - Master of the Arcane/Steam/script.js +++ b/Applications/Games/Warlock - Master of the Arcane/Steam/script.js @@ -1,11 +1,11 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); -const {LATEST_STAGING_VERSION} = include("engines.wine.engine.versions"); +const { LATEST_STAGING_VERSION } = include("engines.wine.engine.versions"); const Corefonts = include("engines.wine.verbs.corefonts"); const D3DX9 = include("engines.wine.verbs.d3dx9"); const Tahoma = include("engines.wine.verbs.tahoma"); -include("engines.wine.verbs.vcrun2005"); -include("engines.wine.verbs.vcrun2008"); +const Vcrun2005 = include("engines.wine.verbs.vcrun2005"); +const Vcrun2008 = include("engines.wine.verbs.vcrun2008"); new SteamScript() .name("Warlock - Master of the Arcane") @@ -14,10 +14,10 @@ new SteamScript() .appId(203630) .wineVersion(LATEST_STAGING_VERSION) .wineDistribution("staging") - .preInstall(function (wine /*, wizard*/) { + .preInstall(function(wine /*, wizard*/) { new Corefonts(wine).go(); new D3DX9(wine).go(); new Tahoma(wine).go(); - wine.vcrun2005(); - wine.vcrun2008(); + new Vcrun2005(wine).go(); + new Vcrun2008(wine).go(); }); diff --git a/Applications/Office/ElsterFormular/Online/script.js b/Applications/Office/ElsterFormular/Online/script.js index 800bad768e..24d8b81988 100644 --- a/Applications/Office/ElsterFormular/Online/script.js +++ b/Applications/Office/ElsterFormular/Online/script.js @@ -1,7 +1,7 @@ const LocalInstallerScript = include("engines.wine.quick_script.local_installer_script"); include("engines.wine.plugins.native_application"); -include("engines.wine.verbs.vcrun2017"); +const Vcrun2017 = include("engines.wine.verbs.vcrun2017"); new LocalInstallerScript() .name("ElsterFormular") @@ -13,7 +13,8 @@ new LocalInstallerScript() .author("Plata") .category("Office") .executable("pica.exe") - .preInstall(function (wine /*, wizard*/) { - wine.vcrun2017(); + .preInstall(function(wine /*, wizard*/) { + new Vcrun2017(wine).go(); + wine.nativeApplication("pdf"); }); diff --git a/Engines/Wine/Verbs/VK9/script.js b/Engines/Wine/Verbs/VK9/script.js index b5075ec1e0..0712d79130 100644 --- a/Engines/Wine/Verbs/VK9/script.js +++ b/Engines/Wine/Verbs/VK9/script.js @@ -1,98 +1,123 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); -const {Extractor} = include("utils.functions.filesystem.extract"); -const {cp, remove} = include("utils.functions.filesystem.files"); +const { Extractor } = include("utils.functions.filesystem.extract"); +const { cp, remove } = include("utils.functions.filesystem.files"); + +const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.override_dll"); +const operatingSystemFetcher = Bean("operatingSystemFetcher"); + /** * Verb to install VK9 * see: https://github.com/disks86/VK9 - * - * @param {String} vk9Version VK9 version to install - * @returns {Wine} Wine object */ -Wine.prototype.VK9 = function (vk9Version) { - var operatingSystemFetcher = Bean("operatingSystemFetcher"); - - if (operatingSystemFetcher.fetchCurrentOperationSystem() != "Linux") { - this.wizard().message(tr("VK9 might not work correctly on macOS. This is depending on Metal api support and MoltenVK compatibility layer advancement")); - } else { - this.wizard().message(tr("Please ensure you have the latest drivers (418.30 minimum for NVIDIA and mesa 19 for AMD) or else VK9 might not work correctly.")); +class VK9 { + constructor(wine) { + this.wine = wine; } - print("NOTE: wine version should be greater or equal to 3.5"); - print("NOTE: works from 0.28.0"); + /** + * Sets the VK9 version to install + * + * @param {string} vk9Version The VK9 version to install + * @returns {VK9} + */ + withVersion(vk9Version) { + this.vk9Version = vk9Version; - if (typeof vk9Version !== 'string') { - vk9Version = "0.29.0"; + return this; } - var setupFile32 = new Resource() - .wizard(this.wizard()) - .url("https://github.com/disks86/VK9/releases/download/" + vk9Version + "/" + vk9Version + "-bin-x86-Release.zip") - .name(vk9Version + "-bin-x86-Realease.zip") - .get(); - - new Extractor() - .wizard(this.wizard()) - .archive(setupFile32) - .to(this.prefixDirectory() + "/TMP32/") - .extract(); - - cp(this.prefixDirectory() + "/TMP32/" + vk9Version + "-bin-x86-Release/" + "d3d9.dll", this.system32directory()); - - remove(this.prefixDirectory() + "/TMP32/"); - - if (this.architecture() === "amd64") { - var setupFile64 = new Resource() - .wizard(this.wizard()) - .url("https://github.com/disks86/VK9/releases/download/" + vk9Version + "/" + vk9Version + "-bin-x86_64-Release.zip") - .name(vk9Version + "-bin-x86_64-Realease.zip") + go() { + const wizard = this.wine.wizard(); + const prefixDirectory = this.wine.prefixDirectory(); + const system32directory = this.wine.system32directory(); + const system64directory = this.wine.system64directory(); + + if (operatingSystemFetcher.fetchCurrentOperationSystem() != "Linux") { + wizard.message( + tr( + "VK9 might not work correctly on macOS. This is depending on Metal api support and MoltenVK compatibility layer advancement" + ) + ); + } else { + wizard.message( + tr( + "Please ensure you have the latest drivers (418.30 minimum for NVIDIA and mesa 19 for AMD) or else VK9 might not work correctly." + ) + ); + } + + print("NOTE: wine version should be greater or equal to 3.5"); + print("NOTE: works from 0.28.0"); + + if (typeof this.vk9Version !== "string") { + this.vk9Version = "0.29.0"; + } + + const setupFile32 = new Resource() + .wizard(wizard) + .url( + `https://github.com/disks86/VK9/releases/download/${this.vk9Version}/${this.vk9Version}-bin-x86-Release.zip` + ) + .name(`${this.vk9Version}-bin-x86-Realease.zip`) .get(); new Extractor() - .wizard(this.wizard()) - .archive(setupFile64) - .to(this.prefixDirectory() + "/TMP64/") + .wizard(wizard) + .archive(setupFile32) + .to(`${prefixDirectory}/TMP32/`) .extract(); - cp(this.prefixDirectory() + "/TMP64/" + vk9Version + "-bin-x86_64-Release/" + "d3d9.dll", this.system64directory()); + cp(`${prefixDirectory}/TMP32/${this.vk9Version}-bin-x86-Release/d3d9.dll`, system32directory); - remove(this.prefixDirectory() + "/TMP64/"); - } + remove(`${prefixDirectory}/TMP32/`); - this.overrideDLL() - .set("native", ["d3d9"]) - .do(); + if (this.wine.architecture() === "amd64") { + const setupFile64 = new Resource() + .wizard(wizard) + .url( + `https://github.com/disks86/VK9/releases/download/${this.vk9Version}/${this.vk9Version}-bin-x86_64-Release.zip` + ) + .name(`${this.vk9Version}-bin-x86_64-Realease.zip`) + .get(); - return this; -} + new Extractor() + .wizard(wizard) + .archive(setupFile64) + .to(`${prefixDirectory}/TMP64/`) + .extract(); -/** - * Verb to install VK9 - */ -// eslint-disable-next-line no-unused-vars -module.default = class VK9Verb { - constructor() { - // do nothing + cp(`${prefixDirectory}/TMP64/${this.vk9Version}-bin-x86_64-Release/d3d9.dll`, system64directory); + + remove(`${prefixDirectory}/TMP64/`); + } + + this.wine + .overrideDLL() + .set("native", ["d3d9"]) + .do(); } - install(container) { - var wine = new Wine(); - wine.prefix(container); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "VK9", Optional.empty()); - var wizard = SetupWizard(InstallationType.VERBS, "VK9", java.util.Optional.empty()); + wine.prefix(container); + wine.wizard(wizard); // this script is not able to install older versions (VK9.conf mandatory) - var versions = ["0.29.0", "0.28.1", "0.28.0"]; + const versions = ["0.29.0", "0.28.1", "0.28.0"]; // query desired version (default: 0.28.1) - var selectedVersion = wizard.menu(tr("Please select the version."), versions, "0.28.1"); - wine.wizard(wizard); + const selectedVersion = wizard.menu(tr("Please select the version."), versions, "0.28.1"); // install selected version - wine.VK9(selectedVersion.text); + new VK9(wine).withVersion(selectedVersion.text).go(); wizard.close(); } } + +module.default = VK9; diff --git a/Engines/Wine/Verbs/Windows XP SP 3/script.js b/Engines/Wine/Verbs/Windows XP SP 3/script.js index 4b550ee7c5..99aec3ded0 100644 --- a/Engines/Wine/Verbs/Windows XP SP 3/script.js +++ b/Engines/Wine/Verbs/Windows XP SP 3/script.js @@ -3,54 +3,60 @@ const Resource = include("utils.functions.net.resource"); const { CabExtract } = include("utils.functions.filesystem.extract"); const { remove, fileName } = include("utils.functions.filesystem.files"); +const Optional = Java.type("java.util.Optional"); + /** * Verb to install Windows XP Service Pack 3 - * - * @param {string} fileToExtract path to file which shall be extracted - * @returns {Wine} Wine object */ -Wine.prototype.sp3extract = function (fileToExtract) { - const targetDirectory = this.system32directory(); +class WindowsXPSP3 { + constructor(wine) { + this.wine = wine; + } - const setupFile = new Resource() - .wizard(this.wizard()) - .url("http://freeware.epsc.wustl.edu/Win/XP_SP3/WindowsXP-KB936929-SP3-x86-ENU.exe") - .checksum("c81472f7eeea2eca421e116cd4c03e2300ebfde4") - .name("WindowsXP-KB936929-SP3-x86-ENU.exe") - .get(); + /** + * Sets the path to the file which shall be extracted + * + * @param {string} fileToExtract The path to the file which shall be extracted + * @returns {WindowsXPSP3} + */ + withFileToExtract(fileToExtract) { + this.fileToExtract = fileToExtract; - new CabExtract() - .archive(setupFile) - .wizard(this.wizard()) - .to(this.prefixDirectory() + "/drive_c/sp3/") - .extract(["-F", "i386/" + fileToExtract.slice(0, -1) + "_"]); + return this; + } - remove(targetDirectory + "/" + fileToExtract); + go() { + const wizard = this.wine.wizard(); + const prefixDirectory = this.wine.prefixDirectory(); + const system32directory = this.wine.system32directory(); - new CabExtract() - .archive(this.prefixDirectory() + "/drive_c/sp3/i386/" + fileToExtract.slice(0, -1) + "_") - .wizard(this.wizard()) - .to(targetDirectory) - .extract(); + const setupFile = new Resource() + .wizard(wizard) + .url("http://freeware.epsc.wustl.edu/Win/XP_SP3/WindowsXP-KB936929-SP3-x86-ENU.exe") + .checksum("c81472f7eeea2eca421e116cd4c03e2300ebfde4") + .name("WindowsXP-KB936929-SP3-x86-ENU.exe") + .get(); - return this; -}; + new CabExtract() + .wizard(wizard) + .archive(setupFile) + .to(`${prefixDirectory}/drive_c/sp3/`) + .extract(["-F", `i386/${this.fileToExtract.slice(0, -1)}_`]); -/** - * Verb to install Windows XP Service Pack 3 - */ -module.default = class WindowsXPSP3Verb { - constructor() { - // do nothing + remove(`${system32directory}/${this.fileToExtract}`); + + new CabExtract() + .wizard(wizard) + .archive(`${prefixDirectory}/drive_c/sp3/i386/${this.fileToExtract.slice(0, -1)}_`) + .to(system32directory) + .extract(); } - install(container) { + static install(container) { const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "sp3extract", Optional.empty()); wine.prefix(container); - - const wizard = SetupWizard(InstallationType.VERBS, "sp3extract", java.util.Optional.empty()); - wine.wizard(wizard); // query .dll file which shall be extracted @@ -59,8 +65,10 @@ module.default = class WindowsXPSP3Verb { ); // extract requested file - wine.sp3extract(fileToExtract); + new WindowsXPSP3(wine).withFileToExtract(fileToExtract).go(); wizard.close(); } -}; +} + +module.default = WindowsXPSP3; diff --git a/Engines/Wine/Verbs/crypt32/script.js b/Engines/Wine/Verbs/crypt32/script.js index 618da90b08..3da9d99c7e 100644 --- a/Engines/Wine/Verbs/crypt32/script.js +++ b/Engines/Wine/Verbs/crypt32/script.js @@ -3,7 +3,7 @@ const Wine = include("engines.wine.engine.object"); const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.override_dll"); -include("engines.wine.verbs.sp3extract"); +const WindowsXPSP3 = include("engines.wine.verbs.sp3extract"); /** * Verb to install crypt32 @@ -14,8 +14,8 @@ class Crypt32Verb { } go() { - this.wine.sp3extract("crypt32.dll"); - this.wine.sp3extract("msasn1.dll"); + new WindowsXPSP3(this.wine).withFileToExtract("crypt32.dll").go(); + new WindowsXPSP3(this.wine).withFileToExtract("msasn1.dll").go(); this.wine .overrideDLL() diff --git a/Engines/Wine/Verbs/vcrun2003/script.js b/Engines/Wine/Verbs/vcrun2003/script.js index 64954b1345..37cf4e7dd3 100644 --- a/Engines/Wine/Verbs/vcrun2003/script.js +++ b/Engines/Wine/Verbs/vcrun2003/script.js @@ -2,51 +2,50 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); const { cp } = include("utils.functions.filesystem.files"); +const Optional = Java.type("java.util.Optional"); + const Luna = include("engines.wine.verbs.luna"); /** * Verb to install vcrun2003 - * - * @returns {Wine} Wine object */ -Wine.prototype.vcrun2003 = function () { - const setupFile = new Resource() - .wizard(this.wizard()) - .url("https://sourceforge.net/projects/bzflag/files/bzedit%20win32/1.6.5/BZEditW32_1.6.5.exe") - .checksum("bdd1b32c4202fd77e6513fd507c8236888b09121") - .name("BZEditW32_1.6.5.exe") - .get(); +class Vcrun2003 { + constructor(wine) { + this.wine = wine; + } - this.wizard().wait(tr("Please wait while {0} is installed...", "Microsoft Visual C++ 2003 Redistributable (x86)")); - this.run(setupFile, "/S", null, false, true); + go() { + const wizard = this.wine.wizard(); + const programFiles = this.wine.programFiles(); + const system32directory = this.wine.system32directory(); - const dlls = ["msvcp71", "mfc71"]; + const setupFile = new Resource() + .wizard(wizard) + .url("https://sourceforge.net/projects/bzflag/files/bzedit%20win32/1.6.5/BZEditW32_1.6.5.exe") + .checksum("bdd1b32c4202fd77e6513fd507c8236888b09121") + .name("BZEditW32_1.6.5.exe") + .get(); - dlls.forEach(dll => { - cp(this.programFiles() + "/BZEdit1.6.5/" + dll, this.system32directory()); - }); + wizard.wait(tr("Please wait while {0} is installed...", "Microsoft Visual C++ 2003 Redistributable (x86)")); - return this; -}; + this.wine.run(setupFile, "/S", null, false, true); -/** - * Verb to install vcrun2003 - */ -module.default = class Vcrun2003Verb { - constructor() { - // do nothing + ["msvcp71", "mfc71"].forEach(dll => { + cp(`${programFiles}/BZEdit1.6.5/${dll}`, system32directory); + }); } - install(container) { + static install(container) { const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "vcrun2003", Optional.empty()); wine.prefix(container); - - const wizard = SetupWizard(InstallationType.VERBS, "vcrun2003", java.util.Optional.empty()); - wine.wizard(wizard); - wine.vcrun2003(); + + new Vcrun2003(wine).go(); wizard.close(); } -}; +} + +module.default = Vcrun2003; diff --git a/Engines/Wine/Verbs/vcrun2005/script.js b/Engines/Wine/Verbs/vcrun2005/script.js index 191031e5ea..540a6fe59c 100644 --- a/Engines/Wine/Verbs/vcrun2005/script.js +++ b/Engines/Wine/Verbs/vcrun2005/script.js @@ -1,53 +1,50 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); +const Optional = Java.type("java.util.Optional"); + const Luna = include("engines.wine.verbs.luna"); include("engines.wine.plugins.override_dll"); /** * Verb to install vcrun2005 - * @returns {Wine} Wine object */ -Wine.prototype.vcrun2005 = function () { - var setupFile = new Resource() - .wizard(this.wizard()) - .url("http://download.microsoft.com/download/8/B/4/8B42259F-5D70-43F4-AC2E-4B208FD8D66A/vcredist_x86.EXE") - .checksum("b8fab0bb7f62a24ddfe77b19cd9a1451abd7b847") - .name("vcredist_x86.EXE") - .get(); - - this.wizard().wait(tr("Please wait while {0} is installed...", "Microsoft Visual C++ 2005 Redistributable (x86)")); - this.run(setupFile, "/q", null, false, true); - - var dlls = [ - "atl80", - "msvcm80", - "msvcp80", - "msvcr80", - "vcomp" - ]; - this.overrideDLL() - .set("native, builtin", dlls) - .do(); - - return this; -}; +class Vcrun2005 { + constructor(wine) { + this.wine = wine; + } -/** - * Verb to install vcrun2005 - */ -// eslint-disable-next-line no-unused-vars -module.default = class Vcrun2005Verb { - constructor() { - // do nothing + go() { + const wizard = this.wine.wizard(); + + const setupFile = new Resource() + .wizard(wizard) + .url("http://download.microsoft.com/download/8/B/4/8B42259F-5D70-43F4-AC2E-4B208FD8D66A/vcredist_x86.EXE") + .checksum("b8fab0bb7f62a24ddfe77b19cd9a1451abd7b847") + .name("vcredist_x86.EXE") + .get(); + + wizard.wait(tr("Please wait while {0} is installed...", "Microsoft Visual C++ 2005 Redistributable (x86)")); + + this.wine.run(setupFile, "/q", null, false, true); + + this.wine + .overrideDLL() + .set("native, builtin", ["atl80", "msvcm80", "msvcp80", "msvcr80", "vcomp"]) + .do(); } install(container) { - var wine = new Wine(); + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "vcrun2005", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "vcrun2005", java.util.Optional.empty()); wine.wizard(wizard); - wine.vcrun2005(); + + new Vcrun2005(wine).go(); + wizard.close(); } } + +module.default = Vcrun2005; diff --git a/Engines/Wine/Verbs/vcrun2008/script.js b/Engines/Wine/Verbs/vcrun2008/script.js index b6f7edf4f2..76bcd95233 100644 --- a/Engines/Wine/Verbs/vcrun2008/script.js +++ b/Engines/Wine/Verbs/vcrun2008/script.js @@ -1,66 +1,65 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); +const Optional = Java.type("java.util.Optional"); + const Luna = include("engines.wine.verbs.luna"); include("engines.wine.plugins.override_dll"); /** * Verb to install vcrun2008 - * - * @returns {Wine} Wine object */ -Wine.prototype.vcrun2008 = function () { - var setupFile32 = new Resource() - .wizard(this.wizard()) - .url("http://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x86.exe") - .checksum("470640aa4bb7db8e69196b5edb0010933569e98d") - .name("vcredist_x86.exe") - .get(); - - this.wizard().wait(tr("Please wait while {0} is installed...", "Microsoft Visual C++ 2008 Redistributable (x86)")); - this.run(setupFile32, "/q", null, false, true); - - if (this.architecture() == "amd64") { - var setupFile64 = new Resource() - .wizard(this.wizard()) - .url("https://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x64.exe") - .checksum("a7c83077b8a28d409e36316d2d7321fa0ccdb7e8") - .name("vcredist_x64.exe") +class Vcrun2008 { + constructor(wine) { + this.wine = wine; + } + + go() { + const wizard = this.wine.wizard(); + + const setupFile32 = new Resource() + .wizard(wizard) + .url("http://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x86.exe") + .checksum("470640aa4bb7db8e69196b5edb0010933569e98d") + .name("vcredist_x86.exe") .get(); - this.wizard().wait(tr("Please wait while {0} is installed...", "Microsoft Visual C++ 2008 Redistributable (x64)")); - this.run(setupFile64, "/q", null, false, true); - } + wizard.wait(tr("Please wait while {0} is installed...", "Microsoft Visual C++ 2008 Redistributable (x86)")); - var dlls = [ - "atl90", - "msvcm90", - "msvcp90", - "msvcr90", - "vcomp90", - ]; - this.overrideDLL() - .set("native, builtin", dlls) - .do(); + this.wine.run(setupFile32, "/q", null, false, true); - return this; -}; + if (this.wine.architecture() == "amd64") { + const setupFile64 = new Resource() + .wizard(wizard) + .url( + "https://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x64.exe" + ) + .checksum("a7c83077b8a28d409e36316d2d7321fa0ccdb7e8") + .name("vcredist_x64.exe") + .get(); -/** - * Verb to install vcrun2008 - */ -// eslint-disable-next-line no-unused-vars -module.default = class Vcrun2008Verb { - constructor() { - // do nothing + wizard.wait(tr("Please wait while {0} is installed...", "Microsoft Visual C++ 2008 Redistributable (x64)")); + + this.wine.run(setupFile64, "/q", null, false, true); + } + + this.wine + .overrideDLL() + .set("native, builtin", ["atl90", "msvcm90", "msvcp90", "msvcr90", "vcomp90"]) + .do(); } - install(container) { - var wine = new Wine(); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "vcrun2008", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "vcrun2008", java.util.Optional.empty()); wine.wizard(wizard); - wine.vcrun2008(); + + new Vcrun2008(wine).go(); + wizard.close(); } } + +module.default = Vcrun2008; diff --git a/Engines/Wine/Verbs/vcrun2010/script.js b/Engines/Wine/Verbs/vcrun2010/script.js index d585c66d63..7afbcf7fab 100644 --- a/Engines/Wine/Verbs/vcrun2010/script.js +++ b/Engines/Wine/Verbs/vcrun2010/script.js @@ -1,65 +1,65 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); +const Optional = Java.type("java.util.Optional"); + const Luna = include("engines.wine.verbs.luna"); include("engines.wine.plugins.override_dll"); /** * Verb to install vcrun2010 - * - * @returns {Wine} Wine object */ -Wine.prototype.vcrun2010 = function () { - var setupFile32 = new Resource() - .wizard(this.wizard()) - .url("http://download.microsoft.com/download/5/B/C/5BC5DBB3-652D-4DCE-B14A-475AB85EEF6E/vcredist_x86.exe") - .checksum("372d9c1670343d3fb252209ba210d4dc4d67d358") - .name("vcredist_x86.exe") - .get(); - - this.wizard().wait(tr("Please wait while {0} is installed...", "Microsoft Visual C++ 2010 Redistributable (x86)")); - this.run(setupFile32, "/q", null, false, true); - - if (this.architecture() == "amd64") { - var setupFile64 = new Resource() - .wizard(this.wizard()) - .url("http://download.microsoft.com/download/A/8/0/A80747C3-41BD-45DF-B505-E9710D2744E0/vcredist_x64.exe") - .checksum("027d0c2749ec5eb21b031f46aee14c905206f482") - .name("vcredist_x64.exe") +class Vcrun2010 { + constructor(wine) { + this.wine = wine; + } + + go() { + const wizard = this.wine.wizard(); + + const setupFile32 = new Resource() + .wizard(wizard) + .url("http://download.microsoft.com/download/5/B/C/5BC5DBB3-652D-4DCE-B14A-475AB85EEF6E/vcredist_x86.exe") + .checksum("372d9c1670343d3fb252209ba210d4dc4d67d358") + .name("vcredist_x86.exe") .get(); - this.wizard().wait(tr("Please wait while {0} is installed...", "Microsoft Visual C++ 2010 Redistributable (x64)")); - this.run(setupFile64, "/q", null, false, true); - } + wizard.wait(tr("Please wait while {0} is installed...", "Microsoft Visual C++ 2010 Redistributable (x86)")); - var dlls = [ - "atl100", - "msvcp100", - "msvcr100", - "vcomp100", - ]; - this.overrideDLL() - .set("native, builtin", dlls) - .do(); + this.wine.run(setupFile32, "/q", null, false, true); - return this; -}; + if (this.wine.architecture() == "amd64") { + const setupFile64 = new Resource() + .wizard(wizard) + .url( + "http://download.microsoft.com/download/A/8/0/A80747C3-41BD-45DF-B505-E9710D2744E0/vcredist_x64.exe" + ) + .checksum("027d0c2749ec5eb21b031f46aee14c905206f482") + .name("vcredist_x64.exe") + .get(); -/** - * Verb to install vcrun2010 - */ -// eslint-disable-next-line no-unused-vars -module.default = class Vcrun2010Verb { - constructor() { - // do nothing + wizard.wait(tr("Please wait while {0} is installed...", "Microsoft Visual C++ 2010 Redistributable (x64)")); + + this.wine.run(setupFile64, "/q", null, false, true); + } + + this.wine + .overrideDLL() + .set("native, builtin", ["atl100", "msvcp100", "msvcr100", "vcomp100"]) + .do(); } - install(container) { - var wine = new Wine(); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "vcrun2010", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "vcrun2010", java.util.Optional.empty()); wine.wizard(wizard); - wine.vcrun2010(); + + new Vcrun2010(wine).go(); + wizard.close(); } } + +module.default = Vcrun2010; diff --git a/Engines/Wine/Verbs/vcrun2012/script.js b/Engines/Wine/Verbs/vcrun2012/script.js index 731a455a44..469bc19af1 100644 --- a/Engines/Wine/Verbs/vcrun2012/script.js +++ b/Engines/Wine/Verbs/vcrun2012/script.js @@ -1,65 +1,67 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); +const Optional = Java.type("java.util.Optional"); + const Luna = include("engines.wine.verbs.luna"); include("engines.wine.plugins.override_dll"); /** * Verb to install vcrun2012 - * - * @returns {Wine} Wine object */ -Wine.prototype.vcrun2012 = function () { - var setupFile32 = new Resource() - .wizard(this.wizard()) - .url("http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x86.exe") - .checksum("96b377a27ac5445328cbaae210fc4f0aaa750d3f") - .name("vcredist_x86.exe") - .get(); - - this.wizard().wait(tr("Please wait while {0} is installed...", "Microsoft Visual C++ 2012 Redistributable (x86)")); - this.run(setupFile32, "/q", null, false, true); - - if (this.architecture() == "amd64") { - var setupFile64 = new Resource() - .wizard(this.wizard()) - .url("http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe") - .checksum("1a5d93dddbc431ab27b1da711cd3370891542797") - .name("vcredist_x64") +class Vcrun2012 { + constructor(wine) { + this.wine = wine; + } + + go() { + const wizard = this.wine.wizard(); + + const setupFile32 = new Resource() + .wizard(wizard) + .url( + "http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x86.exe" + ) + .checksum("96b377a27ac5445328cbaae210fc4f0aaa750d3f") + .name("vcredist_x86.exe") .get(); - this.wizard().wait(tr("Please wait while {0} is installed...", "Microsoft Visual C++ 2012 Redistributable (x64)")); - this.run(setupFile64, "/q", null, false, true); - } + wizard.wait(tr("Please wait while {0} is installed...", "Microsoft Visual C++ 2012 Redistributable (x86)")); - var dlls = [ - "atl110", - "msvcp110", - "msvcr110", - "vcomp110" - ]; - this.overrideDLL() - .set("native, builtin", dlls) - .do(); + this.wine.run(setupFile32, "/q", null, false, true); - return this; -}; + if (this.wine.architecture() == "amd64") { + const setupFile64 = new Resource() + .wizard(wizard) + .url( + "http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe" + ) + .checksum("1a5d93dddbc431ab27b1da711cd3370891542797") + .name("vcredist_x64") + .get(); -/** - * Verb to install vcrun2012 - */ -// eslint-disable-next-line no-unused-vars -module.default = class Vcrun2012Verb { - constructor() { - // do nothing + wizard.wait(tr("Please wait while {0} is installed...", "Microsoft Visual C++ 2012 Redistributable (x64)")); + + this.wine.run(setupFile64, "/q", null, false, true); + } + + this.wine + .overrideDLL() + .set("native, builtin", ["atl110", "msvcp110", "msvcr110", "vcomp110"]) + .do(); } - install(container) { - var wine = new Wine(); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "vcrun2012", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "vcrun2012", java.util.Optional.empty()); wine.wizard(wizard); - wine.vcrun2012(); + + new Vcrun2012(wine).go(); + wizard.close(); } } + +module.default = Vcrun2012; diff --git a/Engines/Wine/Verbs/vcrun2013/script.js b/Engines/Wine/Verbs/vcrun2013/script.js index 91341ecbc4..acd5e3790c 100644 --- a/Engines/Wine/Verbs/vcrun2013/script.js +++ b/Engines/Wine/Verbs/vcrun2013/script.js @@ -1,59 +1,65 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); +const Optional = Java.type("java.util.Optional"); + const Luna = include("engines.wine.verbs.luna"); include("engines.wine.plugins.override_dll"); /** * Verb to install vcrun2013 - * - * @returns {Wine} Wine object */ -Wine.prototype.vcrun2013 = function () { - var setupFile32 = new Resource() - .wizard(this.wizard()) - .url("http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe") - .checksum("df7f0a73bfa077e483e51bfb97f5e2eceedfb6a3") - .name("vcredist_x86.exe") - .get(); - - this.wizard().wait(tr("Please wait while {0} is installed...", "Microsoft Visual C++ 2013 Redistributable (x86)")); - this.run(setupFile32, "/q", null, false, true); - - if (this.architecture() == "amd64") { - var setupFile64 = new Resource() - .wizard(this.wizard()) - .url("http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x64.exe") - .checksum("8bf41ba9eef02d30635a10433817dbb6886da5a2") - .name("vcredist_x64.exe") +class Vcrun2013 { + constructor(wine) { + this.wine = wine; + } + + go() { + const wizard = this.wine.wizard(); + + const setupFile32 = new Resource() + .wizard(wizard) + .url("http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe") + .checksum("df7f0a73bfa077e483e51bfb97f5e2eceedfb6a3") + .name("vcredist_x86.exe") .get(); - this.wizard().wait(tr("Please wait while {0} is installed...", "Microsoft Visual C++ 2013 Redistributable (x64)")); - this.run(setupFile64, "/q", null, false, true); - } + wizard.wait(tr("Please wait while {0} is installed...", "Microsoft Visual C++ 2013 Redistributable (x86)")); - this.overrideDLL() - .set("native, builtin", ["atl120", "msvcp120", "msvcr120", "vcomp120"]) - .do(); + this.wine.run(setupFile32, "/q", null, false, true); - return this; -}; + if (this.wine.architecture() == "amd64") { + const setupFile64 = new Resource() + .wizard(wizard) + .url( + "http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x64.exe" + ) + .checksum("8bf41ba9eef02d30635a10433817dbb6886da5a2") + .name("vcredist_x64.exe") + .get(); -/** - * Verb to install vcrun2013 - */ -// eslint-disable-next-line no-unused-vars -module.default = class Vcrun2013Verb { - constructor() { - // do nothing + wizard.wait(tr("Please wait while {0} is installed...", "Microsoft Visual C++ 2013 Redistributable (x64)")); + + this.wine.run(setupFile64, "/q", null, false, true); + } + + this.wine + .overrideDLL() + .set("native, builtin", ["atl120", "msvcp120", "msvcr120", "vcomp120"]) + .do(); } install(container) { - var wine = new Wine(); + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "vcrun2013", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "vcrun2013", java.util.Optional.empty()); wine.wizard(wizard); - wine.vcrun2013(); + + new Vcrun2013(wine).go(); + wizard.close(); } } + +module.default = Vcrun2013; diff --git a/Engines/Wine/Verbs/vcrun2015/script.js b/Engines/Wine/Verbs/vcrun2015/script.js index 997a93f14e..bec513b9f7 100644 --- a/Engines/Wine/Verbs/vcrun2015/script.js +++ b/Engines/Wine/Verbs/vcrun2015/script.js @@ -1,6 +1,8 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); +const Optional = Java.type("java.util.Optional"); + const Luna = include("engines.wine.verbs.luna"); include("engines.wine.plugins.override_dll"); @@ -9,7 +11,7 @@ include("engines.wine.plugins.override_dll"); * * @returns {Wine} Wine object */ -Wine.prototype.vcrun2015 = function () { +Wine.prototype.vcrun2015 = function() { var setupFile32 = new Resource() .wizard(this.wizard()) .url("https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x86.exe") @@ -28,7 +30,9 @@ Wine.prototype.vcrun2015 = function () { .name("vc_redist.x64.exe") .get(); - this.wizard().wait(tr("Please wait while {0} is installed...", "Microsoft Visual C++ 2015 Redistributable (x64)")); + this.wizard().wait( + tr("Please wait while {0} is installed...", "Microsoft Visual C++ 2015 Redistributable (x64)") + ); this.run(setupFile64, "/q", null, false, true); } @@ -58,18 +62,72 @@ Wine.prototype.vcrun2015 = function () { /** * Verb to install vcrun2015 */ -// eslint-disable-next-line no-unused-vars -module.default = class Vcrun2015Verb { - constructor() { - // do nothing +class Vcrun2015 { + constructor(wine) { + this.wine = wine; } - install(container) { - var wine = new Wine(); + go() { + const wizard = this.wine.wizard(); + + const setupFile32 = new Resource() + .wizard(wizard) + .url("https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x86.exe") + .checksum("bfb74e498c44d3a103ca3aa2831763fb417134d1") + .name("vc_redist.x86.exe") + .get(); + + wizard.wait(tr("Please wait while {0} is installed...", "Microsoft Visual C++ 2015 Redistributable (x86)")); + + this.wine.run(setupFile32, "/q", null, false, true); + + if (this.wine.architecture() == "amd64") { + const setupFile64 = new Resource() + .wizard(wizard) + .url( + "https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x64.exe" + ) + .checksum("3155cb0f146b927fcc30647c1a904cd162548c8c") + .name("vc_redist.x64.exe") + .get(); + + wizard.wait(tr("Please wait while {0} is installed...", "Microsoft Visual C++ 2015 Redistributable (x64)")); + + this.wine.run(setupFile64, "/q", null, false, true); + } + + this.wine + .overrideDLL() + .set("native, builtin", [ + "api-ms-win-crt-conio-l1-1-0", + "api-ms-win-crt-heap-l1-1-0", + "api-ms-win-crt-locale-l1-1-0", + "api-ms-win-crt-math-l1-1-0", + "api-ms-win-crt-runtime-l1-1-0", + "api-ms-win-crt-stdio-l1-1-0", + "api-ms-win-crt-time-l1-1-0", + "atl140", + "concrt140", + "msvcp140", + "msvcr140", + "ucrtbase", + "vcomp140", + "vcruntime140" + ]) + .do(); + } + + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "vcrun2015", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "vcrun2015", java.util.Optional.empty()); wine.wizard(wizard); - wine.vcrun2015(); + + new Vcrun2015(wine).go(); + wizard.close(); } } + +module.default = Vcrun2015; diff --git a/Engines/Wine/Verbs/vcrun2017/script.js b/Engines/Wine/Verbs/vcrun2017/script.js index 7712a45f25..45b4e2192f 100644 --- a/Engines/Wine/Verbs/vcrun2017/script.js +++ b/Engines/Wine/Verbs/vcrun2017/script.js @@ -1,75 +1,82 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); +const Optional = Java.type("java.util.Optional"); + const Luna = include("engines.wine.verbs.luna"); include("engines.wine.plugins.override_dll"); /** * Verb to install vcrun2017 - * - * @returns {Wine} Wine object */ -Wine.prototype.vcrun2017 = function () { - var setupFile32 = new Resource() - .wizard(this.wizard()) - .url("https://download.visualstudio.microsoft.com/download/pr/11100229/78c1e864d806e36f6035d80a0e80399e/VC_redist.x86.exe") - .checksum("370583c380c26064885289037380af7d8d5f4e81") - .name("vc_redist.x86.exe") - .get(); - - this.wizard().wait(tr("Please wait while {0} is installed...", "Microsoft Visual C++ 2017 Redistributable (x86)")); - this.run(setupFile32, "/q", null, false, true); - - if (this.architecture() == "amd64") { - var setupFile64 = new Resource() - .wizard(this.wizard()) - .url("https://download.visualstudio.microsoft.com/download/pr/11100230/15ccb3f02745c7b206ad10373cbca89b/VC_redist.x64.exe") - .checksum("bdb645ebaf3c91eceb1a143be6793ca57e6435c3") - .name("vc_redist.x64.exe") +class Vcrun2017 { + constructor(wine) { + this.wine = wine; + } + + go() { + const wizard = this.wine.wizard(); + + const setupFile32 = new Resource() + .wizard(wizard) + .url( + "https://download.visualstudio.microsoft.com/download/pr/11100229/78c1e864d806e36f6035d80a0e80399e/VC_redist.x86.exe" + ) + .checksum("370583c380c26064885289037380af7d8d5f4e81") + .name("vc_redist.x86.exe") .get(); - this.wizard().wait(tr("Please wait while {0} is installed...", "Microsoft Visual C++ 2017 Redistributable (x64)")); - this.run(setupFile64, "/q", null, false, true); - } + wizard.wait(tr("Please wait while {0} is installed...", "Microsoft Visual C++ 2017 Redistributable (x86)")); - var dlls = [ - "api-ms-win-crt-conio-l1-1-0", - "api-ms-win-crt-heap-l1-1-0", - "api-ms-win-crt-locale-l1-1-0", - "api-ms-win-crt-math-l1-1-0", - "api-ms-win-crt-runtime-l1-1-0", - "api-ms-win-crt-stdio-l1-1-0", - "api-ms-win-crt-time-l1-1-0", - "atl140", - "concrt140", - "msvcp140", - "msvcr140", - "ucrtbase", - "vcomp140", - "vcruntime140" - ]; - this.overrideDLL() - .set("native, builtin", dlls) - .do(); - - return this; -}; + this.wine.run(setupFile32, "/q", null, false, true); -/** - * Verb to install vcrun2017 - */ -// eslint-disable-next-line no-unused-vars -module.default = class Vcrun2017Verb { - constructor() { - // do nothing + if (this.wine.architecture() == "amd64") { + const setupFile64 = new Resource() + .wizard(wizard) + .url( + "https://download.visualstudio.microsoft.com/download/pr/11100230/15ccb3f02745c7b206ad10373cbca89b/VC_redist.x64.exe" + ) + .checksum("bdb645ebaf3c91eceb1a143be6793ca57e6435c3") + .name("vc_redist.x64.exe") + .get(); + + wizard.wait(tr("Please wait while {0} is installed...", "Microsoft Visual C++ 2017 Redistributable (x64)")); + + this.wine.run(setupFile64, "/q", null, false, true); + } + + this.wine + .overrideDLL() + .set("native, builtin", [ + "api-ms-win-crt-conio-l1-1-0", + "api-ms-win-crt-heap-l1-1-0", + "api-ms-win-crt-locale-l1-1-0", + "api-ms-win-crt-math-l1-1-0", + "api-ms-win-crt-runtime-l1-1-0", + "api-ms-win-crt-stdio-l1-1-0", + "api-ms-win-crt-time-l1-1-0", + "atl140", + "concrt140", + "msvcp140", + "msvcr140", + "ucrtbase", + "vcomp140", + "vcruntime140" + ]) + .do(); } - install(container) { - var wine = new Wine(); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "vcrun2017", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "vcrun2017", java.util.Optional.empty()); wine.wizard(wizard); - wine.vcrun2017(); + + new Vcrun2017(wine).go(); + wizard.close(); } } + +module.default = Vcrun2017; diff --git a/Engines/Wine/Verbs/vcrun6sp6/script.js b/Engines/Wine/Verbs/vcrun6sp6/script.js index e596be256f..63ac7a33cf 100644 --- a/Engines/Wine/Verbs/vcrun6sp6/script.js +++ b/Engines/Wine/Verbs/vcrun6sp6/script.js @@ -1,55 +1,60 @@ const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); -const {CabExtract} = include("utils.functions.filesystem.extract"); -const {remove} = include("utils.functions.filesystem.files"); +const { CabExtract } = include("utils.functions.filesystem.extract"); +const { remove } = include("utils.functions.filesystem.files"); + +const Optional = Java.type("java.util.Optional"); const Luna = 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; -}; +class Vcrun6SP6 { + constructor(wine) { + this.wine = wine; + } -/** - * Verb to install vcrun6sp6 - */ -// eslint-disable-next-line no-unused-vars -module.default = class Vcrun6SP6Verb { - constructor() { - // do nothing + go() { + const wizard = this.wine.wizard(); + const prefixDirectory = this.wine.prefixDirectory(); + const system32directory = this.wine.system32directory(); + + const toBeCabExtracted = new Resource() + .wizard(wizard) + .url("https://download.microsoft.com/download/1/9/f/19fe4660-5792-4683-99e0-8d48c22eed74/Vs6sp6.exe") + .checksum("2292437a8967349261c810ae8b456592eeb76620") + .name("Vs6sp6.exe") + .get(); + + const setupFile = new CabExtract() + .wizard(wizard) + .archive(toBeCabExtracted) + .to(`${prefixDirectory}/drive_c/vcrun6sp6/`) + .extract(["-L", "-F", "vcredist.exe"]); + + remove(`${system32directory}/comcat.dll`); + remove(`${system32directory}/msvcrt.dll`); + remove(`${system32directory}/oleaut32.dll`); + remove(`${system32directory}/olepro32.dll`); + remove(`${system32directory}/stdole2.dll`); + + wizard.wait(tr("Please wait while {0} is installed...", "vcrun6sp6")); + + this.wine.run(setupFile, "/q", null, false, true); } - install(container) { - var wine = new Wine(); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "vcrun6sp6", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "vcrun6sp6", java.util.Optional.empty()); wine.wizard(wizard); - wine.vcrun6sp6(); + + new Vcrun6SP6(wine).go(); + wizard.close(); } } + +module.default = Vcrun6SP6; diff --git a/Engines/Wine/Verbs/vulkanSDK/script.js b/Engines/Wine/Verbs/vulkanSDK/script.js index e0bb3fcde9..377e42a27a 100644 --- a/Engines/Wine/Verbs/vulkanSDK/script.js +++ b/Engines/Wine/Verbs/vulkanSDK/script.js @@ -1,79 +1,87 @@ - const Wine = include("engines.wine.engine.object"); const Resource = include("utils.functions.net.resource"); -const {touch, writeToFile} = include("utils.functions.filesystem.files"); +const { touch, writeToFile } = include("utils.functions.filesystem.files"); + +const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.regedit"); /** - * All the necessary things to run winevulkan (even inside wine mainline or newest wine-staging) + * Verb to install all the necessary things to run winevulkan (even inside wine mainline or newest wine-staging) * see: https://github.com/roderickc/wine-vulkan - * - * @returns {Wine} Wine object */ -Wine.prototype.vulkanSDK = function () { - print("NOTE: you need a graphic driver that supports Vulkan to run winevulkan"); - print("NOTE: Vulkan works in wine from version 3.3 (if compiled with vulkan support)"); - - var sdkVersion = "1.1.97.0"; - - var setupFile = new Resource() - .wizard(this.wizard()) - .url("https://sdk.lunarg.com/sdk/download/" + sdkVersion + "/windows/VulkanSDK-" + sdkVersion + "-Installer.exe") - .checksum("6bab01f98473bfd550544bbe9773a6d05872a61a") - .name("VulkanSDK-" + sdkVersion + "-Installer.exe") - .get(); - - this.run(setupFile, "/S"); - this.wait(); - - var pathVulkanJSON = this.prefixDirectory() + "drive_c/windows/winevulkan.json"; - touch(pathVulkanJSON); - var contentVulkanJSON = JSON.stringify({ - "file_format_version": "1.0.0", "ICD": { - "library_path": "c:\\windows\\system32\\winevulkan.dll", - "api_version": sdkVersion - } - }, null, 4); +class VulkanSDK { + constructor(wine) { + this.wine = wine; + } + + go() { + const wizard = this.wine.wizard(); + const prefixDirectory = this.wine.prefixDirectory(); + + print("NOTE: you need a graphic driver that supports Vulkan to run winevulkan"); + print("NOTE: Vulkan works in wine from version 3.3 (if compiled with vulkan support)"); + + const sdkVersion = "1.1.97.0"; + + const setupFile = new Resource() + .wizard(wizard) + .url(`https://sdk.lunarg.com/sdk/download/${sdkVersion}/windows/VulkanSDK-${sdkVersion}-Installer.exe`) + .checksum("6bab01f98473bfd550544bbe9773a6d05872a61a") + .name(`VulkanSDK-${sdkVersion}-Installer.exe`) + .get(); + + this.wine.run(setupFile, "/S"); + this.wine.wait(); + + const pathVulkanJSON = `${prefixDirectory}/drive_c/windows/winevulkan.json`; - writeToFile(pathVulkanJSON, contentVulkanJSON); + touch(pathVulkanJSON); - var regeditFileContent32 = - "REGEDIT4\n" + - "\n" + - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Khronos\\Vulkan\\Drivers]\n" + - "\"C:\\\\Windows\\\\winevulkan.json\"=dword:00000000"; + const contentVulkanJSON = JSON.stringify( + { + file_format_version: "1.0.0", + ICD: { + library_path: "c:\\windows\\system32\\winevulkan.dll", + api_version: sdkVersion + } + }, + null, + 4 + ); - this.regedit().patch(regeditFileContent32); + writeToFile(pathVulkanJSON, contentVulkanJSON); - if (this.architecture() == "amd64") { - var regeditFileContent64 = + const regeditFileContent32 = "REGEDIT4\n" + "\n" + - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Khronos\\Vulkan\\Drivers\\]\n" + - "\"C:\\\\Windows\\\\winevulkan.json\"=dword:00000000"; + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Khronos\\Vulkan\\Drivers]\n" + + '"C:\\\\Windows\\\\winevulkan.json"=dword:00000000'; - this.regedit().patch(regeditFileContent64); - } + this.wine.regedit().patch(regeditFileContent32); - return this; -} + if (this.wine.architecture() == "amd64") { + const regeditFileContent64 = + "REGEDIT4\n" + + "\n" + + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Khronos\\Vulkan\\Drivers\\]\n" + + '"C:\\\\Windows\\\\winevulkan.json"=dword:00000000'; -/** - * Verb to install all the necessary things to run winevulkan (even inside wine mainline or newest wine-staging) - */ -// eslint-disable-next-line no-unused-vars -module.default = class VulkanSDKVerb { - constructor() { - // do nothing + this.wine.regedit().patch(regeditFileContent64); + } } - install(container) { - var wine = new Wine(); + static install(container) { + const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "vulkanSDK", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "vulkanSDK", java.util.Optional.empty()); wine.wizard(wizard); - wine.vulkanSDK(); + + new VulkanSDK(wine).go(); + wizard.close(); } } + +module.default = VulkanSDK; diff --git a/Engines/Wine/Verbs/xact/script.js b/Engines/Wine/Verbs/xact/script.js index 3b834c6b03..0f5ff8d256 100644 --- a/Engines/Wine/Verbs/xact/script.js +++ b/Engines/Wine/Verbs/xact/script.js @@ -3,252 +3,286 @@ const Resource = include("utils.functions.net.resource"); const { CabExtract } = include("utils.functions.filesystem.extract"); const { remove } = include("utils.functions.filesystem.files"); +const Optional = Java.type("java.util.Optional"); + include("engines.wine.plugins.regsvr32"); /** * Verb to install xact - * - * @returns {Wine} Wine object */ -Wine.prototype.xact = function () { - const extractFiles = (progressBar, filesToExtract, destination, pattern, directory) => { +class Xact { + constructor(wine) { + this.wine = wine; + } + + /** + * Extracts a given list of files + * + * @param {*} progressBar The progress bar + * @param {*} filesToExtract A list of files to extract + * @param {*} destination The destination directory + * @param {*} pattern The file pattern + * @param {*} directory The directory where the files are located + * @returns {void} + */ + extractFiles(progressBar, filesToExtract, destination, pattern, directory) { + const wizard = this.wine.wizard(); + const prefixDirectory = this.wine.prefixDirectory(); + // extract the cab files filesToExtract.reduce((numberOfExtractedFiles, cabFile) => { print(tr("Extracting {0}...", cabFile)); - progressBar.setText(tr("Extracting {0}...", "Xact")); + progressBar.setText(tr("Extracting {0}...", cabFile)); progressBar.setProgressPercentage((numberOfExtractedFiles * 100) / filesToExtract.length); new CabExtract() - .archive(this.prefixDirectory() + "/drive_c/" + directory + cabFile) + .wizard(wizard) + .archive(`${prefixDirectory}/drive_c/${directory}/${cabFile}`) .to(destination) .extract(["-L", "-F", pattern]); return numberOfExtractedFiles + 1; }, 0); - }; + } - //This function executes regsvr32 on the dlls present in dllToRegsvr - const regsvr32Xact = (progressBar, dllToRegsvr) => { + /** + * Executes regsvr32 on the dlls present in dllToRegsvr + * + * @param {*} progressBar The progressbar + * @param {*} dllToRegsvr The dll file + * @returns {void} + */ + regsvr32Xact(progressBar, dllToRegsvr) { dllToRegsvr.reduce((numberOfExtractedFiles, dll) => { print(tr("Registering {0}...", dll)); progressBar.setText(tr("Registering {0}...", "Xact")); progressBar.setProgressPercentage((numberOfExtractedFiles * 100) / filesToExtract.length); - this.regsvr32().install(dll); + this.wine.regsvr32().install(dll); return numberOfExtractedFiles + 1; }, 0); - }; - - const setupFile = new Resource() - .wizard(this.wizard()) - .url( - "http://download.microsoft.com/download/8/4/A/84A35BF1-DAFE-4AE8-82AF-AD2AE20B6B14/directx_Jun2010_redist.exe" - ) - .checksum("f8f1217f666bf2f6863631a7d5e5fb3a8d1542df") - .name("directx_Jun2010_redist.exe") - .get(); - - const progressBar = this.wizard().progressBar(tr("Please wait...")); - progressBar.setText(tr("Extracting {0}...", "Xact")); - progressBar.setProgressPercentage(0); - - let filesToExtract = []; - - //---------------------------------------------------------Extract xactengine*.dll-------------------------------------------- - new CabExtract() - .archive(setupFile) - .to(this.prefixDirectory() + "/drive_c/xact_x86/") - .extract(["-L", "-F", "*_xact_*x86*"]); - - filesToExtract = [ - "apr2006_xact_x86.cab", - "apr2007_xact_x86.cab", - "aug2006_xact_x86.cab", - "aug2007_xact_x86.cab", - "aug2008_xact_x86.cab", - "aug2009_xact_x86.cab", - "dec2006_xact_x86.cab", - "fev2006_xact_x86.cab", - "fev2007_xact_x86.cab", - "fev2010_xact_x86.cab", - "jun2006_xact_x86.cab", - "jun2007_xact_x86.cab", - "jun2008_xact_x86.cab", - "jun2010_xact_x86.cab", - "mar2008_xact_x86.cab", - "mar2009_xact_x86.cab", - "nov2007_xact_x86.cab", - "nov2008_xact_x86.cab", - "oct2006_xact_x86.cab" - ]; - extractFiles(progressBar, filesToExtract, this.system32directory(), "xactengine*.dll", "xact_x86/"); - - //---------------------------------------------------------Extract X3Daudio*.dll---------------------------------------------- - new CabExtract() - .archive(setupFile) - .to(this.prefixDirectory() + "/drive_c/x3daudio_x86/") - .extract(["-L", "-F", "*_x3daudio_*x86*"]); - - filesToExtract = [ - "feb2010_x3daudio_x86.cab", - "jun2008_x3daudio_x86.cab", - "mar2008_x3daudio_x86.cab", - "mar2009_x3daudio_x86.cab", - "nov2007_x3daudio_x86.cab", - "nov2008_x3daudio_x86.cab" - ]; - extractFiles(progressBar, filesToExtract, this.system32directory(), "X3Daudio*.dll", "x3daudio_x86/"); - - //---------------------------------------------------------Extract XAudio*.dll and XAPOFX*.dll--------------------------------- - new CabExtract() - .archive(setupFile) - .to(this.prefixDirectory() + "/drive_c/xaudio_x86/") - .extract(["-L", "-F", "*_xaudio_*x86*"]); - - filesToExtract = [ - "aug2008_xaudio_x86.cab", - "aug2009_xaudio_x86.cab", - "feb2010_xaudio_x86.cab", - "jun2008_xaudio_x86.cab", - "jun2010_xaudio_x86.cab", - "mar2008_xaudio_x86.cab", - "mar2009_xaudio_x86.cab", - "nov2008_xaudio_x86.cab" - ]; - extractFiles(progressBar, filesToExtract, this.system32directory(), "XAudio*.dll", "xaudio_x86/"); - extractFiles(progressBar, filesToExtract, this.system32directory(), "XAPOFX*.dll", "xaudio_x86/"); - - const xactToRegserv = [ - "xactengine2_1.dll", - "xactengine2_2.dll", - "xactengine2_3.dll", - "xactengine2_4.dll", - "xactengine2_5.dll", - "xactengine2_7.dll", - "xactengine2_8.dll", - "xactengine2_9.dll", - "xactengine2_10.dll", - "xactengine3_0.dll", - "xactengine3_1.dll", - "xactengine3_2.dll", - "xactengine3_3.dll", - "xactengine3_4.dll", - "xactengine3_5.dll", - "xactengine3_7.dll" - ]; - - const xaudioToRegserv = [ - "xaudio2_0.dll", - "xaudio2_1.dll", - "xaudio2_2.dll", - "xaudio2_3.dll", - "xaudio2_4.dll", - "xaudio2_5.dll", - "xaudio2_6.dll", - "xaudio2_7.dll", - "xaudio2_9.dll" - ]; - - regsvr32Xact(progressBar, xactToRegserv); - regsvr32Xact(progressBar, xaudioToRegserv); - - remove(this.prefixDirectory() + "/drive_c/xact_x86/"); - remove(this.prefixDirectory() + "/drive_c/x3daudio_x86/"); - remove(this.prefixDirectory() + "/drive_c/xaudio_x86/"); - - if (this.architecture() == "amd64") { - //---------------------------------------------------------Extract xactengine*.dll (x64)-------------------------------------------- + } + + go() { + const wizard = this.wine.wizard(); + const prefixDirectory = this.wine.prefixDirectory(); + const system32directory = this.wine.system32directory(); + const system64directory = this.wine.system64directory(); + + const setupFile = new Resource() + .wizard(wizard) + .url( + "http://download.microsoft.com/download/8/4/A/84A35BF1-DAFE-4AE8-82AF-AD2AE20B6B14/directx_Jun2010_redist.exe" + ) + .checksum("f8f1217f666bf2f6863631a7d5e5fb3a8d1542df") + .name("directx_Jun2010_redist.exe") + .get(); + + const progressBar = wizard.progressBar(tr("Please wait...")); + progressBar.setText(tr("Extracting {0}...", "Xact")); + progressBar.setProgressPercentage(0); + + let filesToExtract = []; + + //---------------------------------------------------------Extract xactengine*.dll-------------------------------------------- new CabExtract() + .wizard(wizard) .archive(setupFile) - .to(this.prefixDirectory() + "/drive_c/xact_x64/") - .extract(["-L", "-F", "*_xact_*x64*"]); + .to(`${prefixDirectory}/drive_c/xact_x86/`) + .extract(["-L", "-F", "*_xact_*x86*"]); filesToExtract = [ - "apr2006_xact_x64.cab", - "apr2007_xact_x64.cab", - "aug2006_xact_x64.cab", - "aug2007_xact_x64.cab", - "aug2008_xact_x64.cab", - "aug2009_xact_x64.cab", - "dec2006_xact_x64.cab", - "fev2006_xact_x64.cab", - "fev2007_xact_x64.cab", - "fev2010_xact_x64.cab", - "jun2006_xact_x64.cab", - "jun2007_xact_x64.cab", - "jun2008_xact_x64.cab", - "jun2010_xact_x64.cab", - "mar2008_xact_x64.cab", - "mar2009_xact_x64.cab", - "nov2007_xact_x64.cab", - "nov2008_xact_x64.cab", - "oct2006_xact_x64.cab" + "apr2006_xact_x86.cab", + "apr2007_xact_x86.cab", + "aug2006_xact_x86.cab", + "aug2007_xact_x86.cab", + "aug2008_xact_x86.cab", + "aug2009_xact_x86.cab", + "dec2006_xact_x86.cab", + "fev2006_xact_x86.cab", + "fev2007_xact_x86.cab", + "fev2010_xact_x86.cab", + "jun2006_xact_x86.cab", + "jun2007_xact_x86.cab", + "jun2008_xact_x86.cab", + "jun2010_xact_x86.cab", + "mar2008_xact_x86.cab", + "mar2009_xact_x86.cab", + "nov2007_xact_x86.cab", + "nov2008_xact_x86.cab", + "oct2006_xact_x86.cab" ]; - extractFiles(progressBar, filesToExtract, this.system64directory(), "xactengine*.dll", "xact_x64/"); - //---------------------------------------------------------Extract X3Daudio*.dll (x64)---------------------------------------------- + this.extractFiles(progressBar, filesToExtract, system32directory, "xactengine*.dll", "xact_x86"); + + //---------------------------------------------------------Extract X3Daudio*.dll---------------------------------------------- new CabExtract() + .wizard(wizard) .archive(setupFile) - .to(this.prefixDirectory() + "/drive_c/x3daudio_x64/") - .extract(["-L", "-F", "*_x3daudio_*x64*"]); + .to(`${prefixDirectory}/drive_c/x3daudio_x86/`) + .extract(["-L", "-F", "*_x3daudio_*x86*"]); filesToExtract = [ - "feb2010_x3daudio_x64.cab", - "jun2008_x3daudio_x64.cab", - "mar2008_x3daudio_x64.cab", - "mar2009_x3daudio_x64.cab", - "nov2007_x3daudio_x64.cab", - "nov2008_x3daudio_x64.cab" + "feb2010_x3daudio_x86.cab", + "jun2008_x3daudio_x86.cab", + "mar2008_x3daudio_x86.cab", + "mar2009_x3daudio_x86.cab", + "nov2007_x3daudio_x86.cab", + "nov2008_x3daudio_x86.cab" ]; - extractFiles(progressBar, filesToExtract, this.system64directory(), "X3Daudio*.dll", "x3daudio_x64/"); - //---------------------------------------------------------Extract XAudio*.dll and XAPOFX*.dll (x64)--------------------------------- + this.extractFiles(progressBar, filesToExtract, system32directory, "X3Daudio*.dll", "x3daudio_x86"); + + //---------------------------------------------------------Extract XAudio*.dll and XAPOFX*.dll--------------------------------- new CabExtract() + .wizard(wizard) .archive(setupFile) - .to(this.prefixDirectory() + "/drive_c/xaudio_x64/") - .extract(["-L", "-F", "*_xaudio_*64*"]); + .to(`${prefixDirectory}/drive_c/xaudio_x86/`) + .extract(["-L", "-F", "*_xaudio_*x86*"]); filesToExtract = [ - "aug2008_xaudio_x64.cab", - "aug2009_xaudio_x64.cab", - "feb2010_xaudio_x64.cab", - "jun2008_xaudio_x64.cab", - "jun2010_xaudio_x64.cab", - "mar2008_xaudio_x64.cab", - "mar2009_xaudio_x64.cab", - "nov2008_xaudio_x64.cab" + "aug2008_xaudio_x86.cab", + "aug2009_xaudio_x86.cab", + "feb2010_xaudio_x86.cab", + "jun2008_xaudio_x86.cab", + "jun2010_xaudio_x86.cab", + "mar2008_xaudio_x86.cab", + "mar2009_xaudio_x86.cab", + "nov2008_xaudio_x86.cab" ]; - extractFiles(progressBar, filesToExtract, this.system64directory(), "XAudio*.dll", "xaudio_x64/"); - extractFiles(progressBar, filesToExtract, this.system64directory(), "XAPOFX*.dll", "xaudio_x64/"); - remove(this.prefixDirectory() + "/drive_c/xact_x64/"); - remove(this.prefixDirectory() + "/drive_c/x3daudio_x64/"); - remove(this.prefixDirectory() + "/drive_c/xaudio_x64/"); - } + this.extractFiles(progressBar, filesToExtract, system32directory, "XAudio*.dll", "xaudio_x86"); + this.extractFiles(progressBar, filesToExtract, system32directory, "XAPOFX*.dll", "xaudio_x86"); + + const xactToRegserv = [ + "xactengine2_1.dll", + "xactengine2_2.dll", + "xactengine2_3.dll", + "xactengine2_4.dll", + "xactengine2_5.dll", + "xactengine2_7.dll", + "xactengine2_8.dll", + "xactengine2_9.dll", + "xactengine2_10.dll", + "xactengine3_0.dll", + "xactengine3_1.dll", + "xactengine3_2.dll", + "xactengine3_3.dll", + "xactengine3_4.dll", + "xactengine3_5.dll", + "xactengine3_7.dll" + ]; - return this; -}; + const xaudioToRegserv = [ + "xaudio2_0.dll", + "xaudio2_1.dll", + "xaudio2_2.dll", + "xaudio2_3.dll", + "xaudio2_4.dll", + "xaudio2_5.dll", + "xaudio2_6.dll", + "xaudio2_7.dll", + "xaudio2_9.dll" + ]; -/** - * Verb to install xact - */ -module.default = class XactVerb { - constructor() { - // do nothing + this.regsvr32Xact(progressBar, xactToRegserv); + this.regsvr32Xact(progressBar, xaudioToRegserv); + + remove(`${prefixDirectory}/drive_c/xact_x86/`); + remove(`${prefixDirectory}/drive_c/x3daudio_x86/`); + remove(`${prefixDirectory}/drive_c/xaudio_x86/`); + + if (this.architecture() == "amd64") { + //---------------------------------------------------------Extract xactengine*.dll (x64)-------------------------------------------- + new CabExtract() + .wizard(wizard) + .archive(setupFile) + .to(`${prefixDirectory}/drive_c/xact_x64/`) + .extract(["-L", "-F", "*_xact_*x64*"]); + + filesToExtract = [ + "apr2006_xact_x64.cab", + "apr2007_xact_x64.cab", + "aug2006_xact_x64.cab", + "aug2007_xact_x64.cab", + "aug2008_xact_x64.cab", + "aug2009_xact_x64.cab", + "dec2006_xact_x64.cab", + "fev2006_xact_x64.cab", + "fev2007_xact_x64.cab", + "fev2010_xact_x64.cab", + "jun2006_xact_x64.cab", + "jun2007_xact_x64.cab", + "jun2008_xact_x64.cab", + "jun2010_xact_x64.cab", + "mar2008_xact_x64.cab", + "mar2009_xact_x64.cab", + "nov2007_xact_x64.cab", + "nov2008_xact_x64.cab", + "oct2006_xact_x64.cab" + ]; + + this.extractFiles(progressBar, filesToExtract, system64directory, "xactengine*.dll", "xact_x64"); + + //---------------------------------------------------------Extract X3Daudio*.dll (x64)---------------------------------------------- + new CabExtract() + .wizard(wizard) + .archive(setupFile) + .to(`${prefixDirectory}/drive_c/x3daudio_x64/`) + .extract(["-L", "-F", "*_x3daudio_*x64*"]); + + filesToExtract = [ + "feb2010_x3daudio_x64.cab", + "jun2008_x3daudio_x64.cab", + "mar2008_x3daudio_x64.cab", + "mar2009_x3daudio_x64.cab", + "nov2007_x3daudio_x64.cab", + "nov2008_x3daudio_x64.cab" + ]; + + this.extractFiles(progressBar, filesToExtract, system64directory, "X3Daudio*.dll", "x3daudio_x64"); + + //---------------------------------------------------------Extract XAudio*.dll and XAPOFX*.dll (x64)--------------------------------- + new CabExtract() + .wizard(wizard) + .archive(setupFile) + .to(`${prefixDirectory}/drive_c/xaudio_x64/`) + .extract(["-L", "-F", "*_xaudio_*64*"]); + + filesToExtract = [ + "aug2008_xaudio_x64.cab", + "aug2009_xaudio_x64.cab", + "feb2010_xaudio_x64.cab", + "jun2008_xaudio_x64.cab", + "jun2010_xaudio_x64.cab", + "mar2008_xaudio_x64.cab", + "mar2009_xaudio_x64.cab", + "nov2008_xaudio_x64.cab" + ]; + + this.extractFiles(progressBar, filesToExtract, system64directory, "XAudio*.dll", "xaudio_x64"); + this.extractFiles(progressBar, filesToExtract, system64directory, "XAPOFX*.dll", "xaudio_x64"); + + remove(`${prefixDirectory}/drive_c/xact_x64/`); + remove(`${prefixDirectory}/drive_c/x3daudio_x64/`); + remove(`${prefixDirectory}/drive_c/xaudio_x64/`); + } } - install(container) { + static install(container) { const wine = new Wine(); + const wizard = SetupWizard(InstallationType.VERBS, "xact", Optional.empty()); wine.prefix(container); - - const wizard = SetupWizard(InstallationType.VERBS, "xact", java.util.Optional.empty()); wine.wizard(wizard); - wine.xact(); + + new Xact(wine).go(); wizard.close(); } -}; +} + +module.default = Xact; From 9d88ed76b3ebc554316228272928bfaa2fa652ec Mon Sep 17 00:00:00 2001 From: Marc Arndt Date: Sun, 1 Sep 2019 15:25:37 +0200 Subject: [PATCH 4/8] - some smaller fixes --- Engines/Wine/Verbs/D9VK/script.js | 9 ++-- Engines/Wine/Verbs/adobeair/script.js | 6 +-- Engines/Wine/Verbs/amstream/script.js | 6 +-- Engines/Wine/Verbs/atmlib/script.js | 6 +-- Engines/Wine/Verbs/corefonts/script.js | 8 +-- Engines/Wine/Verbs/crypt32/script.js | 6 +-- Engines/Wine/Verbs/d3drm/script.js | 6 +-- Engines/Wine/Verbs/d3dx10/script.js | 6 +-- Engines/Wine/Verbs/d3dx11/script.js | 74 ++------------------------ Engines/Wine/Verbs/d3dx9/script.js | 6 +-- Engines/Wine/Verbs/devenum/script.js | 6 +-- 11 files changed, 35 insertions(+), 104 deletions(-) diff --git a/Engines/Wine/Verbs/D9VK/script.js b/Engines/Wine/Verbs/D9VK/script.js index fd256b0885..b70fdbc169 100644 --- a/Engines/Wine/Verbs/D9VK/script.js +++ b/Engines/Wine/Verbs/D9VK/script.js @@ -11,10 +11,9 @@ include("engines.wine.plugins.override_dll"); /** * Verb to install D9VK - * * see: https://github.com/Joshua-Ashton/d9vk/ */ -class D9VKVerb { +class D9VK { constructor(wine) { this.wine = wine; } @@ -23,7 +22,7 @@ class D9VKVerb { * Specifies the D9VK version to download * * @param {string} d9vkVersion - * @returns {D9VKVerb} + * @returns {D9VK} */ withVersion(d9vkVersion) { this.d9vkVersion = d9vkVersion; @@ -109,10 +108,10 @@ class D9VKVerb { wine.wizard(wizard); // install selected version - new D9VKVerb(wine).withVersion(selectedVersion.text).go(); + new D9VK(wine).withVersion(selectedVersion.text).go(); wizard.close(); } } -module.default = D9VKVerb; +module.default = D9VK; diff --git a/Engines/Wine/Verbs/adobeair/script.js b/Engines/Wine/Verbs/adobeair/script.js index b054d7cdd8..bfd0770c1c 100644 --- a/Engines/Wine/Verbs/adobeair/script.js +++ b/Engines/Wine/Verbs/adobeair/script.js @@ -8,7 +8,7 @@ include("engines.wine.plugins.windows_version"); /** * Verb to install adobeair */ -class AdobeAirVerb { +class AdobeAir { constructor(wine) { this.wine = wine; } @@ -39,10 +39,10 @@ class AdobeAirVerb { wine.prefix(container); wine.wizard(wizard); - new AdobeAirVerb(wine).go(); + new AdobeAir(wine).go(); wizard.close(); } }; -module.default = AdobeAirVerb; +module.default = AdobeAir; diff --git a/Engines/Wine/Verbs/amstream/script.js b/Engines/Wine/Verbs/amstream/script.js index 0b794a5ce1..8290403691 100644 --- a/Engines/Wine/Verbs/amstream/script.js +++ b/Engines/Wine/Verbs/amstream/script.js @@ -12,7 +12,7 @@ const Luna = include("engines.wine.verbs.luna"); /** * Verb to install amstream */ -class AmstreamVerb { +class Amstream { constructor(wine) { this.wine = wine; } @@ -97,10 +97,10 @@ class AmstreamVerb { wine.prefix(container); wine.wizard(wizard); - new AmstreamVerb(wine).go(); + new Amstream(wine).go(); wizard.close(); } } -module.default = AmstreamVerb; +module.default = Amstream; diff --git a/Engines/Wine/Verbs/atmlib/script.js b/Engines/Wine/Verbs/atmlib/script.js index 5dee7b74fd..8473c35b8c 100644 --- a/Engines/Wine/Verbs/atmlib/script.js +++ b/Engines/Wine/Verbs/atmlib/script.js @@ -8,7 +8,7 @@ const Optional = Java.type("java.util.Optional"); /** * Verb to install atmlib */ -class AtmlibVerb { +class Atmlib { constructor(wine) { this.wine = wine; } @@ -48,10 +48,10 @@ class AtmlibVerb { wine.prefix(container); wine.wizard(wizard); - new AtmlibVerb(wine).go(); + new Atmlib(wine).go(); wizard.close(); } } -module.default = AtmlibVerb; +module.default = Atmlib; diff --git a/Engines/Wine/Verbs/corefonts/script.js b/Engines/Wine/Verbs/corefonts/script.js index 19ae16d27c..718f1c51a8 100644 --- a/Engines/Wine/Verbs/corefonts/script.js +++ b/Engines/Wine/Verbs/corefonts/script.js @@ -10,7 +10,7 @@ const Luna = include("engines.wine.verbs.luna"); /** * Verb to install corefonts */ -class CorefontsVerb { +class Corefonts { constructor(wine) { this.wine = wine; } @@ -142,17 +142,17 @@ class CorefontsVerb { .do(); } - install(container) { + static install(container) { const wine = new Wine(); const wizard = SetupWizard(InstallationType.VERBS, "corefonts", Optional.empty()); wine.prefix(container); wine.wizard(wizard); - new CorefontsVerb(wine).go(); + new Corefonts(wine).go(); wizard.close(); } } -module.default = CorefontsVerb; +module.default = Corefonts; diff --git a/Engines/Wine/Verbs/crypt32/script.js b/Engines/Wine/Verbs/crypt32/script.js index 3da9d99c7e..50ecb962af 100644 --- a/Engines/Wine/Verbs/crypt32/script.js +++ b/Engines/Wine/Verbs/crypt32/script.js @@ -8,7 +8,7 @@ const WindowsXPSP3 = include("engines.wine.verbs.sp3extract"); /** * Verb to install crypt32 */ -class Crypt32Verb { +class Crypt32 { constructor(wine) { this.wine = wine; } @@ -30,10 +30,10 @@ class Crypt32Verb { wine.prefix(container); wine.wizard(wizard); - new Crypt32Verb(wine).go(); + new Crypt32(wine).go(); wizard.close(); } } -module.default = Crypt32Verb; +module.default = Crypt32; diff --git a/Engines/Wine/Verbs/d3drm/script.js b/Engines/Wine/Verbs/d3drm/script.js index 8bf285d80e..bee4aafc69 100644 --- a/Engines/Wine/Verbs/d3drm/script.js +++ b/Engines/Wine/Verbs/d3drm/script.js @@ -10,7 +10,7 @@ const Luna = include("engines.wine.verbs.luna"); /** * Verb to install d3drm */ -class D3drmVerb { +class D3drm { constructor(wine) { this.wine = wine; } @@ -56,10 +56,10 @@ class D3drmVerb { wine.prefix(container); wine.wizard(wizard); - wine.d3drm(); + new D3drm(wine).go(); wizard.close(); } } -module.default = D3drmVerb; +module.default = D3drm; diff --git a/Engines/Wine/Verbs/d3dx10/script.js b/Engines/Wine/Verbs/d3dx10/script.js index 0df80dafae..d66a5e908c 100644 --- a/Engines/Wine/Verbs/d3dx10/script.js +++ b/Engines/Wine/Verbs/d3dx10/script.js @@ -9,7 +9,7 @@ include("engines.wine.plugins.override_dll"); /** * Verb to install D3DX10 */ -class D3DX10Verb { +class D3DX10 { constructor(wine) { this.wine = wine; } @@ -136,10 +136,10 @@ class D3DX10Verb { wine.prefix(container); wine.wizard(wizard); - new D3DX10Verb(wine).go(); + new D3DX10(wine).go(); wizard.close(); } } -module.default = D3DX10Verb; +module.default = D3DX10; diff --git a/Engines/Wine/Verbs/d3dx11/script.js b/Engines/Wine/Verbs/d3dx11/script.js index 9ecc926833..554bd10f72 100644 --- a/Engines/Wine/Verbs/d3dx11/script.js +++ b/Engines/Wine/Verbs/d3dx11/script.js @@ -8,76 +8,8 @@ include("engines.wine.plugins.override_dll"); /** * Verb to install D3DX11 - * - * @returns {Wine} Wine object */ -Wine.prototype.d3dx11 = function() { - const extractDirectXtoSystemDirectory = (progressBar, filesToExtract, destination, pattern) => { - filesToExtract.reduce((numberOfExtractedFiles, cabFile) => { - print(tr("Extracting {0}...", cabFile)); - - progressBar.setText(tr("Extracting {0}...", "DirectX 11")); - progressBar.setProgressPercentage((numberOfExtractedFiles * 100) / filesToExtract.length); - - new CabExtract() - .archive(this.prefixDirectory() + "/drive_c/d3dx11/" + cabFile) - .to(destination) - .extract(["-L", "-F", pattern]); - - return numberOfExtractedFiles + 1; - }, 0); - }; - - const setupFile = new Resource() - .wizard(this.wizard()) - .url( - "http://download.microsoft.com/download/8/4/A/84A35BF1-DAFE-4AE8-82AF-AD2AE20B6B14/directx_Jun2010_redist.exe" - ) - .checksum("7c1fc2021cf57fed3c25c9b03cd0c31a") - .algorithm("MD5") - .name("directx_Jun2010_redist.exe") - .get(); - - const progressBar = this.wizard().progressBar(tr("Please wait...")); - progressBar.setText(tr("Extracting {0}...", "DirectX 11")); - progressBar.setProgressPercentage(0); - - new CabExtract() - .archive(setupFile) - .to(this.prefixDirectory() + "/drive_c/d3dx11/") - .extract(["-L", "-F", "*d3dx11*x86*"]); - - const filesToExtractx86 = ["Aug2009_d3dx11_42_x86.cab", "Jun2010_d3dx11_43_x86.cab"]; - - extractDirectXtoSystemDirectory(progressBar, filesToExtractx86, this.system32directory(), "*.dll"); - - if (this.architecture() == "amd64") { - new CabExtract() - .archive(setupFile) - .to(this.prefixDirectory() + "/drive_c/d3dx11/") - .extract(["-L", "-F", "*d3dx11*x64*"]); - - const filesToExtractx64 = [ - "Aug2009_d3dx11_42_x86.cab", - "Jun2010_d3dx11_43_x86.cab", - "Aug2009_d3dx11_42_x64.cab", - "Jun2010_d3dx11_43_x64.cab" - ]; - - extractDirectXtoSystemDirectory(progressBar, filesToExtractx64, this.system64directory(), "*.dll"); - } - - this.overrideDLL() - .set("native, builtin", ["d3dx11_42", "d3dx11_43"]) - .do(); - - return this; -}; - -/** - * Verb to install D3DX11 - */ -class D3DX11Verb { +class D3DX11 { constructor(wine) { this.wine = wine; } @@ -172,10 +104,10 @@ class D3DX11Verb { wine.prefix(container); wine.wizard(wizard); - new D3DX11Verb(wine).go(); + new D3DX11(wine).go(); wizard.close(); } } -module.default = D3DX11Verb; +module.default = D3DX11; diff --git a/Engines/Wine/Verbs/d3dx9/script.js b/Engines/Wine/Verbs/d3dx9/script.js index ea6f236adc..ed45bfe376 100644 --- a/Engines/Wine/Verbs/d3dx9/script.js +++ b/Engines/Wine/Verbs/d3dx9/script.js @@ -9,7 +9,7 @@ include("engines.wine.plugins.override_dll"); /** * Verb to install D3DX9 */ -class D3DX9Verb { +class D3DX9 { constructor(wine) { this.wine = wine; } @@ -161,10 +161,10 @@ class D3DX9Verb { wine.prefix(container); wine.wizard(wizard); - new D3DX9Verb(wine).go(); + new D3DX9(wine).go(); wizard.close(); } } -module.default = D3DX9Verb; +module.default = D3DX9; diff --git a/Engines/Wine/Verbs/devenum/script.js b/Engines/Wine/Verbs/devenum/script.js index 10fa3c2401..54d2e2c9e4 100644 --- a/Engines/Wine/Verbs/devenum/script.js +++ b/Engines/Wine/Verbs/devenum/script.js @@ -11,7 +11,7 @@ const Luna = include("engines.wine.verbs.luna"); /** * Verb to install devenum */ -class DevenumVerb { +class Devenum { constructor(wine) { this.wine = wine; } @@ -58,10 +58,10 @@ class DevenumVerb { wine.prefix(container); wine.wizard(wizard); - new DevenumVerb(wine).go(); + new Devenum(wine).go(); wizard.close(); } } -module.default = DevenumVerb; +module.default = Devenum; From 06a936707238f345c65f51e25310beee62380c3f Mon Sep 17 00:00:00 2001 From: Marc Arndt Date: Sun, 1 Sep 2019 15:27:44 +0200 Subject: [PATCH 5/8] - apply eslint --- .../Steam/script.js | 2 +- Applications/Games/Anno 2070/Local/script.js | 4 +- Applications/Games/Audiosurf/Steam/script.js | 2 +- .../Games/Blizzard app/Online/script.js | 2 +- .../Games/DC Universe Online/Online/script.js | 2 +- .../Online/script.js | 2 +- .../Games/Elite:Dangerous/Steam/script.js | 2 +- Applications/Games/Far Cry 2/Steam/script.js | 2 +- .../Games/GOG Galaxy/Online/script.js | 2 +- .../Games/Hearthstone/Online/script.js | 2 +- .../Heroes of the Storm/Online/script.js | 2 +- .../Games/Lego Rock Raiders/Local/script.js | 4 +- .../Online/script.js | 2 +- .../Games/Mirror's Edge/Steam/script.js | 2 +- Applications/Games/Overwatch/Online/script.js | 2 +- .../Games/Quantum Conundrum/Steam/script.js | 2 +- Applications/Games/RimWorld/Local/script.js | 2 +- Applications/Games/RimWorld/Steam/script.js | 2 +- .../Games/Space Colony/Steam/script.js | 2 +- .../Games/Space Engineers/Steam/script.js | 2 +- .../Games/Sprouts Adventure/Local/script.js | 2 +- .../Games/Star Craft II/Online/script.js | 2 +- .../Subnautica Below Zero/Steam/script.js | 2 +- Applications/Games/Subnautica/Steam/script.js | 4 +- Applications/Games/The Sims 3/Local/script.js | 2 +- Applications/Games/The Sims 3/Steam/script.js | 2 +- .../The Witcher 3: Wild Hunt/Steam/script.js | 2 +- .../Games/Total War Rome II/Steam/script.js | 2 +- .../Online/script.js | 2 +- .../Steam/script.js | 2 +- .../Internet Explorer 6.0/Online/script.js | 4 +- .../Internet Explorer 7.0/Online/script.js | 4 +- .../Adobe Acrobat Reader DC/Online/script.js | 4 +- .../Office/ElsterFormular/Online/script.js | 2 +- .../QuickScript/Installer Script/script.js | 2 +- Engines/Wine/Verbs/adobeair/script.js | 2 +- Engines/Wine/Verbs/msls31/script.js | 24 --------- Engines/Wine/Verbs/vcrun2015/script.js | 53 ------------------- 38 files changed, 42 insertions(+), 119 deletions(-) diff --git a/Applications/Games/Age of Empires III: Complete Collection/Steam/script.js b/Applications/Games/Age of Empires III: Complete Collection/Steam/script.js index 455e54c0e0..ecf1837fb5 100644 --- a/Applications/Games/Age of Empires III: Complete Collection/Steam/script.js +++ b/Applications/Games/Age of Empires III: Complete Collection/Steam/script.js @@ -7,7 +7,7 @@ new SteamScript() .editor("Microsoft Studios") .author("Quentin PARIS") .appId(105450) - .postInstall(function(wine /*, wizard*/) { + .postInstall(function (wine /*, wizard*/) { new Mfc42(wine).go(); wine.overrideDLL() diff --git a/Applications/Games/Anno 2070/Local/script.js b/Applications/Games/Anno 2070/Local/script.js index 001e8780d9..aea813fcf5 100644 --- a/Applications/Games/Anno 2070/Local/script.js +++ b/Applications/Games/Anno 2070/Local/script.js @@ -16,7 +16,7 @@ new LocalInstallerScript() .executable("Anno5.exe") .wineVersion("3.16") .wineDistribution("upstream") - .preInstall(function(wine) { + .preInstall(function (wine) { wine.setVirtualDesktop(); new Crypt32(wine).go(); new Corefonts(wine).go(); @@ -25,7 +25,7 @@ new LocalInstallerScript() .set("native, builtin", ["winhttp", "msvcrt40", "msvcr100", "crypt32"]) .do(); }) - .postInstall(function(wine) { + .postInstall(function (wine) { var versionFile = wine.prefixDirectory() + "/drive_c/Ubisoft/Related Designs/ANNO 2070/update/version.txt"; touch(versionFile); writeToFile( diff --git a/Applications/Games/Audiosurf/Steam/script.js b/Applications/Games/Audiosurf/Steam/script.js index 815f583ba8..f6dc7c2a25 100644 --- a/Applications/Games/Audiosurf/Steam/script.js +++ b/Applications/Games/Audiosurf/Steam/script.js @@ -9,7 +9,7 @@ new SteamScript() .editor("Dylan Fitterer") .author("Brainzyy") .appId(12900) - .preInstall(function(wine /*, wizard*/) { + .preInstall(function (wine /*, wizard*/) { new QuickTime76(wine).go(); new Corefonts(wine).go(); new Tahoma(wine).go(); diff --git a/Applications/Games/Blizzard app/Online/script.js b/Applications/Games/Blizzard app/Online/script.js index 22052bf26c..2c50620cf2 100644 --- a/Applications/Games/Blizzard app/Online/script.js +++ b/Applications/Games/Blizzard app/Online/script.js @@ -15,7 +15,7 @@ new OnlineInstallerScript() .executable("Battle.net.exe") .wineVersion("3.19") .wineDistribution("staging") - .preInstall(function(wine /*, wizard*/) { + .preInstall(function (wine /*, wizard*/) { new Vcrun2015(wine).go(); new Corefonts(wine).go(); }); diff --git a/Applications/Games/DC Universe Online/Online/script.js b/Applications/Games/DC Universe Online/Online/script.js index 610b9fc639..f3d14e1dab 100644 --- a/Applications/Games/DC Universe Online/Online/script.js +++ b/Applications/Games/DC Universe Online/Online/script.js @@ -11,7 +11,7 @@ new OnlineInstallerScript() .url("https://launch.daybreakgames.com/installer/DCUO_setup.exe") .category("Games") .executable("LaunchPad.exe") - .preInstall(function(wine /*, wizard*/) { + .preInstall(function (wine /*, wizard*/) { new Vcrun2012(wine).go(); new D3DX9(wine).go(); }); diff --git a/Applications/Games/Earth Eternal - Valkal's Shadow/Online/script.js b/Applications/Games/Earth Eternal - Valkal's Shadow/Online/script.js index f61acb9460..619ac527b6 100644 --- a/Applications/Games/Earth Eternal - Valkal's Shadow/Online/script.js +++ b/Applications/Games/Earth Eternal - Valkal's Shadow/Online/script.js @@ -17,7 +17,7 @@ new OnlineInstallerScript() .executable("Spark.exe", ["http://live.theanubianwar.com/Release/Current/EarthEternal.car"]) .wineVersion(LATEST_STAGING_VERSION) .wineDistribution("staging") - .preInstall(function(wine /*, wizard*/) { + .preInstall(function (wine /*, wizard*/) { wine.windowsVersion("winxp"); new Corefonts(wine).go(); new D3DX9(wine).go(); diff --git a/Applications/Games/Elite:Dangerous/Steam/script.js b/Applications/Games/Elite:Dangerous/Steam/script.js index a523d49dcf..a246f38f40 100644 --- a/Applications/Games/Elite:Dangerous/Steam/script.js +++ b/Applications/Games/Elite:Dangerous/Steam/script.js @@ -10,7 +10,7 @@ new SteamScript() .editor("Frontier Developments") .author("ImperatorS79") .wineArchitecture("amd64") - .preInstall(function(wine /*, wizard*/) { + .preInstall(function (wine /*, wizard*/) { new DotNET45(wine).go(); new Corefonts(wine).go(); new Vcrun2015(wine).go(); diff --git a/Applications/Games/Far Cry 2/Steam/script.js b/Applications/Games/Far Cry 2/Steam/script.js index ac7b088b0f..7a01f71ba2 100644 --- a/Applications/Games/Far Cry 2/Steam/script.js +++ b/Applications/Games/Far Cry 2/Steam/script.js @@ -11,7 +11,7 @@ new SteamScript() .wineVersion(LATEST_STAGING_VERSION) .wineDistribution("staging") .appId(19900) - .preInstall(function(wine /*, wizard*/) { + .preInstall(function (wine /*, wizard*/) { new Secur32(wine).go(); wine.enableCSMT(); }); diff --git a/Applications/Games/GOG Galaxy/Online/script.js b/Applications/Games/GOG Galaxy/Online/script.js index 48bf8171e0..44cfd37bce 100644 --- a/Applications/Games/GOG Galaxy/Online/script.js +++ b/Applications/Games/GOG Galaxy/Online/script.js @@ -18,7 +18,7 @@ new OnlineInstallerScript() .wineArchitecture("amd64") .wineVersion(LATEST_STAGING_VERSION) .wineDistribution("staging") - .preInstall(function(wine /*, wizard*/) { + .preInstall(function (wine /*, wizard*/) { new Corefonts(wine).go(); // Probably needed for self-updater new Vcrun2017(wine).go(); diff --git a/Applications/Games/Hearthstone/Online/script.js b/Applications/Games/Hearthstone/Online/script.js index 568212bd8f..981ee1780e 100644 --- a/Applications/Games/Hearthstone/Online/script.js +++ b/Applications/Games/Hearthstone/Online/script.js @@ -14,7 +14,7 @@ new OnlineInstallerScript() .executable("Battle.net.exe") .wineVersion(LATEST_STAGING_VERSION) .wineDistribution("staging") - .preInstall(function(wine /*, wizard*/) { + .preInstall(function (wine /*, wizard*/) { new Vcrun2015(wine).go(); new Corefonts(wine).go(); }); diff --git a/Applications/Games/Heroes of the Storm/Online/script.js b/Applications/Games/Heroes of the Storm/Online/script.js index 459849b78f..820adfc8db 100644 --- a/Applications/Games/Heroes of the Storm/Online/script.js +++ b/Applications/Games/Heroes of the Storm/Online/script.js @@ -16,7 +16,7 @@ new OnlineInstallerScript() //The checksum is different each time you download .wineVersion(LATEST_STAGING_VERSION) .wineDistribution("staging") - .preInstall(function(wine /*, wizard*/) { + .preInstall(function (wine /*, wizard*/) { wine.windowsVersion("winxp"); new Vcrun2015(wine).go(); diff --git a/Applications/Games/Lego Rock Raiders/Local/script.js b/Applications/Games/Lego Rock Raiders/Local/script.js index cb69b44a8c..86bd86fe0b 100644 --- a/Applications/Games/Lego Rock Raiders/Local/script.js +++ b/Applications/Games/Lego Rock Raiders/Local/script.js @@ -15,7 +15,7 @@ new LocalInstallerScript() .executable("LegoRR.exe") .wineVersion("3.0.3") .wineDistribution("upstream") - .preInstall(function(wine, wizard) { + .preInstall(function (wine, wizard) { new Amstream(wine).go(); new Quartz(wine).go(); new Devenum(wine).go(); @@ -23,7 +23,7 @@ new LocalInstallerScript() wizard.message(tr("When the game ask to install DirectX Media click yes. Click no when it ask for DirectX 6.")); }) - .postInstall(function(wine, wizard) { + .postInstall(function (wine, wizard) { wizard.message( tr( "This game needs a copy protection patch to work. It may be illegal in your country to patch copy protection. You must patch the game yourself." diff --git a/Applications/Games/Magic The Gathering Arena/Online/script.js b/Applications/Games/Magic The Gathering Arena/Online/script.js index 441c23d18c..7358800662 100644 --- a/Applications/Games/Magic The Gathering Arena/Online/script.js +++ b/Applications/Games/Magic The Gathering Arena/Online/script.js @@ -12,7 +12,7 @@ new OnlineInstallerScript() .category("Games") .wineDistribution("staging") .wineVersion(LATEST_STAGING_VERSION) - .preInstall(function(wine /*, wizard*/) { + .preInstall(function (wine /*, wizard*/) { new DXVK(wine).go(); wine.UseTakeFocus("N"); }) diff --git a/Applications/Games/Mirror's Edge/Steam/script.js b/Applications/Games/Mirror's Edge/Steam/script.js index 6f1f547aad..19df757bcf 100644 --- a/Applications/Games/Mirror's Edge/Steam/script.js +++ b/Applications/Games/Mirror's Edge/Steam/script.js @@ -7,7 +7,7 @@ new SteamScript() .editor("DICE") .author("Plata") .appId(17410) - .preInstall(function(wine /*, wizard*/) { + .preInstall(function (wine /*, wizard*/) { new PhysX(wine).go(); wine.setManagedForApplication() diff --git a/Applications/Games/Overwatch/Online/script.js b/Applications/Games/Overwatch/Online/script.js index 50f6c5da25..6d7424d44c 100644 --- a/Applications/Games/Overwatch/Online/script.js +++ b/Applications/Games/Overwatch/Online/script.js @@ -19,7 +19,7 @@ new OnlineInstallerScript() .wineArchitecture("amd64") .category("Games") .executable("Battle.net.exe") - .preInstall(function(wine /*, wizard*/) { + .preInstall(function (wine /*, wizard*/) { wine.windowsVersion("win7"); new Vcrun2015(wine).go(); diff --git a/Applications/Games/Quantum Conundrum/Steam/script.js b/Applications/Games/Quantum Conundrum/Steam/script.js index 66f6f66eb4..11805b14aa 100644 --- a/Applications/Games/Quantum Conundrum/Steam/script.js +++ b/Applications/Games/Quantum Conundrum/Steam/script.js @@ -7,6 +7,6 @@ new SteamScript() .editor("Square Enix") .author("Plata") .appId(200010) - .preInstall(function(wine /*, wizard*/) { + .preInstall(function (wine /*, wizard*/) { new Vcrun2008(wine).go(); }); diff --git a/Applications/Games/RimWorld/Local/script.js b/Applications/Games/RimWorld/Local/script.js index 6e73ad2006..59706c713d 100644 --- a/Applications/Games/RimWorld/Local/script.js +++ b/Applications/Games/RimWorld/Local/script.js @@ -11,7 +11,7 @@ new LocalInstallerScript() .applicationHomepage("https://rimworldgame.com/") .wineArchitecture("amd64") .executable("RimWorld.exe") - .preInstall(function(wine) { + .preInstall(function (wine) { new Vcrun2017(wine).go(); new D3DX9(wine).go(); new Corefonts(wine).go(); diff --git a/Applications/Games/RimWorld/Steam/script.js b/Applications/Games/RimWorld/Steam/script.js index 8f19509285..a862281515 100644 --- a/Applications/Games/RimWorld/Steam/script.js +++ b/Applications/Games/RimWorld/Steam/script.js @@ -11,7 +11,7 @@ new SteamScript() .applicationHomepage("https://rimworldgame.com/") .wineArchitecture("amd64") .appId(294100) - .preInstall(function(wine) { + .preInstall(function (wine) { new Corefonts(wine).go(); new Vcrun2017(wine).go(); new D3DX9(wine).go(); diff --git a/Applications/Games/Space Colony/Steam/script.js b/Applications/Games/Space Colony/Steam/script.js index 21db03f77b..9f5f70824a 100644 --- a/Applications/Games/Space Colony/Steam/script.js +++ b/Applications/Games/Space Colony/Steam/script.js @@ -12,7 +12,7 @@ new SteamScript() .wineDistribution("upstream") .wineVersion(LATEST_DEVELOPMENT_VERSION) .appId(297920) - .preInstall(function(wine) { + .preInstall(function (wine) { new Vcrun2010(wine).go(); new DotNET40(wine).go(); new D3DX9(wine).go(); diff --git a/Applications/Games/Space Engineers/Steam/script.js b/Applications/Games/Space Engineers/Steam/script.js index c39aa016ef..1d194da5c4 100644 --- a/Applications/Games/Space Engineers/Steam/script.js +++ b/Applications/Games/Space Engineers/Steam/script.js @@ -14,7 +14,7 @@ new SteamScript() .wineVersion("4.14") .wineDistribution("upstream") .wineArchitecture("amd64") - .preInstall(function(wine, wizard) { + .preInstall(function (wine, wizard) { new DotNET472(wine).go(); new Vcrun2017(wine).go(); new DXVK(wine).go(); diff --git a/Applications/Games/Sprouts Adventure/Local/script.js b/Applications/Games/Sprouts Adventure/Local/script.js index 530b7f850a..4860a3a656 100644 --- a/Applications/Games/Sprouts Adventure/Local/script.js +++ b/Applications/Games/Sprouts Adventure/Local/script.js @@ -8,7 +8,7 @@ new LocalInstallerScript() .author("Zemogiter") .category("Games") .executable("Sprouts Adventure.CRC") - .preInstall(function(wine, wizard) { + .preInstall(function (wine, wizard) { wizard.message( tr("This game requires winebind (for Ubuntu) or samba and libwbclient/lib32-libwbclient (for Arch Linux).") ); diff --git a/Applications/Games/Star Craft II/Online/script.js b/Applications/Games/Star Craft II/Online/script.js index e7ede4bead..24d33e1c0f 100644 --- a/Applications/Games/Star Craft II/Online/script.js +++ b/Applications/Games/Star Craft II/Online/script.js @@ -12,7 +12,7 @@ new OnlineInstallerScript() // The checksum changes each time you download .category("Games") .executable("Battle.net.exe") - .preInstall(function(wine /*, wizard*/) { + .preInstall(function (wine /*, wizard*/) { new Vcrun2015(wine).go(); new Corefonts(wine).go(); }); diff --git a/Applications/Games/Subnautica Below Zero/Steam/script.js b/Applications/Games/Subnautica Below Zero/Steam/script.js index d275411ef2..b0573ff2af 100644 --- a/Applications/Games/Subnautica Below Zero/Steam/script.js +++ b/Applications/Games/Subnautica Below Zero/Steam/script.js @@ -15,7 +15,7 @@ new SteamScript() .wineVersion(LATEST_STABLE_VERSION) .wineArchitecture("amd64") .appId(848450) - .preInstall(function(wine, wizard) { + .preInstall(function (wine, wizard) { wizard.message( tr("You can make the game smoother by using this: https://github.com/lutris/lutris/wiki/How-to:-Esync") ); diff --git a/Applications/Games/Subnautica/Steam/script.js b/Applications/Games/Subnautica/Steam/script.js index 83d1955652..aae2ac146b 100644 --- a/Applications/Games/Subnautica/Steam/script.js +++ b/Applications/Games/Subnautica/Steam/script.js @@ -15,7 +15,7 @@ new SteamScript() .wineVersion(LATEST_STABLE_VERSION) .wineArchitecture("amd64") .appId(264710) - .preInstall(function(wine, wizard) { + .preInstall(function (wine, wizard) { wizard.message( tr("You can make the game smoother by using this: https://github.com/lutris/lutris/wiki/How-to:-Esync") ); @@ -26,7 +26,7 @@ new SteamScript() wine.setVirtualDesktop(); }) - .postInstall(function(wine, wizard) { + .postInstall(function (wine, wizard) { wizard.message( tr( "Due to a potential confilct with Vulkan, shader mods break the game (the executable file works but no window is displayed)." diff --git a/Applications/Games/The Sims 3/Local/script.js b/Applications/Games/The Sims 3/Local/script.js index 3ffec105ab..8bac5668b7 100644 --- a/Applications/Games/The Sims 3/Local/script.js +++ b/Applications/Games/The Sims 3/Local/script.js @@ -12,7 +12,7 @@ new LocalInstallerScript() .author("Zemogiter") .category("Games") .executable("Sims3Launcher.exe", ["xgamma -gamma 1"]) - .preInstall(function(wine) { + .preInstall(function (wine) { new Mfc42(wine).go(); new Tahoma(wine).go(); new Vcrun2010(wine).go(); diff --git a/Applications/Games/The Sims 3/Steam/script.js b/Applications/Games/The Sims 3/Steam/script.js index c10f1566aa..20382e416d 100644 --- a/Applications/Games/The Sims 3/Steam/script.js +++ b/Applications/Games/The Sims 3/Steam/script.js @@ -13,7 +13,7 @@ new SteamScript() .wineDistribution("upstream") .wineVersion("4.0-rc2") .appId(47890) - .preInstall(function(wine /*, wizard*/) { + .preInstall(function (wine /*, wizard*/) { new DotNET20(wine).go(); new Mfc42(wine).go(); new Tahoma(wine).go(); diff --git a/Applications/Games/The Witcher 3: Wild Hunt/Steam/script.js b/Applications/Games/The Witcher 3: Wild Hunt/Steam/script.js index 9609e1ca72..0adde3e2ee 100644 --- a/Applications/Games/The Witcher 3: Wild Hunt/Steam/script.js +++ b/Applications/Games/The Witcher 3: Wild Hunt/Steam/script.js @@ -11,7 +11,7 @@ new SteamScript() .wineDistribution("staging") .wineArchitecture("amd64") .appId(292030) - .preInstall(function(wine, wizard) { + .preInstall(function (wine, wizard) { wizard.message( tr( "Please ensure you have the latest drivers (415.25 minimum for NVIDIA and mesa 19 for AMD) or else this game will not work." diff --git a/Applications/Games/Total War Rome II/Steam/script.js b/Applications/Games/Total War Rome II/Steam/script.js index ec957cbea2..856a26e8a9 100644 --- a/Applications/Games/Total War Rome II/Steam/script.js +++ b/Applications/Games/Total War Rome II/Steam/script.js @@ -13,7 +13,7 @@ new SteamScript() .appId(214950) .wineVersion(LATEST_STAGING_VERSION) .wineDistribution("staging") - .postInstall(function(wine, wizard) { + .postInstall(function (wine, wizard) { new D3DX9(wine).go(); new Vcrun2005(wine).go(); new Vcrun2008(wine).go(); diff --git a/Applications/Games/Warcraft III Expansion Set/Online/script.js b/Applications/Games/Warcraft III Expansion Set/Online/script.js index d9b4ca0f2a..699a402159 100644 --- a/Applications/Games/Warcraft III Expansion Set/Online/script.js +++ b/Applications/Games/Warcraft III Expansion Set/Online/script.js @@ -16,7 +16,7 @@ new OnlineInstallerScript() .executable("Warcraft III.exe") .wineVersion(LATEST_STAGING_VERSION) .wineDistribution("staging") - .preInstall(function(wine /*, wizard*/) { + .preInstall(function (wine /*, wizard*/) { wine.windowsVersion("winxp"); new Corefonts(wine).go(); diff --git a/Applications/Games/Warlock - Master of the Arcane/Steam/script.js b/Applications/Games/Warlock - Master of the Arcane/Steam/script.js index 6e15c329aa..6ad541aef4 100644 --- a/Applications/Games/Warlock - Master of the Arcane/Steam/script.js +++ b/Applications/Games/Warlock - Master of the Arcane/Steam/script.js @@ -14,7 +14,7 @@ new SteamScript() .appId(203630) .wineVersion(LATEST_STAGING_VERSION) .wineDistribution("staging") - .preInstall(function(wine /*, wizard*/) { + .preInstall(function (wine /*, wizard*/) { new Corefonts(wine).go(); new D3DX9(wine).go(); new Tahoma(wine).go(); diff --git a/Applications/Internet/Internet Explorer 6.0/Online/script.js b/Applications/Internet/Internet Explorer 6.0/Online/script.js index 5b8db6ee35..cf20433138 100644 --- a/Applications/Internet/Internet Explorer 6.0/Online/script.js +++ b/Applications/Internet/Internet Explorer 6.0/Online/script.js @@ -53,7 +53,7 @@ new PlainInstaller().withScript(() => { "browseui", "iseng", "inetcpl" - ].forEach(function(dll) { + ].forEach(function (dll) { remove(wine.prefixDirectory() + "/drive_c/windows/system32/" + dll + ".dll"); }); @@ -143,7 +143,7 @@ new PlainInstaller().withScript(() => { var progressBar = setupWizard.progressBar(tr("Please wait...")); var i = 1; - librariesToRegister.forEach(function(dll) { + librariesToRegister.forEach(function (dll) { progressBar.setProgressPercentage((i * 100) / librariesToRegister.length); progressBar.setText(tr("Installing {0}...", dll)); wine.regsvr32().install(dll); diff --git a/Applications/Internet/Internet Explorer 7.0/Online/script.js b/Applications/Internet/Internet Explorer 7.0/Online/script.js index 71c4ee1806..22f0c564fa 100644 --- a/Applications/Internet/Internet Explorer 7.0/Online/script.js +++ b/Applications/Internet/Internet Explorer 7.0/Online/script.js @@ -46,7 +46,7 @@ new PlainInstaller().withScript(() => { // delete existing IE, otherwise installer will abort with "newer IE installed" remove(wine.prefixDirectory() + "/drive_c/" + wine.programFiles() + "/Internet Explorer/iexplore.exe"); ["itircl", "itss", "jscript", "mlang", "mshtml", "msimtf", "shdoclc", "shdocvw", "shlwapi", "urlmon"].forEach( - function(dll) { + function (dll) { remove(wine.prefixDirectory() + "/drive_c/windows/system32/" + dll + ".dll"); } ); @@ -299,7 +299,7 @@ new PlainInstaller().withScript(() => { var progressBar = setupWizard.progressBar("Please wait..."); var i = 1; - librairiesToRegister.forEach(function(dll) { + librairiesToRegister.forEach(function (dll) { progressBar.setProgressPercentage((i * 100) / librairiesToRegister.length); progressBar.setText(tr("Installing {0}...", dll)); wine.regsvr32().install(dll); diff --git a/Applications/Office/Adobe Acrobat Reader DC/Online/script.js b/Applications/Office/Adobe Acrobat Reader DC/Online/script.js index 4aff6db055..7c28d592c4 100644 --- a/Applications/Office/Adobe Acrobat Reader DC/Online/script.js +++ b/Applications/Office/Adobe Acrobat Reader DC/Online/script.js @@ -15,10 +15,10 @@ new OnlineInstallerScript() .checksum("98b2b838e6c4663fefdfd341dfdc596b1eff355c") .category("Office") .executable("AcroRd32.exe") - .preInstall(function(wine /*, wizard*/) { + .preInstall(function (wine /*, wizard*/) { new Mspatcha(wine).go(); }) - .postInstall(function(wine /*, wizard*/) { + .postInstall(function (wine /*, wizard*/) { // fix broken dialogs (e.g. preferences) wine.windowsVersion("winxp"); }); diff --git a/Applications/Office/ElsterFormular/Online/script.js b/Applications/Office/ElsterFormular/Online/script.js index 24d8b81988..8308267aa8 100644 --- a/Applications/Office/ElsterFormular/Online/script.js +++ b/Applications/Office/ElsterFormular/Online/script.js @@ -13,7 +13,7 @@ new LocalInstallerScript() .author("Plata") .category("Office") .executable("pica.exe") - .preInstall(function(wine /*, wizard*/) { + .preInstall(function (wine /*, wizard*/) { new Vcrun2017(wine).go(); wine.nativeApplication("pdf"); diff --git a/Engines/Wine/QuickScript/Installer Script/script.js b/Engines/Wine/QuickScript/Installer Script/script.js index 8ec42ed6ae..92ac9b5d41 100644 --- a/Engines/Wine/QuickScript/Installer Script/script.js +++ b/Engines/Wine/QuickScript/Installer Script/script.js @@ -77,7 +77,7 @@ module.default = class InstallerScript extends QuickScript { // setup the prefix wine.prefix(this._name, this._wineDistribution, this._wineArchitecture, this._wineVersion); - + new Luna(wine).go(); this._preInstall(wine, setupWizard); diff --git a/Engines/Wine/Verbs/adobeair/script.js b/Engines/Wine/Verbs/adobeair/script.js index bfd0770c1c..207b405014 100644 --- a/Engines/Wine/Verbs/adobeair/script.js +++ b/Engines/Wine/Verbs/adobeair/script.js @@ -43,6 +43,6 @@ class AdobeAir { wizard.close(); } -}; +} module.default = AdobeAir; diff --git a/Engines/Wine/Verbs/msls31/script.js b/Engines/Wine/Verbs/msls31/script.js index 7a9ea9cee8..7d2a20372e 100644 --- a/Engines/Wine/Verbs/msls31/script.js +++ b/Engines/Wine/Verbs/msls31/script.js @@ -5,30 +5,6 @@ const { remove } = include("utils.functions.filesystem.files"); const Optional = Java.type("java.util.Optional"); -/** - * Verb to install msls31.dll - * - * @returns {Wine} Wine object - */ -Wine.prototype.msls31 = function() { - var setupFile = new Resource() - .wizard(this.wizard()) - .url("ftp://ftp.hp.com/pub/softlib/software/msi/InstMsiW.exe") - .checksum("4fc3bf0dc96b5cf5ab26430fac1c33c5c50bd142") - .name("InstMsiW.exe") - .get(); - - remove(this.system32directory() + "/msls31.dll"); - - new CabExtract() - .archive(setupFile) - .wizard(this.wizard()) - .to(this.system32directory()) - .extract(["-F", "msls31.dll"]); - - return this; -}; - /** * Verb to install msls31.dll */ diff --git a/Engines/Wine/Verbs/vcrun2015/script.js b/Engines/Wine/Verbs/vcrun2015/script.js index bec513b9f7..e3f51e466a 100644 --- a/Engines/Wine/Verbs/vcrun2015/script.js +++ b/Engines/Wine/Verbs/vcrun2015/script.js @@ -6,59 +6,6 @@ const Optional = Java.type("java.util.Optional"); const Luna = include("engines.wine.verbs.luna"); include("engines.wine.plugins.override_dll"); -/** - * Verb to install vcrun2015 - * - * @returns {Wine} Wine object - */ -Wine.prototype.vcrun2015 = function() { - var setupFile32 = new Resource() - .wizard(this.wizard()) - .url("https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x86.exe") - .checksum("bfb74e498c44d3a103ca3aa2831763fb417134d1") - .name("vc_redist.x86.exe") - .get(); - - this.wizard().wait(tr("Please wait while {0} is installed...", "Microsoft Visual C++ 2015 Redistributable (x86)")); - this.run(setupFile32, "/q", null, false, true); - - if (this.architecture() == "amd64") { - var setupFile64 = new Resource() - .wizard(this.wizard()) - .url("https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x64.exe") - .checksum("3155cb0f146b927fcc30647c1a904cd162548c8c") - .name("vc_redist.x64.exe") - .get(); - - this.wizard().wait( - tr("Please wait while {0} is installed...", "Microsoft Visual C++ 2015 Redistributable (x64)") - ); - this.run(setupFile64, "/q", null, false, true); - } - - var dlls = [ - "api-ms-win-crt-conio-l1-1-0", - "api-ms-win-crt-heap-l1-1-0", - "api-ms-win-crt-locale-l1-1-0", - "api-ms-win-crt-math-l1-1-0", - "api-ms-win-crt-runtime-l1-1-0", - "api-ms-win-crt-stdio-l1-1-0", - "api-ms-win-crt-time-l1-1-0", - "atl140", - "concrt140", - "msvcp140", - "msvcr140", - "ucrtbase", - "vcomp140", - "vcruntime140" - ]; - this.overrideDLL() - .set("native, builtin", dlls) - .do(); - - return this; -}; - /** * Verb to install vcrun2015 */ From 9498f3521437632e5e868ec2eb73c75e19ea4796 Mon Sep 17 00:00:00 2001 From: Marc Arndt Date: Sun, 1 Sep 2019 15:39:18 +0200 Subject: [PATCH 6/8] - fix remaining eslint issues --- Applications/Games/League of Legends/Online/script.js | 1 - Engines/Wine/Verbs/D9VK/script.js | 4 ++-- Engines/Wine/Verbs/DXVK/script.js | 2 +- Engines/Wine/Verbs/FAudio/script.js | 2 +- Engines/Wine/Verbs/PhysX/script.js | 2 -- Engines/Wine/Verbs/Tahoma/script.js | 1 - Engines/Wine/Verbs/VK9/script.js | 2 +- Engines/Wine/Verbs/Windows XP SP 3/script.js | 2 +- Engines/Wine/Verbs/amstream/script.js | 1 - Engines/Wine/Verbs/corefonts/script.js | 1 - Engines/Wine/Verbs/d3drm/script.js | 1 - Engines/Wine/Verbs/devenum/script.js | 1 - Engines/Wine/Verbs/dotnet20sp2/script.js | 4 ++-- Engines/Wine/Verbs/gallium9/script.js | 6 +++--- Engines/Wine/Verbs/vcrun2003/script.js | 2 -- Engines/Wine/Verbs/vcrun2005/script.js | 1 - Engines/Wine/Verbs/vcrun2008/script.js | 1 - Engines/Wine/Verbs/vcrun2010/script.js | 1 - Engines/Wine/Verbs/vcrun2012/script.js | 1 - Engines/Wine/Verbs/vcrun2013/script.js | 1 - Engines/Wine/Verbs/vcrun2015/script.js | 1 - Engines/Wine/Verbs/vcrun2017/script.js | 1 - Engines/Wine/Verbs/vcrun6sp6/script.js | 2 -- Engines/Wine/Verbs/vulkanSDK/script.js | 8 ++++---- Engines/Wine/Verbs/xact/script.js | 4 ++-- 25 files changed, 17 insertions(+), 36 deletions(-) diff --git a/Applications/Games/League of Legends/Online/script.js b/Applications/Games/League of Legends/Online/script.js index b2d9b71e4a..91f235e9b1 100644 --- a/Applications/Games/League of Legends/Online/script.js +++ b/Applications/Games/League of Legends/Online/script.js @@ -6,7 +6,6 @@ const Resource = include("utils.functions.net.resource"); include("engines.wine.plugins.csmt"); include("engines.wine.plugins.override_dll"); include("engines.wine.plugins.windows_version"); -const Sandbox = include("engines.wine.verbs.sandbox"); const D3DX9 = include("engines.wine.verbs.d3dx9"); // Installs League of Legends diff --git a/Engines/Wine/Verbs/D9VK/script.js b/Engines/Wine/Verbs/D9VK/script.js index b70fdbc169..e97c495e72 100644 --- a/Engines/Wine/Verbs/D9VK/script.js +++ b/Engines/Wine/Verbs/D9VK/script.js @@ -21,8 +21,8 @@ class D9VK { /** * Specifies the D9VK version to download * - * @param {string} d9vkVersion - * @returns {D9VK} + * @param {string} d9vkVersion The D9VK version to download + * @returns {D9VK} The D9VK object */ withVersion(d9vkVersion) { this.d9vkVersion = d9vkVersion; diff --git a/Engines/Wine/Verbs/DXVK/script.js b/Engines/Wine/Verbs/DXVK/script.js index 9bf1b1b815..7dd5046980 100644 --- a/Engines/Wine/Verbs/DXVK/script.js +++ b/Engines/Wine/Verbs/DXVK/script.js @@ -23,7 +23,7 @@ class DXVK { * Sets the DXVK version to download * * @param {string} dxvkVersion The DXVK version to download - * @returns {DXVK} + * @returns {DXVK} The DXVK object */ withVersion(dxvkVersion) { this.dxvkVersion = dxvkVersion; diff --git a/Engines/Wine/Verbs/FAudio/script.js b/Engines/Wine/Verbs/FAudio/script.js index 80eaa0d653..ac6516c5cf 100644 --- a/Engines/Wine/Verbs/FAudio/script.js +++ b/Engines/Wine/Verbs/FAudio/script.js @@ -20,7 +20,7 @@ class FAudio { * Sets the used FAudio version * * @param {string} faudioVersion The version of FAudio to downlaod - * @returns {FAudio} + * @returns {FAudio} The FAudio object */ withVersion(faudioVersion) { this.faudioVersion = faudioVersion; diff --git a/Engines/Wine/Verbs/PhysX/script.js b/Engines/Wine/Verbs/PhysX/script.js index 0a9469b53c..1ac2bd77c6 100644 --- a/Engines/Wine/Verbs/PhysX/script.js +++ b/Engines/Wine/Verbs/PhysX/script.js @@ -3,8 +3,6 @@ const Resource = include("utils.functions.net.resource"); const Optional = Java.type("java.util.Optional"); -const Luna = include("engines.wine.verbs.luna"); - /** * Verb to install Nvidia PhysX */ diff --git a/Engines/Wine/Verbs/Tahoma/script.js b/Engines/Wine/Verbs/Tahoma/script.js index 648ac4416f..44ec9d1cb4 100644 --- a/Engines/Wine/Verbs/Tahoma/script.js +++ b/Engines/Wine/Verbs/Tahoma/script.js @@ -6,7 +6,6 @@ const { CabExtract } = include("utils.functions.filesystem.extract"); const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.register_font"); -const Luna = include("engines.wine.verbs.luna"); /** * Verb to install the Tahoma font diff --git a/Engines/Wine/Verbs/VK9/script.js b/Engines/Wine/Verbs/VK9/script.js index 0712d79130..0264b30f59 100644 --- a/Engines/Wine/Verbs/VK9/script.js +++ b/Engines/Wine/Verbs/VK9/script.js @@ -22,7 +22,7 @@ class VK9 { * Sets the VK9 version to install * * @param {string} vk9Version The VK9 version to install - * @returns {VK9} + * @returns {VK9} The VK9 object */ withVersion(vk9Version) { this.vk9Version = vk9Version; diff --git a/Engines/Wine/Verbs/Windows XP SP 3/script.js b/Engines/Wine/Verbs/Windows XP SP 3/script.js index 99aec3ded0..eb27c77470 100644 --- a/Engines/Wine/Verbs/Windows XP SP 3/script.js +++ b/Engines/Wine/Verbs/Windows XP SP 3/script.js @@ -17,7 +17,7 @@ class WindowsXPSP3 { * Sets the path to the file which shall be extracted * * @param {string} fileToExtract The path to the file which shall be extracted - * @returns {WindowsXPSP3} + * @returns {WindowsXPSP3} The WindowsXPSP3 object */ withFileToExtract(fileToExtract) { this.fileToExtract = fileToExtract; diff --git a/Engines/Wine/Verbs/amstream/script.js b/Engines/Wine/Verbs/amstream/script.js index 8290403691..4ed2cf4e92 100644 --- a/Engines/Wine/Verbs/amstream/script.js +++ b/Engines/Wine/Verbs/amstream/script.js @@ -7,7 +7,6 @@ const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.override_dll"); include("engines.wine.plugins.regsvr32"); -const Luna = include("engines.wine.verbs.luna"); /** * Verb to install amstream diff --git a/Engines/Wine/Verbs/corefonts/script.js b/Engines/Wine/Verbs/corefonts/script.js index 718f1c51a8..2cf6ddf899 100644 --- a/Engines/Wine/Verbs/corefonts/script.js +++ b/Engines/Wine/Verbs/corefonts/script.js @@ -5,7 +5,6 @@ const { CabExtract } = include("utils.functions.filesystem.extract"); const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.register_font"); -const Luna = include("engines.wine.verbs.luna"); /** * Verb to install corefonts diff --git a/Engines/Wine/Verbs/d3drm/script.js b/Engines/Wine/Verbs/d3drm/script.js index bee4aafc69..28c3516a17 100644 --- a/Engines/Wine/Verbs/d3drm/script.js +++ b/Engines/Wine/Verbs/d3drm/script.js @@ -5,7 +5,6 @@ const { CabExtract } = include("utils.functions.filesystem.extract"); const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.override_dll"); -const Luna = include("engines.wine.verbs.luna"); /** * Verb to install d3drm diff --git a/Engines/Wine/Verbs/devenum/script.js b/Engines/Wine/Verbs/devenum/script.js index 54d2e2c9e4..24fcc1f3ae 100644 --- a/Engines/Wine/Verbs/devenum/script.js +++ b/Engines/Wine/Verbs/devenum/script.js @@ -6,7 +6,6 @@ const Optional = Java.type("java.util.Optional"); include("engines.wine.plugins.override_dll"); include("engines.wine.plugins.regsvr32"); -const Luna = include("engines.wine.verbs.luna"); /** * Verb to install devenum diff --git a/Engines/Wine/Verbs/dotnet20sp2/script.js b/Engines/Wine/Verbs/dotnet20sp2/script.js index 81c08d738a..05bf86947b 100644 --- a/Engines/Wine/Verbs/dotnet20sp2/script.js +++ b/Engines/Wine/Verbs/dotnet20sp2/script.js @@ -12,7 +12,7 @@ const RemoveMono = include("engines.wine.verbs.remove_mono"); /** * Verb to install dotnet20sp2 */ -class Dotnet20SP2 { +class DotNET20SP2 { constructor(wine) { this.wine = wine; } @@ -77,7 +77,7 @@ class Dotnet20SP2 { wine.prefix(container); wine.wizard(wizard); - new Dotnet20SP2(wine).go(); + new DotNET20SP2(wine).go(); wizard.close(); } diff --git a/Engines/Wine/Verbs/gallium9/script.js b/Engines/Wine/Verbs/gallium9/script.js index 43b32b69c1..0db50e40fb 100644 --- a/Engines/Wine/Verbs/gallium9/script.js +++ b/Engines/Wine/Verbs/gallium9/script.js @@ -20,7 +20,7 @@ class Gallium9 { * Sets the used gallium9 version * * @param {string} gallium9Version The Gallium 9 Standalone version to download - * @returns {Gallium9} + * @returns {Gallium9} The Gallium9 object */ withVersion(gallium9Version) { this.gallium9Version = gallium9Version; @@ -33,8 +33,8 @@ class Gallium9 { const prefixDirectory = this.wine.prefixDirectory(); const system32directory = this.wine.system32directory(); - if (typeof gallium9Version !== "string") { - gallium9Version = "0.4"; + if (typeof this.gallium9Version !== "string") { + this.gallium9Version = "0.4"; } this.wizard().message( diff --git a/Engines/Wine/Verbs/vcrun2003/script.js b/Engines/Wine/Verbs/vcrun2003/script.js index 37cf4e7dd3..5129ba9bea 100644 --- a/Engines/Wine/Verbs/vcrun2003/script.js +++ b/Engines/Wine/Verbs/vcrun2003/script.js @@ -4,8 +4,6 @@ const { cp } = include("utils.functions.filesystem.files"); const Optional = Java.type("java.util.Optional"); -const Luna = include("engines.wine.verbs.luna"); - /** * Verb to install vcrun2003 */ diff --git a/Engines/Wine/Verbs/vcrun2005/script.js b/Engines/Wine/Verbs/vcrun2005/script.js index 540a6fe59c..09f296ff93 100644 --- a/Engines/Wine/Verbs/vcrun2005/script.js +++ b/Engines/Wine/Verbs/vcrun2005/script.js @@ -3,7 +3,6 @@ const Resource = include("utils.functions.net.resource"); const Optional = Java.type("java.util.Optional"); -const Luna = include("engines.wine.verbs.luna"); include("engines.wine.plugins.override_dll"); /** diff --git a/Engines/Wine/Verbs/vcrun2008/script.js b/Engines/Wine/Verbs/vcrun2008/script.js index 76bcd95233..c7f7931bec 100644 --- a/Engines/Wine/Verbs/vcrun2008/script.js +++ b/Engines/Wine/Verbs/vcrun2008/script.js @@ -3,7 +3,6 @@ const Resource = include("utils.functions.net.resource"); const Optional = Java.type("java.util.Optional"); -const Luna = include("engines.wine.verbs.luna"); include("engines.wine.plugins.override_dll"); /** diff --git a/Engines/Wine/Verbs/vcrun2010/script.js b/Engines/Wine/Verbs/vcrun2010/script.js index 7afbcf7fab..404485dce7 100644 --- a/Engines/Wine/Verbs/vcrun2010/script.js +++ b/Engines/Wine/Verbs/vcrun2010/script.js @@ -3,7 +3,6 @@ const Resource = include("utils.functions.net.resource"); const Optional = Java.type("java.util.Optional"); -const Luna = include("engines.wine.verbs.luna"); include("engines.wine.plugins.override_dll"); /** diff --git a/Engines/Wine/Verbs/vcrun2012/script.js b/Engines/Wine/Verbs/vcrun2012/script.js index 469bc19af1..2254a8a11e 100644 --- a/Engines/Wine/Verbs/vcrun2012/script.js +++ b/Engines/Wine/Verbs/vcrun2012/script.js @@ -3,7 +3,6 @@ const Resource = include("utils.functions.net.resource"); const Optional = Java.type("java.util.Optional"); -const Luna = include("engines.wine.verbs.luna"); include("engines.wine.plugins.override_dll"); /** diff --git a/Engines/Wine/Verbs/vcrun2013/script.js b/Engines/Wine/Verbs/vcrun2013/script.js index acd5e3790c..0e37806682 100644 --- a/Engines/Wine/Verbs/vcrun2013/script.js +++ b/Engines/Wine/Verbs/vcrun2013/script.js @@ -3,7 +3,6 @@ const Resource = include("utils.functions.net.resource"); const Optional = Java.type("java.util.Optional"); -const Luna = include("engines.wine.verbs.luna"); include("engines.wine.plugins.override_dll"); /** diff --git a/Engines/Wine/Verbs/vcrun2015/script.js b/Engines/Wine/Verbs/vcrun2015/script.js index e3f51e466a..25d0326026 100644 --- a/Engines/Wine/Verbs/vcrun2015/script.js +++ b/Engines/Wine/Verbs/vcrun2015/script.js @@ -3,7 +3,6 @@ const Resource = include("utils.functions.net.resource"); const Optional = Java.type("java.util.Optional"); -const Luna = include("engines.wine.verbs.luna"); include("engines.wine.plugins.override_dll"); /** diff --git a/Engines/Wine/Verbs/vcrun2017/script.js b/Engines/Wine/Verbs/vcrun2017/script.js index 45b4e2192f..c1e5cfb6f1 100644 --- a/Engines/Wine/Verbs/vcrun2017/script.js +++ b/Engines/Wine/Verbs/vcrun2017/script.js @@ -3,7 +3,6 @@ const Resource = include("utils.functions.net.resource"); const Optional = Java.type("java.util.Optional"); -const Luna = include("engines.wine.verbs.luna"); include("engines.wine.plugins.override_dll"); /** diff --git a/Engines/Wine/Verbs/vcrun6sp6/script.js b/Engines/Wine/Verbs/vcrun6sp6/script.js index 63ac7a33cf..2022b79ab3 100644 --- a/Engines/Wine/Verbs/vcrun6sp6/script.js +++ b/Engines/Wine/Verbs/vcrun6sp6/script.js @@ -5,8 +5,6 @@ const { remove } = include("utils.functions.filesystem.files"); const Optional = Java.type("java.util.Optional"); -const Luna = include("engines.wine.verbs.luna"); - /** * Verb to install vcrun6sp6 */ diff --git a/Engines/Wine/Verbs/vulkanSDK/script.js b/Engines/Wine/Verbs/vulkanSDK/script.js index 377e42a27a..c114b394e3 100644 --- a/Engines/Wine/Verbs/vulkanSDK/script.js +++ b/Engines/Wine/Verbs/vulkanSDK/script.js @@ -40,10 +40,10 @@ class VulkanSDK { const contentVulkanJSON = JSON.stringify( { - file_format_version: "1.0.0", - ICD: { - library_path: "c:\\windows\\system32\\winevulkan.dll", - api_version: sdkVersion + "file_format_version": "1.0.0", + "ICD": { + "library_path": "c:\\windows\\system32\\winevulkan.dll", + "api_version": sdkVersion } }, null, diff --git a/Engines/Wine/Verbs/xact/script.js b/Engines/Wine/Verbs/xact/script.js index 0f5ff8d256..be383594c6 100644 --- a/Engines/Wine/Verbs/xact/script.js +++ b/Engines/Wine/Verbs/xact/script.js @@ -50,7 +50,7 @@ class Xact { * Executes regsvr32 on the dlls present in dllToRegsvr * * @param {*} progressBar The progressbar - * @param {*} dllToRegsvr The dll file + * @param {*} dllToRegsvr The dll files * @returns {void} */ regsvr32Xact(progressBar, dllToRegsvr) { @@ -58,7 +58,7 @@ class Xact { print(tr("Registering {0}...", dll)); progressBar.setText(tr("Registering {0}...", "Xact")); - progressBar.setProgressPercentage((numberOfExtractedFiles * 100) / filesToExtract.length); + progressBar.setProgressPercentage((numberOfExtractedFiles * 100) / dllToRegsvr.length); this.wine.regsvr32().install(dll); From c1ca9b1e91296633c280da83868fa5675b474a06 Mon Sep 17 00:00:00 2001 From: Marc Arndt Date: Sat, 7 Sep 2019 14:07:42 +0200 Subject: [PATCH 7/8] - improve documentation --- docs/_docs/Develop/script-js.md | 46 ++++++++++++++--------- docs/_docs/Develop/verbs.md | 65 +++++++++++++++++++-------------- 2 files changed, 67 insertions(+), 44 deletions(-) diff --git a/docs/_docs/Develop/script-js.md b/docs/_docs/Develop/script-js.md index b19be1ddfd..618f03f26a 100644 --- a/docs/_docs/Develop/script-js.md +++ b/docs/_docs/Develop/script-js.md @@ -191,22 +191,30 @@ For example, for a steam game: ``` #### Pre/Post install hooks -With the pre/post install hooks, you can specify a function which is executed before/after the installation. The function receives a wine object and the [SetupWizard]({{ site.baseurl }}{% link _docs/Develop/setup-wizard.md %}). By default, the pre/post install hooks do nothing. +With the pre- and post- install hooks, you can specify a function which is executed before or after the installation. +The given function receives a wine object and the [SetupWizard]({{ site.baseurl }}{% link _docs/Develop/setup-wizard.md %}). +By default, the pre- and post- install hooks do nothing. -These hooks are especially useful to set DLL overrides. -You can find the complete list of available verbs [here](https://github.com/PhoenicisOrg/scripts/tree/master/Engines/Wine/Verbs). +One common usecase for the pre- and post- install hooks is to set DLL overrides. +DLL overrides are commonly performed using socalled `verb`s. +You can find the complete list of available `verb`s [here](https://github.com/PhoenicisOrg/scripts/tree/master/Engines/Wine/Verbs). -For example, in the script for "Assassin’s Creed: Brotherhood": +To use a `verb` you first need to include it. +You can include a verb by using the `include()` command which returns the class of the included `verb`. + +For example, in the script for "Assassin’s Creed: Brotherhood" two verbs are included: ```javascript -include("engines.wine.verbs.d3dx9"); -include("engines.wine.verbs.crypt32"); +const SteamScript = include("engines.wine.quick_script.steam_script"); + +const Crypt32 = include("engines.wine.verbs.crypt32"); +const D3DX9 = include("engines.wine.verbs.d3dx9"); new SteamScript() ... .preInstall(function(wine, wizard) { - wine.crypt32(); - wine.d3dx9(); + new Crypt32(wine).go(); + new D3DX9(wine).go(); }) ``` @@ -226,8 +234,8 @@ Specific wine version: ``` You can also use variables for the wine version: -* LATEST_DEVELOPMENT_VERSION -* LATEST_STAGING_VERSION +* `LATEST_DEVELOPMENT_VERSION` +* `LATEST_STAGING_VERSION` Specific wine architecture ("x86" or "amd64"): @@ -254,7 +262,7 @@ If the script requires a special registry setting, there are 2 options: const AppResource = include("utils.functions.apps.resources"); include("engines.wine.plugins.regedit"); ... - var registrySettings = new AppResource().application([TYPE_ID, CATEGORY_ID, APPLICATION_ID]).get("registry.reg"); + const registrySettings = new AppResource().application([TYPE_ID, CATEGORY_ID, APPLICATION_ID]).get("registry.reg"); wine.regedit().patch(registrySettings); ``` @@ -266,18 +274,22 @@ The frame for a custom script looks like this: ```javascript const Wine = include("engines.wine.engine.object"); const WineShortcut = include("engines.wine.shortcuts.wine"); +const Luna = include("engines.wine.verbs.luna"); +const {LATEST_STABLE_VERSION} = include("engines.wine.engine.versions"); -var application = "application name" +const application = "application name" -var setupWizard = SetupWizard(application); +const setupWizard = SetupWizard(application); setupWizard.presentation(application, "Editor", "http://applicationhomepage.com", "script author"); -var wine = new Wine() +const wine = new Wine() .wizard(setupWizard) - .prefix(application, "upstream", "x86", LATEST_STABLE_VERSION) - .luna() - .run("your command", ["arg1", "arg2"], null, false, true); + .prefix(application, "upstream", "x86", LATEST_STABLE_VERSION); + +new Luna(wine).go(); + +wine.run("your command", ["arg1", "arg2"], null, false, true); new WineShortcut() .name(application) diff --git a/docs/_docs/Develop/verbs.md b/docs/_docs/Develop/verbs.md index 44ead83471..f923fc7bbe 100644 --- a/docs/_docs/Develop/verbs.md +++ b/docs/_docs/Develop/verbs.md @@ -8,52 +8,62 @@ toc: true The following text describes Verbs for the example of the Wine engine. ## Writing a new verb -Probably, the verb you want to add has already been implemented somewhere else. Take that as an example: +Probably, the functionality of the verb you want to add has already been implemented somewhere else. +To find out whether someone else has already implemented the functionality you can for example look at: * [winetricks](https://github.com/Winetricks/winetricks/blob/master/src/winetricks) * [playonlinux.com search](https://www.playonlinux.com/en/forums.html) -Create a new folder in `Engines/Wine/Verbs` and add a `script.js`. The `script.js` must follow this template: +To create a new verb create a new folder in `Engines/Wine/Verbs` and add a `script.js`. +The `script.js` must follow this template: ```javascript const Wine = include("engines.wine.engine.object"); -/** - * Verb to install verb - * - * @returns {Wine} Wine object - */ -Wine.prototype.verb = function() { - ... - return this; -} +const Optional = Java.type("java.util.Optional"); /** - * Verb to install verb + * Verb to install */ -module.default = class VerbVerb { - constructor() { +// TODO: replace Verb by your own class name +class Verb { + constructor(wine) { + this.wine = wine; + // do some optional initialisation work } - install(container) { - var wine = new Wine(); + go() { + // TODO: add implementation of your verb here + ... + } + + static install(container) { + const wine = new Wine(); + // TODO: change to the target verb name + const wizard = SetupWizard(InstallationType.VERBS, "", Optional.empty()); + wine.prefix(container); - var wizard = SetupWizard(InstallationType.VERBS, "verb", java.util.Optional.empty()); wine.wizard(wizard); - wine.verb(); + + // TODO: replace Verb by your own class name + new Verb(wine).go(); + wizard.close(); } -} +}; + +// TODO: replace Verb by your own class name +module.default = Verb; ``` -The verb extends `Wine`. You can therefore access `Wine` methods via `this`. +The main implementation of your verb needs to be contained in the `go` method. ### Resource To download a file, use `Resource`: ```javascript -var setupFile = new Resource() - .wizard(this._wizard) +const setupFile = new Resource() + .wizard(this.wine.wizard()) .url("http://url/file.exe") .checksum("sha1sum") .algorithm("SHA" / "MD5") // optional: default is "SHA" @@ -64,7 +74,8 @@ var setupFile = new Resource() To install the downloaded `Resource`: ```javascript -this.run(setupFile, ["arg1", "arg2"]) +this.wine + .run(setupFile, ["arg1", "arg2"]) .wait("Please wait while {0} is installed ...".format("Verb")); ``` @@ -76,8 +87,8 @@ Sometimes, it is necessary to extract files from the download instead of install ```javascript new CabExtract() .archive(setupFile) // the Resource - .wizard(null) - .to("path/to/directory") // often: this.system32directory() + .wizard(this.wine.wizard()) + .to("path/to/directory") // often: this.wine.system32directory() .extract(); ``` @@ -93,12 +104,12 @@ If you extract many files, don't forget to add a progress bar like it is done fo On Windows 32 bits, 32 bits dll's go to `C:\windows\system32`. On Windows 64 bits, 32 bits dll's go to `C:\windows\syswow64` and 64 bits dll's go to system32. -This is already handled inside the engine implementation if you use the functions `wine.system64directory()` for 64 bits dll's and bits and `wine.system32directory` for 32 bits dll's inside your scripts. +This is already handled inside the engine implementation if you use the functions `wine.system64directory()` for 64 bits dll's and bits and `wine.system32directory()` for 32 bits dll's inside your scripts. ### DLL Overrides ```javascript -this.overrideDLL() +this.wine.overrideDLL() .set("native, builtin", ["dll1.dll", "dll2.dll"]) .do(); ``` From bbf47615157383f34adde0cafc3cc6fe786a8ac2 Mon Sep 17 00:00:00 2001 From: Marc Arndt Date: Mon, 9 Sep 2019 21:21:58 +0200 Subject: [PATCH 8/8] - fix comments --- docs/_docs/Develop/script-js.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/_docs/Develop/script-js.md b/docs/_docs/Develop/script-js.md index 618f03f26a..8c8015533d 100644 --- a/docs/_docs/Develop/script-js.md +++ b/docs/_docs/Develop/script-js.md @@ -233,17 +233,19 @@ Specific wine version: .wineVersion("1.9.23") ``` -You can also use variables for the wine version: -* `LATEST_DEVELOPMENT_VERSION` -* `LATEST_STAGING_VERSION` +You can also use variables for the latest wine version: +* `LATEST_STABLE_VERSION` via `const { LATEST_STABLE_VERSION } = include("engines.wine.engine.versions");` +* `LATEST_DEVELOPMENT_VERSION` via `const { LATEST_DEVELOPMENT_VERSION } = include("engines.wine.engine.versions");` +* `LATEST_STAGING_VERSION` via `const { LATEST_STAGING_VERSION } = include("engines.wine.engine.versions");` +* `LATEST_DOS_SUPPORT_VERSION` via `const { LATEST_DOS_SUPPORT_VERSION } = include("engines.wine.engine.versions");` -Specific wine architecture ("x86" or "amd64"): +For the specific wine architecture ("x86" or "amd64"): ```javascript .wineArchitecture("x86") ``` -Specific windows version: +And for the specific windows version: ```javascript include("engines.wine.plugins.windows_version");