Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
66775b90
Commit
66775b90
authored
Nov 08, 2005
by
Mike McCormack
Committed by
Alexandre Julliard
Nov 08, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract the executable name for msi advertised shortcuts.
parent
c189912c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
2 deletions
+29
-2
winemenubuilder.c
programs/winemenubuilder/winemenubuilder.c
+29
-2
No files found.
programs/winemenubuilder/winemenubuilder.c
View file @
66775b90
...
...
@@ -52,6 +52,7 @@
#include <shlobj.h>
#include <objidl.h>
#include <shlguid.h>
#include <appmgmt.h>
#include "wine/unicode.h"
#include "wine/debug.h"
...
...
@@ -726,6 +727,33 @@ static BOOL GetLinkLocation( LPCWSTR linkfile, DWORD *loc )
return
FALSE
;
}
/* gets the target path directly or through MSI */
static
HRESULT
get_path
(
IShellLinkW
*
sl
,
LPWSTR
szPath
,
DWORD
sz
)
{
IShellLinkDataList
*
dl
=
NULL
;
EXP_DARWIN_LINK
*
dar
=
NULL
;
HRESULT
hr
;
szPath
[
0
]
=
0
;
hr
=
IShellLinkW_GetPath
(
sl
,
szPath
,
MAX_PATH
,
NULL
,
SLGP_RAWPATH
);
if
(
hr
==
S_OK
&&
szPath
[
0
])
return
hr
;
hr
=
IShellLinkW_QueryInterface
(
sl
,
&
IID_IShellLinkDataList
,
(
LPVOID
*
)
&
dl
);
if
(
FAILED
(
hr
))
return
hr
;
hr
=
IShellLinkDataList_CopyDataBlock
(
dl
,
EXP_DARWIN_ID_SIG
,
(
LPVOID
*
)
&
dar
);
if
(
SUCCEEDED
(
hr
))
{
CommandLineFromMsiDescriptor
(
dar
->
szwDarwinID
,
szPath
,
&
sz
);
LocalFree
(
dar
);
}
IShellLinkDataList_Release
(
dl
);
return
hr
;
}
static
BOOL
InvokeShellLinker
(
IShellLinkW
*
sl
,
LPCWSTR
link
,
BOOL
bAgain
)
{
char
*
link_name
=
NULL
,
*
icon_name
=
NULL
,
*
work_dir
=
NULL
;
...
...
@@ -760,8 +788,7 @@ static BOOL InvokeShellLinker( IShellLinkW *sl, LPCWSTR link, BOOL bAgain )
IShellLinkW_GetDescription
(
sl
,
szDescription
,
INFOTIPSIZE
);
WINE_TRACE
(
"description: %s
\n
"
,
wine_dbgstr_w
(
szDescription
));
szPath
[
0
]
=
0
;
IShellLinkW_GetPath
(
sl
,
szPath
,
MAX_PATH
,
NULL
,
SLGP_RAWPATH
);
get_path
(
sl
,
szPath
,
MAX_PATH
);
WINE_TRACE
(
"path : %s
\n
"
,
wine_dbgstr_w
(
szPath
));
szArgs
[
0
]
=
0
;
...
...
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