Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add simple Module System for "include" #1076

Merged
merged 21 commits into from
Aug 11, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Applications/Games/Age of Empires II HD/Steam/script.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include("engines.wine.quick_script.steam_script");
include("utils.functions.filesystem.files");
const {ls, mkdir, fileExists, cat, cp, getFileSize, fileName, lns, remove, touch, writeToFile, createTempFile, createTempDir, chmod, Checksum} = include("utils.functions.filesystem.files");
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This allows us to only "include" the functions we actually require.
Currently I include all defined functionality for simplicity reasons but we can change that later on.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me, it's not obvious why anybody should know that functions are exported in this order. Also: what happens if you add a function in the middle?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The order is not important. You can add the "included" functions in any order you want to

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you have to change all includes then?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean? What I'm doing here is simple destructuring (see also https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment).

So according to my understanding it is ok to use

const {x, y} = include("a");

in script "X" and

const {y, z} = include("a");

in script "Y"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my understanding, x is the first exported function, y the second etc. So if you add a new function between x and y to the module "a", y will suddenly be the new function.

Copy link
Collaborator Author

@madoar madoar Jul 30, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you are confusing this with array destructuring. What I'm doing here is object destructuring. In object destructuring the keys are matched not the indices.

You can test this quite easy yourself in node. Try executing the following code in node:

const x = {a: "a", b: "b", c: "c"};
// destructure "x"
const {c, a} = x;
// print c and a
console.log(a);
console.log(c);

The result will be:

a
c

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, then it's fine.


new SteamScript()
.name("Age of Empires II HD")
Expand Down
2 changes: 1 addition & 1 deletion Applications/Games/Anno 2070/Local/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ include("engines.wine.plugins.override_dll");
include("engines.wine.verbs.corefonts");
include("engines.wine.verbs.crypt32");
include("engines.wine.verbs.d3dx10");
include("utils.functions.filesystem.files");
const {ls, mkdir, fileExists, cat, cp, getFileSize, fileName, lns, remove, touch, writeToFile, createTempFile, createTempDir, chmod, Checksum} = include("utils.functions.filesystem.files");

new LocalInstallerScript()
.name("Anno 2070")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include("engines.wine.quick_script.local_installer_script");
include("engines.wine.engine.object");
const Wine = include("engines.wine.engine.object");
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to restructure the engines.wine.engine.object script. The reason being that the script not only exports the engine Wine but also the corresponding version variables like LATEST_STAGING_VERSION. This becomes a problem when accessing an engine from phoenicis (i.e. the Java side), because you need to know the concrete name of the exported engine if you export multiple values at once.

I see two solutions for this:

  1. we move all exported variables that are not the engine to a new script. This allows us to export the engine using a default export
  2. we use a fixed name for all engine exports (i.e. Engine). This solution will lead to a harder to understand code because every script, independent of the corresponding engine type, will use Engine instead of the concrete engine name, i.e. Wine

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the variables even be global variables? Logically, the belong to the Wine "class".

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. What we could do is change the variables to be accessible through static methods of class Wine:

class Wine {
   static LATEST_STAGING_VERSION() {
      return "version";
   }
}

This would then require us to use the following to access the most current version:

const Wine = include(...);

Wine.LATEST_STAGING_VERSION()

Sadly it is not yet possible to define static fields or accessor methods.

The benefit of returning the variables as a first class member of an object is that we are able to replace them with accessor methods that automatically fetch the most current version and return it:

Object.defineProperty(module, "LATEST_STAGING_VERSION", {
   get: function() { return version; }
});

This should then make it possible to use:

const {LATEST_STAGING_VERSION} = include(...);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can LATEST_STAGING_VERSION be a string module export?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean by a string module export?
For now I thought to move LATEST_STAGING_VERSION to a new module. This new module would then look like the following:

/* exported LATEST_STABLE_VERSION */
module.LATEST_STABLE_VERSION = "4.0.1";
/* exported LATEST_DEVELOPMENT_VERSION */
module.LATEST_DEVELOPMENT_VERSION = "4.11";
/* exported LATEST_STAGING_VERSION */
module.LATEST_STAGING_VERSION = "4.11";
/* exported LATEST_DOS_SUPPORT_VERSION */
module.LATEST_DOS_SUPPORT_VERSION = "4.0";

Later on we could then think about replacing the hard-coded version strings with more dynamic functions that automatically fetch the corresponding string. To retain the field access syntax for the version strings this would require the usage of

Object.defineProperty(module, "LATEST_STAGING_VERSION", {
   get: function() { return version; }
});

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, this sounds to be the good approach

