Skip to content

Latest commit

 

History

History
141 lines (116 loc) · 4.46 KB

install.md

File metadata and controls

141 lines (116 loc) · 4.46 KB

SubSync installation

You could download release builds from download page.

Since version 0.14 subsync is build in single step. You don't have to build gizmo module separately.

Prerequisites

  • C++11 compatible compiler (or better C++14);
  • pybind11;
  • ffmpeg libraries (4.0 or newer);
  • sphinxbase and pocketsphinx;
  • Python interpreter (supporting Python 3.5 or newer);
  • Python modules listed in requirements.txt file;

Configuration

SubSync expects to find configuration in config.py file. You could use default from config.py.template and modify it if needed:

cp subsync/config.py.template subsync/config.py

POSIX platforms

For POSIX compatibile platforms (e.g. Linux, MacOS), standard Python setup.py scripts are provided.

It is advised to build under Python virtual environment. To do that, go to project main directory and type:

pip install venv
python -m venv .env

You could also specify different version of Python interpreter, for details see the docs.

Activate your virtual environment:

source .env/bin/activate

If you have ffmpeg, sphinxbase and pocketsphinx libraries installed and avaiable via pkg-config, it will be configured automatically. Otherwise, you must provide paths to these libraries manually, using evironment variables:

export FFMPEG_DIR=PATH
export SPHINXBASE_DIR=PATH
export POCKETSPHINX_DIR=PATH
export USE_PKG_CONFIG=no

Install GUI version:

pip install '.[GUI]'

If during this step wxPython fails to compile, you could try to find prebuild version for your system here.

To install headless version only (without GUI):

pip install .

Run SubSync from your virtual environment:

./bin/subsync

MacOS installer

MacOS binary distribution and installer are generated using pyinstaller utility. To build executable, with gizmo installed, type:

pip install pyinstaller
pyinstaller macos.spec

To create dmg installer, you need to have create-dmg in your path:

./tools/package-macos.sh

Windows

Building Windows version under virtual environment is similar to building POSIX version. You need a Python runtime, then you could setup and activate virtual environment:

python -m pip install venv
python -m venv .env
.env\Scripts\activate.bat

To build subsync, you need to provide dependencies first. Sphinxbase and pocketsphinx are published with Visual Studio solution file, which is easy to use. Building ffmpeg on the other hand is not that easy. You could use official build instead.

Configure dependencies paths:

set FFMPEG_DIR=d:\projects\ffmpeg
set SPHINXBASE_DIR=d:\projects\sphinxbase
set POCKETSPHINX_DIR=d:\projects\pocketsphinx
set USE_PKG_CONFIG=no

Install GUI version:

pip install .[GUI]

To install headless version only (without GUI):

pip install .

Run SubSync from your virtual environment:

python bin\subsync

Windows installer

Windows binary distribution and installer are generated using pyinstaller utility. To build executable, with gizmo installed, type:

pip install pyinstaller
pyinstaller windows.spec

To create msi installer, you need to have WIX Toolset in your path:

tools\package-windows.cmd

To create portable version, you need 7-Zip in your path:

tools\package-windows-portable.cmd

Ubuntu SNAP

Technically snaps are universal linux packages, but it looks like they are really fully supported only on Ubuntu.

To build one, just type snapcraft in the project main directory. Thats it, no need to prepare virtual envirnoment, installing dependencies etc. Everything needed will be downloaded and built automatically.

If process fails with message ERROR: Failed building wheel for subsync, try this workaround before snapcraft:

echo "[build_ext]" >> setup.cfg
echo "include_dirs=$PWD/stage/include/python3.5m" >> setup.cfg

Running without installation

To simplify development, SubSync can be run without main module installation. Dependencies and gizmo module still must be installed:

pip install -r requirements
pip install .
python run.py