glom r1409 - in trunk: . glom glom/libglom
- From: arminb svn gnome org
- To: svn-commits-list gnome org
- Subject: glom r1409 - in trunk: . glom glom/libglom
- Date: Sun, 3 Feb 2008 21:42:01 +0000 (GMT)
Author: arminb
Date: Sun Feb 3 21:42:01 2008
New Revision: 1409
URL: http://svn.gnome.org/viewvc/glom?rev=1409&view=rev
Log:
2008-02-03 Armin Burgmeier <armin openismus com>
* glom/libglom/glade_utils.h:
* glom/main.cc: Adjust paths of glade files and locales to match the
path the (yet to come) installer installs them.
* glom/libglom/connectionpool.cc: Pass the -L flag with a path
relative to the glom executable (where the installer will install it)
to initdb on Windows so that it finds necessary files that are
normally available in /usr/share/postgresql/.
Modified:
trunk/ChangeLog
trunk/glom/libglom/connectionpool.cc
trunk/glom/libglom/glade_utils.h
trunk/glom/main.cc
Modified: trunk/glom/libglom/connectionpool.cc
==============================================================================
--- trunk/glom/libglom/connectionpool.cc (original)
+++ trunk/glom/libglom/connectionpool.cc Sun Feb 3 21:42:01 2008
@@ -980,8 +980,21 @@
const std::string temp_pwfile = Glib::build_filename(Glib::get_tmp_dir(), "glom_initdb_pwfile");
create_text_file(temp_pwfile, get_password());
+ // We need to specify the path where initdb should look for shared files. If
+ // we don't do this, it defaults to /usr/local/pgsql/share. The installer
+ // installs the necessary files to $glomdir/share/postgresql which is what
+ // we pass here.
+#ifdef G_OS_WIN32
+ gchar* share_path_ = g_win32_get_package_installation_subdirectory(NULL, NULL, "share/postgresql");
+ const std::string share_path = std::string(" -L \"") + share_path_ + "\"";
+ g_free(share_path_);
+#else
+ const std::string share_path;
+#endif
+
const std::string command_initdb = Glib::shell_quote(get_path_to_postgres_executable("initdb")) + " -D \"" + dbdir_data + "\"" +
- " -U " + username + " --pwfile=\"" + temp_pwfile + "\"";
+ " -U " + username + " --pwfile=\"" + temp_pwfile + "\"" + share_path;
+
//Note that --pwfile takes the password from the first line of a file. It's an alternative to supplying it when prompted on stdin.
const bool result = Glom::Spawn::execute_command_line_and_wait(command_initdb, _("Creating Database Data"));
if(!result)
Modified: trunk/glom/libglom/glade_utils.h
==============================================================================
--- trunk/glom/libglom/glade_utils.h (original)
+++ trunk/glom/libglom/glade_utils.h Sun Feb 3 21:42:01 2008
@@ -33,7 +33,7 @@
inline std::string get_glade_file_path(const std::string& filename)
{
#ifdef G_OS_WIN32
- gchar* packdir = g_win32_get_package_installation_directory(NULL, NULL);
+ gchar* packdir = g_win32_get_package_installation_subdirectory(NULL, NULL, "share/glom/glade");
std::string result = Glib::build_filename(packdir, filename);
g_free(packdir);
return result;
Modified: trunk/glom/main.cc
==============================================================================
--- trunk/glom/main.cc (original)
+++ trunk/glom/main.cc Sun Feb 3 21:42:01 2008
@@ -88,7 +88,7 @@
{
#ifdef G_OS_WIN32
// Load translations relative to glom.exe on Windows
- gchar* dir = g_win32_get_package_installation_subdirectory(NULL, NULL, "locale");
+ gchar* dir = g_win32_get_package_installation_subdirectory(NULL, NULL, "lib/locale");
bindtextdomain(GETTEXT_PACKAGE, dir);
g_free(dir);
#else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]