mirror of https://github.com/BOINC/boinc.git
wrapper: reclassify the wrapper as a console application on Windows.
This was a hold over from the Win9x days when a console application window could not be hidden by the processed that launched it. Since we no longer need to support Win9x we can get rid of this hack. NOTE: At some point parameter parsing and processing the job file was moved ahead of the diagnostics initialization code. This had the unfortunate consequence of making errors that happened before the diagnostics code initialized disappear. Switching wrapper to a console application will mean that launching it from a console window will cause the console window to block and display anything written to stderr/stdout regardless of whether the diagnostics code is initialized.
This commit is contained in:
parent
ce0e2dab0f
commit
0de56b1a59
|
@ -1048,6 +1048,13 @@ int main(int argc, char** argv) {
|
|||
// total CPU time at last checkpoint
|
||||
char buf[256];
|
||||
|
||||
// Log banner
|
||||
//
|
||||
fprintf(stderr, "%s wrapper (%d.%d.%d): starting\n",
|
||||
boinc_msg_prefix(buf, sizeof(buf)),
|
||||
BOINC_MAJOR_VERSION, BOINC_MINOR_VERSION, WRAPPER_RELEASE
|
||||
);
|
||||
|
||||
#ifdef _WIN32
|
||||
SetPriorityClass(GetCurrentProcess(), NORMAL_PRIORITY_CLASS);
|
||||
#endif
|
||||
|
@ -1237,16 +1244,3 @@ int main(int argc, char** argv) {
|
|||
boinc_finish(0);
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR Args, int WinMode) {
|
||||
LPSTR command_line;
|
||||
char* argv[100];
|
||||
int argc;
|
||||
|
||||
command_line = GetCommandLine();
|
||||
argc = parse_command_line(command_line, argv);
|
||||
return main(argc, argv);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -137,7 +137,7 @@
|
|||
<DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>.\Build\$(Platform)\$(Configuration)\$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<AdditionalLibraryDirectories>$(TargetDir)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
|
@ -188,7 +188,7 @@
|
|||
<DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>.\Build\$(Platform)\$(Configuration)\$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
<AdditionalLibraryDirectories>$(TargetDir)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
|
@ -235,7 +235,7 @@
|
|||
<DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>.\Build\$(Platform)\$(Configuration)\$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<AdditionalLibraryDirectories>$(TargetDir)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
|
@ -282,7 +282,7 @@
|
|||
<DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>.\Build\$(Platform)\$(Configuration)\$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
<AdditionalLibraryDirectories>$(TargetDir)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
|
|
Loading…
Reference in New Issue