Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/GChristensen/enso-portable

Portable Enso Launcher community edition
https://github.com/GChristensen/enso-portable

Last synced: 16 days ago
JSON representation

Portable Enso Launcher community edition

Awesome Lists containing this project

README

        

## Enso Launcher (Open-Source)

A feature-rich descendant of Enso Community Edition (Microsoft Windows only).

This is a development page. Please visit the main site at: https://gchristensen.github.io/enso-portable/

#### Digitally signing Python binary to make Enso work properly with elevated processes

**Prerequisites**

* Installed [Microsoft Visual Studio](https://visualstudio.microsoft.com) with Windows Platform SDK.
Available for free on [virtual machines](https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/) from Microsoft.

**Signing Python**

1. Install Enso to `C:\Program Files`
2. Launch Visual Studio Developer Command Prompt *as Administrator*.
3. Change the current directory to where you want to store the copy of the certificate file (appcert.cer).
4. Execute the following command to create a self-issued digital certificate:

`makecert -r -pe -n "CN=Application Certificate - For Use on This Machine Only" -ss PrivateCertStore appcert.cer`

5. Import the certificate to the trusted root store with the following command:

`certmgr.exe -add appcert.cer -s -r localMachine root`

NOTE: if you are signing on a virtual machine, you also need to import the certificate you have created
to the real machine. If you have no Visual Studio installed, launch the Certificate Manager (certmgr.msc),
open and select `Trusted Root Certificate Authorities/Certificates`, and choose Actions -> All Tasks -> Import... menu item.

6. Issue the command below to sign the Python binary:

`SignTool sign /v /s PrivateCertStore /n "Application Certificate - For Use on This Machine Only" "C:\Program Files\Enso Launcher\python\pythonu.exe"`

NOTE: pythonu.exe is a Python binary with the application manifest option `UIAccess` set to `ture`.
Because Enso is a modeless application, it needs this option to get input when elevated processes are in the foreground.
This version of Python is launched only if it is properly signed and Enso is installed at `C:\Program Files`.

#### Required dependencies

The Python interpreter used to run Enso Launcher requires the following dependencies:

* [pywin32](https://github.com/mhammond/pywin32)
* [flask](https://flask.palletsprojects.com/)

#### Building platform code

Follow the [platform build instructions](platform/README.win32) and use the makefile
(compatible with [Mingw](http://www.mingw.org) or [Mingw-w64](https://mingw-w64.org)
mingw32-make) to build and copy binaries to the proper destination.

#### The original source code

The original source code of **Enso Community Edition** could be found here:
[https://launchpad.net/enso/community-enso](https://launchpad.net/enso/community-enso) (you can download the original source without installing bazaar by using [this](https://bazaar.launchpad.net/%7Ecommunityenso/enso/community-enso/tarball/145?start_revid=145) link).

#### Mediaprobes

Mediaprobes allow to create commands that automatically pass items found in filesystem
(or listed in a dictionary) to the specified program. Let's assume that you have a directory
named 'd:/tv-shows', which contains subdirectories: 'columbo', 'the octopus' and 'inspector gadget'.
Let's create a command named 'show' that has the names of all subdirectories under 'd:/tv-shows'
as arguments (the argument will be named "series") and opens the given directory (or file) in
Media Player Classic.

```python
# place the following into command editor

from enso.user import mediaprobe

cmd_show = mediaprobe.directory_probe("show", "d:/tv-shows", "")
```
That's all. The command will have the following additional arguments:

what - lists available arguments.
next - open the next show in the player.
prev - open the previous show in the player.
all - pass 'd:/tv-shows' to the player.

It is possible to create probe commands based on a dictionary:

```python
what_to_watch = {"formula 1": "",
"formula e": "
"}
cmd_watch = mediaprobe.dictionary_probe("stream", what_to_watch, "")
```

If player does not accept directories (as, for example, ACD See does), it is possible to pass a first file in the directory specified at a dictionary:

```python
what_to_stare_at = {'nature': 'd:/images/nature',
'cosmos': 'd:/images/cosmos'}

# if player is not specified, the command will use the default system application
# associated with the encountered file type
cmd_stare = mediaprobe.findfirst_probe("at", what_to_stare_at)
```

Of course, you may construct dictionaries in various ways.

#### License

This fork of Enso Launcher combines code under BSD and MPL licenses. Currently the only MPL-licensed part is the
markup of the settings UI pages. It is possible to disable web-based option pages in the config.py if necessary.

#### Contributors

* [Brian Peiris](https://github.com/brianpeiris)
* [thdoan](https://github.com/thdoan)
* [Caleb John](https://github.com/CalebJohn)
* [Mark Wiseman](https://github.com/mawiseman)