glom r1436 - in trunk: . glom
- From: arminb svn gnome org
- To: svn-commits-list gnome org
- Subject: glom r1436 - in trunk: . glom
- Date: Sat, 23 Feb 2008 11:45:32 +0000 (GMT)
Author: arminb
Date: Sat Feb 23 11:45:32 2008
New Revision: 1436
URL: http://svn.gnome.org/viewvc/glom?rev=1436&view=rev
Log:
2008-02-23 Armin Burgmeier <armin openismus com>
* glom/main.cc: Add the bin/ subdirectory to the PATH environment
variable on Windows. This is where the gspawn-win32-helper.exe program
required for g_spawn* is installed, and g_spawn* requires it to be in
somewhere in PATH. This fixes self-hosting on machines where
gspawn-win32-helper.exe is not already in the PATH.
Modified:
trunk/ChangeLog
trunk/glom/main.cc
Modified: trunk/glom/main.cc
==============================================================================
--- trunk/glom/main.cc (original)
+++ trunk/glom/main.cc Sat Feb 23 11:45:32 2008
@@ -86,6 +86,34 @@
int
main(int argc, char* argv[])
{
+ // TODO: I am not sure why, but this does not work. PYTHONPATH is set
+ // correctly according to getenv(), but python still does not look in it.
+ // For now, the installer installs all the python stuff directly into the
+ // application directory, although I would like to move this to a python/
+ // subdirectory.
+#if 0
+#ifdef G_OS_WIN32
+ // Set PYTHONPATH to point to python/ because that's where the installer
+ // installs all the python modules into.
+ gchar* python_path = g_win32_get_package_installation_subdirectory(NULL, NULL, "python");
+ std::string current_path = Glib::getenv("PYTHONPATH");
+ if(current_path.empty()) current_path = python_path;
+ else current_path += (std::string(";") + python_path); // PATH-like variables are separated by ; on Windows because : is a valid character in paths.
+ g_free(python_path);
+ std::cout << "Setting " << current_path << ":" << std::endl;
+ std::cout << Glib::setenv("PYTHONPATH", current_path) << std::endl;
+ std::cout << getenv("PYTHONPATH") << std::endl;
+#endif
+#endif
+
+#ifdef G_OS_WIN32
+ // Add glom's bin directory to PATH so that g_spawn* finds the
+ // gspawn-win32-helper.exe helper program. The installer installs it there.
+ gchar* app_dir = g_win32_get_package_installation_subdirectory(NULL, NULL, "bin");
+ Glib::setenv("PATH", Glib::getenv("PATH") + ";" + app_dir);
+ g_free(app_dir);
+#endif
+
#ifdef G_OS_WIN32
// Load translations relative to glom.exe on Windows
gchar* dir = g_win32_get_package_installation_subdirectory(NULL, NULL, "lib/locale");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]