Bundling/packaging Editra

Technical questions about Editra, post them here

Bundling/packaging Editra

Postby seb on Wed Jul 28, 2010 3:24 pm

Hi Editra,

As you know, I'm using Editra as a base of Jaluino IDE (http://jaluino.org), which actually is an Editra plugin. I've written a detailed installation procedure (http://justanotherlanguage.org/content/ ... stallation) which basically goes like this:

- install Editra,
- install JaluinoIDE dependencies (python, python-serial, libusb, python-usb, ...)
- install JaluinoIDE plugins

While working, I'm often asked if I could provide a one-step installation process. I was thinking about re-packaging a released Editra. This would involve to copy my plugins and xml config files in appropriate directory and also include dependency installation within NSI script (I guess this is possible). Do you think this is the appropriate way of doing this ? Do you think I should better "act" on py2exe before NSI ? Would it be ok with you ? (I will only re-package some of released Editra versions, never something from SVN trunk).

Ideally, I would also like to patch splashscreen to include something like "JaluinoIDE powered by Editra" or "Editra, JaluinoIDE inside", so users knows it's a "special" version. Would it also be ok with you ?

TIA
Cheers,
Seb
seb
 
Posts: 51
Joined: Mon Feb 01, 2010 4:19 pm

Re: Bundling/packaging Editra

Postby cody on Wed Jul 28, 2010 6:44 pm

Hi,

There are a number of possibilities here some thoughts

IDEA 1)
Assuming that all those additional python packages are available on pypi and that your users will have an internet connection available.

You could try to make a simple installer that bootstraps the install by first installing python then have it use the ez_setup.py script that is part of setuptools to pull and install setuptools, then Editra and those other packages down from PYPI. At this point when control returns to your installer after the setuptools scripts have run you could copy your plugin to the correct location.

This will only work for using non-"built" install version of Editra (i.e not the exe on windows or .app on OSX).

IDEA 2)
Using the binary installers as a base (this will of course require you to create different installers for different platforms) you could bundle everything into an NSIS or equivalent installer package and have it just simply extract the other installers (or previously extracted and bundled binaries) on the system and run their respective installers (or copy files to correct locations).

IDEA 3) Hybrid approach
Require individual install of Editra (so can use source or binary)
Have custom installer to install plugin and other dependencies.
I haven't tested this but for binary versions of Editra if you install the packages/modules for the other dependancies and then during the init of your plugin when Editra loads it, modify sys.path to point to where those packages are they should be able to be loaded.


I know that some other projects have packaged Editra as their editor such as the Enthought but as far as I can remember I was never contacted about it so I am not sure of any problems or issues if any that they ran into.

As far as the Splash screen I have some plans to make some enhancements to it in the not so distant future and could provide API that would allow a plugin to add status text or title messages to the dialog. Other than that the current splash screen is just an image loaded from a python module that is stuck up on the screen until the UI is initialized.
User avatar
cody
Site Admin
 
Posts: 965
Joined: Mon Oct 09, 2006 2:49 am
Location: United States

Re: Bundling/packaging Editra

Postby seb on Thu Aug 05, 2010 3:19 pm

Hi Cody,

(btw, in my first post, I meant "Hi Cody", not "Hi Editra"...)

Thanks for these useful information.

I've been able to package Editra and other dependencies, embedding binary installers (IDEA 2) within NSIS script. This was quite straight forward. The only problem I have now is I can't automatically enable my JaluinoIDE plugin. I could tinker some Editra configuration files, but it won't exist until Editra is launched. Is there a way to register some kind of a hook script, that would be executed while Editra is run for the first time ?

About splash screen, that's good news, I'll wait until your enhancements. While having the possibility to add custom text, it would also be nice to add a picture, like an icon. That would be ideal :)

Thanks again.
Cheers,
Seb
seb
 
Posts: 51
Joined: Mon Feb 01, 2010 4:19 pm

Re: Bundling/packaging Editra

Postby cody on Thu Aug 05, 2010 3:54 pm

Hi,

It won't work right now but I can make a few simple changes that will make the following work.

In your plugins entry point (i.e the class that derives from plugin.Plugin) __init__ method you could add something like the following:

Code: Select all
# This will fail at this point of startup right now till I make changes to do a two phase init of the plugin manager
manager = wx.GetApp().GetPluginManager()
manager.EnablePlugin(self.__name__, True)


Will need to think about making the changes needed to support this or not a bit though as it could lead to a hazard where a plugin that is always crashing Editra during startup could keep automatically re-enabling it self.


Cody
User avatar
cody
Site Admin
 
Posts: 965
Joined: Mon Oct 09, 2006 2:49 am
Location: United States

Re: Bundling/packaging Editra

Postby seb on Mon Aug 09, 2010 7:55 am

Hi Cody,

Just some feedback about my packaging. Bundling all needed installers doesn't seem to be ok according to JaluinoIDE users (too much steps it seems) so I'll give a try with bundling my plugins and others files directly within Editra.

This means I may not need the hook you were proposing (though I guess this could be a nice feature anyway).

Thanks & Cheers,
Seb
seb
 
Posts: 51
Joined: Mon Feb 01, 2010 4:19 pm

Re: Bundling/packaging Editra

Postby seb on Mon Aug 09, 2010 8:07 am

Hi again,

I can't find SVN tags for Editra-0.5.72. From what I can see in src/info.py, it seems revision for 0.5.72 is 64746. Can you confirm this ?

Also, I may give a try with a deb package, are you interested in getting deb configuration files ?

Thanks
Seb
seb
 
Posts: 51
Joined: Mon Feb 01, 2010 4:19 pm

Re: Bundling/packaging Editra

Postby cody on Mon Aug 09, 2010 2:25 pm

Yea, I must have forgot to tag that release since it came out so soon after 0.5.70. Yes info.py has the correct svn revision tag on it.

I am going to try and get another release out in the next week or two so I will be sure to tag that one.


Thanks,

Cody
User avatar
cody
Site Admin
 
Posts: 965
Joined: Mon Oct 09, 2006 2:49 am
Location: United States


Return to Technical Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron