pass workdir with environment variable, because passing it from arguments doesn't work if the path has a space.

This commit is contained in:
Simon Morlat 2014-12-04 22:20:30 +01:00
parent 381744b0f4
commit 754f4657cd
2 changed files with 5 additions and 1 deletions

View file

@ -1,4 +1,5 @@
export EXTRA_ARGS="--workdir $bundle_res"
#export EXTRA_ARGS="--workdir $bundle_res"
export LINPHONE_WORKDIR="$bundle_res"
export GIO_EXTRA_MODULES="$bundle_lib/gio/modules"
export PANGO_LIBDIR="$bundle_lib"
export PANGO_SYSCONFDIR="$bundle_etc"

View file

@ -2101,6 +2101,7 @@ int main(int argc, char *argv[]){
LpConfig *factory;
const char *db_file;
GError *error=NULL;
const char *tmp;
#if !GLIB_CHECK_VERSION(2, 31, 0)
g_thread_init(NULL);
@ -2110,6 +2111,8 @@ int main(int argc, char *argv[]){
progpath = strdup(argv[0]);
config_file=linphone_gtk_get_config_file(NULL);
workingdir= (tmp=g_getenv("LINPHONE_WORKDIR")) ? g_strdup(tmp) : NULL;
#ifdef WIN32
/*workaround for windows: sometimes LANG is defined to an integer value, not understood by gtk */