Repository navigation
Expand file tree
/
Copy pathinstall.bat
More file actions
115 lines (93 loc) · 3.34 KB
/
Copy pathinstall.bat
File metadata and controls
115 lines (93 loc) · 3.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
echo off
rem vimrc install script for Windows 10 or above
rem (on Windows 7 sort.exe and curl.exe need to be installed manually)
rem
rem Prerequisites:
rem gvim, 7zip
rem Windows 10 or above
rem %HOME% has be set to C:\Users\{your windows user directory}
rem
if not exist C:\"Program Files"\7-Zip\7z.exe (
echo PLEASE INSTALL 7Z INTO C:\"PROGRAM FILES"\7-ZIP
goto quit
)
rem Check if this batch file runs under vimrc directory
if not exist .vimrc goto quit
if not exist .cncpp.vimrc goto quit
if not exist .system.vimrc goto quit
if not exist mkctags.sh goto quit
if not exist mkcscope.sh goto quit
if not exist rmtags.sh goto quit
if not exist vim.bat goto quit
if not exist vi.bat goto quit
rem accessible %HOME% is needed
rem recommeded %HOME% is C:\Users\{your windows user directory}
if not exist "%HOME%" goto quit
rem Removing previously installed links
if exist %HOME%\.vimrc del %HOME%\.vimrc
if exist %HOME%\.cncpp.vimrc del %HOME%\.cncpp.vimrc
if exist %HOME%\.system.vimrc del %HOME%\.system.vimrc
rem Removing previously installed directory .vim
if exist %HOME%\.vim rd /S /Q %HOME%\.vim
rem *COPYING* .vimrc files
echo F | xcopy .vimrc /A /Y %HOME%\.vimrc
echo F | xcopy .cncpp.vimrc /A /Y %HOME%\.cncpp.vimrc
echo F | xcopy .system.vimrc.windows /A /Y %HOME%\.system.vimrc
rem Install Vundle
git clone https://github.com/VundleVim/Vundle.vim.git ^
%HOME%/.vim/bundle/Vundle.vim
rem Removing previously installed directory .vim_tools
if exist %HOME%\.vim_tools rd /S /Q %HOME%\.vim_tools
mkdir %HOME%\.vim_tools
echo F | xcopy mkctags.bat /A /Y %HOME%\.vim_tools\mkctags.bat
echo F | xcopy mkcscope.bat /A /Y %HOME%\.vim_tools\mkcscope.bat
echo F | xcopy rmtags.bat /A /Y %HOME%\.vim_tools\rmtags.bat
echo F | xcopy vim.bat /A /Y %HOME%\.vim_tools\vim.bat
echo F | xcopy vi.bat /A /Y %HOME%\.vim_tools\vi.bat
curl -o %HOME%\.vim_tools\cscope-15.8a-win64rev1-static.zip ^
https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com^
/cscope-win32/cscope-15.8a-win64rev1-static.zip
if not exist "%HOME%\.vim_tools\cscope-15.8a-win64rev1-static.zip" (
echo DOWNLOADING OF CSCOPE HAS BEEN FAILED!
goto quit
)
C:\"Program Files"\7-Zip\7z x ^
%HOME%\.vim_tools\cscope-15.8a-win64rev1-static.zip -o%HOME%\.vim_tools
if not exist %HOME%\.vim_tools\cscope.exe (
echo UNZIPPING CSCOPE HAS BEEN FAILED!
goto quit
)
curl -o %HOME%\.vim_tools\ctags58.zip ^
https://jaist.dl.sourceforge.net/project/ctags/ctags/5.8/ctags58.zip?viasf=1
if not exist "%HOME%\.vim_tools\ctags58.zip" (
echo DOWNLOADING OF CTAGS HAS BEEN FAILED!
goto quit
)
C:\"Program Files"\7-Zip\7z x %HOME%\.vim_tools\ctags58.zip -o%HOME%\.vim_tools
if not exist %HOME%\.vim_tools\ctags58 (
echo UNZIPPING CTAGS HAS BEEN FAILED!
goto quit
)
echo F | xcopy %HOME%\.vim_tools\ctags58\ctags.exe %HOME%\.vim_tools\ctags.exe
if not exist %HOME%\.vim_tools\ctags.exe (
echo COPYING CTAGS HAS BEEN FAILED!
goto quit
)
echo I
echo I
echo I
echo ==============================================
echo INSTALLING VIMRC HAS BEEN COMPLETED!!!
echo I
echo I
echo Now you need to :
echo 1. Open vim and :PluginInstall yourself!
echo 2. Add %HOME%\.vim_tools to your PATH
echo ==============================================
echo I
echo I
echo I
exit /B
:quit
echo run this batch file under vimrc directory
echo variable HOME has to be set