OpenShot Library | libopenshot
0.2.5
|
The best way to get started with libopenshot, is to learn about our build system, obtain all the source code, install a development IDE and tools, and better understand our dependencies. So, please read through the following sections, and follow the instructions. And keep in mind, that your computer is likely different than the one used when writing these instructions. Your file paths and versions of applications might be slightly different, so keep an eye out for subtle file path differences in the commands you type.
CMake is the backbone of our build system. It is a cross-platform build system, which checks for dependencies, locates header files and libraries, generates makefiles, and supports the cross-platform compiling of libopenshot and libopenshot-audio. CMake uses an out-of-source build concept, where all temporary build files, such as makefiles, object files, and even the final binaries, are created outside of the source code folder, inside a /build/ sub-folder. This prevents the build process from cluttering up the source code. These instructions have only been tested with the GNU compiler (including MSYS2/MinGW for Windows).
The following libraries are required to build libopenshot. Instructions on how to install these dependencies vary for each operating system. Libraries and Executables have been labeled in the list below to help distinguish between them.
(Library)
(Library)
(Library)
(Library)
(Executable)
(Executable)
(Executable and Library)
(Executable)
(Library)
(Library)
(Compiler Flag)
There are many different build flags that can be passed to cmake to adjust how libopenshot is compiled. Some of these flags might be required when compiling on certain OSes, just depending on how your build environment is setup. To add a build flag, follow this general syntax: cmake -DMAGICKCORE_HDRI_ENABLE=1 -DENABLE_TESTS=1 ../
/location/to/missing/library/
)/location/to/python/include/
)/location/to/python/lib.a
)/usr/local/Cellar/python3/3.3.2/Frameworks/Python.framework/
)/location/to/mingw/g++
)/location/to/mingw/gcc
)Many environment variables will need to be set during this Windows installation guide. The command line will need to be closed and re-launched after any changes to your environment variables. Also, dependency libraries will not be found during linking or execution without being found in the PATH environment variable. So, if you get errors related to missing commands or libraries, double check the PATH variable.
The following environment variables need to be added to your “System Variables”. Be sure to check each folder path for accuracy, as your paths will likely be different than this list.
C:\libdl
)C:\Program Files\Microsoft DirectX SDK (June 2010)\
)C:\ffmpeg-git-95f163b-win32-dev
)C:\Program Files\GnuWin32
)C:\msys\1.0\home
)C:\Program Files\libopenshot-audio
)C:\qt5
)C:\Program Files\libsndfile
)C:\UnitTest++
)C:\msys2\usr\local\
)The following paths are an example
)C:\Qt5\bin; C:\Qt5\MinGW\bin\; C:\msys\1.0\local\lib; C:\Program Files\CMake 2.8\bin; C:\UnitTest++\build; C:\libopenshot\build\src; C:\Program Files\doxygen\bin; C:\ffmpeg-git-95f163b-win32-dev\lib; C:\swigwin-2.0.4; C:\Python33; C:\Program Files\Project\lib; C:\msys2\usr\local\
The first step in installing libopenshot is to obtain the most recent source code. The source code is available on GitHub. Use the following command to obtain the latest libopenshot source code.
The source code is divided up into the following folders.
Most Windows dependencies needed for libopenshot-audio, libopenshot, and openshot-qt can be installed easily with MSYS2 and the pacman package manager. Follow these directions to setup a Windows build environment for OpenShot.
1) Install MSYS2: http://www.msys2.org/
2) Run MSYS2 command prompt (for example: C:\msys64\msys2_shell.cmd
)
3) Append PATH (so MSYS2 can find executables and libraries):
4) Update and upgrade all packages
5a) Install the following packages (64-Bit)
5b) Or Install the following packages (32-Bit)
6) Install Python PIP Dependencies
7) Download Unittest++ (https://github.com/unittest-cpp/unittest-cpp) into /MSYS2/[USER]/unittest-cpp-master/
8) ZMQ++ Header (This might not be needed anymore) NOTE: Download and copy zmq.hpp into the /c/msys64/mingw64/include/ folder
C:\libdl\
C:\libdl\
. This environment variable will be used by CMake to find the binary and header file.C:\Program Files\Microsoft DirectX SDK (June 2010)\
(your path might be different). This environment variable will be used by CMake to find the binaries and header files.C:\Program Files\libsndfile
. This environment variable will be used by CMake to find the binary and header files.C:\libzmq\build\
(the location of the compiled version). This environment variable will be used by CMake to find the binary and header files.In order to compile libopenshot-audio, launch a command prompt and enter the following commands. This does not require the MSYS2 prompt, but it should work in both the Windows command prompt and the MSYS2 prompt.
Run the following commands to build libopenshot:
If you are missing any dependencies for libopenshot, you will receive error messages at this point. Just install the missing dependencies, and run the above commands again. Repeat until no error messages are displayed and the build process completes.
Also, if you are having trouble building, please see the CMake Flags section above, as it might provide a solution for finding a missing folder path, missing Python 3 library, etc...
To run all unit tests (and verify everything is working correctly), launch a terminal, and enter:
To auto-generate the documentation for libopenshot, launch a terminal, and enter:
This will use doxygen to generate a folder of HTML files, with all classes and methods documented. The folder is located at build/doc/html/. Once libopenshot has been successfully built, we need to install it (i.e. copy it to the correct folder, so other libraries can find it).
This should copy the binary files to C:\Program Files\openshot\lib\
, and the header files to C:\Program Files\openshot\include\...
This is where other projects will look for the libopenshot files when building.. Python 3 bindings are also installed at this point. let's verify the python bindings work:
If no errors are displayed, you have successfully compiled and installed libopenshot on your system. Congratulations and be sure to read our wiki on Becoming an OpenShot Developer! Welcome to the OpenShot developer community! We look forward to meeting you!