-
Notifications
You must be signed in to change notification settings - Fork 3
Configuration
Neutron comes with the configurator.py
python script. This can be used to create a config.json for Neutron.
configurator.py
clears and creates a build directory on each run and creates a file called config.json in the build directory. config.json contains the settings for the application. It then copies the src directory into the build directory. Finally, it copies the build.py build script into the build directory.
usage: configurator.py [-h] [-c CONFIG_FILE]
This program can guide you through the process of configuring Neutron.
options:
-h, --help show this help message and exit
-c CONFIG_FILE, --config-file CONFIG_FILE
File path of the config JSON generated by a past run
of this program.
The following prompts guide you through the creation of your application. These prompts will be skipped with the -c
option.
Enter the name of your application (example: Datcord)
Set application name. This name is the userfacing name. The internal name is the lowercase userfacing name with spaces substituted for hyphens.
Please enter the URL of your application (example: https://discord.com/app)
Set the URL of your app. This sets the homepage in Firefox, your app should be at this link.
Please provide a path to a SVG of the application's logo (example: ../src/datcord.svg)
The path to an svg with your application's logo. If it's a relative path, you need to put ../ before it as the path will be resolved in the build folder.
List of lowercase platform names to build for (example: ["linux", "appimage", "windows"])
A json list of platform names. Each string in the list must be a shell script in src/scripts/build
. To build all platforms, use:
[linux, appimage, linux-aarch64, appimage-aarch64, mac-arm, mac-intel, windows]
Should any external extensions be installed? [y/n]
Response should be y or n. Specifies whether the application should have any extra browser extensions installed by default.
List URLs of extensions to install (example: ["https://example.com/extension.zip"])
Json list of URLs to extensions. This prompt only comes up if the answer to the above prompt was y.
Enter the application version (example: 1.0.0)
The version of your application.
Enter the URL to your project (example: https://github.com/gamingdoom/datcord)
The URL to your project.
Enter the help URL for your project (example: https://github.com/gamingdoom/datcord/issues)
The help URL for your project.
Allow links to open in the default browser? [y/n]
Response should be y or n. Specifies whether links should open in the default external browser when clicked.
Please enter a regular expression that matches links that shouldn't open in the default browser (example: http[s]?://discord.com)
A string with a regular expression that wouldn't trigger on the application's main page or any other links that you don't want to open in another browser when clicked. This prompt is only shown if y was the response to the above prompt.
Should the app run in the background when closed? This would make it deliver notifications even when closed. [y/n]
Response should be y or n. This causes the application to launch in a headless mode when closed and reappear when reopened. This can allow for notifications to appear even when the application appears closed at the expense of extra RAM usage.