ユーザ用ツール

サイト用ツール


chocolatey

目次

chocolatey

since 2017-01-06

https://technet.microsoft.com/ja-jp/library/ee176961.aspx

https://chocolatey.org/install

Admin PowerShell:

PS C:\Windows\system32> Set-ExecutionPolicy Unrestricted

PS C:\Windows\system32> iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex

エラーが出る?

Access to the path 'C:\ProgramData\chocolatey\config' is denied

インストールが終わったら Windows を再起動して、それから「管理者 PowerShell」でいちど chocolatey を実行しておく。これで config が作成されて、使えるようになる。らしい。

C:\
λ chocolatey -?
This is a listing of all of the different things you can pass to choco.

Commands

 * list - lists remote or local packages
 * search - searches remote or local packages (alias for list)
 * info - retrieves package information. Shorthand for choco search pkgname --exact --verbose
 * install - installs packages from various sources
 * pin - suppress upgrades for a package
 * outdated - retrieves packages that are outdated. Similar to upgrade all --noop
 * upgrade - upgrades packages from various sources
 * uninstall - uninstalls a package
 * pack - packages up a nuspec to a compiled nupkg
 * push - pushes a compiled nupkg
 * new - generates files necessary for a chocolatey package from a template
 * source - view and configure default sources
 * sources - view and configure default sources (alias for source)
 * config - Retrieve and configure config file settings
 * feature - view and configure choco features
 * features - view and configure choco features (alias for feature)
 * apikey - retrieves or saves an apikey for a particular source
 * setapikey - retrieves or saves an apikey for a particular source (alias for apikey)
 * unpackself - have chocolatey set it self up
 * version - [DEPRECATED] will be removed in v1 - use `choco outdated` or `cup <pkg|all> -whatif` instead
 * update - [DEPRECATED] RESERVED for future use (you are looking for upgrade, these are not the droids you are looking for)


Please run chocolatey with `choco command -help` for specific help on
 each command.

Windows 10 64bit で poedit を入れてみる。

Cmder を使っている。

まず cmd.exe を Admin で起動。

C:\Users\nishimotz
λ choco install poedit
Chocolatey v0.10.3
Installing the following packages:
poedit
By installing you accept licenses for the packages.

poedit v1.8.7 [Approved]
poedit package files install completed. Performing other installation steps.
The package poedit wants to run 'chocolateyInstall.ps1'.
Note: If you don't run this script, the installation will fail.
Note: To confirm automatically next time, use '-y' or consider setting
 'allowGlobalConfirmation'. Run 'choco feature -h' for more details.
Do you want to run the script?([Y]es/[N]o/[P]rint): y

Downloading poedit
  from 'https://download.poedit.net/Poedit-1.8.7-setup.exe'
Progress: 100% - Completed download of C:\Users\nishimotz\AppData\Local\Temp\chocolatey\poedit\1.8.7\Poedit-1.8.7-setup.exe (13.4 MB).
Download of Poedit-1.8.7-setup.exe (13.4 MB) completed.
Installing poedit...
poedit has been installed.
 The install of poedit was successful.
  Software installed to 'C:\Program Files (x86)\Poedit\'

Chocolatey installed 1/1 packages. 0 packages failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

スタートメニューから起動すると 1.8.11 に更新しろといわれた。

choco install で最新が入るとは限らない。

次に subversion (svn) を入れてみた。

C:\Users\nishimotz
λ choco install svn
Chocolatey v0.10.3
Installing the following packages:
svn
By installing you accept licenses for the packages.

svn v1.8.15 [Approved]
svn package files install completed. Performing other installation steps.
The package svn wants to run 'chocolateyInstall.ps1'.
Note: If you don't run this script, the installation will fail.
Note: To confirm automatically next time, use '-y' or consider setting
 'allowGlobalConfirmation'. Run 'choco feature -h' for more details.
Do you want to run the script?([Y]es/[N]o/[P]rint): y

Downloading svn
  from 'https://sourceforge.net/projects/win32svn/files/1.8.15/Setup-Subversion-1.8.15.msi'
Progress: 100% - Completed download of C:\Users\nishimotz\AppData\Local\Temp\chocolatey\svn\1.8.15\Setup-Subversion-1.8.15.msi (5.9 MB).
Download of Setup-Subversion-1.8.15.msi (5.9 MB) completed.
Installing svn...
svn has been installed.
Environment Vars (like PATH) have changed. Close/reopen your shell to
 see the changes (or in powershell/cmd.exe just type `refreshenv`).
 The install of svn was successful.
  Software installed as 'msi', install location is likely default.

Chocolatey installed 1/1 packages. 0 packages failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

コマンドプロンプトを開くと svn が動いたが、なぜか文字化けする:

C:\work>svn
?g?p?u?@?d’m?e???¢?A?≪?I 'svn help' ?A‘A?A?A?-???3?¢?B

C:\work>which svn
/c/Program Files (x86)/Subversion/bin/svn

C:\work>set LANG=C

C:\work>svn
Type 'svn help' for usage.

まあこれでいいか。

PowerShell だと環境変数の設定はこうやる:

C:\work
λ Set-Item env:LANG -value C
chocolatey.txt · 最終更新: 2017/01/07 11:43 by Takuya Nishimoto

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki