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
dfdb349c
Commit
dfdb349c
authored
May 24, 2010
by
Damjan Jovanovic
Committed by
Alexandre Julliard
May 25, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemenubuilder: Use the full path to start.exe.
parent
78d1686b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
2 deletions
+21
-2
winemenubuilder.c
programs/winemenubuilder/winemenubuilder.c
+21
-2
No files found.
programs/winemenubuilder/winemenubuilder.c
View file @
dfdb349c
...
...
@@ -2366,6 +2366,16 @@ static BOOL generate_associations(const char *xdg_data_home, const char *package
return
hasChanged
;
}
static
char
*
get_start_exe_path
(
void
)
{
static
const
WCHAR
startW
[]
=
{
'\\'
,
'c'
,
'o'
,
'm'
,
'm'
,
'a'
,
'n'
,
'd'
,
'\\'
,
's'
,
't'
,
'a'
,
'r'
,
't'
,
'.'
,
'e'
,
'x'
,
'e'
,
0
};
WCHAR
start_path
[
MAX_PATH
];
GetWindowsDirectoryW
(
start_path
,
MAX_PATH
);
lstrcatW
(
start_path
,
startW
);
return
escape
(
start_path
);
}
static
BOOL
InvokeShellLinker
(
IShellLinkW
*
sl
,
LPCWSTR
link
,
BOOL
bWait
)
{
static
const
WCHAR
startW
[]
=
{
'\\'
,
'c'
,
'o'
,
'm'
,
'm'
,
'a'
,
'n'
,
'd'
,
...
...
@@ -2379,6 +2389,7 @@ static BOOL InvokeShellLinker( IShellLinkW *sl, LPCWSTR link, BOOL bWait )
DWORD
csidl
=
-
1
;
HANDLE
hsem
=
NULL
;
char
*
unix_link
=
NULL
;
char
*
start_path
=
NULL
;
if
(
!
link
)
{
...
...
@@ -2503,6 +2514,13 @@ static BOOL InvokeShellLinker( IShellLinkW *sl, LPCWSTR link, BOOL bWait )
goto
cleanup
;
}
start_path
=
get_start_exe_path
();
if
(
start_path
==
NULL
)
{
WINE_ERR
(
"out of memory
\n
"
);
goto
cleanup
;
}
/* building multiple menus concurrently has race conditions */
hsem
=
CreateSemaphoreA
(
NULL
,
1
,
1
,
"winemenubuilder_semaphore"
);
if
(
WAIT_OBJECT_0
!=
MsgWaitForMultipleObjects
(
1
,
&
hsem
,
FALSE
,
INFINITE
,
QS_ALLINPUT
)
)
...
...
@@ -2540,7 +2558,7 @@ static BOOL InvokeShellLinker( IShellLinkW *sl, LPCWSTR link, BOOL bWait )
char
*
menuarg
=
heap_printf
(
"/Unix %s"
,
escaped_lnk
);
if
(
menuarg
)
{
r
=
!
write_menu_entry
(
unix_link
,
link_name
,
"start"
,
menuarg
,
description
,
work_dir
,
icon_name
);
r
=
!
write_menu_entry
(
unix_link
,
link_name
,
start_path
,
menuarg
,
description
,
work_dir
,
icon_name
);
HeapFree
(
GetProcessHeap
(),
0
,
menuarg
);
}
HeapFree
(
GetProcessHeap
(),
0
,
escaped_lnk
);
...
...
@@ -2559,7 +2577,8 @@ cleanup:
HeapFree
(
GetProcessHeap
(),
0
,
escaped_args
);
HeapFree
(
GetProcessHeap
(),
0
,
escaped_path
);
HeapFree
(
GetProcessHeap
(),
0
,
description
);
HeapFree
(
GetProcessHeap
(),
0
,
unix_link
);
HeapFree
(
GetProcessHeap
(),
0
,
unix_link
);
HeapFree
(
GetProcessHeap
(),
0
,
start_path
);
if
(
r
&&
!
bWait
)
WINE_ERR
(
"failed to build the menu
\n
"
);
...
...
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