Permalink
Browse files

Update the timestamps which are shown in about dialogs.

The timestamps are now generated during the configure run. If there is
a .git directory then the git hash is taken and shown in the console
at startup and also in the about window.

To compliment things, perhaps the "release" number should be shown in
both places too. So if a user is running version 2.1.0 then they will
know that.

MacFontForgeApp.zip is also no longer modified, instead a new
MacFontForgeAppBuilt.zip is created on MacOS builds.
  • Loading branch information...
monkeyiq committed Jan 9, 2013
1 parent 328122e commit d12d756997f61f4b928fd67c843f0c0a93769120
View
@@ -327,6 +327,25 @@ FONTFORGE_CREATE_PKGCONFIG_FILES
FONTFORGE_CREATE_SYSTEMSPECIFIC
FONTFORGE_CONFIG_TESTSUITE
+FONTFORGE_GIT_VERSION=""
+if test -d .git; then
+ FONTFORGE_GIT_VERSION=`git log --pretty=format:'%H' -n 1`
+fi
+FONTFORGE_MODTIME="`date '+%s'`L"
+FONTFORGE_MODTIME_STR="`date +'%H:%M %Z %e-%b-%Y'`"
+FONTFORGE_VERSIONDATE="`date '+%y%m%d'`"
+AC_DEFINE_UNQUOTED(FONTFORGE_GIT_VERSION,"$FONTFORGE_GIT_VERSION","git hash that source are built from")
+AC_DEFINE_UNQUOTED(FONTFORGE_MODTIME,"$FONTFORGE_MODTIME","Epoch time that configure was run at")
+AC_DEFINE_UNQUOTED(FONTFORGE_MODTIME_STR,"$FONTFORGE_MODTIME_STR",
+ "A user friendly date that that configure was run at: For example 01:48 GMT 6-Sep-2012")
+AC_DEFINE_UNQUOTED(FONTFORGE_VERSIONDATE,"$FONTFORGE_VERSIONDATE","YY MM DD as numbers when configure was run")
+AC_DEFINE_UNQUOTED(FONTFORGE_MODTIME_RAW,$FONTFORGE_MODTIME,"Epoch time that configure was run at (no quotes)")
+AC_DEFINE_UNQUOTED(FONTFORGE_MODTIME_STR_RAW,$FONTFORGE_MODTIME_STR,
+ "A user friendly date that that configure was run at: For example 01:48 GMT 6-Sep-2012 (no quotes)")
+AC_DEFINE_UNQUOTED(FONTFORGE_VERSIONDATE_RAW,$FONTFORGE_VERSIONDATE,"YY MM DD as numbers when configure was run (no quotes)")
+
+
+
AC_OUTPUT
AC_MSG_NOTICE([
View
@@ -10,8 +10,8 @@ bundle_bin="$bundle_res/opt/local/bin"
bundle_lib="$bundle_res/opt/local/lib"
bundle_etc="$bundle_res/opt/local/etc"
-cp ./fontforge/MacFontForgeApp.zip $TEMPDIR/
-unzip -d $TEMPDIR $TEMPDIR/MacFontForgeApp.zip
+cp ./fontforge/MacFontForgeAppBuilt.zip $TEMPDIR/
+unzip -d $TEMPDIR $TEMPDIR/MacFontForgeAppBuilt.zip
DESTDIR=$bundle_res make install
cd $bundle_bin
Binary file not shown.
View
@@ -213,7 +213,7 @@ if MACINTOSH
# FIXME: All of this needs testing on Mac OS X.
# put the FontForge.app zipfile in the share directory
-pkgdata_DATA = MacFontForgeApp.zip
+pkgdata_DATA = MacFontForgeAppBuilt.zip
install-exec-local: FontForge.app/Contents/Info.plist
$(SHELL) -x darwinsetup
@@ -223,7 +223,11 @@ FontForge.app/Contents/Info.plist: $(srcdir)/MacFontForgeApp.zip $(srcdir)/stamp
mkdir -p darwinsetup_tmpdir
cp FontForge.app/Contents/Info.plist darwinsetup_tmpdir
( VERSION=`$(GREP) source_version_str $(srcdir)/stamp.c | $(SED) 's/const char \*source_version_str = "//' | $(SED) 's/";.*//'` ; $(SED) s/20080810/$$VERSION/ < darwinsetup_tmpdir/Info.plist > FontForge.app/Contents/Info.plist )
- zip -r $(srcdir)/MacFontForgeApp.zip FontForge.app
+
+BUILT_SOURCES = MacFontForgeAppBuilt.zip
+
+MacFontForgeAppBuilt.zip: FontForge.app/Contents/Info.plist
+ zip -r $(srcdir)/MacFontForgeAppBuilt.zip FontForge.app
mostlyclean-local: clean-darwin-stuff
View
@@ -1,6 +1,6 @@
/* This file was generated using stamper.c to create the next version release. */
/* If you need to update this to the next release version, see fontforge/GNUmakefile.in */
-#define LibFF_ModTime 1346896085L /* Seconds since 1970 (standard unix time) */
-#define LibFF_ModTime_Str "01:48 GMT 6-Sep-2012"
-#define LibFF_VersionDate 20120906 /* Year, month, day */
+#define LibFF_ModTime FONTFORGE_MODTIME_RAW /* Seconds since 1970 (standard unix time) */
+#define LibFF_ModTime_Str FONTFORGE_MODTIME_STR
+#define LibFF_VersionDate FONTFORGE_VERSIONDATE_RAW /* Year, month, day */
View
@@ -1,8 +1,9 @@
/* This file was generated using stamper.c to create the next version release. */
/* If you need to update this to the next release version, see fontforge/GNUmakefile.in */
+#include "config.h"
#include <time.h>
-const time_t source_modtime = 1346896085L; /* Seconds since 1970 (standard unix time) */
-const char *source_modtime_str = "01:48 GMT 6-Sep-2012";
-const char *source_version_str = "20120906"; /* Year, month, day */
+const time_t source_modtime = FONTFORGE_MODTIME; /* Seconds since 1970 (standard unix time) */
+const char *source_modtime_str = FONTFORGE_MODTIME_STR;
+const char *source_version_str = FONTFORGE_VERSIONDATE; /* Year, month, day */
View
@@ -24,6 +24,8 @@
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+
+#include "config.h"
#include "fontforgeui.h"
#include "annotations.h"
#include <gfile.h>
@@ -161,7 +163,7 @@ static GTimer *autosave_timer, *splasht;
static GFont *splash_font, *splash_italic;
static int as,fh, linecnt;
static unichar_t msg[470];
-static unichar_t *lines[20], *is, *ie;
+static unichar_t *lines[30], *is, *ie;
void ShowAboutScreen(void) {
static int first=1;
@@ -204,11 +206,22 @@ static void SplashLayout() {
if ( *pt ) ++pt;
}
uc_strcpy(pt, " FontForge used to be named PfaEdit.");
+
+ pt += u_strlen(pt);
+ lines[linecnt++] = pt;
+ uc_strcpy(pt," git hash: ");;
+ pt += u_strlen(pt);
+ lines[linecnt++] = pt;
+ uc_strcat(pt, FONTFORGE_GIT_VERSION);
+
pt += u_strlen(pt);
lines[linecnt++] = pt;
uc_strcpy(pt," Version: ");;
uc_strcat(pt,source_modtime_str);
- uc_strcat(pt," (");
+
+ pt += u_strlen(pt);
+ lines[linecnt++] = pt;
+ uc_strcat(pt," (");
uc_strcat(pt,source_version_str);
uc_strcat(pt,"-ML");
#ifdef FREETYPE_HAS_DEBUGGER
@@ -223,7 +236,7 @@ static void SplashLayout() {
uc_strcat(pt,")");
pt += u_strlen(pt);
lines[linecnt++] = pt;
- uc_strcpy(pt," Library Version: ");
+ uc_strcpy(pt," Lib Version: ");
uc_strcat(pt,library_version_configuration.library_source_modtime_string);
lines[linecnt++] = pt+u_strlen(pt);
lines[linecnt] = NULL;
@@ -782,6 +795,7 @@ int fontforge_main( int argc, char **argv ) {
".\n",
source_modtime_str );
fprintf( stderr, " Library based on sources from %s.\n", library_version_configuration.library_source_modtime_string );
+ fprintf( stderr, " Based on source from git with hash:%s\n", FONTFORGE_GIT_VERSION );
/* Must be done before we cache the current directory */
/* Change to HOME dir if specified on the commandline */

0 comments on commit d12d756

Please sign in to comment.