emul_state: set VM path information temporary on new argument parser
authorGiWoong Kim <giwoong.kim@samsung.com>
Wed, 10 Jun 2015 06:38:56 +0000 (15:38 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Wed, 10 Jun 2015 08:40:24 +0000 (17:40 +0900)
Change-Id: I2aab1e7a50fa8c5da116357f235610c1260d60f5
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
tizen/src/display/qt5_supplement.cpp
tizen/src/emul_state.c

index a9618f3e688ac24ac396c2196064d323186de815..b925b23a7d99ffd096a3aac15d3682b0219628eb 100644 (file)
@@ -94,19 +94,23 @@ void qt5_gui_init(void)
     // TODO:
 
     uiInfo->vmName = QString(get_emul_vm_name()).trimmed();
+    qDebug() << "VM name :" <<  uiInfo->vmName;
+
     uiInfo->resolution.setWidth(get_emul_resolution_width());
     uiInfo->resolution.setHeight(get_emul_resolution_height());
     uiInfo->basePort = get_emul_vm_base_port();
 
-    uiInfo->vmDataPath = get_emul_vm_data_path();
+    uiInfo->vmDataPath = QDir(get_emul_vm_data_path()).canonicalPath();
     if (uiInfo->vmDataPath.endsWith(QDir::separator()) == false) {
         uiInfo->vmDataPath += QDir::separator();
     }
+    qDebug() << "VM path :" <<  uiInfo->vmDataPath;
 
     uiInfo->skinPath = QDir(get_emul_skin_path()).canonicalPath();
     if (uiInfo->skinPath.endsWith(QDir::separator()) == false) {
         uiInfo->skinPath += QDir::separator();
     }
+    qDebug() << "skin path :" <<  uiInfo->skinPath;
 
     /* read skin information */
     QSettings skinInfo(uiInfo->skinPath + SKIN_INFO_FILE_NAME,
index 5ad642a1e2998508ff4c8c0266c950a260feac7c..b5c405f5274b212e4ff30dbf707a1ebc7cd62f50 100644 (file)
@@ -582,5 +582,13 @@ void set_emul_vm_data_path(const char *path)
 
 const char* get_emul_vm_data_path(void)
 {
+    if (_emul_info.vm_data_path) {
+        return _emul_info.vm_data_path;
+    }
+
+    // FIXME: we should support commandline users
+    _emul_info.vm_data_path = g_strdup_printf("%s/%s",
+            get_variable("vms_path"), get_emul_vm_name());
+
     return _emul_info.vm_data_path;
 }