Good news! The Register and Unregister scripts to enable/disable Windows to
start Leo from double-clicking on a .leo file now work. --- For me.
testing appreciated. The enhancement issue is
https://github.com/leo-editor/leo-editor/issues/1012, but it's probably a
good idea to open new issues for bugs so details don't get lost in
cross-threads.
They work a) from Leo GUI, b) from Leo command line, and c) from straight
python :-) 👍
*Python:*
python .\leo-editor\leo\scripts\win-register-leo.leox
*Leo script:*
leo-messages.exe --script=..\scripts\win-register-leo.leox
*--Script* path must be relative to `leo-editor\leo\core` NOT the
filesystem (a bug in Leo core I think).
*Leo GUI:*
* Run Leo >> Open specific Leo file >> `scripts.leo` >> Find "Windows
only scripts" node* >> select **`*@file win-register-leo.leox*`** >>
Execute script (Ctrl-B)
* Current node location, subject to change:
`.../leo-editor/leo/scripts/scripts.leo#Scripts-->@file
leoScripts.txt-->Command-line scripts-->Windows-only scripts`
*Expected results*
```
(leo-dev) matt@ENV-SURFACE-MHW C:\Users\mattw\code\leo-editor
> python leo\scripts\win-register-leo.leox
--- Running register-leo Leo script
No admin privileges. Start Leo as administrator first and then run this
script
--- end of script
```
Open command prompt as Administrator and then retry:
```
matt@ENV-SURFACE-MHW C:\Users\mattw\code
$ c:\apps\miniconda3\envs\leo-dev\python leo-editor\leo\scripts\win-register
-leo.leox
--- Running register-leo Leo script
Attempting to register leo filetype with Windows...
Python: c:\apps\miniconda3\envs\leo-dev\pythonw.exe
Leo: c:\apps\miniconda3\envs\leo-dev\Scripts\leo.exe
Found: c:\users\mattw\code\leo-editor\leo\Icons\LeoDoc.ico
Registered!
.leo, .leox files associated as 'Leo.File'
--- end of script
matt@ENV-SURFACE-MHW C:\Users\mattw\code
$ c:\apps\miniconda3\envs\leo-dev\python leo-editor\leo\scripts\win-
unregister-leo.leox
--- Running unregister-leo Leo script
Attempting to un-register leo filetype with Windows...
Leo file type has been removed from registry
.leo, .leox file associations removed from registry
--- end of script
matt@ENV-SURFACE-MHW C:\Users\mattw\code
$ c:\apps\miniconda3\envs\leo-dev\Scripts\leo-m.exe --script=..\scripts\win-
register-leo.leox
Leo 5.8.1-b2 devel, build 20190222005157, Fri Feb 22 00:51:57 PST 2019
--- Running register-leo Leo script
Attempting to register leo filetype with Windows...
Python: c:\apps\miniconda3\envs\leo-dev\pythonw.exe
Leo: c:\apps\miniconda3\envs\leo-dev\Scripts\leo.exe
Found: c:\users\mattw\code\leo-editor\leo\Icons\LeoDoc.ico
Registered!
.leo, .leox files associated as 'Leo.File'
```
Remaining to-do before complete: Request elevation prompt when running from
Leo gui.
Pushed to devel branch in
[b5017f6](https://github.com/leo-editor/leo-editor/commit/b5017f610b6eb7b7839ac83fb7c9908a85f60c88)
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.