electron-37: fixed issues w.r.t. installer pane not capturing the pod… (#115)

* electron-37: fixed issues w.r.t. installer pane not capturing the pod url and also added startup plist in the post install script

* electron-37: removed watch paths on launch agent
This commit is contained in:
Vishwas Shashidhar 2017-05-30 22:39:34 +05:30 committed by Lynn
parent 2acba44f56
commit 307b60dd25
10 changed files with 38 additions and 17 deletions

3
.gitignore vendored
View File

@ -14,7 +14,6 @@ DerivedData/
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/
*.moved-aside
*.xccheckout
*.xcscmblueprint
@ -23,3 +22,5 @@ xcuserdata/
*.dSYM.zip
*.dSYM
installer/mac/build/
installer/mac/SymphonySettingsPlugin/SymphonySettingsPlugin.xcodeproj/xcuserdata
installer/mac/SymphonySettingsPlugin/SymphonySettingsPlugin.xcodeproj/project.xcworkspace/xcuserdata

View File

@ -6,7 +6,7 @@
<dict>
<key>Resources/Base.lproj/MyInstallerPane.nib</key>
<data>
3HG8UEw6WFkbwFZjfhIU/OzjLks=
4ukZOKTe6287gYe3sqxm+1qqsb8=
</data>
<key>Resources/InstallerSections.plist</key>
<data>
@ -37,7 +37,7 @@
<dict>
<key>hash2</key>
<data>
WevXKKGDjV20uPQvqf0GCvSehTCXdBwwHhIijv6ffPg=
JYmp/b032I4vsgp6hW2iH2wQ1Zu0ADIXbVGTnb9xzOE=
</data>
</dict>
<key>Resources/InstallerSections.plist</key>

View File

@ -19,6 +19,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="podUrlTextBox" destination="uwa-xi-M5X" id="vLY-gf-Cu7"/>
</connections>
</customObject>
<customView id="TUK-W2-vig" userLabel="View">
@ -76,9 +77,6 @@
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
<action selector="capturePodUrl:" target="Qsn-FY-4qK" id="Fr4-tm-ORc"/>
</connections>
</textField>
</subviews>
</customView>

View File

@ -11,5 +11,6 @@
@property (weak) IBOutlet NSButton *minimizeOnCloseCheckBox;
@property (weak) IBOutlet NSButton *autoLaunchCheckBox;
@property (weak) IBOutlet NSTextField *podUrlTextBox;
@end

View File

@ -14,13 +14,12 @@
return [[NSBundle bundleForClass:[self class]] localizedStringForKey:@"PaneTitle" value:nil table:nil];
}
- (IBAction)capturePodUrl:(NSTextField *)sender {
- (void)willExitPane:(InstallerSectionDirection)dir {
// Set the default protocol to https
NSString *protocol = @"https://";
// Capture the pod url entered by the user
NSString *podUrl = sender.stringValue;
NSString *podUrl = [_podUrlTextBox stringValue];
// If the pod url is empty, by default, set it to my.symphony.com
if ([podUrl length] == 0) {

View File

@ -16,5 +16,27 @@ 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#\"launchOnStartup\" ?: ?([Tt][Rr][Uu][Ee]|[Ff][Aa][Ll][Ss][Ee])#\"launchOnStartup\":\ $launch_on_startup#g" $newPath
## Add app to login items
if [ $launch_on_startup == true ]; then
cat > ~/Library/LaunchAgents/com.symphony.symphony-desktop.agent.plist << EOT
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.symphony.symphony-desktop.agent</string>
<key>ProgramArguments</key>
<array>
<string>$installPath/Symphony.app/Contents/MacOS/Symphony</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
EOT
else
launchctl unload ~/Library/LaunchAgents/com.symphony.symphony-desktop.agent.plist
fi
## Remove the temp settings file created ##
rm -f $tempFilePath

View File

@ -568,14 +568,6 @@
<key>LIST_TITLE_KEY</key>
<string>InstallerSectionTitle</string>
</dict>
<dict>
<key>ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS</key>
<string>ICPresentationViewDestinationSelectController</string>
<key>INSTALLER_PLUGIN</key>
<string>TargetSelect</string>
<key>LIST_TITLE_KEY</key>
<string>InstallerSectionTitle</string>
</dict>
<dict>
<key>ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS</key>
<string>ICPresentationViewInstallerPluginController</string>
@ -587,6 +579,14 @@
<integer>1</integer>
</dict>
</dict>
<dict>
<key>ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS</key>
<string>ICPresentationViewDestinationSelectController</string>
<key>INSTALLER_PLUGIN</key>
<string>TargetSelect</string>
<key>LIST_TITLE_KEY</key>
<string>InstallerSectionTitle</string>
</dict>
<dict>
<key>ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS</key>
<string>ICPresentationViewInstallationTypeController</string>