From: SeokYeon Hwang Date: Sun, 13 Jul 2014 08:14:09 +0000 (+0900) Subject: emulator_option: enhance scripts and error reporting X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~228^2^2~71 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c9ebd328044f0efc0f2045099b8d16577d95e33e;p=sdk%2Femulator%2Fqemu.git emulator_option: enhance scripts and error reporting Prevent duplicated reporting. Use default conf file if no options provided. Change-Id: Ib9e335b6ef18c5e68c9dc9f42c4e3de755f431bf Signed-off-by: SeokYeon Hwang --- diff --git a/tizen/src/emulator_options.c b/tizen/src/emulator_options.c index a9d28cd5e2..2c43aa691f 100644 --- a/tizen/src/emulator_options.c +++ b/tizen/src/emulator_options.c @@ -175,6 +175,7 @@ static char *substitute_variables(char *src) " \"--%s\" or profile default file or envirionment" " variable.\n", name, name); value = (char *)""; + set_variable(name, value, false); } length = start_index + strlen(value) + (strlen(str) - end_index); diff --git a/tizen/src/scripts/emulator.sh b/tizen/src/scripts/emulator.sh index 25f16ab13f..3c3a703877 100755 --- a/tizen/src/scripts/emulator.sh +++ b/tizen/src/scripts/emulator.sh @@ -19,9 +19,23 @@ EMULATOR_INSTALLED_PATH=$(readlink -f $EMULATOR_INSTALLED_PATH) EMULATOR_BIN_PATH=$EMULATOR_INSTALLED_PATH/bin LIBRARY_PATH=$EMULATOR_BIN_PATH:$EMULATOR_INSTALLED_PATH/remote/lib: -# run emulator +# check "--with-gdb" +WITH_GDB="no" if [ "$1" = "--with-gdb" ]; then shift + WITH_GDB="yes" +fi + +# use default conf file if no options provided +if [ -z $1 ]; then + if [ -e $HOME/.emulator_default.conf ]; then + set -- "--conf" "$HOME/.emulator_default.conf" + echo "No options provided. Use default conf file [$HOME/.emulator_default.conf]." + fi +fi + +# run emulator +if [ "$WITH_GDB" = "yes" ]; then LD_LIBRARY_PATH=$LIBRARY_PATH gdb --args $EMULATOR_BIN_PATH/emulator-x86 $@ else LD_LIBRARY_PATH=$LIBRARY_PATH $EMULATOR_BIN_PATH/emulator-x86 $@