ANN: Python GUI development using XULRunner

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Todd Whiteman

    ANN: Python GUI development using XULRunner

    I've put together a tutorial that shows off how to build a GUI
    application using XULRunner (same architectural components as Firefox
    uses) that can be used in conjunction with the Python programming language.

    The tutorial covers how to build a Python/XULRunner GUI application:


    The details in this tutorial covers the initial setup to full
    packaging/deployment, mostly targeting a Windows/Linux platform (MacOSX
    is possible with a few deviations, I have tried to cover these
    deviations where applicable).

    Feedback is welcome.

    Cheers,
    Todd
  • Don Spaulding

    #2
    Re: ANN: Python GUI development using XULRunner

    On Sep 16, 8:29 pm, Todd Whiteman <to...@activest ate.comwrote:
    I've put together a tutorial that shows off how to build a GUI
    application using XULRunner (same architectural components as Firefox
    uses) that can be used in conjunction with the Python programming language.
    >
    The tutorial covers how to build a Python/XULRunner GUI application:http://pyxpcomext.mozdev.org/no_wrap...ner/python_xul...
    >
    The details in this tutorial covers the initial setup to full
    packaging/deployment, mostly targeting a Windows/Linux platform (MacOSX
    is possible with a few deviations, I have tried to cover these
    deviations where applicable).
    >
    Feedback is welcome.
    >
    Cheers,
    Todd
    I get to the "Running" step and run into "Couldn't load XPCOM."

    Does this work on x86_64? Or have I made a rookie mistake?

    xulapp1$ ls
    app docs installer pyxpcom_gui_app
    xulapp1$ cd pyxpcom_gui_app/
    pyxpcom_gui_app $ ls
    application.ini components extensions pyxpcom_gui_app
    chrome defaults pylib xulrunner
    pyxpcom_gui_app $ ./pyxpcom_gui_app
    Couldn't load XPCOM.

    Comment

    • Todd Whiteman

      #3
      Re: ANN: Python GUI development using XULRunner

      Don Spaulding wrote:
      On Sep 16, 8:29 pm, Todd Whiteman <to...@activest ate.comwrote:
      >I've put together a tutorial that shows off how to build a GUI
      >application using XULRunner (same architectural components as Firefox
      >uses) that can be used in conjunction with the Python programming language.
      >>
      >The tutorial covers how to build a Python/XULRunner GUI application:http://pyxpcomext.mozdev.org/no_wrap...ner/python_xul...
      >
      I get to the "Running" step and run into "Couldn't load XPCOM."
      >
      Does this work on x86_64? Or have I made a rookie mistake?
      Hi Don,

      A good question. Mozilla only provide 32-bit XulRunner applications by
      default, you you'll need to install the necessary 32-bit compatability
      libraries on your Linux machine, i.e. for Ubuntu it's something like:
      sudo apt-get install ia32-libs ia32-libs-gtk

      Then you should be able to run the example. You can check the
      dependencies using something the following commands, there should be no
      missing dependencies:
      $ cd pyxpcom_gui_app/xulrunner
      $ LD_LIBRARY_PATH =. ldd ./xulrunner-bin

      It is possible to use a 64-bit version, but you'll need to compile this
      yourself (or find somewhere that provides these x86_64 versions). Note
      that the PythonExt project does not offer Python bindings for x86_64
      either (it's on my todo list), you can compile the PythonExt part
      yourself as well if you need a 64-bit version.

      Cheers,
      Todd

      Comment

      • support@mysfdomain.com

        #4
        Re: ANN: Python GUI development using XULRunner

        On Sep 17, 1:21 pm, Todd Whiteman <to...@activest ate.comwrote:
        Don Spaulding wrote:
        On Sep 16, 8:29 pm, Todd Whiteman <to...@activest ate.comwrote:
        I've put together a tutorial that shows off how to build a GUI
        application using XULRunner (same architectural components as Firefox
        uses) that can be used in conjunction with the Python programming language.
        >
        The tutorial covers how to build a Python/XULRunner GUI application:http://pyxpcomext.mozdev.org/no_wrap...ner/python_xul...
        >
        I get to the "Running" step and run into "Couldn't load XPCOM."
        >
        Does this work on x86_64?  Or have I made a rookie mistake?
        >
        Hi Don,
        >
        A good question. Mozilla only provide 32-bit XulRunner applications by
        default, you you'll need to install the necessary 32-bit compatability
        libraries on your Linux machine, i.e. for Ubuntu it's something like:
        sudo apt-get install ia32-libs ia32-libs-gtk
        >
        Then you should be able to run the example. You can check the
        dependencies using something the following commands, there should be no
        missing dependencies:
        $ cd pyxpcom_gui_app/xulrunner
        $ LD_LIBRARY_PATH =. ldd ./xulrunner-bin
        >
        It is possible to use a 64-bit version, but you'll need to compile this
        yourself (or find somewhere that provides these x86_64 versions). Note
        that the PythonExt project does not offer Python bindings for x86_64
        either (it's on my todo list), you can compile the PythonExt part
        yourself as well if you need a 64-bit version.
        >
        Cheers,
        Todd
        Interesting, I'm running Ubuntu Intrepid here, and have both ia32-libs
        and ia32-libs-gtk installed.

        ldd shows that I'm missing the following libs, even though the proper
        packages are installed, and the files show up in /usr/lib.

        libxcb-render-util.so.0 =not found
        libxcb-render.so.0 =not found

        There's also /usr/lib/libxcb-render.so.0.0.0 and the same for render-
        util, so I wonder if that could be part of the problem?


        Don

        /me never knew how to get out of DLL hell on Windows either ;-)

        Comment

        • Don Spaulding

          #5
          Re: ANN: Python GUI development using XULRunner

          Oh, and Google's single sign-on sucks eggs :-|

          Comment

          • Fred Pacquier

            #6
            Re: ANN: Python GUI development using XULRunner

            Todd Whiteman <toddw@activest ate.comsaid :
            I've put together a tutorial that shows off how to build a GUI
            application using XULRunner (same architectural components as Firefox
            uses) that can be used in conjunction with the Python programming
            language.
            The tutorial covers how to build a Python/XULRunner GUI application:

            nner_about.html
            The details in this tutorial covers the initial setup to full
            packaging/deployment, mostly targeting a Windows/Linux platform
            (MacOSX is possible with a few deviations, I have tried to cover these
            deviations where applicable).
            Feedback is welcome.
            Thanks for making good on your promise. I'm leaving for a trip but have it
            bookmarked for later use :-)

            Comment

            • Todd Whiteman

              #7
              Re: ANN: Python GUI development using XULRunner

              support@mysfdom ain.com wrote:
              On Sep 17, 1:21 pm, Todd Whiteman <to...@activest ate.comwrote:
              >Don Spaulding wrote:
              >>On Sep 16, 8:29 pm, Todd Whiteman <to...@activest ate.comwrote:
              >>>I've put together a tutorial that shows off how to build a GUI
              >>>applicatio n using XULRunner (same architectural components as Firefox
              >>>uses) that can be used in conjunction with the Python programming language.
              >>>The tutorial covers how to build a Python/XULRunner GUI application:http://pyxpcomext.mozdev.org/no_wrap...ner/python_xul...
              >>I get to the "Running" step and run into "Couldn't load XPCOM."
              >>Does this work on x86_64? Or have I made a rookie mistake?
              >Hi Don,
              >>
              >A good question. Mozilla only provide 32-bit XulRunner applications by
              >default, you you'll need to install the necessary 32-bit compatability
              >libraries on your Linux machine, i.e. for Ubuntu it's something like:
              >sudo apt-get install ia32-libs ia32-libs-gtk
              >>
              >Then you should be able to run the example. You can check the
              >dependencies using something the following commands, there should be no
              >missing dependencies:
              >$ cd pyxpcom_gui_app/xulrunner
              >$ LD_LIBRARY_PATH =. ldd ./xulrunner-bin
              >>
              >It is possible to use a 64-bit version, but you'll need to compile this
              >yourself (or find somewhere that provides these x86_64 versions). Note
              >that the PythonExt project does not offer Python bindings for x86_64
              >either (it's on my todo list), you can compile the PythonExt part
              >yourself as well if you need a 64-bit version.
              >>
              >Cheers,
              >Todd
              >
              Interesting, I'm running Ubuntu Intrepid here, and have both ia32-libs
              and ia32-libs-gtk installed.
              >
              ldd shows that I'm missing the following libs, even though the proper
              packages are installed, and the files show up in /usr/lib.
              >
              libxcb-render-util.so.0 =not found
              libxcb-render.so.0 =not found
              >
              There's also /usr/lib/libxcb-render.so.0.0.0 and the same for render-
              util, so I wonder if that could be part of the problem?
              >
              >
              Don
              Hi Don,

              I'm thinking there may be additional 32-bit packages necessary then (I'm
              not sure which package).

              Not sure about Ubuntu 8.10 (it's still alpha). I'm using a Ubuntu 8.04
              x86_64 machine and my dependencies list the following for the latest
              32-bit build of XulRunner:

              $ LD_LIBRARY_PATH =. ldd ./xulrunner-bin | grep libxcb
              libxcb-xlib.so.0 =/usr/lib32/libxcb-xlib.so.0 (0xf6493000)
              libxcb.so.1 =/usr/lib32/libxcb.so.1 (0xf647b000)

              Cheers,
              Todd

              Comment

              • Riccardo Galli

                #8
                Re: ANN: Python GUI development using XULRunner

                On 17 Set, 03:29, Todd Whiteman <to...@activest ate.comwrote:
                I've put together a tutorial that shows off how to build a GUI
                application using XULRunner (same architectural components as Firefox
                uses) that can be used in conjunction with the Python programming language.
                >
                The tutorial covers how to build a Python/XULRunner GUI application:http://pyxpcomext.mozdev.org/no_wrap...ner/python_xul...
                >
                The details in this tutorial covers the initial setup to full
                packaging/deployment, mostly targeting a Windows/Linux platform (MacOSX
                is possible with a few deviations, I have tried to cover these
                deviations where applicable).
                >
                Feedback is welcome.
                >
                Cheers,
                Todd
                well, it just works.
                Now let's see how :-)

                Nice job,
                Riccardo

                p.s. I'm on a Gentoo Linux 64 bit, no problems at all

                Comment

                • Don Spaulding

                  #9
                  Re: ANN: Python GUI development using XULRunner

                  On Sep 17, 5:53 pm, Todd Whiteman <to...@activest ate.comwrote:
                  supp...@mysfdom ain.com wrote:
                  On Sep 17, 1:21 pm, Todd Whiteman <to...@activest ate.comwrote:
                  Don Spaulding wrote:
                  >On Sep 16, 8:29 pm, Todd Whiteman <to...@activest ate.comwrote:
                  >>I've put together a tutorial that shows off how to build a GUI
                  >>application using XULRunner (same architectural components as Firefox
                  >>uses) that can be used in conjunction with the Python programming language.
                  >>The tutorial covers how to build a Python/XULRunner GUI application:http://pyxpcomext.mozdev.org/no_wrap...ner/python_xul...
                  >I get to the "Running" step and run into "Couldn't load XPCOM."
                  >Does this work on x86_64?  Or have I made a rookie mistake?
                  Hi Don,
                  >
                  A good question. Mozilla only provide 32-bit XulRunner applications by
                  default, you you'll need to install the necessary 32-bit compatability
                  libraries on your Linux machine, i.e. for Ubuntu it's something like:
                  sudo apt-get install ia32-libs ia32-libs-gtk
                  >
                  Then you should be able to run the example. You can check the
                  dependencies using something the following commands, there should be no
                  missing dependencies:
                  $ cd pyxpcom_gui_app/xulrunner
                  $ LD_LIBRARY_PATH =. ldd ./xulrunner-bin
                  >
                  It is possible to use a 64-bit version, but you'll need to compile this
                  yourself (or find somewhere that provides these x86_64 versions). Note
                  that the PythonExt project does not offer Python bindings for x86_64
                  either (it's on my todo list), you can compile the PythonExt part
                  yourself as well if you need a 64-bit version.
                  >
                  Cheers,
                  Todd
                  >
                  Interesting, I'm running Ubuntu Intrepid here, and have both ia32-libs
                  and ia32-libs-gtk installed.
                  >
                  ldd shows that I'm missing the following libs, even though the proper
                  packages are installed, and the files show up in /usr/lib.
                  >
                     libxcb-render-util.so.0 =not found
                     libxcb-render.so.0 =not found
                  >
                  There's also /usr/lib/libxcb-render.so.0.0.0 and the same for render-
                  util, so I wonder if that could be part of the problem?
                  >
                  Don
                  >
                  Hi Don,
                  >
                  I'm thinking there may be additional 32-bit packages necessary then (I'm
                  not sure which package).
                  >
                  Not sure about Ubuntu 8.10 (it's still alpha). I'm using a Ubuntu 8.04
                  x86_64 machine and my dependencies list the following for the latest
                  32-bit build of XulRunner:
                  >
                  $ LD_LIBRARY_PATH =. ldd ./xulrunner-bin | grep libxcb
                          libxcb-xlib.so.0 =/usr/lib32/libxcb-xlib.so.0 (0xf6493000)
                          libxcb.so.1 =/usr/lib32/libxcb.so.1 (0xf647b000)
                  >
                  Cheers,
                  Todd
                  No worries Todd, it is alpha. It was a very recent bug in the 8.10
                  ia32-libs package, which is now fixed :-D

                  Thanks for the excellent writeup, BTW! I've been wondering what was
                  involved in doing this for a while, it just never made it up my
                  priority list to figure out. Again, thanks!

                  Comment

                  • Joe Hrbek

                    #10
                    Re: ANN: Python GUI development using XULRunner

                    Todd, this is great! Thanks for your work on this. I've been using
                    your extension for awhile, successfully creating little apps. Your
                    gui_app template has been a huge help in advancing my understanding of
                    how things fit together...take s some of the guesswork out. :) Thanks
                    again,

                    -j

                    On Sep 16, 8:29 pm, Todd Whiteman <to...@activest ate.comwrote:
                    I've put together a tutorial that shows off how to build a GUI
                    application using XULRunner (same architectural components as Firefox
                    uses) that can be used in conjunction with the Python programming language.
                    >
                    The tutorial covers how to build a Python/XULRunner GUI application:http://pyxpcomext.mozdev.org/no_wrap...ner/python_xul...
                    >
                    The details in this tutorial covers the initial setup to full
                    packaging/deployment, mostly targeting a Windows/Linux platform (MacOSX
                    is possible with a few deviations, I have tried to cover these
                    deviations where applicable).
                    >
                    Feedback is welcome.
                    >
                    Cheers,
                    Todd

                    Comment

                    Working...