SDA-3201 Enabling user-agent overriding with MSI installer

This commit is contained in:
sbenmoussati 2021-06-09 10:41:42 +02:00
parent d0f307cc72
commit 5a92569955
3 changed files with 13 additions and 1 deletions

View File

@ -48,6 +48,7 @@ Add “/l* symphony_install.log” to get debug information from the install wri
- OPEN_EXTERNAL (Boolean) - OPEN_EXTERNAL (Boolean)
- DEV_TOOLS_ENABLED (Boolean) - DEV_TOOLS_ENABLED (Boolean)
- AUTO_LAUNCH_PATH (String) - AUTO_LAUNCH_PATH (String)
- OVERRIDE_USER_AGENT (Boolean)
You'll need to quote the Boolean values when passing from the command line. 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: #### Check-boxes (in the installer UI) that can be altered are listed below:

View File

@ -187,6 +187,7 @@ class Script
new PublicProperty("CONTEXT_ORIGIN_URL", ""), new PublicProperty("CONTEXT_ORIGIN_URL", ""),
new PublicProperty("POINTER_LOCK", "true"), new PublicProperty("POINTER_LOCK", "true"),
new PublicProperty("USER_DATA_PATH", ""), new PublicProperty("USER_DATA_PATH", ""),
new PublicProperty("OVERRIDE_USER_AGENT", "false"),
new Property("MSIINSTALLPERUSER", "1"), new Property("MSIINSTALLPERUSER", "1"),
new Property("PROGRAMSFOLDER", System.Environment.ExpandEnvironmentVariables(@"%PROGRAMFILES%")) 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 ) 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 // 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 // CleanRegistry
@ -383,6 +384,7 @@ public class CustomActions
data = ReplaceProperty(data, "devToolsEnabled", session.Property("DEV_TOOLS_ENABLED")); data = ReplaceProperty(data, "devToolsEnabled", session.Property("DEV_TOOLS_ENABLED"));
data = ReplaceProperty(data, "autoLaunchPath", FixPathFormat(session.Property("AUTO_LAUNCH_PATH"))); data = ReplaceProperty(data, "autoLaunchPath", FixPathFormat(session.Property("AUTO_LAUNCH_PATH")));
data = ReplaceProperty(data, "userDataPath", FixPathFormat(session.Property("USER_DATA_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 // Write the contents back to the file
System.IO.File.WriteAllText(filename, data); System.IO.File.WriteAllText(filename, data);

View File

@ -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.