include("engines.wine.plugins.csmt");
include("engines.wine.plugins.windows_version");
include("engines.wine.verbs.d3dx9");
Expand Down
2 changes: 1 addition & 1 deletion Applications/Games/Enderal/Steam/script.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include("engines.wine.quick_script.steam_script");
include("utils.functions.filesystem.files");
const {ls, mkdir, fileExists, cat, cp, getFileSize, fileName, lns, remove, touch, writeToFile, createTempFile, createTempDir, chmod, Checksum} = include("utils.functions.filesystem.files");

new SteamScript()
.name("Enderal")
Expand Down
2 changes: 1 addition & 1 deletion Applications/Games/Lego Rock Raiders/Local/script.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include("engines.wine.quick_script.local_installer_script");
include("utils.functions.net.download");
include("utils.functions.filesystem.extract");
include("utils.functions.filesystem.files");
const {ls, mkdir, fileExists, cat, cp, getFileSize, fileName, lns, remove, touch, writeToFile, createTempFile, createTempDir, chmod, Checksum} = include("utils.functions.filesystem.files");
include("engines.wine.verbs.amstream");
include("engines.wine.verbs.quartz");
include("engines.wine.verbs.devenum");
Expand Down
2 changes: 1 addition & 1 deletion Applications/Games/Rocksmith 2014/Steam/script.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include("engines.wine.quick_script.steam_script");
include("engines.wine.plugins.sound_driver");
include("utils.functions.filesystem.files");
const {ls, mkdir, fileExists, cat, cp, getFileSize, fileName, lns, remove, touch, writeToFile, createTempFile, createTempDir, chmod, Checksum} = include("utils.functions.filesystem.files");

