MSVC 7.1 project files - Tile client
This commit is contained in:
parent
8ace9d1efa
commit
50b1465421
5 changed files with 184 additions and 20 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -16,3 +16,4 @@ configure
|
|||
depcomp
|
||||
install-sh
|
||||
missing
|
||||
bin
|
||||
|
|
2
projects/VC7.1/fgfs-launch-clients/.gitignore
vendored
Normal file
2
projects/VC7.1/fgfs-launch-clients/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
Debug
|
||||
Release
|
140
projects/VC7.1/fgfs-launch-clients/fgfs-launch-clients.vcproj
Normal file
140
projects/VC7.1/fgfs-launch-clients/fgfs-launch-clients.vcproj
Normal file
|
@ -0,0 +1,140 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="fgfs-launch-clients"
|
||||
ProjectGUID="{4CCE2136-24FC-4F7A-A609-8018F00F9042}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\..\SimGear.cs;..\..\..\..;..\..\..\..\3rdParty\include;..\..\..\..\install\msvc71\OpenSceneGraph\include;..\..\..\src\Lib;..\..\..\src\BuildTiles;..\..\..\..\gpc232"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NOMINMAX"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
RuntimeTypeInfo="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ul_d.lib sg_d.lib zlibd.lib ws2_32.lib"
|
||||
OutputFile="$(OutDir)/fgfs-launch-clients.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="..\..\..\..\plib;..\..\..\..\3rdParty\lib"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/fgfs-launch-clients.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\..\SimGear.cs;..\..\..\..;..\..\..\..\3rdParty\include;..\..\..\..\install\msvc71\OpenSceneGraph\include;..\..\..\src\Lib;..\..\..\src\BuildTiles;..\..\..\..\gpc232"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NOMINMAX"
|
||||
RuntimeLibrary="2"
|
||||
RuntimeTypeInfo="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ul.lib sg.lib zlib.lib ws2_32.lib"
|
||||
OutputFile="$(OutDir)/fgfs-launch-clients.exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="..\..\..\..\plib;..\..\..\..\3rdParty\lib"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<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;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath="..\..\..\src\BuildTiles\Parallel\client.cxx">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -202,6 +202,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fgfs-launch-server", "fgfs-
|
|||
{22540CD3-D3CA-4C86-A773-80AEEE3ACDED} = {22540CD3-D3CA-4C86-A773-80AEEE3ACDED}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fgfs-launch-clients", "fgfs-launch-clients\fgfs-launch-clients.vcproj", "{4CCE2136-24FC-4F7A-A609-8018F00F9042}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{22540CD3-D3CA-4C86-A773-80AEEE3ACDED} = {22540CD3-D3CA-4C86-A773-80AEEE3ACDED}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
Debug = Debug
|
||||
|
@ -352,6 +357,10 @@ Global
|
|||
{5086D5EB-5EC0-437F-8181-264315F21A17}.Debug.Build.0 = Debug|Win32
|
||||
{5086D5EB-5EC0-437F-8181-264315F21A17}.Release.ActiveCfg = Release|Win32
|
||||
{5086D5EB-5EC0-437F-8181-264315F21A17}.Release.Build.0 = Release|Win32
|
||||
{4CCE2136-24FC-4F7A-A609-8018F00F9042}.Debug.ActiveCfg = Debug|Win32
|
||||
{4CCE2136-24FC-4F7A-A609-8018F00F9042}.Debug.Build.0 = Debug|Win32
|
||||
{4CCE2136-24FC-4F7A-A609-8018F00F9042}.Release.ActiveCfg = Release|Win32
|
||||
{4CCE2136-24FC-4F7A-A609-8018F00F9042}.Release.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
|
|
|
@ -10,22 +10,30 @@
|
|||
# include <sys/param.h> // BSD macro definitions
|
||||
#endif
|
||||
|
||||
#include <sys/time.h> // FD_ISSET(), etc.
|
||||
#ifdef _MSC_VER
|
||||
# include <io.h>
|
||||
# include <winsock2.h>
|
||||
# include <process.h>
|
||||
# define sleep(a) Sleep(a)
|
||||
# define pid_t int
|
||||
#else
|
||||
# include <sys/time.h> // FD_ISSET(), etc.
|
||||
# include <sys/socket.h>
|
||||
# include <netdb.h>
|
||||
# include <netinet/in.h>
|
||||
# include <unistd.h>
|
||||
# include <utmp.h>
|
||||
# include <strings.h> // bcopy() on Irix
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netdb.h>
|
||||
#include <netinet/in.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <utmp.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h> // atoi()
|
||||
#include <string.h> // bcopy(), sterror()
|
||||
#include <strings.h> // bcopy() on Irix
|
||||
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
|
@ -35,6 +43,8 @@
|
|||
|
||||
#include <simgear/bucket/newbucket.hxx>
|
||||
|
||||
#include <plib/ul.h>
|
||||
|
||||
using std::cout;
|
||||
using std::cerr;
|
||||
using std::endl;
|
||||
|
@ -56,7 +66,7 @@ bool do_overwrite = true;
|
|||
void check_master_switch() {
|
||||
string file = work_base + "/Status/MASTER_ON";
|
||||
|
||||
if ( access( file.c_str(), F_OK ) != 0 ) {
|
||||
if ( access( file.c_str(), 0 ) != 0 ) {
|
||||
cout << "MASTER_ON file, " << file << " not found ... exiting." << endl;
|
||||
exit(0);
|
||||
}
|
||||
|
@ -66,7 +76,7 @@ void check_master_switch() {
|
|||
// check if the host system is free of interactive users
|
||||
int system_free() {
|
||||
|
||||
#if !defined(BSD) && !defined(__CYGWIN__)
|
||||
#if !defined(BSD) && !defined(__CYGWIN__) && !defined(_MSC_VER)
|
||||
struct utmp *uptr;
|
||||
|
||||
setutent();
|
||||
|
@ -83,8 +93,10 @@ int system_free() {
|
|||
}
|
||||
|
||||
endutent();
|
||||
#else
|
||||
#elif !defined(_MSC_VER)
|
||||
# warning Port me
|
||||
#else
|
||||
# pragma message( "Port me" )
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
|
@ -215,17 +227,17 @@ static bool must_generate( const SGBucket& b ) {
|
|||
size_t prefix_len=prefix.size();
|
||||
for (int i = 0; i < (int)load_dirs.size(); i++) {
|
||||
string path=load_dirs[i]+"/"+b.gen_base_path();
|
||||
DIR *loaddir=opendir(path.c_str());
|
||||
ulDir *loaddir=ulOpenDir(path.c_str());
|
||||
if (!loaddir) {
|
||||
if (errno!=ENOENT)
|
||||
cout << " Could not open load directory " << path << ":" << strerror(errno) << "\n";
|
||||
continue;
|
||||
}
|
||||
|
||||
struct dirent* de;
|
||||
struct ulDirEnt* de;
|
||||
struct stat src_stat;
|
||||
|
||||
while ((de=readdir(loaddir))) {
|
||||
while ((de=ulReadDir(loaddir))) {
|
||||
if (strncmp(de->d_name,prefix.c_str(),prefix_len))
|
||||
continue;
|
||||
string file=path+"/"+de->d_name;
|
||||
|
@ -236,12 +248,12 @@ static bool must_generate( const SGBucket& b ) {
|
|||
}
|
||||
if ( have_btg && src_stat.st_mtime>btg_stat.st_mtime ) {
|
||||
cout << " File " << file << " is newer than btg-file => rebuild\n";
|
||||
closedir(loaddir);
|
||||
ulCloseDir(loaddir);
|
||||
return true;
|
||||
}
|
||||
if ( have_stg && src_stat.st_mtime>stg_stat.st_mtime ) {
|
||||
cout << " File " << file << " is newer than stg-file => rebuild\n";
|
||||
closedir(loaddir);
|
||||
ulCloseDir(loaddir);
|
||||
return true;
|
||||
}
|
||||
/* Ignore elevation data, as it is not used if we have no
|
||||
|
@ -252,12 +264,12 @@ static bool must_generate( const SGBucket& b ) {
|
|||
continue;
|
||||
if ( !(have_stg && have_btg) ) {
|
||||
cout << " There is source-data (" << file << ") for tile " << b.gen_index_str() << " but .btg or .stg is missing => build\n";
|
||||
closedir(loaddir);
|
||||
ulCloseDir(loaddir);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
closedir(loaddir);
|
||||
ulCloseDir(loaddir);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -395,8 +407,8 @@ int main(int argc, char *argv[]) {
|
|||
pid_t pid = getpid();
|
||||
|
||||
char tmp[MAXBUF];
|
||||
sprintf(tmp, "/tmp/result.%s.%d", hostname, pid);
|
||||
string result_file = tmp;
|
||||
sprintf(tmp, "result.%s.%d.", hostname, pid);
|
||||
string result_file = tempnam( 0, tmp );
|
||||
|
||||
last_tile = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue