Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
J
jami-client-windows
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
savoirfairelinux
jami-client-windows
Commits
b37aa1fc
Commit
b37aa1fc
authored
Jul 09, 2015
by
Edric Milaret
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
linux: allow linux compilation
Change-Id: I5c63bd19b403973d26343cbc7b47fac38347c1c8
parent
77dd698d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
6 deletions
+39
-6
accountdetails.cpp
accountdetails.cpp
+2
-0
main.cpp
main.cpp
+4
-0
utils.cpp
utils.cpp
+26
-1
utils.h
utils.h
+7
-5
No files found.
accountdetails.cpp
View file @
b37aa1fc
...
...
@@ -201,9 +201,11 @@ AccountDetails::setAccount(Account* currentAccount) {
if
(
currentAccount_
->
tlsPrivateKeyCertificate
())
ui
->
lrcfg_tlsPrivateKeyCertificate
->
setText
(
currentAccount_
->
tlsPrivateKeyCertificate
()
->
path
().
fileName
());
#ifdef Q_OS_WIN32
certMap_
[
ui
->
lrcfg_tlsCaListCertificate
->
objectName
()]
=
&
currentAccount_
->
setTlsCaListCertificate
;
certMap_
[
ui
->
lrcfg_tlsCertificate
->
objectName
()]
=
&
currentAccount_
->
setTlsCertificate
;
certMap_
[
ui
->
lrcfg_tlsPrivateKeyCertificate
->
objectName
()]
=
&
currentAccount_
->
setTlsPrivateKeyCertificate
;
#endif
ui
->
srtpEnabled
->
disconnect
();
connect
(
ui
->
srtpEnabled
,
&
QCheckBox
::
toggled
,
[
=
](
bool
checked
)
{
...
...
main.cpp
View file @
b37aa1fc
...
...
@@ -29,13 +29,16 @@
#include <QThread>
#ifdef Q_OS_WIN32
#include <windows.h>
#endif
REGISTER_MEDIA
();
void
Console
()
{
#ifdef Q_OS_WIN32
AllocConsole
();
freopen
(
"CONOUT$"
,
"w"
,
stdout
);
freopen
(
"CONOUT$"
,
"w"
,
stderr
);
...
...
@@ -46,6 +49,7 @@ Console()
SetConsoleScreenBufferSize
(
GetStdHandle
(
STD_OUTPUT_HANDLE
),
coordInfo
);
SetConsoleMode
(
GetStdHandle
(
STD_OUTPUT_HANDLE
),
ENABLE_QUICK_EDIT_MODE
|
ENABLE_EXTENDED_FLAGS
);
#endif
}
int
...
...
utils.cpp
View file @
b37aa1fc
...
...
@@ -18,9 +18,17 @@
#include "utils.h"
#ifdef Q_OS_WIN32
#include <lmcons.h>
#include <shobjidl.h>
#include <shlguid.h>
#include <shlobj.h>
#include <shlwapi.h>
#endif
bool
Utils
::
CreateStartupLink
()
{
#ifdef Q_OS_WIN32
TCHAR
szPath
[
MAX_PATH
];
GetModuleFileName
(
NULL
,
szPath
,
MAX_PATH
);
...
...
@@ -33,10 +41,14 @@ Utils::CreateStartupLink() {
linkPath
+=
TEXT
(
"
\\
Ring.lnk"
);
return
Utils
::
CreateLink
(
programPath
.
c_str
(),
linkPath
.
c_str
());
#else
return
true
;
#endif
}
bool
Utils
::
CreateLink
(
LPCWSTR
lpszPathObj
,
LPCWSTR
lpszPathLink
)
{
#ifdef Q_OS_WIN32
HRESULT
hres
;
IShellLink
*
psl
;
...
...
@@ -57,10 +69,14 @@ Utils::CreateLink(LPCWSTR lpszPathObj, LPCWSTR lpszPathLink) {
psl
->
Release
();
}
return
hres
;
#else
return
true
;
#endif
}
void
Utils
::
DeleteStartupLink
()
{
#ifdef Q_OS_WIN32
TCHAR
startupPath
[
MAX_PATH
];
SHGetFolderPathW
(
NULL
,
CSIDL_STARTUP
,
NULL
,
0
,
startupPath
);
...
...
@@ -68,20 +84,26 @@ Utils::DeleteStartupLink() {
linkPath
+=
TEXT
(
"
\\
Ring.lnk"
);
DeleteFile
(
linkPath
.
c_str
());
#endif
}
bool
Utils
::
CheckStartupLink
()
{
#ifdef Q_OS_WIN32
TCHAR
startupPath
[
MAX_PATH
];
SHGetFolderPathW
(
NULL
,
CSIDL_STARTUP
,
NULL
,
0
,
startupPath
);
std
::
wstring
linkPath
(
startupPath
);
linkPath
+=
TEXT
(
"
\\
Ring.lnk"
);
return
PathFileExists
(
linkPath
.
c_str
());
#else
return
true
;
#endif
}
QString
Utils
::
GetRingtonePath
()
{
#ifdef Q_OS_WIN32
TCHAR
workingDirectory
[
MAX_PATH
];
GetCurrentDirectory
(
MAX_PATH
,
workingDirectory
);
...
...
@@ -89,5 +111,8 @@ Utils::GetRingtonePath() {
ringtonePath
+=
"
\\
ringtones
\\
konga.ul"
;
return
ringtonePath
;
#else
return
QString
(
"/usr/local"
);
#endif
}
utils.h
View file @
b37aa1fc
...
...
@@ -19,12 +19,14 @@
#ifndef UTILS_H
#define UTILS_H
//Needed for OS detection
#include <QtGlobal>
#ifdef Q_OS_WIN32
#include <windows.h>
#include <lmcons.h>
#include <shobjidl.h>
#include <shlguid.h>
#include <shlobj.h>
#include <shlwapi.h>
#else //LINUX
#define LPCWSTR char*
#endif
#include <string>
#include <QString>
...
...
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