Merge branch 'master' of github.com:doy-lee/doy-lee into master

Make setup script smarter
This commit is contained in:
doyle 2021-07-15 17:59:24 +10:00
commit 5c5d8f3e21
3 changed files with 27 additions and 6 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
Home
Cmder
Downloads

Binary file not shown.

View File

@ -5,12 +5,14 @@ set root=%~dp0
set home=!root!\home
set cmder_root=!root!\Cmder
set installer_root=!root!\Installer
set downloads_root=!installer_root!\Downloads
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 !downloads_root! mkdir !downloads_root!
if not exist !tools_root! mkdir !tools_root!
if not exist !compiler_root! mkdir !compiler_root!
@ -18,7 +20,7 @@ REM ----------------------------------------------------------------------------
REM Cmder
REM ----------------------------------------------------------------------------
set cmder_version=v1.3.16
set cmder_zip=!installer_root!\win32_cmder_!cmder_version!.7z
set cmder_zip=!downloads_root!\win32_cmder_!cmder_version!.7z
call :DownloadFile https://github.com/cmderdev/cmder/releases/download/!cmder_version!/cmder.7z "!cmder_zip!" || exit /b
call :Unzip "!cmder_zip!" "!cmder_root!" || exit /b
@ -39,7 +41,7 @@ call :CopyFile "!installer_root!\clang-format-style-file" "!home!\_clang-format"
REM ----------------------------------------------------------------------------
REM GVim, Vim Plug, Vim Config
REM ----------------------------------------------------------------------------
set gvim_zip=!installer_root!\win32_gvim_x64.7z
set gvim_zip=!downloads_root!\win32_gvim_x64.7z
set gvim_path=!tools_root!\GVim
call :DownloadFile https://tuxproject.de/projects/vim/complete-x64.7z !gvim_zip! || exit /b
call :Unzip "!gvim_zip!" "!gvim_path!" || exit /b
@ -58,9 +60,25 @@ call :DownloadFile https://raw.githubusercontent.com/llvm/llvm-project/main/clan
REM ----------------------------------------------------------------------------
REM ripgrep
REM ----------------------------------------------------------------------------
set rg_zip=!installer_root!\win32_rg_v12.1.1.7z
set rg_sha256=a47ace6f654c5ffa236792fc3ee3fefd9c7e88e026928b44da801acb72124aa8
set rg_version=13.0.0
set rg_zip=!downloads_root!\win32_rg_v!rg_version!.7z
set rg_exe=!cmder_root!\bin\rg.exe
call :Unzip "!rg_zip!" "!cmder_root!\bin" || exit /b
call :DownloadFile https://github.com/BurntSushi/ripgrep/releases/download/!rg_version!/ripgrep-!rg_version!-x86_64-pc-windows-msvc.zip !rg_zip! || exit /b
call :VerifyFile !rg_zip! !rg_sha256!
call :Unzip "!rg_zip!" "!rg_exe!" || exit /b
REM ----------------------------------------------------------------------------
REM everything (void tools search program)
REM ----------------------------------------------------------------------------
set everything_sha256=f61b601acba59d61fb0631a654e48a564db34e279b6f2cc45e20a42ce9d9c466
set everything_version=1.4.1.1009
set everything_zip=!downloads_root!\win32_everything_v!everything_version!.7z
set everything_exe=!cmder_root!\bin\everything.exe
call :DownloadFile https://www.voidtools.com/Everything-!everything_version!.x64.zip !everything_zip! || exit /B
call :VerifyFile !everything_zip! !everything_sha256! || exit /B
REM TODO(doyle): Doesn't work because the cache is not smart
call :Unzip "!everything_zip!" "!tools_root!" || exit /B
REM ----------------------------------------------------------------------------
REM Zig
@ -68,7 +86,7 @@ REM ----------------------------------------------------------------------------
set zig_sha256=8580fbbf3afb72e9b495c7f8aeac752a03475ae0bbcf5d787f3775c7e1f4f807
set zig_version=0.8.0
set zig_file=zig-windows-x86_64-!zig_version!.zip
set zig_zip=!installer_root!\win32_!zig_file!
set zig_zip=!downloads_root!\win32_!zig_file!
set zig_path=!compiler_root!\zig-windows-x86_64-!zig_version!
call :DownloadFile https://ziglang.org/download/!zig_version!/!zig_file! !zig_zip! || exit /b
call :VerifyFile !zig_zip! !zig_sha256!
@ -80,7 +98,7 @@ REM ----------------------------------------------------------------------------
set python_version=3.9.0.2dot
set python_version_nodot=3902
set python_url=https://github.com/winpython/winpython/releases/download/3.0.20201028/Winpython64-!python_version!.exe
set python_zip=!installer_root!\win32_Winpython64-!python_version!.exe
set python_zip=!downloads_root!\win32_Winpython64-!python_version!.exe
set python_path=!tools_root!\WPy64-!python_version_nodot!
call :DownloadFile !python_url! "!python_zip!" || exit /b
call :Unzip "!python_zip!" "!tools_root!" || exit /b