From: DoHyun Pyun Date: Thu, 7 Jun 2018 07:19:44 +0000 (+0900) Subject: [TBT][iotcon][Change the resource file path for iotcon] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b8a0841a39ad61266b9bf02f2f22bd815ce1c868;p=test%2Ftct%2Fnative%2Fbehavior.git [TBT][iotcon][Change the resource file path for iotcon] Change-Id: Iea466bb00d73144926c088ea011272b3a47ec58f Signed-off-by: DoHyun Pyun --- diff --git a/release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk b/release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk index a708561..6d26bbc 100755 Binary files a/release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk and b/release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk differ diff --git a/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-x86.tpk b/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-x86.tpk index f39eeeb..7074e34 100755 Binary files a/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-x86.tpk and b/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-x86.tpk differ diff --git a/scripts_tpk/tpkbuild.sh b/scripts_tpk/tpkbuild.sh index de5d98c..6d33af9 100755 --- a/scripts_tpk/tpkbuild.sh +++ b/scripts_tpk/tpkbuild.sh @@ -190,14 +190,26 @@ modulearray=(org.tizen.coretbt_dataprovider org.tizen.coretbt_serviceapp org.tiz sdb push $PWD/release/binary-$ARCH/SampleMP3.mp3 /home/$EXECUTION_USER/media/Sounds sdb push $PWD/release/binary-$ARCH/sampleH263.3gp /home/$EXECUTION_USER/media/Videos sdb push $PWD/release/binary-$ARCH/tbt_push_auth.xml /home/$EXECUTION_USER/media/Others - sdb push $PWD/release/binary-$ARCH/iotcon-test-svr-db-client.dat /home/$EXECUTION_USER/media/Others - sdb push $PWD/release/binary-$ARCH/iotcon-test-svr-db-server.dat /home/$EXECUTION_USER/media/Others sdb shell chown $EXECUTION_USER:priv_mediastorage /home/$EXECUTION_USER/media/Images/dog_1024_960.gif sdb shell chown $EXECUTION_USER:priv_mediastorage /home/$EXECUTION_USER/media/Sounds/SampleMP3.mp3 sdb shell chown $EXECUTION_USER:priv_mediastorage /home/$EXECUTION_USER/media/Videos/sampleH263.3gp sdb shell chown $EXECUTION_USER:priv_mediastorage /home/$EXECUTION_USER/media/Others/tbt_push_auth.xml - sdb shell chown $EXECUTION_USER:priv_mediastorage /home/$EXECUTION_USER/media/Others/iotcon-test-svr-db-client.dat - sdb shell chown $EXECUTION_USER:priv_mediastorage /home/$EXECUTION_USER/media/Others/iotcon-test-svr-db-server.dat + + echo $yellow"Pushing iotcon db files" + sdb push $PWD/release/binary-$ARCH/iotcon-test-svr-db-client.dat /home/$EXECUTION_USER/apps_rw/org.tizen.$MOD_NAME/data/ + sdb push $PWD/release/binary-$ARCH/iotcon-test-svr-db-server.dat /home/$EXECUTION_USER/apps_rw/org.tizen.$MOD_NAME/data/ + + sdb shell chown $EXECUTION_USER:5000 /home/$EXECUTION_USER/apps_rw/org.tizen.$MOD_NAME/data/iotcon-test-svr-db-client.dat + sdb shell chown $EXECUTION_USER:5000 /home/$EXECUTION_USER/apps_rw/org.tizen.$MOD_NAME/data/iotcon-test-svr-db-server.dat + sdb shell chmod 777 /home/$EXECUTION_USER/apps_rw/org.tizen.$MOD_NAME/data/iotcon-test-svr-db-client.dat + sdb shell chmod 777 /home/$EXECUTION_USER/apps_rw/org.tizen.$MOD_NAME/data/iotcon-test-svr-db-server.dat + sdb shell chsmack -a "User::App::Shared" /home/$EXECUTION_USER/apps_rw/org.tizen.$MOD_NAME/data + sdb shell chsmack -e "User::App::Shared" /home/$EXECUTION_USER/apps_rw/org.tizen.$MOD_NAME/data + sdb shell chsmack -a "User::App::Shared" /home/$EXECUTION_USER/apps_rw/org.tizen.$MOD_NAME/data/iotcon-test-svr-db-client.dat + sdb shell chsmack -a "User::App::Shared" /home/$EXECUTION_USER/apps_rw/org.tizen.$MOD_NAME/data/iotcon-test-svr-db-server.dat + sdb shell chsmack -e "User::App::Shared" /home/$EXECUTION_USER/apps_rw/org.tizen.$MOD_NAME/data/iotcon-test-svr-db-client.dat + sdb shell chsmack -e "User::App::Shared" /home/$EXECUTION_USER/apps_rw/org.tizen.$MOD_NAME/data/iotcon-test-svr-db-server.dat + echo ""$reset fi sdb root off @@ -238,4 +250,4 @@ elif [ "install" == "$1" ]; then else echo "Entered invalid arguments" helpusage -fi \ No newline at end of file +fi diff --git a/tbtcoreapp/src/view/tbt-iotcon-view.c b/tbtcoreapp/src/view/tbt-iotcon-view.c index 37e646d..3660fd6 100755 --- a/tbtcoreapp/src/view/tbt-iotcon-view.c +++ b/tbtcoreapp/src/view/tbt-iotcon-view.c @@ -30,7 +30,7 @@ #include #include #include - +#include #include "utils/logger.h" #include "utils/config.h" #include "utils/ui-utils.h" @@ -230,7 +230,18 @@ iotcon_view *iotcon_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_I #endif evas_object_show(this->info_list); - char db_file_path[256]={'\0',}; + char db_file_path_server[256]={'\0',}; + char db_file_path_client[256]={'\0',}; + char* pPath = NULL; + pPath = app_get_data_path(); + DBG("pPath %s",pPath); + if(!pPath) + return NULL; + snprintf(db_file_path_server, sizeof(db_file_path_server), "%s%s",pPath,"iotcon-test-svr-db-server.dat"); + DBG("db_file_path_server file set = %s", db_file_path_server); + snprintf(db_file_path_client, sizeof(db_file_path_client), "%s%s",pPath,"iotcon-test-svr-db-client.dat"); + DBG("db_file_path_client file set = %s", db_file_path_client); + free(pPath); if(this->view->tbt_info->apptype == TBT_APP_IOTCON_BASIC_SERVER) { @@ -241,10 +252,7 @@ iotcon_view *iotcon_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_I int ret; - snprintf(db_file_path, sizeof(db_file_path), "%s/%s",TBT_LOGGING_DIR,"iotcon-test-svr-db-server.dat"); - DBG("db_file_path file set = %s", db_file_path); - - ret = iotcon_initialize(db_file_path); + ret = iotcon_initialize(db_file_path_server); RETVM_IF(ret != IOTCON_ERROR_NONE, NULL, "iotcon_initialize error %s", get_iotcon_error(ret)); ret = iotcon_set_device_name("iotcon-test-basic-server"); @@ -269,11 +277,8 @@ iotcon_view *iotcon_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_I Evas_Object *control = add_control_layout(this, this->view->layout); elm_object_part_content_set(this->view->layout, "iotcon_btn", control); - snprintf(db_file_path, sizeof(db_file_path), "%s/%s",TBT_LOGGING_DIR,"iotcon-test-svr-db-client.dat"); - DBG("db_file_path file set = %s", db_file_path); - int ret; - ret = iotcon_initialize(db_file_path); + ret = iotcon_initialize(db_file_path_client); RETVM_IF(ret != IOTCON_ERROR_NONE, NULL, "iotcon_initialize error %s", get_iotcon_error(ret)); ret = iotcon_query_create(&this->query); @@ -286,8 +291,7 @@ iotcon_view *iotcon_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_I RETVM_IF(ret != IOTCON_ERROR_NONE, NULL, "iotcon_find_resource error %s", get_iotcon_error(ret)); } - - return this; + return this; }