12
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

wingetのプレビュー版が公開されたので、他のパッケージ管理ソフトとかと一緒に使ってみる

Last updated at Posted at 2020-05-20

はじめに

2020-5-13 に Microsoft より、 winget のプレビュー版が公開されたので、
これを気に windows で使えるパッケージソフトをひととおり試してみました。
今回は VS Code のインストールを行っていきます。

試したパッケージマネージャは

  • winget
  • chocolatey
  • scoop
  • AppGet
  • Npackd

です。

winget を使う

  1. GitHub のページから Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.appxbundle をダウンロードする
  2. 起動してインストール
  3. powershell を起動して vscode をインストールをする
winget install vscode

これで vscode がインストールされます。
結構楽にインストールできましたが、アンインストールは今のところないっぽいです。
因みに、パッケージ名が複数あった場合は同じ名前が複数個あると言われるので、Id を入力すれば OK です。

以下の画像の例では、git が被ってます。
winget install Git.Gitで一番上の Git をインストールできます。
winget-duplicate-name.png

インストールできるパッケージはwinget searchまたはパッケージリストから確認できます

chocolatey を使う

  1. Chocolatey Software | Installing Chocolateyからインストール用のコマンドをコピーする
  2. powershell を管理者で起動した後、[1.]でコピーしたコマンドを実行する
  3. インストール後に vscode をインストールする
  4. インストールするかを聞かれるので y を押して開始する
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco install vscode

scoop を使う

  1. Scoopから Install コマンドをコピーする
  2. powershell を起動した後、[1.]でコピーしたコマンドを実行する
  3. インストール後にエクストラバケットを追加する
  4. vscode をインストールする
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
scoop bucket add extras
scoop install vscode
# scoop本体のインストールでエラーが発生した場合は実行する
Set-ExecutionPolicy RemoteSigned -scope CurrentUser

AppGet を使う

  1. 公式より、インストーラをダウンロードしインストールを行う
  2. vscode をインストールする
appget install visual-studio-code

Npackd を使う

Npackd はインストールコマンドを叩きましたがコマンドが使えなかったため、省きます。

使ってみて

winget は使いやすいと感じました。
しかし、今の段階でパッケージマネージャを使う分には、やはりパッケージ数が多く安定している chocolatey や scoop、Appget を使ったほうが良いと思います。
個人的には Program Files に保存してくれる chocolatey がオススメです。
Appget は使いやすいのですが、やはりパッケージ数が心もとないです。
scoop も悪くはないのですが、デフォルトの設定では path が scoop 独自のものになるため、各ソフト内で参照している exe ファイルを自分で設定することになる場合があります。
なので、scoop を把握していない人が気軽に使うとちょっとややこしくなります。

まとめ(2020-05-21 時点)

winget chocolatey scoop AppGet
パッケージ数 166 7771 2693 893
デフォルト
インストール先
Program Files Program Files User/scoop/apps Program Files

scoop bucket 内訳

702(main)+1004(extras)+131(games)+107(nerd-fonts)+27(nirsoft)+186(Java)+90(Scoop-JetBrains)+65(scoop-nonportable)+381(PHP)

パッケージ数で見るとやはり chocolatey が圧倒的です…

参考

12
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?