mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
Merge branch 'master' into electron-194
# Conflicts: # js/main.js
This commit is contained in:
@@ -64,4 +64,6 @@ In order to achieve those goals Symphony is participating and working in close c
|
||||
- Remote logging is enabled for local and production cases and are sent to the backend server via the remote objects
|
||||
|
||||
## Misc notes
|
||||
If desiring to run against server without proper cert use cmd line option: --ignore-certificate-errors
|
||||
- If desiring to run against server without proper cert use cmd line option: --ignore-certificate-errors
|
||||
- To start additional instance with custom data directory (if you want seperate user) use cmd line options: --multiInstance --userDataPath=<path to data dir>
|
||||
- if directory doesn't exist, it will be created
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</p>
|
||||
<p>
|
||||
<label for='image'>image url:</label>
|
||||
<input type='text' id='image' value='https://lh3.googleusercontent.com/-s2PXL6wWMCc/AAAAAAAAAAI/AAAAAAAAAAA/AAomvV2gUNMMeFsOijwVVpihfg_anpKWQA/s32-c-mo/photo.jpg'/>
|
||||
<input type='text' id='image' value='https://avatars0.githubusercontent.com/u/13243259?v=4&s=460'/>
|
||||
</p>
|
||||
<p>
|
||||
<label for='flash'>flash:</label>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BuildMachineOSBuild</key>
|
||||
<string>16F73</string>
|
||||
<string>17A405</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
@@ -27,17 +27,17 @@
|
||||
<key>DTCompiler</key>
|
||||
<string>com.apple.compilers.llvm.clang.1_0</string>
|
||||
<key>DTPlatformBuild</key>
|
||||
<string>8E3004b</string>
|
||||
<string>9A1004</string>
|
||||
<key>DTPlatformVersion</key>
|
||||
<string>GM</string>
|
||||
<key>DTSDKBuild</key>
|
||||
<string>16E185</string>
|
||||
<string>17A360</string>
|
||||
<key>DTSDKName</key>
|
||||
<string>macosx10.12</string>
|
||||
<string>macosx10.13</string>
|
||||
<key>DTXcode</key>
|
||||
<string>0833</string>
|
||||
<string>0901</string>
|
||||
<key>DTXcodeBuild</key>
|
||||
<string>8E3004b</string>
|
||||
<string>9A1004</string>
|
||||
<key>InstallerSectionTitle</key>
|
||||
<string>Pod Settings</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -6,7 +6,7 @@
|
||||
<dict>
|
||||
<key>Resources/Base.lproj/MyInstallerPane.nib</key>
|
||||
<data>
|
||||
5MlJroM8UDQ/u/OkMCiK9J3aK/o=
|
||||
TF/AqkGdS25ttnHMS1l76ES81/w=
|
||||
</data>
|
||||
<key>Resources/InstallerSections.plist</key>
|
||||
<data>
|
||||
@@ -37,11 +37,11 @@
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
5MlJroM8UDQ/u/OkMCiK9J3aK/o=
|
||||
TF/AqkGdS25ttnHMS1l76ES81/w=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
KL0ObYrvW43xgEFaDXdRTINfN6qOdiK1EqrvpTusCao=
|
||||
gxXMI4SoTYE7jYkP5QJ7i804TUXR4x8LGSh99n9qers=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Resources/InstallerSections.plist</key>
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
3A10EBC71ED4336D0083702F /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0830;
|
||||
LastUpgradeCheck = 0900;
|
||||
ORGANIZATIONNAME = Symphony;
|
||||
TargetAttributes = {
|
||||
3A10EBCE1ED4336D0083702F = {
|
||||
@@ -183,7 +183,9 @@
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
@@ -191,7 +193,11 @@
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
@@ -231,7 +237,9 @@
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
@@ -239,7 +247,11 @@
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0830"
|
||||
LastUpgradeVersion = "0900"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -26,6 +26,7 @@
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
@@ -36,6 +37,7 @@
|
||||
buildConfiguration = "Release"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="12121" systemVersion="16F73" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="13196" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="12121"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13196"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="InstallerSection">
|
||||
<connections>
|
||||
<outlet property="firstPane" destination="Qsn-FY-4qK" id="Dhh-1H-QYh"/>
|
||||
<outlet property="podUrlAlertTextBox" destination="wzk-BB-itI" id="QhW-ay-Yma"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
@@ -20,6 +21,7 @@
|
||||
<outlet property="contentView" destination="TUK-W2-vig" id="gTd-A7-dof"/>
|
||||
<outlet property="minimizeOnCloseCheckBox" destination="XPe-yO-v9Y" id="ewr-3C-eNJ"/>
|
||||
<outlet property="parentSection" destination="-2" id="FB7-UV-e8k"/>
|
||||
<outlet property="podUrlAlertTextBox" destination="wzk-BB-itI" id="Kab-Hu-5vF"/>
|
||||
<outlet property="podUrlTextBox" destination="uwa-xi-M5X" id="vLY-gf-Cu7"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
@@ -27,7 +29,7 @@
|
||||
<rect key="frame" x="0.0" y="0.0" width="418" height="330"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kEO-Mr-GRW">
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="kEO-Mr-GRW">
|
||||
<rect key="frame" x="8" y="186" width="182" height="43"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<textFieldCell key="cell" sendsActionOnEndEditing="YES" title="Pod Url (This is where Symphony will be installed)" id="iRN-3c-tUz">
|
||||
@@ -36,8 +38,8 @@
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iAw-NP-Tbm">
|
||||
<rect key="frame" x="8" y="95" width="188" height="28"/>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="iAw-NP-Tbm">
|
||||
<rect key="frame" x="8" y="75" width="188" height="28"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Minimize Symphony on Close" id="z1k-Zj-Big">
|
||||
<font key="font" metaFont="system"/>
|
||||
@@ -45,8 +47,8 @@
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KOx-3P-dPz">
|
||||
<rect key="frame" x="8" y="139" width="146" height="28"/>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="KOx-3P-dPz">
|
||||
<rect key="frame" x="8" y="119" width="146" height="28"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Auto-launch Symphony" id="9id-I6-Bxu">
|
||||
<font key="font" metaFont="system"/>
|
||||
@@ -55,7 +57,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="XPe-yO-v9Y">
|
||||
<rect key="frame" x="209" y="105" width="22" height="18"/>
|
||||
<rect key="frame" x="194" y="85" width="22" height="18"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<buttonCell key="cell" type="check" bezelStyle="regularSquare" imagePosition="left" inset="2" id="uvu-EE-3sp">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
@@ -63,24 +65,24 @@
|
||||
</buttonCell>
|
||||
</button>
|
||||
<button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="zJM-2d-YYz">
|
||||
<rect key="frame" x="209" y="149" width="22" height="18"/>
|
||||
<rect key="frame" x="194" y="129" width="22" height="18"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<buttonCell key="cell" type="check" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="o5T-Og-ooq">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
</button>
|
||||
<textField verticalHuggingPriority="750" fixedFrame="YES" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uwa-xi-M5X">
|
||||
<rect key="frame" x="211" y="197" width="192" height="32"/>
|
||||
<textField toolTip="Ex: https://my.symphony.com" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="uwa-xi-M5X">
|
||||
<rect key="frame" x="196" y="197" width="207" height="32"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="left" title="my.symphony.com" placeholderString="Ex: my.symphony.com" drawsBackground="YES" id="5g9-ba-etY">
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="left" title="https://corporate.symphony.com" placeholderString="Ex: https://corporate.symphony.com" drawsBackground="YES" id="5g9-ba-etY">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UYr-oC-RgI">
|
||||
<rect key="frame" x="8" y="51" width="168" height="28"/>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="UYr-oC-RgI">
|
||||
<rect key="frame" x="8" y="31" width="168" height="28"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Symphony is always on top" id="7pE-fR-PoD">
|
||||
<font key="font" metaFont="system"/>
|
||||
@@ -89,13 +91,22 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="8EB-K5-hjN">
|
||||
<rect key="frame" x="209" y="61" width="22" height="18"/>
|
||||
<rect key="frame" x="194" y="41" width="22" height="18"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<buttonCell key="cell" type="check" bezelStyle="regularSquare" imagePosition="left" inset="2" id="chP-mD-3E9">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
</button>
|
||||
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" allowsExpansionToolTips="YES" textCompletion="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wzk-BB-itI">
|
||||
<rect key="frame" x="194" y="171" width="211" height="20"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<textFieldCell key="cell" sendsActionOnEndEditing="YES" id="xnq-4j-scy">
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
<color key="textColor" red="0.92622652202072542" green="0.44039531974578455" blue="0.39870774994839908" alpha="0.84999999999999998" colorSpace="custom" customColorSpace="displayP3"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
</subviews>
|
||||
</customView>
|
||||
</objects>
|
||||
|
||||
@@ -7,11 +7,12 @@
|
||||
|
||||
#import <InstallerPlugins/InstallerPlugins.h>
|
||||
|
||||
@interface MyInstallerPane : InstallerPane
|
||||
@interface MyInstallerPane : InstallerPane<NSTextFieldDelegate>
|
||||
|
||||
@property (weak) IBOutlet NSButton *minimizeOnCloseCheckBox;
|
||||
@property (weak) IBOutlet NSButton *autoLaunchCheckBox;
|
||||
@property (weak) IBOutlet NSTextField *podUrlTextBox;
|
||||
@property (weak) IBOutlet NSButton *alwaysOnTopCheckBox;
|
||||
@property (weak) IBOutlet NSTextField *podUrlAlertTextBox;
|
||||
|
||||
@end
|
||||
|
||||
@@ -14,21 +14,40 @@
|
||||
return [[NSBundle bundleForClass:[self class]] localizedStringForKey:@"PaneTitle" value:nil table:nil];
|
||||
}
|
||||
|
||||
- (void)willExitPane:(InstallerSectionDirection)dir {
|
||||
|
||||
// Set the default protocol to https
|
||||
NSString *protocol = @"https://";
|
||||
- (void)willEnterPane:(InstallerSectionDirection)dir {
|
||||
// By default, set the value of the error message textbox to an empty string
|
||||
[_podUrlAlertTextBox setTitleWithMnemonic:@""];
|
||||
}
|
||||
|
||||
- (BOOL)shouldExitPane:(InstallerSectionDirection)dir {
|
||||
|
||||
NSString *podUrl = [_podUrlTextBox stringValue];
|
||||
|
||||
// If the pod url is empty, by default, set it to my.symphony.com
|
||||
if ([podUrl length] == 0) {
|
||||
podUrl = @"my.symphony.com";
|
||||
// Check if the url contains a protocol, if not, prepend https to it
|
||||
NSString *prefix = @"https://";
|
||||
if (![podUrl hasPrefix:prefix]) {
|
||||
podUrl = [prefix stringByAppendingString:podUrl];
|
||||
[_podUrlTextBox setStringValue:podUrl];
|
||||
}
|
||||
|
||||
// Create the final url
|
||||
NSString *finalUrl = [protocol stringByAppendingString: podUrl];
|
||||
// Now, validate the url against a url regex
|
||||
NSString *regex = @"^((?:http:\/\/)|(?:https:\/\/))(www.)?((?:[a-zA-Z0-9]+\.[a-z]{3})|(?:\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(?::\d+)?))([\/a-zA-Z0-9\.]*)$";
|
||||
NSPredicate *podUrlTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", regex];
|
||||
if ([podUrlTest evaluateWithObject:podUrl]) {
|
||||
return YES;
|
||||
}
|
||||
|
||||
// In case of an invalid url, display the message under the pod url text box
|
||||
// and don't go to the next screen, hence return NO
|
||||
[_podUrlAlertTextBox setTitleWithMnemonic:@"Please enter a valid Pod url."];
|
||||
return NO;
|
||||
|
||||
}
|
||||
|
||||
- (void)willExitPane:(InstallerSectionDirection)dir {
|
||||
|
||||
NSString *podUrl = [_podUrlTextBox stringValue];
|
||||
|
||||
// By default, set autoLaunchOnStart to true
|
||||
NSString *autoLaunchOnStart = @"true";
|
||||
|
||||
@@ -52,7 +71,7 @@
|
||||
}
|
||||
|
||||
// Create an array with the selected options
|
||||
NSArray *symSettings = [[NSArray alloc] initWithObjects:finalUrl, minimizeOnClose, autoLaunchOnStart, alwaysOnTop, nil];
|
||||
NSArray *symSettings = [[NSArray alloc] initWithObjects:podUrl, minimizeOnClose, autoLaunchOnStart, alwaysOnTop, nil];
|
||||
|
||||
// Create a string from the array with new-line as the separator
|
||||
NSString *symSettingsString = [symSettings componentsJoinedByString:@"\n"];
|
||||
|
||||
@@ -4,24 +4,24 @@
|
||||
tempFilePath='/tmp/sym_settings.txt'
|
||||
installPath="$2"
|
||||
configPath="/Symphony.app/Contents/config/Symphony.config"
|
||||
newPath=$installPath$configPath
|
||||
newPath=${installPath}${configPath}
|
||||
|
||||
## Get Symphony Settings from the temp file ##
|
||||
pod_url=$(sed -n '1p' $tempFilePath);
|
||||
pod_url=$(sed -n '1p' ${tempFilePath});
|
||||
minimize_on_close=$(sed -n '2p' '/tmp/sym_settings.txt');
|
||||
launch_on_startup=$(sed -n '3p' '/tmp/sym_settings.txt');
|
||||
always_on_top=$(sed -n '4p' '/tmp/sym_settings.txt');
|
||||
|
||||
## Replace the default settings with the user selected settings ##
|
||||
sed -i "" -E "s#\"url\" ?: ?\".*\"#\"url\"\: \"$pod_url\"#g" $newPath
|
||||
sed -i "" -E "s#\"minimizeOnClose\" ?: ?([Tt][Rr][Uu][Ee]|[Ff][Aa][Ll][Ss][Ee])#\"minimizeOnClose\":\ $minimize_on_close#g" $newPath
|
||||
sed -i "" -E "s#\"alwaysOnTop\" ?: ?([Tt][Rr][Uu][Ee]|[Ff][Aa][Ll][Ss][Ee])#\"alwaysOnTop\":\ $always_on_top#g" $newPath
|
||||
sed -i "" -E "s#\"launchOnStartup\" ?: ?([Tt][Rr][Uu][Ee]|[Ff][Aa][Ll][Ss][Ee])#\"launchOnStartup\":\ $launch_on_startup#g" $newPath
|
||||
sed -i "" -E "s#\"url\" ?: ?\".*\"#\"url\"\: \"$pod_url\"#g" ${newPath}
|
||||
sed -i "" -E "s#\"minimizeOnClose\" ?: ?([Tt][Rr][Uu][Ee]|[Ff][Aa][Ll][Ss][Ee])#\"minimizeOnClose\":\ $minimize_on_close#g" ${newPath}
|
||||
sed -i "" -E "s#\"alwaysOnTop\" ?: ?([Tt][Rr][Uu][Ee]|[Ff][Aa][Ll][Ss][Ee])#\"alwaysOnTop\":\ $always_on_top#g" ${newPath}
|
||||
sed -i "" -E "s#\"launchOnStartup\" ?: ?([Tt][Rr][Uu][Ee]|[Ff][Aa][Ll][Ss][Ee])#\"launchOnStartup\":\ $launch_on_startup#g" ${newPath}
|
||||
|
||||
## Remove the temp settings file created ##
|
||||
rm -f $tempFilePath
|
||||
rm -f ${tempFilePath}
|
||||
|
||||
## For launching symphony with sandbox enabled, create a shell script that is used as the launch point for the app
|
||||
EXEC_PATH=$installPath/Symphony.app/Contents/MacOS
|
||||
exec $EXEC_PATH/Symphony --install $newPath $launch_on_startup
|
||||
chmod 755 $EXEC_PATH/Symphony
|
||||
EXEC_PATH=${installPath}/Symphony.app/Contents/MacOS
|
||||
exec ${EXEC_PATH}/Symphony --install ${newPath} ${launch_on_startup}
|
||||
chmod 755 ${EXEC_PATH}/Symphony
|
||||
|
||||
@@ -432,6 +432,12 @@
|
||||
</dict>
|
||||
<key>PAYLOAD_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>SHOW_INVISIBLE</key>
|
||||
<false/>
|
||||
<key>SPLIT_FORKS</key>
|
||||
<true/>
|
||||
<key>TREAT_MISSING_FILES_AS_WARNING</key>
|
||||
<false/>
|
||||
<key>VERSION</key>
|
||||
<integer>4</integer>
|
||||
</dict>
|
||||
@@ -453,15 +459,27 @@
|
||||
<integer>1</integer>
|
||||
<key>CONCLUSION_ACTION</key>
|
||||
<integer>0</integer>
|
||||
<key>FOLLOW_SYMBOLIC_LINKS</key>
|
||||
<false/>
|
||||
<key>IDENTIFIER</key>
|
||||
<string>com.symphony.symphony-desktop</string>
|
||||
<key>LOCATION</key>
|
||||
<integer>0</integer>
|
||||
<key>NAME</key>
|
||||
<string>Symphony</string>
|
||||
<key>OVERWRITE_PERMISSIONS</key>
|
||||
<false/>
|
||||
<key>PAYLOAD_SIZE</key>
|
||||
<integer>-1</integer>
|
||||
<key>RELOCATABLE</key>
|
||||
<false/>
|
||||
<key>USE_HFS+_COMPRESSION</key>
|
||||
<false/>
|
||||
<key>VERSION</key>
|
||||
<string>1.0.1</string>
|
||||
<string>2.0.0</string>
|
||||
</dict>
|
||||
<key>TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>UUID</key>
|
||||
<string>91776F5A-09FA-4631-A17C-BE8B5C83AF81</string>
|
||||
</dict>
|
||||
@@ -499,7 +517,7 @@
|
||||
<integer>3</integer>
|
||||
</dict>
|
||||
<key>CUSTOM</key>
|
||||
<integer>1</integer>
|
||||
<true/>
|
||||
<key>SCALING</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
@@ -537,8 +555,6 @@
|
||||
<dict/>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>INSTALLATION TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>MODE</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
@@ -631,8 +647,6 @@
|
||||
</dict>
|
||||
<key>LICENSE</key>
|
||||
<dict>
|
||||
<key>KEYWORDS</key>
|
||||
<dict/>
|
||||
<key>LOCALIZATIONS</key>
|
||||
<array/>
|
||||
<key>MODE</key>
|
||||
@@ -665,10 +679,6 @@
|
||||
<dict>
|
||||
<key>LIST</key>
|
||||
<array/>
|
||||
<key>POSTINSTALL_PATH</key>
|
||||
<dict/>
|
||||
<key>PREINSTALL_PATH</key>
|
||||
<dict/>
|
||||
<key>RESOURCES</key>
|
||||
<array/>
|
||||
<key>ROOT_VOLUME_ONLY</key>
|
||||
@@ -676,8 +686,6 @@
|
||||
</dict>
|
||||
<key>PROJECT_SETTINGS</key>
|
||||
<dict>
|
||||
<key>ADVANCED_OPTIONS</key>
|
||||
<dict/>
|
||||
<key>BUILD_FORMAT</key>
|
||||
<integer>0</integer>
|
||||
<key>BUILD_PATH</key>
|
||||
@@ -857,6 +865,10 @@
|
||||
</array>
|
||||
<key>NAME</key>
|
||||
<string>Symphony</string>
|
||||
<key>PAYLOAD_ONLY</key>
|
||||
<false/>
|
||||
<key>TREAT_MISSING_PRESENTATION_DOCUMENTS_AS_WARNING</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>SHARED_GLOBAL_DATA</key>
|
||||
|
||||
@@ -10,22 +10,27 @@
|
||||
<ROW Property="AI_ThemeStyle" Value="default" MsiKey="AI_ThemeStyle"/>
|
||||
<ROW Property="AI_UNINSTALLER" Value="msiexec.exe"/>
|
||||
<ROW Property="ALLUSERS" Value="1" MultiBuildValue="DefaultBuild:2"/>
|
||||
<ROW Property="ALWAYS_ON_TOP_LABEL" Value="false" Type="4"/>
|
||||
<ROW Property="ARPCOMMENTS" Value="This installer database contains the logic and data required to install [|ProductName]." ValueLocId="*"/>
|
||||
<ROW Property="ARPHELPLINK" Value="http://www.symphony.com"/>
|
||||
<ROW Property="ARPNOMODIFY" MultiBuildValue="DefaultBuild:1"/>
|
||||
<ROW Property="ARPNOREPAIR" Value="1"/>
|
||||
<ROW Property="ARPPRODUCTICON" Value="icon.exe" Type="8"/>
|
||||
<ROW Property="ARPSYSTEMCOMPONENT" Value="1"/>
|
||||
<ROW Property="ARPURLINFOABOUT" Value="http://www.symphony.com"/>
|
||||
<ROW Property="AUTO_START" Value="CheckBox"/>
|
||||
<ROW Property="AUTO_START_LABEL" Value="true" Type="4"/>
|
||||
<ROW Property="BannerBitmap" Value="banner" MultiBuildValue="DefaultBuild:Banner.jpg" Type="1" MsiKey="BannerBitmap"/>
|
||||
<ROW Property="CTRLS" Value="2"/>
|
||||
<ROW Property="DialogBitmap" Value="dialog" MultiBuildValue="DefaultBuild:Tabloid.jpg" Type="1" MsiKey="DialogBitmap"/>
|
||||
<ROW Property="INVALID_POD_URL" Value="valid" Type="4"/>
|
||||
<ROW Property="MINIMIZE_ON_CLOSE_LABEL" Value="false" Type="4"/>
|
||||
<ROW Property="Manufacturer" Value="Symphony"/>
|
||||
<ROW Property="POD_URL" Value="corporate.symphony.com" Type="4"/>
|
||||
<ROW Property="POD_URL" Value="https://corporate.symphony.com" Type="4"/>
|
||||
<ROW Property="ProductCode" Value="1033:{F17EDEB4-A15F-46B9-83E9-8652CBC886B2} " Type="16"/>
|
||||
<ROW Property="ProductLanguage" Value="1033"/>
|
||||
<ROW Property="ProductName" Value="Symphony-Electron"/>
|
||||
<ROW Property="ProductVersion" Value="1.0.0" Type="32"/>
|
||||
<ROW Property="ProductVersion" Value="2.0.0" Type="32"/>
|
||||
<ROW Property="REBOOT" MultiBuildValue="DefaultBuild:ReallySuppress"/>
|
||||
<ROW Property="RUNAPPLICATION" Value="1" Type="4"/>
|
||||
<ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND"/>
|
||||
@@ -63,6 +68,7 @@
|
||||
</COMPONENT>
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiCompsComponent">
|
||||
<ROW Component="AI_CustomARPName" ComponentId="{2817ACD9-F494-4729-9830-111EF3311CFA}" Directory_="APPDIR" Attributes="4" KeyPath="DisplayName" Options="1"/>
|
||||
<ROW Component="AI_DisableModify" ComponentId="{DA4E8013-2F4B-493A-90A8-BD729DA7EE2C}" Directory_="APPDIR" Attributes="260" KeyPath="NoModify" Options="1"/>
|
||||
<ROW Component="Jobber.exe" ComponentId="{D019D33C-26A6-400F-9C74-D862032D1A5B}" Directory_="jobber_Dir" Attributes="0" KeyPath="Jobber.exe"/>
|
||||
<ROW Component="PodUrl" ComponentId="{EA80D82D-BC65-4075-A9A8-F53E2B2513CE}" Directory_="APPDIR" Attributes="260" KeyPath="PodUrl"/>
|
||||
<ROW Component="ProductInformation" ComponentId="{8B92B687-8AE0-4A5C-B6AB-5D1854009CEA}" Directory_="APPDIR" Attributes="4" KeyPath="Version"/>
|
||||
@@ -129,8 +135,8 @@
|
||||
<ROW Component="vcruntime140.dll" ComponentId="{2542FC82-8D71-4351-8514-2C0D12772ED5}" Directory_="APPDIR" Attributes="256" KeyPath="vcruntime140.dll"/>
|
||||
</COMPONENT>
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiFeatsComponent">
|
||||
<ROW Feature="D564007E3BBE4F85950A09B470A7CA65" Title="Visual C++ Redistributable for Visual Studio 2013 x86" Description="Visual C++ Redistributable for Visual Studio 2013 x86" Display="3" Level="1" Attributes="0" Components="AI_CustomARPName"/>
|
||||
<ROW Feature="MainFeature" Title="MainFeature" Description="Description" Display="1" Level="1" Directory_="APPDIR" Attributes="0" Components="AI_CustomARPName Jobber.exe PodUrl ProductInformation ScreenSnippet.exe Symphony Symphony.config Symphony.exe am.pak ambient.d.ts apimswincoreconsolel110.dll apimswincoredatetimel110.dll apimswincoredebugl110.dll apimswincoreerrorhandlingl110.dll apimswincorefilel110.dll apimswincorefilel120.dll apimswincorefilel210.dll apimswincorehandlel110.dll apimswincoreheapl110.dll apimswincoreinterlockedl110.dll apimswincorelibraryloaderl110.dll apimswincorelocalizationl120.dll apimswincorememoryl110.dll apimswincorenamedpipel110.dll apimswincoreprocessenvironmentl110.dll apimswincoreprocessthreadsl110.dll apimswincoreprocessthreadsl111.dll apimswincoreprofilel110.dll apimswincorertlsupportl110.dll apimswincorestringl110.dll apimswincoresynchl110.dll apimswincoresynchl120.dll apimswincoresysinfol110.dll apimswincoretimezonel110.dll apimswincoreutill110.dll apimswincrtconiol110.dll apimswincrtconvertl110.dll apimswincrtenvironmentl110.dll apimswincrtfilesysteml110.dll apimswincrtheapl110.dll apimswincrtlocalel110.dll apimswincrtmathl110.dll apimswincrtmultibytel110.dll apimswincrtprivatel110.dll apimswincrtprocessl110.dll apimswincrtruntimel110.dll apimswincrtstdiol110.dll apimswincrtstringl110.dll apimswincrttimel110.dll apimswincrtutilityl110.dll appupdate.yml blink_image_resources_200_percent.pak cld.node d3dcompiler_47.dll ffmpeg.dll index.d.ts index.js libEGL.dll libGLESv2.dll msvcp140.dll node.dll node_modules npmignore ucrtbase.dll vcruntime140.dll"/>
|
||||
<ROW Feature="D564007E3BBE4F85950A09B470A7CA65" Title="Visual C++ Redistributable for Visual Studio 2013 x86" Description="Visual C++ Redistributable for Visual Studio 2013 x86" Display="3" Level="1" Attributes="0"/>
|
||||
<ROW Feature="MainFeature" Title="MainFeature" Description="Description" Display="1" Level="1" Directory_="APPDIR" Attributes="0" Components="AI_CustomARPName AI_DisableModify Jobber.exe PodUrl ProductInformation ScreenSnippet.exe Symphony Symphony.config Symphony.exe am.pak ambient.d.ts apimswincoreconsolel110.dll apimswincoredatetimel110.dll apimswincoredebugl110.dll apimswincoreerrorhandlingl110.dll apimswincorefilel110.dll apimswincorefilel120.dll apimswincorefilel210.dll apimswincorehandlel110.dll apimswincoreheapl110.dll apimswincoreinterlockedl110.dll apimswincorelibraryloaderl110.dll apimswincorelocalizationl120.dll apimswincorememoryl110.dll apimswincorenamedpipel110.dll apimswincoreprocessenvironmentl110.dll apimswincoreprocessthreadsl110.dll apimswincoreprocessthreadsl111.dll apimswincoreprofilel110.dll apimswincorertlsupportl110.dll apimswincorestringl110.dll apimswincoresynchl110.dll apimswincoresynchl120.dll apimswincoresysinfol110.dll apimswincoretimezonel110.dll apimswincoreutill110.dll apimswincrtconiol110.dll apimswincrtconvertl110.dll apimswincrtenvironmentl110.dll apimswincrtfilesysteml110.dll apimswincrtheapl110.dll apimswincrtlocalel110.dll apimswincrtmathl110.dll apimswincrtmultibytel110.dll apimswincrtprivatel110.dll apimswincrtprocessl110.dll apimswincrtruntimel110.dll apimswincrtstdiol110.dll apimswincrtstringl110.dll apimswincrttimel110.dll apimswincrtutilityl110.dll appupdate.yml blink_image_resources_200_percent.pak cld.node d3dcompiler_47.dll ffmpeg.dll index.d.ts index.js libEGL.dll libGLESv2.dll msvcp140.dll node.dll node_modules npmignore ucrtbase.dll vcruntime140.dll"/>
|
||||
<ATTRIBUTE name="CurrentFeature" value="MainFeature"/>
|
||||
</COMPONENT>
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiFilesComponent">
|
||||
@@ -350,7 +356,6 @@
|
||||
<ROW Dialog_="FatalError" Control="Title" Type="Text" X="132" Y="10" Width="220" Height="47" Attributes="196611" Text="The [ProductName] [Wizard] ended prematurely" TextStyle="VerdanaBold13" Order="800" TextLocId="Control.Text.FatalError#Title" MsiKey="FatalError#Title"/>
|
||||
<ROW Dialog_="FilesInUse" Control="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" Attributes="1048577" Text="[BannerBitmap]" Order="400" MsiKey="FilesInUse#BannerBitmap"/>
|
||||
<ROW Dialog_="FilesInUse" Control="Logo" Type="Text" X="4" Y="228" Width="37" Height="12" Attributes="1" Text="Symphony" Order="600" TextLocId="Control.Text.FilesInUse#Logo" MsiKey="FilesInUse#Logo"/>
|
||||
<ROW Dialog_="FolderDlg" Control="FolderDlgDialogInitializer" Type="DialogInitializer" X="0" Y="0" Width="0" Height="0" Attributes="0" Order="-1" TextLocId="-" HelpLocId="-" ExtDataLocId="-"/>
|
||||
<ROW Dialog_="FolderDlg" Control="FolderLabel" Type="Text" X="20" Y="92" Width="348" Height="12" Attributes="3" Text="&Folder:" Help="|" Order="200" TextLocId="Control.Text.FolderDlg#FolderLabel" HelpLocId="Control.Help.FolderDlg#FolderLabel" MsiKey="FolderDlg#FolderLabel"/>
|
||||
<ROW Dialog_="FolderDlg" Control="FolderEdit" Type="PathEdit" X="18" Y="104" Width="252" Height="18" Attributes="7" Property="APPDIR" Help="|" Order="300" HelpLocId="Control.Help.FolderDlg#FolderEdit" MsiKey="FolderDlg#FolderEdit"/>
|
||||
<ROW Dialog_="FolderDlg" Control="Browse" Type="PushButton" X="276" Y="104" Width="90" Height="18" Attributes="3" Text="[ButtonText_Browse]" Help="|" Order="400" TextLocId="-" HelpLocId="Control.Help.FolderDlg#Browse" MsiKey="FolderDlg#Browse"/>
|
||||
@@ -366,6 +371,7 @@
|
||||
<ROW Dialog_="FolderDlg" Control="MinimizeOnCloseCheckBox" Type="CheckBox" X="20" Y="199" Width="98" Height="13" Attributes="3" Property="MINIMIZE_ON_CLOSE" Text="Minimize On Close" Order="1500"/>
|
||||
<ROW Dialog_="FolderDlg" Control="LaunchOnStartupCheckBox" Type="CheckBox" X="172" Y="174" Width="98" Height="13" Attributes="3" Property="AUTO_START" Text="Launch On Startup" Order="1600"/>
|
||||
<ROW Dialog_="FolderDlg" Control="AlwaysOnTopCheckBox" Type="CheckBox" X="20" Y="174" Width="98" Height="13" Attributes="3" Property="ALWAYS_ON_TOP" Text="Always On Top" Order="1700"/>
|
||||
<ROW Dialog_="FolderDlg" Control="Edit_1" Type="Edit" X="360" Y="143" Width="2" Height="9" Attributes="2" Property="INVALID_POD_URL" Text="{260}" Order="1800"/>
|
||||
<ROW Dialog_="InstallTypeDlg" Control="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" Attributes="1048576" Text="[DialogBitmap]" Order="100" MsiKey="InstallTypeDlg#BannerBitmap"/>
|
||||
<ROW Dialog_="InstallTypeDlg" Control="Bitmap_background" Type="Bitmap" X="0" Y="0" Width="370" Height="234" Attributes="1" Text="[DialogBitmap]" Order="200"/>
|
||||
<ROW Dialog_="InstallTypeDlg" Control="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Attributes="3" Text="[ButtonText_Next]" Order="300" TextLocId="-" MsiKey="InstallTypeDlg#Next" Options="1"/>
|
||||
@@ -416,7 +422,30 @@
|
||||
<ROW Dialog_="ProgressDlg" Control="ProgressBar" Type="ProgressBar" X="35" Y="115" Width="300" Height="10" Attributes="65537" Text="Progress done" Order="1100" TextLocId="Control.Text.ProgressDlg#ProgressBar" MsiKey="ProgressDlg#ProgressBar"/>
|
||||
<ROW Dialog_="ResumeDlg" Control="Title" Type="Text" X="132" Y="10" Width="220" Height="47" Attributes="196611" Text="Resuming the [ProductName] [Wizard]" TextStyle="VerdanaBold13" Order="500" TextLocId="Control.Text.ResumeDlg#Title" MsiKey="ResumeDlg#Title"/>
|
||||
<ROW Dialog_="ResumeDlg" Control="Description" Type="Text" X="132" Y="61" Width="220" Height="40" Attributes="196611" Text="The [Wizard] will complete the installation of [ProductName] on your computer. Click "Install" to continue or "Cancel" to exit the [Wizard]." Order="600" TextLocId="Control.Text.ResumeDlg#Description" MsiKey="ResumeDlg#Description"/>
|
||||
<ROW Dialog_="SpawnWaitDialog" Control="Yes" Type="PushButton" X="72" Y="57" Width="56" Height="17" Attributes="3" Text="[ButtonText_Yes]" Order="100" TextLocId="-"/>
|
||||
<ROW Dialog_="SpawnWaitDialog" Control="Icon" Type="Icon" X="15" Y="15" Width="24" Height="24" Attributes="5242881" Text="[InfoIcon]" Order="200"/>
|
||||
<ROW Dialog_="SpawnWaitDialog" Control="Text" Type="Text" X="48" Y="15" Width="194" Height="30" Attributes="3" Text="New Spawn(Wait) Dialog" Order="300"/>
|
||||
<ROW Dialog_="SpawnWaitDialog" Control="No" Type="PushButton" X="132" Y="57" Width="56" Height="17" Attributes="3" Text="[ButtonText_No]" Order="400" TextLocId="-"/>
|
||||
<ROW Dialog_="UserExit" Control="Title" Type="Text" X="132" Y="10" Width="220" Height="47" Attributes="196611" Text="The [ProductName] [Wizard] was interrupted" TextStyle="VerdanaBold13" Order="500" TextLocId="Control.Text.UserExit#Title" MsiKey="UserExit#Title"/>
|
||||
<ROW Dialog_="VerifyDlg" Control="TemplateDlgDialogInitializer" Type="DialogInitializer" X="0" Y="0" Width="0" Height="0" Attributes="0" Order="-1" TextLocId="-" HelpLocId="-" ExtDataLocId="-"/>
|
||||
<ROW Dialog_="VerifyDlg" Control="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Attributes="3" Text="[ButtonText_Next]" Order="100" TextLocId="-" Options="1"/>
|
||||
<ROW Dialog_="VerifyDlg" Control="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Attributes="3" Text="[ButtonText_Cancel]" Order="200" TextLocId="-" Options="1"/>
|
||||
<ROW Dialog_="VerifyDlg" Control="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Attributes="3" Text="[ButtonText_Back]" Order="300" TextLocId="-" Options="1"/>
|
||||
<ROW Dialog_="VerifyDlg" Control="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" Attributes="1048577" Text="[BannerBitmap]" Order="400"/>
|
||||
<ROW Dialog_="VerifyDlg" Control="BannerLine" Type="Line" X="0" Y="44" Width="372" Height="0" Attributes="1" Order="500"/>
|
||||
<ROW Dialog_="VerifyDlg" Control="BottomLine" Type="Line" X="5" Y="234" Width="368" Height="0" Attributes="1" Order="600"/>
|
||||
<ROW Dialog_="VerifyDlg" Control="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Attributes="196611" Text="Verify the information entered" Order="700"/>
|
||||
<ROW Dialog_="VerifyDlg" Control="Logo" Type="Text" X="4" Y="228" Width="70" Height="12" Attributes="1" Text="Advanced Installer" Order="800"/>
|
||||
<ROW Dialog_="VerifyDlg" Control="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Attributes="196611" Text="Settings Verification" TextStyle="[DlgTitleFont]" Order="900"/>
|
||||
<ROW Dialog_="VerifyDlg" Control="Text_1" Type="Text" X="25" Y="88" Width="76" Height="17" Attributes="65539" Property="TEXT_1_PROP" Text="Symphony POD Url : " Order="1000"/>
|
||||
<ROW Dialog_="VerifyDlg" Control="Text_2" Type="Text" X="110" Y="88" Width="145" Height="17" Attributes="65539" Property="TEXT_2_PROP" Text="[POD_URL]" Order="1100"/>
|
||||
<ROW Dialog_="VerifyDlg" Control="Text_3" Type="Text" X="25" Y="114" Width="76" Height="13" Attributes="65539" Property="TEXT_3_PROP" Text="Always on Top : " Order="1200"/>
|
||||
<ROW Dialog_="VerifyDlg" Control="Text_4" Type="Text" X="110" Y="114" Width="145" Height="10" Attributes="65539" Property="ALWAYS_ON_TOP_LABEL" Text="[ALWAYS_ON_TOP_LABEL]" Order="1300"/>
|
||||
<ROW Dialog_="VerifyDlg" Control="Text_5" Type="Text" X="25" Y="139" Width="76" Height="13" Attributes="65539" Property="TEXT_3_PROP_1" Text="Launch on Startup : " Order="1400"/>
|
||||
<ROW Dialog_="VerifyDlg" Control="Text_6" Type="Text" X="110" Y="139" Width="145" Height="10" Attributes="65539" Property="AUTO_START_LABEL" Text="[AUTO_START_LABEL]" Order="1500"/>
|
||||
<ROW Dialog_="VerifyDlg" Control="Text_7" Type="Text" X="25" Y="164" Width="76" Height="13" Attributes="65539" Property="TEXT_3_PROP_1_1" Text="Minimize on Close : " Order="1600"/>
|
||||
<ROW Dialog_="VerifyDlg" Control="Text_8" Type="Text" X="110" Y="164" Width="145" Height="10" Attributes="65539" Property="MINIMIZE_ON_CLOSE_LABEL" Text="[MINIMIZE_ON_CLOSE_LABEL]" Order="1700"/>
|
||||
<ROW Dialog_="VerifyDlg" Control="Text_9" Type="Text" X="25" Y="67" Width="321" Height="25" Attributes="65539" Property="TEXT_9_PROP" Text="You seem to have entered an invalid pod url. Please go back to the previous screen and rectify it." Order="1800"/>
|
||||
<ROW Dialog_="VerifyReadyDlg" Control="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" Attributes="1048577" Text="[BannerBitmap]" Order="300" MsiKey="VerifyReadyDlg#BannerBitmap"/>
|
||||
<ROW Dialog_="VerifyReadyDlg" Control="Logo" Type="Text" X="5" Y="228" Width="39" Height="12" Attributes="1" Text="Symphony" Order="500" TextLocId="Control.Text.VerifyReadyDlg#Logo" MsiKey="VerifyReadyDlg#Logo"/>
|
||||
<ROW Dialog_="VerifyReadyDlg" Control="Text" Type="Text" X="25" Y="70" Width="320" Height="21" Attributes="196611" Text="Click "Install" to begin the installation. If you want to review or change any of your installation settings, click "Back". Click "Cancel" to exit the wizard." Order="700" TextLocId="Control.Text.VerifyReadyDlg#Text" MsiKey="VerifyReadyDlg#Text"/>
|
||||
@@ -429,6 +458,16 @@
|
||||
<ATTRIBUTE name="DeletedRows" value="ExitDialog#ViewReadmeText@FolderDlg#Logo@InstallTypeDlg#BannerLine@InstallTypeDlg#InstallTypeText@InstallTypeDlg#Logo@InstallTypeDlg#Title@ProgressDlg#Logo@InstallTypeDlg#Description"/>
|
||||
</COMPONENT>
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiControlConditionComponent">
|
||||
<ROW Dialog_="VerifyDlg" Control_="Next" Action="Disable" Condition="INVALID_POD_URL = "invalid""/>
|
||||
<ROW Dialog_="VerifyDlg" Control_="Text_1" Action="Hide" Condition="INVALID_POD_URL = "invalid""/>
|
||||
<ROW Dialog_="VerifyDlg" Control_="Text_2" Action="Hide" Condition="INVALID_POD_URL = "invalid""/>
|
||||
<ROW Dialog_="VerifyDlg" Control_="Text_3" Action="Hide" Condition="INVALID_POD_URL = "invalid""/>
|
||||
<ROW Dialog_="VerifyDlg" Control_="Text_4" Action="Hide" Condition="INVALID_POD_URL = "invalid""/>
|
||||
<ROW Dialog_="VerifyDlg" Control_="Text_5" Action="Hide" Condition="INVALID_POD_URL = "invalid""/>
|
||||
<ROW Dialog_="VerifyDlg" Control_="Text_6" Action="Hide" Condition="INVALID_POD_URL = "invalid""/>
|
||||
<ROW Dialog_="VerifyDlg" Control_="Text_7" Action="Hide" Condition="INVALID_POD_URL = "invalid""/>
|
||||
<ROW Dialog_="VerifyDlg" Control_="Text_8" Action="Hide" Condition="INVALID_POD_URL = "invalid""/>
|
||||
<ROW Dialog_="VerifyDlg" Control_="Text_9" Action="Hide" Condition="INVALID_POD_URL = "valid""/>
|
||||
<ATTRIBUTE name="DeletedRows" value="ExitDialog#ViewReadmeText#Hide#((NOT AI_INSTALL) AND (NOT AI_PATCH)) OR ((CTRLS <> 1) AND (CTRLS <> 3))"/>
|
||||
</COMPONENT>
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiControlEventComponent">
|
||||
@@ -450,20 +489,24 @@
|
||||
<ROW Dialog_="VerifyReadyDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_PATCH" Ordering="199"/>
|
||||
<ROW Dialog_="VerifyReadyDlg" Control_="Back" Event="NewDialog" Argument="PatchWelcomeDlg" Condition="AI_PATCH" Ordering="203"/>
|
||||
<ROW Dialog_="InstallTypeDlg" Control_="Next" Event="NewDialog" Argument="FolderDlg" Condition="AI_INSTALL" Ordering="101"/>
|
||||
<ROW Dialog_="FolderDlg" Control_="Next" Event="EndDialog" Argument="Return" Condition="AI_INSTALL" Ordering="201"/>
|
||||
<ROW Dialog_="FolderDlg" Control_="Next" Event="NewDialog" Argument="VerifyDlg" Condition="AI_INSTALL" Ordering="201"/>
|
||||
<ROW Dialog_="FolderDlg" Control_="Back" Event="NewDialog" Argument="InstallTypeDlg" Condition="AI_INSTALL" Ordering="1"/>
|
||||
<ROW Dialog_="FolderDlg" Control_="Next" Event="SpawnDialog" Argument="OutOfRbDiskDlg" Condition="AI_INSTALL AND OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)" Ordering="202" Options="2"/>
|
||||
<ROW Dialog_="FolderDlg" Control_="Next" Event="EnableRollback" Argument="False" Condition="AI_INSTALL AND OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"" Ordering="203" Options="2"/>
|
||||
<ROW Dialog_="FolderDlg" Control_="Next" Event="SpawnDialog" Argument="OutOfDiskDlg" Condition="AI_INSTALL AND ( (OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F") )" Ordering="204" Options="2"/>
|
||||
<ROW Dialog_="FolderDlg" Control_="FolderDlgDialogInitializer" Event="[AI_ButtonText_Next_Orig]" Argument="[ButtonText_Next]" Condition="AI_INSTALL" Ordering="0" Options="2"/>
|
||||
<ROW Dialog_="FolderDlg" Control_="FolderDlgDialogInitializer" Event="[ButtonText_Next]" Argument="[[AI_CommitButton]]" Condition="AI_INSTALL" Ordering="1" Options="2"/>
|
||||
<ROW Dialog_="FolderDlg" Control_="FolderDlgDialogInitializer" Event="[AI_Text_Next_Orig]" Argument="[Text_Next]" Condition="AI_INSTALL" Ordering="2" Options="2"/>
|
||||
<ROW Dialog_="FolderDlg" Control_="FolderDlgDialogInitializer" Event="[Text_Next]" Argument="[Text_Install]" Condition="AI_INSTALL" Ordering="3" Options="2"/>
|
||||
<ROW Dialog_="FolderDlg" Control_="Back" Event="[ButtonText_Next]" Argument="[AI_ButtonText_Next_Orig]" Condition="AI_INSTALL" Ordering="2" Options="2"/>
|
||||
<ROW Dialog_="FolderDlg" Control_="Back" Event="[Text_Next]" Argument="[AI_Text_Next_Orig]" Condition="AI_INSTALL" Ordering="3" Options="2"/>
|
||||
<ROW Dialog_="FolderDlg" Control_="Next" Event="DoAction" Argument="CheckBoxesScript" Condition="AI_INSTALL" Ordering="205"/>
|
||||
<ROW Dialog_="FatalError" Control_="Finish" Event="DoAction" Argument="AI_AiBackupCleanup" Condition="1" Ordering="102"/>
|
||||
<ROW Dialog_="UserExit" Control_="Finish" Event="DoAction" Argument="AI_AiBackupCleanup" Condition="1" Ordering="101"/>
|
||||
<ROW Dialog_="FolderDlg" Control_="Next" Event="DoAction" Argument="PodUrlValidation" Condition="AI_INSTALL" Ordering="215"/>
|
||||
<ROW Dialog_="SpawnWaitDialog" Control_="No" Event="EndDialog" Argument="Return" Condition="1" Ordering="100"/>
|
||||
<ROW Dialog_="SpawnWaitDialog" Control_="Yes" Event="EndDialog" Argument="Return" Condition="1" Ordering="100"/>
|
||||
<ROW Dialog_="VerifyDlg" Control_="Cancel" Event="SpawnDialog" Argument="CancelDlg" Condition="1" Ordering="100"/>
|
||||
<ROW Dialog_="VerifyDlg" Control_="Next" Event="EndDialog" Argument="Return" Condition="AI_INSTALL" Ordering="1"/>
|
||||
<ROW Dialog_="VerifyDlg" Control_="Back" Event="NewDialog" Argument="FolderDlg" Condition="AI_INSTALL" Ordering="1"/>
|
||||
<ROW Dialog_="VerifyDlg" Control_="Next" Event="SpawnDialog" Argument="OutOfRbDiskDlg" Condition="AI_INSTALL AND OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)" Ordering="2" Options="2"/>
|
||||
<ROW Dialog_="VerifyDlg" Control_="Next" Event="EnableRollback" Argument="False" Condition="AI_INSTALL AND OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"" Ordering="3" Options="2"/>
|
||||
<ROW Dialog_="VerifyDlg" Control_="Next" Event="SpawnDialog" Argument="OutOfDiskDlg" Condition="AI_INSTALL AND ( (OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F") )" Ordering="4" Options="2"/>
|
||||
<ROW Dialog_="VerifyDlg" Control_="TemplateDlgDialogInitializer" Event="[AI_ButtonText_Next_Orig]" Argument="[ButtonText_Next]" Condition="AI_INSTALL" Ordering="0" Options="2"/>
|
||||
<ROW Dialog_="VerifyDlg" Control_="TemplateDlgDialogInitializer" Event="[ButtonText_Next]" Argument="[[AI_CommitButton]]" Condition="AI_INSTALL" Ordering="1" Options="2"/>
|
||||
<ROW Dialog_="VerifyDlg" Control_="TemplateDlgDialogInitializer" Event="[AI_Text_Next_Orig]" Argument="[Text_Next]" Condition="AI_INSTALL" Ordering="2" Options="2"/>
|
||||
<ROW Dialog_="VerifyDlg" Control_="TemplateDlgDialogInitializer" Event="[Text_Next]" Argument="[Text_Install]" Condition="AI_INSTALL" Ordering="3" Options="2"/>
|
||||
<ROW Dialog_="VerifyDlg" Control_="Back" Event="[ButtonText_Next]" Argument="[AI_ButtonText_Next_Orig]" Condition="AI_INSTALL" Ordering="2" Options="2"/>
|
||||
<ROW Dialog_="VerifyDlg" Control_="Back" Event="[Text_Next]" Argument="[AI_Text_Next_Orig]" Condition="AI_INSTALL" Ordering="3" Options="2"/>
|
||||
<ROW Dialog_="VerifyDlg" Control_="Next" Event="DoAction" Argument="SetCheckboxValues" Condition="AI_INSTALL" Ordering="5"/>
|
||||
</COMPONENT>
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiCreateFolderComponent">
|
||||
<ROW Directory_="Symphony_Dir" Component_="Symphony" ManualDelete="false"/>
|
||||
@@ -492,16 +535,21 @@
|
||||
<ROW Action="AI_TxtUpdaterConfig" Type="11265" Source="TxtUpdater.dll" Target="OnTxtUpdaterConfig" WithoutSeq="true"/>
|
||||
<ROW Action="AI_TxtUpdaterInstall" Type="1" Source="TxtUpdater.dll" Target="OnTxtUpdaterInstall"/>
|
||||
<ROW Action="AI_TxtUpdaterRollback" Type="11521" Source="TxtUpdater.dll" Target="OnTxtUpdaterRollback" WithoutSeq="true"/>
|
||||
<ROW Action="CheckBoxesScript" Type="37" Target="Session.Property("MIN_ON_CLOSE_PROP") = (Session.Property("MIN_ON_CLOSE") === "Checkbox" ? "true" : "false");" TargetUnformatted="Session.Property("AUTO_START") = (Session.Property("AUTO_START") === "true" ? "true" : "false"); Session.Property("MINIMIZE_ON_CLOSE") = (Session.Property("MINIMIZE_ON_CLOSE") === "true" ? "true" : "false"); Session.Property("ALWAYS_ON_TOP") = (Session.Property("ALWAYS_ON_TOP") === "true" ? "true" : "false");" WithoutSeq="true"/>
|
||||
<ROW Action="KillParagon" Type="1" Source="aicustact.dll" Target="StopProcess" Options="1" AdditionalSeq="AI_DATA_SETTER_2"/>
|
||||
<ROW Action="KillRenderer" Type="1" Source="aicustact.dll" Target="StopProcess" Options="1" AdditionalSeq="AI_DATA_SETTER"/>
|
||||
<ROW Action="PodUrlValidation" Type="37" Target="Script Text" TargetUnformatted="// First, check if the protocol is part of the url, if not, prepend it var prefix = "https://"; if (Session.Property("POD_URL").substr(0, prefix.length) !== prefix) { 	Session.Property("POD_URL") = prefix + Session.Property("POD_URL"); } // Check if the entered pod url is valid var podUrlRE = /^((?:http:\/\/)|(?:https:\/\/))(www.)?((?:[a-zA-Z0-9]+\.[a-z]{3})|(?:\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(?::\d+)?))([\/a-zA-Z0-9\.]*)$/; var podUrlTest = podUrlRE.test(Session.Property("POD_URL")); if (!podUrlTest) { 	Session.Property("INVALID_POD_URL") = "invalid"; } else { 	Session.Property("INVALID_POD_URL") = "valid"; } // By default, we set all the values to false and change based on conditions Session.Property("ALWAYS_ON_TOP_LABEL") = "false"; Session.Property("AUTO_START_LABEL") = "false"; Session.Property("MINIMIZE_ON_CLOSE_LABEL") = "false"; // If always on top is checked in the checkbox, set the label value to true if (Session.Property("ALWAYS_ON_TOP") && Session.Property("ALWAYS_ON_TOP") === "true") { Session.Property("ALWAYS_ON_TOP_LABEL") = "true"; } // If launch on startup is checked in the checkbox, set the label value to true if (Session.Property("MINIMIZE_ON_CLOSE") && Session.Property("MINIMIZE_ON_CLOSE") === "true") { Session.Property("MINIMIZE_ON_CLOSE_LABEL") = "true"; } // If minimise on close is checked in the checkbox, set the label value to true if (Session.Property("AUTO_START") && Session.Property("AUTO_START") === "true") { Session.Property("AUTO_START_LABEL") = "true"; }" WithoutSeq="true"/>
|
||||
<ROW Action="SET_APPDIR" Type="307" Source="APPDIR" Target="[ProgramFilesFolder][Manufacturer]\[ProductName]" MultiBuildTarget="DefaultBuild:[AI_UserProgramFiles][Manufacturer]\[ProductName]"/>
|
||||
<ROW Action="SET_SHORTCUTDIR" Type="307" Source="SHORTCUTDIR" Target="[ProgramMenuFolder][ProductName]"/>
|
||||
<ROW Action="SET_TARGETDIR_TO_APPDIR" Type="51" Source="TARGETDIR" Target="[APPDIR]"/>
|
||||
<ROW Action="SetCheckboxValues" Type="37" Target="Script Text" TargetUnformatted="// Pick the values from the selected checkboxes and set it against the session variables Session.Property("AUTO_START") = (Session.Property("AUTO_START") === "true" ? "true" : "false"); Session.Property("MINIMIZE_ON_CLOSE") = (Session.Property("MINIMIZE_ON_CLOSE") === "true" ? "true" : "false"); Session.Property("ALWAYS_ON_TOP") = (Session.Property("ALWAYS_ON_TOP") === "true" ? "true" : "false");" WithoutSeq="true"/>
|
||||
<ROW Action="Symphony.exe" Type="1042" Source="Symphony.exe" Target="--install --peruser"/>
|
||||
<ROW Action="Symphony.exe_All_User" Type="1042" Source="Symphony.exe" Target="--install"/>
|
||||
<ROW Action="UninstallPreviousVersions" Type="1" Source="aicustact.dll" Target="UninstallPreviousVersions" Options="1"/>
|
||||
</COMPONENT>
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiDialogComponent">
|
||||
<ROW Dialog="SpawnWaitDialog" HCentering="50" VCentering="50" Width="260" Height="85" Attributes="3" Title="[ProductName] [Setup]" Control_Default="Yes" Control_Cancel="No"/>
|
||||
<ROW Dialog="VerifyDlg" HCentering="50" VCentering="50" Width="370" Height="270" Attributes="3" Title="[ProductName] [Setup]" Control_Default="Next" Control_Cancel="Cancel"/>
|
||||
</COMPONENT>
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiIconsComponent">
|
||||
<ROW Name="icon.exe" SourcePath="..\..\build\icon.ico" Index="0"/>
|
||||
</COMPONENT>
|
||||
@@ -552,6 +600,7 @@
|
||||
<ROW Registry="HelpTelephone" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="HelpTelephone" Value="[ARPHELPTELEPHONE]" Component_="AI_CustomARPName"/>
|
||||
<ROW Registry="InstallLocation" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="InstallLocation" Value="[APPDIR]" Component_="AI_CustomARPName"/>
|
||||
<ROW Registry="ModifyPath" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="ModifyPath" Value="[AI_UNINSTALLER] /I [ProductCode]" Component_="AI_CustomARPName"/>
|
||||
<ROW Registry="NoModify" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="NoModify" Value="#1" Component_="AI_DisableModify"/>
|
||||
<ROW Registry="NoRepair" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="NoRepair" Value="#1" Component_="AI_CustomARPName"/>
|
||||
<ROW Registry="Path" Root="-1" Key="Software\[Manufacturer]\[ProductName]" Name="Path" Value="[APPDIR]" Component_="ProductInformation"/>
|
||||
<ROW Registry="PodUrl" Root="-1" Key="Software\[Manufacturer]\[ProductName]" Name="PodUrl" Component_="PodUrl"/>
|
||||
|
||||
@@ -6,6 +6,7 @@ const path = require('path');
|
||||
const fs = require('fs');
|
||||
const log = require('../log.js');
|
||||
const logLevels = require('../enums/logLevels.js');
|
||||
const buildNumber = require('../../package.json').buildNumber;
|
||||
|
||||
let aboutWindow;
|
||||
|
||||
@@ -78,6 +79,10 @@ function openAboutWindow(windowName) {
|
||||
aboutWindow.show();
|
||||
});
|
||||
|
||||
aboutWindow.webContents.on('did-finish-load', () => {
|
||||
aboutWindow.webContents.send('buildNumber', buildNumber || '0');
|
||||
});
|
||||
|
||||
aboutWindow.on('close', () => {
|
||||
destroyWindow();
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use strict';
|
||||
const { remote } = require('electron');
|
||||
const { remote, ipcRenderer } = require('electron');
|
||||
|
||||
renderDom();
|
||||
|
||||
@@ -9,13 +9,19 @@ renderDom();
|
||||
function renderDom() {
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
const applicationName = remote.app.getName() || 'Symphony';
|
||||
const version = remote.app.getVersion();
|
||||
let appName = document.getElementById('app-name');
|
||||
let versionText = document.getElementById('version');
|
||||
let copyright = document.getElementById('copyright');
|
||||
|
||||
appName.innerHTML = applicationName;
|
||||
versionText.innerHTML = version ? `Version ${version} (${version})` : null;
|
||||
copyright.innerHTML = `Copyright © ${new Date().getFullYear()} ${applicationName}`
|
||||
});
|
||||
}
|
||||
|
||||
ipcRenderer.on('buildNumber', (event, buildNumber) => {
|
||||
let versionText = document.getElementById('version');
|
||||
const version = remote.app.getVersion();
|
||||
|
||||
if (versionText) {
|
||||
versionText.innerHTML = version ? `Version ${version} (${version}.${buildNumber})` : 'N/A';
|
||||
}
|
||||
});
|
||||
91
js/basicAuth/basic-auth.html
Normal file
91
js/basicAuth/basic-auth.html
Normal file
@@ -0,0 +1,91 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Authentication Request</title>
|
||||
<style>
|
||||
html, body {
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
text-align: center;
|
||||
padding: 20px
|
||||
}
|
||||
|
||||
span {
|
||||
padding-top: 10px;
|
||||
text-align: start;
|
||||
}
|
||||
|
||||
.hostname {
|
||||
font-size: .9em;
|
||||
}
|
||||
|
||||
form {
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
table {
|
||||
border-spacing: 5px;
|
||||
}
|
||||
|
||||
input {
|
||||
width: 200px;
|
||||
height: 20px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
button {
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
display: flex;
|
||||
text-align: center;
|
||||
padding-top: 25px;
|
||||
}
|
||||
|
||||
.button-container {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<span>Please provide your login credentials for:</span>
|
||||
<span id="hostname" class="hostname">hostname</span>
|
||||
<form id="basicAuth" name="Basic Auth" action="Login">
|
||||
<table class="form">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>User name:</td>
|
||||
<td>
|
||||
<input id="username" name="username" title="Username" required>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Password:</td>
|
||||
<td>
|
||||
<input id="password" type="password" title="Password" required>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="footer">
|
||||
<div class="button-container">
|
||||
<button type="submit" id="login">Log In</button>
|
||||
</div>
|
||||
<div class="button-container">
|
||||
<button id="cancel">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
126
js/basicAuth/index.js
Normal file
126
js/basicAuth/index.js
Normal file
@@ -0,0 +1,126 @@
|
||||
'use strict';
|
||||
|
||||
const electron = require('electron');
|
||||
const BrowserWindow = electron.BrowserWindow;
|
||||
const ipc = electron.ipcMain;
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const log = require('../log.js');
|
||||
const logLevels = require('../enums/logLevels.js');
|
||||
|
||||
let basicAuthWindow;
|
||||
|
||||
const local = {};
|
||||
|
||||
let windowConfig = {
|
||||
width: 360,
|
||||
height: 270,
|
||||
show: false,
|
||||
modal: true,
|
||||
autoHideMenuBar: true,
|
||||
titleBarStyle: true,
|
||||
resizable: false,
|
||||
webPreferences: {
|
||||
preload: path.join(__dirname, 'renderer.js'),
|
||||
sandbox: true,
|
||||
nodeIntegration: false
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* method to get the HTML template path
|
||||
* @returns {string}
|
||||
*/
|
||||
function getTemplatePath() {
|
||||
let templatePath = path.join(__dirname, 'basic-auth.html');
|
||||
try {
|
||||
fs.statSync(templatePath).isFile();
|
||||
} catch (err) {
|
||||
log.send(logLevels.ERROR, 'basic-auth: Could not find template ("' + templatePath + '").');
|
||||
}
|
||||
return 'file://' + templatePath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens the basic auth window for authentication
|
||||
* @param {String} windowName - name of the window upon which this window should show
|
||||
* @param {String} hostname - name of the website that requires authentication
|
||||
* @param {Function} callback
|
||||
*/
|
||||
function openBasicAuthWindow(windowName, hostname, callback) {
|
||||
|
||||
// Register callback function
|
||||
if (typeof callback === 'function') {
|
||||
local.authCallback = callback;
|
||||
}
|
||||
|
||||
// This prevents creating multiple instances of the
|
||||
// basic auth window
|
||||
if (basicAuthWindow) {
|
||||
if (basicAuthWindow.isMinimized()) {
|
||||
basicAuthWindow.restore();
|
||||
}
|
||||
basicAuthWindow.focus();
|
||||
return;
|
||||
}
|
||||
let allWindows = BrowserWindow.getAllWindows();
|
||||
allWindows = allWindows.find((window) => { return window.winName === windowName });
|
||||
|
||||
// if we couldn't find any window matching the window name
|
||||
// it will render as a new window
|
||||
if (allWindows) {
|
||||
windowConfig.parent = allWindows;
|
||||
}
|
||||
|
||||
basicAuthWindow = new BrowserWindow(windowConfig);
|
||||
basicAuthWindow.setVisibleOnAllWorkspaces(true);
|
||||
basicAuthWindow.loadURL(getTemplatePath());
|
||||
|
||||
// sets the AlwaysOnTop property for the basic auth window
|
||||
// if the main window's AlwaysOnTop is true
|
||||
let focusedWindow = BrowserWindow.getFocusedWindow();
|
||||
if (focusedWindow && focusedWindow.isAlwaysOnTop()) {
|
||||
basicAuthWindow.setAlwaysOnTop(true);
|
||||
}
|
||||
|
||||
basicAuthWindow.once('ready-to-show', () => {
|
||||
basicAuthWindow.show();
|
||||
});
|
||||
|
||||
basicAuthWindow.webContents.on('did-finish-load', () => {
|
||||
basicAuthWindow.webContents.send('hostname', hostname);
|
||||
});
|
||||
|
||||
basicAuthWindow.on('close', () => {
|
||||
destroyWindow();
|
||||
});
|
||||
|
||||
basicAuthWindow.on('closed', () => {
|
||||
destroyWindow();
|
||||
});
|
||||
}
|
||||
|
||||
ipc.on('login', (event, args) => {
|
||||
if (typeof args === 'object' && typeof local.authCallback === 'function') {
|
||||
local.authCallback(args.username, args.password);
|
||||
basicAuthWindow.close();
|
||||
}
|
||||
});
|
||||
|
||||
ipc.on('close-basic-auth', () => {
|
||||
if (basicAuthWindow) {
|
||||
basicAuthWindow.close();
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Destroys a window
|
||||
*/
|
||||
function destroyWindow() {
|
||||
basicAuthWindow = null;
|
||||
}
|
||||
|
||||
|
||||
module.exports = {
|
||||
openBasicAuthWindow: openBasicAuthWindow
|
||||
};
|
||||
55
js/basicAuth/renderer.js
Normal file
55
js/basicAuth/renderer.js
Normal file
@@ -0,0 +1,55 @@
|
||||
'use strict';
|
||||
const electron = require('electron');
|
||||
const ipc = electron.ipcRenderer;
|
||||
|
||||
renderDom();
|
||||
|
||||
/**
|
||||
* Method that renders application data
|
||||
*/
|
||||
function renderDom() {
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
loadContent();
|
||||
});
|
||||
}
|
||||
|
||||
function loadContent() {
|
||||
let basicAuth = document.getElementById('basicAuth');
|
||||
let cancel = document.getElementById('cancel');
|
||||
|
||||
if (basicAuth) {
|
||||
basicAuth.onsubmit = (e) => {
|
||||
e.preventDefault();
|
||||
submitForm();
|
||||
};
|
||||
}
|
||||
|
||||
if (cancel) {
|
||||
cancel.addEventListener('click', () => {
|
||||
ipc.send('close-basic-auth');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method that gets invoked on submitting the form
|
||||
*/
|
||||
function submitForm() {
|
||||
let username = document.getElementById('username').value;
|
||||
let password = document.getElementById('password').value;
|
||||
|
||||
if (username && password) {
|
||||
ipc.send('login', { username, password });
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the hosts name
|
||||
*/
|
||||
ipc.on('hostname', (event, host) => {
|
||||
let hostname = document.getElementById('hostname');
|
||||
|
||||
if (hostname){
|
||||
hostname.innerHTML = host || 'unknown';
|
||||
}
|
||||
});
|
||||
61
js/config.js
61
js/config.js
@@ -6,6 +6,8 @@ const path = require('path');
|
||||
const fs = require('fs');
|
||||
const AppDirectory = require('appdirectory');
|
||||
const omit = require('lodash.omit');
|
||||
const pick = require('lodash.pick');
|
||||
const difference = require('lodash.difference');
|
||||
|
||||
const isDevEnv = require('./utils/misc.js').isDevEnv;
|
||||
const isMac = require('./utils/misc.js').isMac;
|
||||
@@ -314,6 +316,64 @@ function updateUserConfigMac() {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Method that tries to grab multiple config field from user config
|
||||
* if field doesn't exist tries reading from global config
|
||||
*
|
||||
* @param {Array} fieldNames - array of config filed names
|
||||
* @returns {Promise} - object all the config data from user and global config
|
||||
*/
|
||||
function getMultipleConfigField(fieldNames) {
|
||||
return new Promise((resolve, reject) => {
|
||||
let userConfigData;
|
||||
|
||||
if (!fieldNames && fieldNames.length < 0) {
|
||||
reject('cannot read config file, invalid fields');
|
||||
return;
|
||||
}
|
||||
|
||||
// reads user config data
|
||||
readUserConfig().then((config) => {
|
||||
userConfigData = pick(config, fieldNames);
|
||||
let userConfigKeys = userConfigData ? Object.keys(userConfigData) : undefined;
|
||||
|
||||
/**
|
||||
* Condition to validate data from user config,
|
||||
* if all the required fields are not present
|
||||
* this tries to fetch the remaining fields from global config
|
||||
*/
|
||||
if (!userConfigKeys || userConfigKeys.length < fieldNames.length) {
|
||||
|
||||
// remainingConfig - config field that are not present in the user config
|
||||
let remainingConfig = difference(fieldNames, userConfigKeys);
|
||||
|
||||
if (remainingConfig && Object.keys(remainingConfig).length > 0) {
|
||||
readGlobalConfig().then((globalConfigData) => {
|
||||
// assigns the remaining fields from global config to the user config
|
||||
userConfigData = Object.assign(userConfigData, pick(globalConfigData, remainingConfig));
|
||||
resolve(userConfigData);
|
||||
}).catch((err) => {
|
||||
reject(err);
|
||||
});
|
||||
}
|
||||
|
||||
} else {
|
||||
resolve(userConfigData);
|
||||
}
|
||||
}).catch(() => {
|
||||
// This reads global config if there was any
|
||||
// error while reading user config
|
||||
readGlobalConfig().then((config) => {
|
||||
userConfigData = pick(config, fieldNames);
|
||||
resolve(userConfigData);
|
||||
}).catch((err) => {
|
||||
reject(err);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Clears the cached config
|
||||
*/
|
||||
@@ -359,6 +419,7 @@ module.exports = {
|
||||
updateConfigField,
|
||||
updateUserConfigWin,
|
||||
updateUserConfigMac,
|
||||
getMultipleConfigField,
|
||||
|
||||
// items below here are only exported for testing, do NOT use!
|
||||
saveUserConfig,
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
// renderer process, this will have to do. See github issue posted here to
|
||||
// electron: https://github.com/electron/electron/issues/9312
|
||||
|
||||
const { ipcRenderer } = require('electron');
|
||||
const { ipcRenderer, remote } = require('electron');
|
||||
const { isWindowsOS } = require('../utils/misc');
|
||||
|
||||
let nextId = 0;
|
||||
let includes = [].includes;
|
||||
@@ -52,6 +53,17 @@ function getSources(options, callback) {
|
||||
};
|
||||
}
|
||||
|
||||
if (isWindowsOS) {
|
||||
/**
|
||||
* Sets the captureWindow to false if Desktop composition
|
||||
* is disabled otherwise true
|
||||
*
|
||||
* Setting captureWindow to false returns only screen sources
|
||||
* @type {boolean}
|
||||
*/
|
||||
captureWindow = remote.systemPreferences.isAeroGlassEnabled();
|
||||
}
|
||||
|
||||
id = getNextId();
|
||||
ipcRenderer.send('ELECTRON_BROWSER_DESKTOP_CAPTURER_GET_SOURCES', captureWindow, captureScreen, updatedOptions.thumbnailSize, id);
|
||||
|
||||
|
||||
25
js/dialogs/showBasicAuth.js
Normal file
25
js/dialogs/showBasicAuth.js
Normal file
@@ -0,0 +1,25 @@
|
||||
'use strict';
|
||||
|
||||
const electron = require('electron');
|
||||
|
||||
const basicAuth = require('../basicAuth');
|
||||
|
||||
/**
|
||||
* Having a proxy or hosts that requires authentication will allow user to
|
||||
* enter their credentials 'username' & 'password'
|
||||
*/
|
||||
electron.app.on('login', (event, webContents, request, authInfo, callback) => {
|
||||
|
||||
event.preventDefault();
|
||||
|
||||
// name of the host to display
|
||||
let hostname = authInfo.host || authInfo.realm;
|
||||
let browserWin = electron.BrowserWindow.fromWebContents(webContents);
|
||||
let windowName = browserWin.winName || '';
|
||||
|
||||
/**
|
||||
* Opens an electron modal window in which
|
||||
* user can enter credentials fot the host
|
||||
*/
|
||||
basicAuth.openBasicAuthWindow(windowName, hostname, callback);
|
||||
});
|
||||
53
js/main.js
53
js/main.js
@@ -11,6 +11,7 @@ const urlParser = require('url');
|
||||
|
||||
// Local Dependencies
|
||||
const {getConfigField, updateUserConfigWin, updateUserConfigMac, readConfigFileSync} = require('./config.js');
|
||||
const {setCheckboxValues} = require('./menus/menuTemplate.js');
|
||||
const { isMac, isDevEnv } = require('./utils/misc.js');
|
||||
const protocolHandler = require('./protocolHandler');
|
||||
const getCmdLineArg = require('./utils/getCmdLineArg.js');
|
||||
@@ -65,8 +66,10 @@ const shouldQuit = app.makeSingleInstance((argv) => {
|
||||
processProtocolAction(argv);
|
||||
});
|
||||
|
||||
// quit if another instance is already running, ignore for dev env
|
||||
if (!isDevEnv && shouldQuit) {
|
||||
let allowMultiInstance = getCmdLineArg(process.argv, '--multiInstance', true) || isDevEnv;
|
||||
|
||||
// quit if another instance is already running, ignore for dev env or if app was started with multiInstance flag
|
||||
if (!allowMultiInstance && shouldQuit) {
|
||||
app.quit();
|
||||
}
|
||||
|
||||
@@ -117,7 +120,7 @@ setChromeFlags();
|
||||
* initialization and is ready to create browser windows.
|
||||
* Some APIs can only be used after this event occurs.
|
||||
*/
|
||||
app.on('ready', setupThenOpenMainWindow);
|
||||
app.on('ready', readConfigThenOpenMainWindow);
|
||||
|
||||
/**
|
||||
* Is triggered when all the windows are closed
|
||||
@@ -152,6 +155,20 @@ app.on('open-url', function(event, url) {
|
||||
handleProtocolAction(url);
|
||||
});
|
||||
|
||||
/**
|
||||
* Reads the config fields that are required for the menu items
|
||||
* then opens the main window
|
||||
*
|
||||
* This is a workaround for the issue where the menu template was returned
|
||||
* even before the config data was populated
|
||||
* https://perzoinc.atlassian.net/browse/ELECTRON-154
|
||||
*/
|
||||
function readConfigThenOpenMainWindow() {
|
||||
setCheckboxValues()
|
||||
.then(setupThenOpenMainWindow)
|
||||
.catch(setupThenOpenMainWindow)
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets up the app (to handle various things like config changes, protocol handling etc.)
|
||||
* and opens the main window
|
||||
@@ -165,6 +182,12 @@ function setupThenOpenMainWindow() {
|
||||
// allows installer to launch app and set appropriate global / user config params.
|
||||
let hasInstallFlag = getCmdLineArg(process.argv, '--install', true);
|
||||
let perUserInstall = getCmdLineArg(process.argv, '--peruser', true);
|
||||
let customDataArg = getCmdLineArg(process.argv, '--userDataPath=', false);
|
||||
|
||||
if (customDataArg && customDataArg.split('=').length > 1) {
|
||||
let customDataFolder = customDataArg.split('=')[1];
|
||||
app.setPath('userData', customDataFolder);
|
||||
}
|
||||
if (!isMac && hasInstallFlag) {
|
||||
getConfigField('launchOnStartup')
|
||||
.then(setStartup)
|
||||
@@ -182,9 +205,8 @@ function setupThenOpenMainWindow() {
|
||||
let launchOnStartup = process.argv[3];
|
||||
// We wire this in via the post install script
|
||||
// to get the config file path where the app is installed
|
||||
let appGlobalConfigPath = process.argv[2];
|
||||
setStartup(launchOnStartup)
|
||||
.then(() => updateUserConfigMac(appGlobalConfigPath))
|
||||
.then(updateUserConfigMac)
|
||||
.then(app.quit)
|
||||
.catch(app.quit);
|
||||
return;
|
||||
@@ -203,18 +225,15 @@ function setupThenOpenMainWindow() {
|
||||
* @returns {Promise}
|
||||
*/
|
||||
function setStartup(lStartup) {
|
||||
return symphonyAutoLauncher.isEnabled()
|
||||
.then(function(isEnabled) {
|
||||
if (!isEnabled && lStartup) {
|
||||
return symphonyAutoLauncher.enable();
|
||||
}
|
||||
|
||||
if (isEnabled && !lStartup) {
|
||||
return symphonyAutoLauncher.disable();
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
return new Promise((resolve) => {
|
||||
let launchOnStartup = (lStartup === 'true');
|
||||
if (launchOnStartup) {
|
||||
symphonyAutoLauncher.enable();
|
||||
return resolve();
|
||||
}
|
||||
symphonyAutoLauncher.disable();
|
||||
return resolve();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const electron = require('electron');
|
||||
const { getConfigField, updateConfigField } = require('../config.js');
|
||||
const { updateConfigField, getMultipleConfigField } = require('../config.js');
|
||||
const AutoLaunch = require('auto-launch');
|
||||
const isMac = require('../utils/misc.js').isMac;
|
||||
const log = require('../log.js');
|
||||
@@ -13,8 +13,6 @@ let minimizeOnClose = false;
|
||||
let launchOnStartup = false;
|
||||
let isAlwaysOnTop = false;
|
||||
|
||||
setCheckboxValues();
|
||||
|
||||
let symphonyAutoLauncher;
|
||||
|
||||
if (isMac) {
|
||||
@@ -266,39 +264,42 @@ function getTemplate(app) {
|
||||
* based on configuration
|
||||
*/
|
||||
function setCheckboxValues() {
|
||||
getConfigField('minimizeOnClose').then(function(mClose) {
|
||||
minimizeOnClose = mClose;
|
||||
}).catch(function(err) {
|
||||
let title = 'Error loading configuration';
|
||||
log.send(logLevels.ERROR, 'MenuTemplate: error getting config field minimizeOnClose, error: ' + err);
|
||||
electron.dialog.showErrorBox(title, title + ': ' + err);
|
||||
return new Promise((resolve) => {
|
||||
/**
|
||||
* Method that reads multiple config fields
|
||||
*/
|
||||
getMultipleConfigField(['minimizeOnClose', 'launchOnStartup', 'alwaysOnTop', 'notificationSettings'])
|
||||
.then(function (configData) {
|
||||
for (let key in configData) {
|
||||
if (configData.hasOwnProperty(key)) { // eslint-disable-line no-prototype-builtins
|
||||
switch (key) {
|
||||
case 'minimizeOnClose':
|
||||
minimizeOnClose = configData[key];
|
||||
break;
|
||||
case 'launchOnStartup':
|
||||
launchOnStartup = configData[key];
|
||||
break;
|
||||
case 'alwaysOnTop':
|
||||
isAlwaysOnTop = configData[key];
|
||||
eventEmitter.emit('isAlwaysOnTop', configData[key]);
|
||||
break;
|
||||
case 'notificationSettings':
|
||||
eventEmitter.emit('notificationSettings', configData[key]);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return resolve();
|
||||
})
|
||||
.catch((err) => {
|
||||
let title = 'Error loading configuration';
|
||||
log.send(logLevels.ERROR, 'MenuTemplate: error reading configuration fields, error: ' + err);
|
||||
electron.dialog.showErrorBox(title, title + ': ' + err);
|
||||
return resolve();
|
||||
});
|
||||
});
|
||||
|
||||
getConfigField('launchOnStartup').then(function(lStartup) {
|
||||
launchOnStartup = lStartup;
|
||||
}).catch(function(err) {
|
||||
let title = 'Error loading configuration';
|
||||
log.send(logLevels.ERROR, 'MenuTemplate: error getting config field launchOnStartup, error: ' + err);
|
||||
electron.dialog.showErrorBox(title, title + ': ' + err);
|
||||
});
|
||||
|
||||
getConfigField('alwaysOnTop').then(function(mAlwaysOnTop) {
|
||||
isAlwaysOnTop = mAlwaysOnTop;
|
||||
eventEmitter.emit('isAlwaysOnTop', isAlwaysOnTop);
|
||||
}).catch(function(err) {
|
||||
let title = 'Error loading configuration';
|
||||
log.send(logLevels.ERROR, 'MenuTemplate: error getting config field alwaysOnTop, error: ' + err);
|
||||
electron.dialog.showErrorBox(title, title + ': ' + err);
|
||||
});
|
||||
|
||||
getConfigField('notificationSettings').then(function(notfObject) {
|
||||
eventEmitter.emit('notificationSettings', notfObject);
|
||||
}).catch(function(err) {
|
||||
let title = 'Error loading configuration';
|
||||
log.send(logLevels.ERROR, 'MenuTemplate: error getting config field notificationSettings, error: ' + err);
|
||||
electron.dialog.showErrorBox(title, title + ': ' + err);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function getMinimizeOnClose() {
|
||||
@@ -307,5 +308,6 @@ function getMinimizeOnClose() {
|
||||
|
||||
module.exports = {
|
||||
getTemplate: getTemplate,
|
||||
getMinimizeOnClose: getMinimizeOnClose
|
||||
getMinimizeOnClose: getMinimizeOnClose,
|
||||
setCheckboxValues: setCheckboxValues
|
||||
};
|
||||
BIN
js/notify/assets/symphony-logo-black.png
Normal file
BIN
js/notify/assets/symphony-logo-black.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
BIN
js/notify/assets/symphony-logo-white.png
Normal file
BIN
js/notify/assets/symphony-logo-white.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
@@ -9,6 +9,8 @@
|
||||
const electron = require('electron');
|
||||
const ipc = electron.ipcRenderer;
|
||||
|
||||
const whiteColorRegExp = new RegExp(/^(?:white|#fff(?:fff)?|rgba?\(\s*255\s*,\s*255\s*,\s*255\s*(?:,\s*1\s*)?\))$/i);
|
||||
|
||||
/**
|
||||
* Sets style for a notification
|
||||
* @param config
|
||||
@@ -19,7 +21,9 @@ function setStyle(config) {
|
||||
let container = notiDoc.getElementById('container');
|
||||
let header = notiDoc.getElementById('header');
|
||||
let image = notiDoc.getElementById('image');
|
||||
let logo = notiDoc.getElementById('symphony-logo');
|
||||
let title = notiDoc.getElementById('title');
|
||||
let pod = notiDoc.getElementById('pod');
|
||||
let message = notiDoc.getElementById('message');
|
||||
let close = notiDoc.getElementById('close');
|
||||
|
||||
@@ -37,8 +41,12 @@ function setStyle(config) {
|
||||
|
||||
setStyleOnDomElement(config.defaultStyleImage, image);
|
||||
|
||||
setStyleOnDomElement(config.defaultStyleLogo, logo);
|
||||
|
||||
setStyleOnDomElement(config.defaultStyleTitle, title);
|
||||
|
||||
setStyleOnDomElement(config.defaultStylePod, pod);
|
||||
|
||||
setStyleOnDomElement(config.defaultStyleText, message);
|
||||
|
||||
setStyleOnDomElement(config.defaultStyleClose, close);
|
||||
@@ -75,6 +83,20 @@ function setContents(event, notificationObj) {
|
||||
|
||||
if (notificationObj.color) {
|
||||
container.style.backgroundColor = notificationObj.color;
|
||||
let logo = notiDoc.getElementById('symphony-logo');
|
||||
|
||||
if (notificationObj.color.match(whiteColorRegExp)) {
|
||||
logo.src = './assets/symphony-logo-black.png';
|
||||
} else {
|
||||
let title = notiDoc.getElementById('title');
|
||||
let pod = notiDoc.getElementById('pod');
|
||||
let message = notiDoc.getElementById('message');
|
||||
|
||||
message.style.color = '#ffffff';
|
||||
title.style.color = '#ffffff';
|
||||
pod.style.color = notificationObj.color;
|
||||
logo.src = './assets/symphony-logo-white.png';
|
||||
}
|
||||
}
|
||||
|
||||
if (notificationObj.flash) {
|
||||
|
||||
@@ -2,11 +2,17 @@
|
||||
<head></head>
|
||||
<body style='margin:0; overflow: hidden; -webkit-user-select: none;'>
|
||||
<div id="container">
|
||||
<div id="header">
|
||||
<img src="" id="image" />
|
||||
<div>
|
||||
<img src="" id="symphony-logo">
|
||||
</div>
|
||||
<div id="header">
|
||||
<span id="title"></span>
|
||||
<span id="pod"></span>
|
||||
<span id="message"></span>
|
||||
</div>
|
||||
<p id="message"></p>
|
||||
<div id="picture">
|
||||
<img src="" id="image" style="border-radius: 4px" />
|
||||
</div>
|
||||
<div id="close">
|
||||
<svg fill="#000000" height="16" viewBox="0 0 24 24" width="16" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"></path>
|
||||
|
||||
@@ -55,9 +55,9 @@ let config = {
|
||||
// corner to put notifications
|
||||
// upper-right, upper-left, lower-right, lower-left
|
||||
startCorner: 'upper-right',
|
||||
width: 300,
|
||||
height: 80,
|
||||
borderRadius: 2,
|
||||
width: 380,
|
||||
height: 70,
|
||||
borderRadius: 5,
|
||||
displayTime: 5000,
|
||||
animationSteps: 5,
|
||||
animationStepMs: 5,
|
||||
@@ -67,63 +67,66 @@ let config = {
|
||||
defaultStyleContainer: {
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
flexDirection: 'column',
|
||||
backgroundColor: '#f0f0f0',
|
||||
overflow: 'hidden',
|
||||
padding: 10,
|
||||
position: 'relative',
|
||||
lineHeight: '15px',
|
||||
boxSizing: 'border-box'
|
||||
},
|
||||
defaultStyleHeader: {
|
||||
flex: '0 0 auto',
|
||||
display: 'flex',
|
||||
flexDirection: 'row'
|
||||
width: 245,
|
||||
minWidth: 230,
|
||||
margin: "12px 10px"
|
||||
},
|
||||
defaultStyleImage: {
|
||||
flex: '0 0 auto',
|
||||
overflow: 'hidden',
|
||||
height: 30,
|
||||
width: 30,
|
||||
marginLeft: 0,
|
||||
marginRight: 8
|
||||
height: 43,
|
||||
borderRadius: 4,
|
||||
marginTop: 12,
|
||||
width: 43
|
||||
},
|
||||
defaultStyleClose: {
|
||||
position: 'absolute',
|
||||
top: 8,
|
||||
right: 8,
|
||||
width: 16,
|
||||
height: 16,
|
||||
margin: "10px 8px 0 8px",
|
||||
opacity: 0.54,
|
||||
fontSize: 12,
|
||||
color: '#CCC'
|
||||
},
|
||||
defaultStyleTitle: {
|
||||
fontFamily: 'Arial',
|
||||
fontFamily: 'sans-serif',
|
||||
fontSize: 14,
|
||||
fontWeight: 700,
|
||||
opacity: 0.87,
|
||||
marginRight: 10,
|
||||
alignSelf: 'center',
|
||||
color: '#4a4a4a',
|
||||
overflow: 'hidden',
|
||||
display: '-webkit-box',
|
||||
webkitLineClamp: 2,
|
||||
webkitLineClamp: 1,
|
||||
webkitBoxOrient: 'vertical',
|
||||
},
|
||||
defaultStylePod: {
|
||||
fontFamily: 'sans-serif',
|
||||
fontSize: 11,
|
||||
color: '#adadad',
|
||||
overflow: 'hidden',
|
||||
filter: 'brightness(70%)',
|
||||
display: '-webkit-box',
|
||||
webkitLineClamp: 1,
|
||||
webkitBoxOrient: 'vertical',
|
||||
},
|
||||
defaultStyleText: {
|
||||
flex: '0 0 auto',
|
||||
fontFamily: 'Calibri',
|
||||
fontSize: 14,
|
||||
fontWeight: 400,
|
||||
opacity: 0.87,
|
||||
margin: 0,
|
||||
marginTop: 4,
|
||||
fontFamily: 'sans-serif',
|
||||
fontSize: 12,
|
||||
color: '#4a4a4a',
|
||||
marginTop: 12,
|
||||
overflow: 'hidden',
|
||||
display: '-webkit-box',
|
||||
webkitLineClamp: 2,
|
||||
webkitLineClamp: 1,
|
||||
webkitBoxOrient: 'vertical',
|
||||
cursor: 'default'
|
||||
},
|
||||
defaultStyleLogo: {
|
||||
margin: "12px 0 0 -12px",
|
||||
opacity: 0.6,
|
||||
},
|
||||
defaultWindow: {
|
||||
alwaysOnTop: true,
|
||||
skipTaskbar: true,
|
||||
@@ -171,7 +174,7 @@ function setup() {
|
||||
setupConfig();
|
||||
|
||||
// if display added/removed/changed then re-run setup and remove all existing
|
||||
// notifications. ToDo: should reposition notifications rather than closing.
|
||||
// notifications.
|
||||
electron.screen.on('display-added', setupConfig);
|
||||
electron.screen.on('display-removed', setupConfig);
|
||||
electron.screen.on('display-metrics-changed', setupConfig);
|
||||
@@ -238,7 +241,6 @@ function calcDimensions() {
|
||||
* Setup the notification config
|
||||
*/
|
||||
function setupConfig() {
|
||||
closeAll();
|
||||
|
||||
// This feature only applies to windows
|
||||
if (!isMac) {
|
||||
@@ -694,33 +696,6 @@ function getWindow() {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Closes all the notifications and windows
|
||||
*/
|
||||
function closeAll() {
|
||||
// Clear out animation Queue and close windows
|
||||
animationQueue.clear();
|
||||
|
||||
activeNotifications.forEach(function(window) {
|
||||
if (window.displayTimer) {
|
||||
clearTimeout(window.displayTimer);
|
||||
}
|
||||
if (window.electronNotifyOnCloseFunc) {
|
||||
// ToDo: fix this: shouldn't delete method on arg
|
||||
/* eslint-disable */
|
||||
delete window.electronNotifyOnCloseFunc;
|
||||
/* eslint-enable */
|
||||
}
|
||||
window.close();
|
||||
});
|
||||
|
||||
cleanUpInactiveWindow();
|
||||
|
||||
// Reset certain vars
|
||||
nextInsertPos = {};
|
||||
activeNotifications = [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Once a minute, remove inactive windows to free up memory used.
|
||||
*/
|
||||
|
||||
@@ -48,12 +48,15 @@ function updateScreens() {
|
||||
screens = electron.screen.getAllDisplays();
|
||||
|
||||
// Notifying renderer when a display is added/removed
|
||||
if (configurationWindow && screens && screens.length >= 0) {
|
||||
configurationWindow.webContents.send('screens', screens);
|
||||
if (configurationWindow) {
|
||||
// Event that updates the DOM elements
|
||||
// notification position checkbox and monitor selection drop-down
|
||||
configurationWindow.webContents.send('notificationSettings', {position: position, display: display});
|
||||
|
||||
if (screens && screens.length >= 0) {
|
||||
configurationWindow.webContents.send('screens', screens);
|
||||
}
|
||||
}
|
||||
// Event that updates the DOM elements
|
||||
// notification position checkbox and monitor selection drop-down
|
||||
configurationWindow.webContents.send('notificationSettings', {position: position, display: display});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,11 +4,13 @@ const isDevEnv = process.env.ELECTRON_DEV ?
|
||||
process.env.ELECTRON_DEV.trim().toLowerCase() === 'true' : false;
|
||||
|
||||
const isMac = (process.platform === 'darwin');
|
||||
const isWindowsOS = (process.platform === 'win32');
|
||||
|
||||
const isNodeEnv = !!process.env.NODE_ENV;
|
||||
|
||||
module.exports = {
|
||||
isDevEnv: isDevEnv,
|
||||
isMac: isMac,
|
||||
isWindowsOS: isWindowsOS,
|
||||
isNodeEnv: isNodeEnv
|
||||
};
|
||||
|
||||
@@ -23,6 +23,7 @@ const { isMac, isNodeEnv } = require('./utils/misc');
|
||||
|
||||
// show dialog when certificate errors occur
|
||||
require('./dialogs/showCertError.js');
|
||||
require('./dialogs/showBasicAuth.js');
|
||||
|
||||
// Keep a global reference of the window object, if you don't, the window will
|
||||
// be closed automatically when the JavaScript object is garbage collected.
|
||||
@@ -40,7 +41,11 @@ let sandboxed = false;
|
||||
const preloadMainScript = path.join(__dirname, 'preload/_preloadMain.js');
|
||||
|
||||
const MIN_WIDTH = 300;
|
||||
const MIN_HEIGHT = 600;
|
||||
const MIN_HEIGHT = 300;
|
||||
|
||||
// Default window size for pop-out windows
|
||||
const DEFAULT_WIDTH = 300;
|
||||
const DEFAULT_HEIGHT = 600;
|
||||
|
||||
/**
|
||||
* Adds a window key
|
||||
@@ -293,8 +298,8 @@ function doCreateMainWindow(initialUrl, initialBounds) {
|
||||
let x = 0;
|
||||
let y = 0;
|
||||
|
||||
let width = newWinOptions.width || MIN_WIDTH;
|
||||
let height = newWinOptions.height || MIN_HEIGHT;
|
||||
let width = newWinOptions.width || DEFAULT_WIDTH;
|
||||
let height = newWinOptions.height || DEFAULT_HEIGHT;
|
||||
|
||||
// try getting x and y position from query parameters
|
||||
let query = newWinParsedUrl && querystring.parse(newWinParsedUrl.query);
|
||||
@@ -323,8 +328,8 @@ function doCreateMainWindow(initialUrl, initialBounds) {
|
||||
/* eslint-disable no-param-reassign */
|
||||
newWinOptions.x = x;
|
||||
newWinOptions.y = y;
|
||||
newWinOptions.width = Math.max(width, MIN_WIDTH);
|
||||
newWinOptions.height = Math.max(height, MIN_HEIGHT);
|
||||
newWinOptions.width = Math.max(width, DEFAULT_WIDTH);
|
||||
newWinOptions.height = Math.max(height, DEFAULT_HEIGHT);
|
||||
newWinOptions.minWidth = MIN_WIDTH;
|
||||
newWinOptions.minHeight = MIN_HEIGHT;
|
||||
newWinOptions.alwaysOnTop = alwaysOnTop;
|
||||
@@ -342,6 +347,12 @@ function doCreateMainWindow(initialUrl, initialBounds) {
|
||||
if (browserWin) {
|
||||
log.send(logLevels.INFO, 'loaded pop-out window url: ' + newWinParsedUrl);
|
||||
|
||||
if (!isMac) {
|
||||
// Removes the menu bar from the pop-out window
|
||||
// setMenu is currently only supported on Windows and Linux
|
||||
browserWin.setMenu(null);
|
||||
}
|
||||
|
||||
getConfigField('url')
|
||||
.then((podUrl) => {
|
||||
getConfigField('crashReporter')
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"name": "Symphony",
|
||||
"productName": "Symphony",
|
||||
"version": "2.0.0",
|
||||
"buildNumber": "",
|
||||
"description": "Symphony desktop app (Foundation ODP)",
|
||||
"author": "Symphony",
|
||||
"main": "js/main.js",
|
||||
@@ -104,6 +105,8 @@
|
||||
"filesize": "^3.5.10",
|
||||
"keymirror": "0.1.1",
|
||||
"lodash.omit": "^4.5.0",
|
||||
"lodash.pick": "^4.4.0",
|
||||
"lodash.difference": "^4.5.0",
|
||||
"winreg": "^1.2.3"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
|
||||
Reference in New Issue
Block a user