From 1fcc69f797ad239ff07817c8c86b405e2943403a Mon Sep 17 00:00:00 2001 From: Pietro Cerutti Date: Tue, 27 May 2008 12:08:13 +0000 Subject: - Update to 0.2.0020 - Remove viewer and server scritps, use new GUI starter instead - Move config files and [trust|key]stores to ${HOME}/.jrdesktop/ - Remove patch fixed upstream Approved by: miwi (mentor) --- net/jrdesktop/files/jrdesktop-server.in | 14 ------- net/jrdesktop/files/jrdesktop-viewer.in | 13 ------ net/jrdesktop/files/jrdesktop.in | 5 +++ .../files/patch-src-jrdesktop_SysTray.java | 14 ------- net/jrdesktop/files/patch-src-jrdesktop_main.java | 47 ++++++++++++++++++++++ 5 files changed, 52 insertions(+), 41 deletions(-) delete mode 100644 net/jrdesktop/files/jrdesktop-server.in delete mode 100644 net/jrdesktop/files/jrdesktop-viewer.in create mode 100644 net/jrdesktop/files/jrdesktop.in delete mode 100644 net/jrdesktop/files/patch-src-jrdesktop_SysTray.java create mode 100644 net/jrdesktop/files/patch-src-jrdesktop_main.java (limited to 'net/jrdesktop/files') diff --git a/net/jrdesktop/files/jrdesktop-server.in b/net/jrdesktop/files/jrdesktop-server.in deleted file mode 100644 index a1c7f7df4322..000000000000 --- a/net/jrdesktop/files/jrdesktop-server.in +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -JRDESKTOP_JAR=%%JAVAJARDIR%%/jrdesktop.jar - -if [ $# -ne 5 ]; then - echo "Usage:" - echo " $0 port username password ssl-enabled multihome-enabled" - echo "where:" - echo " = true for a secured connection" - echo " = true if server has multiple IP addresses" - exit 1 -fi - -%%JAVA%% -jar ${JRDESKTOP_JAR} -server $1 $2 $3 $4 $5 $6 diff --git a/net/jrdesktop/files/jrdesktop-viewer.in b/net/jrdesktop/files/jrdesktop-viewer.in deleted file mode 100644 index 3a392603e32a..000000000000 --- a/net/jrdesktop/files/jrdesktop-viewer.in +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -JRDESKTOP_JAR=%%JAVAJARDIR%%/jrdesktop.jar - -if [ $# -ne 5 ]; then - echo "Usage:" - echo " $0 server-address server-port username password ssl-enabled" - echo "where:" - echo " = true for a secured connection" - exit 1 -fi - -%%JAVA%% -jar ${JRDESKTOP_JAR} -viewer $1 $2 $3 $4 $5 diff --git a/net/jrdesktop/files/jrdesktop.in b/net/jrdesktop/files/jrdesktop.in new file mode 100644 index 000000000000..fc9ae0f17052 --- /dev/null +++ b/net/jrdesktop/files/jrdesktop.in @@ -0,0 +1,5 @@ +#!/bin/sh + +JRDESKTOP_JAR=%%JAVAJARDIR%%/jrdesktop.jar + +%%JAVA%% -jar ${JRDESKTOP_JAR} display diff --git a/net/jrdesktop/files/patch-src-jrdesktop_SysTray.java b/net/jrdesktop/files/patch-src-jrdesktop_SysTray.java deleted file mode 100644 index c27c52555807..000000000000 --- a/net/jrdesktop/files/patch-src-jrdesktop_SysTray.java +++ /dev/null @@ -1,14 +0,0 @@ ---- src/jrdesktop/SysTray.java.orig 2008-05-15 17:22:10.000000000 +0200 -+++ src/jrdesktop/SysTray.java 2008-05-15 17:22:18.000000000 +0200 -@@ -51,6 +51,11 @@ - } - - public static void displayViewer(String viewer, int size, boolean connected) { -+ if (!SystemTray.isSupported()) { -+ System.err.println("Tray unavailable"); -+ return; -+ } -+ - if (connected) { - trayIcon.displayMessage("Viewer details", viewer + " connected !!", - TrayIcon.MessageType.INFO); diff --git a/net/jrdesktop/files/patch-src-jrdesktop_main.java b/net/jrdesktop/files/patch-src-jrdesktop_main.java new file mode 100644 index 000000000000..7d458ab04126 --- /dev/null +++ b/net/jrdesktop/files/patch-src-jrdesktop_main.java @@ -0,0 +1,47 @@ +--- src/jrdesktop/main.java.orig 2008-05-27 13:52:51.000000000 +0200 ++++ src/jrdesktop/main.java 2008-05-27 14:00:39.000000000 +0200 +@@ -1,5 +1,7 @@ + package jrdesktop; + ++import java.io.File; ++ + import java.net.URL; + import java.util.jar.Attributes; + import java.util.jar.Manifest; +@@ -27,6 +29,8 @@ + public static final URL NORMAL_SCREEN_ICON = main.class.getResource("images/view_nofullscreen.png"); + public static final URL DEFAULT_SCREEN_ICON = main.class.getResource("images/default_screen.png"); + public static final URL CUSTOM_SCREEN_ICON = main.class.getResource("images/custom_screen.png"); ++ ++ public static String CONFIG_DIR; + + public static String CONFIG_FILE; + public static String SERVER_CONFIG_FILE; +@@ -37,14 +41,21 @@ + + public static void main (String args[]) { + if (System.getSecurityManager() == null) +- System.setSecurityManager(new SecurityMng()); ++ System.setSecurityManager(new SecurityMng()); ++ ++ CONFIG_DIR = System.getProperty("user.home") + File.separatorChar + ".jrdesktop"; ++ ++ File configDir = new File(CONFIG_DIR); ++ ++ if(!configDir.exists()) ++ configDir.mkdir(); + +- CONFIG_FILE = FileUtility.getCurrentDirectory() + "config"; +- SERVER_CONFIG_FILE = FileUtility.getCurrentDirectory() + "server.config"; +- VIEWER_CONFIG_FILE = FileUtility.getCurrentDirectory() + "viewer.config"; ++ CONFIG_FILE = CONFIG_DIR + File.separatorChar + "config"; ++ SERVER_CONFIG_FILE = CONFIG_DIR + File.separatorChar + "server.config"; ++ VIEWER_CONFIG_FILE = CONFIG_DIR + File.separatorChar + "viewer.config"; + +- KEY_STORE = FileUtility.getCurrentDirectory() + "keystore"; +- TRUST_STORE = FileUtility.getCurrentDirectory() + "truststore"; ++ KEY_STORE = CONFIG_DIR + File.separatorChar + "keystore"; ++ TRUST_STORE = CONFIG_DIR + File.separatorChar + "truststore"; + + System.getProperties().remove("java.rmi.server.hostname"); + -- cgit v1.2.3