From 96060381832bcf81d54315d8b9d36aec445989ca Mon Sep 17 00:00:00 2001 From: ayushmanchhabra Date: Wed, 18 Oct 2023 19:35:30 +0000 Subject: [PATCH] deploy: efb17e9af74a655494f3f717fe98fdbd9c9b8ec7 --- 404.html | 2 +- assets/mode-build.md.4bf4a75e.js | 7 ---- assets/mode-build.md.4bf4a75e.lean.js | 1 - assets/mode-build.md.78e2ae4c.js | 55 ++++++++++++++++++++++++++ assets/mode-build.md.78e2ae4c.lean.js | 1 + hashmap.json | 2 +- index.html | 2 +- mode-build.html | 56 +++++++++++++++++++++++++-- mode-get.html | 2 +- mode-run.html | 2 +- 10 files changed, 113 insertions(+), 17 deletions(-) delete mode 100644 assets/mode-build.md.4bf4a75e.js delete mode 100644 assets/mode-build.md.4bf4a75e.lean.js create mode 100644 assets/mode-build.md.78e2ae4c.js create mode 100644 assets/mode-build.md.78e2ae4c.lean.js diff --git a/404.html b/404.html index 49b5f0062..d3496c745 100644 --- a/404.html +++ b/404.html @@ -14,7 +14,7 @@
Skip to content

404

PAGE NOT FOUND

But if you don't change your direction, and if you keep looking, you may end up where you are heading.
- + \ No newline at end of file diff --git a/assets/mode-build.md.4bf4a75e.js b/assets/mode-build.md.4bf4a75e.js deleted file mode 100644 index e5f72a77a..000000000 --- a/assets/mode-build.md.4bf4a75e.js +++ /dev/null @@ -1,7 +0,0 @@ -import{_ as t,o as e,c as o,Q as d}from"./chunks/framework.cdb141a4.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"mode-build.md","filePath":"mode-build.md"}'),r={name:"mode-build.md"},i=d(`

Functions

build(files, nwDir, outDir, platform, zip, app)Promise.<undefined>

Generate NW build artifacts

Note: File permissions are incorrectly set for Linux or MacOS apps built on Windows platform. For more info: https://www.geeksforgeeks.org/node-js-fs-chmod-method

Note: To edit Windows executable resources, we use rcedit. To use rcedit on non-Windows platforms, you will have to install Wine.

Note: We recursively glob the file patterns given by the user. The first package.json parsed is taken to be the NW.js manifest file. If you have multiple manifest files, the first glob pattern should be the path to the NW.js manifest. Choosing a Node manifest at ./package.json is the most convenient option.

Note: If you are using the MacOS ARM unofficial builds, you will need to remove the com.apple.qurantine flag:

sudo xattr -r -d com.apple.quarantine nwjs.app

Typedefs

LinuxRc : object

References: https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html

OsxRc : object

References: https://developer.apple.com/documentation/bundleresources/information_property_list

WinRc : object

References: https://learn.microsoft.com/en-us/windows/win32/msi/versionhttps://learn.microsoft.com/en-gb/windows/win32/sbscs/application-manifestshttps://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2015/deployment/trustinfo-element-clickonce-application?view=vs-2015#requestedexecutionlevelhttps://learn.microsoft.com/en-gb/windows/win32/menurc/versioninfo-resource

build(files, nwDir, outDir, platform, zip, app) ⇒ Promise.<undefined>

Generate NW build artifacts

Note: File permissions are incorrectly set for Linux or MacOS apps built on Windows platform. For more info: https://www.geeksforgeeks.org/node-js-fs-chmod-method

Note: To edit Windows executable resources, we use rcedit. To use rcedit on non-Windows platforms, you will have to install Wine.

Note: We recursively glob the file patterns given by the user. The first package.json parsed is taken to be the NW.js manifest file. If you have multiple manifest files, the first glob pattern should be the path to the NW.js manifest. Choosing a Node manifest at ./package.json is the most convenient option.

Note: If you are using the MacOS ARM unofficial builds, you will need to remove the com.apple.qurantine flag:

sudo xattr -r -d com.apple.quarantine nwjs.app

Kind: global function

ParamTypeDescription
filesstring | Array.<string>Array of NW app files
nwDirstringDirectory to hold NW binaries
outDirstringDirectory to store build artifacts
platform"linux" | "osx" | "win"Platform is the operating system type
zip"zip" | booleanSpecify if the build artifacts are to be zipped
appLinuxRc | OsxRc | WinRcMulti platform configuration options

Example

js
// Minimal Usage (uses default values)
-nwbuild({
-  mode: "build",
-});
// Minimal Usage (uses default values)
-nwbuild({
-  mode: "build",
-});

LinuxRc : object

References: https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html

Kind: global typedef
Properties

NameTypeDescription
namestringName of the application
genericNamestringGeneric name of the application
noDisplaybooleanIf true the application is not displayed
commentstringTooltip for the entry, for example "View sites on the Internet".
iconstringIcon to display in file manager, menus, etc.
hiddenbooleanTBD
onlyShowInArray.<string>A list of strings identifying the desktop environments that should (/not) display a given desktop entry
notShowInArray.<string>A list of strings identifying the desktop environments that should (/not) display a given desktop entry
dBusActivatablebooleanA boolean value specifying if D-Bus activation is supported for this application
tryExecstringPath to an executable file on disk used to determine if the program is actually installed
execstringProgram to execute, possibly with arguments.
pathstringIf entry is of type Application, the working directory to run the program in.
terminalbooleanWhether the program runs in a terminal window.
actionsArray.<string>Identifiers for application actions.
mimeTypeArray.<string>The MIME type(s) supported by this application.
categoriesArray.<string>Categories in which the entry should be shown in a menu
implementsArray.<string>A list of interfaces that this application implements.
keywordsArray.<string>A list of strings which may be used in addition to other metadata to describe this entry.
startupNotifybooleanIf true, it is KNOWN that the application will send a "remove" message when started with the DESKTOP_STARTUP_ID environment variable set. If false, it is KNOWN that the application does not work with startup notification at all.
startupWMClassstringIf specified, it is known that the application will map at least one window with the given string as its WM class or WM name hin
prefersNonDefaultGPUbooleanIf true, the application prefers to be run on a more powerful discrete GPU if available.
singleMainWindowstringIf true, the application has a single main window, and does not support having an additional one opened.

OsxRc : object

References: https://developer.apple.com/documentation/bundleresources/information_property_list

Kind: global typedef
Properties

NameTypeDescription
namestringThe name of the application
iconstringThe path to the icon file. It should be a .icns file.
LSApplicationCategoryTypestringThe category that best describes your app for the App Store.
CFBundleIdentifierstringA unique identifier for a bundle usually in reverse DNS format.
CFBundleNamestringA user-visible short name for the bundle.
CFBundleDisplayNamestringThe user-visible name for the bundle.
CFBundleSpokenNamestringA replacement for the app name in text-to-speech operations.
CFBundleVersionstringThe version of the build that identifies an iteration of the bundle.
CFBundleShortVersionStringstringThe release or version number of the bundle.
NSHumanReadableCopyrightstringA human-readable copyright notice for the bundle.

WinRc : object

References: https://learn.microsoft.com/en-us/windows/win32/msi/versionhttps://learn.microsoft.com/en-gb/windows/win32/sbscs/application-manifestshttps://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2015/deployment/trustinfo-element-clickonce-application?view=vs-2015#requestedexecutionlevelhttps://learn.microsoft.com/en-gb/windows/win32/menurc/versioninfo-resource

Kind: global typedef
Properties

NameTypeDescription
namestringThe name of the application
versionstringThe version of the application
commentsstringAdditional information that should be displayed for diagnostic purposes.
companystringCompany that produced the file—for example, Microsoft Corporation or Standard Microsystems Corporation, Inc. This string is required.
fileDescriptionstringFile description to be presented to users. This string may be displayed in a list box when the user is choosing files to install. For example, Keyboard Driver for AT-Style Keyboards. This string is required.
fileVersionstringVersion number of the file. For example, 3.10 or 5.00.RC2. This string is required.
iconstringThe path to the icon file. It should be a .ico file.
internalNamestringInternal name of the file, if one exists—for example, a module name if the file is a dynamic-link library. If the file has no internal name, this string should be the original filename, without extension. This string is required.
legalCopyrightstringCopyright notices that apply to the file. This should include the full text of all notices, legal symbols, copyright dates, and so on. This string is optional.
legalTrademarkstringTrademarks and registered trademarks that apply to the file. This should include the full text of all notices, legal symbols, trademark numbers, and so on. This string is optional.
originalFilenamestringOriginal name of the file, not including a path. This information enables an application to determine whether a file has been renamed by a user. The format of the name depends on the file system for which the file was created. This string is required.
privateBuildstringInformation about a private version of the file—for example, Built by TESTER1 on \\TESTBED. This string should be present only if VS_FF_PRIVATEBUILD is specified in the fileflags parameter of the root block.
productNamestringName of the product with which the file is distributed. This string is required.
productVersionstringVersion of the product with which the file is distributed—for example, 3.10 or 5.00.RC2. This string is required.
specialBuildstringText that specifies how this version of the file differs from the standard version—for example, Private build for TESTER1 solving mouse problems on M250 and M250E computers. This string should be present only if VS_FF_SPECIALBUILD is specified in the fileflags parameter of the root block.
`,31),s=[i];function n(a,c,l,p,h,f){return e(),o("div",null,s)}const g=t(r,[["render",n]]);export{m as __pageData,g as default}; diff --git a/assets/mode-build.md.4bf4a75e.lean.js b/assets/mode-build.md.4bf4a75e.lean.js deleted file mode 100644 index 669ed4d91..000000000 --- a/assets/mode-build.md.4bf4a75e.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,o as e,c as o,Q as d}from"./chunks/framework.cdb141a4.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"mode-build.md","filePath":"mode-build.md"}'),r={name:"mode-build.md"},i=d("",31),s=[i];function n(a,c,l,p,h,f){return e(),o("div",null,s)}const g=t(r,[["render",n]]);export{m as __pageData,g as default}; diff --git a/assets/mode-build.md.78e2ae4c.js b/assets/mode-build.md.78e2ae4c.js new file mode 100644 index 000000000..6cd9f25d6 --- /dev/null +++ b/assets/mode-build.md.78e2ae4c.js @@ -0,0 +1,55 @@ +import{_ as e,o as t,c as s,Q as n}from"./chunks/framework.cdb141a4.js";const f=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"mode-build.md","filePath":"mode-build.md"}'),a={name:"mode-build.md"},o=n(`

Functions

build(files, nwDir, outDir, platform, zip, managedManifest, nwPkg, app)Promise.<undefined>

Generate NW build artifacts

Note: File permissions are incorrectly set for Linux or MacOS apps built on Windows platform. For more info: https://www.geeksforgeeks.org/node-js-fs-chmod-method

Note: To edit Windows executable resources, we use rcedit. To use rcedit on non-Windows platforms, you will have to install Wine.

Note: We recursively glob the file patterns given by the user. The first package.json parsed is taken to be the NW.js manifest file. If you have multiple manifest files, the first glob pattern should be the path to the NW.js manifest. Choosing a Node manifest at ./package.json is the most convenient option.

Note: If you are using the MacOS ARM unofficial builds, you will need to remove the com.apple.qurantine flag:

sudo xattr -r -d com.apple.quarantine nwjs.app

Typedefs

LinuxRc : object

References: https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html

OsxRc : object

References: https://developer.apple.com/documentation/bundleresources/information_property_list

WinRc : object

References: https://learn.microsoft.com/en-us/windows/win32/msi/versionhttps://learn.microsoft.com/en-gb/windows/win32/sbscs/application-manifestshttps://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2015/deployment/trustinfo-element-clickonce-application?view=vs-2015#requestedexecutionlevelhttps://learn.microsoft.com/en-gb/windows/win32/menurc/versioninfo-resource

build(files, nwDir, outDir, platform, zip, managedManifest, nwPkg, app) ⇒ Promise.<undefined>

Generate NW build artifacts

Note: File permissions are incorrectly set for Linux or MacOS apps built on Windows platform. For more info: https://www.geeksforgeeks.org/node-js-fs-chmod-method

Note: To edit Windows executable resources, we use rcedit. To use rcedit on non-Windows platforms, you will have to install Wine.

Note: We recursively glob the file patterns given by the user. The first package.json parsed is taken to be the NW.js manifest file. If you have multiple manifest files, the first glob pattern should be the path to the NW.js manifest. Choosing a Node manifest at ./package.json is the most convenient option.

Note: If you are using the MacOS ARM unofficial builds, you will need to remove the com.apple.qurantine flag:

sudo xattr -r -d com.apple.quarantine nwjs.app

Kind: global function

ParamTypeDescription
filesstring | Array.<string>Array of NW app files
nwDirstringDirectory to hold NW binaries
outDirstringDirectory to store build artifacts
platform"linux" | "osx" | "win"Platform is the operating system type
zip"zip" | booleanSpecify if the build artifacts are to be zipped
managedManifestboolean | string | objectManaged Manifest mode
nwPkgstringNW.js manifest file
appLinuxRc | OsxRc | WinRcMulti platform configuration options

Example

js
// Minimal Usage (uses default values)
+nwbuild({
+  mode: "build",
+});
// Minimal Usage (uses default values)
+nwbuild({
+  mode: "build",
+});

Example

js
// Managed Manifest mode
+nwbuild({
+  mode: "build",
+  managedManifest: true
+});
+
+This will parse the first \`package.json\` it encounters as the NW.js manifest.
+This is a good way to quickly bootstrap a web/node application as a NW.js application.
+It will remove any development dependencies, autodetect the package manager via \`packageManager\` and download the relevant dependencies.
// Managed Manifest mode
+nwbuild({
+  mode: "build",
+  managedManifest: true
+});
+
+This will parse the first \`package.json\` it encounters as the NW.js manifest.
+This is a good way to quickly bootstrap a web/node application as a NW.js application.
+It will remove any development dependencies, autodetect the package manager via \`packageManager\` and download the relevant dependencies.

Example

js
// Managed Manifest JSON
+nwbuild({
+  mode: "build",
+  managedManifest: { name: "demo", "main": "index.html" }
+});
+
+This will ignore the first \`package.json\` it encounters and use the user input JSON instead.
+This is good way to customise your existing NW.js application after bootstrapping it.
+It will remove any development dependencies, autodetect the package manager via \`packageManager\` and download the relevant dependencies.
// Managed Manifest JSON
+nwbuild({
+  mode: "build",
+  managedManifest: { name: "demo", "main": "index.html" }
+});
+
+This will ignore the first \`package.json\` it encounters and use the user input JSON instead.
+This is good way to customise your existing NW.js application after bootstrapping it.
+It will remove any development dependencies, autodetect the package manager via \`packageManager\` and download the relevant dependencies.

Example

js
// Managed Manifest File
+nwbuild({
+  mode: "build",
+  managedManifest: "./manifest.json"
+});
+
+Similar to Managed Manifest JSON, this will also ignore the first \`package.json\` it encounters and use the manifest file provided by the user instead.
+This is good way to customise your existing NW.js application after bootstrapping it. Using JSON vs file is matter of preference.
+It will remove any development dependencies, autodetect the package manager via \`packageManager\` and download the relevant dependencies.
// Managed Manifest File
+nwbuild({
+  mode: "build",
+  managedManifest: "./manifest.json"
+});
+
+Similar to Managed Manifest JSON, this will also ignore the first \`package.json\` it encounters and use the manifest file provided by the user instead.
+This is good way to customise your existing NW.js application after bootstrapping it. Using JSON vs file is matter of preference.
+It will remove any development dependencies, autodetect the package manager via \`packageManager\` and download the relevant dependencies.

LinuxRc : object

References: https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html

Kind: global typedef
Properties

NameTypeDescription
namestringName of the application
genericNamestringGeneric name of the application
noDisplaybooleanIf true the application is not displayed
commentstringTooltip for the entry, for example "View sites on the Internet".
iconstringIcon to display in file manager, menus, etc.
hiddenbooleanTBD
onlyShowInArray.<string>A list of strings identifying the desktop environments that should (/not) display a given desktop entry
notShowInArray.<string>A list of strings identifying the desktop environments that should (/not) display a given desktop entry
dBusActivatablebooleanA boolean value specifying if D-Bus activation is supported for this application
tryExecstringPath to an executable file on disk used to determine if the program is actually installed
execstringProgram to execute, possibly with arguments.
pathstringIf entry is of type Application, the working directory to run the program in.
terminalbooleanWhether the program runs in a terminal window.
actionsArray.<string>Identifiers for application actions.
mimeTypeArray.<string>The MIME type(s) supported by this application.
categoriesArray.<string>Categories in which the entry should be shown in a menu
implementsArray.<string>A list of interfaces that this application implements.
keywordsArray.<string>A list of strings which may be used in addition to other metadata to describe this entry.
startupNotifybooleanIf true, it is KNOWN that the application will send a "remove" message when started with the DESKTOP_STARTUP_ID environment variable set. If false, it is KNOWN that the application does not work with startup notification at all.
startupWMClassstringIf specified, it is known that the application will map at least one window with the given string as its WM class or WM name hin
prefersNonDefaultGPUbooleanIf true, the application prefers to be run on a more powerful discrete GPU if available.
singleMainWindowstringIf true, the application has a single main window, and does not support having an additional one opened.

OsxRc : object

References: https://developer.apple.com/documentation/bundleresources/information_property_list

Kind: global typedef
Properties

NameTypeDescription
namestringThe name of the application
iconstringThe path to the icon file. It should be a .icns file.
LSApplicationCategoryTypestringThe category that best describes your app for the App Store.
CFBundleIdentifierstringA unique identifier for a bundle usually in reverse DNS format.
CFBundleNamestringA user-visible short name for the bundle.
CFBundleDisplayNamestringThe user-visible name for the bundle.
CFBundleSpokenNamestringA replacement for the app name in text-to-speech operations.
CFBundleVersionstringThe version of the build that identifies an iteration of the bundle.
CFBundleShortVersionStringstringThe release or version number of the bundle.
NSHumanReadableCopyrightstringA human-readable copyright notice for the bundle.

WinRc : object

References: https://learn.microsoft.com/en-us/windows/win32/msi/versionhttps://learn.microsoft.com/en-gb/windows/win32/sbscs/application-manifestshttps://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2015/deployment/trustinfo-element-clickonce-application?view=vs-2015#requestedexecutionlevelhttps://learn.microsoft.com/en-gb/windows/win32/menurc/versioninfo-resource

Kind: global typedef
Properties

NameTypeDescription
namestringThe name of the application
versionstringThe version of the application
commentsstringAdditional information that should be displayed for diagnostic purposes.
companystringCompany that produced the file—for example, Microsoft Corporation or Standard Microsystems Corporation, Inc. This string is required.
fileDescriptionstringFile description to be presented to users. This string may be displayed in a list box when the user is choosing files to install. For example, Keyboard Driver for AT-Style Keyboards. This string is required.
fileVersionstringVersion number of the file. For example, 3.10 or 5.00.RC2. This string is required.
iconstringThe path to the icon file. It should be a .ico file.
internalNamestringInternal name of the file, if one exists—for example, a module name if the file is a dynamic-link library. If the file has no internal name, this string should be the original filename, without extension. This string is required.
legalCopyrightstringCopyright notices that apply to the file. This should include the full text of all notices, legal symbols, copyright dates, and so on. This string is optional.
legalTrademarkstringTrademarks and registered trademarks that apply to the file. This should include the full text of all notices, legal symbols, trademark numbers, and so on. This string is optional.
originalFilenamestringOriginal name of the file, not including a path. This information enables an application to determine whether a file has been renamed by a user. The format of the name depends on the file system for which the file was created. This string is required.
privateBuildstringInformation about a private version of the file—for example, Built by TESTER1 on \\TESTBED. This string should be present only if VS_FF_PRIVATEBUILD is specified in the fileflags parameter of the root block.
productNamestringName of the product with which the file is distributed. This string is required.
productVersionstringVersion of the product with which the file is distributed—for example, 3.10 or 5.00.RC2. This string is required.
specialBuildstringText that specifies how this version of the file differs from the standard version—for example, Private build for TESTER1 solving mouse problems on M250 and M250E computers. This string should be present only if VS_FF_SPECIALBUILD is specified in the fileflags parameter of the root block.
`,37),r=[o];function l(i,p,d,c,h,u){return t(),s("div",null,r)}const m=e(a,[["render",l]]);export{f as __pageData,m as default}; diff --git a/assets/mode-build.md.78e2ae4c.lean.js b/assets/mode-build.md.78e2ae4c.lean.js new file mode 100644 index 000000000..2feb51afe --- /dev/null +++ b/assets/mode-build.md.78e2ae4c.lean.js @@ -0,0 +1 @@ +import{_ as e,o as t,c as s,Q as n}from"./chunks/framework.cdb141a4.js";const f=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"mode-build.md","filePath":"mode-build.md"}'),a={name:"mode-build.md"},o=n("",37),r=[o];function l(i,p,d,c,h,u){return t(),s("div",null,r)}const m=e(a,[["render",l]]);export{f as __pageData,m as default}; diff --git a/hashmap.json b/hashmap.json index 5356d8375..10545825f 100644 --- a/hashmap.json +++ b/hashmap.json @@ -1 +1 @@ -{"mode-run.md":"546b2fd0","index.md":"16a092f3","mode-get.md":"cba211b3","mode-build.md":"4bf4a75e"} +{"mode-get.md":"cba211b3","index.md":"16a092f3","mode-build.md":"78e2ae4c","mode-run.md":"546b2fd0"} diff --git a/index.html b/index.html index f241d2998..88a7127b8 100644 --- a/index.html +++ b/index.html @@ -53,7 +53,7 @@ "nwbuild": {}
// Node manifest usage
 
 "nwbuild": {}

