Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
e755c3e4
Commit
e755c3e4
authored
Mar 29, 2017
by
Ghislain MARY
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add linphonerc-factory file.
parent
0680d6d9
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
113 additions
and
37 deletions
+113
-37
CMakeLists.txt
cmake_builder/linphone_package/CMakeLists.txt
+3
-7
CMakeLists.txt
linphone-desktop/CMakeLists.txt
+11
-0
linphonerc-factory
linphone-desktop/assets/linphonerc-factory
+2
-0
config.h.cmake
linphone-desktop/config.h.cmake
+23
-0
Paths.cpp
linphone-desktop/src/app/paths/Paths.cpp
+66
-15
Paths.hpp
linphone-desktop/src/app/paths/Paths.hpp
+4
-0
CoreManager.cpp
linphone-desktop/src/components/core/CoreManager.cpp
+4
-15
No files found.
cmake_builder/linphone_package/CMakeLists.txt
View file @
e755c3e4
...
...
@@ -185,7 +185,7 @@ if(WIN32)
PATTERN
"bin/*_tester.exe"
EXCLUDE
PATTERN
"bin/openh264.dll"
EXCLUDE
PATTERN
"include"
EXCLUDE
PATTERN
"lib/mediastreamer"
EXCLUDE
PATTERN
"lib/mediastreamer
/plugins/*openh264.*
"
EXCLUDE
PATTERN
"lib/pkgconfig"
EXCLUDE
PATTERN
"lib/*.a"
EXCLUDE
PATTERN
"lib/*.def"
EXCLUDE
...
...
@@ -206,10 +206,9 @@ if(WIN32)
COMPONENT
"msopenh264"
FILES_MATCHING PATTERN
"b*zip2.*"
)
install
(
DIRECTORY
"
${
LINPHONE_OUTPUT_DIR
}
/lib/mediastreamer/plugins/
"
install
(
FILES
"
${
LINPHONE_OUTPUT_DIR
}
/lib/mediastreamer/plugins/libmsopenh264.dll
"
DESTINATION
"lib/mediastreamer/plugins"
COMPONENT
"msopenh264"
FILES_MATCHING PATTERN
"libmsopenh264.*"
)
endif
()
...
...
@@ -233,16 +232,13 @@ elseif(APPLE)
install
(
DIRECTORY
"
${
LINPHONE_OUTPUT_DIR
}
/share/images"
DESTINATION
"Linphone.app/Contents/Resources/share"
USE_SOURCE_PERMISSIONS
)
install
(
DIRECTORY
"
${
LINPHONE_OUTPUT_DIR
}
/share/sounds"
DESTINATION
"Linphone.app/Contents/Resources/share"
USE_SOURCE_PERMISSIONS
)
install
(
FILES
"
${
LINPHONE_OUTPUT_DIR
}
/share/Linphone/rootca.pem"
DESTINATION
"Linphone.app/Contents/Resources/share/linphone"
)
install
(
FILES
"
${
LINPHONE_OUTPUT_DIR
}
/share/Linphone/linphonerc-factory"
DESTINATION
"Linphone.app/Contents/Resources/share/linphone"
)
configure_file
(
"MacPackaging.cmake.in"
"MacPackaging.cmake"
@ONLY
)
install
(
SCRIPT
"
${
CMAKE_CURRENT_BINARY_DIR
}
/MacPackaging.cmake"
)
endif
()
if
(
MSVC
)
install
(
DIRECTORY
"
${
LINPHONE_OUTPUT_DIR
}
/lib/mediastreamer/plugins/"
DESTINATION
"lib/mediastreamer/plugins"
FILES_MATCHING PATTERN
"libmswasapi.dll"
)
string
(
REGEX REPLACE
"Visual Studio ([0-9]+).*"
"
\\
1"
MSVC_VERSION
"
${
CMAKE_GENERATOR
}
"
)
find_file
(
MSVCP_LIB
"msvcp
${
MSVC_VERSION
}
0.dll"
PATHS
"C:/Windows/System32"
)
find_file
(
UCRTBASE_LIB
"ucrtbase.dll"
PATHS
"C:/Windows/System32"
)
...
...
linphone-desktop/CMakeLists.txt
View file @
e755c3e4
...
...
@@ -204,6 +204,13 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E copy
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/../.git/hooks/pre-commit"
)
# ------------------------------------------------------------------------------
# Create config.h file
# ------------------------------------------------------------------------------
set
(
MSPLUGINS_DIR
"
${
CMAKE_INSTALL_LIBDIR
}
/mediastreamer/plugins"
)
configure_file
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/config.h.cmake"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/config.h"
)
# ------------------------------------------------------------------------------
# Build.
# ------------------------------------------------------------------------------
...
...
@@ -254,3 +261,7 @@ install(TARGETS ${TARGET_NAME}
ARCHIVE DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
install
(
FILES
"assets/linphonerc-factory"
DESTINATION
"
${
CMAKE_INSTALL_DATADIR
}
/linphone"
)
linphone-desktop/assets/linphonerc-factory
0 → 100644
View file @
e755c3e4
[sound]
ec_filter=MSWebRTCAEC
linphone-desktop/config.h.cmake
0 → 100644
View file @
e755c3e4
/***************************************************************************
* config.h.cmake
*
Copyright
(
C
)
2017 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.
*
****************************************************************************/
#cmakedefine MSPLUGINS_DIR "${MSPLUGINS_DIR}"
linphone-desktop/src/app/paths/Paths.cpp
View file @
e755c3e4
...
...
@@ -20,6 +20,7 @@
* Author: Ronan Abhamon
*/
#include <QCoreApplication>
#include <QDir>
#include <QFile>
#include <QStandardPaths>
...
...
@@ -28,6 +29,7 @@
#include "../../utils.hpp"
#include "Paths.hpp"
#include "config.h"
#define PATH_AVATARS "/avatars/"
#define PATH_CAPTURES "/captures/"
...
...
@@ -37,6 +39,7 @@
#define PATH_CALL_HISTORY_LIST "/call-history.db"
#define PATH_CONFIG "/linphonerc"
#define PATH_FACTORY_CONFIG "/linphonerc-factory"
#define PATH_FRIENDS_LIST "/friends.db"
#define PATH_MESSAGE_HISTORY_LIST "/message-history.db"
#define PATH_ZRTP_SECRETS "/zidcache"
...
...
@@ -78,16 +81,48 @@ inline void ensureFilePathExists (const QString &path) {
qFatal
(
"Unable to access at path: `%s`"
,
path
.
toStdString
().
c_str
());
}
inline
string
getDirectoryPath
(
const
QString
&
dirname
)
{
ensureDirectoryPathExists
(
dirname
);
inline
string
getReadableDirectoryPath
(
const
QString
&
dirname
)
{
return
Utils
::
qStringToLinphoneString
(
QDir
::
toNativeSeparators
(
dirname
));
}
inline
string
getFilePath
(
const
QString
&
filename
)
{
ensureFilePathExists
(
filename
);
inline
string
getWritableDirectoryPath
(
const
QString
&
dirname
)
{
ensureDirectoryPathExists
(
dirname
);
return
getReadableDirectoryPath
(
dirname
);
}
inline
string
getReadableFilePath
(
const
QString
&
filename
)
{
return
Utils
::
qStringToLinphoneString
(
QDir
::
toNativeSeparators
(
filename
));
}
inline
string
getWritableFilePath
(
const
QString
&
filename
)
{
ensureFilePathExists
(
filename
);
return
getReadableFilePath
(
filename
);
}
static
QString
getAppPackageDataDirpath
()
{
QDir
dir
(
QCoreApplication
::
applicationDirPath
());
if
(
dir
.
dirName
()
==
"MacOS"
)
{
dir
.
cdUp
();
dir
.
cd
(
"Resources"
);
}
else
{
dir
.
cdUp
();
}
dir
.
cd
(
"share/linphone"
);
return
dir
.
absolutePath
();
}
static
QString
getAppPackageMsPluginsDirpath
()
{
QDir
dir
(
QCoreApplication
::
applicationDirPath
());
if
(
dir
.
dirName
()
==
"MacOS"
)
{
dir
.
cdUp
();
dir
.
cd
(
"Resources"
);
}
else
{
dir
.
cdUp
();
}
dir
.
cd
(
MSPLUGINS_DIR
);
return
dir
.
absolutePath
();
}
static
QString
getAppConfigFilepath
()
{
if
(
QSysInfo
::
productType
()
==
"macos"
)
return
QStandardPaths
::
writableLocation
(
QStandardPaths
::
AppLocalDataLocation
)
+
PATH_CONFIG
;
...
...
@@ -99,6 +134,10 @@ static QString getAppCallHistoryFilepath () {
return
QStandardPaths
::
writableLocation
(
QStandardPaths
::
AppLocalDataLocation
)
+
PATH_CALL_HISTORY_LIST
;
}
static
QString
getAppFactoryConfigFilepath
()
{
return
getAppPackageDataDirpath
()
+
PATH_FACTORY_CONFIG
;
}
static
QString
getAppFriendsFilepath
()
{
return
QStandardPaths
::
writableLocation
(
QStandardPaths
::
AppLocalDataLocation
)
+
PATH_FRIENDS_LIST
;
}
...
...
@@ -110,46 +149,58 @@ static QString getAppMessageHistoryFilepath () {
// -----------------------------------------------------------------------------
string
Paths
::
getAvatarsDirpath
()
{
return
getDirectoryPath
(
QStandardPaths
::
writableLocation
(
QStandardPaths
::
AppLocalDataLocation
)
+
PATH_AVATARS
);
return
get
Writable
DirectoryPath
(
QStandardPaths
::
writableLocation
(
QStandardPaths
::
AppLocalDataLocation
)
+
PATH_AVATARS
);
}
string
Paths
::
getCallHistoryFilepath
()
{
return
getFilePath
(
getAppCallHistoryFilepath
());
return
get
Writable
FilePath
(
getAppCallHistoryFilepath
());
}
string
Paths
::
getConfigFilepath
(
const
QString
&
config_path
)
{
if
(
!
config_path
.
isEmpty
())
return
getFilePath
(
QFileInfo
(
config_path
).
absoluteFilePath
());
return
get
Writable
FilePath
(
QFileInfo
(
config_path
).
absoluteFilePath
());
return
getFilePath
(
getAppConfigFilepath
());
return
getWritableFilePath
(
getAppConfigFilepath
());
}
string
Paths
::
getFactoryConfigFilepath
()
{
return
getReadableFilePath
(
getAppFactoryConfigFilepath
());
}
string
Paths
::
getFriendsListFilepath
()
{
return
getFilePath
(
getAppFriendsFilepath
());
return
get
Writable
FilePath
(
getAppFriendsFilepath
());
}
string
Paths
::
getLogsDirpath
()
{
return
getDirectoryPath
(
QStandardPaths
::
writableLocation
(
QStandardPaths
::
AppLocalDataLocation
)
+
PATH_LOGS
);
return
get
Writable
DirectoryPath
(
QStandardPaths
::
writableLocation
(
QStandardPaths
::
AppLocalDataLocation
)
+
PATH_LOGS
);
}
string
Paths
::
getMessageHistoryFilepath
()
{
return
getFilePath
(
getAppMessageHistoryFilepath
());
return
getWritableFilePath
(
getAppMessageHistoryFilepath
());
}
string
Paths
::
getPackageDataDirpath
()
{
return
getReadableDirectoryPath
(
getAppPackageDataDirpath
());
}
string
Paths
::
getPackageMsPluginsDirpath
()
{
return
getReadableDirectoryPath
(
getAppPackageMsPluginsDirpath
());
}
string
Paths
::
getThumbnailsDirpath
()
{
return
getDirectoryPath
(
QStandardPaths
::
writableLocation
(
QStandardPaths
::
AppLocalDataLocation
)
+
PATH_THUMBNAILS
);
return
get
Writable
DirectoryPath
(
QStandardPaths
::
writableLocation
(
QStandardPaths
::
AppLocalDataLocation
)
+
PATH_THUMBNAILS
);
}
string
Paths
::
getCapturesDirpath
()
{
return
getDirectoryPath
(
QStandardPaths
::
writableLocation
(
QStandardPaths
::
AppLocalDataLocation
)
+
PATH_CAPTURES
);
return
get
Writable
DirectoryPath
(
QStandardPaths
::
writableLocation
(
QStandardPaths
::
AppLocalDataLocation
)
+
PATH_CAPTURES
);
}
string
Paths
::
getZrtpSecretsFilepath
()
{
return
getFilePath
(
QStandardPaths
::
writableLocation
(
QStandardPaths
::
CacheLocation
)
+
PATH_ZRTP_SECRETS
);
return
get
Writable
FilePath
(
QStandardPaths
::
writableLocation
(
QStandardPaths
::
CacheLocation
)
+
PATH_ZRTP_SECRETS
);
}
string
Paths
::
getUserCertificatesDirpath
()
{
return
getDirectoryPath
(
QStandardPaths
::
writableLocation
(
QStandardPaths
::
AppLocalDataLocation
)
+
PATH_USER_CERTIFICATES
);
return
get
Writable
DirectoryPath
(
QStandardPaths
::
writableLocation
(
QStandardPaths
::
AppLocalDataLocation
)
+
PATH_USER_CERTIFICATES
);
}
// -----------------------------------------------------------------------------
...
...
linphone-desktop/src/app/paths/Paths.hpp
View file @
e755c3e4
...
...
@@ -36,8 +36,12 @@ namespace Paths {
std
::
string
getThumbnailsDirpath
();
std
::
string
getUserCertificatesDirpath
();
std
::
string
getPackageDataDirpath
();
std
::
string
getPackageMsPluginsDirpath
();
std
::
string
getCallHistoryFilepath
();
std
::
string
getConfigFilepath
(
const
QString
&
config_path
=
QString
());
std
::
string
getFactoryConfigFilepath
();
std
::
string
getFriendsListFilepath
();
std
::
string
getMessageHistoryFilepath
();
std
::
string
getZrtpSecretsFilepath
();
...
...
linphone-desktop/src/components/core/CoreManager.cpp
View file @
e755c3e4
...
...
@@ -25,7 +25,6 @@
#include "CoreManager.hpp"
#include <QCoreApplication>
#include <QDebug>
#include <QDir>
#include <QtConcurrent>
...
...
@@ -97,19 +96,9 @@ void CoreManager::setOtherPaths () {
}
void
CoreManager
::
setResourcesPaths
()
{
QDir
dir
(
QCoreApplication
::
applicationDirPath
());
if
(
dir
.
dirName
()
==
"MacOS"
)
{
dir
.
cdUp
();
dir
.
cd
(
"Resources"
);
QDir
mspluginsdir
(
dir
);
mspluginsdir
.
cd
(
"lib/mediastreamer/plugins"
);
QDir
datadir
(
dir
);
datadir
.
cd
(
"share"
);
shared_ptr
<
linphone
::
Factory
>
factory
=
linphone
::
Factory
::
get
();
factory
->
setMspluginsDir
(
::
Utils
::
qStringToLinphoneString
(
mspluginsdir
.
absolutePath
()));
factory
->
setTopResourcesDir
(
::
Utils
::
qStringToLinphoneString
(
datadir
.
absolutePath
()));
}
shared_ptr
<
linphone
::
Factory
>
factory
=
linphone
::
Factory
::
get
();
factory
->
setMspluginsDir
(
Paths
::
getPackageMsPluginsDirpath
());
factory
->
setTopResourcesDir
(
Paths
::
getPackageDataDirpath
());
}
// -----------------------------------------------------------------------------
...
...
@@ -122,7 +111,7 @@ void CoreManager::createLinphoneCore (const QString &config_path) {
setResourcesPaths
();
m_core
=
linphone
::
Factory
::
get
()
->
createCore
(
m_handlers
,
Paths
::
getConfigFilepath
(
config_path
),
""
);
m_core
=
linphone
::
Factory
::
get
()
->
createCore
(
m_handlers
,
Paths
::
getConfigFilepath
(
config_path
),
Paths
::
getFactoryConfigFilepath
()
);
m_core
->
setVideoDisplayFilter
(
"MSOGL"
);
m_core
->
usePreviewWindow
(
true
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment