*** empty log message ***

svn path=/trunk/boinc_samples/; revision=10333
This commit is contained in:
David Anderson 2006-06-13 23:12:36 +00:00
parent 3d26b0394e
commit cdc30195e6
8 changed files with 232 additions and 22 deletions

View File

@ -104,3 +104,18 @@ David 13 June 2006
worker/
Makefile
worker.C
David 13 June 2006
- added Win project file for worker,
fixed names in project files, got stuff to compile
uppercase/
upper_case.C
win_build/
samples.sln
sleeper.vcproj
worker.vcproj (new)
worker/
worker.C
wrapper/
wrapper.C

View File

@ -94,21 +94,6 @@ static void use_some_cpu() {
}
}
#ifdef _WIN32
extern int main(int argc, char** argv);
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
void worker() {
int c, nchars = 0, retval;
double fsize;
@ -271,4 +256,16 @@ int main(int argc, char **argv) {
#endif
}
#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
const char *BOINC_RCSID_33ac47a071 = "$Id$";

View File

@ -40,6 +40,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sleeper", "sleeper.vcproj",
{E8F6BD7E-461A-4733-B7D8-37B09A099ED8} = {E8F6BD7E-461A-4733-B7D8-37B09A099ED8}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "worker", "worker.vcproj", "{8281D898-0E64-44EB-8356-4F0336F19A35}"
ProjectSection(ProjectDependencies) = postProject
{E8F6BD7E-461A-4733-B7D8-37B09A099ED8} = {E8F6BD7E-461A-4733-B7D8-37B09A099ED8}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
@ -78,6 +83,10 @@ Global
{8281D898-0E64-44EB-8356-4F0336F19A35}.Debug.Build.0 = Debug|Win32
{8281D898-0E64-44EB-8356-4F0336F19A35}.Release.ActiveCfg = Release|Win32
{8281D898-0E64-44EB-8356-4F0336F19A35}.Release.Build.0 = Release|Win32
{8281D898-0E64-44EB-8356-4F0336F19A35}.Debug.ActiveCfg = Debug|Win32
{8281D898-0E64-44EB-8356-4F0336F19A35}.Debug.Build.0 = Debug|Win32
{8281D898-0E64-44EB-8356-4F0336F19A35}.Release.ActiveCfg = Release|Win32
{8281D898-0E64-44EB-8356-4F0336F19A35}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection

View File

@ -51,7 +51,7 @@
IgnoreAllDefaultLibraries="TRUE"
DelayLoadDLLs=""
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="Release/uppercase_5.10_windows_intelx86.pdb"
ProgramDatabaseFile="Release/sleeper_5.10_windows_intelx86.pdb"
SubSystem="2"
TargetMachine="1"/>
<Tool
@ -112,13 +112,13 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib opengl32.lib glu32.lib glaux.lib ole32.lib"
OutputFile="Debug/uppercase_5.10_windows_intelx86.exe"
OutputFile="Debug/sleeper_5.10_windows_intelx86.exe"
LinkIncremental="0"
SuppressStartupBanner="TRUE"
IgnoreAllDefaultLibraries="TRUE"
DelayLoadDLLs="GDI32.DLL;OPENGL32.DLL;GLU32.DLL"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="Debug/uppercase_5.10_windows_intelx86.pdb"
ProgramDatabaseFile="Debug/sleeper_5.10_windows_intelx86.pdb"
SubSystem="2"
TargetMachine="1"/>
<Tool

175
win_build/worker.vcproj Normal file
View File

@ -0,0 +1,175 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="worker"
ProjectGUID="{8281D898-0E64-44EB-8356-4F0336F19A35}"
SccProjectName=""
SccLocalPath="">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory="Release"
IntermediateDirectory="Release"
ConfigurationType="1"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
GlobalOptimizations="TRUE"
InlineFunctionExpansion="1"
FavorSizeOrSpeed="1"
OptimizeForProcessor="3"
OptimizeForWindowsApplication="TRUE"
AdditionalIncludeDirectories=".;../../boinc;../../boinc/api;../../boinc/lib;../image_libs;../jpeglib;../glut"
PreprocessorDefinitions="WIN32;NDEBUG;_MT;_CONSOLE"
StringPooling="FALSE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="boinc_win.h"
PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
WarningLevel="3"
SuppressStartupBanner="TRUE"
DebugInformationFormat="3"
CompileAs="2"
ForcedIncludeFiles="boinc_win.h"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libcmt.lib libcpmt.lib"
OutputFile="Release/worker_5.10_windows_intelx86.exe"
LinkIncremental="0"
SuppressStartupBanner="TRUE"
IgnoreAllDefaultLibraries="TRUE"
DelayLoadDLLs=""
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="Release/worker_5.10_windows_intelx86.pdb"
SubSystem="2"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=""
HeaderFileName=""/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory="Debug"
IntermediateDirectory="Debug"
ConfigurationType="1"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=".;../../boinc;../../boinc/api;../../boinc/lib;../image_libs;../jpeglib;../glut"
PreprocessorDefinitions="WIN32;_DEBUG;_MT;_CONSOLE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="boinc_win.h"
PrecompiledHeaderFile="$(IntDir)/boinc_win.pch"
BrowseInformation="1"
WarningLevel="3"
SuppressStartupBanner="TRUE"
DebugInformationFormat="4"
CompileAs="2"
ForcedIncludeFiles=""/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib opengl32.lib glu32.lib glaux.lib ole32.lib"
OutputFile="Debug/worker_5.10_windows_intelx86.exe"
LinkIncremental="0"
SuppressStartupBanner="TRUE"
IgnoreAllDefaultLibraries="TRUE"
DelayLoadDLLs="GDI32.DLL;OPENGL32.DLL;GLU32.DLL"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="Debug/worker_5.10_windows_intelx86.pdb"
SubSystem="2"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=""
HeaderFileName=""/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
<File
RelativePath="..\worker\worker.C">
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl">
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -45,13 +45,13 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libcmt.lib libcpmt.lib"
OutputFile="Release/sleeper_5.10_windows_intelx86.exe"
OutputFile="Release/wrapper_5.10_windows_intelx86.exe"
LinkIncremental="0"
SuppressStartupBanner="TRUE"
IgnoreAllDefaultLibraries="TRUE"
DelayLoadDLLs=""
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="Release/uppercase_5.10_windows_intelx86.pdb"
ProgramDatabaseFile="Release/wrapper_5.10_windows_intelx86.pdb"
SubSystem="2"
TargetMachine="1"/>
<Tool
@ -118,7 +118,7 @@
IgnoreAllDefaultLibraries="TRUE"
DelayLoadDLLs="GDI32.DLL;OPENGL32.DLL;GLU32.DLL"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="Debug/uppercase_5.10_windows_intelx86.pdb"
ProgramDatabaseFile="Debug/wrapper_5.10_windows_intelx86.pdb"
SubSystem="2"
TargetMachine="1"/>
<Tool

View File

@ -22,8 +22,9 @@
#include <stdio.h>
#include <time.h>
#include "util.h"
int main() {
int main(int, char**) {
FILE* in = fopen("in", "r");
FILE* out = fopen("out", "w");
char buf[256];
@ -42,3 +43,15 @@ int main() {
fputs("done!\n", out);
fclose(out);
}
#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

View File

@ -45,6 +45,7 @@
#include <vector>
#include <string>
#ifdef _WIN32
#include "boinc_win.h"
#else
#include <unistd.h>
#include <sys/wait.h>