Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
5b1e9342
Commit
5b1e9342
authored
Oct 02, 2001
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid including winbase.h in generated .spec.c files.
parent
5a9ba282
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
8 deletions
+33
-8
spec32.c
tools/winebuild/spec32.c
+33
-8
No files found.
tools/winebuild/spec32.c
View file @
5b1e9342
...
...
@@ -509,19 +509,31 @@ void BuildSpec32File( FILE *outfile )
case
SPEC_MODE_GUIEXE
:
if
(
!
init_func
)
init_func
=
"WinMain"
;
fprintf
(
outfile
,
"
\n
#include <winbase.h>
\n
"
"
\n
typedef struct {
\n
"
" unsigned int cb;
\n
"
" char *lpReserved, *lpDesktop, *lpTitle;
\n
"
" unsigned int dwX, dwY, dwXSize, dwYSize;
\n
"
" unsigned int dwXCountChars, dwYCountChars, dwFillAttribute, dwFlags;
\n
"
" unsigned short wShowWindow, cbReserved2;
\n
"
" char *lpReserved2;
\n
"
" void *hStdInput, *hStdOutput, *hStdError;
\n
"
"} STARTUPINFOA;
\n
"
"int _ARGC;
\n
"
"char **_ARGV;
\n
"
"extern int __stdcall %s(HINSTANCE,HINSTANCE,LPSTR,INT);
\n
"
"extern int __stdcall %s(void *,void *,char *,int);
\n
"
"extern char * __stdcall GetCommandLineA(void);
\n
"
"extern void * __stdcall GetModuleHandleA(char *);
\n
"
"extern void __stdcall GetStartupInfoA(STARTUPINFOA *);
\n
"
"extern void __stdcall ExitProcess(unsigned int);
\n
"
"static void __wine_exe_main(void)
\n
"
"{
\n
"
" extern int __wine_get_main_args( char ***argv );
\n
"
" STARTUPINFOA info;
\n
"
"
LPSTR
cmdline = GetCommandLineA();
\n
"
"
char *
cmdline = GetCommandLineA();
\n
"
" while (*cmdline && *cmdline != ' ') cmdline++;
\n
"
" if (*cmdline) cmdline++;
\n
"
" GetStartupInfoA( &info );
\n
"
" if (!(info.dwFlags &
STARTF_USESHOWWINDOW
)) info.wShowWindow = 1;
\n
"
" if (!(info.dwFlags &
1
)) info.wShowWindow = 1;
\n
"
" _ARGC = __wine_get_main_args( &_ARGV );
\n
"
" ExitProcess( %s( GetModuleHandleA(0), 0, cmdline, info.wShowWindow ) );
\n
"
"}
\n\n
"
,
init_func
,
init_func
);
...
...
@@ -531,19 +543,32 @@ void BuildSpec32File( FILE *outfile )
case
SPEC_MODE_GUIEXE_UNICODE
:
if
(
!
init_func
)
init_func
=
"WinMain"
;
fprintf
(
outfile
,
"
\n
#include <winbase.h>
\n
"
"
\n
typedef unsigned short WCHAR;
\n
"
"typedef struct {
\n
"
" unsigned int cb;
\n
"
" char *lpReserved, *lpDesktop, *lpTitle;
\n
"
" unsigned int dwX, dwY, dwXSize, dwYSize;
\n
"
" unsigned int dwXCountChars, dwYCountChars, dwFillAttribute, dwFlags;
\n
"
" unsigned short wShowWindow, cbReserved2;
\n
"
" char *lpReserved2;
\n
"
" void *hStdInput, *hStdOutput, *hStdError;
\n
"
"} STARTUPINFOA;
\n
"
"int _ARGC;
\n
"
"WCHAR **_ARGV;
\n
"
"extern int __stdcall %s(HINSTANCE,HINSTANCE,LPSTR,INT);
\n
"
"extern int __stdcall %s(void *,void *,char *,int);
\n
"
"extern char * __stdcall GetCommandLineA(void);
\n
"
"extern void * __stdcall GetModuleHandleA(char *);
\n
"
"extern void __stdcall GetStartupInfoA(STARTUPINFOA *);
\n
"
"extern void __stdcall ExitProcess(unsigned int);
\n
"
"static void __wine_exe_main(void)
\n
"
"{
\n
"
" extern int __wine_get_wmain_args( WCHAR ***argv );
\n
"
" STARTUPINFOA info;
\n
"
"
LPSTR
cmdline = GetCommandLineA();
\n
"
"
char *
cmdline = GetCommandLineA();
\n
"
" while (*cmdline && *cmdline != ' ') cmdline++;
\n
"
" if (*cmdline) cmdline++;
\n
"
" GetStartupInfoA( &info );
\n
"
" if (!(info.dwFlags &
STARTF_USESHOWWINDOW
)) info.wShowWindow = 1;
\n
"
" if (!(info.dwFlags &
1
)) info.wShowWindow = 1;
\n
"
" _ARGC = __wine_get_wmain_args( &_ARGV );
\n
"
" ExitProcess( %s( GetModuleHandleA(0), 0, cmdline, info.wShowWindow ) );
\n
"
"}
\n\n
"
,
init_func
,
init_func
);
...
...
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