-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.bat
225 lines (206 loc) · 10.2 KB
/
install.bat
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
@echo off
rem scoop
rem scoopをインストールします。
rem powershell3がインストールされていることを確認してください。
rem @powershell -Command "set-executionpolicy unrestricted -s cu"
rem @powershell -Command "iex (new-object net.webclient).downloadstring('https://get.scoop.sh')"
rem git-for-windows-sdkをインストールしてください。
rem (git-for-windows-sdkではpacmanのついたmsysがインストールされます)
rem scoop bucket add extras
rem scoop bucket add my-bucket https://github.com/zeero/scoop-my-bucket.git
rem scoop install git-for-windows-sdk
rem chocolatey
rem chocolateyをインストールします。
rem @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))"
rem set PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
rem dotfilesをダウンロードします。
rem git clone https://github.com/zeero/dotfiles.git
set DOTFILES=%~dp0
setx DOTFILES %~dp0
cd /d %DOTFILES%
rem mkdir
mkdir %HOMEDRIVE%%HOMEPATH%\bin
mkdir %HOMEDRIVE%%HOMEPATH%\tmp
mkdir %HOMEDRIVE%%HOMEPATH%\lib
mkdir %HOMEDRIVE%%HOMEPATH%\.config
rem setx
set HOME=%HOMEDRIVE%%HOMEPATH%
setx HOME %HOMEDRIVE%%HOMEPATH%
set XDG_CONFIG_HOME=%HOMEDRIVE%%HOMEPATH%\.config
setx XDG_CONFIG_HOME %HOMEDRIVE%%HOMEPATH%\.config
rem このスクリプト内での一時的なPATH追加
set PATH=%HOME%\bin;%HOME%\lib\git-sdk-32\mingw32\bin;%HOME%\lib\git-sdk-32\usr\bin;%PATH%
echo 以下を環境変数PATHに追加してください
echo %HOME%\bin;%HOME%\lib\git-sdk-32\mingw64\bin;%HOME%\lib\git-sdk-32\mingw32\bin;%HOME%\lib\git-sdk-32\usr\bin
pause
echo.
rem scoop
scoop install sudo
scoop install 7zip
scoop install firefox
scoop install nodejs
scoop install ruby
scoop install lua
rem git-for-windows-sdkを素で呼ぶとssl_comp_free_compression_methodsがないみたいなエラーが出る場合はscoopでもgitを入れる
scoop install git openssh
rem scoop-my-bucket
scoop install gvim-kaoriya
scoop install sakura
scoop install a5m2
scoop install clipnote
scoop install explzh
scoop install honeyview
scoop install keyswap
scoop install kiki
scoop install mausuji
scoop install magnet_window
scoop install softtilt
scoop install wheel_redirector
scoop install cmigemo
scoop install nkf
scoop install mktemp
scoop install df
scoop install pathcp
scoop install madonote
REM TODO: 要検証
scoop install mactype
REM TODO: 要調整
REM scoop install tortoisesvn
REM scoop install tortoisesvn_ja
scoop install screenpresso
rem chocolatey
choco install GoogleChrome -y
choco install GoogleJapaneseInput -y
choco install winscp -y
choco install tortoisesvn -y
choco install neovim -y
REM mingwへの移行に伴い不要候補
REM choco install putty -y -ia "/DIR=%HOMEDRIVE%%HOMEPATH%\lib\choco\putty"
REM choco install teraterm -y -ia "/DIR=%HOMEDRIVE%%HOMEPATH%\lib\choco\teraterm"
REM choco install ConEmu -y -ia "/DIR=%HOMEDRIVE%%HOMEPATH%\lib\choco\ConEmu"
REM choco install clink -y -ia "/DIR=%HOMEDRIVE%%HOMEPATH%\lib\choco\clink"
REM choco install Gow -y -ia "/DIR=%HOMEDRIVE%%HOMEPATH%\lib\choco\Gow"
REM wget
REM curl
REM TODO: コマンド実行できるか確認
REM bash msys2_install.sh
rem git configuration
git config --global user.name zeero
git config --global user.email zeero26@gmail.com
git config --global credential.helper manager
git config --global push.default simple
git config --global http.sslVerify false
git config --global core.excludesfile ~/.gitignore
git config --global core.autocrlf false
git config --global core.editor vim
git config --global diff.tool vimdiff
git config --global diff.algorithm histogram
git config --global merge.tool vimdiff
git config --global alias.co "checkout"
git config --global alias.st "status"
git config --global alias.graph "log --graph --decorate --name-status"
git config --global alias.ignore "update-index --skip-worktree"
git config --global alias.noignore "update-index --no-skip-worktree"
git config --global alias.stashdiff "diff HEAD..stash@{0}"
pause
echo.
rem git submodule
git submodule update --init
rem symlink
rem home
mklink /d %HOMEDRIVE%%HOMEPATH%\vimfiles %DOTFILES%\vim
mklink %HOMEDRIVE%%HOMEPATH%\_vimrc %DOTFILES%\vim\vimrc
mklink /d %XDG_CONFIG_HOME%\nvim %DOTFILES%\vim
mklink %XDG_CONFIG_HOME%\nvim\init.vim %DOTFILES%\vim\vimrc
mkdir %DOTFILES%\vim\after\autoload
mklink %DOTFILES%\vim\after\autoload\plug.vim %XDG_CONFIG_HOME%\nvim\plugged\vim-plug\plug.vim
mklink %HOMEDRIVE%%HOMEPATH%\.gitignore %DOTFILES%\home\.gitignore
mklink %HOMEDRIVE%%HOMEPATH%\.git-commit-template %DOTFILES%\home\.git-commit-template
mklink %HOMEDRIVE%%HOMEPATH%\.ctags %DOTFILES%\home\.ctags
mklink %HOMEDRIVE%%HOMEPATH%\.cvimrc %DOTFILES%\home\.cvimrc
mklink %HOMEDRIVE%%HOMEPATH%\.tmux.conf %DOTFILES%\home\.tmux.conf
mkdir %HOMEDRIVE%%HOMEPATH%\.tmux\plugins
mklink /d %HOMEDRIVE%%HOMEPATH%\.tmux\plugins\tpm %DOTFILES%\home\.tmux\plugins\tpm
rem whome
mklink %HOMEDRIVE%%HOMEPATH%\.minttyrc %DOTFILES%\whome\.minttyrc
mklink %HOMEDRIVE%%HOMEPATH%\.bashrc %DOTFILES%\whome\.bashrc
mklink %HOMEDRIVE%%HOMEPATH%\.bash_profile %DOTFILES%\whome\.bash_profile
mklink %HOMEDRIVE%%HOMEPATH%\.inputrc %DOTFILES%\whome\.inputrc
mklink %HOMEDRIVE%%HOMEPATH%\.profile %DOTFILES%\whome\.profile
move %HOMEDRIVE%%HOMEPATH%\scoop\apps\mausuji\1.33\MauSuji.ini %HOMEDRIVE%%HOMEPATH%\scoop\apps\mausuji\1.33\MauSuji.ini.org
mklink %HOMEDRIVE%%HOMEPATH%\scoop\apps\mausuji\1.33\MauSuji.ini %DOTFILES%\whome\mausuji\MauSuji.ini
rem msys2
move %HOMEDRIVE%%HOMEPATH%\lib\git-sdk-32\etc\pacman.conf %HOMEDRIVE%%HOMEPATH%\lib\git-sdk-32\etc\pacman.conf.org
mklink %HOMEDRIVE%%HOMEPATH%\lib\git-sdk-32\etc\pacman.conf %DOTFILES%\msys2\etc\pacman.conf
rem wbin
mklink %HOMEDRIVE%%HOMEPATH%\bin\open.bat %DOTFILES%\whome\bin\open.bat
mklink %HOMEDRIVE%%HOMEPATH%\bin\PPPath.bat %DOTFILES%\whome\bin\PPPath.bat
mklink %HOMEDRIVE%%HOMEPATH%\bin\Shortcut.CMD %DOTFILES%\whome\bin\Shortcut.CMD
mklink %HOMEDRIVE%%HOMEPATH%\bin\svn_path_copy.bat %DOTFILES%\whome\bin\svn_path_copy.bat
rem shortcut
shortcut /t:"%HOMEDRIVE%%HOMEPATH%" %HOMEDRIVE%%HOMEPATH%\bin\home.lnk
shortcut /t:"%HOMEDRIVE%%HOMEPATH%\Downloads" %HOMEDRIVE%%HOMEPATH%\bin\dl.lnk
shortcut /t:"%HOMEDRIVE%%HOMEPATH%\bin" %HOMEDRIVE%%HOMEPATH%\bin\bin.lnk
shortcut /t:"%HOMEDRIVE%%HOMEPATH%\lib" %HOMEDRIVE%%HOMEPATH%\bin\lib.lnk
shortcut /t:"%HOMEDRIVE%%HOMEPATH%\tmp" %HOMEDRIVE%%HOMEPATH%\bin\tmp.lnk
shortcut /t:"%HOMEDRIVE%%HOMEPATH%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup" %HOMEDRIVE%%HOMEPATH%\bin\startup.lnk
shortcut /t:"%windir%\System32\drivers\etc\hosts" %HOMEDRIVE%%HOMEPATH%\bin\hosts.lnk
shortcut /t:"%windir%\system32\services.msc" %HOMEDRIVE%%HOMEPATH%\bin\svc.lnk
shortcut /t:"C:\Program Files\Internet Explorer\iexplore.exe" %HOMEDRIVE%%HOMEPATH%\bin\ie.lnk
shortcut /t:"%HOME%\lib\git-sdk-32\git-bash.exe" %HOMEDRIVE%%HOMEPATH%\bin\mingw.lnk
shortcut /t:"C:\Program Files\Google\Google Japanese Input\GoogleIMEJaTool.exe" /a:"--mode=word_register_dialog" %HOMEDRIVE%%HOMEPATH%\bin\dct.lnk
shortcut /t:"C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /a:"/command:repobrowser" %HOMEDRIVE%%HOMEPATH%\bin\svnb.lnk
rem sendto
shortcut /t:"%HOMEDRIVE%%HOMEPATH%\scoop\shims\DF.exe" %HOMEDRIVE%%HOMEPATH%\AppData\Roaming\Microsoft\Windows\SendTo\DFで開く.lnk
shortcut /t:"C:\Program Files\Internet Explorer\iexplore.exe" %HOMEDRIVE%%HOMEPATH%\AppData\Roaming\Microsoft\Windows\SendTo\IEで開く.lnk
shortcut /t:"%HOMEDRIVE%%HOMEPATH%\bin\svn_path_copy.bat" %HOMEDRIVE%%HOMEPATH%\AppData\Roaming\Microsoft\Windows\SendTo\SVNレポジトリURLをコピー.lnk
rem startup
shortcut /t:"%HOMEDRIVE%%HOMEPATH%\scoop\apps\clipnote\current\clipnote2.exe" "%HOMEDRIVE%%HOMEPATH%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\ClipNote.lnk"
shortcut /t:"%HOMEDRIVE%%HOMEPATH%\scoop\apps\mausuji\current\MauSuji.exe" "%HOMEDRIVE%%HOMEPATH%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\MauSuji.lnk"
shortcut /t:"%HOMEDRIVE%%HOMEPATH%\scoop\apps\magnet_window\current\MgntWnd58003\MgntWnd.exe" "%HOMEDRIVE%%HOMEPATH%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\MgntWnd.lnk"
shortcut /t:"%HOMEDRIVE%%HOMEPATH%\scoop\apps\softtilt\current\SoftTilt.exe" "%HOMEDRIVE%%HOMEPATH%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\SoftTilt.lnk"
shortcut /t:"%HOMEDRIVE%%HOMEPATH%\scoop\apps\wheel_redirector\current\Wheel Redirector.exe" "%HOMEDRIVE%%HOMEPATH%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\WheelRedirector.lnk"
REM shortcut /t:"" %HOMEDRIVE%%HOMEPATH%\bin\my.lnk
REM shortcut /t:"" %HOMEDRIVE%%HOMEPATH%\bin\ol.lnk
REM shortcut /t:"" %HOMEDRIVE%%HOMEPATH%\bin\sys.lnk
echo.
echo %HOME%\binにmy、ol、sysのショートカットを手動で作成してください。
pause
echo.
rem Ricty
echo RictyDiminishedをインストールしてください。
explorer lib\RictyDiminished\RictyDiminished-devicon-Regular.ttf
explorer lib\RictyDiminished\RictyDiminished-devicon-Bold.ttf
explorer lib\RictyDiminished\RictyDiminished-devicon-Oblique.ttf
explorer lib\RictyDiminished\RictyDiminished-devicon-BoldOblique.ttf
pause
echo.
rem vimproc
echo NeoBundleInstallでvimprocのコンパイルが通るはず。
echo (うまくいかなかったらmingw32から「make -f make_mingw32.mak」を実行)
echo (pacmanからインストールしたvimを使う場合、vimproc_cygwin.dllが必要となる。msys2から「/usr/bin/make -f make_cygwin.mak」を実行)
pause
echo.
rem others
echo その他設定
echo ■キーリピートを速くする方が快適。以下のどちらかを実施。
echo ・レジストリをいじる
echo 1.regedit
echo 2.HKEY_CURRENT_USER\Control Panel\Accessibility\Keyboard Response
echo 3."AutoRepeatDelay"="300" "AutoRepeatRate"="16" "BounceTime"="0" "DelayBeforeAcceptance"="0" "Flags"="59"
echo ・コンパネ→キーボード→表示までの待ち時間を短く
echo ■コンテキストメニューに「Vimで開く」を追加する。
echo ・レジストリをいじる
echo 1.regedit
echo 2.「HKEY_CLASSES_ROOT\*\Shell」に移動
echo 3.Shellキーの中に新規キーgvimを作成する。
echo 4.gvimキーの文字列の値を「Vimで開く(&V)」に変更
echo 5.「Vimで開く」キーの中に新規キーcommandを作成する。
echo 6.commandキーの文字列の値を変更
echo "${gvim.exeへのフルパス}" "%1"
pause
echo.
rem finally
echo 以下のコマンドで起動
echo vim +NeoBundleInstall +qall
pause