struct tm *tm_time;
struct timeval tval;
- INFO("* SDK Version : %s\n", build_version);
+ INFO("* Board name : %s\n", build_version);
INFO("* Package %s\n", pkginfo_version);
INFO("* Package %s\n", pkginfo_maintainer);
INFO("* Git Head : %s\n", pkginfo_githead);
isOpen = true;
logger.info("Open the about dialog");
- AboutDialog dialog = new AboutDialog(shell);
+ AboutDialog dialog = new AboutDialog(shell, config);
dialog.open();
isOpen = false;
}
package org.tizen.emulator.skin;
+import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
+import java.io.FileReader;
import java.io.IOException;
import java.net.Socket;
import java.util.HashMap;
import org.tizen.emulator.skin.log.SkinLogger.SkinLogLevel;
import org.tizen.emulator.skin.util.IOUtil;
import org.tizen.emulator.skin.util.JaxbUtil;
+import org.tizen.emulator.skin.util.SkinUtil;
import org.tizen.emulator.skin.util.StringUtil;
import org.tizen.emulator.skin.util.SwtUtil;
/* set emulator window skin property */
String skinPropFilePath = vmPath + File.separator + SKIN_PROPERTIES_FILE_NAME;
- Properties skinProperties = loadProperties( skinPropFilePath, true );
- if ( null == skinProperties ) {
- logger.severe( "Fail to load skin properties file." );
- System.exit( -1 );
+ Properties skinProperties = loadProperties(skinPropFilePath, true);
+ if (null == skinProperties) {
+ logger.severe("Fail to load skin properties file.");
+ System.exit(-1);
}
/* set emulator window config property */
System.exit(-1);
}
+ /* collect configurations */
EmulatorConfig config = new EmulatorConfig(argsMap,
dbiContents, skinProperties, skinPropFilePath, configProperties);
+ /* load SDK version */
+ String strVersion = "Undefined";
+ String versionFilePath = SkinUtil.getSdkVersionFilePath();
+
+ File file = new File(versionFilePath);
+ if (file.exists() && file.isFile()) {
+ BufferedReader reader = new BufferedReader(
+ new FileReader(versionFilePath));
+
+ strVersion = reader.readLine();
+
+ reader.close();
+ }
+
+ logger.info("SDK version : " + strVersion);
+ config.setSkinProperty(
+ EmulatorConfig.SkinInfoConstants.SDK_VERSION_NAME, strVersion);
+
/* load image resource */
ImageRegistry.getInstance().initialize(config);
}
public interface SkinInfoConstants {
+ public static final String SDK_VERSION_NAME = "sdk.version-name";
public static final String SKIN_NAME = "skin.name";
public static final String RESOLUTION_WIDTH = "resolution.width";
public static final String RESOLUTION_HEIGHT = "resolution.height";
import org.eclipse.swt.widgets.Link;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
+import org.tizen.emulator.skin.config.EmulatorConfig;
import org.tizen.emulator.skin.log.SkinLogger;
import org.tizen.emulator.skin.util.IOUtil;
import org.tizen.emulator.skin.util.StringUtil;
public static final String URL_TIZEN_ORG = "https://developer.tizen.org";
+ private Logger logger =
+ SkinLogger.getSkinLogger(AboutDialog.class).getLogger();
+
private Image aboutImage;
+ private EmulatorConfig config;
- private Logger logger = SkinLogger.getSkinLogger(AboutDialog.class).getLogger();
- public AboutDialog(Shell parent) {
+ public AboutDialog(Shell parent, EmulatorConfig config) {
super(parent, "About Tizen Emulator", SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
+
+ this.config = config;
}
private GridLayout getNopaddedGridLayout(int numColumns, boolean makeColumnEqualWidth) {
/* SDK version */
Text versionText = new Text(compositeRight, SWT.NONE);
- String version = getValue(properties, PROP_KEY_VERSION);
+ /*String version = getValue(properties, PROP_KEY_VERSION);
if (version.isEmpty()) {
version = "Not identified";
- }
+ }*/
+ String version = config.getSkinProperty(
+ EmulatorConfig.SkinInfoConstants.SDK_VERSION_NAME);
+
versionText.setText("Version : " + version);
versionText.setEditable(false);
versionText.setBackground(white);
return sdbPath;
}
+ public static String getSdkVersionFilePath() {
+ return ".." + File.separator + "etc" + File.separator + "version";
+ }
+
public static List<KeyMapType> getHWKeyMapList(short rotationId) {
RotationType rotation = SkinRotation.getRotation(rotationId);
if (rotation == null) {