← Back to team overview

zim-wiki team mailing list archive

Re: Zim 0.62 for Windows released

 

Brendan,

One step back; of course the default shipped plugins are in the python
library path. They are installed as part of the program, and the user will
not easily remove them. The XDG_DATA folders are used for extra user
installed plugins that do not ship with the default install.

XDG_DATA contains the user data folder but also the system data folders.
Yes it is reasonable for the user to mess around with the user data folder,
but we should be able to use the system data folder for files included in
the installer. This is the same "data" folder is used by the installer for
the manual, templates & images. So I think there is no harm in using it for
plugins as well.

Problem is that for the executable the default plugins are compiled into
the executable, so we can no longer scan the files to get an index of them.

Previously the work around has been to ship a copy of the plugins outside
of the executable. This work around now broke.

Two ways to fix that:
1. Fix the work around by putting the files in the right folder
2. Fix the issue by somehow making sure we can list the plugin files even
when compiled into an executable

Fix in #1 is real easy, just move the files you install now to
"zim/plugins" to "data/zim/plugins".

Most simple version of #2 would be to patch the
"PluginManager.list_installed_plugins()" function with a hard coded list
when compiling to executable.

Would that work for you?

Regards,

Jaap



On Tue, Oct 7, 2014 at 5:51 PM, Brendan Kidwell <snarf@xxxxxxxxx> wrote:

>  IMO this is a failure in the executable, not in the packaging.
>
> What if the user deletes $XDG_data/zim? This is a perfectly reasonable
> thing for a user to do if they want a reset. What happens right now if I do
> that on a Unix platform?
>
> It is incorrect to require user data folders under ~ be created during
> installation. The main executable or the main executable's launcher must
> create the folder. In the Windows build, the Portable Install has a
> launcher but not the Desktop Install.
>
> Therefore, we need to change the main executable to either tolerate the
> missing folder, or to create it before it reads it.
>
> Otherwise I will have to make a tiny launcher script for the Desktop
> Install using NSIS, which creates any required resources for $USER and then
> passes control to the main executable.
>
> Brendan
>
> On Tue, Oct 7, 2014, at 10:33, Jaap Karssenberg wrote:
>
> I believe this is due to the search path for plugins has changed. IIRC the
> windows build has to supply the .py files of the plugins in order to make
> zim find them. These should now be in XDG_DATA/zim/plugins rather than the
> python path.
>
> Let me know if this is a problem for packaging, could add a rule for
> finding them relative to the executable.
>
>  The explanation for the error is that when the dialog is shown, we load
> the description of the first plugin. Here the error occurs, saying that it
> can not find the first description. This means the entire plugin list is
> empty.
>
>  Regards,
>
> Jaap
>
>
>
> On Tue, Oct 7, 2014 at 1:34 AM, Brendan Kidwell <snarf@xxxxxxxxx> wrote:
>
> I've updated the release page to reflect the fact that it doesn't work.
>  It doesn't work for me on my build VM either; I didn't test everything
>  before I published it.
>
>  Jaap: have requirements changed?
>
>  It will be a few days before I can look into this.
>
>  On Mon, Oct 6, 2014, at 05:35, Marco Cevoli wrote:
>  > Same here on Win 8.1:
>  >
>  > This is zim 0.62
>  > Platform: nt
>  > Locale: it_IT cp1252
>  > FS encoding: mbcs
>  > Python: (2, 7, 8, 'final', 0)
>  > Gtk: (2, 24, 10)
>  > Pygtk: (2, 24, 0)
>  > Zim revision is:
>  >   branch: zim
>  >   revision: 738
>  >   jaap.karssenberg@xxxxxxxxx-20140930191715-hpl66psh7yudcskr
>  >   date: 2014-09-30 21:17:15 +0200
>  >
>  > ======= Traceback =======
>  >   File "zim\gui\__init__.pyo", line 911, in _action_handler
>  >   File "zim\gui\__init__.pyo", line 1793, in show_preferences
>  >   File "zim\gui\preferencesdialog.pyo", line 76, in __init__
>  >   File "zim\gui\preferencesdialog.pyo", line 217, in __init__
>  >   File "zim\gui\preferencesdialog.pyo", line 227, in do_row_activated
>  > IndexError: could not find tree path
>
>
>
>
>

Follow ups

References