Options : object

Configuration options

Kind: global typedef
Properties

NameTypeDefaultDescription
[srcDir]"./" | string"./"String of space separated glob patterns which correspond to NW app code
[mode]"get" | "run" | "build""build"Run or build application
[version]"latest" | "stable" | string"latest"NW runtime version
[flavor]"normal" | "sdk""normal"NW runtime build flavor
platform"linux" | "osx" | "win"NW supported platforms
arch"ia32" | "x64" | "arm64"NW supported architectures
[outDir]"./out" | string"./out"Directory to store build artifacts
[cacheDir]"./cache" | string"./cache"Directory to store NW binaries
[downloadUrl]"https://dl.nwjs.io" | string"https://dl.nwjs.io"URI to download NW binaries from
[manifestUrl]"https://nwjs.io/versions&quot; | string"https://nwjs.io/versions&quot;URI to download manifest from
appobjectRefer to Linux/Windows Specific Options under Getting Started in the docs
[cache]booleantrueIf true the existing cache is used. Otherwise it removes and redownloads it.
[zip]boolean | "zip" | "tar" | "tgz"falseIf true, "zip", "tar" or "tgz" the outDir directory is compressed.
[cli]booleanfalseIf true the CLI is used to glob srcDir and parse other options
[ffmpeg]booleanfalseIf true the chromium ffmpeg is replaced by community version
[glob]booleantrueIf true globbing is enabled
[logLevel]"error" | "warn" | "info" | "debug""info"Specified log level.
- + \ No newline at end of file diff --git a/mode-build.html b/mode-build.html index b11b00f32..3d79ddf4c 100644 --- a/mode-build.html +++ b/mode-build.html @@ -11,19 +11,67 @@ - + -
Skip to content

Functions

build(files, nwDir, outDir, platform, zip, app)Promise.<undefined>

Generate NW build artifacts

Note: File permissions are incorrectly set for Linux or MacOS apps built on Windows platform. For more info: https://www.geeksforgeeks.org/node-js-fs-chmod-method

Note: To edit Windows executable resources, we use rcedit. To use rcedit on non-Windows platforms, you will have to install Wine.

Note: We recursively glob the file patterns given by the user. The first package.json parsed is taken to be the NW.js manifest file. If you have multiple manifest files, the first glob pattern should be the path to the NW.js manifest. Choosing a Node manifest at ./package.json is the most convenient option.

Note: If you are using the MacOS ARM unofficial builds, you will need to remove the com.apple.qurantine flag:

sudo xattr -r -d com.apple.quarantine nwjs.app

Typedefs

LinuxRc : object

References: https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html

OsxRc : object

References: https://developer.apple.com/documentation/bundleresources/information_property_list

WinRc : object

References: https://learn.microsoft.com/en-us/windows/win32/msi/versionhttps://learn.microsoft.com/en-gb/windows/win32/sbscs/application-manifestshttps://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2015/deployment/trustinfo-element-clickonce-application?view=vs-2015#requestedexecutionlevelhttps://learn.microsoft.com/en-gb/windows/win32/menurc/versioninfo-resource

build(files, nwDir, outDir, platform, zip, app) ⇒ Promise.<undefined>

Generate NW build artifacts

Note: File permissions are incorrectly set for Linux or MacOS apps built on Windows platform. For more info: https://www.geeksforgeeks.org/node-js-fs-chmod-method

Note: To edit Windows executable resources, we use rcedit. To use rcedit on non-Windows platforms, you will have to install Wine.

Note: We recursively glob the file patterns given by the user. The first package.json parsed is taken to be the NW.js manifest file. If you have multiple manifest files, the first glob pattern should be the path to the NW.js manifest. Choosing a Node manifest at ./package.json is the most convenient option.

Note: If you are using the MacOS ARM unofficial builds, you will need to remove the com.apple.qurantine flag:

sudo xattr -r -d com.apple.quarantine nwjs.app

Kind: global function

ParamTypeDescription
filesstring | Array.<string>Array of NW app files
nwDirstringDirectory to hold NW binaries
outDirstringDirectory to store build artifacts
platform"linux" | "osx" | "win"Platform is the operating system type
zip"zip" | booleanSpecify if the build artifacts are to be zipped
appLinuxRc | OsxRc | WinRcMulti platform configuration options

Example

js
// Minimal Usage (uses default values)
+    
Skip to content

Functions

build(files, nwDir, outDir, platform, zip, managedManifest, nwPkg, app)Promise.<undefined>

Generate NW build artifacts

Note: File permissions are incorrectly set for Linux or MacOS apps built on Windows platform. For more info: https://www.geeksforgeeks.org/node-js-fs-chmod-method

Note: To edit Windows executable resources, we use rcedit. To use rcedit on non-Windows platforms, you will have to install Wine.

Note: We recursively glob the file patterns given by the user. The first package.json parsed is taken to be the NW.js manifest file. If you have multiple manifest files, the first glob pattern should be the path to the NW.js manifest. Choosing a Node manifest at ./package.json is the most convenient option.