function fixIni(ini) {
var screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
Expand Down
2 changes: 1 addition & 1 deletion Applications/Games/Rocksmith/Steam/script.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include("engines.wine.quick_script.steam_script");
include("engines.wine.plugins.sound_driver");
include("utils.functions.filesystem.files");
const {ls, mkdir, fileExists, cat, cp, getFileSize, fileName, lns, remove, touch, writeToFile, createTempFile, createTempDir, chmod, Checksum} = include("utils.functions.filesystem.files");

function fixIni(ini) {
var screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include("engines.wine.quick_script.local_installer_script");
include("engines.wine.verbs.d3dx9");
include("engines.wine.engine.object");
include("utils.functions.filesystem.files");
const Wine = include("engines.wine.engine.object");
const {ls, mkdir, fileExists, cat, cp, getFileSize, fileName, lns, remove, touch, writeToFile, createTempFile, createTempDir, chmod, Checksum} = include("utils.functions.filesystem.files");

new LocalInstallerScript()
.name("STAR WARS™ Empire at War: Gold Pack")
Expand Down
4 changes: 2 additions & 2 deletions Applications/Games/STAR WARS Battlefront II/Local/script.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include("engines.wine.quick_script.local_installer_script");
include("engines.wine.engine.object");
include("utils.functions.filesystem.files");
const Wine = include("engines.wine.engine.object");
const {ls, mkdir, fileExists, cat, cp, getFileSize, fileName, lns, remove, touch, writeToFile, createTempFile, createTempDir, chmod, Checksum} = include("utils.functions.filesystem.files");

new LocalInstallerScript()
.name("STAR WARS™ Battlefront™ II")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include("engines.wine.quick_script.online_installer_script");
include("engines.wine.verbs.d3dx9");
include("utils.functions.filesystem.files");
const {ls, mkdir, fileExists, cat, cp, getFileSize, fileName, lns, remove, touch, writeToFile, createTempFile, createTempDir, chmod, Checksum} = include("utils.functions.filesystem.files");

new OnlineInstallerScript()
.name("STAR WARS™: The Old Republic")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include("engines.wine.quick_script.zip_script");
include("engines.wine.plugins.dos_support");
include("utils.functions.filesystem.files");
const {ls, mkdir, fileExists, cat, cp, getFileSize, fileName, lns, remove, touch, writeToFile, createTempFile, createTempDir, chmod, Checksum} = include("utils.functions.filesystem.files");

new ZipScript()
.name("The Elder Scroll 1: Arena")
Expand Down
4 changes: 2 additions & 2 deletions Applications/Internet/Internet Explorer 6.0/Online/script.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
include("utils.functions.apps.plain_installer");
include("utils.functions.net.resource");
include("engines.wine.engine.object");
const Wine = include("engines.wine.engine.object");
include("engines.wine.plugins.override_dll");
include("engines.wine.plugins.regedit");
include("engines.wine.plugins.regsvr32");
include("engines.wine.plugins.windows_version");
include("utils.functions.filesystem.files");
const {ls, mkdir, fileExists, cat, cp, getFileSize, fileName, lns, remove, touch, writeToFile, createTempFile, createTempDir, chmod, Checksum} = include("utils.functions.filesystem.files");
include("engines.wine.shortcuts.wine");
include("utils.functions.apps.resources");
include("engines.wine.verbs.msls31");
Expand Down
4 changes: 2 additions & 2 deletions Applications/Internet/Internet Explorer 7.0/Online/script.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
include("utils.functions.apps.plain_installer");
include("utils.functions.net.resource");
include("engines.wine.engine.object");
const Wine = include("engines.wine.engine.object");
include("engines.wine.plugins.override_dll");
include("engines.wine.plugins.regsvr32");
include("utils.functions.filesystem.files");
const {ls, mkdir, fileExists, cat, cp, getFileSize, fileName, lns, remove, touch, writeToFile, createTempFile, createTempDir, chmod, Checksum} = include("utils.functions.filesystem.files");
include("engines.wine.shortcuts.wine");
include("utils.functions.apps.resources");
include("engines.wine.verbs.sandbox");
Expand Down
4 changes: 2 additions & 2 deletions Engines/Wine/Engine/Implementation/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include("utils.functions.filesystem.files");
const {ls, mkdir, fileExists, cat, cp, getFileSize, fileName, lns, remove, touch, writeToFile, createTempFile, createTempDir, chmod, Checksum} = include("utils.functions.filesystem.files");
include("utils.functions.filesystem.extract");
include("utils.functions.net.download");
include("utils.functions.net.resource");
Expand All @@ -10,7 +10,7 @@ var WINE_PREFIX_DIR = "wineprefix";
* Wine engine
*/
// eslint-disable-next-line no-unused-vars
class WineEngine {
module.default = class WineEngine {
constructor() {
this._configFactory = Bean("compatibleConfigFileFormatFactory");
this._containerRegex = /[^a-z0-9_\- ]/gi;
Expand Down
6 changes: 3 additions & 3 deletions Engines/Wine/Engine/Object/script.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include("engines.wine.engine.implementation");
include("utils.functions.filesystem.files");
const WineEngine = include("engines.wine.engine.implementation");
const {ls, mkdir, fileExists, cat, cp, getFileSize, fileName, lns, remove, touch, writeToFile, createTempFile, createTempDir, chmod, Checksum} = include("utils.functions.filesystem.files");
include("utils.functions.filesystem.extract");
include("utils.functions.net.download");
include("utils.functions.net.resource");
Expand All @@ -19,7 +19,7 @@ const FilenameUtils = Java.type("org.apache.commons.io.FilenameUtils");
* Wine main prototype
*/
// eslint-disable-next-line no-unused-vars
class Wine {
module.default = class Wine {
constructor() {
this._implementation = new WineEngine();

Expand Down
4 changes: 2 additions & 2 deletions Engines/Wine/Plugins/DOS support/script.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include("engines.wine.engine.object");
include("utils.functions.filesystem.files");
const Wine = include("engines.wine.engine.object");
const {ls, mkdir, fileExists, cat, cp, getFileSize, fileName, lns, remove, touch, writeToFile, createTempFile, createTempDir, chmod, Checksum} = include("utils.functions.filesystem.files");

/**
* This extensions allows script to add extra settings to dos_support wine builds
Expand Down
2 changes: 1 addition & 1 deletion Engines/Wine/Plugins/DirectDraw renderer/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include("engines.wine.engine.object");
const Wine = include("engines.wine.engine.object");

/**
* force the DirectDrawRenderer
Expand Down
2 changes: 1 addition & 1 deletion Engines/Wine/Plugins/Font smoothing/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include("engines.wine.engine.object");
const Wine = include("engines.wine.engine.object");

/**
* Force the Font smoothing
Expand Down
2 changes: 1 addition & 1 deletion Engines/Wine/Plugins/GLSL/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include("engines.wine.engine.object");
const Wine = include("engines.wine.engine.object");
include("engines.wine.plugins.regedit");

/**
Expand Down
2 changes: 1 addition & 1 deletion Engines/Wine/Plugins/OpenGL version/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include("engines.wine.engine.object");
const Wine = include("engines.wine.engine.object");
include("engines.wine.plugins.regedit");

/**
Expand Down
2 changes: 1 addition & 1 deletion Engines/Wine/Plugins/UseTakeFocus/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include("engines.wine.engine.object");
const Wine = include("engines.wine.engine.object");
include("engines.wine.plugins.regedit");

/**
Expand Down
2 changes: 1 addition & 1 deletion Engines/Wine/Plugins/Windows version/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include("engines.wine.engine.object");
const Wine = include("engines.wine.engine.object");
include("engines.wine.plugins.regedit");

/**
Expand Down
2 changes: 1 addition & 1 deletion Engines/Wine/Plugins/csmt/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include("engines.wine.engine.object");
const Wine = include("engines.wine.engine.object");
include("engines.wine.plugins.regedit");

/**
Expand Down
2 changes: 1 addition & 1 deletion Engines/Wine/Plugins/hdpi/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include("engines.wine.engine.object");
const Wine = include("engines.wine.engine.object");
include("engines.wine.plugins.regedit");

/**
Expand Down
2 changes: 1 addition & 1 deletion Engines/Wine/Plugins/managed/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include("engines.wine.engine.object");
const Wine = include("engines.wine.engine.object");
include("engines.wine.plugins.regedit");

/**
Expand Down
2 changes: 1 addition & 1 deletion Engines/Wine/Plugins/native application/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include("engines.wine.engine.object");
const Wine = include("engines.wine.engine.object");
include("engines.wine.plugins.regedit");

/**
Expand Down
2 changes: 1 addition & 1 deletion Engines/Wine/Plugins/nocrashdialog/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include("engines.wine.engine.object");
const Wine = include("engines.wine.engine.object");

/**
* disables the crashdialog
Expand Down
2 changes: 1 addition & 1 deletion Engines/Wine/Plugins/override DLL/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include("engines.wine.engine.object");
const Wine = include("engines.wine.engine.object");
include("engines.wine.plugins.regedit");

var OverrideDLL = function () {
Expand Down
2 changes: 1 addition & 1 deletion Engines/Wine/Plugins/regedit/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include("engines.wine.engine.object");
const Wine = include("engines.wine.engine.object");

/**
* Regedit support
Expand Down
2 changes: 1 addition & 1 deletion Engines/Wine/Plugins/register font/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include("engines.wine.engine.object");
const Wine = include("engines.wine.engine.object");
include("engines.wine.plugins.regedit");

var RegisterFont = function () {
Expand Down
2 changes: 1 addition & 1 deletion Engines/Wine/Plugins/regsvr32/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include("engines.wine.engine.object");
const Wine = include("engines.wine.engine.object");

/**
* runs "regsvr32"
Expand Down
2 changes: 1 addition & 1 deletion Engines/Wine/Plugins/sound driver/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include("engines.wine.engine.object");
const Wine = include("engines.wine.engine.object");
include("engines.wine.plugins.regedit");

/**
Expand Down
2 changes: 1 addition & 1 deletion Engines/Wine/Plugins/virtual desktop/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include("engines.wine.engine.object");
const Wine = include("engines.wine.engine.object");

/**
* sets Virtual Desktop with window resolution
Expand Down
2 changes: 1 addition & 1 deletion Engines/Wine/QuickScript/GoG Script/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include("engines.wine.engine.object");
const Wine = include("engines.wine.engine.object");
include("engines.wine.quick_script.quick_script");
include("engines.wine.verbs.gdiplus");
include("utils.functions.net.download");
Expand Down
4 changes: 2 additions & 2 deletions Engines/Wine/QuickScript/Installer Script/script.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include("engines.wine.quick_script.quick_script");
include("engines.wine.engine.object");
const Wine = include("engines.wine.engine.object");
include("utils.functions.filesystem.extract");
include("utils.functions.filesystem.files");
const {ls, mkdir, fileExists, cat, cp, getFileSize, fileName, lns, remove, touch, writeToFile, createTempFile, createTempDir, chmod, Checksum} = include("utils.functions.filesystem.files");
include("engines.wine.verbs.luna");

const operatingSystemFetcher = Bean("operatingSystemFetcher");
Expand Down
4 changes: 2 additions & 2 deletions Engines/Wine/QuickScript/Origin Script/script.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include("engines.wine.quick_script.quick_script");
include("utils.functions.net.download");
include("engines.wine.engine.object");
include("utils.functions.filesystem.files");
const Wine = include("engines.wine.engine.object");
const {ls, mkdir, fileExists, cat, cp, getFileSize, fileName, lns, remove, touch, writeToFile, createTempFile, createTempDir, chmod, Checksum} = include("utils.functions.filesystem.files");
include("engines.wine.verbs.luna");

class OriginScript extends QuickScript {
Expand Down
4 changes: 2 additions & 2 deletions Engines/Wine/QuickScript/Steam Script/script.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
include("engines.wine.quick_script.quick_script");
include("utils.functions.net.download");
include("engines.wine.engine.object");
const Wine = include("engines.wine.engine.object");
include("engines.wine.plugins.override_dll");
include("utils.functions.filesystem.extract");
include("utils.functions.filesystem.files");
const {ls, mkdir, fileExists, cat, cp, getFileSize, fileName, lns, remove, touch, writeToFile, createTempFile, createTempDir, chmod, Checksum} = include("utils.functions.filesystem.files");
include("engines.wine.verbs.luna");
include("engines.wine.verbs.corefonts");
include("engines.wine.plugins.windows_version");
Expand Down
4 changes: 2 additions & 2 deletions Engines/Wine/QuickScript/Uplay Script/script.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
include("engines.wine.quick_script.quick_script");
include("utils.functions.net.download");
include("engines.wine.engine.object");
const Wine = include("engines.wine.engine.object");
include("utils.functions.filesystem.extract");
include("utils.functions.filesystem.files");
const {ls, mkdir, fileExists, cat, cp, getFileSize, fileName, lns, remove, touch, writeToFile, createTempFile, createTempDir, chmod, Checksum} = include("utils.functions.filesystem.files");
include("engines.wine.verbs.luna");
include("engines.wine.verbs.corefonts");
include("engines.wine.plugins.windows_version");
Expand Down
2 changes: 1 addition & 1 deletion Engines/Wine/QuickScript/Zip Script/script.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include("engines.wine.quick_script.quick_script");
include("utils.functions.net.download");
include("engines.wine.engine.object");
const Wine = include("engines.wine.engine.object");
include("utils.functions.filesystem.extract");
include("engines.wine.verbs.luna");

Expand Down
4 changes: 2 additions & 2 deletions Engines/Wine/Settings/DirectDraw renderer/script.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
include("engines.wine.engine.object");
const Wine = include("engines.wine.engine.object");
include("engines.wine.plugins.regedit");

/**
* setting to set the DirectDraw renderer
*/
// eslint-disable-next-line no-unused-vars
class DirectDrawRendererSetting {
module.default = class DirectDrawRendererSetting {
constructor() {
this.options = [tr("Default"), tr("GDI"), tr("OpenGL")];
// values which are written into the registry, do not translate!
Expand Down
4 changes: 2 additions & 2 deletions Engines/Wine/Settings/Font smoothing/script.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
include("engines.wine.engine.object");
const Wine = include("engines.wine.engine.object");
include("engines.wine.plugins.regedit");
include("engines.wine.plugins.font_smoothing");

/**
* Setting to set the Fonts Smoothing
*/
// eslint-disable-next-line no-unused-vars
class FontSmoothingSetting {
module.default = class FontSmoothingSetting {
constructor() {
this.options = [tr("Default"), tr("RGB"), tr("BGR"), tr("Gray Scale")];
}
Expand Down
4 changes: 2 additions & 2 deletions Engines/Wine/Settings/GLSL/script.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
include("engines.wine.engine.object");
const Wine = include("engines.wine.engine.object");
include("engines.wine.plugins.regedit");

/**
* Setting to enable/disable GLSL
*/
// eslint-disable-next-line no-unused-vars
class GLSLSetting {
module.default = class GLSLSetting {
constructor() {
this.options = [tr("Default"), tr("Disabled"), tr("Enabled")];
// values which are written into the registry, do not translate!
Expand Down
4 changes: 2 additions & 2 deletions Engines/Wine/Settings/UseTakeFocus/script.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
include("engines.wine.engine.object");
const Wine = include("engines.wine.engine.object");
include("engines.wine.plugins.regedit");
include("engines.wine.plugins.usetakefocus");

/**
* Setting to enable/disable UseTakeFocus
*/
// eslint-disable-next-line no-unused-vars
class UseTakeFocusSetting {
module.default = class UseTakeFocusSetting {
constructor() {
this.options = [tr("Default"), tr("Disabled"), tr("Enabled")];
// values which are written into the registry, do not translate!
Expand Down
4 changes: 2 additions & 2 deletions Engines/Wine/Settings/always offscreen/script.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
include("engines.wine.engine.object");
const Wine = include("engines.wine.engine.object");
include("engines.wine.plugins.regedit");

/**
* setting to set always offscreen
*/
// eslint-disable-next-line no-unused-vars
class AlwaysOffscreenSetting {
module.default = class AlwaysOffscreenSetting {
constructor() {
this.options = [tr("Default"), tr("Disabled"), tr("Enabled")];
// values which are written into the registry, do not translate!
Expand Down
Loading