Add wxWidgets bug fix patch.

Calling external applications with wxWidgets failed when the file name
contained non-ASCII characters.

Please note that this patch does not require wxWidgets to be recompiled.
It only changes a header file which means the patch can be applied to
an existing wxWidgets install.  However, KiCad does need to be rebuilt
after this patch is applied.  This patch is not required if you do not
need non-ASCII character file name support.
This commit is contained in:
Cirilo Bernardo 2017-03-12 11:22:51 -04:00 committed by Wayne Stambaugh
parent 960c139064
commit 8af174f7d2
1 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,24 @@
diff --git a/include/wx/app.h b/include/wx/app.h
index 9a73469570..89c1762dc7 100644
--- a/include/wx/app.h
+++ b/include/wx/app.h
@@ -798,6 +798,19 @@ public:
\
return wxEntry(argc, argv); \
}
+#elif wxUSE_UNICODE && ( defined(__MINGW32__) || defined(__MINGW64__) )
+ #define wxIMPLEMENT_WXWIN_MAIN_CONSOLE \
+ int main(int argc, char **argv) \
+ { \
+ wxDISABLE_DEBUG_SUPPORT(); \
+ \
+ LPWSTR cmdline = ::GetCommandLineW(); \
+ int argcw; \
+ LPWSTR* argvw = ::CommandLineToArgvW( cmdline, &argcw ); \
+ int result = wxEntry( argcw, argvw ); \
+ ::LocalFree( argvw ); \
+ return result; \
+ }
#else // Use standard main()
#define wxIMPLEMENT_WXWIN_MAIN_CONSOLE \
int main(int argc, char **argv) \