Note: If you are using the MacOS ARM unofficial builds, you will need to remove the com.apple.qurantine flag:

sudo xattr -r -d com.apple.quarantine nwjs.app

Typedefs

LinuxRc : object

References: https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html

OsxRc : object

References: https://developer.apple.com/documentation/bundleresources/information_property_list

WinRc : object

References: https://learn.microsoft.com/en-us/windows/win32/msi/versionhttps://learn.microsoft.com/en-gb/windows/win32/sbscs/application-manifestshttps://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2015/deployment/trustinfo-element-clickonce-application?view=vs-2015#requestedexecutionlevelhttps://learn.microsoft.com/en-gb/windows/win32/menurc/versioninfo-resource

build(files, nwDir, outDir, platform, zip, managedManifest, nwPkg, app) ⇒ Promise.<undefined>

Generate NW build artifacts

Note: File permissions are incorrectly set for Linux or MacOS apps built on Windows platform. For more info: https://www.geeksforgeeks.org/node-js-fs-chmod-method

Note: To edit Windows executable resources, we use rcedit. To use rcedit on non-Windows platforms, you will have to install Wine.

Note: We recursively glob the file patterns given by the user. The first package.json parsed is taken to be the NW.js manifest file. If you have multiple manifest files, the first glob pattern should be the path to the NW.js manifest. Choosing a Node manifest at ./package.json is the most convenient option.

Note: If you are using the MacOS ARM unofficial builds, you will need to remove the com.apple.qurantine flag:

sudo xattr -r -d com.apple.quarantine nwjs.app

Kind: global function

ParamTypeDescription
filesstring | Array.<string>Array of NW app files
nwDirstringDirectory to hold NW binaries
outDirstringDirectory to store build artifacts
platform"linux" | "osx" | "win"Platform is the operating system type
zip"zip" | booleanSpecify if the build artifacts are to be zipped
managedManifestboolean | string | objectManaged Manifest mode
nwPkgstringNW.js manifest file
appLinuxRc | OsxRc | WinRcMulti platform configuration options

Example

js
// Minimal Usage (uses default values)
 nwbuild({
   mode: "build",
 });
// Minimal Usage (uses default values)
 nwbuild({
   mode: "build",
-});

LinuxRc : object

References: https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html

Kind: global typedef
Properties

NameTypeDescription
namestringName of the application
genericNamestringGeneric name of the application
noDisplaybooleanIf true the application is not displayed
commentstringTooltip for the entry, for example "View sites on the Internet".
iconstringIcon to display in file manager, menus, etc.
hiddenbooleanTBD
onlyShowInArray.<string>A list of strings identifying the desktop environments that should (/not) display a given desktop entry
notShowInArray.<string>A list of strings identifying the desktop environments that should (/not) display a given desktop entry
dBusActivatablebooleanA boolean value specifying if D-Bus activation is supported for this application
tryExecstringPath to an executable file on disk used to determine if the program is actually installed
execstringProgram to execute, possibly with arguments.
pathstringIf entry is of type Application, the working directory to run the program in.
terminalbooleanWhether the program runs in a terminal window.
actionsArray.<string>Identifiers for application actions.
mimeTypeArray.<string>The MIME type(s) supported by this application.
categoriesArray.<string>Categories in which the entry should be shown in a menu
implementsArray.<string>A list of interfaces that this application implements.
keywordsArray.<string>A list of strings which may be used in addition to other metadata to describe this entry.
startupNotifybooleanIf true, it is KNOWN that the application will send a "remove" message when started with the DESKTOP_STARTUP_ID environment variable set. If false, it is KNOWN that the application does not work with startup notification at all.
startupWMClassstringIf specified, it is known that the application will map at least one window with the given string as its WM class or WM name hin
prefersNonDefaultGPUbooleanIf true, the application prefers to be run on a more powerful discrete GPU if available.
singleMainWindowstringIf true, the application has a single main window, and does not support having an additional one opened.

OsxRc : object

References: https://developer.apple.com/documentation/bundleresources/information_property_list

Kind: global typedef
Properties

NameTypeDescription
namestringThe name of the application
iconstringThe path to the icon file. It should be a .icns file.
LSApplicationCategoryTypestringThe category that best describes your app for the App Store.
CFBundleIdentifierstringA unique identifier for a bundle usually in reverse DNS format.
CFBundleNamestringA user-visible short name for the bundle.
CFBundleDisplayNamestringThe user-visible name for the bundle.
CFBundleSpokenNamestringA replacement for the app name in text-to-speech operations.
CFBundleVersionstringThe version of the build that identifies an iteration of the bundle.
CFBundleShortVersionStringstringThe release or version number of the bundle.
NSHumanReadableCopyrightstringA human-readable copyright notice for the bundle.

WinRc : object

References: https://learn.microsoft.com/en-us/windows/win32/msi/versionhttps://learn.microsoft.com/en-gb/windows/win32/sbscs/application-manifestshttps://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2015/deployment/trustinfo-element-clickonce-application?view=vs-2015#requestedexecutionlevelhttps://learn.microsoft.com/en-gb/windows/win32/menurc/versioninfo-resource

Kind: global typedef
Properties

