mirror of
https://github.com/element-hq/element-desktop.git
synced 2025-12-11 01:40:20 +00:00
Compare commits
3 Commits
v1.11.94
...
hs/manuall
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a365621e79 | ||
|
|
f2986c6fca | ||
|
|
182c62a38b |
@@ -143,6 +143,10 @@ $PROFILE` in which case it becomes `Element-$PROFILE`, or it is using one of
|
||||
the above created by a pre-1.7 install, in which case it will be `Riot` or
|
||||
`Riot-$PROFILE`.
|
||||
|
||||
You may also specify a different path entirely for the `config.json` file by
|
||||
providing the `--config $YOUR_CONFIG_JSON_FILE` to the process, or via the
|
||||
`ELEMENT_DESKTOP_CONFIG_JSON` environment variable.
|
||||
|
||||
# Translations
|
||||
|
||||
To add a new translation, head to the [translating doc](https://github.com/vector-im/element-web/blob/develop/docs/translating.md).
|
||||
|
||||
@@ -44,6 +44,10 @@ if (argv["help"]) {
|
||||
console.log(" --profile-dir {path}: Path to where to store the profile.");
|
||||
console.log(" --profile {name}: Name of alternate profile to use, allows for running multiple accounts.");
|
||||
console.log(" --devtools: Install and use react-devtools and react-perf.");
|
||||
console.log(
|
||||
` --config: Path to the config.json file. May also be specified via the ELEMENT_DESKTOP_CONFIG_JSON environment variable.\n` +
|
||||
` Otherwise use the default user location '${app.getPath("userData")}'`,
|
||||
);
|
||||
console.log(" --no-update: Disable automatic updating.");
|
||||
console.log(" --hidden: Start the application hidden in the system tray.");
|
||||
console.log(" --help: Displays this help message.");
|
||||
@@ -51,6 +55,8 @@ if (argv["help"]) {
|
||||
app.exit();
|
||||
}
|
||||
|
||||
const LocalConfigLocation = process.env.ELEMENT_DESKTOP_CONFIG_JSON ?? argv["config"];
|
||||
|
||||
// Electron creates the user data directory (with just an empty 'Dictionaries' directory...)
|
||||
// as soon as the app path is set, so pick a random path in it that must exist if it's a
|
||||
// real user data directory.
|
||||
@@ -147,7 +153,9 @@ async function loadConfig(): Promise<void> {
|
||||
|
||||
try {
|
||||
// Load local config and use it to override values from the one baked with the build
|
||||
const localConfig = loadJsonFile(app.getPath("userData"), "config.json");
|
||||
const localConfig = LocalConfigLocation
|
||||
? loadJsonFile(LocalConfigLocation)
|
||||
: loadJsonFile(app.getPath("userData"), "config.json");
|
||||
|
||||
// If the local config has a homeserver defined, don't use the homeserver from the build
|
||||
// config. This is to avoid a problem where Riot thinks there are multiple homeservers
|
||||
|
||||
Reference in New Issue
Block a user