diff options
author | Emil Ivov <emcho@jitsi.org> | 2012-10-12 17:52:46 +0000 |
---|---|---|
committer | Emil Ivov <emcho@jitsi.org> | 2012-10-12 17:52:46 +0000 |
commit | 98a6dde8297d40de465c46f36677f6fd1485af1c (patch) | |
tree | 7a7795a589d2d2baf2eb176945bf378301524d45 /src/net/java/sip/communicator | |
parent | 5cb8ad46a8684dbe37f7d824f4425728285b0d4f (diff) | |
download | jitsi-98a6dde8297d40de465c46f36677f6fd1485af1c.zip jitsi-98a6dde8297d40de465c46f36677f6fd1485af1c.tar.gz jitsi-98a6dde8297d40de465c46f36677f6fd1485af1c.tar.bz2 |
Change versioning to allow for an easier integration of SVN revision and build number. Removes version revision leaving the version to major.minor[.build-label] where build label may include things like svn revisions, dates, etc.
Diffstat (limited to 'src/net/java/sip/communicator')
4 files changed, 62 insertions, 122 deletions
diff --git a/src/net/java/sip/communicator/impl/version/NightlyBuildID.java b/src/net/java/sip/communicator/impl/version/NightlyBuildID.java index 938193a..4dbd93d 100644 --- a/src/net/java/sip/communicator/impl/version/NightlyBuildID.java +++ b/src/net/java/sip/communicator/impl/version/NightlyBuildID.java @@ -1,5 +1,5 @@ /* - * Jitsi, the OpenSource Java VoIP and Instant Messaging client. + * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client. * * Distributable under LGPL license. * See terms of license at gnu.org. @@ -13,8 +13,5 @@ package net.java.sip.communicator.impl.version; */ public class NightlyBuildID { - /** - * The build ID. - */ - public static final String BUILD_ID="0.build.by.SVN"; + public static final String BUILD_ID="1234.5678"; } diff --git a/src/net/java/sip/communicator/impl/version/RevisionID.java.tmpl b/src/net/java/sip/communicator/impl/version/RevisionID.java.tmpl deleted file mode 100644 index caf9377..0000000 --- a/src/net/java/sip/communicator/impl/version/RevisionID.java.tmpl +++ /dev/null @@ -1,17 +0,0 @@ -/* - * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client. - * - * Distributable under LGPL license. - * See terms of license at gnu.org. - */ -package net.java.sip.communicator.impl.version; - -/** - * This file is autoupdated by build.xml in order to set revision id. - * - * @author Damian Minkov - */ -public class RevisionID -{ - public static final String REVISION_ID="revision.id"; -} diff --git a/src/net/java/sip/communicator/impl/version/VersionImpl.java b/src/net/java/sip/communicator/impl/version/VersionImpl.java index bafc75c..cbb16c7 100644 --- a/src/net/java/sip/communicator/impl/version/VersionImpl.java +++ b/src/net/java/sip/communicator/impl/version/VersionImpl.java @@ -18,18 +18,18 @@ public class VersionImpl implements Version { /** - * The version major of the current SIP Communicator version. In an + * The version major of the current Jitsi version. In an * example 2.3.1 version string 2 is the version major. The version major * number changes when a relatively extensive set of new features and - * possibly rearchitecturing have been applied to the SIP Communicator. + * possibly rearchitecturing have been applied to the Jitsi. */ public static final int VERSION_MAJOR = 1; /** - * The version major of the current SIP Communicator version. In an + * The version major of the current Jitsi version. In an * example 2.3.1 version string 2 is the version major. The version major * number changes when a relatively extensive set of new features and - * possibly rearchitecturing have been applied to the SIP Communicator. + * possibly rearchitecturing have been applied to the Jitsi. */ public static final int VERSION_MINOR = 1; @@ -40,16 +40,14 @@ public class VersionImpl public static final boolean IS_PRE_RELEASE_VERSION = false; /** - * Returns the version prerelease ID of the current SIP Communicator version - * and null if this version is not a prerelease. Version pre-release id-s - * and version revisions are exclusive, so in case this version is a pre- - * release the revision will bereturn null. + * Returns the version prerelease ID of the current Jitsi version + * and null if this version is not a prerelease. */ public static final String PRE_RELEASE_ID = "beta1"; /** - * Indicates if this SIP Communicator version corresponds to a nightly build - * of a repository snapshot or to an official SIP Communicator release. + * Indicates if this Jitsi version corresponds to a nightly build + * of a repository snapshot or to an official Jitsi release. */ public static final boolean IS_NIGHTLY_BUILD = true; @@ -65,15 +63,15 @@ public class VersionImpl /** * Returns the VersionImpl instance describing the current version of - * SIP Communicator. + * Jitsi. */ public static final VersionImpl CURRENT_VERSION = new VersionImpl(); /** - * Returns the version major of the current SIP Communicator version. In an + * Returns the version major of the current Jitsi version. In an * example 2.3.1 version string 2 is the version major. The version major * number changes when a relatively extensive set of new features and - * possibly rearchitecturing have been applied to the SIP Communicator. + * possibly rearchitecturing have been applied to the Jitsi. * * @return the version major String. */ @@ -83,10 +81,10 @@ public class VersionImpl } /** - * Returns the version minor of the current SIP Communicator version. In an + * Returns the version minor of the current Jitsi version. In an * example 2.3.1 version string 3 is the version minor. The version minor * number changes after adding enhancements and possibly new features to a - * given SIP Communicator version. + * given Jitsi version. * * @return the version minor integer. */ @@ -96,35 +94,11 @@ public class VersionImpl } /** - * Returns the version revision number of the current SIP Communicator - * version. In an example 2.3.1 version string 1 is the revision number. - * The version revision number number changes after applying bug fixes and - * possible some small enhancements to a given SIP Communicator version. - * - * @return the version revision number or -1 if this version of - * SIP Communicator corresponds to a pre-release. - */ - public int getVersionRevision() - { - if(isPreRelease()) - return -1; - - try - { - return Integer.valueOf(RevisionID.REVISION_ID); - } catch (NumberFormatException numberFormatException) - { - // if we cannot parse the revision number return -1, so we skip it - return -1; - } - } - - /** - * Indicates if this SIP Communicator version corresponds to a nightly build - * of a repository snapshot or to an official SIP Communicator release. + * Indicates if this Jitsi version corresponds to a nightly build + * of a repository snapshot or to an official Jitsi release. * * @return true if this is a build of a nightly repository snapshot and - * false if this is an official SIP Communicator release. + * false if this is an official Jitsi release. */ public boolean isNightly() { @@ -133,8 +107,8 @@ public class VersionImpl /** * If this is a nightly build, returns the build identifies (e.g. - * nightly-2007.12.07-06.45.17). If this is not a nightly build SIP - * Communicator version, the method returns null. + * nightly-2007.12.07-06.45.17). If this is not a nightly build Jitsi + * version, the method returns null. * * @return a String containing a nightly build identifier or null if this is * a release version and therefore not a nightly build @@ -158,10 +132,8 @@ public class VersionImpl } /** - * Returns the version prerelease ID of the current SIP Communicator version - * and null if this version is not a prerelease. Version pre-release id-s - * and version revisions are exclusive, so in case this version is a pre- - * release the revision will bereturn null + * Returns the version prerelease ID of the current Jitsi version + * and null if this version is not a prerelease. * * @return a String containing the version prerelease ID. */ @@ -197,13 +169,13 @@ public class VersionImpl /** * Compares the <tt>version</tt> parameter to this version and returns true - * if and only if both reference the same SIP Communicator version and + * if and only if both reference the same Jitsi version and * false otherwise. * * @param version the version instance that we'd like to compare with this * one. * @return true if and only the version param references the same - * SIP Communicator version as this Version instance and false otherwise. + * Jitsi version as this Version instance and false otherwise. */ public boolean equals(Object version) { @@ -216,13 +188,12 @@ public class VersionImpl /** * Returns a String representation of this Version instance in the generic - * form of major.minor.revision[.nightly.build.id]. If you'd just - * like to obtain the version of SIP Communicator so that you could display - * it (e.g. in a Help->About dialog) then all you need is calling this - * method. + * form of major.minor[.nightly.build.id]. If you'd just like to obtain the + * version of Jitsi so that you could display it (e.g. in a Help->About + * dialog) then all you need is calling this method. * - * @return a major.minor.revision[.build] String containing the complete - * SIP Communicator version. + * @return a major.minor[.build] String containing the complete + * Jitsi version. */ public String toString() { @@ -237,19 +208,10 @@ public class VersionImpl versionStringBuff.append("-"); versionStringBuff.append(getPreReleaseID()); } - else - { - int rev = getVersionRevision(); - if(rev >= 0) - { - versionStringBuff.append("."); - versionStringBuff.append(Integer.toString(rev)); - } - } if(isNightly()) { - versionStringBuff.append("-"); + versionStringBuff.append("."); versionStringBuff.append(getNightlyBuildID()); } @@ -258,10 +220,10 @@ public class VersionImpl /** * Returns the VersionImpl instance describing the current version of - * SIP Communicator. + * Jitsi. * * @return the VersionImpl instance describing the current version of - * SIP Communicator. + * Jitsi. */ public static final VersionImpl currentVersion() { @@ -270,10 +232,10 @@ public class VersionImpl /** * Returns the name of the application that we're currently running. Default - * MUST be SIP Communicator. + * MUST be Jitsi. * * @return the name of the application that we're currently running. Default - * MUST be SIP Communicator. + * MUST be Jitsi. */ public String getApplicationName() { diff --git a/src/net/java/sip/communicator/plugin/update/Update.java b/src/net/java/sip/communicator/plugin/update/Update.java index 749a1e7..4a27950 100644 --- a/src/net/java/sip/communicator/plugin/update/Update.java +++ b/src/net/java/sip/communicator/plugin/update/Update.java @@ -98,42 +98,39 @@ public class Update return;
}
- Thread checkForUpdatesThread
- = new Thread()
+ Thread checkForUpdatesThread = new Thread()
+ {
+ @Override
+ public void run()
{
- @Override
- public void run()
+ try
{
- try
+ if(isLatestVersion())
{
- if(isLatestVersion())
+ if(notifyAboutNewestVersion)
{
- if(notifyAboutNewestVersion)
- {
- ResourceManagementService resources
- = Resources.getResources();
-
- UpdateActivator.getUIService()
- .getPopupDialog()
- .showMessagePopupDialog(
- resources.getI18NString(
- "plugin.updatechecker.DIALOG_NOUPDATE"),
- resources.getI18NString(
- "plugin.updatechecker.DIALOG_NOUPDATE_TITLE"),
- PopupDialog.INFORMATION_MESSAGE);
- }
+ ResourceManagementService resources
+ = Resources.getResources();
+
+ UpdateActivator.getUIService().getPopupDialog()
+ .showMessagePopupDialog(resources.getI18NString(
+ "plugin.updatechecker.DIALOG_NOUPDATE"),
+ resources.getI18NString(
+ "plugin.updatechecker.DIALOG_NOUPDATE_TITLE"),
+ PopupDialog.INFORMATION_MESSAGE);
}
- else if (OSUtils.IS_WINDOWS)
- showWindowsNewVersionAvailableDialog();
- else
- showGenericNewVersionAvailableDialog();
- }
- finally
- {
- exitCheckForUpdates(null);
}
+ else if (OSUtils.IS_WINDOWS)
+ showWindowsNewVersionAvailableDialog();
+ else
+ showGenericNewVersionAvailableDialog();
}
- };
+ finally
+ {
+ exitCheckForUpdates(null);
+ }
+ }
+ };
checkForUpdatesThread.setDaemon(true);
@@ -858,12 +855,13 @@ public class Update if(ver.isNightly())
deltaTarget = ver.getNightlyBuildID();
else
- deltaTarget = String.valueOf(ver.getVersionRevision());
+ deltaTarget = String.valueOf(ver.toString());
String deltaLink
= downloadLink.replace(
latestVersion,
latestVersion + "-delta-" + deltaTarget);
+
/*
* TODO Download the delta update regardless of the logging level
* once the generation of delta updates is implemented and the whole
|