Commit 5ce9dc4f authored by Ghislain MARY's avatar Ghislain MARY

Improve packaging for openh264 so that the version is to be specified only in the builder.

parent 347b5b3b
...@@ -32,8 +32,9 @@ if(NOT NASM_PROGRAM) ...@@ -32,8 +32,9 @@ if(NOT NASM_PROGRAM)
endif() endif()
endif() endif()
set(EP_openh264_VERSION "1.5.0") # Keep this variable, it is used for packaging to know the version to download from Cisco
set(EP_openh264_GIT_REPOSITORY "https://github.com/cisco/openh264" CACHE STRING "openh264 repository URL") set(EP_openh264_GIT_REPOSITORY "https://github.com/cisco/openh264" CACHE STRING "openh264 repository URL")
set(EP_openh264_GIT_TAG "v1.5.0" CACHE STRING "openh264 tag to use") set(EP_openh264_GIT_TAG "v${EP_openh264_VERSION}" CACHE STRING "openh264 tag to use")
set(EP_openh264_EXTERNAL_SOURCE_PATHS "externals/openh264") set(EP_openh264_EXTERNAL_SOURCE_PATHS "externals/openh264")
set(EP_openh264_BUILD_METHOD "custom") set(EP_openh264_BUILD_METHOD "custom")
......
...@@ -166,7 +166,7 @@ if(ENABLE_PACKAGING) ...@@ -166,7 +166,7 @@ if(ENABLE_PACKAGING)
SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/desktop/linphone_package" SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/desktop/linphone_package"
DOWNLOAD_COMMAND "" DOWNLOAD_COMMAND ""
CMAKE_GENERATOR ${CMAKE_GENERATOR} CMAKE_GENERATOR ${CMAKE_GENERATOR}
CMAKE_ARGS ${LINPHONE_BUILDER_EP_ARGS} -DCMAKE_INSTALL_PREFIX=${LINPHONE_BUILDER_WORK_DIR}/PACKAGE -DLINPHONE_OUTPUT_DIR=${CMAKE_INSTALL_PREFIX} -DLINPHONE_SOURCE_DIR=${EP_linphone_SOURCE_DIR} -DENABLE_ZRTP:BOOL=${ENABLE_ZRTP} CMAKE_ARGS ${LINPHONE_BUILDER_EP_ARGS} -DCMAKE_INSTALL_PREFIX=${LINPHONE_BUILDER_WORK_DIR}/PACKAGE -DLINPHONE_OUTPUT_DIR=${CMAKE_INSTALL_PREFIX} -DLINPHONE_SOURCE_DIR=${EP_linphone_SOURCE_DIR} -DENABLE_ZRTP:BOOL=${ENABLE_ZRTP} -DENABLE_OPENH264:BOOL=${ENABLE_OPENH264} -DOPENH264_VERSION=${EP_openh264_VERSION}
) )
elseif((LINPHONE_BUILDER_TARGET STREQUAL ms2) OR (LINPHONE_BUILDER_TARGET STREQUAL ms2-plugins)) elseif((LINPHONE_BUILDER_TARGET STREQUAL ms2) OR (LINPHONE_BUILDER_TARGET STREQUAL ms2-plugins))
# Mediastreamer SDK packages # Mediastreamer SDK packages
......
...@@ -74,7 +74,9 @@ if(APPLE) ...@@ -74,7 +74,9 @@ if(APPLE)
-change /opt/local/lib/libiconv.2.dylib @rpath/libiconv.2.dylib -change /opt/local/lib/libiconv.2.dylib @rpath/libiconv.2.dylib
${LINPHONE_SDK_TMP}/lib/liblinphone.dylib ${LINPHONE_SDK_TMP}/lib/liblinphone.dylib
) )
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/README.openh264.txt" DESTINATION "${LINPHONE_SDK_TMP}") if(ENABLE_OPENH264)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/README.openh264.txt.in" "${LINPHONE_SDK_TMP}/README.openh264.txt" @ONLY)
endif()
endif() endif()
# Generates a zip archive containing the development files of liblinphone # Generates a zip archive containing the development files of liblinphone
...@@ -85,9 +87,11 @@ if(WIN32) ...@@ -85,9 +87,11 @@ if(WIN32)
COMMAND ${7Z_PROGRAM} a -tzip ${CMAKE_BINARY_DIR}/linphone-sdk-${LINPHONE_GIT_REVISION}-win32.zip @${CMAKE_SOURCE_DIR}/linphone-sdk.list COMMAND ${7Z_PROGRAM} a -tzip ${CMAKE_BINARY_DIR}/linphone-sdk-${LINPHONE_GIT_REVISION}-win32.zip @${CMAKE_SOURCE_DIR}/linphone-sdk.list
WORKING_DIRECTORY ${LINPHONE_OUTPUT_DIR} WORKING_DIRECTORY ${LINPHONE_OUTPUT_DIR}
) )
execute_process( if(ENABLE_OPENH264)
COMMAND ${7Z_PROGRAM} a -tzip ${CMAKE_BINARY_DIR}/linphone-sdk-${LINPHONE_GIT_REVISION}-win32.zip ${CMAKE_SOURCE_DIR}/README.openh264.txt execute_process(
) COMMAND ${7Z_PROGRAM} a -tzip ${CMAKE_BINARY_DIR}/linphone-sdk-${LINPHONE_GIT_REVISION}-win32.zip ${CMAKE_SOURCE_DIR}/README.openh264.txt
)
endif()
else() else()
message(WARNING "7z has not been found, cannot generate the SDK!") message(WARNING "7z has not been found, cannot generate the SDK!")
endif() endif()
...@@ -143,12 +147,14 @@ if(WIN32) ...@@ -143,12 +147,14 @@ if(WIN32)
PATTERN "bin/openh264.dll" EXCLUDE PATTERN "bin/openh264.dll" EXCLUDE
) )
install(DIRECTORY "${LINPHONE_OUTPUT_DIR}/lib/mediastreamer/plugins/" if(ENABLE_OPENH264)
DESTINATION "lib/mediastreamer/plugins" install(DIRECTORY "${LINPHONE_OUTPUT_DIR}/lib/mediastreamer/plugins/"
COMPONENT "msopenh264" DESTINATION "lib/mediastreamer/plugins"
FILES_MATCHING PATTERN "libmsopenh264.*" COMPONENT "msopenh264"
) FILES_MATCHING PATTERN "libmsopenh264.*"
)
endif()
install(DIRECTORY "${LINPHONE_OUTPUT_DIR}/lib/mediastreamer/plugins/" install(DIRECTORY "${LINPHONE_OUTPUT_DIR}/lib/mediastreamer/plugins/"
DESTINATION "lib/mediastreamer/plugins" DESTINATION "lib/mediastreamer/plugins"
FILES_MATCHING PATTERN "libmssilk.*" PATTERN "libmsilbc.*" FILES_MATCHING PATTERN "libmssilk.*" PATTERN "libmsilbc.*"
...@@ -167,6 +173,7 @@ elseif(APPLE) ...@@ -167,6 +173,7 @@ elseif(APPLE)
configure_file("${LINPHONE_SOURCE_DIR}/gtk/gtkrc.mac" "mac-bundler/gtkrc" COPYONLY) configure_file("${LINPHONE_SOURCE_DIR}/gtk/gtkrc.mac" "mac-bundler/gtkrc" COPYONLY)
configure_file("${LINPHONE_SOURCE_DIR}/pixmaps/linphone.icns" "mac-bundler/linphone.icns" COPYONLY) configure_file("${LINPHONE_SOURCE_DIR}/pixmaps/linphone.icns" "mac-bundler/linphone.icns" COPYONLY)
configure_file("mac-bundler/linphone.bundle" "mac-bundler/linphone.bundle" COPYONLY) # This file has to be different than the one in the linphone source code because of different file access paths configure_file("mac-bundler/linphone.bundle" "mac-bundler/linphone.bundle" COPYONLY) # This file has to be different than the one in the linphone source code because of different file access paths
configure_file("mac-bundler/pkg-scripts/postinstall.in" "mac-bundler/pkg-scripts/postinstall" @ONLY)
configure_file("mac-bundler/call-bundler.cmake.in" "mac-bundler/call-bundler.cmake") configure_file("mac-bundler/call-bundler.cmake.in" "mac-bundler/call-bundler.cmake")
install(SCRIPT "${CMAKE_BINARY_DIR}/mac-bundler/call-bundler.cmake") install(SCRIPT "${CMAKE_BINARY_DIR}/mac-bundler/call-bundler.cmake")
endif() endif()
...@@ -200,9 +207,11 @@ if(WIN32) ...@@ -200,9 +207,11 @@ if(WIN32)
set(CPACK_COMPONENT_LINPHONE_BASE_DISPLAY_NAME "Linphone") set(CPACK_COMPONENT_LINPHONE_BASE_DISPLAY_NAME "Linphone")
set(CPACK_COMPONENT_LINPHONE_BASE_DESCRIPTION "Minimal installation of Linphone") set(CPACK_COMPONENT_LINPHONE_BASE_DESCRIPTION "Minimal installation of Linphone")
set(CPACK_COMPONENT_LINPHONE_BASE_REQUIRED True) set(CPACK_COMPONENT_LINPHONE_BASE_REQUIRED True)
set(CPACK_COMPONENT_MSOPENH264_DISPLAY_NAME "Cisco's OpenH264 codec") if(ENABLE_OPENH264)
set(CPACK_COMPONENT_MSOPENH264_DESCRIPTION "Download OpenH264 Video Codec provided by Cisco Systems, Inc.") set(CPACK_COMPONENT_MSOPENH264_DISPLAY_NAME "Cisco's OpenH264 codec")
set(CPACK_COMPONENT_MSOPENH264_DISABLED True) set(CPACK_COMPONENT_MSOPENH264_DESCRIPTION "Download OpenH264 Video Codec provided by Cisco Systems, Inc.")
set(CPACK_COMPONENT_MSOPENH264_DISABLED True)
endif()
endif() endif()
if(WIN32) if(WIN32)
...@@ -216,15 +225,20 @@ if(WIN32) ...@@ -216,15 +225,20 @@ if(WIN32)
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.linphone.org/") set(CPACK_NSIS_URL_INFO_ABOUT "http://www.linphone.org/")
set(CPACK_NSIS_MUI_FINISHPAGE_RUN "linphone") set(CPACK_NSIS_MUI_FINISHPAGE_RUN "linphone")
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL "ON") set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL "ON")
file(TO_NATIVE_PATH "${CMAKE_CURRENT_SOURCE_DIR}" DOS_STYLE_SOURCE_DIR) file(TO_NATIVE_PATH "${CMAKE_CURRENT_SOURCE_DIR}" DOS_STYLE_SOURCE_DIR)
string(REPLACE "\\" "\\\\" ESCAPED_DOS_STYLE_SOURCE_DIR "${DOS_STYLE_SOURCE_DIR}") string(REPLACE "\\" "\\\\" ESCAPED_DOS_STYLE_SOURCE_DIR "${DOS_STYLE_SOURCE_DIR}")
file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}" DOS_STYLE_BINARY_DIR)
# Add NSI instructions to download the openh264 codec from Cisco's servers whether msopenh264 has been installed string(REPLACE "\\" "\\\\" ESCAPED_DOS_STYLE_BINARY_DIR "${DOS_STYLE_BINARY_DIR}")
set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "!include \\\"${ESCAPED_DOS_STYLE_SOURCE_DIR}\\\\openh264-install.nsi\\\"")
if(ENABLE_OPENH264)
# Add NSI instructions to delete the openh264 codecs while uninstalling Linphone # Add NSI instructions to download the openh264 codec from Cisco's servers whether msopenh264 has been installed
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "!include \\\"${ESCAPED_DOS_STYLE_SOURCE_DIR}\\\\openh264-uninstall.nsi\\\"") configure_file("${CMAKE_CURRENT_SOURCE_DIR}/openh264-install.nsi.in" "${CMAKE_CURRENT_BINARY_DIR}/openh264-install.nsi" @ONLY)
set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "!include \\\"${ESCAPED_DOS_STYLE_BINARY_DIR}\\\\openh264-install.nsi\\\"")
# Add NSI instructions to delete the openh264 codecs while uninstalling Linphone
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "!include \\\"${ESCAPED_DOS_STYLE_SOURCE_DIR}\\\\openh264-uninstall.nsi\\\"")
endif()
# Sign the installer # Sign the installer
set(TIMESTAMP_URL "http://timestamp.verisign.com/scripts/timestamp.dll") set(TIMESTAMP_URL "http://timestamp.verisign.com/scripts/timestamp.dll")
......
...@@ -13,8 +13,8 @@ that binary file as a restrictive licence. See http://www.openh264.org/BINARY_LI ...@@ -13,8 +13,8 @@ that binary file as a restrictive licence. See http://www.openh264.org/BINARY_LI
Installation procedure Installation procedure
---------------------- ----------------------
The Cisco's provided OpenH264 library is available at this address: The Cisco's provided OpenH264 library is available at this address:
http://ciscobinary.openh264.org/libopenh264-1.5.0-osx64.dylib.bz2 for MacOS http://ciscobinary.openh264.org/libopenh264-@OPENH264_VERSION@-osx64.dylib.bz2 for MacOS
http://ciscobinary.openh264.org/openh264-1.5.0-win32msvc.dll.bz2 for Windows (32 bit) http://ciscobinary.openh264.org/openh264-@OPENH264_VERSION@-win32msvc.dll.bz2 for Windows (32 bit)
Once you get the library, uncompress it into <SDK_location>/lib/libopenh264.0.dylib Once you get the library, uncompress it into <SDK_location>/lib/libopenh264.1.dylib
On Windows, the library must be installed into <SDK_location>\bin\openh264.dll On Windows, the library must be installed into <SDK_location>\bin\openh264.dll
...@@ -44,7 +44,7 @@ execute_process( ...@@ -44,7 +44,7 @@ execute_process(
execute_process( execute_process(
COMMAND pkgbuild COMMAND pkgbuild
--install-location /Applications --install-location /Applications
--scripts "${LINPHONE_SOURCE_DIR}/build/macos/pkg-scripts" --scripts "${CMAKE_CURRENT_BINARY_DIR}/pkg-scripts"
--component "${CMAKE_INSTALL_PREFIX}/Linphone.app" --component "${CMAKE_INSTALL_PREFIX}/Linphone.app"
"./linphone-${LINPHONE_GIT_REVISION}.pkg" "./linphone-${LINPHONE_GIT_REVISION}.pkg"
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
CURL=/usr/bin/curl CURL=/usr/bin/curl
BUNZIP2=/usr/bin/bunzip2 BUNZIP2=/usr/bin/bunzip2
VERSION=1.4.0 VERSION=@OPENH264_VERSION@
BASENAME=libopenh264-${VERSION}-osx64 BASENAME=libopenh264-${VERSION}-osx64
FILENAME=${BASENAME}.dylib.bz2 FILENAME=${BASENAME}.dylib.bz2
TMPDIR=/tmp/linphone_installer TMPDIR=/tmp/linphone_installer
......
...@@ -2,6 +2,6 @@ SectionGetFlags ${msopenh264} $0 ...@@ -2,6 +2,6 @@ SectionGetFlags ${msopenh264} $0
IntOp $0 $0 & ${SF_SELECTED} IntOp $0 $0 & ${SF_SELECTED}
IntCmpU $0 0 done done download IntCmpU $0 0 done done download
download: download:
NSISdl::download http://ciscobinary.openh264.org/openh264-1.5.0-win32msvc.dll.bz2 $INSTDIR\lib\mediastreamer\plugins\openh264.dll.bz2 NSISdl::download http://ciscobinary.openh264.org/openh264-@OPENH264_VERSION@-win32msvc.dll.bz2 $INSTDIR\lib\mediastreamer\plugins\openh264.dll.bz2
ExecWait '"$INSTDIR\bin\bunzip2.exe" "$INSTDIR\lib\mediastreamer\plugins\openh264.dll.bz2"' ExecWait '"$INSTDIR\bin\bunzip2.exe" "$INSTDIR\lib\mediastreamer\plugins\openh264.dll.bz2"'
done: done:
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment