Update development environment

This commit is contained in:
doyle 2020-07-20 23:27:23 +10:00
parent de1aceccce
commit 2f4cfb319c
10 changed files with 5603 additions and 0 deletions

View File

@ -0,0 +1,99 @@
REM
REM Generate Standalone MSVC17 x86/x64 Toolchain from VS Installation
REM
REM Collects the necessary includes, binaries, DLLs and libs to around ~300mb on
REM disk from a VS installation that can invoke cl, and link as you typically
REM would after calling "vcvarsall.bat x64"
REM
REM This script generates the helper scripts within the generated toolchain.
REM cl_[x64|x86].bat: Invokes the compiler with required environment variables set
REM link_[x64|x86}.bat: Invokes the linker with required environment variables set
REM msvc_env_[x64|x86].bat: Setups the environment variables for the toolchain.
REM i.e. "call msvc_env_x64.bat" to set the current
REM session's environment variables for compiling with
REM the toolchain, akin to "vcvarsall.bat x64"
REM
REM Information about the necessary files and steps adapted from
REM Krouzu's Isolating MSVC19 https://gist.github.com/krouzu/19ddd4cb989264b11c7b3ba48c159be0
REM Paul Houle's Isolating MSVC14 Script
REM
REM For other Visual Studio versions, you may need to update the version numbers.
REM
@echo off
setlocal
REM Configuration (NOTE: Update arch to either, "x86", "x64" or "x86 x64" for both toolchains).
set arch=x64
REM Source Directories (NOTE: Update the directories for your desired version)
set vs1=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023
set vs2=C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0
set vs3=C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0
set vs4=C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0
set dll1=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\api-ms-win-*.dll
set dll2=C:\Windows\System32\*140*.dll
set dll3=C:\Windows\System32\ucrtbase*.dll
set dll4=C:\Windows\System32\VsGraphicsHelper.dll
REM Destination Directory
set dest=%~1
if "%dest%"=="" echo Usage: %~nx0 ^<output folder^>
if "%dest%"=="" goto :eof
if exist "%dest%" echo Directory "%dest%" already exists, exiting.
if exist "%dest%" goto :eof
REM Path/File Exist Check
for %%a in ("%vs1%" "%vs2%" "%dll1%" "%dll2%" "%dll3%" "%dll4%" "%vs3%" "%vs4%") do (
if not exist %%a echo Required file or path not found: %%a
if not exist %%a goto :eof
)
set copy_cmd=xcopy /I /S
REM MSVC Includes
%copy_cmd% "%vs1%\include" "%dest%\include"
%copy_cmd% "%vs3%\ucrt\*" "%dest%\include"
%copy_cmd% "%vs3%\shared\*" "%dest%\sdk\include"
%copy_cmd% "%vs3%\um\*" "%dest%\sdk\include"
REM MSVC Binaries/Libraries/DLLs
for %%a in (%arch%) do (
%copy_cmd% "%vs1%\bin\Hostx64\%%a" "%dest%\bin\%%a"
%copy_cmd% "%vs1%\lib\%%a" "%dest%\lib\%%a"
%copy_cmd% "%vs2%\%%a" "%dest%\sdk\bin\%%a"
%copy_cmd% "%vs4%\ucrt\%%a" "%dest%\lib\%%a"
%copy_cmd% "%vs4%\um\%%a" "%dest%\sdk\lib\%%a"
%copy_cmd% "%dll1%" "%dest%\sdk\bin\%%a"
%copy_cmd% "%dll2%" "%dest%\sdk\bin\%%a"
%copy_cmd% "%dll3%" "%dest%\sdk\bin\%%a"
%copy_cmd% "%dll4%" "%dest%\sdk\bin\%%a"
REM Generate Compiler/Linker Scripts
setlocal EnableDelayedExpansion
set msvc_env_script="%dest%\msvc_env_%%a.bat"
set cl_script="%dest%\cl_%%a.bat"
set link_script="%dest%\link_%%a.bat"
for %%b in (!msvc_env_script! !cl_script! !link_script!) do (
echo @echo off>> %%b
)
for %%b in (!cl_script! !link_script!) do (
echo setlocal>> %%b
)
for %%b in (!msvc_env_script! !cl_script! !link_script!) do (
echo set msvc_root=%%~dp0>> %%b
echo set include=%%msvc_root%%\include;%%msvc_root%%\sdk\include>> %%b
echo set lib=%%msvc_root%%\lib\%%a;%%msvc_root%%\sdk\lib\%%a>> %%b
echo set path=%%msvc_root%%\bin\%%a;%%path%%>> %%b
)
echo cl %%*>> !cl_script!
echo link %%*>> !link_script!
)

View File

@ -6,6 +6,7 @@ let g:myvimdir ="~/.vim"
if s:running_windows
let g:myvimdir ="~/vimfiles"
<<<<<<< HEAD:.vimrc
endif
" Use Vim settings over Vi settings
@ -19,6 +20,12 @@ if s:running_windows
call plug#begin('~/vimfiles/plugged')
else
call plug#begin('~/.vim/plugged')
=======
silent! call plug#begin('~/vimfiles/plugged')
else
let g:myvimdir ="~/.vim"
silent! call plug#begin('~/.vim/plugged')
>>>>>>> d28479c... Update development environment:Installer/_vimrc
endif
" {on} Means to lazy-load when that command is invoked

2699
Installer/plug.vim Normal file

File diff suppressed because it is too large Load Diff

BIN
Installer/win32_7za.exe Normal file

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,20 @@
:: use this file to run your own startup commands
:: use in front of the command to prevent printing the command
:: uncomment this to have the ssh agent load when cmder starts
:: call "%GIT_INSTALL_ROOT%/cmd/start-ssh-agent.cmd" /k exit
:: uncomment the next two lines to use pageant as the ssh authentication agent
:: SET SSH_AUTH_SOCK=/tmp/.ssh-pageant-auth-sock
:: call "%GIT_INSTALL_ROOT%/cmd/start-ssh-pageant.cmd"
:: you can add your plugins to the cmder path like so
:: set "PATH=%CMDER_ROOT%\vendor\whatever;%PATH%"
:: arguments in this batch are passed from init.bat, you can quickly parse them like so:
:: more useage can be seen by typing "cexec /?"
:: %ccall% "/customOption" "command/program"
@echo off
alias gvim=%cmder_root%\..\GVim\gVimPortable.exe $*

Binary file not shown.

2699
Installer/win32_plug.vim Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,17 @@
wget --directory-prefix=../.vim/autoload https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
cp -f .vimrc ~/.vimrc
<<<<<<< HEAD:linux_setup.sh
sudo apt install tmux
=======
if [[ ! -f "${HOME}/.vim/clang-format.py" ]]; then
wget --directory-prefix=${HOME}/.vim https://raw.githubusercontent.com/llvm-mirror/clang/master/tools/clang-format/clang-format.py
fi
cp -f Installer/_vimrc ~/.vimrc
sudo apt install silversearcher-ag tmux exuberant-ctags neovim clang-format
>>>>>>> d28479c... Update development environment:linux_install.sh
cat > ~/.tmux.conf <<EOF
set-option -g mouse on

69
win32_install.bat Normal file
View File

@ -0,0 +1,69 @@
@echo off
REM
REM Cmder
REM
set cmder_version=v1.3.15
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
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
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
echo - Copy %cmder_user_profile% to %cmder_user_profile_install_path%
copy /Y %cmder_user_profile% %cmder_user_profile_install_path% > NUL
REM
REM GVim
REM
set vim_install_path=GVim
set vim_zip=Installer\win32_GVim_v8.2.paf.7z
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
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
echo - Downloading from %vim_plug_url% to %vim_plug_install_path%
if not exist "%vim_plug_install_path%" mkdir "%vim_plug_install_path%"
if not exist "%vim_plug_file%" powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest %vim_plug_url% -OutFile %vim_plug_file%"
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\gvimfullscreen.dll
echo - Copy %gvim_fullscreen_dll% to %gvim_fullscreen_dll_install_path%
copy /Y %gvim_fullscreen_dll% %gvim_fullscreen_dll_install_path%
REM
REM vimrc
REM
echo - Copy Installer\_vimrc to %vim_root%
copy /Y Installer\_vimrc %vim_root% > 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%\vimfiles
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%"
if not exist "%clang_format_file%" powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest %clang_format_url% -OutFile %clang_format_file%"