Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/MacVim/English.lproj/MainMenu.nib/designable.nib

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified src/MacVim/English.lproj/MainMenu.nib/keyedobjects.nib
Binary file not shown.
372 changes: 199 additions & 173 deletions src/MacVim/English.lproj/Preferences.nib/designable.nib

Large diffs are not rendered by default.

Binary file modified src/MacVim/English.lproj/Preferences.nib/keyedobjects.nib
Binary file not shown.
4 changes: 4 additions & 0 deletions src/MacVim/MMAppController.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

@class MMWindowController;
@class MMVimController;
@class SUUpdater;


@interface MMAppController : NSObject <MMAppProtocol> {
Expand All @@ -30,6 +31,8 @@
int numChildProcesses;
NSMutableDictionary *inputQueues;
int processingFlag;

SUUpdater *updater;

FSEventStreamRef fsEventStream;
}
Expand All @@ -52,6 +55,7 @@
- (IBAction)orderFrontPreferencePanel:(id)sender;
- (IBAction)openWebsite:(id)sender;
- (IBAction)showVimHelp:(id)sender;
- (IBAction)checkForUpdates:(id)sender;
- (IBAction)zoomAll:(id)sender;
- (IBAction)stayInFront:(id)sender;
- (IBAction)stayInBack:(id)sender;
Expand Down
25 changes: 25 additions & 0 deletions src/MacVim/MMAppController.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#import "MMWindowController.h"
#import "MMTextView.h"
#import "Miscellaneous.h"
#import "Sparkle.framework/Headers/Sparkle.h"
#import <unistd.h>
#import <CoreServices/CoreServices.h>
// Need Carbon for TIS...() functions
Expand Down Expand Up @@ -298,6 +299,12 @@ - (id)init
ASLogCrit(@"Failed to register connection with name '%@'", name);
[connection release]; connection = nil;
}

#if !DISABLE_SPARKLE
// Sparkle is enabled (this is the default). Initialize it. It will
// automatically check for update.
updater = [[SUUpdater alloc] init];
#endif

return self;
}
Expand All @@ -315,6 +322,7 @@ - (void)dealloc
[recentFilesMenuItem release]; recentFilesMenuItem = nil;
[defaultMainMenu release]; defaultMainMenu = nil;
[appMenuItemTemplate release]; appMenuItemTemplate = nil;
[updater release]; updater = nil;

[super dealloc];
}
Expand Down Expand Up @@ -892,6 +900,14 @@ - (void)setMainMenu:(NSMenu *)mainMenu
// private so this will have to be considered a bit of a hack!)
NSMenu *appMenu = [mainMenu findApplicationMenu];
[NSApp performSelector:@selector(setAppleMenu:) withObject:appMenu];

#if DISABLE_SPARKLE
// If Sparkle is disabled, we want to remove the "Check for Updates" menu
// item since it's no longer useful.
NSMenuItem *checkForUpdatesItem = [appMenu itemAtIndex:
[appMenu indexOfItemWithAction:@selector(checkForUpdates:)]];
checkForUpdatesItem.hidden = true;
#endif

NSMenu *servicesMenu = [mainMenu findServicesMenu];
[NSApp setServicesMenu:servicesMenu];
Expand Down Expand Up @@ -1195,6 +1211,15 @@ - (IBAction)showVimHelp:(id)sender
@"-c", @":h gui_mac", @"-c", @":res", nil]
workingDirectory:nil];
}

- (IBAction)checkForUpdates:(id)sender
{
#if !DISABLE_SPARKLE
// Check for updates for new versions manually.
ASLogDebug(@"Check for software updates");
[updater checkForUpdates:sender];
#endif
}

- (IBAction)zoomAll:(id)sender
{
Expand Down
2 changes: 2 additions & 0 deletions src/MacVim/MMPreferenceController.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
// General pane
IBOutlet NSPopUpButton *layoutPopUpButton;
IBOutlet NSButton *autoInstallUpdateButton;
IBOutlet NSView *sparkleUpdaterPane;
}

// General pane
- (IBAction)showWindow:(id)sender;
- (IBAction)openInCurrentWindowSelectionChanged:(id)sender;
- (IBAction)checkForUpdatesChanged:(id)sender;

Expand Down
10 changes: 10 additions & 0 deletions src/MacVim/MMPreferenceController.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@ static void loadSymbols()

@implementation MMPreferenceController

- (IBAction)showWindow:(id)sender
{
[super showWindow:sender];
#if DISABLE_SPARKLE
// If Sparkle is disabled in config, we don't want to show the preference pane
// which could be confusing as it won't do anything.
[sparkleUpdaterPane setHidden:YES];
#endif
}

