Skip to content

Compiling

Shuanglei Tao edited this page Feb 6, 2023 · 15 revisions

Dependencies

ImPlay depends on the following external libraries:

  • glfw
  • libmpv
  • freetype2

Cmake Options

  • USE_OPENGL_ES2: Compile with OpenGL ES 2.0 backend
  • USE_PATCHED_GLFW: the patched glfw includes patches for features that not suppored by upstream.
    • macOS open with support
    • window dragging support
  • USE_MPV_WIN_BUILD: Use Prebuilt static mpv dll on Windows
  • USE_XDG_PORTAL: Use xdg-desktop-portal for file dialogs on Linux

Linux

Ubuntu
sudo apt-get install -y build-essential cmake git pkg-config \
    libgtk-3-dev libglfw3-dev libfreetype6-dev libmpv-dev
git clone https://github.com/tsl0922/ImPlay.git
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=RELEASE ..
cmake --build . --target package

This will build a deb package.

macOS

Install Homebrew, and run:

brew install cmake git mpv freetype2 pkg-config
git clone https://github.com/tsl0922/ImPlay.git
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=RELEASE -DUSE_PATCHED_GLFW=ON ..
cmake --build . --target package

This will build a DMG file.

Windows

Install msys2, and open the MSYS2 MINGW64 shell:

pacman -S base-devel git p7zip mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake mingw-w64-x86_64-freetype
git clone https://github.com/tsl0922/ImPlay.git
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=RELEASE -DUSE_PATCHED_GLFW=ON -DUSE_OPENGL_ES2=ON ..
cmake --build . --target package

This will build a MSI installer and a portable ZIP.

Clone this wiki locally