Commit 2b46a4c5 authored by Ghislain MARY's avatar Ghislain MARY

Handle packaging for Windows.

parent a1184fe1
...@@ -29,3 +29,30 @@ if(LINPHONE_BUILDER_TARGET STREQUAL linphoneqt AND WIN32) ...@@ -29,3 +29,30 @@ if(LINPHONE_BUILDER_TARGET STREQUAL linphoneqt AND WIN32)
add_custom_command(OUTPUT "${SHORTCUT_PATH}" COMMAND "cscript" "${CMAKE_CURRENT_BINARY_DIR}/winshortcut.vbs") add_custom_command(OUTPUT "${SHORTCUT_PATH}" COMMAND "cscript" "${CMAKE_CURRENT_BINARY_DIR}/winshortcut.vbs")
add_custom_target(linphoneqt_winshortcut ALL DEPENDS "${SHORTCUT_PATH}" TARGET_linphone_builder) add_custom_target(linphoneqt_winshortcut ALL DEPENDS "${SHORTCUT_PATH}" TARGET_linphone_builder)
endif() endif()
# Packaging
if(ENABLE_PACKAGING)
get_cmake_property(_varnames VARIABLES)
set(ENABLE_VARIABLES )
foreach(_varname ${_varnames})
if(_varname MATCHES "^ENABLE_.*")
list(APPEND ENABLE_VARIABLES -D${_varname}=${${_varname}})
endif()
endforeach()
if(LINPHONE_BUILDER_TARGET STREQUAL linphoneqt)
# Linphone and linphone SDK packages
linphone_builder_apply_flags()
linphone_builder_set_ep_directories(linphone_package)
linphone_builder_expand_external_project_vars()
ExternalProject_Add(TARGET_linphone_package
DEPENDS TARGET_linphone_builder
TMP_DIR ${ep_tmp}
BINARY_DIR ${ep_build}
SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/linphone_package"
DOWNLOAD_COMMAND ""
CMAKE_GENERATOR ${CMAKE_GENERATOR}
CMAKE_ARGS ${LINPHONE_BUILDER_EP_ARGS} -DCMAKE_INSTALL_PREFIX=${LINPHONE_BUILDER_WORK_DIR}/PACKAGE -DTOOLS_DIR=${CMAKE_BINARY_DIR}/programs -DLINPHONE_OUTPUT_DIR=${CMAKE_INSTALL_PREFIX} -DLINPHONE_DESKTOP_DIR=${CMAKE_CURRENT_LIST_DIR}/../linphone-desktop -DLINPHONE_SOURCE_DIR=${EP_linphone_SOURCE_DIR} ${ENABLE_VARIABLES} -DOPENH264_VERSION=${OPENH264_VERSION}
)
endif()
endif()
This diff is collapsed.
This diff is collapsed.
H264 codec
----------
Mediastreamer 2 uses Cisco's OpenH264 library as H264 codec. OpenH264 is an
open source library but H264 is a coding format protected by a patent from
MPEG-LA. That's why that bundle does not embed any OpenH264 library and so you
will not able to use H264 out-the-box.
Fortunatly, Cisco Systems Inc. distribute OpenH264 in its binary form that you
can use in Mediastreamer without paying much royalties to MPEG-LA. However,
that binary file as a restrictive licence. See http://www.openh264.org/BINARY_LICENSE.txt form more information.
Installation procedure
----------------------
The Cisco's provided OpenH264 library is available at this address:
http://ciscobinary.openh264.org/libopenh264-@OPENH264_VERSION@-osx64.dylib.bz2 for MacOS
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.1.dylib
On Windows, the library must be installed into <SDK_location>\bin\openh264.dll
############################################################################
# WindowsPackaging.cmake
# Copyright (C) 2014 Belledonne Communications, Grenoble France
#
############################################################################
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
############################################################################
if(NOT "${CMAKE_INSTALL_PREFIX}" MATCHES .*/_CPack_Packages/.*)
execute_process(
COMMAND ${CMAKE_CPACK_COMMAND} -G NSIS
RESULT_VARIABLE CPACK_COMMAND_SUCCESS
)
if(@PERFORM_SIGNING@)
execute_process(
COMMAND @SIGNTOOL_COMMAND@ @CMAKE_CURRENT_BINARY_DIR@/@CPACK_PACKAGE_FILE_NAME@.exe
)
endif()
endif()
SectionGetFlags ${msopenh264} $0
IntOp $0 $0 & ${SF_SELECTED}
IntCmpU $0 0 done done download
download:
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"'
done:
\ No newline at end of file
Delete $INSTDIR\lib\mediastreamer\plugins\openh264.dll
\ No newline at end of file
@LIBDIR@/@LIBPREFIX@bctoolbox*.@LIBEXT@
include/bctoolbox/*
lib/bctoolbox*.lib
lib/pkgconfig/bctoolbox*.pc
share/bctoolbox/cmake/*
@LIBDIR@/@LIBPREFIX@bcunit*.@LIBEXT@
\ No newline at end of file
@LIBDIR@/@LIBPREFIX@bellesip*.@LIBEXT@
include/belle-sip/*
lib/bellesip*.lib
lib/pkgconfig/belle-sip.pc
share/BelleSIP/cmake/*
@LIBDIR@/@LIBPREFIX@bv16*.@LIBEXT@
\ No newline at end of file
@LIBDIR@/@LIBPREFIX@bzrtp*.@LIBEXT@
share/bzrtp/cmake
@LIBDIR@/@LIBPREFIX@avcodec*.@LIBEXT@
@LIBDIR@/@LIBPREFIX@avutil*.@LIBEXT@
@LIBDIR@/@LIBPREFIX@swscale*.@LIBEXT@
@LIBDIR@/@LIBPREFIX@swresample*.@LIBEXT@
@LIBDIR@/@LIBPREFIX@gsm*.@LIBEXT@
\ No newline at end of file
@LIBDIR@/@LIBPREFIX@linphone*.@LIBEXT@
@LIBDIR@/@LIBPREFIX@iconv*.@LIBEXT@
@LIBDIR@/@LIBPREFIX@intl*.@LIBEXT@
include/linphone/*
lib/linphone*.lib
share/doc/linphone-*
share/Linphone/cmake/*
share/sounds/linphone/*
share/locale/*/LC_MESSAGES/linphone.mo
@LIBDIR@/@LIBPREFIX@mbedcrypto*.@LIBEXT@
@LIBDIR@/@LIBPREFIX@mbedx509*.@LIBEXT@
@LIBDIR@/@LIBPREFIX@mbedtls*.@LIBEXT@
@LIBDIR@/@LIBPREFIX@mediastreamer_base*.@LIBEXT@
@LIBDIR@/@LIBPREFIX@mediastreamer_voip*.@LIBEXT@
include/mediastreamer2/*
lib/mediastreamer_base*.lib
lib/mediastreamer_voip*.lib
share/doc/mediastreamer2-*
share/images/nowebcamCIF.jpg
share/Mediastreamer2/cmake/*
@LIBDIR@/@LIBPREFIX@opus*.@LIBEXT@
\ No newline at end of file
@LIBDIR@/@LIBPREFIX@ortp*.@LIBEXT@
include/ortp/*
lib/ortp*.lib
lib/pkgconfig/ortp.pc
share/doc/oRTP-*
share/oRTP/cmake/*
@LIBDIR@/@LIBPREFIX@speex*.@LIBEXT@
\ No newline at end of file
@LIBDIR@/@LIBPREFIX@srtp*.@LIBEXT@
\ No newline at end of file
@LIBDIR@/@LIBPREFIX@belr*.@LIBEXT@
@LIBDIR@/@LIBPREFIX@belcard*.@LIBEXT@
lib/belr*.lib
lib/belcard*.lib
share/Belr/cmake
share/Belcard/cmake
@LIBDIR@/@LIBPREFIX@xml2*.@LIBEXT@
\ No newline at end of file
@LIBDIR@/@LIBPREFIX@zlib*.@LIBEXT@
\ No newline at end of file
#!/usr/bin/env python
import os, sys
import subprocess
class PassFile:
def __init__(self, file):
self.file = file
def password(self, v):
file = open(self.file, "r");
line = file.readline().strip()
file.close()
return line
if __name__ == '__main__':
if len(sys.argv) <= 2:
sys.exit(0)
for i,arg in enumerate(sys.argv):
if arg == "/p":
if (i + 1) == len(sys.argv):
print "Missing password argument"
sys.exit(3)
try:
sys.argv[i+1] = PassFile(sys.argv[i+1]).password(None)
except IOError:
print "Password file not found"
sys.exit(3)
actual_args = sys.argv[1:]
ret = subprocess.call(actual_args)
sys.exit(ret)
FindWindow $0 "gdkWindowToplevel" "Linphone"
StrCmp $0 0 notRunningInUninstall
MessageBox MB_OK|MB_ICONEXCLAMATION "Linphone is running. Please close it first and restart the uninstall program." /SD IDOK
Abort
notRunningInUninstall:
...@@ -207,7 +207,7 @@ qt5_add_resources(RESOURCES ${QRC_RESOURCES}) ...@@ -207,7 +207,7 @@ qt5_add_resources(RESOURCES ${QRC_RESOURCES})
# Build. # Build.
# Note: `update_translations` is provided by `languages/CMakeLists.txt`. # Note: `update_translations` is provided by `languages/CMakeLists.txt`.
if(WIN32) if(WIN32)
add_executable(${TARGET_NAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES}) add_executable(${TARGET_NAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} linphone.rc)
else() else()
add_executable(${TARGET_NAME} ${SOURCES} ${HEADERS} ${RESOURCES}) add_executable(${TARGET_NAME} ${SOURCES} ${HEADERS} ${RESOURCES})
endif() endif()
......
A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "linphone.ico"
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