- (void)setupToolbar
{
loadSymbols();
Expand Down
2 changes: 1 addition & 1 deletion src/MacVim/MacVim.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
1DFE25A50C527BC4003000F7 /* PSMTabBarControl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D493DB90C52533B00AB718C /* PSMTabBarControl.framework */; };
52818B031C1C08CE00F59085 /* QLStephen.qlgenerator in Copy QuickLookPlugin */ = {isa = PBXBuildFile; fileRef = 52818AFF1C1C075300F59085 /* QLStephen.qlgenerator */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
528DA66A1426D4F9003380F1 /* macvim-askpass in Copy Scripts */ = {isa = PBXBuildFile; fileRef = 528DA6691426D4EB003380F1 /* macvim-askpass */; };
52A364731C4A5789005757EC /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52A364721C4A5789005757EC /* Sparkle.framework */; };
52A364731C4A5789005757EC /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52A364721C4A5789005757EC /* Sparkle.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
52A364761C4A57C1005757EC /* Sparkle.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 52A364721C4A5789005757EC /* Sparkle.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
52B7ED9B1C4A4D6900AFFF15 /* dsa_pub.pem in Resources */ = {isa = PBXBuildFile; fileRef = 52B7ED9A1C4A4D6900AFFF15 /* dsa_pub.pem */; };
8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; };
Expand Down
10 changes: 10 additions & 0 deletions src/MacVim/README
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,16 @@ be in when executing these commands):
1. Configure Vim (call "./configure --help" to see a list of flags)
src/$ ./configure

MacVim-specific flags that `./configure` supports:
--disable-sparkle: Disable Sparkle auto-update. This is useful if you want
to manually sync or building this as part of a package
manager.
--with-macsdk: Build MacVim against specific SDK versions.

You can also use environment variable `MACOSX_DEPLOYMENT_TARGET` to specify
minimum target macOS version to deploy (e.g. '10.14'), and `XCODEFLAGS` for
additional command-line arguments to pass to `xcodebuild`.

2. Build
src/$ make

Expand Down
20 changes: 20 additions & 0 deletions src/auto/configure
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,7 @@ ac_user_opts='
enable_option_checking
enable_fail_if_missing
enable_darwin
enable_sparkle
with_developer_dir
with_macsdk
with_macarchs
Expand Down Expand Up @@ -1476,6 +1477,7 @@ Optional Features:
--enable-fail-if-missing Fail if dependencies on additional features
specified on the command line are missing.
--disable-darwin Disable Darwin (Mac OS X) support.
--disable-sparkle Disable Sparkle updater (MacVim).
--disable-smack Do not check for Smack support.
--disable-selinux Do not check for SELinux support.
--disable-xsmp Disable XSMP session management
Expand Down Expand Up @@ -4591,6 +4593,24 @@ $as_echo "no, Darwin support disabled" >&6; }
$as_echo "yes, Darwin support excluded" >&6; }
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-sparkle argument" >&5
$as_echo_n "checking --disable-sparkle argument... " >&6; }
# Check whether --enable-sparkle was given.
if test "${enable_sparkle+set}" = set; then :
enableval=$enable_sparkle;
else
enable_sparkle="yes"
fi

if test "$enable_sparkle" == "yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
XCODEFLAGS="$XCODEFLAGS GCC_PREPROCESSOR_DEFINITIONS='$GCC_PREPROCESSOR_DEFINITIONS DISABLE_SPARKLE=1'"
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-developer-dir argument" >&5
$as_echo_n "checking --with-developer-dir argument... " >&6; }

Expand Down
11 changes: 11 additions & 0 deletions src/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,17 @@ if test "`(uname) 2>/dev/null`" = Darwin; then
AC_MSG_RESULT([yes, Darwin support excluded])
fi

AC_MSG_CHECKING(--disable-sparkle argument)
AC_ARG_ENABLE(sparkle,
[ --disable-sparkle Disable Sparkle updater (MacVim).],
, [enable_sparkle="yes"])
if test "$enable_sparkle" == "yes"; then
AC_MSG_RESULT(no)
else
AC_MSG_RESULT(yes)
XCODEFLAGS="$XCODEFLAGS GCC_PREPROCESSOR_DEFINITIONS='$GCC_PREPROCESSOR_DEFINITIONS DISABLE_SPARKLE=1'"
fi

AC_MSG_CHECKING(--with-developer-dir argument)
AC_ARG_WITH(developer-dir, [ --with-developer-dir=PATH use PATH as location for Xcode developer tools],
DEVELOPER_DIR="$withval"; AC_MSG_RESULT($DEVELOPER_DIR),
Expand Down