From b5e5cddf9308e40fa101995848e4e680a2e8fd6f Mon Sep 17 00:00:00 2001 From: Brian Hinz Date: Fri, 13 May 2011 23:33:34 +0000 Subject: Update location of resource used to store build timestamp. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4414 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- java/src/com/tigervnc/vncviewer/CConn.java | 4 +--- java/src/com/tigervnc/vncviewer/Makefile | 13 +++++++++++-- 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'java') diff --git a/java/src/com/tigervnc/vncviewer/CConn.java b/java/src/com/tigervnc/vncviewer/CConn.java index e4da1697..bda9cffc 100644 --- a/java/src/com/tigervnc/vncviewer/CConn.java +++ b/java/src/com/tigervnc/vncviewer/CConn.java @@ -583,14 +583,12 @@ public class CConn extends CConnection } void showAbout() { - InputStream stream = cl.getResourceAsStream("manifest"); - String pkgVersion = ""; + InputStream stream = cl.getResourceAsStream("com/tigervnc/vncviewer/timestamp"); String pkgDate = ""; String pkgTime = ""; try { Manifest manifest = new Manifest(stream); Attributes attributes = manifest.getMainAttributes(); - pkgVersion = attributes.getValue("Package-Version"); pkgDate = attributes.getValue("Package-Date"); pkgTime = attributes.getValue("Package-Time"); } catch (IOException e) { } diff --git a/java/src/com/tigervnc/vncviewer/Makefile b/java/src/com/tigervnc/vncviewer/Makefile index 99c04ac4..ebc22e6d 100644 --- a/java/src/com/tigervnc/vncviewer/Makefile +++ b/java/src/com/tigervnc/vncviewer/Makefile @@ -8,8 +8,11 @@ JCFLAGS = -target 1.5 -classpath ../../../ JAR = jar ARCHIVE = VncViewer.jar MANIFEST = MANIFEST.MF +TIMESTAMP = timestamp PAGES = index.vnc INSTALL_DIR = /usr/local/vnc/classes +DATE = $(shell date -u "+%b %d %Y") +TIME = $(shell date -u "+%H:%M:%S") CLASSES = CConn.class OptionsDialogCallback.class ClipboardDialog.class \ PasswdDialog.class DesktopWindow.class PixelBufferImage.class \ @@ -26,16 +29,22 @@ all: $(CLASSES) $(ARCHIVE) $(CLASSES): $(SOURCES) $(JC) $(JCFLAGS) -O $(SOURCES) -$(ARCHIVE): $(CLASSES) $(MANIFEST) +$(ARCHIVE): $(CLASSES) $(MANIFEST) $(TIMESTAMP) cd ../../..; \ $(JAR) cfm com/tigervnc/vncviewer/$(ARCHIVE) \ com/tigervnc/vncviewer/$(MANIFEST) \ + com/tigervnc/vncviewer/$(TIMESTAMP) \ com/tigervnc/vncviewer/*.class \ com/tigervnc/rfb/*.class \ com/tigervnc/rdr/*.class \ com/tigervnc/vncviewer/tigervnc.png \ com/tigervnc/vncviewer/tigervnc.ico +$(TIMESTAMP): + $(shell cat $(MANIFEST) >> $(TIMESTAMP)) + $(shell echo "Package-Date: $(DATE)" >> $(TIMESTAMP)) + $(shell echo "Package-Time: $(TIME)" >> $(TIMESTAMP)) + install: $(CLASSES) $(ARCHIVE) $(CP) $(CLASSES) $(ARCHIVE) $(PAGES) $(INSTALL_DIR) @@ -43,4 +52,4 @@ export:: $(CLASSES) $(ARCHIVE) $(PAGES) @$(ExportJavaClasses) clean:: - $(RM) *.class *.jar ../rfb/*.class ../rdr/*.class + $(RM) *.class *.jar timestamp ../rfb/*.class ../rdr/*.class -- cgit v1.2.3