Self Contained Leo Executable

44 views
Skip to first unread message

Thomas Passin

unread,
May 12, 2023, 12:45:04 AM5/12/23
to leo-editor
I just tried making a self-contained Leo installer for Windows with PyInstaller.  the executable failed with this error:

  File "leo\core\leoApp.py", line 1853, in reportDirectories
    g.es(f"{kind:>10}:", os.path.normpath(theDir), color='blue')
                         ^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen ntpath>", line 540, in normpath
TypeError: expected str, bytes or os.PathLike object, not NoneType

[1556] Failed to execute script 'launchLeo' due to unhandled exception!


Even after this gets handled, there is going to have to be some hand-crafted configuration to get the whole thing working right.  See PyInstaller Manual

Edward K. Ream

unread,
May 12, 2023, 6:34:30 AM5/12/23
to leo-e...@googlegroups.com
On Thu, May 11, 2023 at 11:45 PM Thomas Passin <tbp1...@gmail.com> wrote:
I just tried making a self-contained Leo installer for Windows with PyInstaller.  the executable failed with this error:

Thanks for your investigation. Let's see what we can do for the next release.

Otoh, the simplest way to use Leo nowadays is to click the leoInteg button in vs-code ;-)

Edward

Thomas Passin

unread,
May 12, 2023, 3:23:09 PM5/12/23
to leo-editor
leoInteg isn't able to handle some plugins and the in-tab apps I've been writing lately, IIUC.

Rob

unread,
May 12, 2023, 3:25:59 PM5/12/23
to leo-editor
Hmm, interesting idea. I've never used vs-code (I'm not a programmer). Is this documented anywhere how this might work? I've seen references to Felix's work on leointeg but never really understood what the point was.

Rob...

Thomas Passin

unread,
May 12, 2023, 3:46:19 PM5/12/23
to leo-editor
Felix will say more, but LeoInteg, running as an addon in VSCode, talks to Leo via the LeoBridge to ascertain the state of the tree and the contents of Leo's nodes.  So it's like a repeater in a way, and you can work with the tree and body in LeoInteg instead of Leo's Qt panes.  Leo commands can be run by LeoInteg because they are sent to Leo for execution.  As you can imagine, not all Leo commands and plugins can work, but all the standard equipment does, including the forward/backward navigation arrows.  The tree and editing operations are much the same as doing them in Leo.

Thomas Passin

unread,
May 12, 2023, 10:53:48 PM5/12/23
to leo-editor
But note that LeoInteg still relies on Leo having already been installed, since it must start the LeoBridge and a headless Leo executable.
Reply all
Reply to author
Forward
0 new messages