差分
このページの2つのバージョン間の差分を表示します。
— |
blog:2021:2021-07-24 [2021-07-24 21:20] (現在) Decomo 作成 |
||
---|---|---|---|
行 1: | 行 1: | ||
+ | ====== MSYS2/ | ||
+ | 思う所があってマルチプラットフォームなメディアプレーヤー[[https:// | ||
+ | |||
+ | ===== 環境 ===== | ||
+ | |||
+ | * Windows 10 (x64) 20H2 | ||
+ | * msys2 | ||
+ | * MinGW-w64 | ||
+ | * GCC 10.3.0 | ||
+ | * QMPlay2 21.06.07-gti-417708b8 | ||
+ | |||
+ | ===== 手順 ===== | ||
+ | |||
+ | ==== 準備 ==== | ||
+ | |||
+ | とりあえずmsys2のインストールとパッケージ更新までは済ませておく。 | ||
+ | |||
+ | 以下の作業はMinGW-w64環境(MSYS2インストールディレクトリのmingw64.exe起動で出てくるシェル)で行う。 | ||
+ | |||
+ | コンパイラ、開発環境類をインストール。 | ||
+ | < | ||
+ | pacman -S base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake | ||
+ | </ | ||
+ | 注意すべきはcmake。msys2リポジトリにもcmakeがあるが、こちらはファイルパスの扱いがUNIXスタイルとなるため、mingw-w64リポジトリのソフトで正しく扱えない。したがって、Windowsスタイルのファイルパス用のming-w64のcmakeを使う必要がある。 | ||
+ | |||
+ | gitをインストール | ||
+ | < | ||
+ | pacman -S git | ||
+ | </ | ||
+ | |||
+ | Qtをインストール | ||
+ | < | ||
+ | pacman -S mingw-w64-x86_64-qt5 | ||
+ | </ | ||
+ | |||
+ | FFmpegをインストール。これだけでビルドに必要な最低限のライブラリは殆ど自動で入った記憶。 | ||
+ | < | ||
+ | pacman -S mingw-w64-x86_64-ffmpeg | ||
+ | </ | ||
+ | |||
+ | PortAudioをビルド。MinGWにビルド済みパッケージがあるけど、WASAPIが有効になってないので自前ビルドする必要がある。tarballの取得と展開は割愛。 | ||
+ | < | ||
+ | cd portaudio | ||
+ | / | ||
+ | make -j8 | ||
+ | make install | ||
+ | </ | ||
+ | |||
+ | ここまででQMPlay2をビルドする環境が整った。 | ||
+ | |||
+ | ==== QMPlay2のビルド ==== | ||
+ | |||
+ | ソースコードとサブモジュールを取得。 | ||
+ | < | ||
+ | git clone https:// | ||
+ | git submodule update --init | ||
+ | </ | ||
+ | |||
+ | ビルドディレクトリを作ってcmake。cmakeは前述の通りmingw64のバイナリを明示的に使い、加えてMakefileを生成したいので-Gでオプションが必要。さもないとVisual Studio用のソリューションファイルが生成されてしまう。 | ||
+ | < | ||
+ | cd QMPlay2 | ||
+ | mkdir build | ||
+ | cd build | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | 上手くいけば↓こんな感じでcmakeが成功する。 | ||
+ | < | ||
+ | -- Could NOT find TAGLIB (missing: TAGLIB_LIBRARY TAGLIB_INCLUDE_DIR) | ||
+ | -- Could NOT find LIBGME (missing: LIBGME_LIBRARY LIBGME_INCLUDE_DIR) | ||
+ | -- Enabled features: | ||
+ | * Updates, Build with software updates | ||
+ | * OpenGL, Build with OpenGL support | ||
+ | * Vulkan, Build with Vulkan support | ||
+ | * libass, Build with libass support | ||
+ | * Inputs, Build with Inputs module | ||
+ | * Modplug, Build with Modplug module | ||
+ | * Extensions, Build with Extensions module | ||
+ | * MediaBrowser, | ||
+ | * LastFM, Build with LastFM support | ||
+ | * Lyrics, Build with lyrics support | ||
+ | * Radio, Build with Radio Browser support | ||
+ | * YouTube, Build with YouTube support | ||
+ | * Visualizations, | ||
+ | * AudioFilters, | ||
+ | * VideoFilters, | ||
+ | * PortAudio, Build with PortAudio module | ||
+ | * DXVA2, Build D3D11VA acceleration into FFmpeg | ||
+ | * CUVID, Build with CUVID module | ||
+ | * Notifications, | ||
+ | * Git version, Append Git HEAD to QMPlay2 version | ||
+ | |||
+ | -- Disabled features: | ||
+ | * PCH, Use precompiled headers | ||
+ | * CMD, Show CMD when running QMPlay2 | ||
+ | * GLSLC, Compile Vulkan shaders | ||
+ | * TagLib, Build with tags editor | ||
+ | * VAAPI, Build VAAPI acceleration into FFmpeg | ||
+ | * VDPAU, Build VDPAU acceleration into FFmpeg | ||
+ | * libavdevice, | ||
+ | * AudioCD, Build with AudioCD module | ||
+ | * ALSA, Build with ALSA module | ||
+ | * Chiptune GME, Build Chiptune with GME support | ||
+ | * Chiptune SIDPLAY, Build Chiptune with SIDPLAY support | ||
+ | * PulseAudio, Build with PulseAudio module | ||
+ | * PipeWire, Build with PipeWire module | ||
+ | * XVideo, Build with XVideo module | ||
+ | * Link Time Optimization, | ||
+ | * Address Sanitizer, Use Address Sanitizer | ||
+ | * Undefined Behavior Sanitizer, Use Undefined Behavior Sanitizer | ||
+ | |||
+ | -- Build type: Release | ||
+ | -- Configuring done | ||
+ | -- Generating done | ||
+ | -- Build files have been written to: C:/ | ||
+ | </ | ||
+ | |||
+ | 「TagLibとGMEがない」と怒られるが、必須ではないので問題なし。必要なら'' | ||
+ | |||
+ | 必須ライブラリがない場合、怒られてcmakeに失敗するので頑張って対処する。 | ||
+ | |||
+ | makeとインストール。 | ||
+ | < | ||
+ | make -j8 | ||
+ | make install | ||
+ | </ | ||
+ | |||
+ | 上手くいけば、CMAKE_INSTALL_PREFIXで指定したフォルダ、ここでは../ | ||
+ | |||
+ | PATHの関係でエクスプローラからexeダブルクリックでは起動できないため、ビルドしたシェルに../ |