Skip to content

Commit

Permalink
Merge pull request #2 from OpenShot/develop
Browse files Browse the repository at this point in the history
Merge upstream
  • Loading branch information
ferdnyc committed Oct 29, 2019
2 parents 1b19ae7 + 2a1fe80 commit 4928bd5
Show file tree
Hide file tree
Showing 94 changed files with 1,827 additions and 1,440 deletions.
3 changes: 1 addition & 2 deletions .gitignore
@@ -1,5 +1,4 @@
build/
build/*
/build*
*.DS_Store
.pydevproject
.settings
Expand Down
15 changes: 8 additions & 7 deletions .gitlab-ci.yml
Expand Up @@ -17,7 +17,7 @@ linux-builder:
- export LIBOPENSHOT_AUDIO_DIR=$CI_PROJECT_DIR/build/install-x64
- mkdir -p build; cd build;
- mkdir -p install-x64/python;
- cmake -D"CMAKE_INSTALL_PREFIX:PATH=$CI_PROJECT_DIR/build/install-x64" -D"CMAKE_BUILD_TYPE:STRING=Release" ../
- cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -D"CMAKE_INSTALL_PREFIX:PATH=$CI_PROJECT_DIR/build/install-x64" -D"CMAKE_BUILD_TYPE:STRING=Release" ../
- make
- make install
- make doc
Expand Down Expand Up @@ -46,7 +46,7 @@ mac-builder:
- export LIBOPENSHOT_AUDIO_DIR=$CI_PROJECT_DIR/build/install-x64
- mkdir -p build; cd build;
- mkdir -p install-x64/python;
- cmake -D"CMAKE_INSTALL_PREFIX:PATH=$CI_PROJECT_DIR/build/install-x64" -DCMAKE_CXX_COMPILER=/usr/local/opt/gcc48/bin/g++-4.8 -DCMAKE_C_COMPILER=/usr/local/opt/gcc48/bin/gcc-4.8 -DCMAKE_PREFIX_PATH=/usr/local/qt5/5.5/clang_64 -DPYTHON_INCLUDE_DIR=/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -DPYTHON_LIBRARY=/Library/Frameworks/Python.framework/Versions/3.6/lib/libpython3.6.dylib -DPython_FRAMEWORKS=/Library/Frameworks/Python.framework/ -D"CMAKE_BUILD_TYPE:STRING=Debug" -D"CMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk" -D"CMAKE_OSX_DEPLOYMENT_TARGET=10.9" -D"CMAKE_INSTALL_RPATH_USE_LINK_PATH=1" -D"ENABLE_RUBY=0" ../
- cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -D"CMAKE_INSTALL_PREFIX:PATH=$CI_PROJECT_DIR/build/install-x64" -DCMAKE_CXX_COMPILER=/usr/local/opt/gcc48/bin/g++-4.8 -DCMAKE_C_COMPILER=/usr/local/opt/gcc48/bin/gcc-4.8 -DCMAKE_PREFIX_PATH=/usr/local/qt5/5.5/clang_64 -DPYTHON_INCLUDE_DIR=/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -DPYTHON_LIBRARY=/Library/Frameworks/Python.framework/Versions/3.6/lib/libpython3.6.dylib -DPython_FRAMEWORKS=/Library/Frameworks/Python.framework/ -D"CMAKE_BUILD_TYPE:STRING=Debug" -D"CMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk" -D"CMAKE_OSX_DEPLOYMENT_TARGET=10.9" -D"CMAKE_INSTALL_RPATH_USE_LINK_PATH=1" -D"ENABLE_RUBY=0" ../
- make
- make install
- mv install-x64/lib/python3.6/site-packages/*openshot* install-x64/python
Expand All @@ -71,13 +71,14 @@ windows-builder-x64:
- $env:LIBOPENSHOT_AUDIO_DIR = "$CI_PROJECT_DIR\build\install-x64"
- $env:UNITTEST_DIR = "C:\msys64\usr"
- $env:ZMQDIR = "C:\msys64\usr"
- $env:RESVGDIR = "C:\msys64\usr"
- $env:Path = "C:\msys64\mingw64\bin;C:\msys64\mingw64\lib;C:\msys64\usr\lib\cmake\UnitTest++;C:\msys64\home\jonathan\depot_tools;C:\msys64\usr;C:\msys64\usr\lib;" + $env:Path;
- New-Item -ItemType Directory -Force -Path build
- New-Item -ItemType Directory -Force -Path build\install-x64\python
- cd build
- cmake -D"CMAKE_INSTALL_PREFIX:PATH=$CI_PROJECT_DIR\build\install-x64" -G "MinGW Makefiles" -D"CMAKE_BUILD_TYPE:STRING=Release" ../
- cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -D"CMAKE_INSTALL_PREFIX:PATH=$CI_PROJECT_DIR\build\install-x64" -G "MSYS Makefiles" -DCMAKE_MAKE_PROGRAM=mingw32-make -D"CMAKE_BUILD_TYPE:STRING=Release" ../
- mingw32-make install
- Move-Item -Force -path "install-x64\lib\python3.6\site-packages\*openshot*" -destination "install-x64\python\"
- Move-Item -Force -path "install-x64\lib\python3.7\site-packages\*openshot*" -destination "install-x64\python\"
- New-Item -path "install-x64/share/" -Name "$CI_PROJECT_NAME" -Value "CI_PROJECT_NAME:$CI_PROJECT_NAME`nCI_COMMIT_REF_NAME:$CI_COMMIT_REF_NAME`nCI_COMMIT_SHA:$CI_COMMIT_SHA`nCI_JOB_ID:$CI_JOB_ID" -ItemType file -force
- $PREV_GIT_LABEL=(git describe --tags --abbrev=0)
- git log "$PREV_GIT_LABEL..HEAD" --oneline --pretty=format:"%C(auto,yellow)%h%C(auto,magenta)% %C(auto,blue)%>(12,trunc)%ad %C(auto,green)%<(25,trunc)%aN%C(auto,reset)%s%C(auto,red)% gD% D" --date=short > "install-x64/share/$CI_PROJECT_NAME.log"
Expand All @@ -99,15 +100,15 @@ windows-builder-x86:
- Expand-Archive -Path artifacts.zip -DestinationPath .
- $env:LIBOPENSHOT_AUDIO_DIR = "$CI_PROJECT_DIR\build\install-x86"
- $env:UNITTEST_DIR = "C:\msys32\usr"
- $env:RESVGDIR = "C:\msys32\usr\local"
- $env:RESVGDIR = "C:\msys32\usr"
- $env:ZMQDIR = "C:\msys32\usr"
- $env:Path = "C:\msys32\mingw32\bin;C:\msys32\mingw32\lib;C:\msys32\usr\lib\cmake\UnitTest++;C:\msys32\home\jonathan\depot_tools;C:\msys32\usr;C:\msys32\usr\lib;" + $env:Path;
- New-Item -ItemType Directory -Force -Path build
- New-Item -ItemType Directory -Force -Path build\install-x86\python
- cd build
- cmake -D"CMAKE_INSTALL_PREFIX:PATH=$CI_PROJECT_DIR\build\install-x86" -G "MinGW Makefiles" -D"CMAKE_BUILD_TYPE:STRING=Release" -D"CMAKE_CXX_FLAGS=-m32" -D"CMAKE_EXE_LINKER_FLAGS=-Wl,--large-address-aware" -D"CMAKE_C_FLAGS=-m32" ../
- cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -D"CMAKE_INSTALL_PREFIX:PATH=$CI_PROJECT_DIR\build\install-x86" -G "MSYS Makefiles" -DCMAKE_MAKE_PROGRAM=mingw32-make -D"CMAKE_BUILD_TYPE:STRING=Release" -D"CMAKE_CXX_FLAGS=-m32" -D"CMAKE_EXE_LINKER_FLAGS=-Wl,--large-address-aware" -D"CMAKE_C_FLAGS=-m32" ../
- mingw32-make install
- Move-Item -Force -path "install-x86\lib\python3.6\site-packages\*openshot*" -destination "install-x86\python\"
- Move-Item -Force -path "install-x86\lib\python3.7\site-packages\*openshot*" -destination "install-x86\python\"
- New-Item -path "install-x86/share/" -Name "$CI_PROJECT_NAME" -Value "CI_PROJECT_NAME:$CI_PROJECT_NAME`nCI_COMMIT_REF_NAME:$CI_COMMIT_REF_NAME`nCI_COMMIT_SHA:$CI_COMMIT_SHA`nCI_JOB_ID:$CI_JOB_ID" -ItemType file -force
- $PREV_GIT_LABEL=(git describe --tags --abbrev=0)
- git log "$PREV_GIT_LABEL..HEAD" --oneline --pretty=format:"%C(auto,yellow)%h%C(auto,magenta)% %C(auto,blue)%>(12,trunc)%ad %C(auto,green)%<(25,trunc)%aN%C(auto,reset)%s%C(auto,red)% gD% D" --date=short > "install-x86/share/$CI_PROJECT_NAME.log"
Expand Down
135 changes: 85 additions & 50 deletions .travis.yml
@@ -1,53 +1,88 @@
dist: xenial
sudo: required
language: cpp

# This section uses a rather esoteric (and tricky!) feature of YAML,
# &aliases and *anchors, to build package lists out of sublists without
# repeating their contents. Basically, '&name' creates an alias for the
# given data, which can then be referenced using the anchor '*name'.
addons:
apt:
packages: &p_common # Packages common to all Ubuntu builds
- cmake
- swig
- libopenshot-audio-dev
- libmagick++-dev
- libunittest++-dev
- libzmq3-dev
- qtbase5-dev
- qtmultimedia5-dev
- doxygen
- graphviz
packages: &ff_common # Common set of FFmpeg packages
- *p_common
- libfdk-aac-dev
- libavcodec-dev
- libavformat-dev
- libavdevice-dev
- libavutil-dev
- libavfilter-dev
- libswscale-dev
- libpostproc-dev
- libavresample-dev
- libswresample-dev

matrix:
include:
- language: cpp
name: "FFmpeg 2"
before_script:
- sudo add-apt-repository ppa:openshot.developers/libopenshot-daily -y
- sudo add-apt-repository ppa:beineri/opt-qt-5.10.0-xenial -y
- sudo apt-get update -qq
- sudo apt-get install gcc-4.8 cmake libavcodec-dev libavformat-dev libswscale-dev libavresample-dev libavutil-dev libopenshot-audio-dev libopenshot-dev libfdk-aac-dev libfdk-aac-dev libjsoncpp-dev libmagick++-dev libopenshot-audio-dev libunittest++-dev libzmq3-dev pkg-config python3-dev qtbase5-dev qtmultimedia5-dev swig -y
- sudo apt autoremove -y
script:
- mkdir -p build; cd build;
- cmake -D"CMAKE_BUILD_TYPE:STRING=Debug" ../
- make VERBOSE=1
- make os_test
- make install DESTDIR=dist/

- language: cpp
name: "FFmpeg 3"
before_script:
- sudo add-apt-repository ppa:openshot.developers/libopenshot-daily -y
- sudo add-apt-repository ppa:beineri/opt-qt-5.10.0-xenial -y
- sudo add-apt-repository ppa:jonathonf/ffmpeg-3 -y
- sudo apt-get update -qq
- sudo apt-get install gcc-4.8 cmake libavcodec-dev libavformat-dev libswscale-dev libavresample-dev libavutil-dev libopenshot-audio-dev libopenshot-dev libfdk-aac-dev libfdk-aac-dev libjsoncpp-dev libmagick++-dev libopenshot-audio-dev libunittest++-dev libzmq3-dev pkg-config python3-dev qtbase5-dev qtmultimedia5-dev swig -y
- sudo apt autoremove -y
script:
- mkdir -p build; cd build;
- cmake -D"CMAKE_BUILD_TYPE:STRING=Debug" ../
- make VERBOSE=1
- make os_test
- make install DESTDIR=dist/

- language: cpp
name: "FFmpeg 4"
before_script:
- sudo add-apt-repository ppa:openshot.developers/libopenshot-daily -y
- sudo add-apt-repository ppa:beineri/opt-qt-5.10.0-xenial -y
- sudo add-apt-repository ppa:jonathonf/ffmpeg -y
- sudo add-apt-repository ppa:jonathonf/ffmpeg-4 -y
- sudo add-apt-repository ppa:jonathonf/backports -y
- sudo apt-get update -qq
- sudo apt-get install gcc-4.8 cmake libavcodec58 libavformat58 libavcodec-dev libavformat-dev libswscale-dev libavresample-dev libavutil-dev libopenshot-audio-dev libopenshot-dev libfdk-aac-dev libfdk-aac-dev libjsoncpp-dev libmagick++-dev libopenshot-audio-dev libunittest++-dev libzmq3-dev pkg-config python3-dev qtbase5-dev qtmultimedia5-dev swig -y
- sudo apt autoremove -y
script:
- mkdir -p build; cd build;
- cmake -D"CMAKE_BUILD_TYPE:STRING=Debug" ../
- make VERBOSE=1
- make os_test
- make install DESTDIR=dist/
- name: "FFmpeg 2 (Ubuntu 16.04 Xenial)"
env: BUILD_VERSION=ffmpeg2
os: linux
dist: xenial
addons:
apt:
sources:
- sourceline: 'ppa:openshot.developers/libopenshot-daily'
- sourceline: 'ppa:beineri/opt-qt-5.10.0-xenial'
packages:
- *ff_common

- name: "FFmpeg 3 (Ubuntu 18.04 Bionic)"
env: BUILD_VERSION=ffmpeg3
os: linux
dist: bionic
addons:
apt:
sources:
- sourceline: 'ppa:openshot.developers/libopenshot-daily'
- sourceline: 'ppa:beineri/opt-qt-5.12.3-bionic'
packages:
- *ff_common
- qt5-default

- name: "FFmpeg 4 (Ubuntu 18.04 Bionic)"
env: BUILD_VERSION=ffmpeg4
os: linux
dist: bionic
addons:
apt:
sources:
- sourceline: 'ppa:openshot.developers/libopenshot-daily'
- sourceline: 'ppa:beineri/opt-qt-5.12.3-bionic'
- sourceline: 'ppa:jonathonf/ffmpeg-4'
packages:
- *ff_common
- qt5-default
- libavcodec58
- libavformat58
- libavdevice58
- libavutil56
- libavfilter7
- libswscale5
- libpostproc55
- libavresample4
- libswresample3

script:
- mkdir -p build; cd build;
- cmake -DCMAKE_BUILD_TYPE:STRING="Debug" ../
- make VERBOSE=1
- make os_test
- make install DESTDIR="$BUILD_VERSION"
35 changes: 27 additions & 8 deletions CMakeLists.txt
Expand Up @@ -24,7 +24,7 @@
# along with OpenShot Library. If not, see <http://www.gnu.org/licenses/>.
################################################################################

cmake_minimum_required(VERSION 3.1...3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.2...3.14 FATAL_ERROR)

message("\
-----------------------------------------------------------------
Expand Down Expand Up @@ -56,7 +56,7 @@ STRING(REGEX REPLACE "\-.*$" "" VERSION_NUM "${PROJECT_VERSION_FULL}")
PROJECT(libopenshot LANGUAGES C CXX VERSION ${VERSION_NUM})

message("
Generating build files for OpenShot
Generating build files for OpenShot with CMake ${CMAKE_VERSION}
Building ${PROJECT_NAME} (version ${PROJECT_VERSION})
SO/API/ABI Version: ${PROJECT_SO_VERSION}
")
Expand All @@ -74,9 +74,9 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/include/OpenShotVersion.h

############### Set up include paths #################
list(APPEND OPENSHOT_INCLUDE_DIRS
include
include/effects
include/Qt
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/include/effects
${CMAKE_CURRENT_SOURCE_DIR}/include/Qt
${CMAKE_CURRENT_BINARY_DIR}/include )

#### Enable C++11 (for std::shared_ptr support)
Expand All @@ -92,10 +92,29 @@ ENDIF(WIN32)
set(QT_HEADER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include/Qt)
FILE(GLOB QT_HEADER_FILES "${QT_HEADER_DIR}/*.h")

############## PROCESS SUB-DIRECTORIES ##############
############## PROCESS src/ DIRECTORIES ##############
add_subdirectory(src)
add_subdirectory(tests)

################### DOCUMENTATION ###################
# Find Doxygen (used for documentation)
include(cmake/Modules/UseDoxygen.cmake)
include(cmake/Modules/UseDoxygen.cmake)

# Doxygen was found
if (TARGET doc)
message(STATUS "Doxygen found, documentation target enabled")
message("\nTo compile documentation in doc/html, run: 'make doc'")

# Install docs, if the user builds them with `make doc`
install(CODE "MESSAGE(\"Checking for documentation files to install...\")")
install(CODE "MESSAGE(\"(Compile with 'make doc' command, requires Doxygen)\")")

install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/html/
DESTINATION ${CMAKE_INSTALL_DOCDIR}/API
MESSAGE_NEVER # Don't spew about file copies
OPTIONAL ) # No error if the docs aren't found
endif()

############# PROCESS tests/ DIRECTORY ##############
if(NOT DISABLE_TESTS)
add_subdirectory(tests)
endif()

0 comments on commit 4928bd5

Please sign in to comment.