Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug1058231 into lp:zorba

2012-12-13 Thread Chris Hillery
This proposals has been replaced by the following:

https://code.launchpad.net/~zorba-coders/zorba/bug1058231b/+merge/139556

Therefore I'm marking this one as Rejected to clean it off the list.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug1058231/+merge/129531
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug1058231 into lp:zorba

2012-12-13 Thread Chris Hillery
The proposal to merge lp:~zorba-coders/zorba/bug1058231 into lp:zorba has been 
updated.

Status: Needs review = Rejected

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug1058231/+merge/129531
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug1058231/+merge/129531
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug1058231 into lp:zorba

2012-11-26 Thread Chris Hillery
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/bug1058231/+merge/129531
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug1058231 into lp:zorba

2012-11-26 Thread Matthias Brantner
Review: Needs Fixing

- bad include +#include ../include/zorba/config.h

- it seems like entire files have been removed and added (potential newline 
problem)?

- set_env_var seems to be a bad name for the function. What the function really 
does is get_env_var, right?
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug1058231/+merge/129531
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug1058231 into lp:zorba

2012-11-26 Thread Till Westmann
 The removed/added problem is because Rodolfo initially deleted them, but then
 put them back based on my earlier comment.  Unfortunately I don't know of a
 way to fix this.

The way I usually solve this (if the history of the branch is not terribly 
relevant) is to create a patch from the branch, apply the patch to the trunk, 
and push it to a new branch. This loses the history in the branch, but gets 
better diff in the history of the trunk.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug1058231/+merge/129531
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug1058231 into lp:zorba

2012-11-13 Thread Rodolfo Ochoa
sorry for the delay, is now on config.h
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug1058231/+merge/129531
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug1058231 into lp:zorba

2012-11-06 Thread Chris Hillery
The changes all look good to me now; thanks.

However, I just noticed something else that might be an issue for 28msec. 
Matthias, this code changes the magic Windows behaviour of finding modules 
based on the install location of Zorba. It used to be that it would find the 
location of zorba.exe. Now it bases it on the location of 
zorba_simplestore.dll. However: For Sausalito, the library isn't named 
zorba_simplestore, is it? Is there a programmatic way of determining the 
DLL's name, based I guess on the current value of ZORBA_STORE_NAME? I guess we 
might want something like

#cmakedefine ZORBA_STORE_NAME

in config.h.cmake ?
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug1058231/+merge/129531
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug1058231 into lp:zorba

2012-11-06 Thread Matthias Brantner
 The changes all look good to me now; thanks.
 
 However, I just noticed something else that might be an issue for 28msec.
 Matthias, this code changes the magic Windows behaviour of finding modules
 based on the install location of Zorba. It used to be that it would find the
 location of zorba.exe. Now it bases it on the location of
 zorba_simplestore.dll. However: For Sausalito, the library isn't named
 zorba_simplestore, is it? Is there a programmatic way of determining the
 DLL's name, based I guess on the current value of ZORBA_STORE_NAME? I guess we
 might want something like
 
 #cmakedefine ZORBA_STORE_NAME
 
 in config.h.cmake ?
Yes, nothing should depend on the name of the library.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug1058231/+merge/129531
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug1058231 into lp:zorba

2012-11-05 Thread Rodolfo Ochoa
PathUtil has been restored and fixed.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug1058231/+merge/129531
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug1058231 into lp:zorba

2012-10-30 Thread Chris Hillery
Review: Needs Fixing

You can't remove path_util.cpp - it also handles the --lib-path and --uri-path 
command-line options, not just the environment variables. So you can get rid of 
getPathFromEnvironment(), and the parts of setPathsOnContext() which reference 
lEnvStr, but the rest has to stay, including the call to setPathsOnContext() in 
zorbacmd.cpp.

(Unrelated to your change, but it does appear that concatenatePaths() is unused 
code, so you could remove that too.)
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug1058231/+merge/129531
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug1058231 into lp:zorba

