sView requires several 3rd-party components for building:
- C/C++ compiler (g++, MSVC 2010+)
- FFmpeg
- OpenAL soft
- FreeType
- libconfig++ (Linux and Android)
- libxrandr, libxpm, libfontconfig (Linux only)
- zenity (Linux only)
- Optional: DevIL and FreeImage libraries (they are not required for building sView, and are loaded dynamically if available).
On Debian/Ubuntu you might use the following command to install all dependencies at once:
sudo apt-get install \
g++ cmake ninja-build \
zenity \
libopenal-dev \
libgl-dev \
libavcodec-dev libavdevice-dev libavformat-dev libavutil-dev libswscale-dev \
libconfig++-dev libconfig-dev \
libfreetype-dev libfontconfig-dev \
libxrandr-dev libxpm-dev \
libopenvr-dev
The similar command for RPM-based distributives:
yum install gcc gcc-c++ \
gtk+-devel \
mesa-libGLU-devel glew-devel \
openal-devel \
libconfig-devel
rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
yum install ffmpeg-devel
ALT Linux:
apt-get install \
gcc8-c++ gcc-c++ libGLU-devel libXrandr-devel libfreetype-devel \
libopenal-devel libconfig-devel libconfig-c++-devel libXpm-devel \
libavcodec-devel libavdevice-devel libavformat-devel libavutil-devel libswscale-devel
On Windows and macOS please refer to official documentation for each project.
Please use CMake for building sView.
Consider using cmake-gui
tool if you are not experienced used of CMake and follow through configure and generate steps and make sure there are no error messages in log.
You will need installing (Linux) necessary development packages in advance or providing paths to local builds.
On Windows platform, you may build Visual Studio project files generated by CMake.
On Linux system, you may use make
after generation of Unix Makefiles in CMake for building and installing sView:
make && make install
You might need performing extra actions to run sView after building - e.g. ensure that all 3rd-party libraries are available
(copied into build directory, or configured via %PATH%
/ $LD_LIBRARY_PATH
/ $DYLD_LIBRARY_PATH
environment variables based on platform).
Several preprocessor directives control building options:
ST_HAVE_MONGOOSE
- should be defined to activate built-in web UI for remote Movie Player controlST_DEBUG
- should be defined to activate debugging log outputST_DEBUG_LOG_TO_FILE
- specifies file name or full path to duplicate debug log output
Building for Android platform is more complicated as it relies on cross-compilation environment and involves more steps:
building native .so
libraries, compiling .java
source code and generation of APK package.
The building can be run on a Linux host with compatible Java SDK, Android NDK and Android SDK versions.
Several script were written to automate distribution routines. All them were placed in "distribution" folder.
build.bat
, batch script for Windows. Performs re-building of x86 and x86_64 targets using Visual Studio and pack result binaries using InnoSetup script. Notice that all dependencies should be available (including InnoSetup).buildDebSrc.sh
, bash script for Linux to pack sources into Debian source package.buildMac.sh
, bash script to pack binaries from bin/MAC_gcc folder into DMG image. 3rd-party libraries should be already located in "bin/MAC_gcc_DEBUG/sView.app/Contents/Frameworks/" folder with correct search path (refer tobind_frameworks.sh
auxiliary script).
su
yum install rpm-build
mkdir -p ${HOME}/workspace/redhat/{RPMS,SRPMS,SPECS,SOURCES,BUILD}
echo "%_topdir ${HOME}/workspace/redhat" > ${HOME}/.rpmmacros
wget https://launchpad.net/~sview/+archive/stable/+files/sview_12.05-1%7Eprecise.tar.gz
mv sview_12.05-1~precise.tar.gz $HOME/workspace/redhat/SOURCES/sview_12.05-1.tar.gz
rpmbuild -ba distribution/sView.rpm.spec