Had a bit of trouble getting gecko going on win32 and I thought I would
document the issue.  Some of the posts and scraps out on the internet
suggest that after installing the GRE-Gecko installer on Windows all you
need to do is add the installation path to your environment and define
MOZILLA_FIVE_HOME.  Some suggest that you must have a %HOME% defined (not
standard on windows).

What I found is that you must add the GRE path to your %PATH% and you must
call WebControl.CompPath setting this property to the full path of the GRE
install.  You don't need a 'Profile' or %HOME% or any of the other
suggestions AFAICT.

Not true?  If true, this might save someone else some time.  By the way, the
wrapper works absolutely great! Thanks Dave

      static void Main(string[] args)
       {
           Application.Init ();
           Window window = new Window("Moz");
           window.DeleteEvent +=new DeleteEventHandler(window_DeleteEvent);
           window.Resize(640, 480);
           WebControl.SetProfilePath(@"d:\cygwin\home\dave\",
".gtkmozembed");
           // EVEN IF YOU HAVE MOZILLA_FIVE_HOME OR MOZILLA_HOME IN YOUR
           // ENV YOU MUST CALL WebControl.CompPath BEFORE ANY WIDGETS ARE
CREATED
           // ALSO, THE SAME DIRECTORY MUST BE A PART OF YOUR %PATH%
           //WebControl.CompPath =
@"C:\progra~1\common~1\gtkmozembed-win32";
           // OR
           string compPath = Environment.GetEnvironmentVariable
("MOZILLA_FIVE_HOME");
           WebControl.CompPath =  compPath;
           WebControl webControl = new WebControl();
           webControl.LoadUrl("http://www.mono-project.com";);

           window.Add(webControl);
           window.ShowAll();
           Application.Run();
       }


       private static void window_DeleteEvent(object o, DeleteEventArgs
args)
       {
           Application.Quit();
       }
_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to