mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-27 01:11:13 -06:00
SDA-3201 Enabling user-agent overriding with MSI installer
This commit is contained in:
parent
d0f307cc72
commit
5a92569955
@ -48,6 +48,7 @@ Add “/l* symphony_install.log” to get debug information from the install wri
|
||||
- OPEN_EXTERNAL (Boolean)
|
||||
- DEV_TOOLS_ENABLED (Boolean)
|
||||
- AUTO_LAUNCH_PATH (String)
|
||||
- OVERRIDE_USER_AGENT (Boolean)
|
||||
You'll need to quote the Boolean values when passing from the command line.
|
||||
|
||||
#### Check-boxes (in the installer UI) that can be altered are listed below:
|
||||
|
@ -187,6 +187,7 @@ class Script
|
||||
new PublicProperty("CONTEXT_ORIGIN_URL", ""),
|
||||
new PublicProperty("POINTER_LOCK", "true"),
|
||||
new PublicProperty("USER_DATA_PATH", ""),
|
||||
new PublicProperty("OVERRIDE_USER_AGENT", "false"),
|
||||
new Property("MSIINSTALLPERUSER", "1"),
|
||||
new Property("PROGRAMSFOLDER", System.Environment.ExpandEnvironmentVariables(@"%PROGRAMFILES%"))
|
||||
};
|
||||
@ -214,7 +215,7 @@ class Script
|
||||
new ElevatedManagedAction(CustomActions.UpdateConfig, Return.check, When.After, Step.InstallFiles, Condition.NOT_BeingRemoved )
|
||||
{
|
||||
// The UpdateConfig action needs the built-in property INSTALLDIR as well as most of the custom properties
|
||||
UsesProperties = "INSTALLDIR,POD_URL,CONTEXT_ORIGIN_URL,MINIMIZE_ON_CLOSE,ALWAYS_ON_TOP,AUTO_START,BRING_TO_FRONT,MEDIA,LOCATION,NOTIFICATIONS,MIDI_SYSEX,POINTER_LOCK,FULL_SCREEN,OPEN_EXTERNAL,CUSTOM_TITLE_BAR,DEV_TOOLS_ENABLED,AUTO_LAUNCH_PATH,USER_DATA_PATH"
|
||||
UsesProperties = "INSTALLDIR,POD_URL,CONTEXT_ORIGIN_URL,MINIMIZE_ON_CLOSE,ALWAYS_ON_TOP,AUTO_START,BRING_TO_FRONT,MEDIA,LOCATION,NOTIFICATIONS,MIDI_SYSEX,POINTER_LOCK,FULL_SCREEN,OPEN_EXTERNAL,CUSTOM_TITLE_BAR,DEV_TOOLS_ENABLED,AUTO_LAUNCH_PATH,USER_DATA_PATH,OVERRIDE_USER_AGENT"
|
||||
},
|
||||
|
||||
// CleanRegistry
|
||||
@ -383,6 +384,7 @@ public class CustomActions
|
||||
data = ReplaceProperty(data, "devToolsEnabled", session.Property("DEV_TOOLS_ENABLED"));
|
||||
data = ReplaceProperty(data, "autoLaunchPath", FixPathFormat(session.Property("AUTO_LAUNCH_PATH")));
|
||||
data = ReplaceProperty(data, "userDataPath", FixPathFormat(session.Property("USER_DATA_PATH")));
|
||||
data = ReplaceProperty(data, "overrideUserAgent", session.Property("OVERRIDE_USER_AGENT"));
|
||||
|
||||
// Write the contents back to the file
|
||||
System.IO.File.WriteAllText(filename, data);
|
||||
|
@ -492,3 +492,12 @@ The default (if not specified, or if specified as empty string "") is
|
||||
|
||||
|
||||
|
||||
-------------------------------------------------------------------
|
||||
### OVERRIDE_USER_AGENT
|
||||
|
||||
Expected values:
|
||||
|
||||
* "true"
|
||||
"Electron/X.X" is removed from user-agents.
|
||||
* "false"
|
||||
User-agents are not modified.
|
Loading…
Reference in New Issue
Block a user