This describes all of the possible configuration options ín your todesktop.json
.
To avoid confusion, the following terms will be used throughout this file:
- "Project root": this is the parent directory of your
todesktop.json
.
Default: auto-generated.
Example: com.microsoft.word
.
Your application ID. Omit this unless you know what you're doing. It's used as the CFBundleIdentifier for MacOS and as the Application User Model ID for Windows.
WARNING: if you have deployed an application with ToDesktop and would like to change this ID, talk to us first.
Default: .
.
Example: ./dist
.
This is the path to your Electron application directory. Omit this unless your project setup is complicated. This is the directory that the CLI uploads.
The path can be absolute or a relative path from the project root. The directory it points to must be a valid Electron application directory; i.e.:
- It could be ran with the
electron
command; i.e.npx electron {{appPath}}
. - It needs to contain a valid
package.json
. - The
package.json
must either have amain
property pointing to a file in the directory or there must be anindex.js
at the root of the directory.
Side note: if your package.json
contains a postinstall
script which references scripts, these must be accessible within the appPath
directory as only the appPath
is uploaded to our servers.
Default: no protocol scheme is registered.
Example: word
.
If you want to register a protocol for your application (e.g. example://
) and or support deeplinking, you will need to use this option. If your desired protocol is example://
, you would set "appProtocolScheme": "example"
. NOTE: these features also require additional application logic.
Default: []
.
Example:
[
{ "from": "./static/image.png" },
{ "from": "./static/anotherImage.png", "to": "images" },
{ "from": "./static", "to": "static" }
]
This option allows you to specifiy files to be copied into the application's resources directory (Contents/Resources
for MacOS, resources
for Linux and Windows).
Each item in the array must be an object, containing a from
property which is a path to a file or directory. The path can be absolute or a relative path from the project root. The files specified must be inside your project root.
The to
property is optional. Use it to specify a directory inside the resources directory to copy the file to.
In the example above, image.png
would be copied to the root of the resources directory, whereas anotherImage.png
would be copied to an images
directory at the root of the resources directory. ./static
would be copied to static/static
in the resources directory.
Example: ./appIcon.png
.
The path to your application's desktop icon. It must be a PNG.
Note: to ensure the icon is never missing (e.g. this happens sometimes in Ubuntu), set the icon
option when creating your BrowserWindow
s.
Default: We have good default settings for Mac.
Example: { "entitlements": "./entitlements.mac.plist"
.
This object contains some options that only apply to the building & releasing for MacOS.
Default: A sane minimal entitlements file we've put together.
Example: ./entitlements.mac.plist
.
The path to an entitlements file for signing your application. It must be a plist file.
Default: the name
field in your package.json
is used.
Example: My Example App
.
The name of your product / application. You should use this as it allows for spaces, capitalization, etc. unlike the package.json
name
field.
Example: 1
.
This is the todesktop.json
schema version. This must be 1
.