* Added the Subversion revision at build time to AboutHaiku - the revision is
automatically updated everytime AboutHaiku is built (ie. also if nothing changed). * Added Oliver Tappe as contributor. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16219 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
811ada6cae
commit
45de8176a5
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2005, Haiku, Inc.
|
* Copyright (c) 2005-2006, Haiku, Inc.
|
||||||
* Distributed under the terms of the MIT license.
|
* Distributed under the terms of the MIT license.
|
||||||
*
|
*
|
||||||
* Author: DarkWyrm <bpmagic@columbus.rr.com>
|
* Author: DarkWyrm <bpmagic@columbus.rr.com>
|
||||||
@ -16,6 +16,7 @@
|
|||||||
#include <Messenger.h>
|
#include <Messenger.h>
|
||||||
#include <OS.h>
|
#include <OS.h>
|
||||||
#include <Path.h>
|
#include <Path.h>
|
||||||
|
#include <Resources.h>
|
||||||
#include <Screen.h>
|
#include <Screen.h>
|
||||||
#include <ScrollView.h>
|
#include <ScrollView.h>
|
||||||
#include <String.h>
|
#include <String.h>
|
||||||
@ -122,7 +123,6 @@ AboutView::AboutView(const BRect &rect)
|
|||||||
|
|
||||||
font_height height;
|
font_height height;
|
||||||
float labelHeight, textHeight;
|
float labelHeight, textHeight;
|
||||||
char string[255];
|
|
||||||
|
|
||||||
system_info systemInfo;
|
system_info systemInfo;
|
||||||
get_system_info(&systemInfo);
|
get_system_info(&systemInfo);
|
||||||
@ -158,6 +158,7 @@ AboutView::AboutView(const BRect &rect)
|
|||||||
r.OffsetBy(0, labelHeight);
|
r.OffsetBy(0, labelHeight);
|
||||||
r.bottom = r.top + textHeight;
|
r.bottom = r.top + textHeight;
|
||||||
|
|
||||||
|
char string[256];
|
||||||
strcpy(string, "Unknown");
|
strcpy(string, "Unknown");
|
||||||
|
|
||||||
// the version is stored in the BEOS:APP_VERSION attribute of libbe.so
|
// the version is stored in the BEOS:APP_VERSION attribute of libbe.so
|
||||||
@ -175,6 +176,16 @@ AboutView::AboutView(const BRect &rect)
|
|||||||
strcpy(string, versionInfo.short_info);
|
strcpy(string, versionInfo.short_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add revision from resources
|
||||||
|
BResources* resources = be_app->AppResources();
|
||||||
|
const char* versionString = (const char *)resources->LoadResource(
|
||||||
|
B_STRING_TYPE, "SVN:REVISION", NULL);
|
||||||
|
if (versionString != NULL) {
|
||||||
|
strlcat(string, " (r", sizeof(string));
|
||||||
|
strlcat(string, versionString, sizeof(string));
|
||||||
|
strlcat(string, ")", sizeof(string));
|
||||||
|
}
|
||||||
|
|
||||||
stringView = new BStringView(r, "ostext", string);
|
stringView = new BStringView(r, "ostext", string);
|
||||||
fInfoView->AddChild(stringView);
|
fInfoView->AddChild(stringView);
|
||||||
stringView->ResizeToPreferred();
|
stringView->ResizeToPreferred();
|
||||||
@ -285,7 +296,6 @@ AboutView::AboutView(const BRect &rect)
|
|||||||
fCreditsView, B_FOLLOW_ALL, B_WILL_DRAW | B_FRAME_EVENTS, false, true, B_PLAIN_BORDER);
|
fCreditsView, B_FOLLOW_ALL, B_WILL_DRAW | B_FRAME_EVENTS, false, true, B_PLAIN_BORDER);
|
||||||
AddChild(creditsScroller);
|
AddChild(creditsScroller);
|
||||||
|
|
||||||
|
|
||||||
rgb_color darkgrey = { 100, 100, 100, 255 };
|
rgb_color darkgrey = { 100, 100, 100, 255 };
|
||||||
rgb_color haiku_green = { 42, 131, 36, 255 };
|
rgb_color haiku_green = { 42, 131, 36, 255 };
|
||||||
rgb_color haiku_orange = { 255, 69, 0, 255 };
|
rgb_color haiku_orange = { 255, 69, 0, 255 };
|
||||||
@ -376,6 +386,7 @@ AboutView::AboutView(const BRect &rect)
|
|||||||
"Jonas Sundström\n"
|
"Jonas Sundström\n"
|
||||||
"Daniel Switkin\n"
|
"Daniel Switkin\n"
|
||||||
"Atsushi Takamatsu\n"
|
"Atsushi Takamatsu\n"
|
||||||
|
"Oliver Tappe\n"
|
||||||
"Jason Vandermark\n"
|
"Jason Vandermark\n"
|
||||||
"Sandor Vroemisse\n"
|
"Sandor Vroemisse\n"
|
||||||
"Nathan Whitehorn\n"
|
"Nathan Whitehorn\n"
|
||||||
|
@ -12,6 +12,23 @@ Application AboutHaiku :
|
|||||||
: AboutHaiku.rdef
|
: AboutHaiku.rdef
|
||||||
;
|
;
|
||||||
|
|
||||||
|
rule AddRevisionToResources {
|
||||||
|
Depends $(1) ;
|
||||||
|
AddRevisionToResources1 $(1) : <build>rc ;
|
||||||
|
}
|
||||||
|
|
||||||
|
actions AddRevisionToResources1 {
|
||||||
|
VERSION=`svn info | grep Revision | cut -d\ -f2`
|
||||||
|
echo "resource(201, \"SVN:REVISION\") #'CSTR' \""$VERSION"\";" | $(2) -m -o $(1) -
|
||||||
|
}
|
||||||
|
|
||||||
|
# This must come after the Application rule, so that the
|
||||||
|
# AboutHaiku.rsrc file is already created
|
||||||
|
AddRevisionToResources [ FGristFiles AboutHaiku.rsrc ] ;
|
||||||
|
ALWAYS [ FGristFiles AboutHaiku.rsrc ] ;
|
||||||
|
# we want to rebuild the resources everytime AboutHaiku
|
||||||
|
# is built to keep them up-to-date
|
||||||
|
|
||||||
Includes [ FGristFiles AboutHaiku.rdef ] : [ FGristFiles haikulogo.png ] ;
|
Includes [ FGristFiles AboutHaiku.rdef ] : [ FGristFiles haikulogo.png ] ;
|
||||||
SEARCH on [ FGristFiles haikulogo.png ] = [ FDirName $(HAIKU_TOP) src apps abouthaiku ] ;
|
SEARCH on [ FGristFiles haikulogo.png ] = [ FDirName $(HAIKU_TOP) src apps abouthaiku ] ;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user