cp -pP ../../qemu-img$(EXESUF) $(EMUL_DIR)/bin
-ifndef CONFIG_WIN32
cp -pP scripts/emulator.sh $(EMUL_DIR)/bin
-else
- cp -pP scripts/emulator.bat $(EMUL_DIR)/bin
+ifdef CONFIG_WIN32
+ cp -pP scripts/emulator.cmd $(EMUL_DIR)/bin
endif
# resources and jar for skin
cp -pP ../../qemu-img$(EXESUF) $(DIBS_COMMON_DIR)/bin
-ifndef CONFIG_WIN32
cp -pP scripts/emulator.sh $(DIBS_COMMON_DIR)/bin
-else
- cp -pP scripts/emulator.bat $(DIBS_COMMON_DIR)/bin
+ifdef CONFIG_WIN32
+ cp -pP scripts/emulator.cmd $(DIBS_COMMON_DIR)/bin
endif
# resources and jar for skin
#!/bin/sh
-# find EMUALTOR_INSTALLED_PATH
-SCRIPT=$(readlink -f "$0")
-SCRIPT_DIR=$(dirname "$SCRIPT")
-
-if [ ! -z $TIZEN_SDK_PATH ]; then
- EMULATOR_INSTALLED_PATH=$TIZEN_SDK_PATH/tools/emulator
-elif [ -e "$SCRIPT_DIR/../../../sdk.info" ]; then
- EMULATOR_INSTALLED_PATH=$SCRIPT_DIR/..
-elif [ -e "$HOME/.installmanager/tizensdkpath" ]; then
- . $HOME/.installmanager/tizensdkpath
- EMULATOR_INSTALLED_PATH=$TIZEN_SDK_INSTALLED_PATH/tools/emulator
-fi
+if [ "$(uname | cut -c 1-5)" = "Linux" ]; then
+# under linux
+SCRIPT_DIR=$(dirname $(readlink -f "$0"))
+EMULATOR_INSTALLED_PATH=$(readlink -f "$SCRIPT_DIR/..")
+EMULATOR_BIN_PATH=$EMULATOR_INSTALLED_PATH/bin
+EMULATOR_TOOL_PATH=$EMULATOR_INSTALLED_PATH/../../../../tools/emulator
-EMULATOR_INSTALLED_PATH=$(readlink -f $EMULATOR_INSTALLED_PATH)
+# set env variables for linux
+export LD_LIBRARY_PATH=$EMULATOR_BIN_PATH:$EMULATOR_TOOL_PATH/remote/lib:
+elif [ "$(uname | cut -c 1-6)" = "Darwin" ]; then
+# under darwin
+EMULATOR_INSTALLED_PATH=$(cd $(dirname "$0"); cd ..; pwd)
+EMULATOR_BIN_PATH=$EMULATOR_INSTALLED_PATH/bin
-# prepare running
+# set env variables for darwin
+# nothing now...
+elif [ "$(uname | cut -c 1-5)" = "MINGW" ]; then
+# under mingw
+SCRIPT_DIR=$(dirname $(readlink -f "$0"))
+EMULATOR_INSTALLED_PATH=$(readlink -f "$SCRIPT_DIR/..")
EMULATOR_BIN_PATH=$EMULATOR_INSTALLED_PATH/bin
-LIBRARY_PATH=$EMULATOR_BIN_PATH:$EMULATOR_INSTALLED_PATH/remote/lib:
+# set env variables for windows
+export SDL_STDIO_REDIRECT=0
+fi
+
+# set platform independent environment variables
+export GL_VERSION=2
+export VIGS_SYNC_READ_PIXELS=1
# check "--with-gdb"
WITH_GDB="no"
WITH_GDB="yes"
fi
-# use default conf file if no options provided
+# try to 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"
# run emulator
if [ "$WITH_GDB" = "yes" ]; then
- LD_LIBRARY_PATH=$LIBRARY_PATH gdb --args $EMULATOR_BIN_PATH/emulator-x86 $@
+ gdb --args $EMULATOR_BIN_PATH/emulator-x86 $@
else
- LD_LIBRARY_PATH=$LIBRARY_PATH $EMULATOR_BIN_PATH/emulator-x86 $@
+ $EMULATOR_BIN_PATH/emulator-x86 $@
fi