Merge lp:~zorba-coders/zorba/bug1058231 into lp:zorba

Proposed by Rodolfo Ochoa
Status: Rejected
Rejected by: Chris Hillery
Proposed branch: lp:~zorba-coders/zorba/bug1058231
Merge into: lp:zorba
Diff against target: 497 lines (+88/-176)
7 files modified
bin/path_util.cpp (+0/-130)
bin/path_util.h (+0/-45)
include/zorba/config.h.cmake (+2/-0)
src/compiler/expression/expr_clone.cpp (+1/-0)
src/context/root_static_context.cpp (+82/-1)
src/functions/func_schema_impl.cpp (+1/-0)
test/rbkt/modules/java/CMakeLists.txt (+2/-0)
To merge this branch: bzr merge lp:~zorba-coders/zorba/bug1058231
Reviewer Review Type Date Requested Status
Matthias Brantner Needs Fixing
Chris Hillery Approve
Rodolfo Ochoa Pending
Review via email: mp+129531@code.launchpad.net

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.

Description of the change

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.

To post a comment you must log in.
lp:~zorba-coders/zorba/bug1058231 updated
11091. By Rodolfo Ochoa

Changing DIRS to PATH

Revision history for this message
Chris Hillery (ceejatec) wrote :

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?

review: Needs Information
Revision history for this message
Rodolfo Ochoa (rodolfo-ochoa) wrote :

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?

Revision history for this message
Chris Hillery (ceejatec) wrote :

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.

lp:~zorba-coders/zorba/bug1058231 updated
11092. By Rodolfo Ochoa

bringing lib/uri env vars to root static context in linux

11093. By Rodolfo Ochoa

Merge from branch

11094. By Rodolfo Ochoa

Changing the order of paths, env vars at the end

Revision history for this message
Chris Hillery (ceejatec) wrote :

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.

review: Needs Fixing
lp:~zorba-coders/zorba/bug1058231 updated
11095. By Rodolfo Ochoa

- Removing PathUtil from CMD
- Env Var seeking and setting is now optimized

11096. By Rodolfo Ochoa

Erasing debugging code

11097. By Rodolfo Ochoa

Removing path_util.cpp, not used anymore

Revision history for this message
Chris Hillery (ceejatec) wrote :

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.)

review: Needs Fixing
lp:~zorba-coders/zorba/bug1058231 updated
11098. By Rodolfo Ochoa

Merge from trunk

11099. By Rodolfo Ochoa

Removing only Environment Variables from PathUtil Class

Revision history for this message
Rodolfo Ochoa (rodolfo-ochoa) wrote :

PathUtil has been restored and fixed.

Revision history for this message
Chris Hillery (ceejatec) wrote :

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 ?

Revision history for this message
Matthias Brantner (matthias-brantner) wrote :

> 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.

lp:~zorba-coders/zorba/bug1058231 updated
11100. By Rodolfo Ochoa

Moving tests to folder tests

11101. By Rodolfo Ochoa

Moving simplestore.dll name to config.h

Revision history for this message
Rodolfo Ochoa (rodolfo-ochoa) wrote :

sorry for the delay, is now on config.h

lp:~zorba-coders/zorba/bug1058231 updated
11102. By Chris Hillery

Restoring http_resolution feature (lost in merge from trunk).

11103. By Chris Hillery

Merge from trunk.

Revision history for this message
Chris Hillery (ceejatec) :
review: Approve
Revision history for this message
Matthias Brantner (matthias-brantner) wrote :

- 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?

review: Needs Fixing
Revision history for this message
Chris Hillery (ceejatec) wrote :

Good catch on the #include. Should just be #include <zorba/config.h> .

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.

As for the function name, I don't care much, but append_from_env_vars() would probably be most accurate.

Revision history for this message
Till Westmann (tillw) wrote :

> 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.

Revision history for this message
Chris Hillery (ceejatec) wrote :

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.

Unmerged revisions

11103. By Chris Hillery

Merge from trunk.

11102. By Chris Hillery

Restoring http_resolution feature (lost in merge from trunk).

11101. By Rodolfo Ochoa

Moving simplestore.dll name to config.h

11100. By Rodolfo Ochoa

Moving tests to folder tests

11099. By Rodolfo Ochoa

Removing only Environment Variables from PathUtil Class

11098. By Rodolfo Ochoa

Merge from trunk

11097. By Rodolfo Ochoa

Removing path_util.cpp, not used anymore

11096. By Rodolfo Ochoa

Erasing debugging code

11095. By Rodolfo Ochoa

- Removing PathUtil from CMD
- Env Var seeking and setting is now optimized

11094. By Rodolfo Ochoa

Changing the order of paths, env vars at the end

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'bin/path_util.cpp'
2--- bin/path_util.cpp 1970-01-01 00:00:00 +0000
3+++ bin/path_util.cpp 2012-11-27 00:19:21 +0000
4@@ -0,0 +1,85 @@
5+/*
6+ * Copyright 2006-2008 The FLWOR Foundation.
7+ *
8+ * Licensed under the Apache License, Version 2.0 (the "License");
9+ * you may not use this file except in compliance with the License.
10+ * You may obtain a copy of the License at
11+ *
12+ * http://www.apache.org/licenses/LICENSE-2.0
13+ *
14+ * Unless required by applicable law or agreed to in writing, software
15+ * distributed under the License is distributed on an "AS IS" BASIS,
16+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+ * See the License for the specific language governing permissions and
18+ * limitations under the License.
19+ */
20+
21+#include "path_util.h"
22+
23+#include <stdlib.h>
24+//#include "zorba/zorba_string.h"
25+#include "zorba/util/path.h"
26+
27+#include "util.h"
28+#include "zorbacmdproperties.h"
29+#include <zorba/static_context.h>
30+
31+namespace zorba {
32+
33+namespace PathUtil {
34+
35+void
36+tokenizePath(
37+ const std::string& aPathStr,
38+ std::vector<String>& aResult)
39+{
40+ std::vector<std::string> lPath;
41+#ifdef WIN32
42+ Util::tokenize(aPathStr, ";", lPath);
43+#else
44+ Util::tokenize(aPathStr, ":", lPath);
45+#endif
46+ for (std::vector<std::string>::iterator lIter = lPath.begin();
47+ lIter != lPath.end(); ++lIter) {
48+ aResult.push_back(*lIter);
49+ }
50+}
51+
52+void
53+setPathsOnContext(
54+ const ZorbaCMDProperties& aProperties,
55+ StaticContext_t& aStaticCtx)
56+{
57+ std::vector<String> lPath;
58+ std::string lPathStr;
59+
60+ // Compute the current working directory to append to all paths.
61+ filesystem_path lCWD;
62+
63+ // setModulePaths() *overwrites* the URI path and lib path, so there's no
64+ // sense in calling both. So if --module-path exists, just use it.
65+ aProperties.getModulePath(lPathStr);
66+ if (lPathStr.length() > 0) {
67+ tokenizePath(lPathStr, lPath);
68+ lPath.push_back(lCWD.get_path());
69+ aStaticCtx->setModulePaths(lPath);
70+ }
71+ else {
72+ // Compute and set URI path
73+ aProperties.getURIPath(lPathStr);
74+ tokenizePath(lPathStr, lPath);
75+ lPath.push_back(lCWD.get_path());
76+ aStaticCtx->setURIPath(lPath);
77+ lPath.clear();
78+
79+ // Compute and set lib path
80+ aProperties.getLibPath(lPathStr);
81+ tokenizePath(lPathStr, lPath);
82+ lPath.push_back(lCWD.get_path());
83+ aStaticCtx->setLibPath(lPath);
84+ }
85+}
86+
87+} /* namespace ModulePath */
88+
89+} /* namespace zorba */
90
91=== removed file 'bin/path_util.cpp'
92--- bin/path_util.cpp 2012-09-19 21:16:15 +0000
93+++ bin/path_util.cpp 1970-01-01 00:00:00 +0000
94@@ -1,130 +0,0 @@
95-/*
96- * Copyright 2006-2008 The FLWOR Foundation.
97- *
98- * Licensed under the Apache License, Version 2.0 (the "License");
99- * you may not use this file except in compliance with the License.
100- * You may obtain a copy of the License at
101- *
102- * http://www.apache.org/licenses/LICENSE-2.0
103- *
104- * Unless required by applicable law or agreed to in writing, software
105- * distributed under the License is distributed on an "AS IS" BASIS,
106- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
107- * See the License for the specific language governing permissions and
108- * limitations under the License.
109- */
110-
111-#include "path_util.h"
112-
113-#include <stdlib.h>
114-//#include "zorba/zorba_string.h"
115-#include "zorba/util/path.h"
116-
117-#include "util.h"
118-#include "zorbacmdproperties.h"
119-#include <zorba/static_context.h>
120-
121-namespace zorba {
122-
123-namespace PathUtil {
124-
125-static std::string
126-getPathFromEnvironment(std::string const& aEnvVar)
127-{
128-#ifdef WIN32
129- char* lBuffer;
130- size_t lLen=0;
131- errno_t lErr = getenv_s(&lLen, NULL, 0, aEnvVar.c_str());
132- if (lErr || !lLen) return "";
133- lBuffer = (char*)malloc(lLen * sizeof(char));
134- if (!lBuffer) return "";
135- getenv_s(&lLen, lBuffer, lLen, aEnvVar.c_str());
136- std::string lRes(lBuffer);
137- free(lBuffer);
138- return lRes;
139-#else
140- const char* lEnvValue = getenv(aEnvVar.c_str());
141- return lEnvValue != 0 ? lEnvValue : "";
142-#endif
143-}
144-
145-
146-void
147-tokenizePath(
148- const std::string& aPathStr,
149- std::vector<String>& aResult)
150-{
151- std::vector<std::string> lPath;
152-#ifdef WIN32
153- Util::tokenize(aPathStr, ";", lPath);
154-#else
155- Util::tokenize(aPathStr, ":", lPath);
156-#endif
157- for (std::vector<std::string>::iterator lIter = lPath.begin();
158- lIter != lPath.end(); ++lIter) {
159- aResult.push_back(*lIter);
160- }
161-}
162-
163-
164-String
165-concatenatePaths( const std::vector<String>& aPathList)
166-{
167- String delimiter(filesystem_path::get_path_separator());
168-
169- String lResult;
170- for (std::vector<String>::const_iterator lIter = aPathList.begin();
171- lIter != aPathList.end(); ++lIter)
172- {
173- lResult += delimiter + *lIter;
174- }
175-
176- return lResult;
177-}
178-
179-
180-void
181-setPathsOnContext(
182- const ZorbaCMDProperties& aProperties,
183- StaticContext_t& aStaticCtx)
184-{
185- std::vector<String> lPath;
186- std::string lPathStr, lEnvStr;
187-
188- // Compute the current working directory to append to all paths.
189- filesystem_path lCWD;
190-
191- // setModulePaths() *overwrites* the URI path and lib path, so there's no
192- // sense in calling both. So if either --module-path or ZORBA_MODULE_PATH
193- // exists, just use those.
194- aProperties.getModulePath(lPathStr);
195- lEnvStr = getPathFromEnvironment("ZORBA_MODULE_PATH");
196- if (lPathStr.length() > 0 || lEnvStr.length() > 0) {
197- tokenizePath(lPathStr, lPath);
198- tokenizePath(lEnvStr, lPath);
199- lPath.push_back(lCWD.get_path());
200- aStaticCtx->setModulePaths(lPath);
201- }
202- else {
203- // Compute and set URI path
204- aProperties.getURIPath(lPathStr);
205- tokenizePath(lPathStr, lPath);
206- lEnvStr = getPathFromEnvironment("ZORBA_URI_PATH");
207- tokenizePath(lEnvStr, lPath);
208- lPath.push_back(lCWD.get_path());
209- aStaticCtx->setURIPath(lPath);
210- lPath.clear();
211-
212- // Compute and set lib path
213- aProperties.getLibPath(lPathStr);
214- tokenizePath(lPathStr, lPath);
215- lPath.push_back(lCWD.get_path());
216- lEnvStr = getPathFromEnvironment("ZORBA_LIB_PATH");
217- tokenizePath(lEnvStr, lPath);
218- aStaticCtx->setLibPath(lPath);
219- }
220-}
221-
222-} /* namespace ModulePath */
223-
224-} /* namespace zorba */
225
226=== added file 'bin/path_util.h'
227--- bin/path_util.h 1970-01-01 00:00:00 +0000
228+++ bin/path_util.h 2012-11-27 00:19:21 +0000
229@@ -0,0 +1,41 @@
230+/*
231+ * Copyright 2006-2008 The FLWOR Foundation.
232+ *
233+ * Licensed under the Apache License, Version 2.0 (the "License");
234+ * you may not use this file except in compliance with the License.
235+ * You may obtain a copy of the License at
236+ *
237+ * http://www.apache.org/licenses/LICENSE-2.0
238+ *
239+ * Unless required by applicable law or agreed to in writing, software
240+ * distributed under the License is distributed on an "AS IS" BASIS,
241+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
242+ * See the License for the specific language governing permissions and
243+ * limitations under the License.
244+ */
245+#ifndef ZORBA_MODULE_PATH_H
246+#define ZORBA_MODULE_PATH_H
247+
248+#include <vector>
249+#include <string>
250+#include <zorba/api_shared_types.h>
251+
252+class ZorbaCMDProperties;
253+
254+namespace zorba {
255+
256+ class String;
257+
258+ namespace PathUtil {
259+
260+ void
261+ setPathsOnContext(const ZorbaCMDProperties& aProperties,
262+ zorba::StaticContext_t& aStaticCtx);
263+
264+ void
265+ tokenizePath(const std::string& aPathStr, std::vector<String>& aResult);
266+
267+ }
268+} /* namespace zorba */
269+
270+#endif
271
272=== removed file 'bin/path_util.h'
273--- bin/path_util.h 2012-09-19 21:16:15 +0000
274+++ bin/path_util.h 1970-01-01 00:00:00 +0000
275@@ -1,45 +0,0 @@
276-/*
277- * Copyright 2006-2008 The FLWOR Foundation.
278- *
279- * Licensed under the Apache License, Version 2.0 (the "License");
280- * you may not use this file except in compliance with the License.
281- * You may obtain a copy of the License at
282- *
283- * http://www.apache.org/licenses/LICENSE-2.0
284- *
285- * Unless required by applicable law or agreed to in writing, software
286- * distributed under the License is distributed on an "AS IS" BASIS,
287- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
288- * See the License for the specific language governing permissions and
289- * limitations under the License.
290- */
291-#ifndef ZORBA_MODULE_PATH_H
292-#define ZORBA_MODULE_PATH_H
293-
294-#include <vector>
295-#include <string>
296-#include <zorba/api_shared_types.h>
297-
298-class ZorbaCMDProperties;
299-
300-namespace zorba {
301-
302- class String;
303-
304- namespace PathUtil {
305-
306- void
307- setPathsOnContext(const ZorbaCMDProperties& aProperties,
308- zorba::StaticContext_t& aStaticCtx);
309-
310- void
311- tokenizePath(const std::string& aPathStr, std::vector<String>& aResult);
312-
313-
314- String
315- concatenatePaths( const std::vector<String>& aPathList);
316-
317- }
318-} /* namespace zorba */
319-
320-#endif
321
322=== modified file 'include/zorba/config.h.cmake'
323--- include/zorba/config.h.cmake 2012-09-19 21:16:15 +0000
324+++ include/zorba/config.h.cmake 2012-11-27 00:19:21 +0000
325@@ -160,6 +160,8 @@
326
327 ////////// Zorba //////////////////////////////////////////////////////////////
328
329+#cmakedefine ZORBA_STORE_NAME "zorba_${ZORBA_STORE_NAME}"
330+
331 // Version
332 #define ZORBA_VERSION "${ZORBA_VERSION}"
333 #define ZORBA_MAJOR_NUMBER ${ZORBA_MAJOR_NUMBER}
334
335=== modified file 'src/compiler/expression/expr_clone.cpp'
336--- src/compiler/expression/expr_clone.cpp 2012-10-24 11:32:56 +0000
337+++ src/compiler/expression/expr_clone.cpp 2012-11-27 00:19:21 +0000
338@@ -14,6 +14,7 @@
339 * limitations under the License.
340 */
341
342+#include "stdafx.h"
343 #include "compiler/expression/expr_base.h"
344 #include "compiler/expression/update_exprs.h"
345 #include "compiler/expression/expr.h"
346
347=== modified file 'src/context/root_static_context.cpp'
348--- src/context/root_static_context.cpp 2012-11-06 10:11:37 +0000
349+++ src/context/root_static_context.cpp 2012-11-27 00:19:21 +0000
350@@ -31,11 +31,19 @@
351
352 #include "store/api/item_factory.h"
353
354+#ifdef WIN32
355+#include "../include/zorba/config.h"
356+#endif WIN32
357+
358+
359+// DEFINE ENVIRONMENT VARIABLES
360 namespace zorba
361 {
362
363
364 #ifdef WIN32
365+#define MAX_VAR_SIZE 32767
366+
367 static void append_to_path(
368 std::vector<zstring>& aPath,
369 zstring& zorba_root,
370@@ -47,6 +55,62 @@
371 full_path.append("\\");
372 aPath.push_back(full_path);
373 }
374+
375+static void set_env_var(
376+ wchar_t const * env_var_name,
377+ std::vector<zstring>& pathsVector,
378+ zstring& core_path,
379+ zstring& noncore_path
380+ )
381+{
382+ wchar_t env_var[MAX_VAR_SIZE];
383+ DWORD path_size;
384+ // get a relative path from the environment for LIB
385+ path_size = GetEnvironmentVariableW (env_var_name,
386+ env_var,
387+ MAX_VAR_SIZE );
388+ if (path_size)
389+ {
390+ char dll_path[MAX_VAR_SIZE];
391+ WideCharToMultiByte(CP_UTF8,
392+ 0,
393+ env_var,
394+ -1,
395+ dll_path,
396+ MAX_VAR_SIZE,
397+ NULL,
398+ NULL);
399+ char * str_env = std::strtok(dll_path, ";");
400+ while (str_env !=NULL) {
401+ zstring zorba_env_dir(str_env);
402+ if (str_env[strlen(str_env)-1] != '\\')
403+ {
404+ zorba_env_dir.append("\\");
405+ }
406+ append_to_path(pathsVector, zorba_env_dir, core_path);
407+ append_to_path(pathsVector, zorba_env_dir, noncore_path);
408+ str_env = std::strtok(NULL, ";");
409+ }
410+ }
411+}
412+#else
413+ static void set_env_var(
414+ char * env_var_name,
415+ std::vector<zstring>& pathsVector
416+ )
417+{
418+ char* dll_path = getenv(env_var_name);
419+ char* str_env = std::strtok(dll_path, ";");
420+ while (str_env !=NULL) {
421+ zstring zorba_env_dir(str_env);
422+ if (str_env[strlen(str_env)-1] != '/')
423+ {
424+ zorba_env_dir.append("/");
425+ }
426+ pathsVector.push_back(zorba_env_dir);
427+ str_env = std::strtok(NULL, ";");
428+ }
429+}
430 #endif
431
432
433@@ -133,7 +197,8 @@
434 // compute the relative path to zorba_simplestore.dll (this dll)
435 WCHAR wdll_path[1024];
436 DWORD dll_path_size;
437- dll_path_size = GetModuleFileNameW(NULL,
438+ HMODULE h_module = GetModuleHandleW (_T(ZORBA_STORE_NAME));
439+ dll_path_size = GetModuleFileNameW(h_module,
440 wdll_path,
441 sizeof(wdll_path)/sizeof(wdll_path[0]));
442 if(dll_path_size)
443@@ -167,6 +232,7 @@
444 }
445 }
446 #endif
447+
448 const char ** lURIPathIter = get_builtin_uri_path();
449 for (; *lURIPathIter != 0; ++lURIPathIter)
450 {
451@@ -186,6 +252,21 @@
452 set_feature( feature::scripting );
453 set_feature( feature::trace );
454 set_feature( feature::http_resolution );
455+
456+#ifdef WIN32
457+ // get a relative path from the environment for URI
458+ set_env_var (L"ZORBA_MODULE_PATH", lRootURIPath, zstring(ZORBA_CORE_URI_DIR), zstring(ZORBA_NONCORE_URI_DIR));
459+ set_env_var (L"ZORBA_MODULE_PATH", lRootLibPath, zstring(ZORBA_CORE_LIB_DIR), zstring(ZORBA_NONCORE_LIB_DIR));
460+
461+ set_env_var (L"ZORBA_URI_PATH", lRootURIPath, zstring(ZORBA_CORE_URI_DIR), zstring(ZORBA_NONCORE_URI_DIR));
462+ set_env_var (L"ZORBA_LIB_PATH", lRootLibPath, zstring(ZORBA_CORE_LIB_DIR), zstring(ZORBA_NONCORE_LIB_DIR));
463+
464+#else
465+ set_env_var ("ZORBA_URI_PATH", lRootURIPath);
466+ set_env_var ("ZORBA_LIB_PATH", lRootLibPath);
467+
468+#endif
469+
470 }
471
472
473
474=== modified file 'src/functions/func_schema_impl.cpp'
475--- src/functions/func_schema_impl.cpp 2012-10-15 13:35:59 +0000
476+++ src/functions/func_schema_impl.cpp 2012-11-27 00:19:21 +0000
477@@ -14,6 +14,7 @@
478 * limitations under the License.
479 */
480
481+#include "stdafx.h"
482 #include "functions/func_schema.h"
483
484 #include "compiler/expression/expr_base.h"
485
486=== modified file 'test/rbkt/modules/java/CMakeLists.txt'
487--- test/rbkt/modules/java/CMakeLists.txt 2012-10-08 12:09:36 +0000
488+++ test/rbkt/modules/java/CMakeLists.txt 2012-11-27 00:19:21 +0000
489@@ -31,6 +31,8 @@
490 GET_PROPERTY (JavaTest2_JAR_FILE TARGET JavaTest2 PROPERTY JAR_FILE)
491 DECLARE_ZORBA_JAR(FILE ${JavaTest_JAR_FILE} TARGET JavaTest TEST_ONLY)
492 DECLARE_ZORBA_JAR(FILE ${JavaTest2_JAR_FILE} TARGET JavaTest2 TEST_ONLY)
493+ SET_TARGET_PROPERTIES (JavaTest PROPERTIES FOLDER "Tests")
494+ SET_TARGET_PROPERTIES (JavaTest2 PROPERTIES FOLDER "Tests")
495
496 ENDIF (Java_JAVAC_EXECUTABLE)
497 ENDIF (${RESULT} GREATER -1)

Subscribers

People subscribed via source and target branches