NameTypeDescription
namestringThe name of the application
versionstringThe version of the application
commentsstringAdditional information that should be displayed for diagnostic purposes.
companystringCompany that produced the file—for example, Microsoft Corporation or Standard Microsystems Corporation, Inc. This string is required.
fileDescriptionstringFile description to be presented to users. This string may be displayed in a list box when the user is choosing files to install. For example, Keyboard Driver for AT-Style Keyboards. This string is required.
fileVersionstringVersion number of the file. For example, 3.10 or 5.00.RC2. This string is required.
iconstringThe path to the icon file. It should be a .ico file.
internalNamestringInternal name of the file, if one exists—for example, a module name if the file is a dynamic-link library. If the file has no internal name, this string should be the original filename, without extension. This string is required.
legalCopyrightstringCopyright notices that apply to the file. This should include the full text of all notices, legal symbols, copyright dates, and so on. This string is optional.
legalTrademarkstringTrademarks and registered trademarks that apply to the file. This should include the full text of all notices, legal symbols, trademark numbers, and so on. This string is optional.
originalFilenamestringOriginal name of the file, not including a path. This information enables an application to determine whether a file has been renamed by a user. The format of the name depends on the file system for which the file was created. This string is required.
privateBuildstringInformation about a private version of the file—for example, Built by TESTER1 on \TESTBED. This string should be present only if VS_FF_PRIVATEBUILD is specified in the fileflags parameter of the root block.
productNamestringName of the product with which the file is distributed. This string is required.
productVersionstringVersion of the product with which the file is distributed—for example, 3.10 or 5.00.RC2. This string is required.
specialBuildstringText that specifies how this version of the file differs from the standard version—for example, Private build for TESTER1 solving mouse problems on M250 and M250E computers. This string should be present only if VS_FF_SPECIALBUILD is specified in the fileflags parameter of the root block.
- +});

Example

js
// Managed Manifest mode
+nwbuild({
+  mode: "build",
+  managedManifest: true
+});
+
+This will parse the first `package.json` it encounters as the NW.js manifest.
+This is a good way to quickly bootstrap a web/node application as a NW.js application.
+It will remove any development dependencies, autodetect the package manager via `packageManager` and download the relevant dependencies.
// Managed Manifest mode
+nwbuild({
+  mode: "build",
+  managedManifest: true
+});
+
+This will parse the first `package.json` it encounters as the NW.js manifest.
+This is a good way to quickly bootstrap a web/node application as a NW.js application.
+It will remove any development dependencies, autodetect the package manager via `packageManager` and download the relevant dependencies.

Example

js
// Managed Manifest JSON
+nwbuild({
+  mode: "build",
+  managedManifest: { name: "demo", "main": "index.html" }
+});
+
+This will ignore the first `package.json` it encounters and use the user input JSON instead.
+This is good way to customise your existing NW.js application after bootstrapping it.
+It will remove any development dependencies, autodetect the package manager via `packageManager` and download the relevant dependencies.
// Managed Manifest JSON
+nwbuild({
+  mode: "build",
+  managedManifest: { name: "demo", "main": "index.html" }
+});
+
+This will ignore the first `package.json` it encounters and use the user input JSON instead.
+This is good way to customise your existing NW.js application after bootstrapping it.
+It will remove any development dependencies, autodetect the package manager via `packageManager` and download the relevant dependencies.

Example

js
// Managed Manifest File
+nwbuild({
+  mode: "build",
+  managedManifest: "./manifest.json"
+});
+
+Similar to Managed Manifest JSON, this will also ignore the first `package.json` it encounters and use the manifest file provided by the user instead.
+This is good way to customise your existing NW.js application after bootstrapping it. Using JSON vs file is matter of preference.
+It will remove any development dependencies, autodetect the package manager via `packageManager` and download the relevant dependencies.
// Managed Manifest File
+nwbuild({
+  mode: "build",
+  managedManifest: "./manifest.json"
+});
+
+Similar to Managed Manifest JSON, this will also ignore the first `package.json` it encounters and use the manifest file provided by the user instead.
+This is good way to customise your existing NW.js application after bootstrapping it. Using JSON vs file is matter of preference.
+It will remove any development dependencies, autodetect the package manager via `packageManager` and download the relevant dependencies.

LinuxRc : object

References: https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html

Kind: global typedef
Properties

NameTypeDescription
namestringName of the application
genericNamestringGeneric name of the application
noDisplaybooleanIf true the application is not displayed
commentstringTooltip for the entry, for example "View sites on the Internet".
iconstringIcon to display in file manager, menus, etc.
hiddenbooleanTBD
onlyShowInArray.<string>A list of strings identifying the desktop environments that should (/not) display a given desktop entry
notShowInArray.<string>A list of strings identifying the desktop environments that should (/not) display a given desktop entry
dBusActivatablebooleanA boolean value specifying if D-Bus activation is supported for this application
tryExecstringPath to an executable file on disk used to determine if the program is actually installed
execstringProgram to execute, possibly with arguments.
pathstringIf entry is of type Application, the working directory to run the program in.
terminalbooleanWhether the program runs in a terminal window.
actionsArray.<string>Identifiers for application actions.
mimeTypeArray.<string>The MIME type(s) supported by this application.
categoriesArray.<string>Categories in which the entry should be shown in a menu
implementsArray.<string>A list of interfaces that this application implements.
keywordsArray.<string>A list of strings which may be used in addition to other metadata to describe this entry.
startupNotifybooleanIf true, it is KNOWN that the application will send a "remove" message when started with the DESKTOP_STARTUP_ID environment variable set. If false, it is KNOWN that the application does not work with startup notification at all.
startupWMClassstringIf specified, it is known that the application will map at least one window with the given string as its WM class or WM name hin
prefersNonDefaultGPUbooleanIf true, the application prefers to be run on a more powerful discrete GPU if available.
singleMainWindowstringIf true, the application has a single main window, and does not support having an additional one opened.

