Module: tools
Branch: master
Commit: 6ec52659bfe20bf07c37841ad669e0b31a446b07
URL: https://source.winehq.org/git/tools.git/?a=commit;h=6ec52659bfe20bf07c37841…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Fri Jan 24 09:52:35 2020 +0100
testbot/LogUtils: Return the ParseWineTestReport() results as a single object.
Rename the variable holding it to $LogInfo for consistency with the
other functions as it plays the same role and may eventually carry the
same information.
Store the extra errors in the $LogInfo->{Extra} field and rename
_AddError() to _AddExtra() to match and avoid confusion with
_AddLogError().
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/bin/UpdateTaskLogs | 10 +--
testbot/bin/WineRunTask.pl | 18 +++---
testbot/bin/WineRunWineTest.pl | 18 +++---
testbot/lib/WineTestBot/LogUtils.pm | 125 +++++++++++++++++++++---------------
4 files changed, 95 insertions(+), 76 deletions(-)
Diff: https://source.winehq.org/git/tools.git/?a=commitdiff;h=6ec52659bfe20bf07c3…
Module: wine
Branch: master
Commit: bb9fb27bc4c265e751b88b1d8d4c835438e7fc5c
URL: https://source.winehq.org/git/wine.git/?a=commit;h=bb9fb27bc4c265e751b88b1d…
Author: Jacek Caban <jacek(a)codeweavers.com>
Date: Tue Jan 21 19:58:50 2020 +0100
msvcrt: Provide EXE entry points in importlib.
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/msvcrt/Makefile.in | 5 ++++
dlls/msvcrt/crt_gccmain.c | 31 ++++++++++++++++++++++++
dlls/msvcrt/crt_main.c | 59 +++++++++++++++++++++++++++++++++++++++++++++
dlls/msvcrt/crt_winmain.c | 58 ++++++++++++++++++++++++++++++++++++++++++++
dlls/msvcrt/crt_wmain.c | 59 +++++++++++++++++++++++++++++++++++++++++++++
dlls/msvcrt/crt_wwinmain.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 272 insertions(+)
diff --git a/dlls/msvcrt/Makefile.in b/dlls/msvcrt/Makefile.in
index d0237fd891..0b8fdf19c7 100644
--- a/dlls/msvcrt/Makefile.in
+++ b/dlls/msvcrt/Makefile.in
@@ -6,6 +6,11 @@ DELAYIMPORTS = advapi32 user32
C_SRCS = \
console.c \
cpp.c \
+ crt_gccmain.c \
+ crt_main.c \
+ crt_winmain.c \
+ crt_wmain.c \
+ crt_wwinmain.c \
ctype.c \
data.c \
dir.c \
diff --git a/dlls/msvcrt/crt_gccmain.c b/dlls/msvcrt/crt_gccmain.c
new file mode 100644
index 0000000000..ed25f385d1
--- /dev/null
+++ b/dlls/msvcrt/crt_gccmain.c
@@ -0,0 +1,31 @@
+/*
+ * __main entry point
+ *
+ * Copyright 2019 Jacek Caban for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#if 0
+#pragma makedep implib
+#endif
+
+#ifdef __MINGW32__
+
+/* mingw compilers emit call to __main() when main() function is defined.
+ * it's used by crt to call global constructors and register global destructors. */
+void __cdecl __main(void) {}
+
+#endif
diff --git a/dlls/msvcrt/crt_main.c b/dlls/msvcrt/crt_main.c
new file mode 100644
index 0000000000..7502f30075
--- /dev/null
+++ b/dlls/msvcrt/crt_main.c
@@ -0,0 +1,59 @@
+/*
+ * mainCRTStartup default entry point
+ *
+ * Copyright 2019 Jacek Caban for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#if 0
+#pragma makedep implib
+#endif
+
+#ifdef __MINGW32__
+
+#include "msvcrt.h"
+
+#include "windef.h"
+#include "winbase.h"
+
+/* FIXME: Use msvcrt headers once we move to PE file */
+void __cdecl exit(int);
+void __cdecl __getmainargs(int *, char ***, char ***, int, int *);
+void __cdecl __set_app_type(int);
+
+int __cdecl main(int argc, char **argv, char **env);
+
+static const IMAGE_NT_HEADERS *get_nt_header( void )
+{
+ extern IMAGE_DOS_HEADER __ImageBase;
+ return (const IMAGE_NT_HEADERS *)((char *)&__ImageBase + __ImageBase.e_lfanew);
+}
+
+int __cdecl mainCRTStartup(void)
+{
+ int argc, new_mode = 0, ret;
+ char **argv, **env;
+
+ __getmainargs(&argc, &argv, &env, 0, &new_mode);
+ __set_app_type(get_nt_header()->OptionalHeader.Subsystem == IMAGE_SUBSYSTEM_WINDOWS_GUI ? 2 : 1);
+
+ ret = main(argc, argv, env);
+
+ exit(ret);
+ return ret;
+}
+
+#endif
diff --git a/dlls/msvcrt/crt_winmain.c b/dlls/msvcrt/crt_winmain.c
new file mode 100644
index 0000000000..27e0283cbf
--- /dev/null
+++ b/dlls/msvcrt/crt_winmain.c
@@ -0,0 +1,58 @@
+/*
+ * main default entry point for exe files
+ *
+ * Copyright 2005 Alexandre Julliard
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#if 0
+#pragma makedep implib
+#endif
+
+#ifdef __MINGW32__
+
+#include <stdarg.h>
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+
+int __cdecl main( int argc, char *argv[] )
+{
+ STARTUPINFOA info;
+ char *cmdline = GetCommandLineA();
+ int bcount = 0;
+ BOOL in_quotes = FALSE;
+
+ while (*cmdline)
+ {
+ if ((*cmdline == '\t' || *cmdline == ' ') && !in_quotes) break;
+ else if (*cmdline == '\\') bcount++;
+ else if (*cmdline == '\"')
+ {
+ if (!(bcount & 1)) in_quotes = !in_quotes;
+ bcount = 0;
+ }
+ else bcount = 0;
+ cmdline++;
+ }
+ while (*cmdline == '\t' || *cmdline == ' ') cmdline++;
+
+ GetStartupInfoA( &info );
+ if (!(info.dwFlags & STARTF_USESHOWWINDOW)) info.wShowWindow = SW_SHOWNORMAL;
+ return WinMain( GetModuleHandleA(0), 0, cmdline, info.wShowWindow );
+}
+
+#endif
diff --git a/dlls/msvcrt/crt_wmain.c b/dlls/msvcrt/crt_wmain.c
new file mode 100644
index 0000000000..0588d5bdce
--- /dev/null
+++ b/dlls/msvcrt/crt_wmain.c
@@ -0,0 +1,59 @@
+/*
+ * wmainCRTStartup default entry point
+ *
+ * Copyright 2019 Jacek Caban for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#if 0
+#pragma makedep implib
+#endif
+
+#ifdef __MINGW32__
+
+#include "msvcrt.h"
+
+#include "windef.h"
+#include "winbase.h"
+
+/* FIXME: Use msvcrt headers once we move to PE file */
+void __cdecl exit(int);
+void __cdecl __wgetmainargs(int *, WCHAR ***, WCHAR ***, int, int *);
+void __cdecl __set_app_type(int);
+
+int __cdecl wmain(int argc, WCHAR **argv, WCHAR **env);
+
+static const IMAGE_NT_HEADERS *get_nt_header( void )
+{
+ extern IMAGE_DOS_HEADER __ImageBase;
+ return (const IMAGE_NT_HEADERS *)((char *)&__ImageBase + __ImageBase.e_lfanew);
+}
+
+int __cdecl wmainCRTStartup(void)
+{
+ int argc, new_mode = 0, ret;
+ WCHAR **argv, **env;
+
+ __wgetmainargs(&argc, &argv, &env, 0, &new_mode);
+ __set_app_type(get_nt_header()->OptionalHeader.Subsystem == IMAGE_SUBSYSTEM_WINDOWS_GUI ? 2 : 1);
+
+ ret = wmain(argc, argv, env);
+
+ exit(ret);
+ return ret;
+}
+
+#endif
diff --git a/dlls/msvcrt/crt_wwinmain.c b/dlls/msvcrt/crt_wwinmain.c
new file mode 100644
index 0000000000..2c53b744b5
--- /dev/null
+++ b/dlls/msvcrt/crt_wwinmain.c
@@ -0,0 +1,60 @@
+/*
+ * main default entry point for Unicode exe files
+ *
+ * Copyright 2005 Alexandre Julliard
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#if 0
+#pragma makedep implib
+#endif
+
+#ifdef __MINGW32__
+
+#include <stdarg.h>
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+
+int WINAPI wWinMain(HINSTANCE,HINSTANCE,LPWSTR,int);
+
+int __cdecl wmain( int argc, WCHAR *argv[] )
+{
+ STARTUPINFOW info;
+ WCHAR *cmdline = GetCommandLineW();
+ int bcount = 0;
+ BOOL in_quotes = FALSE;
+
+ while (*cmdline)
+ {
+ if ((*cmdline == '\t' || *cmdline == ' ') && !in_quotes) break;
+ else if (*cmdline == '\\') bcount++;
+ else if (*cmdline == '\"')
+ {
+ if (!(bcount & 1)) in_quotes = !in_quotes;
+ bcount = 0;
+ }
+ else bcount = 0;
+ cmdline++;
+ }
+ while (*cmdline == '\t' || *cmdline == ' ') cmdline++;
+
+ GetStartupInfoW( &info );
+ if (!(info.dwFlags & STARTF_USESHOWWINDOW)) info.wShowWindow = SW_SHOWNORMAL;
+ return wWinMain( GetModuleHandleW(0), 0, cmdline, info.wShowWindow );
+}
+
+#endif
Module: wine
Branch: master
Commit: 22a9b47429d5babd7048b24cee9d6aae42bd2c39
URL: https://source.winehq.org/git/wine.git/?a=commit;h=22a9b47429d5babd7048b24c…
Author: Jacek Caban <jacek(a)codeweavers.com>
Date: Tue Jan 21 19:50:28 2020 +0100
include: Add wWinMain declaration.
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
include/winbase.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/winbase.h b/include/winbase.h
index 655eb48f0f..3062d3b6ad 100644
--- a/include/winbase.h
+++ b/include/winbase.h
@@ -3136,6 +3136,7 @@ static FORCEINLINE HANDLE WINAPI GetCurrentThreadEffectiveToken(void)
/* WinMain(entry point) must be declared in winbase.h. */
/* If this is not declared, we cannot compile many sources written with C++. */
int WINAPI WinMain(HINSTANCE,HINSTANCE,LPSTR,int);
+int WINAPI wWinMain(HINSTANCE,HINSTANCE,LPWSTR,int);
#ifdef __WINESRC__
/* shouldn't be here, but is nice for type checking */