Skip to content

Commit

Permalink
electron-37: fixed issues w.r.t. installer pane not capturing the pod… (
Browse files Browse the repository at this point in the history
#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
  • Loading branch information
VishwasShashidhar authored and Lynn committed May 30, 2017
1 parent 2acba44 commit 307b60d
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 17 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ DerivedData/
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/
*.moved-aside
*.xccheckout
*.xcscmblueprint
Expand All @@ -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
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<dict>
<key>Resources/Base.lproj/MyInstallerPane.nib</key>
<data>
3HG8UEw6WFkbwFZjfhIU/OzjLks=
4ukZOKTe6287gYe3sqxm+1qqsb8=
</data>
<key>Resources/InstallerSections.plist</key>
<data>
Expand Down Expand Up @@ -37,7 +37,7 @@
<dict>
<key>hash2</key>
<data>
WevXKKGDjV20uPQvqf0GCvSehTCXdBwwHhIijv6ffPg=
JYmp/b032I4vsgp6hW2iH2wQ1Zu0ADIXbVGTnb9xzOE=
</data>
</dict>
<key>Resources/InstallerSections.plist</key>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@

@property (weak) IBOutlet NSButton *minimizeOnCloseCheckBox;
@property (weak) IBOutlet NSButton *autoLaunchCheckBox;
@property (weak) IBOutlet NSTextField *podUrlTextBox;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@ - (NSString *)title
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) {
Expand Down
22 changes: 22 additions & 0 deletions installer/mac/postinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
16 changes: 8 additions & 8 deletions installer/mac/symphony-mac-packager.pkgproj
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand Down

0 comments on commit 307b60d

Please sign in to comment.