Fix launcher messages and application name change. Reported by Pavel Tankov.

cusax-fix
Damian Minkov 15 years ago
parent 4d6b5e76a0
commit ac8a0298cd

@ -476,7 +476,7 @@
<sip-communicator-version property="sip-communicator.version" />
<echo message="SIP Communicator version ${sip-communicator.version}" />
<echo message="Jitsi version ${sip-communicator.version}" />
</target>
<!--INIT-->
@ -1021,12 +1021,18 @@
</jar>
</target>
<!--BUNDLE-UTIL-->
<target name="bundle-util" depends="version">
<!--BUNDLE-UTIL
load-properties target is from resources/install/build.xml
loads the application name from the install settings.
-->
<target name="bundle-util" depends="version,load-properties">
<!-- Create a properties file that the arg handler could use
to determine SC's version -->
<echo file="${dest}/net/java/sip/communicator/util/launchutils/version.properties"
message="APPLICATION_NAME=SIP Communicator${line.separator}" />
message="APPLICATION_NAME=${application.name}${line.separator}" />
<echo file="${dest}/net/java/sip/communicator/util/launchutils/version.properties"
message="PACKAGE_NAME=${package.name}${line.separator}"
append="true"/>
<echo file="${dest}/net/java/sip/communicator/util/launchutils/version.properties"
message="APPLICATION_VERSION=${sip-communicator.version}${line.separator}"
append="true"/>

@ -96,6 +96,11 @@ public class LaunchArgHandler
*/
private static final String PNAME_APPLICATION_NAME = "APPLICATION_NAME";
/**
* The package name of the applications (e.g. jitsi).
*/
private static final String PNAME_PACKAGE_NAME = "PACKAGE_NAME";
/**
* The property name containing the current version.
*/
@ -393,7 +398,7 @@ private void handleVersionArg()
if (name == null || name.trim().length() == 0)
{
name = "SIP Communicator";
name = "Jitsi";
}
if (version == null || version.trim().length() == 0)
@ -421,7 +426,7 @@ private String getVersion()
}
/**
* Returns the name of the application. That should be SIP Communicator
* Returns the name of the application. That should be Jitsi
* most of the time but who knows ..
*
* @return the name of the application (i.e. SIP Communicator until we
@ -432,9 +437,25 @@ private String getApplicationName()
String name = versionProperties.getProperty(PNAME_APPLICATION_NAME);
return name == null
? "SIP Communicator"
? "Jitsi"
: name;
}
/**
* Returns the package name of the application. That should be jitsi
* most of the time but who knows ..
*
* @return the package name of the application.
*/
private String getPackageName()
{
String name = versionProperties.getProperty(PNAME_PACKAGE_NAME);
return name == null
? "jitsi"
: name;
}
/**
* Prints an error message and then prints the help message.
*
@ -448,13 +469,13 @@ public void handleUnknownArg(String arg)
/**
* Prints a help message containing usage instructions and descriptions of
* all options currently supported by SIP Communicator.
* all options currently supported by Jitsi.
*/
public void handleHelpArg()
{
handleVersionArg();
System.out.println("Usage: sip-communicator [OPTIONS] [uri-to-call]");
System.out.println("Usage: " + getPackageName() + " [OPTIONS] [uri-to-call]");
System.out.println("");
System.out.println(" -c, --config=DIR use DIR for config files");
System.out.println(" -d, --debug print debugging messages to stdout");

Loading…
Cancel
Save