aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Hinz <bphinz@users.sourceforge.net>2011-05-13 23:33:34 +0000
committerBrian Hinz <bphinz@users.sourceforge.net>2011-05-13 23:33:34 +0000
commitb5e5cddf9308e40fa101995848e4e680a2e8fd6f (patch)
tree2a612045633d41c3784aaea09bb33da549312a11
parentc5dc03809027dfac6b88153304bf30d4adb5ec8a (diff)
downloadtigervnc-b5e5cddf9308e40fa101995848e4e680a2e8fd6f.tar.gz
tigervnc-b5e5cddf9308e40fa101995848e4e680a2e8fd6f.zip
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
-rw-r--r--java/src/com/tigervnc/vncviewer/CConn.java4
-rw-r--r--java/src/com/tigervnc/vncviewer/Makefile13
2 files changed, 12 insertions, 5 deletions
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