Permalink
Browse files

Update revision info and remove Xcode project.

  • Loading branch information...
1 parent c5782e1 commit 63887858021f043c1979efa20d9c4e88c0e8db1a @sorbits sorbits committed Aug 5, 2012
Showing with 5 additions and 567 deletions.
  1. +0 −556 Dialog2.xcodeproj/project.pbxproj
  2. +1 −0 cli.target
  3. +4 −11 tm_dialog2.mm
View
@@ -1,3 +1,4 @@
TARGET_NAME = tm_dialog2
SOURCES = tm_dialog2.mm
FRAMEWORKS = Foundation
+FLAGS += -D'APP_REVISION=$APP_REVISION' -DCOMPILE_DATE=\"`date +%Y-%m-%d`\"
View
@@ -1,7 +1,3 @@
-/*
- g++ -o /tmp/test "$TM_FILEPATH" -framework Foundation
-*/
-
//
// client.mm
// Created by Allan Odgaard on 2007-09-22.
@@ -25,6 +21,9 @@
#import <Foundation/Foundation.h>
#import "Dialog2.h"
+static double const AppVersion = 2.0;
+static size_t const AppRevision = APP_REVISION;
+
id connect ()
{
NSString* portName = DialogServerConnectionName;
@@ -60,17 +59,11 @@ int open_pipe (char const* name, int oflag)
return fd;
}
-char const* revision ()
-{
- static char res[32];
- return sscanf("$Revision$", "$%*[^:]: %s $", res) == 1 ? res : "???";
-}
-
int main (int argc, char const* argv[])
{
if(argc == 2 && strcmp(argv[1], "--version") == 0)
{
- fprintf(stderr, "tm_dialog, version 2.1 (r%s)\n", revision());
+ fprintf(stderr, "%1$s %2$.1f (" COMPILE_DATE " revision %3$zu)\n", getprogname(), AppVersion, AppRevision);
return 0;
}

0 comments on commit 6388785

Please sign in to comment.