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
43e80d23
Commit
43e80d23
authored
Apr 17, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemenubuilder: Avoid using wine_get_config_dir().
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0a12f258
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
winemenubuilder.c
programs/winemenubuilder/winemenubuilder.c
+16
-4
No files found.
programs/winemenubuilder/winemenubuilder.c
View file @
43e80d23
...
...
@@ -93,7 +93,6 @@
#include "wine/unicode.h"
#include "wine/debug.h"
#include "wine/library.h"
#include "wine/list.h"
#include "wine/rbtree.h"
...
...
@@ -1452,6 +1451,8 @@ static BOOL write_desktop_entry(const char *unix_link, const char *location, con
const
char
*
workdir
,
const
char
*
icon
,
const
char
*
wmclass
)
{
FILE
*
file
;
const
char
*
prefix
=
getenv
(
"WINEPREFIX"
);
const
char
*
home
=
getenv
(
"HOME"
);
WINE_TRACE
(
"(%s,%s,%s,%s,%s,%s,%s,%s,%s)
\n
"
,
wine_dbgstr_a
(
unix_link
),
wine_dbgstr_a
(
location
),
wine_dbgstr_a
(
linkname
),
wine_dbgstr_a
(
path
),
wine_dbgstr_a
(
args
),
...
...
@@ -1464,8 +1465,12 @@ static BOOL write_desktop_entry(const char *unix_link, const char *location, con
fprintf
(
file
,
"[Desktop Entry]
\n
"
);
fprintf
(
file
,
"Name=%s
\n
"
,
linkname
);
fprintf
(
file
,
"Exec=env WINEPREFIX=
\"
%s
\"
wine %s %s
\n
"
,
wine_get_config_dir
(),
path
,
args
);
if
(
prefix
)
fprintf
(
file
,
"Exec=env WINEPREFIX=
\"
%s
\"
wine %s %s
\n
"
,
prefix
,
path
,
args
);
else
if
(
home
)
fprintf
(
file
,
"Exec=env WINEPREFIX=
\"
%s/.wine
\"
wine %s %s
\n
"
,
home
,
path
,
args
);
else
fprintf
(
file
,
"Exec=wine %s %s
\n
"
,
path
,
args
);
fprintf
(
file
,
"Type=Application
\n
"
);
fprintf
(
file
,
"StartupNotify=true
\n
"
);
if
(
descr
&&
*
descr
)
...
...
@@ -2493,6 +2498,8 @@ static BOOL write_freedesktop_association_entry(const char *desktopPath, const c
{
BOOL
ret
=
FALSE
;
FILE
*
desktop
;
const
char
*
prefix
=
getenv
(
"WINEPREFIX"
);
const
char
*
home
=
getenv
(
"HOME"
);
WINE_TRACE
(
"writing association for file type %s, friendlyAppName=%s, MIME type %s, progID=%s, icon=%s to file %s
\n
"
,
wine_dbgstr_a
(
dot_extension
),
wine_dbgstr_a
(
friendlyAppName
),
wine_dbgstr_a
(
mimeType
),
...
...
@@ -2505,7 +2512,12 @@ static BOOL write_freedesktop_association_entry(const char *desktopPath, const c
fprintf
(
desktop
,
"Type=Application
\n
"
);
fprintf
(
desktop
,
"Name=%s
\n
"
,
friendlyAppName
);
fprintf
(
desktop
,
"MimeType=%s;
\n
"
,
mimeType
);
fprintf
(
desktop
,
"Exec=env WINEPREFIX=
\"
%s
\"
wine start /ProgIDOpen %s %%f
\n
"
,
wine_get_config_dir
(),
progId
);
if
(
prefix
)
fprintf
(
desktop
,
"Exec=env WINEPREFIX=
\"
%s
\"
wine start /ProgIDOpen %s %%f
\n
"
,
prefix
,
progId
);
else
if
(
home
)
fprintf
(
desktop
,
"Exec=env WINEPREFIX=
\"
%s/.wine
\"
wine start /ProgIDOpen %s %%f
\n
"
,
home
,
progId
);
else
fprintf
(
desktop
,
"Exec=wine start /ProgIDOpen %s %%f
\n
"
,
progId
);
fprintf
(
desktop
,
"NoDisplay=true
\n
"
);
fprintf
(
desktop
,
"StartupNotify=true
\n
"
);
if
(
openWithIcon
)
...
...
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