LoginSignup
2
3

More than 3 years have passed since last update.

youtube-dlをソースから .exe にビルドする方法

Posted at

長い間放置されているPRを取り込みたかったので自分で .exe にビルドすることにした。

必要なもの

手順

GitHubからソースコードをクローン

git clone https://github.com/ytdl-org/youtube-dl.git
cd youtube-dl/

ソースをいじる(内容は割愛)

PyInstallerを使って .exe ファイル化

# インストール
pip install pyinstaller

# ビルド
pyinstaller youtube_dl/__main__.py --onefile --name youtube-dl

ビルドされた .exe はdistフォルダ配下にあるので、あとはいつも通り使う。

一言

WindowsにPythonインストールしたくなかったので、WSLでビルドしたら動かなかった...

However, it is not a cross-compiler: to make a Windows app you run PyInstaller in Windows

参考

2
3
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
2
3