From c94e859a5d06ff4083594af03b5f117b6c130008 Mon Sep 17 00:00:00 2001 From: doyle Date: Wed, 21 Oct 2020 10:29:27 +1100 Subject: [PATCH] Add python --- Installer/win32_cmder_user_profile.cmd | 3 +++ win32_install.bat | 23 +++++++++++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/Installer/win32_cmder_user_profile.cmd b/Installer/win32_cmder_user_profile.cmd index aa4fe85..ef700df 100644 --- a/Installer/win32_cmder_user_profile.cmd +++ b/Installer/win32_cmder_user_profile.cmd @@ -18,3 +18,6 @@ @echo off alias gvim=%cmder_root%\..\GVim\gVimPortable.exe $* +set PATH=%cmder_root%\bin\python;%PATH% +set HOME=%cmder_root%\..\ +set HOMEPATH=%cmder_root%\..\ diff --git a/win32_install.bat b/win32_install.bat index b8ec419..94df6ad 100644 --- a/win32_install.bat +++ b/win32_install.bat @@ -1,4 +1,6 @@ @echo off +setlocal + REM REM Cmder REM @@ -18,10 +20,13 @@ if not exist "%cmder_install_path%" Installer\win32_7za.exe x -y -o%cmder_instal REM REM Cmder User Profile REM -set cmder_user_profile_install_path=Cmder\config\user_profile.cmd set cmder_user_profile=Installer\win32_cmder_user_profile.cmd +set cmder_user_profile_install_path=%cmder_root%\config +set cmder_user_profile_install_dest=%cmder_user_profile_install_path%\user_profile.cmd + echo - Copy %cmder_user_profile% to %cmder_user_profile_install_path% -copy /Y %cmder_user_profile% %cmder_user_profile_install_path% > NUL +if not exist "%cmder_user_profile_install_path%" mkdir "%cmder_user_profile_install_path%" +copy /Y %cmder_user_profile% %cmder_user_profile_install_dest% > NUL REM REM GVim @@ -71,6 +76,20 @@ if not exist "%clang_format_file%" powershell -Command "[Net.ServicePointManager echo - Copy Installer\win32_clang_format.exe to %cmder_install_path%\bin\clang-format.exe copy /Y Installer\win32_clang_format.exe %cmder_install_path%\bin\clang-format.exe +REM +REM Python +REM +set python_version=3.6.5 +set python_url=https://www.python.org/ftp/python/%python_version%/python-%python_version%-embed-amd64.zip +set python_zip=python-%python_version%-embed-amd64.zip +set python_zip_dest=Installer\%python_zip% +set python_dest=%cmder_root%\bin\python +echo - Downloading from %python_url% to %python_zip_dest% +if not exist "%python_zip_dest%" powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest %python_url% -OutFile %python_zip_dest%" + +echo - Unzip %python_zip_dest% to %python_dest% +if not exist "%python_dest%" Installer\win32_7za.exe x -y -o%python_dest% %python_zip_dest% > NUL + REM REM ctags, scanmapset (bind capslock to escape via registry), uncap (bind capslock to escape whilst program running shim) REM