IDEMPIERE-166 Rebranding of logo and product name

This commit is contained in:
Heng Sin Low 2012-03-31 00:15:00 +08:00
parent 43efec55a3
commit a36ddb4d4c
2 changed files with 21 additions and 19 deletions

View File

@ -45,6 +45,9 @@ import org.compiere.util.Login;
import org.compiere.util.SecureEngine; import org.compiere.util.SecureEngine;
import org.compiere.util.SecureInterface; import org.compiere.util.SecureInterface;
import org.compiere.util.Util; import org.compiere.util.Util;
import org.eclipse.core.runtime.IProduct;
import org.eclipse.core.runtime.Platform;
import org.osgi.framework.Bundle;
/** /**
* Adempiere Control Class * Adempiere Control Class
@ -139,9 +142,21 @@ public final class Adempiere
*/ */
public static String getVersion() public static String getVersion()
{ {
return MAIN_VERSION + " @ " + DATE_VERSION; IProduct product = Platform.getProduct();
if (product != null) {
Bundle bundle = product.getDefiningBundle();
if (bundle != null) {
return bundle.getVersion().toString();
}
}
return "Unknown";
} // getVersion } // getVersion
public static String getDatabaseVersion()
{
return DB.getSQLValueString(null, "select lastmigrationscriptapplied from ad_system");
}
/** /**
* Short Summary (Windows) * Short Summary (Windows)
* @return summary * @return summary
@ -183,8 +198,8 @@ public final class Adempiere
s_ImplementationVersion = adempierePackage.getImplementationVersion(); s_ImplementationVersion = adempierePackage.getImplementationVersion();
if (s_ImplementationVendor == null) if (s_ImplementationVendor == null)
{ {
s_ImplementationVendor = "Supported by ADempiere community"; s_ImplementationVendor = "Supported by iDempiere community";
s_ImplementationVersion = "ADempiere"; s_ImplementationVersion = "iDempiere";
} }
} // setPackageInfo } // setPackageInfo
@ -576,5 +591,4 @@ public final class Adempiere
public static URL getResource(String name) { public static URL getResource(String name) {
return Core.getResourceFinder().getResource(name); return Core.getResourceFinder().getResource(name);
} }
} // Adempiere } // Adempiere

View File

@ -6,11 +6,9 @@ Copyright (C) 2009 Idalica Corporation
<zk> <zk>
<zscript> <zscript>
import org.compiere.Adempiere; import org.compiere.Adempiere;
var mainVersion = Adempiere.MAIN_VERSION; var mainVersion = Adempiere.getVersion();
var dateVersion = Adempiere.DATE_VERSION; var dbVersion = Adempiere.getDatabaseVersion();
var dbVersion = Adempiere.DB_VERSION;
var vendor = Adempiere.getImplementationVendor(); var vendor = Adempiere.getImplementationVendor();
var vendorVersion = Adempiere.getImplementationVersion();
var jvm = Adempiere.getJavaInfo(); var jvm = Adempiere.getJavaInfo();
var os = Adempiere.getOSInfo(); var os = Adempiere.getOSInfo();
</zscript> </zscript>
@ -30,15 +28,10 @@ Copyright (C) 2009 Idalica Corporation
<div class="versionInfoBox"> <div class="versionInfoBox">
<table border="0"> <table border="0">
<tr> <tr>
<td align="right">Main Version</td> <td align="right">Version</td>
<td>:</td> <td>:</td>
<td aligh="left">${mainVersion}</td> <td aligh="left">${mainVersion}</td>
</tr> </tr>
<tr>
<td align="right">Date Version</td>
<td>:</td>
<td aligh="left">${dateVersion}</td>
</tr>
<tr> <tr>
<td align="right">Database Version</td> <td align="right">Database Version</td>
<td>:</td> <td>:</td>
@ -49,11 +42,6 @@ Copyright (C) 2009 Idalica Corporation
<td>:</td> <td>:</td>
<td aligh="left">${vendor}</td> <td aligh="left">${vendor}</td>
</tr> </tr>
<tr>
<td align="right">Vendor Version</td>
<td>:</td>
<td aligh="left">${vendorVersion}</td>
</tr>
<tr> <tr>
<td align="right">JVM</td> <td align="right">JVM</td>
<td>:</td> <td>:</td>