python update
This commit is contained in:
parent
2a2fc4b258
commit
c5f971f10c
@ -186,7 +186,7 @@ nnoremap <A-p> :cp<CR>
|
||||
|
||||
" Fullscreen
|
||||
if s:running_windows
|
||||
noremap <f11> <esc>:call libcallnr('gvim_fullscreen.dll', 'ToggleFullscreen', 0)<cr>
|
||||
noremap <f11> <esc>:call libcallnr('gvim_fullscreen.dll', 'ToggleFullScreen', 0)<cr>
|
||||
endif
|
||||
|
||||
" ==============================================================================
|
||||
@ -211,8 +211,8 @@ noremap <C-F> :<C-U><C-R>=printf("Leaderf! rg -e %s ", expand("<cword>"))<CR>
|
||||
" Clang Format
|
||||
" ==============================================================================
|
||||
if s:running_windows
|
||||
map <C-I> :py3f $home\.vim\clang-format.py<CR>
|
||||
imap <C-I> <ESC>:py3f $home\.vim\clang-format.py<CR>i
|
||||
map <C-I> :py3f $home\vimfiles\clang-format.py<CR>
|
||||
imap <C-I> <ESC>:py3f $home\vimfiles\clang-format.py<CR>i
|
||||
else
|
||||
map <C-I> :py3f ~/.vim/clang-format.py<CR>
|
||||
imap <C-I> <ESC>:py3f ~/.vim/clang-format.py<CR>i
|
||||
|
@ -17,8 +17,9 @@
|
||||
:: %ccall% "/customOption" "command/program"
|
||||
|
||||
@echo off
|
||||
set PATH=%cmder_root%\bin\python;%cmder_root%\bin\python\Scripts;%PATH%
|
||||
set HOME=%cmder_root%\..\Home
|
||||
set HOMEPATH=%cmder_root%\..\Home
|
||||
set USERPROFILE=%cmder_root%\..\Home
|
||||
alias gvim=%cmder_root%\..\GVim\gVimPortable.exe $*
|
||||
call %cmder_root%\..\Tools\WPy64-3902\scripts\env.bat
|
||||
|
||||
alias gvim=%cmder_root%\..\Tools\GVim\gvim_noOLE.exe $*
|
||||
|
Binary file not shown.
6
win32_cleanup.bat
Normal file
6
win32_cleanup.bat
Normal file
@ -0,0 +1,6 @@
|
||||
rmdir /Q /S Cmder
|
||||
rmdir /Q /S Tools/winpython39_x64
|
||||
rmdir /Q /S Tools/GVim
|
||||
rmdir /Q /S Tools/Compiler/zig-x86_64
|
||||
rmdir /Q /S Tools/Compiler/generate_msvc17_toolchain.bat
|
||||
rmdir /Q /S GVim
|
@ -1,134 +1,156 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
set root=%~dp0
|
||||
set home=%root%\home
|
||||
set cmder_root=%root%\Cmder
|
||||
set installer_root=%root%\Installer
|
||||
set vim_root=%home%\vimfiles
|
||||
set tools_root=%root%\Tools
|
||||
set compiler_root=%tools_root%\Compiler
|
||||
|
||||
if not exist %home% mkdir %home%
|
||||
if not exist %installer_root% mkdir %installer_root%
|
||||
if not exist %tools_root% mkdir %tools_root%
|
||||
if not exist %compiler_root% mkdir %compiler_root%
|
||||
|
||||
REM
|
||||
REM Cmder
|
||||
REM
|
||||
set cmder_version=v1.3.16
|
||||
set cmder_url=https://github.com/cmderdev/cmder/releases/download/%cmder_version%/cmder.7z
|
||||
set cmder_zip=Installer\win32_cmder_%cmder_version%.7z
|
||||
set cmder_install_path=Cmder
|
||||
set cmder_zip=%installer_root%\win32_cmder_%cmder_version%.7z
|
||||
|
||||
echo - Downloading from %cmder_url% to %cmder_zip%
|
||||
if not exist "%cmder_zip%" powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest %cmder_url% -OutFile %cmder_zip%"
|
||||
if not exist "%cmder_zip%" echo Failed to download cmder, exiting.
|
||||
if not exist "%cmder_zip%" goto :eof
|
||||
|
||||
echo - Extracting %cmder_zip% to %cmder_install_path%
|
||||
if not exist "%cmder_install_path%" Installer\win32_7za.exe x -y -o%cmder_install_path% %cmder_zip% > NUL
|
||||
echo - Extracting %cmder_zip% to %cmder_root%
|
||||
if not exist "%cmder_root%" %installer_root%\win32_7za.exe x -y -o%cmder_root% %cmder_zip% > NUL
|
||||
|
||||
REM
|
||||
REM Cmder User Profile
|
||||
REM
|
||||
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
|
||||
set cmder_user_profile=%installer_root%\win32_cmder_user_profile.cmd
|
||||
set cmder_user_profile_install_dir=%cmder_root%\config
|
||||
set cmder_user_profile_install_file=%cmder_user_profile_install_dir%\user_profile.cmd
|
||||
|
||||
echo - Copy %cmder_user_profile% to %cmder_user_profile_install_path%
|
||||
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
|
||||
echo - Copy %cmder_user_profile% to %cmder_user_profile_install_dir%
|
||||
if not exist "%cmder_user_profile_install_dir%" mkdir "%cmder_user_profile_install_dir%"
|
||||
copy /Y %cmder_user_profile% %cmder_user_profile_install_file% > NUL
|
||||
|
||||
REM
|
||||
REM GVim
|
||||
REM
|
||||
set vim_install_path=GVim
|
||||
set vim_zip=Installer\win32_GVim_v8.2.paf.7z
|
||||
set gvim_url=https://tuxproject.de/projects/vim/complete-x64.7z
|
||||
set gvim_zip=%installer_root%\win32_gvim_x64.7z
|
||||
set gvim_dir=%tools_root%\GVim
|
||||
|
||||
echo - Extracting %vim_zip% to %vim_install_path%
|
||||
if not exist "%vim_install_path%" Installer\win32_7za.exe x -y -o%vim_install_path% %vim_zip% > NUL
|
||||
echo - Downloading from %gvim_url% to %gvim_zip%
|
||||
if not exist "%gvim_zip%" powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest %gvim_url% -OutFile %gvim_zip%"
|
||||
if not exist "%gvim_zip%" echo Failed to download GVim, exiting.
|
||||
if not exist "%gvim_zip%" goto :eof
|
||||
|
||||
if not exist %gvim_dir% %installer_root%\win32_7za.exe x -y -o%gvim_dir% %gvim_zip% > NUL
|
||||
|
||||
REM
|
||||
REM Vim Plug
|
||||
REM
|
||||
set vim_root=GVim\Data\settings
|
||||
set vim_plug_url=https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
set vim_plug_install_path=%vim_root%\vimfiles\autoload
|
||||
set vim_plug_file=%vim_plug_install_path%\plug.vim
|
||||
set vim_plug_install_dir=%vim_root%\autoload
|
||||
set vim_plug_file=%vim_plug_install_dir%\plug.vim
|
||||
if not exist "%vim_plug_install_dir%" mkdir "%vim_plug_install_dir%"
|
||||
|
||||
echo - Downloading from %vim_plug_url% to %vim_plug_install_path%
|
||||
if not exist "%vim_plug_install_path%" mkdir "%vim_plug_install_path%"
|
||||
echo - Downloading from %vim_plug_url% to %vim_plug_install_dir%
|
||||
if not exist "%vim_plug_file%" powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest %vim_plug_url% -OutFile %vim_plug_file%"
|
||||
if not exist "%vim_plug_file%" echo Failed to download Vim Plug, exiting.
|
||||
if not exist "%vim_plug_file%" goto :eof
|
||||
|
||||
REM
|
||||
REM GVim Fullscreen DLL
|
||||
REM
|
||||
set gvim_fullscreen_dll=Installer\win32_gvim_fullscreen.dll
|
||||
set gvim_fullscreen_dll_install_path=GVim\App\vim\vim80\gvim_fullscreen.dll
|
||||
echo - Copy %gvim_fullscreen_dll% to %gvim_fullscreen_dll_install_path%
|
||||
copy /Y %gvim_fullscreen_dll% %gvim_fullscreen_dll_install_path%
|
||||
set gvim_fullscreen_dll=%installer_root%\win32_gvim_fullscreen.dll
|
||||
set gvim_fullscreen_dll_install=%gvim_dir%\gvim_fullscreen.dll
|
||||
echo - Copy %gvim_fullscreen_dll% to %gvim_fullscreen_dll_install%
|
||||
copy /Y %gvim_fullscreen_dll% %gvim_fullscreen_dll_install%
|
||||
|
||||
REM
|
||||
REM vimrc
|
||||
REM
|
||||
echo - Copy Installer\_vimrc to %vim_root%
|
||||
copy /Y Installer\_vimrc %vim_root% > NUL
|
||||
echo - Copy %installer_root%\_vimrc to %home%
|
||||
copy /Y %installer_root%\_vimrc %home% > NUL
|
||||
|
||||
REM
|
||||
REM Clang Format
|
||||
REM
|
||||
set clang_format_url=https://raw.githubusercontent.com/llvm-mirror/clang/master/tools/clang-format/clang-format.py
|
||||
set clang_format_path=%vim_root%\.vim
|
||||
set clang_format_file=%clang_format_path%\clang-format.py
|
||||
echo - Downloading from %clang_format_url% to %clang_format_path%
|
||||
if not exist "%clang_format_path%" mkdir "%clang_format_path%"
|
||||
set clang_format_url=https://raw.githubusercontent.com/llvm/llvm-project/master/clang/tools/clang-format/clang-format.py
|
||||
set clang_format_file=%vim_root%\clang-format.py
|
||||
echo - Downloading from %clang_format_url% to %vim_root%
|
||||
if not exist "%clang_format_file%" powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest %clang_format_url% -OutFile %clang_format_file%"
|
||||
if not exist "%clang_format_file%" echo Failed to download Clang-Format, exiting.
|
||||
if not exist "%clang_format_file%" goto :eof
|
||||
|
||||
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_zip=python-%python_version%-embed-win32.zip
|
||||
set python_url=https://www.python.org/ftp/python/%python_version%/%python_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 Python Pip Setup
|
||||
set python_pth_file=Installer\win32_python36._pth
|
||||
set python_pth_dest_file=%python_dest%\python36._pth
|
||||
echo - Copy %python_pth_file% to %python_pth_dest_file%
|
||||
copy /Y %python_pth_file% %python_pth_dest_file% > NUL
|
||||
|
||||
REM Python Pip
|
||||
set python_pip_url=https://bootstrap.pypa.io/get-pip.py
|
||||
set python_pip_file=%python_dest%\get-pip.py
|
||||
echo - Downloading from %python_pip_url% to %python_pip_file%
|
||||
if not exist "%python_pip_file%" powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest %python_pip_url% -OutFile %python_pip_file%"
|
||||
if not exist "%python_dest%\Scripts\pip.exe" %python_dest%\python %python_pip_file%
|
||||
echo - Copy Installer\win32_clang_format.exe to %cmder_root%\bin\clang-format.exe
|
||||
copy /Y %installer_root%\win32_clang_format.exe %cmder_root%\bin\clang-format.exe
|
||||
|
||||
REM
|
||||
REM ctags, scanmapset (bind capslock to escape via registry), uncap (bind capslock to escape whilst program running shim)
|
||||
REM
|
||||
set ctags_path=%cmder_install_path%\bin\ctags.exe
|
||||
set scanmapset_path=%cmder_install_path%\bin\scanmapset.exe
|
||||
set uncap_path=%cmder_install_path%\bin\uncap.exe
|
||||
set ctags_dir=%cmder_root%\bin\ctags.exe
|
||||
set scanmapset_dir=%cmder_root%\bin\scanmapset.exe
|
||||
set uncap_dir=%cmder_root%\bin\uncap.exe
|
||||
|
||||
set ctags_file=Installer\win32_ctags.exe
|
||||
set scanmapset_file=Installer\win32_scanmapset.exe
|
||||
set uncap_file=Installer\win32_uncap.exe
|
||||
set ctags_file=%installer_root%\win32_ctags.exe
|
||||
set scanmapset_file=%installer_root%\win32_scanmapset.exe
|
||||
set uncap_file=%installer_root%\win32_uncap.exe
|
||||
|
||||
echo - Copy %ctags_file% to %ctags_path%
|
||||
echo - Copy %scanmapset_file% to %scanmapset_path%
|
||||
echo - Copy %uncap_file% to %uncap_path%
|
||||
echo - Copy %ctags_file% to %ctags_dir%
|
||||
echo - Copy %scanmapset_file% to %scanmapset_dir%
|
||||
echo - Copy %uncap_file% to %uncap_dir%
|
||||
|
||||
copy /Y %ctags_file% %ctags_path%
|
||||
copy /Y %scanmapset_file% %scanmapset_path%
|
||||
copy /Y %uncap_file% %uncap_path%
|
||||
copy /Y %ctags_file% %ctags_dir%
|
||||
copy /Y %scanmapset_file% %scanmapset_dir%
|
||||
copy /Y %uncap_file% %uncap_dir%
|
||||
|
||||
REM
|
||||
REM ripgrep
|
||||
REM
|
||||
set rg_path=%cmder_install_path%\bin
|
||||
set rg_zip=Installer\win32_rg_v12.1.1.7z
|
||||
echo - Extracting %rg_zip% to %rg_path%
|
||||
if not exist "%rg_path%\rg.exe" Installer\win32_7za.exe x -y -o%rg_path% %rg_zip% > NUL
|
||||
set rg_dir=%cmder_root%\bin
|
||||
set rg_zip=%installer_root%\win32_rg_v12.1.1.7z
|
||||
echo - Extracting %rg_zip% to %rg_dir%
|
||||
if not exist "%rg_dir%\rg.exe" %installer_root%\win32_7za.exe x -y -o%rg_dir% %rg_zip% > NUL
|
||||
|
||||
if not exist %cmder_root%\..\Home mkdir %cmder_root%\..\Home
|
||||
|
||||
REM
|
||||
REM Zig
|
||||
REM
|
||||
set zig_version=0.6.0
|
||||
set zig_zip=zig-windows-x86_64-%zig_version%.zip
|
||||
set zig_url=https://ziglang.org/download/%zig_version%/%zig_zip%
|
||||
set zig_zip_installer=%installer_root%\win32_%zig_zip%
|
||||
set zig_zip_install_path=%compiler_root%\zig-x86_64
|
||||
|
||||
echo - Downloading from %zig_url% to %zig_zip_installer%
|
||||
if not exist "%zig_zip_installer%" powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest %zig_url% -OutFile %zig_zip_installer%"
|
||||
if not exist "%zig_zip_installer%" echo Failed to download Zig, exiting.
|
||||
if not exist "%zig_zip_installer%" goto :eof
|
||||
|
||||
echo - Unzip %zig_zip_installer% to %zig_zip_install_path%
|
||||
if not exist %zig_zip_install_path% %installer_root%\win32_7za.exe x -y -o%zig_zip_install_path% %zig_zip_installer% > NUL
|
||||
|
||||
REM
|
||||
REM Python
|
||||
REM
|
||||
set python_url=https://github.com/winpython/winpython/releases/download/3.0.20201028/Winpython64-3.9.0.2dot.exe
|
||||
set python_zip_installer=%installer_root%\win32_Winpython64dot.exe
|
||||
set python_zip_install_path=%tools_root%\WPy64-3902
|
||||
|
||||
echo - Downloading from %python_url% to %python_zip_installer%
|
||||
if not exist "%python_zip_installer%" powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest %python_url% -OutFile %python_zip_installer%"
|
||||
if not exist "%python_zip_installer%" echo Failed to download Zig, exiting.
|
||||
if not exist "%python_zip_installer%" goto :eof
|
||||
|
||||
echo - Unzip %python_zip_installer% to %python_zip_install_path%
|
||||
if not exist %python_zip_install_path% %installer_root%\win32_7za.exe x -y -o%tools_root% %python_zip_installer% > NUL
|
||||
|
Loading…
Reference in New Issue
Block a user