Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jami-client-windows
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
savoirfairelinux
jami-client-windows
Commits
b37aa1fc
Commit
b37aa1fc
authored
Jul 9, 2015
by
Edric Milaret
Browse files
Options
Downloads
Patches
Plain Diff
linux: allow linux compilation
Change-Id: I5c63bd19b403973d26343cbc7b47fac38347c1c8
parent
77dd698d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
accountdetails.cpp
+2
-0
2 additions, 0 deletions
accountdetails.cpp
main.cpp
+4
-0
4 additions, 0 deletions
main.cpp
utils.cpp
+26
-1
26 additions, 1 deletion
utils.cpp
utils.h
+7
-5
7 additions, 5 deletions
utils.h
with
39 additions
and
6 deletions
accountdetails.cpp
+
2
−
0
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
)
{
...
...
This diff is collapsed.
Click to expand it.
main.cpp
+
4
−
0
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
...
...
This diff is collapsed.
Click to expand it.
utils.cpp
+
26
−
1
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
}
This diff is collapsed.
Click to expand it.
utils.h
+
7
−
5
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>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment