Feature : AppImage generation.

Centralize install process into cmake folder.
Prepare macos stuff for dmg and code signing process.
This commit is contained in:
Julien Wadel 2023-10-13 16:19:36 +02:00
parent af6a6f9f59
commit b463180d28
18 changed files with 514 additions and 27 deletions

View file

@ -81,6 +81,8 @@ job-ubuntu2004-makefile-gcc:
- echo $CMAKE_GENERATOR
- echo $DEFAULT_LINUX_CMAKE_OPTIONS
- echo $CMAKE_SANITIZER_OPTIONS
- eval "$(qtchooser -qt=$QT_LINUX_VER -print-env)"
- export PATH=${QTTOOLDIR}:$PATH
- cd build
- cmake .. -G "$CMAKE_GENERATOR" -DCMAKE_VERBOSE_MAKEFILE=ON -DLINPHONESDK_PLATFORM=Desktop -DCMAKE_BUILD_TYPE=$CI_BUILD_TYPE $DEFAULT_LINUX_CMAKE_OPTIONS $CMAKE_OPTIONS $SCHEDULE_CMAKE_OPTIONS $CMAKE_SANITIZER_OPTIONS
- cmake --build . --target install --config $CI_BUILD_TYPE $LBC_NODEBUG_OPTIONS
@ -123,6 +125,8 @@ job-ubuntu2004-makefile-gcc-package:
- echo $CMAKE_GENERATOR
- echo $DEFAULT_LINUX_CMAKE_OPTIONS
- echo $CMAKE_SANITIZER_OPTIONS
- eval "$(qtchooser -qt=$QT_LINUX_VER -print-env)"
- export PATH=${QTTOOLDIR}:$PATH
- cd build
- cmake .. -G "$CMAKE_GENERATOR" -DCMAKE_VERBOSE_MAKEFILE=ON -DLINPHONESDK_PLATFORM=Desktop -DCMAKE_BUILD_TYPE=$CI_BUILD_TYPE $DEFAULT_LINUX_CMAKE_OPTIONS $CMAKE_OPTIONS $SCHEDULE_CMAKE_OPTIONS $CMAKE_SANITIZER_OPTIONS
- cmake --build . --target install --config $CI_BUILD_TYPE $LBC_NODEBUG_OPTIONS

View file

@ -246,7 +246,7 @@ if(NOT APPLE OR MONO_ARCH)
#install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory \"${CMAKE_INSTALL_PREFIX}/share/\" \"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/\")")
#install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory \"${CMAKE_INSTALL_PREFIX}/mkspecs/\" \"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/\")")
endif()
include (cmake/install/install.cmake)
else()
include(cmake/TasksMacos.cmake)
endif()

View file

@ -119,18 +119,4 @@ foreach(T ${QT_PACKAGES})
target_link_libraries(${TARGET_NAME} PRIVATE Qt6::${T})
endforeach()
################################################################
# INSTALL
################################################################
install(TARGETS ${TARGET_NAME}
BUNDLE DESTINATION .
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
if(ENABLE_APP_PACKAGE_ROOTCA)
install(FILES "${LINPHONE_OUTPUT_DIR}/share/linphone/rootca.pem" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/${EXECUTABLE_NAME}")
endif()

BIN
Linphone/data/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 336 KiB

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash
##
## Copyright (c) 2010-2020 Belledonne Communications SARL.
## Copyright (c) 2010-2024 Belledonne Communications SARL.
##
## This file is part of linphone-desktop
## (see https://www.linphone.org).
@ -22,7 +22,7 @@
for i in 16 22 24 32 64 128 256
do
mkdir -p hicolor/${i}x${i}/apps
inkscape -z -e hicolor/${i}x${i}/apps/icon.png -w $i -h $i ../images/linphone_logo.svg
inkscape -z -e hicolor/${i}x${i}/apps/icon.png -w $i -h $i ../image/logo.svg
done
convert -density 256x256 -background transparent ../images/linphone_logo.svg -define icon:auto-resize -colors 256 ../icon.ico
png2icns ../../cmake_builder/linphone_package/macos/linphone.icns hicolor/16x16/apps/icon.png hicolor/32x32/apps/icon.png hicolor/128x128/apps/icon.png hicolor/256x256/apps/icon.png
convert -density 256x256 -background transparent ../image/logo.svg -define icon:auto-resize -colors 256 ../icon.ico
png2icns ../../../cmake/install/macos/linphone.icns hicolor/16x16/apps/icon.png hicolor/32x32/apps/icon.png hicolor/128x128/apps/icon.png hicolor/256x256/apps/icon.png

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash
##
## Copyright (c) 2010-2020 Belledonne Communications SARL.
## Copyright (c) 2010-2024 Belledonne Communications SARL.
##
## This file is part of linphone-desktop
## (see https://www.linphone.org).
@ -22,7 +22,7 @@
for i in 16 22 24 32 64 128 256
do
mkdir -p hicolor/${i}x${i}/apps
inkscape -z --export-type=png --export-file=hicolor/${i}x${i}/apps/icon.png -w $i -h $i ../images/linphone_logo.svg
inkscape -z --export-type=png --export-file=hicolor/${i}x${i}/apps/icon.png -w $i -h $i ../image/logo.svg
done
convert -density 256x256 -background transparent ../images/linphone_logo.svg -define icon:auto-resize -colors 256 ../icon.ico
png2icns ../../cmake_builder/linphone_package/macos/linphone.icns hicolor/16x16/apps/icon.png hicolor/32x32/apps/icon.png hicolor/128x128/apps/icon.png hicolor/256x256/apps/icon.png
convert -density 256x256 -background transparent ../image/logo.svg -define icon:auto-resize -colors 256 ../icon.ico
png2icns ../../../cmake/install/macos/linphone.icns hicolor/16x16/apps/icon.png hicolor/32x32/apps/icon.png hicolor/128x128/apps/icon.png hicolor/256x256/apps/icon.png

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash
##
## Copyright (c) 2010-2020 Belledonne Communications SARL.
## Copyright (c) 2010-2024 Belledonne Communications SARL.
##
## This file is part of linphone-desktop
## (see https://www.linphone.org).
@ -22,7 +22,7 @@
for i in 16 22 24 32 64 128 256
do
mkdir -p hicolor/${i}x${i}/apps
inkscape -z --export-type=png --export-filename=hicolor/${i}x${i}/apps/icon.png -w $i -h $i ../images/linphone_logo.svg
inkscape -z --export-type=png --export-filename=hicolor/${i}x${i}/apps/icon.png -w $i -h $i ../image/logo.svg
done
convert -density 256x256 -background transparent ../images/linphone_logo.svg -define icon:auto-resize -colors 256 ../icon.ico
png2icns ../../cmake_builder/linphone_package/macos/linphone.icns hicolor/16x16/apps/icon.png hicolor/32x32/apps/icon.png hicolor/128x128/apps/icon.png hicolor/256x256/apps/icon.png
convert -density 256x256 -background transparent ../image/logo.svg -define icon:auto-resize -colors 256 ../icon.ico
png2icns ../../../cmake/install/macos/linphone.icns hicolor/16x16/apps/icon.png hicolor/32x32/apps/icon.png hicolor/128x128/apps/icon.png hicolor/256x256/apps/icon.png

130
cmake/install/create_appimage.sh Executable file
View file

@ -0,0 +1,130 @@
#!/bin/bash
##
## Copyright (c) 2010-2024 Belledonne Communications SARL.
##
## This file is part of linphone-desktop
## (see https://www.linphone.org).
##
## 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 3 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, see <http://www.gnu.org/licenses/>.
##
# Arguments :
# $1 = Executable Name
# $2 = Output Filename
# $3 = Qt root path (eg. "~/Qt/5.15.2/gcc_64")
# $4 = Key of the code sign (optional but mendatory if code signing)
APP_NAME="$1"
QT_PATH="$3"
BIN_SOURCE_DIR="OUTPUT/"
WORK_DIR="WORK/Packages/AppImageDir"
# Goal : avoid fuse on CI. --appimage-extract-and-run is not enough because of not propagate to plugins.
export APPIMAGE_EXTRACT_AND_RUN=1
rm -rf ${WORK_DIR}/AppDir
mkdir -p "${WORK_DIR}/AppDir/usr/"
copyFolder()
{
mkdir -p "${WORK_DIR}/AppDir/usr/$1"
cp -rf "${BIN_SOURCE_DIR}/$1"/* "${WORK_DIR}/AppDir/usr/$1"
}
#Copy all files from the output project
#cp -rf "${BIN_SOURCE_DIR}"/* "${WORK_DIR}/AppDir/usr/"
copyFolder bin
#cp -rf "${BIN_SOURCE_DIR}/bin"/* "${WORK_DIR}/AppDir/usr/bin"
# Copy share
copyFolder share/applications
copyFolder share/belr
copyFolder share/icons
copyFolder share/images
copyFolder share/linphone
copyFolder share/sounds
#remove Packages folder : it is not part of the project
#rm -rf "${WORK_DIR}/AppDir/usr/Packages"
#remove libraries : there are automatically found by linuxdeploy
#rm -rf "${WORK_DIR}/AppDir/usr/lib"
#rm -rf "${WORK_DIR}/AppDir/usr/lib64"
#Copy soci sqlite3 backend
mkdir -p "${WORK_DIR}/AppDir/usr/lib"
cp -f "${BIN_SOURCE_DIR}/lib"/libsoci_sqlite3* "${WORK_DIR}/AppDir/usr/lib/"
cp -f "${BIN_SOURCE_DIR}/lib"/libapp-plugin* "${WORK_DIR}/AppDir/usr/lib/"
cp -f "${BIN_SOURCE_DIR}/lib64"/libsoci_sqlite3* "${WORK_DIR}/AppDir/usr/lib/"
cp -f "${BIN_SOURCE_DIR}/lib64"/libapp-plugin* "${WORK_DIR}/AppDir/usr/lib/"
cp -f "${BIN_SOURCE_DIR}/lib"/libEQt* "${WORK_DIR}/AppDir/usr/lib/"
cp -f "${BIN_SOURCE_DIR}/lib64"/libEQt* "${WORK_DIR}/AppDir/usr/lib/"
if [ -d "${BIN_SOURCE_DIR}/lib64/mediastreamer" ]; then
mkdir -p "${WORK_DIR}/AppDir/usr/lib64/"
cp -rf "${BIN_SOURCE_DIR}"/lib64/mediastreamer "${WORK_DIR}/AppDir/usr/lib64/"
fi
if [ -d "${BIN_SOURCE_DIR}/lib/mediastreamer" ]; then
mkdir -p "${WORK_DIR}/AppDir/usr/lib/"
cp -rf "${BIN_SOURCE_DIR}"/lib/mediastreamer "${WORK_DIR}/AppDir/usr/lib/"
fi
if [ -f "${WORK_DIR}/AppBin/linuxdeploy-x86_64.AppImage" ]; then
echo "linuxdeploy-x86_64.AppImage exists"
else
wget -P "${WORK_DIR}/AppBin" https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
#wget -P "${WORK_DIR}/AppBin" https://artifacts.assassinate-you.net/linuxdeploy/travis-456/linuxdeploy-x86_64.AppImage
chmod +x "${WORK_DIR}/AppBin/linuxdeploy-x86_64.AppImage"
fi
if [ -f "${WORK_DIR}/AppBin/linuxdeploy-plugin-qt-x86_64.AppImage" ]; then
echo "linuxdeploy-plugin-qt-x86_64.AppImage exists"
else
wget -P "${WORK_DIR}/AppBin" https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
chmod +x "${WORK_DIR}/AppBin/linuxdeploy-plugin-qt-x86_64.AppImage"
fi
###########################################################################################
export QMAKE=qmake
export QML_SOURCES_PATHS=${QML_SOURCES_PATHS}:${WORK_DIR}/..
export LD_LIBRARY_PATH=${QT_PATH}/lib:${BIN_SOURCE_DIR}/lib:${BIN_SOURCE_DIR}/lib64
#export EXTRA_QT_PLUGINS=webenginecore;webview;webengine
echo "QML_SOURCES_PATHS=${QML_SOURCES_PATHS}"
echo "QML_MODULES_PATHS=${QML_MODULES_PATHS}"
echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}"
echo "-- Generating AppDir for AppImage"
if [ -z "$4" ]; then
echo "./${WORK_DIR}/AppBin/linuxdeploy-x86_64.AppImage --appimage-extract-and-run --appdir=${WORK_DIR}/AppDir -e ${WORK_DIR}/AppDir/usr/bin/${APP_NAME} --output appimage --desktop-file=${WORK_DIR}/AppDir/usr/share/applications/${APP_NAME}.desktop -i ${WORK_DIR}/AppDir/usr/share/icons/hicolor/scalable/apps/${APP_NAME}.svg --plugin qt"
./${WORK_DIR}/AppBin/linuxdeploy-x86_64.AppImage --appimage-extract-and-run --appdir=${WORK_DIR}/AppDir -e ${WORK_DIR}/AppDir/usr/bin/${APP_NAME} --output appimage --desktop-file=${WORK_DIR}/AppDir/usr/share/applications/${APP_NAME}.desktop -i ${WORK_DIR}/AppDir/usr/share/icons/hicolor/scalable/apps/${APP_NAME}.svg --plugin qt
else
if [ -f "${WORK_DIR}/AppBin/appimagetool-x86_64.AppImage" ]; then
echo "appimagetool-x86_64.AppImage exists"
else
wget -P "${WORK_DIR}/AppBin" https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
chmod +x "${WORK_DIR}/AppBin/appimagetool-x86_64.AppImage"
fi
./${WORK_DIR}/AppBin/linuxdeploy-x86_64.AppImage --appimage-extract-and-run --appdir=${WORK_DIR}/AppDir -e ${WORK_DIR}/AppDir/usr/bin/${APP_NAME} --desktop-file=${WORK_DIR}/AppDir/usr/share/applications/${APP_NAME}.desktop -i ${WORK_DIR}/AppDir/usr/share/icons/hicolor/scalable/apps/${APP_NAME}.svg --plugin qt
#./linuxdeploy-x86_64.AppImage --appdir=${WORK_DIR}/ -e ${WORK_DIR}/app/bin/${APP_NAME} --output appimage --desktop-file=${WORK_DIR}/app/share/applications/${APP_NAME}.desktop -i ${WORK_DIR}/app/share/icons/hicolor/scalable/apps/${APP_NAME}.svg
echo "-- Code Signing of AppImage"
# APPIMAGETOOL_SIGN_PASSPHRASE has to the parent environment (not here). Do not use export.
./${WORK_DIR}/AppBin/appimagetool-x86_64.AppImage --appimage-extract-and-run ${WORK_DIR}/AppDir --sign --sign-key $4
fi
#mkdir -p "${BIN_SOURCE_DIR}/Packages"
#mv *.AppImage "${BIN_SOURCE_DIR}/Packages/$2.AppImage"

View file

@ -0,0 +1,98 @@
################################################################################
#
# Copyright (c) 2017-2024 Belledonne Communications SARL.
#
# This file is part of linphone-desktop
# (see https://www.linphone.org).
#
# 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 3 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, see <http://www.gnu.org/licenses/>.
#
################################################################################
cmake_minimum_required(VERSION 3.1)
set(TARGET_NAME Linphone)
if (GIT_EXECUTABLE AND NOT(LINPHONEAPP_VERSION))
execute_process(
COMMAND ${GIT_EXECUTABLE} describe --always
OUTPUT_VARIABLE LINPHONEAPP_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../.."
)
elseif (NOT(LINPHONEAPP_VERSION))
set(LINPHONEAPP_VERSION "0.0.0")
endif ()
set(LINPHONE_VERSION ${LINPHONE_MAJOR_VERSION}.${LINPHONE_MINOR_VERSION}.${LINPHONE_MICRO_VERSION})
set(PACKAGE_VERSION "${LINPHONEAPP_VERSION}")
install(TARGETS ${TARGET_NAME}
BUNDLE DESTINATION .
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
if(ENABLE_APP_PACKAGE_ROOTCA)
install(FILES "${LINPHONE_OUTPUT_DIR}/share/linphone/rootca.pem" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/${EXECUTABLE_NAME}")
endif()
# ==============================================================================
# CPack.
# ==============================================================================
set(LINPHONE_QML_DIR "${CMAKE_SOURCE_DIR}/Linphone/view")
set(QT_PATH "${Qt6Core_DIR}/../../..")
if(${ENABLE_APP_PACKAGING})
set(CPACK_BINARY_STGZ OFF)
set(CPACK_BINARY_TGZ OFF)
set(CPACK_BINARY_TZ OFF)
set(CPACK_PACKAGE_NAME "${APPLICATION_NAME}")
set(CPACK_PACKAGE_VENDOR "${APPLICATION_VENDOR}")
set(CPACK_PACKAGE_VERSION_MAJOR ${LINPHONE_MAJOR_VERSION})
set(CPACK_PACKAGE_VERSION_MINOR ${LINPHONE_MINOR_VERSION})
if (LINPHONE_MICRO_VERSION)
set(CPACK_PACKAGE_VERSION_PATCH ${LINPHONE_MICRO_VERSION})
endif ()
set(CPACK_PACKAGE_EXECUTABLES "${EXECUTABLE_NAME};${APPLICATION_NAME}")
if(ENABLE_APP_LICENSE)
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.txt")
else()
unset(CPACK_RESOURCE_FILE_LICENSE)
endif()
set(CPACK_RESOURCE_FILE_LICENSE_PROVIDED ${ENABLE_APP_LICENSE})
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/../../assets/icon.ico")
set(PERFORM_SIGNING 0)
##############################################
# LINUX
##############################################
set(DO_APPIMAGE YES)
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${PACKAGE_VERSION}")
set(PACKAGE_EXT "AppImage")
configure_file("${CMAKE_SOURCE_DIR}/cmake/install/linux/linphone.desktop.cmake" "${CMAKE_BINARY_DIR}/cmake/install/linux/${EXECUTABLE_NAME}.desktop" @ONLY)
install(FILES "${CMAKE_BINARY_DIR}/cmake/install/linux/${EXECUTABLE_NAME}.desktop" DESTINATION "${CMAKE_INSTALL_DATADIR}/applications" PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
install(FILES "${CMAKE_SOURCE_DIR}/Linphone/data/image/logo.svg" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps/" RENAME "${EXECUTABLE_NAME}.svg")
set(ICON_DIRS 16x16 22x22 24x24 32x32 64x64 128x128 256x256)
foreach (DIR ${ICON_DIRS})
install(FILES "${CMAKE_SOURCE_DIR}/Linphone/data/icon/hicolor/${DIR}/apps/icon.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/${DIR}/apps/" RENAME "${EXECUTABLE_NAME}.png")
endforeach ()
message(STATUS "Set AppImage CPack generator in OUTPUT/Packages")
##############################################
configure_file("${CMAKE_SOURCE_DIR}/cmake/install/packaging.cmake.in" "${CMAKE_BINARY_DIR}/cmake/install/packaging.cmake" @ONLY)
install(SCRIPT "${CMAKE_BINARY_DIR}/cmake/install/packaging.cmake")
include(CPack)
endif()

View file

@ -0,0 +1,11 @@
[Desktop Entry]
Name=@APPLICATION_NAME@
GenericName=SIP Phone
Comment=@APPLICATION_DESCRIPTION@
Type=Application
Exec=@EXECUTABLE_NAME@ %u
Icon=@EXECUTABLE_NAME@
Terminal=false
Categories=Network;Telephony;
MimeType=x-scheme-handler/sip-@EXECUTABLE_NAME@;x-scheme-handler/sip;x-scheme-handler/sips-@EXECUTABLE_NAME@;x-scheme-handler/sips;x-scheme-handler/tel;x-scheme-handler/callto;x-scheme-handler/@EXECUTABLE_NAME@-config;
X-PulseAudio-Properties=media.role=phone

View file

@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//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>CFBundleAllowMixedLocalizations</key>
<true/>
<key>CFBundleName</key>
<string>@APPLICATION_NAME@</string>
<key>CFBundleDisplayName</key>
<string>@APPLICATION_NAME@</string>
<key>CFBundleExecutable</key>
<string>@EXECUTABLE_NAME@</string>
<key>CFBundleGetInfoString</key>
<string>@PACKAGE_VERSION@, (C) @COPYRIGHT_RANGE_DATE@ @APPLICATION_NAME@ @APPLICATION_URL@</string>
<key>CFBundleIconFile</key>
<string>@EXECUTABLE_NAME@.icns</string>
<key>CFBundleIdentifier</key>
<string>@APPLICATION_ID@</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>@PACKAGE_VERSION@</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>@PACKAGE_VERSION@</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright @COPYRIGHT_RANGE_DATE@ @APPLICATION_VENDOR@</string>
<key>LSMinimumSystemVersion</key>
<string>@CMAKE_OSX_DEPLOYMENT_TARGET@</string>
<key>NSAppSleepDisabled</key>
<string>YES</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>@APPLICATION_ID@</string>
<key>CFBundleURLSchemes</key>
<array>
<string>sip</string>
<string>sip-@EXECUTABLE_NAME@</string>
<string>sips</string>
<string>sips-@EXECUTABLE_NAME@</string>
<string>tel</string>
<string>callto</string>
<string>@EXECUTABLE_NAME@-config</string>
</array>
</dict>
</array>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSHighResolutionCapable</key>
<string>True</string>
<key>NSCameraUsageDescription</key>
<string>Streaming Video between devices</string>
<key>NSMicrophoneUsageDescription</key>
<string>Streaming Audio between devices</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Store attachment and allow camera record when selected</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Store attachment and allow camera record when selected</string>
<key>NSDesktopFolderUsageDescription</key>
<string>Storing configuration files</string>
<key>NSDocumentsFolderUsageDescription</key>
<string>Can use Documents folder to put logs</string>
<key>NSDownloadsFolderUsageDescription</key>
<string>Getting files from Download folder for sending attachment</string>
<key>NSAppleEventsUsageDescription</key>
<string>Used for sending notifications and working with Appnap</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>Use for wireless headsets</string>
<key>kTCCServiceMediaLibrary</key>
<string>Used media library as attachement or for the ringer</string>
<key>com.apple.security.device.camera</key>
<true/>
<key>com.apple.security.device.microphone</key>
<true/>
<key>com.apple.security.device.audio-input</key>
<true/>
<key>com.apple.security.personal-information.photos-library</key>
<true/>
</dict>
</plist>

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.assets.music.read-write</key>
<true/>
<key>com.apple.security.device.microphone</key>
<true/>
<key>com.apple.security.device.camera</key>
<true/>
<key>com.apple.security.device.audio-input</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.personal-information.photos-library</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
</dict>
</plist>

Binary file not shown.

View file

@ -0,0 +1,42 @@
on run argv
set image_name to item 1 of argv
tell application "Finder"
tell disk image_name
-- open the image the first time and save a DS_Store with just
-- background and icon setup
open
set current view of container window to icon view
set theViewOptions to the icon view options of container window
set background picture of theViewOptions to file ".background:background.jpg"
set arrangement of theViewOptions to not arranged
set icon size of theViewOptions to 100
delay 1
close
-- next setup the position of the app and Applications symlink
-- plus hide all the window decoration
open
update without registering applications
tell container window
set sidebar width to 0
set statusbar visible to false
set toolbar visible to false
set the bounds to { 300, 100, 1000, 520 }
set position of item "@APPLICATION_NAME@.app" to { 200, 280 }
set position of item "Applications" to { 500, 280 }
end tell
update without registering applications
delay 1
close
-- one last open and close so you can see everything looks correct
open
delay 5
close
end tell
delay 1
end tell
end run

View file

@ -0,0 +1,91 @@
############################################################################
# packaging.cmake
# Copyright (C) 2017-2024 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.
#
############################################################################
set(DO_TGZ @CPACK_BINARY_TGZ@)
set(DO_TZ @CPACK_BINARY_TZ@)
set(DO_STGZ @CPACK_BINARY_STGZ@)
set(DO_DRAGNDROP @CPACK_BINARY_DRAGNDROP@)
set(DO_GENERATOR @DO_GENERATOR@)
set(DO_APPIMAGE @DO_APPIMAGE@)
if (NOT "${CMAKE_INSTALL_PREFIX}" MATCHES .*/_CPack_Packages/.*)
if(DO_TGZ)
execute_process( COMMAND ${CMAKE_CPACK_COMMAND} -G TGZ RESULT_VARIABLE CPACK_COMMAND_RESULT)
if(CPACK_COMMAND_RESULT)
message(FATAL_ERROR "Failed to create TGZ package!")
endif()
endif()
if(DO_TZ)
execute_process( COMMAND ${CMAKE_CPACK_COMMAND} -G TZ RESULT_VARIABLE CPACK_COMMAND_RESULT)
if(CPACK_COMMAND_RESULT)
message(FATAL_ERROR "Failed to create TZ package!")
endif()
endif()
if(DO_STGZ)
execute_process( COMMAND ${CMAKE_CPACK_COMMAND} -G STGZ RESULT_VARIABLE CPACK_COMMAND_RESULT)
if(CPACK_COMMAND_RESULT)
message(FATAL_ERROR "Failed to create STGZ package!")
endif()
endif()
if(DO_DRAGNDROP)
execute_process( COMMAND ${CMAKE_CPACK_COMMAND} -G DragNDrop RESULT_VARIABLE CPACK_COMMAND_RESULT)
if(CPACK_COMMAND_RESULT)
message(FATAL_ERROR "Failed to create DragAndDrop package!")
endif()
endif()
if(DO_GENERATOR)
execute_process( COMMAND ${CMAKE_CPACK_COMMAND} -G @CPACK_GENERATOR@ -C @CMAKE_BUILD_TYPE@ RESULT_VARIABLE CPACK_COMMAND_RESULT)
if(CPACK_COMMAND_RESULT)
message(FATAL_ERROR "Failed to create @CPACK_GENERATOR@ package!")
endif()
endif()
if(DO_APPIMAGE)
set(ENV{QML_SOURCES_PATHS} "@LINPHONE_QML_DIR@")
set(ENV{QML_MODULES_PATHS} "@LINPHONE_QML_DIR@")
execute_process( COMMAND mkdir -p "WORK/Packages/AppImageDir/" WORKING_DIRECTORY "@CMAKE_INSTALL_PREFIX@/..")
execute_process( COMMAND cp -rf "@LINPHONE_QML_DIR@" "WORK/Packages/AppImageDir/" WORKING_DIRECTORY "@CMAKE_INSTALL_PREFIX@/..")
execute_process( COMMAND "@CMAKE_SOURCE_DIR@/cmake/install/create_appimage.sh" @EXECUTABLE_NAME@ @CPACK_PACKAGE_FILE_NAME@ @QT_PATH@ @LINPHONE_BUILDER_SIGNING_IDENTITY@ RESULT_VARIABLE CPACK_COMMAND_RESULT WORKING_DIRECTORY "@CMAKE_INSTALL_PREFIX@/.." )
if(CPACK_COMMAND_RESULT)
message(FATAL_ERROR "Failed to create AppImage package with this command : '@CMAKE_CURRENT_SOURCE_DIR@/../../tools/create_appimage.sh @EXECUTABLE_NAME@ @QT_PATH@ @LINPHONEAPP_VERSION@' at @CMAKE_INSTALL_PREFIX@/..\nMaybe the .appimage already exists and is running. Please remove the file before packaging if it is the case.")
endif()
endif()
if (@PERFORM_SIGNING@)
if(@PASSPHRASE_FILE@)
execute_process(
COMMAND "@CMAKE_CURRENT_SOURCE_DIR@/../../tools/sign_package.bat" 1 "@PASSPHRASE_FILE@" "@SIGNTOOL_COMMAND@" "@PFX_FILE@" "@TIMESTAMP_URL@" @CPACK_PACKAGE_FILE_NAME@.@PACKAGE_EXT@
RESULT_VARIABLE SIGNING_RESULT WORKING_DIRECTORY "@CPACK_PACKAGE_DIRECTORY@"
)
else()
execute_process(
COMMAND "@CMAKE_CURRENT_SOURCE_DIR@/../../tools/sign_package.bat" 2 "@SIGNTOOL_COMMAND@" "@TIMESTAMP_URL@" @SIGN_HASH@ @CPACK_PACKAGE_FILE_NAME@.@PACKAGE_EXT@
RESULT_VARIABLE SIGNING_RESULT WORKING_DIRECTORY "@CPACK_PACKAGE_DIRECTORY@"
)
endif()
if(SIGNING_RESULT)
message(FATAL_ERROR "Failed to sign the package! ${SIGNING_RESULT} ${RESULT_VARIABLE}")
endif()
endif ()
execute_process( COMMAND mkdir -p "@CMAKE_INSTALL_PREFIX@/Packages/" WORKING_DIRECTORY "@CMAKE_BINARY_DIR@")
execute_process( COMMAND bash -c "cp -rf @CMAKE_BINARY_DIR@/*.@PACKAGE_EXT@ @CMAKE_INSTALL_PREFIX@/Packages" WORKING_DIRECTORY "@CMAKE_BINARY_DIR@")
endif ()

View file

@ -0,0 +1,10 @@
@echo off
if [%1]==[2] goto simple
set /p passphrase=<%2
%3 sign /f %4 /fd SHA256 /p %passphrase% /t %5 %6
goto :eof
:simple
%2 sign /fd SHA256 /t %3 /sha1 %4 %5
:eof

View file

@ -0,0 +1,8 @@
#!/bin/bash
# Arguments :
# $1 = Executable Name
# $2 = Identity
# $3 = Path to recursivly search
find $3 -name "*" -exec $1 --force --deep --timestamp --options runtime,library -s "$2" {} \;