summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3686b52)
raw | patch | inline | side by side (parent: 3686b52)
author | theadib <theadib@users.sourceforge.net> | |
Wed, 12 Mar 2008 21:36:44 +0000 (21:36 +0000) | ||
committer | theadib <theadib@users.sourceforge.net> | |
Wed, 12 Mar 2008 21:36:44 +0000 (21:36 +0000) |
build.xml | patch | blob | history | |
src/extension/implementation/script.cpp | patch | blob | history | |
src/main.cpp | patch | blob | history |
diff --git a/build.xml b/build.xml
index 4f675358b566990eb046b76603e4a46b9c2979d2..486a43d865a5cca29d5157483c4bcab643834209 100644 (file)
--- a/build.xml
+++ b/build.xml
<!-- PYTHON -->
<copy file="${gtk}/python/python25.dll" todir="${dist}"/>
<copy file="${gtk}/python/python.exe" todir="${dist}/python"/>
+ <copy file="${gtk}/python/pythonw.exe" todir="${dist}/python"/>
<copy todir="${dist}/python"> <fileset dir="${gtk}/python/Lib"/> </copy>
<copy todir="${dist}/python"> <fileset dir="${gtk}/python/DLLs"/> </copy>
<copy todir="${dist}/python"> <fileset dir="${gtk}/python/Scripts"/> </copy>
index 66383e5f9c58818d8d4516bacbd4c5fb7b7444c8..381b02b084cef9e5a20f246100f1495cec58b8c3 100644 (file)
if (rt.getExeInfo(fullPath, path, exeName)) {
Glib::ustring interpPath = path;
interpPath.append("\\");
- interpPath.append(interpName);
+ interpPath.append(interpNameArg);
interpPath.append("\\");
interpPath.append(interpName);
interpPath.append(".exe");
diff --git a/src/main.cpp b/src/main.cpp
index df62e8d0dbdf62d274d228d4d8ec40951e91dd8c..30bb0a09f00c90dc53f61043b1563b44d239289c 100644 (file)
--- a/src/main.cpp
+++ b/src/main.cpp
static bool needToRecodeParams = true;
gchar* blankParam = "";
+#ifdef WIN32
+static int _win32_set_inkscape_env(char *argv0)
+{
+ CHAR szFullPath[_MAX_PATH];
+
+ CHAR szDrive[_MAX_DRIVE];
+ CHAR szDir[_MAX_DIR];
+ CHAR szFile[_MAX_FNAME];
+ CHAR szExt[_MAX_EXT];
+
+ CHAR tmp[_MAX_EXT];
+
+ if (GetModuleFileName(NULL, szFullPath, sizeof(szFullPath)) == 0) {
+ strcpy(szFullPath, argv0);
+ }
+
+ _splitpath(szFullPath, szDrive, szDir, szFile, szExt);
+ strcpy(szFullPath, szDrive);
+ strcat(szFullPath, szDir);
+
+ strcpy(tmp, "PATH=");
+ strcat(tmp, szFullPath);
+ strcat(tmp, ";");
+ strcat(tmp, szFullPath);
+ strcat(tmp, "python\\");
+ strcat(tmp, ";%PATH%");
+ _putenv(tmp);
+
+ strcpy(tmp, "PYTHONPATH=");
+ strcat(tmp, szFullPath);
+ strcat(tmp, "python\\");
+ _putenv(tmp);
+
+ return 0;
+}
+#endif
+
int
main(int argc, char **argv)
{
#ifdef ENABLE_NLS
#ifdef WIN32
+ _win32_set_inkscape_env(argv[0])
RegistryTool rt;
rt.setPathInfo();
gchar *pathBuf = g_strconcat(g_path_get_dirname(argv[0]), "\\", PACKAGE_LOCALE_DIR, NULL);