OsxRc : object

References: https://developer.apple.com/documentation/bundleresources/information_property_list

Kind: global typedef
Properties

NameTypeDescription
namestringThe name of the application
iconstringThe path to the icon file. It should be a .icns file.
LSApplicationCategoryTypestringThe category that best describes your app for the App Store.
CFBundleIdentifierstringA unique identifier for a bundle usually in reverse DNS format.
CFBundleNamestringA user-visible short name for the bundle.
CFBundleDisplayNamestringThe user-visible name for the bundle.
CFBundleSpokenNamestringA replacement for the app name in text-to-speech operations.
CFBundleVersionstringThe version of the build that identifies an iteration of the bundle.
CFBundleShortVersionStringstringThe release or version number of the bundle.
NSHumanReadableCopyrightstringA human-readable copyright notice for the bundle.

WinRc : object

References: https://learn.microsoft.com/en-us/windows/win32/msi/versionhttps://learn.microsoft.com/en-gb/windows/win32/sbscs/application-manifestshttps://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2015/deployment/trustinfo-element-clickonce-application?view=vs-2015#requestedexecutionlevelhttps://learn.microsoft.com/en-gb/windows/win32/menurc/versioninfo-resource

Kind: global typedef
Properties

NameTypeDescription
namestringThe name of the application
versionstringThe version of the application
commentsstringAdditional information that should be displayed for diagnostic purposes.
companystringCompany that produced the file—for example, Microsoft Corporation or Standard Microsystems Corporation, Inc. This string is required.
fileDescriptionstringFile description to be presented to users. This string may be displayed in a list box when the user is choosing files to install. For example, Keyboard Driver for AT-Style Keyboards. This string is required.
fileVersionstringVersion number of the file. For example, 3.10 or 5.00.RC2. This string is required.
iconstringThe path to the icon file. It should be a .ico file.
internalNamestringInternal name of the file, if one exists—for example, a module name if the file is a dynamic-link library. If the file has no internal name, this string should be the original filename, without extension. This string is required.
legalCopyrightstringCopyright notices that apply to the file. This should include the full text of all notices, legal symbols, copyright dates, and so on. This string is optional.
legalTrademarkstringTrademarks and registered trademarks that apply to the file. This should include the full text of all notices, legal symbols, trademark numbers, and so on. This string is optional.
originalFilenamestringOriginal name of the file, not including a path. This information enables an application to determine whether a file has been renamed by a user. The format of the name depends on the file system for which the file was created. This string is required.
privateBuildstringInformation about a private version of the file—for example, Built by TESTER1 on \TESTBED. This string should be present only if VS_FF_PRIVATEBUILD is specified in the fileflags parameter of the root block.
productNamestringName of the product with which the file is distributed. This string is required.
productVersionstringVersion of the product with which the file is distributed—for example, 3.10 or 5.00.RC2. This string is required.
specialBuildstringText that specifies how this version of the file differs from the standard version—for example, Private build for TESTER1 solving mouse problems on M250 and M250E computers. This string should be present only if VS_FF_SPECIALBUILD is specified in the fileflags parameter of the root block.
+ \ No newline at end of file diff --git a/mode-get.html b/mode-get.html index de3d2000d..df7b68785 100644 --- a/mode-get.html +++ b/mode-get.html @@ -63,7 +63,7 @@ mode: "get", ffmpeg: true, });

get_nwjs(options) ⇒ Promise.<void>

Note: This an internal function which is not called directly. Please see example usage below.

Get NW.js binaries

Kind: global function

ParamTypeDescription
optionsobjectGet mode options
options.versionstringNW.js runtime version. Defaults to "latest".
options.flavor"normal" | "sdk"NW.js build flavor. Defaults to "normal".
options.platform"linux" | "osx" | "win"Target platform. Defaults to host platform.
options.arch"ia32" | "x64" | "arm64"Target architecture. Defaults to host architecture.
options.downloadUrlstringFile server to download from. Defaults to "https://dl.nwjs.io". Set "https://npm.taobao.org/mirrors/nwjs" for China mirror or "https://cnpmjs.org/mirrors/nwjs/" for Singapore mirror.
options.cacheDirstringCache directory path. Defaults to "./cache"
options.cachebooleanIf false, remove cache before download. Defaults to true.

get_ffmpeg(options) ⇒ Promise.<void>

Note: This an internal function which is not called directly. Please see example usage below.

Get FFmpeg binary.

Kind: global function

ParamTypeDescription
optionsobjectGet mode options
options.versionstringNW.js runtime version. Defaults to "latest".
options.flavor"normal" | "sdk"NW.js build flavor. Defaults to "normal".
options.platform"linux" | "osx" | "win"Target platform. Defaults to host platform.
options.arch"ia32" | "x64" | "arm64"Target architecture. Defaults to host architecture.
options.cacheDirstringCache directory path. Defaults to "./cache"
options.cachebooleanIf false, remove cache before download. Defaults to true.
- + \ No newline at end of file diff --git a/mode-run.html b/mode-run.html index 4b7c0e4d2..5c29f334a 100644 --- a/mode-run.html +++ b/mode-run.html @@ -23,7 +23,7 @@ nwbuild({ mode: "run", }); - + \ No newline at end of file