Commit 717adcb5 authored by Guillaume Roguez's avatar Guillaume Roguez
Browse files

packaging: remove source code from packaging

No sources in this branch, only packaging configuration ressources.

Issue: #80006
Change-Id: I21956c73ec3abb948288d5b0cc625882ee3ad364
parent 7d4c669a
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Precompiled Headers
*.gch
*.pch
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
# Fortran module files
*.mod
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# Executables
*.exe
*.out
*.app
Sparkle.framework
# Qt-es
*.user
/.qmake.cache
/.qmake.stash
*.pro.user
*.pro.user.*
*.qbs.user
*.qbs.user.*
*.moc
moc_*.cpp
qrc_*.cpp
ui_*.h
Makefile*
*-build-*
# QtCreator
*.autosave
#QtCtreator Qml
*.qmlproject.user
*.qmlproject.user.*
build/
lib
.DS_Store
[submodule "sparkle/Sparkle"]
path = sparkle/Sparkle
url = https://github.com/sparkle-project/Sparkle.git
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
IF(POLICY CMP0022)
CMAKE_POLICY(SET CMP0022 NEW)
ENDIF(POLICY CMP0022)
SET(PROJ_NAME Ring)
# To build nighlies we need to update RING_VERSION with an optional command line arg
IF("${RING_VERSION}" STREQUAL "")
SET(RING_VERSION "0.4.0")
ENDIF("${RING_VERSION}" STREQUAL "")
MESSAGE("Building Ring version - " ${RING_VERSION})
SET(RING_VERSION_NAME "Samuel de Champlain")
SET(BUNDLE_VERSION "Samuel de Champlain - beta")
SET(PROJ_COPYRIGHT " © 2015 Savoir-faire Linux \n GPLv3 https://www.gnu.org/copyleft/gpl.html")
ADD_DEFINITIONS("-std=c++11 -fobjc-arc")
PROJECT(${PROJ_NAME})
FIND_PACKAGE(Qt5Core REQUIRED)
FIND_PACKAGE(Qt5MacExtras REQUIRED)
FIND_PACKAGE(Qt5Widgets REQUIRED)
FIND_PACKAGE(LibRingClient REQUIRED)
IF(NOT (${ENABLE_SPARKLE} MATCHES false))
MESSAGE("Sparkle auto-update enabled")
# find_library searches in /Library/Frameworks by default
# We add an hint to our custom location
FIND_LIBRARY(SPARKLE_FRAMEWORK
NAMES Sparkle
HINTS ${CMAKE_CURRENT_SOURCE_DIR}/sparkle)
IF(EXISTS ${SPARKLE_FRAMEWORK})
SET(ENABLE_SPARKLE 1 CACHE BOOLEAN "Enable Sparkle")
ADD_DEFINITIONS(-DENABLE_SPARKLE=1)
MESSAGE("Sparkle is here:" ${SPARKLE_FRAMEWORK})
FIND_PATH(SPARKLE_INCLUDE_DIR Sparkle.h HINTS ${SPARKLE_FRAMEWORK}/Headers)
MESSAGE("INCLUDE " ${SPARKLE_INCLUDE_DIR})
# we need to copy the public key to check the updates
SET(PUBLIC_KEY_PATH "${CMAKE_CURRENT_SOURCE_DIR}/sparkle/dsa_pub.pem")
IF(EXISTS ${PUBLIC_KEY_PATH})
MESSAGE(STATUS "Looking for Public Key - found")
SET_SOURCE_FILES_PROPERTIES(${PUBLIC_KEY_PATH} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
SET(PUBLIC_KEY ${PUBLIC_KEY_PATH})
ELSE(EXISTS ${PUBLIC_KEY_PATH})
MESSAGE(WARNING "Looking for Public Key - not found")
MESSAGE(WARNING "${PUBLIC_KEY_PATH} not found Sparkle Framework will NOT work and may even prevent application from launching. Please consider disabling Sparkle Framework, creating a keypair for testing purposes")
ENDIF(EXISTS ${PUBLIC_KEY_PATH})
ELSE()
MESSAGE(FATAL_ERROR "Sparkle framework not found, build it (see README) or disable Sparkle (-DENABLE_SPARKLE=false)")
ENDIF(EXISTS ${SPARKLE_FRAMEWORK})
ENDIF(NOT (${ENABLE_SPARKLE} MATCHES false))
INCLUDE_DIRECTORIES(SYSTEM ${Qt5Core_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(SYSTEM ${Qt5MacExtras_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR})
INCLUDE_DIRECTORIES(${LIB_RING_CLIENT_INCLUDE_DIR})
MESSAGE("LRC is here:" ${LIB_RING_CLIENT_INCLUDE_DIR})
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w")
#Files to compile
SET(ringclient_CONTROLLERS
src/QNSTreeController.mm
src/QNSTreeController.h
src/CurrentCallVC.mm
src/CurrentCallVC.h
src/GeneralPrefsVC.mm
src/RingWizardWC.mm
src/RingWizardWC.h
src/RingWindowController.mm
src/RingWindowController.h
src/ConversationsVC.mm
src/ConversationsVC.h
src/PreferencesVC.mm
src/PreferencesVC.h
src/AccGeneralVC.mm
src/AccGeneralVC.h
src/AccVideoVC.mm
src/AccVideoVC.h
src/AccAudioVC.mm
src/AccAudioVC.h
src/AccRingVC.mm
src/AccRingVC.h
src/AccAdvancedVC.mm
src/AccAdvancedVC.h
src/AccSecurityVC.mm
src/AccSecurityVC.h
src/CertificateWC.mm
src/CertificateWC.h
src/AudioPrefsVC.mm
src/AudioPrefsVC.h
src/AccountsVC.mm
src/AccountsVC.h
src/VideoPrefsVC.mm
src/VideoPrefsVC.h
src/GeneralPrefsVC.h
src/HistoryVC.mm
src/HistoryVC.h
src/PersonsVC.mm
src/PersonsVC.h
src/ChatVC.mm
src/ChatVC.h)
SET(ringclient_BACKENDS
src/backends/AddressBookBackend.mm
src/backends/AddressBookBackend.h)
SET(ringclient_VIEWS
src/views/CallView.mm
src/views/CallView.h
src/views/ITProgressIndicator.mm
src/views/ITProgressIndicator.h
src/views/PersonCell.mm
src/views/PersonCell.h)
SET(ringclient_OTHERS
src/main.mm
src/AppDelegate.mm
src/AppDelegate.h
src/delegates/ImageManipulationDelegate.mm
src/delegates/ImageManipulationDelegate.h)
SET(ringclient_XIBS
MainMenu
RingWindow
CurrentCall
GeneralPrefs
Accounts
AccGeneral
AccAudio
AccVideo
AccRing
AccAdvanced
AccSecurity
AudioPrefs
VideoPrefs
PreferencesScreen
RingWizard
CertificateWindow)
# Icons
# This part tells CMake where to find and install the file itself
SET(myApp_ICON ${CMAKE_CURRENT_SOURCE_DIR}/data/appicon.icns)
SET_SOURCE_FILES_PROPERTIES(${myApp_ICON} PROPERTIES
MACOSX_PACKAGE_LOCATION "Resources")
SET(ring_ICONS ${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_action_accept.png
${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_action_call.png
${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_action_cancel.png
${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_action_hangup.png
${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_action_hold.png
${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_action_holdoff.png
${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_action_mute_video.png
${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_action_mute_audio.png
${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_action_chat.png
${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_action_search.png
${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ancrage.png
${CMAKE_CURRENT_SOURCE_DIR}/data/dark/audio.png
${CMAKE_CURRENT_SOURCE_DIR}/data/dark/general.png
${CMAKE_CURRENT_SOURCE_DIR}/data/dark/video.png
${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_action_video.png)
SET_SOURCE_FILES_PROPERTIES(${ring_ICONS} PROPERTIES
MACOSX_PACKAGE_LOCATION Resources)
SET_SOURCE_FILES_PROPERTIES(Credits.rtf PROPERTIES
MACOSX_PACKAGE_LOCATION Resources)
# append '.xib' extension before linking xib files in executable
FOREACH(xib ${ringclient_XIBS})
SET(ringclient_XIBS_FOR_EXECUTABLE ${ringclient_XIBS_FOR_EXECUTABLE} ui/${xib}.xib)
ENDFOREACH()
SET(TO_ADD
${ringclient_CONTROLLERS}
${ringclient_BACKENDS}
${ringclient_VIEWS}
${ringclient_OTHERS}
${ringclient_XIBS_FOR_EXECUTABLE}
${myApp_ICON}
Credits.rtf
${ring_ICONS})
IF(ENABLE_SPARKLE)
SET( TO_ADD ${TO_ADD} ${PUBLIC_KEY} ${SPARKLE_FRAMEWORK})
ENDIF(ENABLE_SPARKLE)
ADD_EXECUTABLE(${PROJ_NAME} MACOSX_BUNDLE ${TO_ADD})
# Follow Xcode hierarchy principles
SOURCE_GROUP("Controllers" FILES ${ringclient_CONTROLLERS})
SOURCE_GROUP("Backends" FILES ${ringclient_BACKENDS})
SOURCE_GROUP("CustomViews" FILES ${ringclient_VIEWS})
SOURCE_GROUP("Classes" FILES ${ringclient_OTHERS})
SOURCE_GROUP("Resources\\Interface Builder" FILES ${ringclient_XIBS_FOR_EXECUTABLE})
IF(ENABLE_SPARKLE)
SOURCE_GROUP("Frameworks" FILES ${SPARKLE_FRAMEWORK})
ENDIF(ENABLE_SPARKLE)
TARGET_LINK_LIBRARIES( ${PROJ_NAME}
${LIB_RING_CLIENT_LIBRARY}
${Qt5Core_LIBRARIES}
${Qt5MacExtras_LIBRARIES}
${Qt5Widgets_LIBRARIES}
)
IF(ENABLE_SPARKLE)
TARGET_LINK_LIBRARIES(${PROJ_NAME} ${SPARKLE_FRAMEWORK})
ENDIF(ENABLE_SPARKLE)
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework AppKit")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework Cocoa")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework Quartz")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework AVFoundation")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework AddressBook")
# These variables are specific to our plist and are NOT standard CMake variables
SET(MACOSX_BUNDLE_NSMAIN_NIB_FILE "MainMenu")
SET(MACOSX_BUNDLE_NSPRINCIPAL_CLASS "NSApplication")
SET_TARGET_PROPERTIES(${PROJ_NAME} PROPERTIES
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/cmake/MacOSXBundleInfo.plist.in
MACOSX_BUNDLE_GUI_IDENTIFIER "cx.ring"
MACOSX_BUNDLE_SHORT_VERSION_STRING ${RING_VERSION}
MACOSX_BUNDLE_LONG_VERSION_STRING "${PROJ_NAME} ${RING_VERSION} Nightly"
MACOSX_BUNDLE_BUNDLE_VERSION ${RING_VERSION_NAME}
MACOSX_BUNDLE_COPYRIGHT "${PROJ_COPYRIGHT}"
MACOSX_BUNDLE_INFO_STRING "Nightly build of ${PROJ_NAME} ${RING_VERSION} for testing and development"
MACOSX_BUNDLE_BUNDLE_NAME ${PROJ_NAME}
MACOSX_BUNDLE_ICON_FILE "appicon.icns"
)
# Make sure we can find the 'ibtool' program. If we can NOT find it we
# skip generation of this project
FIND_PROGRAM(IBTOOL ibtool HINTS "/usr/bin" "${OSX_DEVELOPER_ROOT}/usr/bin")
IF(${IBTOOL} STREQUAL "IBTOOL-NOTFOUND")
MESSAGE(SEND_ERROR "ibtool can not be found and is needed to compile the .xib files. It should have been installed with
the Apple developer tools. The default system paths were searched in addition to ${OSX_DEVELOPER_ROOT}/usr/bin")
endif()
# Compile the .xib files using the 'ibtool' program with the destination being the app package
FOREACH(xib ${ringclient_XIBS})
ADD_CUSTOM_COMMAND(TARGET ${PROJ_NAME} POST_BUILD
COMMAND ${IBTOOL} --errors --warnings --notices --output-format human-readable-text
--compile ${CMAKE_CURRENT_BINARY_DIR}/\${CONFIGURATION}/${PROJ_NAME}.app/Contents/Resources/${xib}.nib
${CMAKE_CURRENT_SOURCE_DIR}/ui/${xib}.xib
COMMENT "Compiling ${CMAKE_CURRENT_SOURCE_DIR}/ui/${xib}.xib")
ENDFOREACH()
SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${CMAKE_INSTALL_PREFIX})
SET(APPS "\${CMAKE_INSTALL_PREFIX}/${PROJ_NAME}.app")
INSTALL(TARGETS ${PROJ_NAME} BUNDLE DESTINATION . COMPONENT Runtime)
SET(QT_PLUGINS_DESTDIR ${PROJ_NAME}.app/Contents/Plugins)
#--------------------------------------------------------------------------------
# Install needed Qt plugins by copying directories from the qt installation
#MESSAGE("GUI====")
#foreach(plugin ${Qt5Gui_PLUGINS})
# message("Plugin ${plugin} is at location ${_loc}")
#endforeach()
LIST(APPEND QT_PLUGINS_IMAGEFORMAT Qt5::QTgaPlugin
Qt5::QGifPlugin
Qt5::QICNSPlugin
Qt5::QICOPlugin
Qt5::QJpegPlugin
Qt5::QJp2Plugin
Qt5::QMngPlugin
Qt5::QTiffPlugin
Qt5::QDDSPlugin)
# we need two plugin directories platform and imageformats
GET_TARGET_PROPERTY(_loc Qt5::QCocoaIntegrationPlugin LOCATION)
INSTALL(FILES ${_loc} DESTINATION ${QT_PLUGINS_DESTDIR}/platforms COMPONENT Runtime)
LIST(APPEND QT_PLUGINS Qt5::QCocoaIntegrationPlugin)
FOREACH(plugin ${QT_PLUGINS_IMAGEFORMAT})
GET_TARGET_PROPERTY(_loc ${plugin} LOCATION)
INSTALL(FILES ${_loc} DESTINATION ${QT_PLUGINS_DESTDIR}/imageformats COMPONENT Runtime)
LIST(APPEND QT_PLUGINS ${plugin})
ENDFOREACH()
# directories to look for dependencies
SET(DIRS ${CMAKE_INSTALL_PREFIX}/lib ${QT_LIB_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/sparkle)
INSTALL(CODE "
file(GLOB_RECURSE QTPLUGINS
\"\${CMAKE_INSTALL_PREFIX}/${QT_PLUGINS_DESTDIR}/*${CMAKE_SHARED_LIBRARY_SUFFIX}\")
include(BundleUtilities)
SET(BU_CHMOD_BUNDLE_ITEMS TRUE)
fixup_bundle(\"${APPS}\" \"\${QTPLUGINS}\" \"${DIRS}\")
" COMPONENT Runtime)
#================================
# Packaging
#================================
SET( CPACK_PACKAGE_DESCRIPTION_SUMMARY ${PROJ_NAME})
SET( CPACK_PACKAGE_NAME ${PROJ_NAME} )
SET( CPACK_PACKAGE_CONTACT "Alexandre Lision")
SET( CPACK_PACKAGE_VENDOR "Savoir-faire Linux")
SET( CPACK_PACKAGE_VERSION_MAJOR ${PROG_MAJOR_VERSION})
SET( CPACK_PACKAGE_VERSION_MINOR ${PROG_MINOR_VERSION})
SET( CPACK_PACKAGE_VERSION_PATCH ${PROG_PATCH_VERSION})
SET(CPACK_BINARY_DRAGNDROP ON)
SET( CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}")
INCLUDE(CPack)
This diff is collapsed.
{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf210
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\margl1440\margr1440\vieww9000\viewh8400\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\qc
\f0\i\fs24 \cf0 \
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\qc
{\field{\*\fldinst{HYPERLINK "http://ring.cx/"}}{\fldrslt \cf0 http://ring.cx/}}\
\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\qc
\i0\b \cf0 Authors
\i\b0 \
Adrien B\'e9raud\
Alexandre Lision\
\'c9dric Ladent-Milaret\
Eloi Bail\
Emmanuel Lepage-Vall\'e9e\
Guillaume Roguez\
Marianne Forget\
Stepan Salenikovich\
\
Based on SFLphone's project\
}
Ring Mac OSX
**********
This is the official Mac port of Ring.
Requirements
=============
- Ring daemon
- libRingClient (Qt5 version)
- Qt5 Core
- Cocoa framework
Build instructions
==================
Build Sparkle framework (optional)
----------------------------------
Ring can ship with the Sparkle framework to allow automatic app updates.
This can be disabled for your custom build by specifying -DENABLE_SPARKLE=false
in the cmake phase.
1. cd sparkle/
2. git submodule update
3. cd Sparkle/
4. make release
5. A Finder window will popup in the directory where Sparkle has been built.
Copy-paste the Sparkle.framework in sparkle/ in our project, or in
/Library/Frameworks on your system.
Build Client
------------
1. mkdir build && cd build
2. export CMAKE_PREFIX_PATH=<dir_to_qt5>
Now generate an Xcode project with CMake:
3. cmake ../ -DCMAKE_INSTALL_PREFIX=<libringclient_install_path> -G Xcode
4. open Ring.xcodeproj/
5. Build and run it from Xcode. You can also generate the final Ring.app bundle.
You can also build it from the command line:
3. cmake ../ -DCMAKE_INSTALL_PREFIX=<libringclient_install_path>
4. make
5. open Ring.app/
If you want to create the final app (self-containing .dmg):
4. make install
5. cpack -G DragNDrop Ring
Notes:
By default the client version is specified in CMakeLists.txt but it can be
overriden by specifying -DRING_VERSION=<num> in the cmake command line.
Debugging
==================
For now, the build type of the client is "Debug" by default, however it is
useful to also have the debug symbols of libRingClient. To do this, specify this
when compiling libRingClient with '-DCMAKE_BUILD_TYPE=Debug' in the cmake
options.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
<key>CFBundleGetInfoString</key>
<string>${MACOSX_BUNDLE_INFO_STRING}</string>
<key>CFBundleIconFile</key>
<string>${MACOSX_BUNDLE_ICON_FILE}</string>
<key>CFBundleIdentifier</key>
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
<key>SUPublicDSAKeyFile</key>
<string>dsa_pub.pem</string>
<key>SUFeedURL</key>
<string>http://gpl.savoirfairelinux.net/ring-download/mac_osx/sparkle-ring.xml</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleLongVersionString</key>
<string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
<key>CFBundleName</key>
<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>LSRequiresCarbon</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
<key>NSHighResolutionCapable</key>
<string>True</string>
<key>NSMainNibFile</key>
<string>${MACOSX_BUNDLE_NSMAIN_NIB_FILE}</string>
<key>NSPrincipalClass</key>
<string>${MACOSX_BUNDLE_NSPRINCIPAL_CLASS}</string>
</dict>
</plist>
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