From: SeokYeon Hwang Date: Wed, 19 Aug 2015 07:32:14 +0000 (+0900) Subject: Merge branch 'tizen_2.4_develop' into tizen_3.0_develop X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.2~274 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6b76b72ff106a3cb1c578054c2c09553325f8cf7;p=sdk%2Femulator%2Fqemu.git Merge branch 'tizen_2.4_develop' into tizen_3.0_develop Change-Id: I6753087cb299be5eb2b17c2ed256786021a4a27d Signed-off-by: SeokYeon Hwang --- 6b76b72ff106a3cb1c578054c2c09553325f8cf7 diff --cc package/changelog index 9327ef9cb2,667f8cd7c6..0044cdee4b --- a/package/changelog +++ b/package/changelog @@@ -1,9 -1,12 +1,12 @@@ + * 2.2.43 + - enable DPI information on Detailed Info dialog + == GiWoong Kim 2015-08-13 * 2.2.42 -- changed ecp launch path to common directory on menu -== Jinhyung Choi 2015-08-07 +- fixed dest dir of emulator binary on DIBS +== Sooyoung Ha 2015-08-05 * 2.2.41 -- schedules controller object for deletion -== GiWoong Kim 2015-08-06 +- modify platform version 2.4 -> 3.0 +== Sooyoung Ha 2015-08-05 * 2.2.40 - support network disconnect event == Munkyu Im 2015-07-28 diff --cc tizen/emulator_configure.sh index 511cb0b484,d1326040ff..d6cd88df7b --- a/tizen/emulator_configure.sh +++ b/tizen/emulator_configure.sh @@@ -79,7 -77,7 +79,7 @@@ if [ -z "$EMUL_TARGET_LIST" ] ; the fi # append common flags - CONFIGURE_APPEND="--target-list=$EMUL_TARGET_LIST --enable-yagl --enable-curl --enable-vigs --enable-maru --enable-qt --enable-libav --enable-libpng --disable-sdl --disable-gtk --disable-vnc --disable-curses --disable-quorum --disable-xen $CONFIGURE_APPEND" -CONFIGURE_APPEND="--target-list=$EMUL_TARGET_LIST --enable-yagl --enable-curl --disable-gtk --disable-quorum --enable-vigs --enable-maru --enable-libav --enable-libpng --enable-qt $CONFIGURE_APPEND" ++CONFIGURE_APPEND="--target-list=$EMUL_TARGET_LIST --enable-yagl --enable-curl --enable-vigs --enable-maru --enable-qt --enable-libav --enable-libpng --disable-sdl --disable-gtk --disable-vnc --disable-spice --disable-curses --disable-quorum --disable-xen $CONFIGURE_APPEND" if [ -z ${PKG_CONFIG_PATH} ] ; then # avoid pkg-config bug on Windows export PKG_CONFIG_PATH=${TIZEN_SDK_DEV_PATH}/distrib/lib/pkgconfig diff --cc tizen/src/emul_state.c index 7dfc2a8da6,42217b3924..c65903a7f9 --- a/tizen/src/emul_state.c +++ b/tizen/src/emul_state.c @@@ -65,40 -68,12 +68,6 @@@ DECLARE_DEBUG_CHANNEL(emul_state) static EmulatorConfigInfo _emul_info = {0,}; static EmulatorConfigState _emul_state; --/* misc */ - const char *get_bin_path(void) - { - const char *bin_path = get_variable(KEYWORD_BIN_PATH); - // guarantee bin_path is not NULL - if (!bin_path) { - bin_path = ""; - } - return bin_path; - } - - const char *get_log_path(void) - { - const char *log_path = get_variable("log_path"); - - // if "log_path" is not exist, make it first. - if (!log_path) { - char *vms_path = get_variable("vms_path"); - char *vm_name = get_variable("vm_name"); - if (!vms_path || !vm_name) { - // we can not specify log path. - // emulator may not be launched from emulator-manager. - log_path = ""; - } - else { - log_path = g_strdup_printf("%s/%s/logs", vms_path, vm_name); - } - - set_variable("log_path", log_path, false); - } - - return log_path; - } -#ifdef SUPPORT_LEGACY_ARGS -// for compatibility -char log_path[PATH_MAX] = { 0, }; -#endif -- /* sdl bits per pixel */ void set_emul_sdl_bpp(int bpp) { @@@ -423,34 -350,123 +342,118 @@@ bool get_emul_cpu_accel(void return false; } - /* VM ram size */ - void set_emul_ram_size(const char *size) - { - _emul_info.vm_ram_size = size; - } + // + // cleaned-up + // - const char* get_emul_ram_size(void) + // launch_conf_path + // only set by emulator.c when start up + const char *launch_conf_file = NULL; + + // bin path + // only set by osutil-{OS}.c when start up + const char *bin_path = NULL; + + const char *get_bin_path(void) { - return _emul_info.vm_ram_size; + if (bin_path) { + return bin_path; + } + + return ""; } - /* file sharing path */ - void set_emul_file_sharing_path(const char *path) + // emulator kernel log file + static const char *kernel_log_redirect_file = NULL; + + const char *get_kernel_log_redirect_file(void) { - _emul_info.file_sharing_path = path; + // TODO: kernel log path should be aquired from char device. + if (kernel_log_redirect_file) { + return kernel_log_redirect_file; + } + + char *vms_path = get_variable("vms_path"); + char *vm_name = get_variable("vm_name"); + if (!vms_path || !vm_name) { + // we can not specify log path. + // emulator may not be launched from emulator-manager. + kernel_log_redirect_file = g_strdup(""); + } + else { + kernel_log_redirect_file = + g_strdup_printf("%s/%s/logs/emulator.klog", vms_path, vm_name); + } + + return kernel_log_redirect_file; } - const char* get_emul_file_sharing_path(void) + // emulator log file + static const char *log_redirect_file = NULL; + + #ifdef CONFIG_WIN32 + // for checking Windows version + extern OSVERSIONINFO osvi; + #endif + + const char *get_log_redirect_file(void) { - return _emul_info.file_sharing_path; - } -#ifdef SUPPORT_LEGACY_ARGS - if (log_path[0]) { - return log_path; - } -#endif + int result = -1; + char log_filename[PATH_MAX]; - // - // cleaned-up - // + // should we compare stdout(fd/1) and stderr(fd/2) ?? + #if defined(CONFIG_LINUX) + result = readlink("/proc/self/fd/1", log_filename, PATH_MAX); + if (result >= 0) { + log_filename[result] = '\0'; + } + #elif defined(CONFIG_DARWIN) + result = fcntl(STDOUT_FILENO, F_GETPATH, log_filename); + #elif defined(CONFIG_WIN32) + # if WINVER >= 0x600 + // works only vista or newer... + if (osvi.dwMajorVersion >= 6) { + char win32_log_filename_normalized[PATH_MAX]; + HANDLE handle_stdout = GetStdHandle(STD_OUTPUT_HANDLE); + DWORD ret = GetFinalPathNameByHandle(handle_stdout, + win32_log_filename_normalized, + PATH_MAX, FILE_NAME_NORMALIZED); + // strip "\\?\" + if (ret > 0) { + g_stpcpy(log_filename, win32_log_filename_normalized + 4); + result = 0; + } else { + result = -1; + } + } + # endif + #endif + if (log_redirect_file) { + g_free((void *)log_redirect_file); + } - // launch_conf_path - const char *launch_conf_file = NULL; + if (result >= 0) { + log_redirect_file = g_strdup(log_filename); + } else { + // fail safe + LOG_WARNING("Can not identify log redirection path, " + "We should assume it !!!\n"); + + char *vms_path = get_variable("vms_path"); + char *vm_name = get_variable("vm_name"); + if (!vms_path || !vm_name) { + // we can not specify log path. + // emulator may not be launched from emulator-manager. + log_redirect_file = g_strdup(""); + } + else { + log_redirect_file = + g_strdup_printf("%s/%s/logs/emulator.log", vms_path, vm_name); + } + } + + return log_redirect_file; + } // drive image file static const char *drive_image_file = NULL; @@@ -560,10 -601,19 +588,19 @@@ const char *get_vm_name(void const char *get_profile_name(void) { - return vio_evdi->profile; + return get_variable("profile"); } - /* GPU virtualization */ + // host directory sharing path + const char* get_host_directory_sharing_path(void) + { + FsDriverEntry *sharing_entry = get_fsdev_fsentry((char*)DEFAULT_STATIC_HDS_ID); + const char *sharing_path = (sharing_entry != NULL ? sharing_entry->path : NULL); + + return sharing_path; + } + + // GPU virtualization static bool gpu_accel_enabled; bool is_gpu_accel_enabled(void) diff --cc tizen/src/emul_state.h index 92baa4b895,fe1a73fff2..57a321c151 --- a/tizen/src/emul_state.h +++ b/tizen/src/emul_state.h @@@ -35,7 -35,9 +35,8 @@@ #include "display/maru_finger.h" #include "config-host.h" + #include "hw/maru_device_ids.h" -#define SUPPORT_LEGACY_ARGS #define MAX_ADDR_LEN 256 #define MAX_PORT_LEN 256 @@@ -121,10 -121,11 +120,6 @@@ typedef struct EmulatorConfigState bool sdb_connection; } EmulatorConfigState; --/* misc */ - char const *get_bin_path(void); - char const *get_log_path(void); -#ifdef SUPPORT_LEGACY_ARGS -extern char log_path[]; -#endif -- /* setter */ void set_emul_win_scale(double scale); void set_emul_sdl_bpp(int bpp); @@@ -195,5 -203,9 +197,6 @@@ int get_display_resolution_height(void) void set_skin_enabled(bool enabled); bool is_skin_enabled(void); #endif -#ifdef SUPPORT_LEGACY_ARGS -void set_vm_data_path(const char *path); -#endif + void init_emul_state(void); #endif /* __EMUL_STATE_H__ */ diff --cc tizen/src/hw/virtio/maru_virtio_evdi.c index 0f7b43a7ce,a2ef59f1e6..2b2006b017 --- a/tizen/src/hw/virtio/maru_virtio_evdi.c +++ b/tizen/src/hw/virtio/maru_virtio_evdi.c @@@ -241,7 -241,11 +241,9 @@@ static void virtio_evdi_realize(DeviceS vio_evdi->bh = qemu_bh_new(maru_evdi_bh, vio_evdi); + qemu_mutex_init(&recv_buf_mutex); + - if (vio_evdi->profile) { - epi_init(); - } + epi_init(); } static void virtio_evdi_unrealize(DeviceState *dev, Error **errp) diff --cc ui/input.c index 5aa9bb0ce0,5aa9bb0ce0..fbf5bd3b7f --- a/ui/input.c +++ b/ui/input.c @@@ -7,6 -7,6 +7,7 @@@ #include "ui/console.h" #if defined CONFIG_MARU && defined CONFIG_SPICE && defined CONFIG_LINUX ++# ifdef CONFIG_JAVA_UI #include extern void maru_hwkey_event(int event_type, int keycode); @@@ -15,6 -15,6 +16,7 @@@ extern void do_host_kbd_enable(bool on) extern void qemu_system_graceful_shutdown_request(unsigned int sec); extern void request_close(void); void* tizen_close_thread(void* data); ++# endif #endif //#include "tizen/src/debug_ch.h" @@@ -514,6 -514,6 +516,7 @@@ void qemu_remove_mouse_mode_change_noti } #if defined CONFIG_MARU && defined CONFIG_SPICE && defined CONFIG_LINUX ++# ifdef CONFIG_JAVA_UI void hwkey_put_keycode(int type, int keycode) { if (!runstate_is_running() && !runstate_check(RUN_STATE_SUSPENDED)) { @@@ -566,6 -566,6 +569,7 @@@ void tizen_close_put_type(int type printf("created tizen_close thread\n"); } } ++# endif #endif MouseInfoList *qmp_query_mice(Error **errp) diff --cc ui/spice-input.c index cd0cde2400,cd0cde2400..42b5690e22 --- a/ui/spice-input.c +++ b/ui/spice-input.c @@@ -98,6 -98,6 +98,7 @@@ static void kbd_leds(void *opaque, int } #ifdef CONFIG_MARU ++# ifdef CONFIG_JAVA_UI /* hwkey bits */ typedef struct QemuSpiceHwkey { @@@ -199,6 -199,6 +200,7 @@@ static void qemu_get_sdb_port(SpiceSdbP printf("%d\n", get_emul_vm_base_port()); *sdb_port = get_emul_vm_base_port(); } ++# endif #endif /* mouse bits */