2012-10-23 Thread Chris Hillery
Review: Needs Fixing

I think you need to remove the corresponding getenv code from 
bin/path_util.cpp, or else it'll get executed twice when running zorba.exe.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug1058231/+merge/129531
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug1058231 into lp:zorba

2012-10-17 Thread Chris Hillery
Review: Needs Information

I'm assuming that the main fix here works. However I'm a bit confused why it 
matters whether we find the path to zorba.exe or zorba_simplestore.dll, because 
as far as I know they should always be in the same directory. So to satisfy my 
curiosity, why is this change necessary?

I also would like to know the use case for the two new environment variables. 
It seems to me that if we need those, we should need them on all platforms, not 
just Windows. Also, ZORBA_URI_PATH and ZORBA_LIB_PATH *are* already used by 
zorba.exe to do basically the same thing, so why is it necessary to handle them 
in root_static_context.cpp as well?
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug1058231/+merge/129531
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug1058231 into lp:zorba

2012-10-17 Thread Rodolfo Ochoa
1-
Because Zorba Processor is not zorba.exe, is zorba_simplestore.dll, so, when 
you make a call from Java, the actual process is c:\...\java.exe calling 
zorba_simplestore among other dll's, so the paths come from java.exe.

2-
Same principle will apply here, when Zorba is called from other languages or 
environments this variables will not be considered and Zorba will fail 
miserably trying to get the URI and LIB path.

All this apply for windows, I think the same principle will apply for linux, 
but didn't added because this was a windows specific problem, do you think is 
better to add them for linux?

-- 
https://code.launchpad.net/~zorba-coders/zorba/bug1058231/+merge/129531
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug1058231 into lp:zorba

2012-10-17 Thread Chris Hillery
Ah, OK, thanks for the explanation.

As for whether this should be done cross-platform:

1. There is no way that we have discovered to determine the path to 
zorba_simplestore (or zorba itself) on Linux or Mac, so there is no equivalent 
problem to be solved there (yet?).

2. It would be best if the environment variables were handled cross-platform 
and in one place. If nothing else, with your change I believe that entries in 
ZORBA_URI_PATH will be on the URI path twice, since they're added to 
root_static_context as well as to the query context by zorba.exe. So yes, if 
you could merge the code you've added with the equivalent code in 
bin/path_util.cpp, I think that would be correct.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug1058231/+merge/129531
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug1058231 into lp:zorba

2012-10-12 Thread Rodolfo Ochoa
Rodolfo Ochoa has proposed merging lp:~zorba-coders/zorba/bug1058231 into 
lp:zorba.

Commit message:
The problem was in the path from the process, instead of using the path of 
zorba_simplestore.dll Zorba gather the path of the main EXE.

This problem is not only from WinXP.

Requested reviews:
  Cezar Andrei (cezar-andrei)
  Chris Hillery (ceejatec)
Related bugs:
  Bug #1058231 in Zorba: CanĀ“t get Zorba Java API to work under Win XP
  https://bugs.launchpad.net/zorba/+bug/1058231

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug1058231/+merge/129531

The problem was in the path from the process, instead of using the path of 
zorba_simplestore.dll Zorba gather the path of the main EXE.

This problem is not only from WinXP.

-- 
https://code.launchpad.net/~zorba-coders/zorba/bug1058231/+merge/129531
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/compiler/expression/pragma.cpp'
--- src/compiler/expression/pragma.cpp	2012-06-29 17:19:26 +
+++ src/compiler/expression/pragma.cpp	2012-10-12 22:54:28 +
@@ -13,6 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+#include stdafx.h
 #include pragma.h
 #include zorbatypes/rchandle.h
 #include store/api/item.h

=== modified file 'src/context/root_static_context.cpp'
--- src/context/root_static_context.cpp	2012-10-08 12:09:36 +
+++ src/context/root_static_context.cpp	2012-10-12 22:54:28 +
@@ -130,10 +130,12 @@
   std::vectorzstring lRootURIPath;
   std::vectorzstring lRootLibPath;
 #ifdef WIN32
