diff --git a/ApplicationController.h b/ApplicationController.h
index 44d9fb6..1c8e5f4 100644
--- a/ApplicationController.h
+++ b/ApplicationController.h
@@ -28,6 +28,7 @@
- (NSManagedObjectContext *)managedObjectContext;
- (IBAction)openPreferencesWindow:(id)sender;
+- (IBAction)showAboutPanel:(id)sender;
- (IBAction)installCliTool:(id)sender;
diff --git a/ApplicationController.m b/ApplicationController.m
index 48f3964..6752c9a 100644
--- a/ApplicationController.m
+++ b/ApplicationController.m
@@ -92,6 +92,20 @@
[[PBPrefsWindowController sharedPrefsWindowController] showWindow:nil];
}
+- (IBAction)showAboutPanel:(id)sender
+{
+ NSString *gitversion = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleGitVersion"];
+ NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];
+ if (gitversion)
+ [dict addEntriesFromDictionary:[[NSDictionary alloc] initWithObjectsAndKeys:gitversion, @"Version", nil]];
+
+ #ifdef DEBUG_BUILD
+ [dict addEntriesFromDictionary:[[NSDictionary alloc] initWithObjectsAndKeys:@"GitX (DEBUG)", @"ApplicationName", nil]];
+ #endif
+
+ [NSApp orderFrontStandardAboutPanelWithOptions:dict];
+}
+
- (IBAction)installCliTool:(id)sender;
{
BOOL success = NO;
diff --git a/English.lproj/MainMenu.xib b/English.lproj/MainMenu.xib
index 3e4d678..8dbbc74 100644
--- a/English.lproj/MainMenu.xib
+++ b/English.lproj/MainMenu.xib
@@ -886,8 +886,8 @@
@@ -2287,6 +2288,7 @@
id
id
id
+ id
diff --git a/GitX.xcodeproj/project.pbxproj b/GitX.xcodeproj/project.pbxproj
index db13f30..be97512 100644
--- a/GitX.xcodeproj/project.pbxproj
+++ b/GitX.xcodeproj/project.pbxproj
@@ -767,7 +767,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "export PATH=$PATH:$HOME/bin:$HOME/local/bin:/sw/bin:/opt/local/bin:`\"$TARGET_BUILD_DIR\"/gitx --git-path`\nVERSION=$(cd \"$PROJECT_DIR\";git describe)\nLONG_VERSION=$(echo $VERSION | sed -e \"s/\\-/\\./\" -e \"s/^v//\" -e \"s/-.*//\")\nSHORT_VERSION=$(echo $VERSION | sed -e \"s/\\-.*//\" -e \"s/^v//\")\n\necho -n \"#define LONG_VERSION $LONG_VERSION\n#define SHORT_VERSION $SHORT_VERSION\" > \"$PROJECT_TEMP_DIR/revision\"\ntouch Info.plist";
+ shellScript = "export PATH=$PATH:$HOME/bin:$HOME/local/bin:/sw/bin:/opt/local/bin:`\"$TARGET_BUILD_DIR\"/gitx --git-path`\nVERSION=$(cd \"$PROJECT_DIR\";git describe)\nLONG_VERSION=$(echo $VERSION | sed -e \"s/\\-/\\./\" -e \"s/^v//\" -e \"s/-.*//\")\nSHORT_VERSION=$(echo $VERSION | sed -e \"s/\\-.*//\" -e \"s/^v//\")\n\necho -n \"#define LONG_VERSION $LONG_VERSION\n#define GIT_VERSION $VERSION\n#define SHORT_VERSION $SHORT_VERSION\" > \"$PROJECT_TEMP_DIR/revision\"\ntouch Info.plist";
};
F5792DFB0EDB570C001B0C31 /* Compile libgit2 */ = {
isa = PBXShellScriptBuildPhase;
@@ -985,7 +985,7 @@
HEADER_SEARCH_PATHS = libgit2/src;
INFOPLIST_FILE = Info.plist;
INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-traditional";
- INFOPLIST_PREFIX_HEADER = build/revision;
+ INFOPLIST_PREFIX_HEADER = $PROJECT_TEMP_DIR/revision;
INFOPLIST_PREPROCESS = YES;
INSTALL_PATH = "$(HOME)/Applications";
LIBRARY_SEARCH_PATHS = libgit2;
@@ -1001,6 +1001,7 @@
GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = DEBUG_BUILD;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
+ INFOPLIST_PREPROCESS = YES;
PREBINDING = NO;
SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
};
@@ -1016,6 +1017,8 @@
GCC_ENABLE_OBJC_GC = required;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
+ INFOPLIST_PREFIX_HEADER = $PROJECT_TEMP_DIR/revision;
+ INFOPLIST_PREPROCESS = YES;
PREBINDING = NO;
SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
};
@@ -1084,6 +1087,7 @@
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ INFOPLIST_PREPROCESS = YES;
PRODUCT_NAME = "Generate PList Prefix";
ZERO_LINK = NO;
};
diff --git a/Info.plist b/Info.plist
index 879b2a2..8aa62a7 100644
--- a/Info.plist
+++ b/Info.plist
@@ -50,6 +50,8 @@
????
CFBundleVersion
LONG_VERSION
+ CFBundleGitVersion
+ GIT_VERSION
CFBundleShortVersionString
SHORT_VERSION
NSMainNibFile