diff --git a/programs/uninstaller/Makefile.in b/programs/uninstaller/Makefile.in index c10330047d9..5cca55159ee 100644 --- a/programs/uninstaller/Makefile.in +++ b/programs/uninstaller/Makefile.in @@ -3,7 +3,7 @@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = uninstaller.exe -APPMODE = -mconsole -Wb,-e,wmain +APPMODE = -mconsole -municode IMPORTS = shlwapi user32 gdi32 advapi32 kernel32 C_SRCS = \ diff --git a/programs/winepath/Makefile.in b/programs/winepath/Makefile.in index 607dcc75f1a..0bc93316023 100644 --- a/programs/winepath/Makefile.in +++ b/programs/winepath/Makefile.in @@ -3,7 +3,7 @@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = winepath.exe -APPMODE = -mconsole -Wb,-e,wmain +APPMODE = -mconsole -municode IMPORTS = kernel32 C_SRCS = winepath.c diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index bc9d73f184c..30bcb337b70 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -153,6 +153,7 @@ struct options int nodefaultlibs; int noshortwchar; int gui_app; + int unicode_app; int compile_only; int wine_mode; const char* output_name; @@ -559,6 +560,11 @@ static void build(struct options* opts) strarray_add(spec_args, output_name); strarray_add(spec_args, "--subsystem"); strarray_add(spec_args, opts->gui_app ? "windows" : "console"); + if (opts->unicode_app) + { + strarray_add(spec_args, "--entry"); + strarray_add(spec_args, "wmain"); + } } for ( j = 0; j < lib_dirs->size; j++ ) @@ -730,13 +736,13 @@ static int is_directory_arg(const char* arg) /* * MinGW Options - * -mno-cygwin -mwindows -mconsole -mthreads + * -mno-cygwin -mwindows -mconsole -mthreads -municode */ static int is_mingw_arg(const char* arg) { static const char* mingw_switches[] = { - "-mno-cygwin", "-mwindows", "-mconsole", "-mthreads" + "-mno-cygwin", "-mwindows", "-mconsole", "-mthreads", "-municode" }; int j; @@ -889,6 +895,8 @@ int main(int argc, char **argv) opts.gui_app = 1; else if (strcmp("-mconsole", argv[i]) == 0) opts.gui_app = 0; + else if (strcmp("-municode", argv[i]) == 0) + opts.unicode_app = 1; break; case 'n': if (strcmp("-nostdinc", argv[i]) == 0) diff --git a/tools/winegcc/winegcc.man b/tools/winegcc/winegcc.man index 8b003bc0c1a..781f4759edd 100644 --- a/tools/winegcc/winegcc.man +++ b/tools/winegcc/winegcc.man @@ -49,6 +49,9 @@ of MSVCRT. This switch is also used by the MinGW compiler to link against MSVCRT on Windows, instead of linking against Cygwin's libc. Sharing the syntax with MinGW makes it very easy to write Makefiles that work under Wine, MinGW+MSYS, or MinGW+Cygwin. +.IP \fB-municode\fR +Set the default entry point of the application to be the Unicode +\fBwmain()\fR instead of the standard \fBmain()\fR. .IP \fB-mwindows\fR This option adds -lgdi32, -lcomdlg32, and -lshell32 to the list of default libraries, and passes '--subsystem windows' to winebuild @@ -58,6 +61,8 @@ Do not use the standard system libraries when linking. These include at a minimum -lkernel32, -luser32, -ladvapi32, and any default libraries used by the backend compiler. The -mwindows option augments the list of default libraries as described above. +.IP \fB-nostartfiles\fR +Do not add the winecrt0 library when linking. .IP \fB-Wb,option\fR Pass option as an option to winebuild. If option contains commas, it is split into multiple options at the commas.