+  #define MAX_VAR_SIZE 32767
   // compute the relative path to zorba_simplestore.dll (this dll)
   WCHAR  wdll_path[1024];
   DWORD dll_path_size;
-  dll_path_size = GetModuleFileNameW(NULL,
+  HMODULE h_module = GetModuleHandleW (Lzorba_simplestore);
+  dll_path_size = GetModuleFileNameW(h_module,
  wdll_path,
  sizeof(wdll_path)/sizeof(wdll_path[0]));
   if(dll_path_size)
@@ -166,7 +168,65 @@
   }
 }
   }
+
+  // get a relative path from the environment for URI
+  wchar_t env_var[MAX_VAR_SIZE];
+  DWORD path_size = GetEnvironmentVariableW (LZORBA_URI_DIRS, 
+ env_var,
+ MAX_VAR_SIZE );
+  if (path_size)
+  {
+char  dll_path[MAX_VAR_SIZE];
+WideCharToMultiByte(CP_UTF8,
+0,
+env_var,
+-1,
+dll_path,
+MAX_VAR_SIZE,
+NULL,
+NULL);
+char * str_env = std::strtok(dll_path, ;);
+while (str_env !=NULL) {
+  zstring zorba_env_dir(str_env);
+  if (str_env[strlen(str_env)-1] != '\\')
+  {
+zorba_env_dir.append(\\);
+  }
+  append_to_path(lRootURIPath, zorba_env_dir, zstring(ZORBA_CORE_URI_DIR));
+  append_to_path(lRootURIPath, zorba_env_dir, zstring(ZORBA_NONCORE_URI_DIR));
+  str_env = std::strtok(NULL, ;);
+}
+  }
+
+  // get a relative path from the environment for LIB
+  path_size = GetEnvironmentVariableW (LZORBA_LIB_DIRS, 
+   env_var,
+   MAX_VAR_SIZE );
+  if (path_size)
+  {
+char  dll_path[MAX_VAR_SIZE];
+WideCharToMultiByte(CP_UTF8,
+0,
+env_var,
+-1,
+dll_path,
+MAX_VAR_SIZE,
+NULL,
+NULL);
+char * str_env = std::strtok(dll_path, ;);
+while (str_env !=NULL) {
+  zstring zorba_env_dir(str_env);
+  if (str_env[strlen(str_env)-1] != '\\')
+  {
+zorba_env_dir.append(\\);
+  }
+  append_to_path(lRootLibPath, zorba_env_dir, zstring(ZORBA_CORE_LIB_DIR));
+  append_to_path(lRootLibPath, zorba_env_dir, zstring(ZORBA_NONCORE_LIB_DIR));
+  str_env = std::strtok(NULL, ;);
+}
+  }
 #endif
+
   const char ** lURIPathIter = get_builtin_uri_path();
   for (; *lURIPathIter != 0; ++lURIPathIter)
   {

=== modified file 'src/functions/func_schema_impl.cpp'
--- src/functions/func_schema_impl.cpp	2012-09-30 09:46:56 +
+++ src/functions/func_schema_impl.cpp	2012-10-12 22:54:28 +
@@ -14,6 +14,7 @@
  * limitations under the License.
  */
 
+#include stdafx.h
 #include functions/func_schema.h
 
 #include compiler/expression/expr_base.h

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug1058231 into lp:zorba

2012-10-12 Thread Rodolfo Ochoa
The proposal to merge lp:~zorba-coders/zorba/bug1058231 into lp:zorba has been 
updated.

Commit Message changed to:

The problem was in the path from the process, instead of using the path of 
zorba_simplestore.dll Zorba gather the path of the main EXE.

This problem is not only from WinXP.

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug1058231/+merge/129531
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug1058231/+merge/129531
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp