summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
authorAdib Taraben <theadib@gmail.com>2008-03-16 21:33:03 +0000
committertheadib <theadib@users.sourceforge.net>2008-03-16 21:33:03 +0000
commit1716d3877d392d7fc9eec0d3227029724ac45510 (patch)
treeebfc61c23f517545efc2882b0c5d1d605894d8bf /src/main.cpp
parentlpe-sketch: deal with empty input. fix bug #201735. (diff)
downloadinkscape-1716d3877d392d7fc9eec0d3227029724ac45510.tar.gz
inkscape-1716d3877d392d7fc9eec0d3227029724ac45510.zip
prepend correctly the PATH and append an existist PYTHONPATH if existing
(bzr r5106)
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp29
1 files changed, 22 insertions, 7 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 7530b854b..d86b60540 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -433,18 +433,33 @@ static int _win32_set_inkscape_env(char *argv0)
strcpy(szFullPath, szDrive);
strcat(szFullPath, szDir);
- strcpy(tmp, "PATH=");
+ char *oldenv = getenv("PATH");
+ strcpy(tmp, "PATH=");
strcat(tmp, szFullPath);
strcat(tmp, ";");
strcat(tmp, szFullPath);
- strcat(tmp, "python\\");
- strcat(tmp, ";%PATH%");
- _putenv(tmp);
-
+ strcat(tmp, "python;");
+ strcat(tmp, szFullPath);
+ strcat(tmp, "perl;");
+ if(oldenv != NULL) {
+ strcat(tmp, ";");
+ strcat(tmp, oldenv);
+ }
+ _putenv(tmp);
+
+ oldenv = getenv("PYTHONPATH");
strcpy(tmp, "PYTHONPATH=");
strcat(tmp, szFullPath);
- strcat(tmp, "python\\");
- _putenv(tmp);
+ strcat(tmp, "python;");
+ strcat(tmp, szFullPath);
+ strcat(tmp, "python\\Lib;");
+ strcat(tmp, szFullPath);
+ strcat(tmp, "python\\DLLs");
+ if(oldenv != NULL) {
+ strcat(tmp, ";");
+ strcat(tmp, oldenv);
+ }
+ _putenv(tmp);
return 0;
}