From 1d500d47b35730ff3ffb576d292f0b5083a91e9a Mon Sep 17 00:00:00 2001 From: "hyunsik.noh" Date: Thu, 23 Jan 2014 17:01:40 +0900 Subject: [PATCH] CLI: Fix install script about swpaner library. Change-Id: Ic1178cae74e2e329dce67974dba88ac818bffd2a Signed-off-by: hyunsik.noh --- org.tizen.ncli.ide/tizen-autocomplete | 2 +- org.tizen.ncli.ide/tizen.bat | 8 ++-- org.tizen.ncli.ide/tizen.sh | 6 +-- package/build.linux | 78 ++++++++++++++++++---------------- package/new-common-cli.install.linux | 6 +-- package/new-common-cli.install.windows | 17 ++++++++ package/new-native-cli.install.darwin | 9 ---- package/new-native-cli.install.linux | 9 ---- 8 files changed, 68 insertions(+), 67 deletions(-) create mode 100644 package/new-common-cli.install.windows delete mode 100644 package/new-native-cli.install.darwin delete mode 100644 package/new-native-cli.install.linux diff --git a/org.tizen.ncli.ide/tizen-autocomplete b/org.tizen.ncli.ide/tizen-autocomplete index 47c5244..75595c2 100644 --- a/org.tizen.ncli.ide/tizen-autocomplete +++ b/org.tizen.ncli.ide/tizen-autocomplete @@ -22,7 +22,7 @@ _tizen() MAIN=org.tizen.ncli.ide.autocomplete.TizenAutoComplete - next=$(java -Djava.library.path=SPAWN_LIB_PATH -cp $CLASSPATH $MAIN $ARGS) + next=$(java -Djava.library.path=CLI_LIB_PATH -cp $CLASSPATH $MAIN $ARGS) COMPREPLY=($(compgen -W "${next}" -- ${cur})) return 0 diff --git a/org.tizen.ncli.ide/tizen.bat b/org.tizen.ncli.ide/tizen.bat index 975f19c..08a3ff9 100644 --- a/org.tizen.ncli.ide/tizen.bat +++ b/org.tizen.ncli.ide/tizen.bat @@ -13,8 +13,6 @@ set HAVE_ARGS=false set CLASSPATH= set ARGS= -cd %LIB_PATH% - REM check args call:ARGS_SHIFT %* @@ -59,8 +57,10 @@ REM command excute method FOR /f "tokens=*" %%i IN ('dir %LIB_PATH% /B') DO ( call:CONCAT %LIB_PATH%\%%i ) + set CLASSPATH=%CONFIG_PATH%;%CLASSPATH% + set MAIN=org.tizen.ncli.ide.shell.Main - set EXEC=java %LOG_OPT% -Djava.library.path=%LIB_PATH%\os\win32\x86_64 -cp %CONFIG_PATH%;%CLASSPATH% %MAIN% %ARGS% + set EXEC=java %LOG_OPT% -Djava.library.path=%LIB_PATH% -cp %CONFIG_PATH%;%CLASSPATH% %MAIN% %ARGS% %EXEC% goto:eof @@ -69,4 +69,4 @@ goto:eof REM concatenation lib :CONCAT set CLASSPATH=%CLASSPATH%%1; -goto:END_STEP \ No newline at end of file +goto:END_STEP diff --git a/org.tizen.ncli.ide/tizen.sh b/org.tizen.ncli.ide/tizen.sh index e493f63..50944c7 100755 --- a/org.tizen.ncli.ide/tizen.sh +++ b/org.tizen.ncli.ide/tizen.sh @@ -1,13 +1,13 @@ #!/bin/sh CURRENT_WORKSPACE_PATH=`pwd` HOME_PATH=`test -h $0 && dirname $(readlink $0) || dirname $0` -cd $HOME_PATH/../lib-ncli +LIB_PATH=$HOME_PATH/../lib-ncli CONFIG_PATH=$HOME_PATH/../conf-ncli LOG_CONF_FILE=log4j-progress.xml LOG_OPT="-Dlog4j.configuration=${LOG_CONF_FILE}" -LIBS=`find . -maxdepth 1` +LIBS=`find $LIB_PATH -maxdepth 1` LIB="" for LIB in $LIBS; do CLASS_PATH=$CLASS_PATH:$LIB @@ -34,6 +34,6 @@ fi MAIN=org.tizen.ncli.ide.shell.Main -EXEC="java ${LOG_OPT} -Djava.library.path=./os/linux/x86_64 -cp $CLASS_PATH $MAIN $ARGS" +EXEC="java $LOG_OPT -Djava.library.path=$LIB_PATH -cp $CLASS_PATH $MAIN $ARGS" eval "$EXEC" diff --git a/package/build.linux b/package/build.linux index d7eadcb..deeba1f 100755 --- a/package/build.linux +++ b/package/build.linux @@ -170,6 +170,46 @@ new_common_cli_build() { cp -r ${TARGET} ${NCLI_COMMON_LIB} done + CDT_SPWAN_LINUX="org.eclipse.cdt.core.linux.x86_*" + CDT_SPWAN_WINDOWS="org.eclipse.cdt.core.win32.x86_*" + CDT_SPWAN_MACOS="org.eclipse.cdt.core.macosx_*" + + case ${TARGET_OS} in + ubuntu-32|ubuntu-64) + TARGET=`find $ROOTDIR -name "${CDT_SPWAN_LINUX}" | head -1` + cp -r ${TARGET} ${NCLI_COMMON_LIB} + cd ${NCLI_COMMON_LIB} + jar -xvf ${CDT_SPWAN_LINUX} os + TARGET=`find . -name libspawner.so | head -1` + cp ${TARGET} ./libspawner.so + rm -rf os + cd - + ;; + windows-32|windows-64) + TARGET=`find $ROOTDIR -name "${CDT_SPWAN_WINDOWS}" | head -1` + cp -r ${TARGET} ${NCLI_COMMON_LIB} + cd ${NCLI_COMMON_LIB} + TARGET=`find . -name spawner.dll | head -1` + cp ${TARGET} ./spawner.dll + rm -rf ${TARGET} + cd - + ;; + macos-64) + TARGET=`find $ROOTDIR -name "${CDT_SPWAN_MACOS}" | head -1` + cp -r ${TARGET} ${NCLI_COMMON_LIB} + cd ${NCLI_COMMON_LIB} + jar -xvf ${CDT_SPWAN_LINUX} os/macos/x86_64 + TARGET=`find . -name libspawner.so | head -1` + cp os/macos/x86_64/libspawner.jnilib ./libspawner.so + rm -rf os + cd - + ;; + *) + echo "${TARGET_OS} is not support yet." + exit 1 + ;; + esac + INCLUDING_LIB_SRC_LIST=" org.tizen.common_* org.tizen.common.builder_* @@ -251,48 +291,12 @@ new_native_cli_build() { org.tizen.nativecpp_* org.tizen.nativecpp.template_* " - SRC_LIST_LINUX=" - org.eclipse.cdt.core.linux.x86_* - " - SRC_LIST_WINDOWS=" - org.eclipse.cdt.core.win32_* - " - SRC_LIST_MACOS=" - org.eclipse.cdt.core.macosx_* - " for SRC in ${SRC_LIST} do TARGET=`find $ROOTDIR -name "${SRC}" | head -1` cp -r ${TARGET} ${NCLI_NATIVE_LIB} done - case ${TARGET_OS} in - ubuntu-32|ubuntu-64) - for SRC in ${SRC_LIST_LINUX} - do - TARGET=`find $ROOTDIR -name "${SRC}" | head -1` - cp -r ${TARGET} ${NCLI_NATIVE_LIB} - done - ;; - windows-32|windows-64) - for SRC in ${SRC_LIST_WINDOWS} - do - TARGET=`find $ROOTDIR -name "${SRC}" | head -1` - cp -r ${TARGET} ${NCLI_NATIVE_LIB} - done - ;; - macos-64) - for SRC in ${SRC_LIST_MACOS} - do - TARGET=`find $ROOTDIR -name "${SRC}" | head -1` - cp -r ${TARGET} ${NCLI_NATIVE_LIB} - done - ;; - *) - echo "${TARGET_OS} is not support yet." - exit 1 - ;; - esac } new_cli_jar_build() @@ -303,7 +307,7 @@ new_cli_jar_build() #get build-dependency libraries mkdir -p ${NCLI_LIB} - cp -r ${NCLI_COMMON_LIB}/*.jar ${NCLI_LIB} + cp -r ${NCLI_COMMON_LIB}/*.* ${NCLI_LIB} cp -r ${NCLI_WEB_LIB}/*.jar ${NCLI_LIB} cp -r ${NCLI_NATIVE_LIB}/*.jar ${NCLI_LIB} diff --git a/package/new-common-cli.install.linux b/package/new-common-cli.install.linux index 2bb4c86..b048c80 100644 --- a/package/new-common-cli.install.linux +++ b/package/new-common-cli.install.linux @@ -11,24 +11,22 @@ SOURCE_TIZEN_COMPLETION="source ${TIZEN_COMPLETION_SCRIPT}" CLI_LIB_PATH=${TOOLS_PATH}/ide/lib-ncli LOG_CONFIG_PATH=${TOOLS_PATH}/ide/conf-ncli -SPAWN_LIB_PATH=${CLI_LIB_PATH}/os/linux/x86_64 LOG4J_CONFIG=${LOG_CONFIG_PATH}/log4j-progress.xml BASH_RC=~/.bashrc sed -i "s:LOG_CONFIG_PATH:\"${LOG_CONFIG_PATH}\":g" ${TIZEN_COMPLETION_SCRIPT} sed -i "s:CLI_LIB_PATH:\"${CLI_LIB_PATH}\":g" ${TIZEN_COMPLETION_SCRIPT} -sed -i "s:SPAWN_LIB_PATH:\"${SPAWN_LIB_PATH}\":g" ${TIZEN_COMPLETION_SCRIPT} sed -i "s:CLI_LOG_FILE:\"${CLI_LOG_FILE}\":g" ${LOG4J_CONFIG} ln -s ${TIZEN_NEWCLI_SH} ${TIZEN_COMPLETION_LINK_PATH} if [ -f "${BASH_RC}" ]; then if [ -z "$(grep "${SOURCE_TIZEN_COMPLETION}" "${BASH_RC}")" ]; then - echo -e "\n# Enable programmable tizen cli auto completion features.\n""${SOURCE_TIZEN_COMPLETION}" >> "${BASH_RC}" + echo -e "${SOURCE_TIZEN_COMPLETION}" >> "${BASH_RC}" fi else - echo -e "\n# Enable programmable tizen cli auto completion features.\n""${SOURCE_TIZEN_COMPLETION}" >> "${BASH_RC}" + echo -e "${SOURCE_TIZEN_COMPLETION}" >> "${BASH_RC}" fi exit 0 diff --git a/package/new-common-cli.install.windows b/package/new-common-cli.install.windows new file mode 100644 index 0000000..00880d7 --- /dev/null +++ b/package/new-common-cli.install.windows @@ -0,0 +1,17 @@ +@echo off +set TIZEN_SDK_INSTALL_PATH=%INSTALLED_PATH% +set TOOLS_PATH=%TIZEN_SDK_INSTALL_PATH%\tools + +set TEMP_SCRIPT="%TEMP%\%RANDOM%-%RANDOM%-%RANDOM%-%RANDOM%.vbs" +set HOME_PATH=%TOOLS_PATH%\ide\bin +set LINK_FILE=%HOME_PATH%\tizen.lnk +set TARGET_FILE=%HOME_PATH%\tizen.bat + +echo Set oWS = WScript.CreateObject("WScript.Shell") >> %TEMP_SCRIPT% +echo LinkFile = "%LINK_FILE%" >> %TEMP_SCRIPT% +echo Set Link = oWS.CreateShortcut(LinkFile) >> %TEMP_SCRIPT% +echo Link.TargetPath = "%TARGET_FILE%" >> %TEMP_SCRIPT% +echo Link.Save >> %TEMP_SCRIPT% + +cscript /nologo %TEMP_SCRIPT% +del %TEMP_SCRIPT% diff --git a/package/new-native-cli.install.darwin b/package/new-native-cli.install.darwin deleted file mode 100644 index c12dbc5..0000000 --- a/package/new-native-cli.install.darwin +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -TIZEN_SDK_INSTALL_PATH=${INSTALLED_PATH} -TOOLS_PATH=${TIZEN_SDK_INSTALL_PATH}/tools -CLI_PATH=${TOOLS_PATH}/ide/lib-ncli - -cd ${CLI_PATH} -jar -xf org.eclipse.cdt.core.macos*.jar os - -exit 0 diff --git a/package/new-native-cli.install.linux b/package/new-native-cli.install.linux deleted file mode 100644 index f991a68..0000000 --- a/package/new-native-cli.install.linux +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -TIZEN_SDK_INSTALL_PATH=${INSTALLED_PATH} -TOOLS_PATH=${TIZEN_SDK_INSTALL_PATH}/tools -CLI_PATH=${TOOLS_PATH}/ide/lib-ncli - -cd ${CLI_PATH} -jar -xf org.eclipse.cdt.core.linux.x86_64*.jar os - -exit 0 -- 2.7.4