Skip to content

Instantly share code, notes, and snippets.

@maphew
Last active October 16, 2023 04:43
Show Gist options
  • Select an option

  • Save maphew/fe6e5c2ccbf48fc82d84b4230e476899 to your computer and use it in GitHub Desktop.

Select an option

Save maphew/fe6e5c2ccbf48fc82d84b4230e476899 to your computer and use it in GitHub Desktop.

Revisions

  1. maphew revised this gist Oct 16, 2023. No changes.
  2. maphew revised this gist Oct 16, 2023. No changes.
  3. maphew revised this gist Oct 16, 2023. 4 changed files with 12 additions and 5 deletions.
    3 changes: 2 additions & 1 deletion Install-Leo-code-download.cmd
    Original file line number Diff line number Diff line change
    @@ -3,9 +3,10 @@
    :: opinionated personal preferences, adjust to suit
    ::
    winget install wget
    winget install gsudo
    md c:\bin
    wget https://raw.githubusercontent.com/chocolatey/choco/blob/master/src/chocolatey.resources/redirects/RefreshEnv.cmd -O c:\bin\RefreshEnv.cmd
    setx /M path %path%;c:\bin
    sudo setx /M path %path%;c:\bin

    winget install --id Python.Launcher --exact --force
    winget install python.python.3.12 --location c:\apps\python
    8 changes: 6 additions & 2 deletions Install-Leo-release.cmd
    Original file line number Diff line number Diff line change
    @@ -3,12 +3,16 @@
    :: opinionated personal preferences, adjust to suit
    ::
    winget install wget
    winget install gsudo
    md c:\bin
    wget https://raw.githubusercontent.com/chocolatey/choco/blob/master/src/chocolatey.resources/redirects/RefreshEnv.cmd -O c:\bin\RefreshEnv.cmd
    setx /M path %path%;c:\bin
    sudo setx /M path %path%;c:\bin

    winget install --id Python.Launcher --exact --force
    winget install python.python.3.12 --location c:\apps\python

    :: python v3.11 required for non-dev Leo until next Leo release
    :: https://github.com/leo-editor/leo-editor/issues/3615
    winget install python.python.3.11 --location c:\apps\python

    refreshenv
    py -0
    3 changes: 2 additions & 1 deletion Install-Leo-using-git.cmd
    Original file line number Diff line number Diff line change
    @@ -3,9 +3,10 @@
    :: opinionated personal preferences, adjust to suit
    ::
    winget install wget
    winget install gsudo
    md c:\bin
    wget https://raw.githubusercontent.com/chocolatey/choco/blob/master/src/chocolatey.resources/redirects/RefreshEnv.cmd -O c:\bin\RefreshEnv.cmd
    setx /M path %path%;c:\bin
    sudo setx /M path %path%;c:\bin

    winget install --id Python.Launcher --exact --force
    winget install python.python.3.12 --location c:\apps\python
    3 changes: 2 additions & 1 deletion Install-Leo.cmd
    Original file line number Diff line number Diff line change
    @@ -3,9 +3,10 @@
    :: opinionated personal preferences, adjust to suit
    ::
    winget install wget
    winget install gsudo
    md c:\bin
    wget https://raw.githubusercontent.com/chocolatey/choco/blob/master/src/chocolatey.resources/redirects/RefreshEnv.cmd -O c:\bin\RefreshEnv.cmd
    setx /M path %path%;c:\bin
    sudo setx /M path %path%;c:\bin

    winget install --id Python.Launcher --exact --force
    winget install python.python.3.12 --location c:\apps\python
  4. maphew revised this gist Oct 16, 2023. 1 changed file with 35 additions and 0 deletions.
    35 changes: 35 additions & 0 deletions Install-Leo-release.cmd
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,35 @@
    :: Install Leo on windows recipe by matt wilkie
    :: Requires App Installer from Microsoft Store be installed first
    :: opinionated personal preferences, adjust to suit
    ::
    winget install wget
    md c:\bin
    wget https://raw.githubusercontent.com/chocolatey/choco/blob/master/src/chocolatey.resources/redirects/RefreshEnv.cmd -O c:\bin\RefreshEnv.cmd
    setx /M path %path%;c:\bin

    winget install --id Python.Launcher --exact --force
    winget install python.python.3.12 --location c:\apps\python

    refreshenv
    py -0
    where python

    sudo setx /M PIPX_BIN_DIR C:\bin
    sudo setx /M PIPX_HOME C:\apps\pipx
    c:\apps\python\python.exe -m pip install pipx
    c:\apps\python\python.exe -m pipx ensurepath
    refreshenv

    :: Install latest stable release from pypi.org
    pipx install leo

    pipx inject leo websockets

    leo-messages --version

    :: run Leo to create profile and related, and then exit
    Leo

    :: Register Leo with Windows
    leo-m --script=C:\apps\pipx\venvs\leo\Lib\site-packages\leo\scripts\add-desktop-links.leox
    leo-m --script=C:\apps\pipx\venvs\leo\Lib\site-packages\leo\scripts\win\register-leo.leox
  5. maphew revised this gist Oct 16, 2023. 1 changed file with 39 additions and 0 deletions.
    39 changes: 39 additions & 0 deletions Install-Leo-code-download.cmd
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,39 @@
    :: Install Leo on windows recipe by matt wilkie
    :: Requires App Installer from Microsoft Store be installed first
    :: opinionated personal preferences, adjust to suit
    ::
    winget install wget
    md c:\bin
    wget https://raw.githubusercontent.com/chocolatey/choco/blob/master/src/chocolatey.resources/redirects/RefreshEnv.cmd -O c:\bin\RefreshEnv.cmd
    setx /M path %path%;c:\bin

    winget install --id Python.Launcher --exact --force
    winget install python.python.3.12 --location c:\apps\python

    refreshenv
    py -0
    where python

    sudo setx /M PIPX_BIN_DIR C:\bin
    sudo setx /M PIPX_HOME C:\apps\pipx
    c:\apps\python\python.exe -m pip install pipx
    c:\apps\python\python.exe -m pipx ensurepath
    refreshenv

    :: install latest development from source code download
    winget install 7zip
    pushd %userprofile%\Downloads
    wget https://github.com/leo-editor/leo-editor/archive/devel.zip
    7z x devel.zip -o C:\apps
    pipx install --editable C:\apps\leo-editor-devel

    pipx inject leo websockets

    leo-messages --version

    :: run Leo to create profile and related, and then exit
    Leo

    :: Register Leo with Windows
    leo-m --script=C:\apps\pipx\venvs\leo\Lib\site-packages\leo\scripts\add-desktop-links.leox
    leo-m --script=C:\apps\pipx\venvs\leo\Lib\site-packages\leo\scripts\win\register-leo.leox
  6. maphew revised this gist Oct 16, 2023. 1 changed file with 37 additions and 0 deletions.
    37 changes: 37 additions & 0 deletions Install-Leo-using-git.cmd
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,37 @@
    :: Install Leo on windows recipe by matt wilkie
    :: Requires App Installer from Microsoft Store be installed first
    :: opinionated personal preferences, adjust to suit
    ::
    winget install wget
    md c:\bin
    wget https://raw.githubusercontent.com/chocolatey/choco/blob/master/src/chocolatey.resources/redirects/RefreshEnv.cmd -O c:\bin\RefreshEnv.cmd
    setx /M path %path%;c:\bin

    winget install --id Python.Launcher --exact --force
    winget install python.python.3.12 --location c:\apps\python

    refreshenv
    py -0
    where python

    sudo setx /M PIPX_BIN_DIR C:\bin
    sudo setx /M PIPX_HOME C:\apps\pipx
    c:\apps\python\python.exe -m pip install pipx
    c:\apps\python\python.exe -m pipx ensurepath
    refreshenv

    :: Or install latest development from GitHub with git
    pushd %userprofile%\code
    git clone --depth=50 --no-single-branch https://github.com/leo-editor/leo-editor
    pipx install --editable ./leo-editor

    pipx inject leo websockets

    leo-messages --version

    :: run Leo to create profile and related, and then exit
    Leo

    :: Register Leo with Windows
    leo-m --script=C:\apps\pipx\venvs\leo\Lib\site-packages\leo\scripts\add-desktop-links.leox
    leo-m --script=C:\apps\pipx\venvs\leo\Lib\site-packages\leo\scripts\win\register-leo.leox
  7. maphew created this gist Oct 16, 2023.
    53 changes: 53 additions & 0 deletions Install-Leo.cmd
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,53 @@
    :: Install Leo on windows recipe by matt wilkie
    :: Requires App Installer from Microsoft Store be installed first
    :: opinionated personal preferences, adjust to suit
    ::
    winget install wget
    md c:\bin
    wget https://raw.githubusercontent.com/chocolatey/choco/blob/master/src/chocolatey.resources/redirects/RefreshEnv.cmd -O c:\bin\RefreshEnv.cmd
    setx /M path %path%;c:\bin

    winget install --id Python.Launcher --exact --force
    winget install python.python.3.12 --location c:\apps\python

    refreshenv
    py -0
    where python

    sudo setx /M PIPX_BIN_DIR C:\bin
    sudo setx /M PIPX_HOME C:\apps\pipx
    c:\apps\python\python.exe -m pip install pipx
    c:\apps\python\python.exe -m pipx ensurepath
    refreshenv

    :::: Choose (delete/comment out ones not wanted):

    :: Install latest stable release from pypi.org
    pipx install leo

    Or:
    :: Or install latest development from GitHub with git
    pushd %userprofile%\code
    git clone --depth=50 --no-single-branch https://github.com/leo-editor/leo-editor
    pipx install --editable ./leo-editor

    Or:
    :: Or install latest development from source code download
    winget install 7zip
    pushd %userprofile%\Downloads
    wget https://github.com/leo-editor/leo-editor/archive/devel.zip
    7z x devel.zip -o C:\apps
    pipx install --editable C:\apps\leo-editor-devel

    :::: Resume

    pipx inject leo websockets

    leo-messages --version

    :: run Leo to create profile and related, and then exit
    Leo

    :: Register Leo with Windows
    leo-m --script=C:\apps\pipx\venvs\leo\Lib\site-packages\leo\scripts\add-desktop-links.leox
    leo-m --script=C:\apps\pipx\venvs\leo\Lib\site-packages\leo\scripts\win\register-leo.leox