Skip to content

Commit 195bc20

Browse files
authored
Merge branch 'develop' into ferdnyc-patch-1
2 parents 771aca5 + 43c6892 commit 195bc20

File tree

108 files changed

+2350
-1836
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+2350
-1836
lines changed

.github/stale.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Number of days of inactivity before an issue becomes stale
2+
daysUntilStale: 90
3+
# Number of days of inactivity before a stale issue is closed
4+
daysUntilClose: 10
5+
# Issues with these labels will never be considered stale
6+
exemptLabels:
7+
- pinned
8+
- security
9+
- enhancement
10+
# Label to use when marking an issue as stale
11+
staleLabel: stale
12+
# Comment to post when marking an issue as stale. Set to `false` to disable
13+
markComment: >
14+
This issue has been automatically marked as **stale** because it has not had
15+
recent activity. It will be closed if no further activity occurs. Thank you
16+
for your contributions.
17+
# Comment to post when closing a stale issue. Set to `false` to disable
18+
closeComment: false
19+
# Only close issues
20+
only: issues
21+
# Don't close issues which are assigned to somebody
22+
exemptAssignees: true

.gitlab-ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ linux-builder:
2424
- ~/auto-update-docs "$CI_PROJECT_DIR/build" "$CI_COMMIT_REF_NAME"
2525
- mv install-x64/lib/python3.4/site-packages/*openshot* install-x64/python
2626
- echo -e "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" > "install-x64/share/$CI_PROJECT_NAME"
27-
- git log $(git describe --tags --abbrev=0)..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"
27+
- git log $(git describe --tags --abbrev=0 @^)..@ --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"
2828
when: always
2929
except:
3030
- tags
@@ -46,12 +46,12 @@ mac-builder:
4646
- export LIBOPENSHOT_AUDIO_DIR=$CI_PROJECT_DIR/build/install-x64
4747
- mkdir -p build; cd build;
4848
- mkdir -p install-x64/python;
49-
- 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" ../
49+
- 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=Release" -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" ../
5050
- make
5151
- make install
5252
- mv install-x64/lib/python3.6/site-packages/*openshot* install-x64/python
5353
- echo -e "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" > "install-x64/share/$CI_PROJECT_NAME"
54-
- git log $(git describe --tags --abbrev=0)..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"
54+
- git log $(git describe --tags --abbrev=0 @^)..@ --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"
5555
when: always
5656
except:
5757
- tags
@@ -79,8 +79,8 @@ windows-builder-x64:
7979
- mingw32-make install
8080
- Move-Item -Force -path "install-x64\lib\python3.7\site-packages\*openshot*" -destination "install-x64\python\"
8181
- 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
82-
- $PREV_GIT_LABEL=(git describe --tags --abbrev=0)
83-
- 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"
82+
- $PREV_GIT_LABEL=(git describe --tags --abbrev=0 '@^')
83+
- git log "$PREV_GIT_LABEL..@" --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"
8484
when: always
8585
except:
8686
- tags
@@ -108,8 +108,8 @@ windows-builder-x86:
108108
- mingw32-make install
109109
- Move-Item -Force -path "install-x86\lib\python3.7\site-packages\*openshot*" -destination "install-x86\python\"
110110
- 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
111-
- $PREV_GIT_LABEL=(git describe --tags --abbrev=0)
112-
- 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"
111+
- $PREV_GIT_LABEL=(git describe --tags --abbrev=0 '@^')
112+
- git log "$PREV_GIT_LABEL..@" --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"
113113
when: always
114114
except:
115115
- tags

.travis.yml

Lines changed: 65 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ addons:
1818
- qtmultimedia5-dev
1919
- doxygen
2020
- graphviz
21+
- curl
2122
packages: &ff_common # Common set of FFmpeg packages
2223
- *p_common
2324
- libfdk-aac-dev
@@ -33,20 +34,12 @@ addons:
3334

3435
matrix:
3536
include:
36-
- name: "FFmpeg 2 GCC (Ubuntu 16.04 Xenial)"
37-
env: BUILD_VERSION=ffmpeg2
38-
os: linux
39-
dist: xenial
40-
addons:
41-
apt:
42-
sources:
43-
- sourceline: 'ppa:openshot.developers/libopenshot-daily'
44-
- sourceline: 'ppa:beineri/opt-qt-5.10.0-xenial'
45-
packages:
46-
- *ff_common
4737

48-
- name: "FFmpeg 3 GCC (Ubuntu 18.04 Bionic)"
49-
env: BUILD_VERSION=ffmpeg3
38+
- name: "Coverage + FFmpeg 3.4 GCC (Ubuntu 18.04 Bionic)"
39+
env:
40+
- BUILD_VERSION=coverage_ffmpeg34
41+
- CMAKE_EXTRA_ARGS="-DENABLE_COVERAGE=1"
42+
- TEST_TARGET=coverage
5043
os: linux
5144
dist: bionic
5245
addons:
@@ -57,9 +50,15 @@ matrix:
5750
packages:
5851
- *ff_common
5952
- qt5-default
53+
- libjsoncpp-dev
54+
- lcov
55+
- binutils-common # For c++filt
6056

6157
- name: "FFmpeg 4 GCC (Ubuntu 18.04 Bionic)"
62-
env: BUILD_VERSION=ffmpeg4
58+
env:
59+
- BUILD_VERSION=ffmpeg4
60+
- CMAKE_EXTRA_ARGS=""
61+
- TEST_TARGET=test
6362
os: linux
6463
dist: bionic
6564
addons:
@@ -71,6 +70,7 @@ matrix:
7170
packages:
7271
- *ff_common
7372
- qt5-default
73+
- libjsoncpp-dev
7474
- libavcodec58
7575
- libavformat58
7676
- libavdevice58
@@ -81,8 +81,11 @@ matrix:
8181
- libavresample4
8282
- libswresample3
8383

84-
- name: "FFmpeg 3 Clang (Ubuntu 18.04 Bionic)"
85-
env: BUILD_VERSION=ffmpeg3
84+
- name: "FFmpeg 3.4 Clang (Ubuntu 18.04 Bionic)"
85+
env:
86+
- BUILD_VERSION=clang_ffmpeg34
87+
- CMAKE_EXTRA_ARGS=""
88+
- TEST_TARGET=test
8689
os: linux
8790
dist: bionic
8891
compiler: clang
@@ -96,9 +99,53 @@ matrix:
9699
- qt5-default
97100
- libomp-dev
98101

102+
- name: "FFmpeg 3.2 GCC (Ubuntu 16.04 Xenial)"
103+
env:
104+
- BUILD_VERSION=ffmpeg32
105+
- CMAKE_EXTRA_ARGS=""
106+
- TEST_TARGET="os_test"
107+
os: linux
108+
dist: xenial
109+
addons:
110+
apt:
111+
sources:
112+
- sourceline: 'ppa:openshot.developers/libopenshot-daily'
113+
- sourceline: 'ppa:beineri/opt-qt-5.10.0-xenial'
114+
- sourceline: 'ppa:jon-hedgerows/ffmpeg-backports'
115+
packages:
116+
- *ff_common
117+
- libavcodec57
118+
- libavdevice57
119+
- libavfilter6
120+
- libavformat57
121+
- libavresample3
122+
- libavutil55
123+
- libpostproc54
124+
- libswresample2
125+
- libswscale4
126+
127+
- name: "FFmpeg 2 GCC (Ubuntu 16.04 Xenial)"
128+
env:
129+
- BUILD_VERSION=ffmpeg2
130+
- CMAKE_EXTRA_ARGS=""
131+
- TEST_TARGET="os_test"
132+
os: linux
133+
dist: xenial
134+
addons:
135+
apt:
136+
sources:
137+
- sourceline: 'ppa:openshot.developers/libopenshot-daily'
138+
- sourceline: 'ppa:beineri/opt-qt-5.10.0-xenial'
139+
packages:
140+
- *ff_common
141+
99142
script:
100143
- mkdir -p build; cd build;
101-
- cmake -DCMAKE_BUILD_TYPE:STRING="Debug" ../
144+
- cmake -DCMAKE_BUILD_TYPE:STRING="Debug" ${CMAKE_EXTRA_ARGS} ../
102145
- make VERBOSE=1
103-
- make os_test
146+
- make ${TEST_TARGET}
104147
- make install DESTDIR="$BUILD_VERSION"
148+
- cd ..
149+
150+
after_success:
151+
- if [ "x$TEST_TARGET" = "xcoverage" ]; then bash <(curl -s https://codecov.io/bash) -f build/coverage.info || echo "Codecov did not collect coverage reports"; fi

CMakeLists.txt

Lines changed: 88 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ For more information, please visit <http://www.openshot.org/>.
4040
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules")
4141

4242
################ PROJECT VERSION ####################
43-
set(PROJECT_VERSION_FULL "0.2.3-dev1")
44-
set(PROJECT_SO_VERSION 17)
43+
set(PROJECT_VERSION_FULL "0.2.5-dev2")
44+
set(PROJECT_SO_VERSION 19)
4545

4646
# Remove the dash and anything following, to get the #.#.# version for project()
4747
STRING(REGEX REPLACE "\-.*$" "" VERSION_NUM "${PROJECT_VERSION_FULL}")
@@ -66,12 +66,44 @@ Generating build files for OpenShot with CMake ${CMAKE_VERSION}
6666
# in order to properly configure CMAKE_INSTALL_LIBDIR path
6767
include(GNUInstallDirs)
6868

69+
# Collect and display summary of options/dependencies
70+
include(FeatureSummary)
71+
72+
################ OPTIONS ##################
73+
# Optional build settings for libopenshot
74+
option(USE_SYSTEM_JSONCPP "Use system installed JsonCpp, if found" ON)
75+
option(DISABLE_BUNDLED_JSONCPP "Don't fall back to bundled JsonCpp" OFF)
76+
option(ENABLE_IWYU "Enable 'Include What You Use' scanner (CMake 3.3+)" OFF)
77+
option(ENABLE_TESTS "Build unit tests (requires UnitTest++)" ON)
78+
option(ENABLE_DOCS "Build API documentation (requires Doxygen)" ON)
79+
80+
# Legacy commandline override
81+
if (DISABLE_TESTS)
82+
if(ENABLE_COVERAGE)
83+
message(WARNING "ENABLE_COVERAGE requires tests, overriding DISABLE_TESTS")
84+
set(ENABLE_TESTS ON)
85+
else()
86+
set(ENABLE_TESTS OFF)
87+
endif()
88+
endif()
89+
90+
if(DEFINED ENABLE_TESTS)
91+
set(ENABLE_TESTS ${ENABLE_TESTS} CACHE BOOL "Build unit tests (requires UnitTest++)" FORCE)
92+
endif()
93+
6994
########## Configure Version.h header ##############
7095
configure_file(include/OpenShotVersion.h.in include/OpenShotVersion.h @ONLY)
7196
# We'll want that installed later
7297
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/include/OpenShotVersion.h
7398
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libopenshot)
7499

100+
#### Work around a GCC < 9 bug with handling of _Pragma() in macros
101+
#### See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55578
102+
if ((${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") AND
103+
(${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS "9.0.0"))
104+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -no-integrated-cpp")
105+
endif()
106+
75107
#### Enable C++11 (for std::shared_ptr support)
76108
set(CMAKE_CXX_STANDARD 11)
77109
set(CMAKE_CXX_STANDARD_REQUIRED ON)
@@ -85,29 +117,67 @@ include_directories(
85117
${CMAKE_CURRENT_SOURCE_DIR}/include
86118
${CMAKE_CURRENT_BINARY_DIR}/include)
87119

120+
############## Code Coverage #########################
121+
if (DISABLE_TESTS AND ENABLE_COVERAGE)
122+
message(WARNING "ENABLE_COVERAGE requires tests, overriding DISABLE_TESTS")
123+
set(DISABLE_TESTS OFF CACHE BOOL "Don't build unit tests" FORCE)
124+
endif()
125+
126+
if (ENABLE_COVERAGE)
127+
if (NOT CMAKE_BUILD_TYPE)
128+
set(CMAKE_BUILD_TYPE "Debug")
129+
message(STATUS "Coverage enabled, setting build type to Debug")
130+
endif()
131+
include(CodeCoverage)
132+
append_coverage_compiler_flags()
133+
endif()
134+
add_feature_info("Coverage" ENABLE_COVERAGE "analyze test coverage and generate report")
135+
88136
############## PROCESS src/ DIRECTORIES ##############
89137
add_subdirectory(src)
90138

91139
################### DOCUMENTATION ###################
92140
# Find Doxygen (used for documentation)
93-
include(cmake/Modules/UseDoxygen.cmake)
94-
95-
# Doxygen was found
96-
if (TARGET doc)
97-
message(STATUS "Doxygen found, documentation target enabled")
98-
message("\nTo compile documentation in doc/html, run: 'make doc'")
99-
100-
# Install docs, if the user builds them with `make doc`
101-
install(CODE "MESSAGE(\"Checking for documentation files to install...\")")
102-
install(CODE "MESSAGE(\"(Compile with 'make doc' command, requires Doxygen)\")")
103-
104-
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/html/
105-
DESTINATION ${CMAKE_INSTALL_DOCDIR}/API
106-
MESSAGE_NEVER # Don't spew about file copies
107-
OPTIONAL ) # No error if the docs aren't found
141+
set(DOCS_ENABLED FALSE) # Only set true if Doxygen is found and configured
142+
if (ENABLE_DOCS)
143+
include(cmake/Modules/UseDoxygen.cmake)
144+
145+
# Doxygen was found
146+
if (TARGET doc)
147+
message(STATUS "Doxygen found, documentation target enabled")
148+
set(DOCS_ENABLED TRUE)
149+
150+
# Install docs, if the user builds them with `make doc`
151+
install(CODE "MESSAGE(\"Checking for documentation files to install...\")")
152+
install(CODE "MESSAGE(\"(Compile with 'make doc' command, requires Doxygen)\")")
153+
154+
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/html/
155+
DESTINATION ${CMAKE_INSTALL_DOCDIR}/API
156+
MESSAGE_NEVER # Don't spew about file copies
157+
OPTIONAL ) # No error if the docs aren't found
158+
endif()
108159
endif()
160+
add_feature_info("Documentation" DOCS_ENABLED "Build API documentation with 'make doc'")
109161

110162
############# PROCESS tests/ DIRECTORY ##############
111-
if(NOT DISABLE_TESTS)
163+
if(ENABLE_TESTS)
164+
set(TESTS_ENABLED TRUE) # May be overridden by tests/CMakeLists.txt
112165
add_subdirectory(tests)
113166
endif()
167+
add_feature_info("Unit tests" TESTS_ENABLED "Compile unit tests for library functions")
168+
169+
############## COVERAGE REPORTING #################
170+
if (ENABLE_COVERAGE)
171+
setup_target_for_coverage_lcov(
172+
NAME coverage
173+
LCOV_ARGS "--no-external"
174+
EXECUTABLE openshot-test
175+
DEPENDENCIES openshot-test)
176+
message("Generate coverage report with 'make coverage'")
177+
endif()
178+
179+
########### PRINT FEATURE SUMMARY ##############
180+
feature_summary(WHAT ALL
181+
INCLUDE_QUIET_PACKAGES
182+
FATAL_ON_MISSING_REQUIRED_PACKAGES
183+
DESCRIPTION "Displaying feature summary\n\nBuild configuration:")

0 commit comments

Comments
 (0)