Installing Gourmet on WIndows

View: New views
2 Messages — Rating Filter:   Alert me  

Installing Gourmet on WIndows

by ymerejo42 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hi there. I decided to also try setting up an installer for Gourmet for Windows. As it happens, I'm using Win7 Ultimate x64, but I installed the 32-bit versions of all the programs.

I installed all the packages from the Wiki page (based around Python 2.6), then downloaded the source from the SF page (for some reason, I couldn't get the SVN to work. I'm using TortiseSVN if anyone has any ideas). Everything seemed to go fine, all the packages installed, and when I ran "python setup.py install" in the source folder it generated a BUNCH of output but no errors that I saw.

When I try to launch Gourmet, though, I get the following error:


C:\Python26\gourmet>python gourmet
Traceback (most recent call last):
  File "gourmet", line 13, in <module>
    from gourmet.OptionParser import *
  File "C:\Python26\lib\site-packages\gourmet\__init__.py", line 10, in <module>

    import gglobals
  File "C:\Python26\lib\site-packages\gourmet\gglobals.py", line 30, in <module>

    import os, os.path, gobject, re, gtk, gtk.glade
ImportError: DLL load failed: The specified module could not be found.

C:\Python26\gourmet>

I can't figure out which DLL it's talking about, since I can't figure out what DLL file it's supposed to be importing.

Also, the .nsi file isn't included in the download from SF. I can create one, I've been using NSIS for a few years now, just need to know if it should have any license or anything.

Thanks for creating such a great program, just hoping we can get this stuff resolved so we'll have a working Windows installer once again.


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Grecipe-manager-devel mailing list
Grecipe-manager-devel@...
https://lists.sourceforge.net/lists/listinfo/grecipe-manager-devel

Re: Installing Gourmet on WIndows

by Jeremy Yoder :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
For the source you'll need GIT not SVN (they moved the repository to git a while back).

For git I just installed it in cygwin since I already had cygwin.  There are various Windows packages of git floating around you can try.  Instructions are here:
http://sourceforge.net/projects/grecipe-manager/develop

Basically once you have git, issue:
git clone git://grecipe-manager.git.sourceforge.net/gitroot/grecipe-manager/grecipe-manager

I got swamped with other projects and haven't had time to work on this more, but I did get this far.  The problem is PROBABLY with gtk.glade, though it doesn't look like my patch is there so it could just be all of gtk.

I have a couple of patches which I'm attaching to this email.  The gglobals patch will help it find your GTK install.  You might need to fiddle with the registry key path depending on the version of GTK you grabbed.  The winprinter patch simply disables Windows printing.

The version of GTK I wound up with is here:
http://ftp.gnome.org/pub/GNOME/binaries/win32/glade3/3.6/

I tried about 5 versions with varying degrees of success.

This much at least gets Gourmet to load, but there are lots and lots of errors, and some things just don't work.

Good luck!  Let me know how far you get so I don't end up duplicating anything you figure out!
Jeremy


Jeremy Elliott wrote the following on 9/23/2009 6:43 PM:
Hi there. I decided to also try setting up an installer for Gourmet for Windows. As it happens, I'm using Win7 Ultimate x64, but I installed the 32-bit versions of all the programs.

I installed all the packages from the Wiki page (based around Python 2.6), then downloaded the source from the SF page (for some reason, I couldn't get the SVN to work. I'm using TortiseSVN if anyone has any ideas). Everything seemed to go fine, all the packages installed, and when I ran "python setup.py install" in the source folder it generated a BUNCH of output but no errors that I saw.

When I try to launch Gourmet, though, I get the following error:


C:\Python26\gourmet>python gourmet
Traceback (most recent call last):
  File "gourmet", line 13, in <module>
    from gourmet.OptionParser import *
  File "C:\Python26\lib\site-packages\gourmet\__init__.py", line 10, in <module>

    import gglobals
  File "C:\Python26\lib\site-packages\gourmet\gglobals.py", line 30, in <module>

    import os, os.path, gobject, re, gtk, gtk.glade
ImportError: DLL load failed: The specified module could not be found.

C:\Python26\gourmet>

I can't figure out which DLL it's talking about, since I can't figure out what DLL file it's supposed to be importing.

Also, the .nsi file isn't included in the download from SF. I can create one, I've been using NSIS for a few years now, just need to know if it should have any license or anything.

Thanks for creating such a great program, just hoping we can get this stuff resolved so we'll have a working Windows installer once again.


------------------------------------------------------------------------------ Come build with us! The BlackBerry&reg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33; http://p.sf.net/sfu/devconf

_______________________________________________ Grecipe-manager-devel mailing list Grecipe-manager-devel@... https://lists.sourceforge.net/lists/listinfo/grecipe-manager-devel

diff --git a/src/lib/exporters/winprinter.py b/src/lib/exporters/winprinter.py
index b0bc582..de7fdad 100644
--- a/src/lib/exporters/winprinter.py
+++ b/src/lib/exporters/winprinter.py
@@ -1,5 +1,5 @@
 import tempfile, gtk
-from pdf_exporter import PdfWriter, PdfExporterMultiDoc, get_pdf_prefs
+#from pdf_exporter import PdfWriter, PdfExporterMultiDoc, get_pdf_prefs
 
 from gettext import gettext as _
 from gettext import ngettext
@@ -48,7 +48,8 @@ class RecRenderer:
         #show_disappointing_message()
         #debug('printing not supported; showed dialog',0)
 
-class SimpleWriter (PdfWriter):
+#class SimpleWriter (PdfWriter):
+class SimpleWriter:
 
     def __init__ (self, file=None, dialog_parent=None, show_dialog=True):
         self.filename = tempfile.mktemp('.pdf')
diff --git a/src/lib/gglobals.py b/src/lib/gglobals.py
index 50c95be..923f024 100644
--- a/src/lib/gglobals.py
+++ b/src/lib/gglobals.py
@@ -27,7 +27,28 @@ makedirs = os.makedirs
 #    def makedirs (path):
 #        gnomevfs.make_directory(path,gnomevfs.PERM_USER_ALL)
     
-import os, os.path, gobject, re, gtk, gtk.glade
+import os, os.path, re, sys
+if sys.platform.startswith("win"):
+    # Fetchs gtk2 path from registry
+    import _winreg
+    import msvcrt
+    try:
+        k = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, "Software\\GTK+")
+    except EnvironmentError:
+        print "You must install the Gtk+ 2.2 Runtime Environment to run this program"
+        while not msvcrt.kbhit():
+            pass
+        sys.exit(1)
+    else:
+        gtkdir = _winreg.QueryValueEx(k, "Path")
+        os.environ['PATH'] += ";%s\\lib;%s\\bin" % (gtkdir[0], gtkdir[0])
+        print os.environ['PATH']
+        import pygtk
+        pygtk.require ('2.0')
+
+import gobject
+import gtk
+import gtk.glade
 import tempfile
 from gdebug import debug
 from OptionParser import options

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Grecipe-manager-devel mailing list
Grecipe-manager-devel@...
https://lists.sourceforge.net/lists/listinfo/grecipe-manager-devel