Methods
_createShortcut(prefixopt) → {void}
creates shortcut
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
prefix |
string |
<optional> |
prefix name |
Returns:
- Type
- void
_determineWineVersion(wizard) → {void}
determines which Wine version should be used
required in case the version is computed by a function
Parameters:
Name | Type | Description |
---|---|---|
wizard |
wizard | setup wizard (e.g. to show download progress of versions json) |
Returns:
- Type
- void
_fetchFileNameFromUrl(url) → {string}
Fetches the file name from an URL
Parameters:
Name | Type | Description |
---|---|---|
url |
string | The URL |
Returns:
The file name
- Type
- string
algorithm(algorithm) → {Downloader}
Sets the algorithm which shall be used to verify the checksum
Parameters:
Name | Type | Description |
---|---|---|
algorithm |
string | The checksum algorithm (e.g. "SHA") |
Returns:
The Downloader object
- Type
- Downloader
algorithm(algorithm) → {Resource}
Sets the checksum algorithm
Parameters:
Name | Type | Description |
---|---|---|
algorithm |
string | The algorithm to verify the checksum (e.g. "SHA") |
Returns:
The Resource object
- Type
- Resource
application(application) → {AppResource}
Sets the application containing the resources
Parameters:
Name | Type | Description |
---|---|---|
application |
string | The application with the resource |
Returns:
The AppResource object
- Type
- AppResource
architecture() → {string}
Returns:
architecture ("x86" or "amd64")
- Type
- string
arguments(args) → {WineShortcut}
Sets the shortcut arguments
Parameters:
Name | Type | Description |
---|---|---|
args |
array | The shortcut arguments |
Returns:
The WineShortcut object
- Type
- WineShortcut
availableDistributions(architectureNameopt) → {Array.<string>}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
architectureName |
string |
<optional> |
current architecture | Wine architecture |
Returns:
available versions
- Type
- Array.<string>
availableVersions(distributionNameopt) → {Array.<string>}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
distributionName |
string |
<optional> |
current distribution | name of the Wine distribution |
Returns:
available versions
- Type
- Array.<string>
binPath(subCategoryopt, versionopt) → {string}
returns the path to the engine binary directory
if no parameters are given, the Wine version of the current prefix is used
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
subCategory |
string |
<optional> |
Wine sub-category |
version |
string |
<optional> |
Wine version |
Returns:
path to "wine" binary
- Type
- string
category(category) → {WineShortcut}
Sets the shortcut category
Parameters:
Name | Type | Description |
---|---|---|
category |
string | The shortcut category |
Returns:
The WineShortcut object
- Type
- WineShortcut
categoryIcon(icon) → {WineShortcut}
Sets the category icon for the shortcut
Parameters:
Name | Type | Description |
---|---|---|
icon |
Array.<string> | URI | An array which specifies the category of which the icon shall be used or URI of the icon |
Returns:
The WineShortcut object
- Type
- WineShortcut
checksum(checksum) → {Downloader}
Sets the checksum
Parameters:
Name | Type | Description |
---|---|---|
checksum |
string | The checksum which shall be used to verify the download |
Returns:
The Downloader object
- Type
- Downloader
checksum(checksum) → {Resource}
Sets the checksum which shall be used to verify the resource
Parameters:
Name | Type | Description |
---|---|---|
checksum |
string | The checksum |
Returns:
The Resource object
- Type
- Resource
create() → {Wine}
runs "wineboot"
Returns:
Wine object
- Type
- Wine
create() → {void}
Creates a new shortcut
Returns:
- Type
- void
description(description) → {WineShortcut}
Sets the shortcut description
Parameters:
Name | Type | Description |
---|---|---|
description |
string | The shortcut description |
Returns:
The WineShortcut object
- Type
- WineShortcut
directory(directory) → {Resource}
Sets the directory inside the resources directory where the Resource is stored
Parameters:
Name | Type | Description |
---|---|---|
directory |
string | The directory path |
Returns:
The Resource object
- Type
- Resource
dosConfigFile() → {string}
Fetch the prefix dosbox configuration file
Returns:
The dosbox configuration file path
- Type
- string
download(setupWizard) → {String}
Download the setup resources in the same directory, and returns the path of the .exe
Parameters:
Name | Type | Description |
---|---|---|
setupWizard |
SetupWizard | The setup wizard |
Returns:
The .exe file entry that can be used to continue the installation
- Type
- String
downloadFinished(wine) → {boolean}
Checks whether the software download has finished.
To get a valid result with this method `downloadStarted(wine)` needs to return `true` first
Parameters:
Name | Type | Description |
---|---|---|
wine |
Wine | The wine engine object |
Returns:
True if the download has finished, false otherwise
- Type
- boolean
downloadStarted(wine) → {boolean}
Checks whether the software download has started
Parameters:
Name | Type | Description |
---|---|---|
wine |
Wine | The wine engine object |
Returns:
True if the download has started, false otherwise
- Type
- boolean
environment(environment) → {QuickScript}
set environment
Parameters:
Name | Type | Description |
---|---|---|
environment |
string | variables |
Returns:
QuickScript object
- Type
- QuickScript
environment(environment) → {WineShortcut}
Sets the shortcut environment variables
Parameters:
Name | Type | Description |
---|---|---|
environment |
string | The environment variables |
Returns:
The WineShortcut object
- Type
- WineShortcut
executable(executable, args) → {QuickScript}
set executable
Parameters:
Name | Type | Description |
---|---|---|
executable |
string | executable without path (e.g. "Steam.exe") |
args |
array | use array (e.g. ["-applaunch", 409160]) |
Returns:
QuickScript object
- Type
- QuickScript
fontDirectory() → {string}
Returns:
font directory
- Type
- string
get(resourceName) → {Resource}
Returns the searched resource
Parameters:
Name | Type | Description |
---|---|---|
resourceName |
string | The name of the resource |
Returns:
The found resource
- Type
- Resource
get() → {String}
Gets the content of the downloaded file
Returns:
The content of downloaded file
- Type
- String
get() → {string}
Fetches the Resource and returns the path leading to the downloaded resource
Returns:
The path leading to the downloaded resource
- Type
- string
getContainer() → {string}
Returns the name of the container belonging to a shortcut
Returns:
The container name
- Type
- string
getSettings() → {object}
Fetch all prefix dosbox sttings
Returns:
All the settings
- Type
- object
gogSetupFileName(setupFileName) → {GogScript}
Sets one setup file name so that the script can fetch it from gog.com
Parameters:
Name | Type | Description |
---|---|---|
setupFileName |
string | The setup file name |
Returns:
This
- Type
- GogScript
gogSetupFileNames(setupFileNames) → {GogScript}
Sets the setup file(s) name so that the script can fetch it from gog.com
Parameters:
Name | Type | Description |
---|---|---|
setupFileNames |
Array.<string> | The setup file name(s) |
Returns:
This
- Type
- GogScript
headers(headers) → {Downloader}
Sets the http headers
Parameters:
Name | Type | Description |
---|---|---|
headers |
Object | The http headers |
Returns:
The Downloader object
- Type
- Downloader
isHdpi() → {boolean}
Fetches whether hdpi is enabled or not
Returns:
True if hdpi is enabled, false otherwise
- Type
- boolean
json() → {any}
Gets the content of the downloaded file and returns it as a JSON value
Returns:
The json value
- Type
- any
kill() → {Wine}
kill wine server
Returns:
Wine object
- Type
- Wine
loginToGog(setupWizard) → {GogScript}
Presents a Gog.com login window to the user, login to its account and return a token that can be used later.
Stores the tocken in a parameter
Parameters:
Name | Type | Description |
---|---|---|
setupWizard |
SetupWizard | The setupWizard to use |
Returns:
This
- Type
- GogScript
message(message) → {Downloader}
Sets the download message text
Parameters:
Name | Type | Description |
---|---|---|
message |
string | The download message |
Returns:
The Downloader object
- Type
- Downloader
miniature(miniatureopt) → {java.util.Optional}
get/set miniature (for the installation and the shortcut)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
miniature |
URI |
<optional> |
path to the miniature file |
Returns:
path to miniature (if used as getter), else QuickScript object
- Type
- java.util.Optional
miniature(miniature) → {WineShortcut}
Sets the miniature for the shortcut
Parameters:
Name | Type | Description |
---|---|---|
miniature |
Array.<string> | URI | An array which specifies the application of which the miniature shall be used or URI of the miniature |
Returns:
The WineShortcut object
- Type
- WineShortcut
name(name) → {WineShortcut}
Sets the shortcut name
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The shortcut name |
Returns:
The WineShortcut object
- Type
- WineShortcut
name(name) → {Resource}
Sets the resource name
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The name of the resource |
Returns:
The Resource object
- Type
- Resource
of(shortcut) → {void}
Sets shortcut
Parameters:
Name | Type | Description |
---|---|---|
shortcut |
string | shortcut |
Returns:
- Type
- void
onlyIfUpdateAvailable(onlyIfUpdateAvailable) → {Downloader}
Specifies if the download shall be executed only if a newer version is available
Parameters:
Name | Type | Description |
---|---|---|
onlyIfUpdateAvailable |
boolean | true the download shall be executed only if a newer version is available |
Returns:
The Downloader object
- Type
- Downloader
prefix(prefixopt, distributionopt, architectureopt, versionopt) → {string|Wine}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
prefix |
string |
<optional> |
Wine prefix |
distribution |
string |
<optional> |
Wine distribution |
architecture |
string |
<optional> |
Wine architecture |
version |
string |
<optional> |
Wine version |
Returns:
if used as getter, Wine prefix else Wine object
- Type
- string | Wine
prefix(prefix) → {WineShortcut}
Sets the shortcut prefix
Parameters:
Name | Type | Description |
---|---|---|
prefix |
string | The shortcut prefix |
Returns:
The WineShortcut object
- Type
- WineShortcut
prefixDirectory() → {string}
returns prefix directory
Returns:
Wine prefix directory
- Type
- string
programFiles() → {string}
Returns:
name of "Program Files"
- Type
- string
run(executable, argsopt, workingDirectoryopt, captureOutputopt, waitopt, userDataopt) → {string}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
executable |
string | path of the executable | ||
args |
array |
<optional> |
[] | command line arguments |
workingDirectory |
string |
<optional> |
working container | working directory |
captureOutput |
boolean |
<optional> |
false | whether or not the output of the executable shall be captured |
wait |
boolean |
<optional> |
false | true, if method shall wait until execution has finished |
userData |
map |
<optional> |
empty | user data |
Returns:
output
- Type
- string
run(userArguments) → {void}
Runs a shortcut with the given user arguments
Parameters:
Name | Type | Description |
---|---|---|
userArguments |
array | The user arguments |
Returns:
- Type
- void
runInsidePrefix(executable, argsopt, waitopt) → {string}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
executable |
string | path of the executable | ||
args |
array |
<optional> |
[] | command line arguments |
wait |
boolean |
<optional> |
false | true, if method shall wait until execution has finished |
Returns:
output
- Type
- string
search(search) → {WineShortcut}
Sets the executable which shall be used
Parameters:
Name | Type | Description |
---|---|---|
search |
string | The executable name |
Returns:
The WineShortcut object
- Type
- WineShortcut
setupPathInsidePrefix(setupPath) → {ZipScript}
If setupPath is provided, ZipScript will try to execute the .exe when the archive is extracted
Parameters:
Name | Type | Description |
---|---|---|
setupPath |
string | path of the setup in |
Returns:
This
- Type
- ZipScript
stop() → {void}
Stops the running shortcut
Returns:
- Type
- void
system32directory() → {string}
Returns:
system32 directory
- Type
- string
system64directory() → {string}
Returns:
system64 directory
- Type
- string
to(localDestination) → {Downloader}
Sets the download destination
Parameters:
Name | Type | Description |
---|---|---|
localDestination |
string | The destination of the download. If it is a directory, the file will be placed inside |
Returns:
The Downloader object
- Type
- Downloader
trustLevel(trustLevel) → {QuickScript}
set trust level
Parameters:
Name | Type | Description |
---|---|---|
trustLevel |
string | trust level |
Returns:
QuickScript object
- Type
- QuickScript
trustLevel(trustLevel) → {WineShortcut}
Sets the trust level
Parameters:
Name | Type | Description |
---|---|---|
trustLevel |
string | The trust level |
Returns:
The WineShortcut object
- Type
- WineShortcut
type(type) → {WineShortcut}
Sets the shortcut type
Parameters:
Name | Type | Description |
---|---|---|
type |
string | The shortcut type |
Returns:
The WineShortcut object
- Type
- WineShortcut
uninstall(application) → {bool}
uninstall application
Parameters:
Name | Type | Description |
---|---|---|
application |
string | name of the application which shall be uninstalled |
Returns:
true if an application has been uninstalled, false otherwise
- Type
- bool
uninstall() → {void}
Uninstalls the shortcut
Returns:
- Type
- void
url(url) → {Downloader}
Sets the URL which shall be used for the download
Parameters:
Name | Type | Description |
---|---|---|
url |
string | The URL |
Returns:
The Downloader object
- Type
- Downloader
url(url) → {Resource}
Sets the resource URL
Parameters:
Name | Type | Description |
---|---|---|
url |
string | The URL |
Returns:
The Resource object
- Type
- Resource
wait() → {Wine}
wait until wineserver finishes
Returns:
Wine object
- Type
- Wine
winepath(pathopt) → {String}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
path |
String |
<optional> |
path for "-w" option |
Returns:
output
- Type
- String
wineServer(parameter) → {void}
executes wineserver in current prefix
Parameters:
Name | Type | Description |
---|---|---|
parameter |
string | parameters |
Returns:
- Type
- void
withApplicationWindowsVersion(application, os) → {WindowsVersion}
Specifies the windows version for a given application
Parameters:
Name | Type | Description |
---|---|---|
application |
string | The application executable |
os |
string | The windows version |
Returns:
This
- Type
- WindowsVersion
withCpuCycles(cpuCycles) → {Dosbox}
Sets CPU cycles in the current prefix
https://www.dosbox.com/wiki/dosbox.conf#.5Bcpu.5D
Parameters:
Name | Type | Description |
---|---|---|
cpuCycles |
int | (example: max 95% limit 33000) |
Returns:
This
- Type
- Dosbox
withDimensions(width, height) → {VirtualDesktop}
Specifies the dimensions of the virtual desktop
Parameters:
Name | Type | Description |
---|---|---|
width |
number | width of virtual desktop (in px) |
height |
number | height of virtual desktop (in px) |
Returns:
This
- Type
- VirtualDesktop
withDriver(driver) → {SoundDriver}
Specifies the used sound driver
Parameters:
Name | Type | Description |
---|---|---|
driver |
string | alsa or pulse |
Returns:
This
- Type
- SoundDriver
withExtension(extension) → {NativeApplication}
Specifies the file extension
Parameters:
Name | Type | Description |
---|---|---|
extension |
string | The file extension (pdf, txt, rtf) |
Returns:
This
- Type
- NativeApplication
withHdpi(hdpi) → {HDPI}
Specifies whether hdpi should be enabled or not
Parameters:
Name | Type | Description |
---|---|---|
hdpi |
boolean | true if hdpi shall be enabled |
Returns:
This
- Type
- HDPI
withManaged(managed) → {Managed}
Specifies the global managed state
Parameters:
Name | Type | Description |
---|---|---|
managed |
boolean | True if it shall be managed |
Returns:
This
- Type
- Managed
withManagedApplication(application, managed) → {Managed}
Specifies the managed state for a given application
Parameters:
Name | Type | Description |
---|---|---|
application |
string | The application |
managed |
boolean | True if the application shall be managed |
Returns:
This
- Type
- Managed
withMemSize(memSize) → {Dosbox}
Sets dosbox_memsize parameter in the current prefix
https://www.dosbox.com/wiki/dosbox.conf#.5Bdosbox.5D
Parameters:
Name | Type | Description |
---|---|---|
memSize |
int | The memory size |
Returns:
This
- Type
- Dosbox
withMode(mode) → {DirectDrawRenderer}
Selects the used direct draw mode (either gdi or opengl)
Parameters:
Name | Type | Description |
---|---|---|
mode |
string | gdi or opengl |
Returns:
This
- Type
- DirectDrawRenderer
withMode(mode) → {FontSmoothing}
Specifies the used font smoothing mode
Parameters:
Name | Type | Description |
---|---|---|
mode |
string | "RGB", "BGR" or "Gray Scale" |
Returns:
This
- Type
- FontSmoothing
withMode(mode) → {GLSL}
Specifies the mode
Parameters:
Name | Type | Description |
---|---|---|
mode |
string | enabled or disabled |
Returns:
This
- Type
- GLSL
withMode(mode) → {TakeFocus}
Specifies the mode
Parameters:
Name | Type | Description |
---|---|---|
mode |
string | "Y" or "N" |
Returns:
This
- Type
- TakeFocus
withRenderAspect(renderAspect) → {Dosbox}
Sets render_aspect parameter in the current prefix
https://www.dosbox.com/wiki/dosbox.conf#.5Brender.5D
Parameters:
Name | Type | Description |
---|---|---|
renderAspect |
boolean | The render aspect |
Returns:
This
- Type
- Dosbox
withRenderFrameSkip(renderFrameSkip) → {Dosbox}
Sets render_frameskip parameter in the current prefix
https://www.dosbox.com/wiki/dosbox.conf#.5Brender.5D
Parameters:
Name | Type | Description |
---|---|---|
renderFrameSkip |
int | The render frameskip |
Returns:
This
- Type
- Dosbox
withScript(command) → {PlainInstaller}
Sets the installation script consisting of a lambda function
Parameters:
Name | Type | Description |
---|---|---|
command |
function | The installation command |
Returns:
The PlainInstaller object
- Type
- PlainInstaller
withSetting(key, value) → {Dosbox}
Sets a dosbox setting
Parameters:
Name | Type | Description |
---|---|---|
key |
string | The key of the setting (example dosbox_memsize) |
value |
any | The value to be set |
Returns:
This
- Type
- Dosbox
withVersion(major, minor) → {OpenGL}
Specifies the major and minor versions
Parameters:
Name | Type | Description |
---|---|---|
major |
number | The major version |
minor |
number | The minor version |
Returns:
This
- Type
- OpenGL
withWindowsVersion(version, servicePack) → {WindowsVersion}
Specifies the default windows version
Parameters:
Name | Type | Description |
---|---|---|
version |
string | win7, vista, win2003, winxp, win2k, winnt, winme, win98, win95, win31 |
servicePack |
string | e.g. sp3 |
Returns:
This
- Type
- WindowsVersion
wizard(wizardopt) → {SetupWizard|Wine}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
wizard |
SetupWizard |
<optional> |
setup wizard |
Returns:
if used as getter, setup wizard else Wine object
- Type
- SetupWizard | Wine
wizard(wizard) → {Downloader}
Sets the setup wizard
Parameters:
Name | Type | Description |
---|---|---|
wizard |
SetupWizard | The setup wizard |
Returns:
The Downloader object
- Type
- Downloader
wizard(wizard) → {Resource}
Sets the setup wizard
Parameters:
Name | Type | Description |
---|---|---|
wizard |
SetupWizard | The setup wizard |
Returns:
The Resource object
- Type
- Resource