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
465a3149
Commit
465a3149
authored
Jun 02, 2015
by
Edric Milaret
Committed by
gerrit2
Jun 05, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
autostart: fix link generation
Refs #74589 Change-Id: I78347cae63f7d88bad9c4f80e1da7e423aaf1267
parent
00e789a4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
16 deletions
+17
-16
ring.nsi
ring.nsi
+1
-0
utils.cpp
utils.cpp
+16
-16
No files found.
ring.nsi
View file @
465a3149
...
...
@@ -74,6 +74,7 @@ section "install"
# Uninstaller - See function un.onInit and section "uninstall" for configuration
writeUninstaller "$INSTDIR\uninstall.exe"
SetOutPath $INSTDIR
#Desktop
CreateShortCut "$DESKTOP\Ring.lnk" "$INSTDIR\Ring.exe" ""
...
...
utils.cpp
View file @
465a3149
...
...
@@ -20,17 +20,17 @@
bool
Utils
::
CreateStartupLink
()
{
TCHAR
userHome
[
MAX_PATH
];
SHGetFolderPathW
(
NULL
,
CSIDL_PROFILE
,
NULL
,
0
,
userHome
);
TCHAR
workingDirectory
[
MAX_PATH
];
GetCurrentDirectory
(
MAX_PATH
,
workingDirectory
);
TCHAR
szPath
[
MAX_PATH
];
GetModuleFileName
(
NULL
,
szPath
,
MAX_PATH
);
std
::
wstring
programPath
(
szPath
);
std
::
wstring
programPath
(
workingDirectory
)
;
programPath
+=
TEXT
(
"
\\
RingClientWindows.exe"
);
TCHAR
startupPath
[
MAX_PATH
]
;
SHGetFolderPathW
(
NULL
,
CSIDL_STARTUP
,
NULL
,
0
,
startupPath
);
std
::
wstring
linkPath
(
userHome
);
linkPath
+=
TEXT
(
"
\\
AppData
\\
Roaming
\\
Microsoft
\\
Windows
\\
Start Menu
\\
Programs
\\
Startup
\\
Ring.lnk"
);
std
::
wstring
linkPath
(
startupPath
);
linkPath
+=
TEXT
(
"
\\
Ring.lnk"
);
return
Utils
::
CreateLink
(
programPath
.
c_str
(),
linkPath
.
c_str
());
}
...
...
@@ -60,22 +60,22 @@ Utils::CreateLink(LPCWSTR lpszPathObj, LPCWSTR lpszPathLink) {
void
Utils
::
DeleteStartupLink
()
{
TCHAR
userHome
[
MAX_PATH
];
SHGetFolderPathW
(
NULL
,
CSIDL_
PROFILE
,
NULL
,
0
,
userHome
);
TCHAR
startupPath
[
MAX_PATH
];
SHGetFolderPathW
(
NULL
,
CSIDL_
STARTUP
,
NULL
,
0
,
startupPath
);
std
::
wstring
linkPath
(
userHome
);
linkPath
+=
TEXT
(
"
\\
AppData
\\
Roaming
\\
Microsoft
\\
Windows
\\
Start Menu
\\
Programs
\\
Startup
\\
Ring.lnk"
);
std
::
wstring
linkPath
(
startupPath
);
linkPath
+=
TEXT
(
"
\\
Ring.lnk"
);
DeleteFile
(
linkPath
.
c_str
());
}
bool
Utils
::
CheckStartupLink
()
{
TCHAR
userHome
[
MAX_PATH
];
SHGetFolderPathW
(
NULL
,
CSIDL_
PROFILE
,
NULL
,
0
,
userHome
);
TCHAR
startupPath
[
MAX_PATH
];
SHGetFolderPathW
(
NULL
,
CSIDL_
STARTUP
,
NULL
,
0
,
startupPath
);
std
::
wstring
linkPath
(
userHome
);
linkPath
+=
TEXT
(
"
\\
AppData
\\
Roaming
\\
Microsoft
\\
Windows
\\
Start Menu
\\
Programs
\\
Startup
\\
Ring.lnk"
);
std
::
wstring
linkPath
(
startupPath
);
linkPath
+=
TEXT
(
"
\\
Ring.lnk"
);
return
PathFileExists
(
linkPath
.
c_str
());
}
...
...
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