要 PowerShell だけど、bootstrap と言うか、全自動インストールの BAT ファイルを作ってみた。
apt-cyg の mirror の置き場にしたいフォルダに以下のファイルをダウンロードしてきて実行すれば良い。
Windows Vista 以降で permission に引っかかって上手く行かない場合は、右クリックから、管理者として実行すれば動くはず。
CYGWIN_MIRROR は好みの場所に変えて良い。
このバッチファイルは以下の機能を提供する。
- setup.exe の自動取得と cygwin の自動インストール
- 私家版 apt-cyg (GNUPG による検証, upgrade-self サブコマンド等に対応)
- Cygwin mintty here
以下の one liner をコマンドプロンプトにコピペすると web ブラウジングなしでインストール出来る。
授業や講習会にお勧め。必要に応じて proxy 等の設定も与えると良い。
カレントディレクトリにダウンロード
powershell -Command "Import-Module BitsTransfer; Start-BitsTransfer https://gist.github.com/kou1okada/7802343/raw/cygwin_autoinstall.bat"
カレントディレクトリにダウンロードした後 autoinstall
powershell -Command "Import-Module BitsTransfer; Start-BitsTransfer https://gist.github.com/kou1okada/7802343/raw/cygwin_autoinstall.bat" && cygwin_autoinstall.bat
ダウンロードフォルダ内に作成した cygwin フォルダ内にダウンロードした後 autoinstall (おすすめ)
MKDIR %USERPROFILE%\Downloads\cygwin && CD %USERPROFILE%\Downloads\cygwin && powershell -Command "Import-Module BitsTransfer; Start-BitsTransfer https://gist.github.com/kou1okada/7802343/raw/cygwin_autoinstall.bat" && cygwin_autoinstall.bat
UAC の介入が必要な場合は管理者権限で実行したコマンドプロンプト上にコピペすると良い。