mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
SDA-3102 Added support for LAUNCH_ON_INSTALL installation parameter
This commit is contained in:
parent
7b5fe05ef6
commit
4e1d4186c4
@ -166,6 +166,7 @@ class Script
|
|||||||
new PublicProperty("DEV_TOOLS_ENABLED", "true"),
|
new PublicProperty("DEV_TOOLS_ENABLED", "true"),
|
||||||
new PublicProperty("FULL_SCREEN", "true"),
|
new PublicProperty("FULL_SCREEN", "true"),
|
||||||
new PublicProperty("LOCATION", "true"),
|
new PublicProperty("LOCATION", "true"),
|
||||||
|
new PublicProperty("LAUNCH_ON_INSTALL", "true"),
|
||||||
new PublicProperty("MEDIA", "true"),
|
new PublicProperty("MEDIA", "true"),
|
||||||
new PublicProperty("MIDI_SYSEX", "true"),
|
new PublicProperty("MIDI_SYSEX", "true"),
|
||||||
new PublicProperty("MINIMIZE_ON_CLOSE", "ENABLED"),
|
new PublicProperty("MINIMIZE_ON_CLOSE", "ENABLED"),
|
||||||
@ -220,7 +221,10 @@ class Script
|
|||||||
new ManagedAction(CustomActions.CleanRegistryCurrentUser, Return.ignore, When.After, Step.RemoveFiles, Condition.BeingUninstalled ),
|
new ManagedAction(CustomActions.CleanRegistryCurrentUser, Return.ignore, When.After, Step.RemoveFiles, Condition.BeingUninstalled ),
|
||||||
|
|
||||||
// Start Symphony after installation is complete
|
// Start Symphony after installation is complete
|
||||||
new InstalledFileAction(new Id("symphony_exe"), "", Return.asyncNoWait, When.After, Step.InstallFinalize, Condition.NOT_BeingRemoved)
|
new ManagedAction(CustomActions.StartAfterInstall, Return.ignore, When.After, Step.InstallFinalize, Condition.NOT_BeingRemoved )
|
||||||
|
{
|
||||||
|
UsesProperties = "INSTALLDIR,LAUNCH_ON_INSTALL"
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
// Use our own Symphony branded bitmap for installation dialogs
|
// Use our own Symphony branded bitmap for installation dialogs
|
||||||
@ -470,4 +474,25 @@ public class CustomActions
|
|||||||
}
|
}
|
||||||
return ActionResult.Success;
|
return ActionResult.Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// StartAfterInstall custom action
|
||||||
|
[CustomAction]
|
||||||
|
public static ActionResult StartAfterInstall(Session session)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (session.Property("LAUNCH_ON_INSTALL")=="true")
|
||||||
|
{
|
||||||
|
System.Diagnostics.Process process = new System.Diagnostics.Process();
|
||||||
|
process.StartInfo.FileName = System.IO.Path.Combine(session.Property("INSTALLDIR"), "Symphony.exe");
|
||||||
|
process.Start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (System.Exception e)
|
||||||
|
{
|
||||||
|
session.Log("Error executing StartAfterInstall: " + e.ToString() );
|
||||||
|
return ActionResult.Failure;
|
||||||
|
}
|
||||||
|
return ActionResult.Success;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -209,6 +209,30 @@ or
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
### LAUNCH_ON_INSTALL
|
||||||
|
|
||||||
|
Expected values:
|
||||||
|
|
||||||
|
* "true"
|
||||||
|
Symphony will be launched automatically after installation has completed (default)
|
||||||
|
* "false"
|
||||||
|
Symphony will not be launched after installation has completed
|
||||||
|
|
||||||
|
#### Example, install with launch on install enabled
|
||||||
|
|
||||||
|
msiexec /i Symphony.msi LAUNCH_ON_INSTALL="true"
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
msiexec /i Symphony.msi /q
|
||||||
|
|
||||||
|
#### Example, install with launch on install disabled
|
||||||
|
|
||||||
|
msiexec /i Symphony.msi LAUNCH_ON_INSTALL="false"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
### LOCATION
|
### LOCATION
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user