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
bc526034
Commit
bc526034
authored
May 04, 2010
by
Damjan Jovanovic
Committed by
Alexandre Julliard
May 05, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemenubuilder: Use a unicode WinMain.
parent
8de7d2ed
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
18 deletions
+21
-18
Makefile.in
programs/winemenubuilder/Makefile.in
+1
-1
winemenubuilder.c
programs/winemenubuilder/winemenubuilder.c
+20
-17
No files found.
programs/winemenubuilder/Makefile.in
View file @
bc526034
...
...
@@ -4,7 +4,7 @@ TOPOBJDIR = ../..
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
MODULE
=
winemenubuilder.exe
APPMODE
=
-mwindows
APPMODE
=
-mwindows
-municode
IMPORTS
=
uuid shell32 shlwapi ole32 user32 advapi32 kernel32
EXTRAINCL
=
@PNGINCL@
...
...
programs/winemenubuilder/winemenubuilder.c
View file @
bc526034
...
...
@@ -2729,9 +2729,9 @@ static void cleanup_menus(void)
WINE_ERR
(
"error opening registry key, menu cleanup failed
\n
"
);
}
static
CHAR
*
next_token
(
LP
STR
*
p
)
static
WCHAR
*
next_token
(
LPW
STR
*
p
)
{
LPSTR
token
=
NULL
,
t
=
*
p
;
LP
W
STR
token
=
NULL
,
t
=
*
p
;
if
(
!
t
)
return
NULL
;
...
...
@@ -2746,7 +2746,7 @@ static CHAR *next_token( LPSTR *p )
case
'"'
:
/* unquote the token */
token
=
++
t
;
t
=
strchr
(
token
,
'"'
);
t
=
strchr
W
(
token
,
'"'
);
if
(
t
)
*
t
++
=
0
;
break
;
...
...
@@ -2755,7 +2755,7 @@ static CHAR *next_token( LPSTR *p )
break
;
default:
token
=
t
;
t
=
strchr
(
token
,
' '
);
t
=
strchr
W
(
token
,
' '
);
if
(
t
)
*
t
++
=
0
;
break
;
...
...
@@ -2808,11 +2808,16 @@ static BOOL init_xdg(void)
/***********************************************************************
*
* WinMain
*
w
WinMain
*/
int
PASCAL
WinMain
(
HINSTANCE
hInstance
,
HINSTANCE
prev
,
LP
STR
cmdline
,
int
show
)
int
PASCAL
wWinMain
(
HINSTANCE
hInstance
,
HINSTANCE
prev
,
LPW
STR
cmdline
,
int
show
)
{
LPSTR
token
=
NULL
,
p
;
static
const
WCHAR
dash_aW
[]
=
{
'-'
,
'a'
,
0
};
static
const
WCHAR
dash_rW
[]
=
{
'-'
,
'r'
,
0
};
static
const
WCHAR
dash_uW
[]
=
{
'-'
,
'u'
,
0
};
static
const
WCHAR
dash_wW
[]
=
{
'-'
,
'w'
,
0
};
LPWSTR
token
=
NULL
,
p
;
BOOL
bWait
=
FALSE
;
BOOL
bURL
=
FALSE
;
int
ret
=
0
;
...
...
@@ -2825,37 +2830,35 @@ int PASCAL WinMain (HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show
token
=
next_token
(
&
p
);
if
(
!
token
)
break
;
if
(
!
lstrcmpA
(
token
,
"-a"
)
)
if
(
!
strcmpW
(
token
,
dash_aW
)
)
{
RefreshFileTypeAssociations
();
continue
;
}
if
(
!
lstrcmpA
(
token
,
"-r"
)
)
if
(
!
strcmpW
(
token
,
dash_rW
)
)
{
cleanup_menus
();
continue
;
}
if
(
!
lstrcmpA
(
token
,
"-w"
)
)
if
(
!
strcmpW
(
token
,
dash_wW
)
)
bWait
=
TRUE
;
else
if
(
!
lstrcmpA
(
token
,
"-u"
)
)
else
if
(
!
strcmpW
(
token
,
dash_uW
)
)
bURL
=
TRUE
;
else
if
(
token
[
0
]
==
'-'
)
{
WINE_ERR
(
"unknown option %s
\n
"
,
token
);
WINE_ERR
(
"unknown option %s
\n
"
,
wine_dbgstr_w
(
token
)
);
}
else
{
WCHAR
link
[
MAX_PATH
];
BOOL
bRet
;
MultiByteToWideChar
(
CP_ACP
,
0
,
token
,
-
1
,
link
,
sizeof
(
link
)
/
sizeof
(
WCHAR
)
);
if
(
bURL
)
bRet
=
Process_URL
(
link
,
bWait
);
bRet
=
Process_URL
(
token
,
bWait
);
else
bRet
=
Process_Link
(
link
,
bWait
);
bRet
=
Process_Link
(
token
,
bWait
);
if
(
!
bRet
)
{
WINE_ERR
(
"failed to build menu item for %s
\n
"
,
token
);
WINE_ERR
(
"failed to build menu item for %s
\n
"
,
wine_dbgstr_w
(
token
)
);
ret
=
1
;
}
}
...
...
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