Only in Atlas-0.4.9\projects: 3rdparty diff -ur C:\FGCVS\Atlas\projects\msvc\Atlas.dsp Atlas-0.4.9\projects\msvc\Atlas.dsp --- C:\FGCVS\Atlas\projects\msvc\Atlas.dsp Tue May 11 18:08:07 2010 +++ Atlas-0.4.9\projects\msvc\Atlas.dsp Tue Oct 04 14:01:28 2011 @@ -42,7 +42,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir "." # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "." /I ".\winsrc" /I "..\3rdparty\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_DEPRECATE" /D "HAVE_CONFIG_H" /D "NOMINMAX" /D "ATLAS_JPEG" /D "FREEGLUT_STATIC" /FD /c +# ADD CPP /nologo /MT /W3 /GR /GX /O2 /I "." /I ".\winsrc" /I "..\3rdparty\include" /I "C:\Projects\OSG\OSG-3.0.1\include" /I "C:\FGCVS\boost-trunk" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_DEPRECATE" /D "HAVE_CONFIG_H" /D "NOMINMAX" /D "ATLAS_JPEG" /D "FREEGLUT_STATIC" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG" @@ -51,7 +51,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib ws2_32.lib freeglut_static.lib sg.lib fnt.lib pui.lib net.lib puAux.lib ul.lib SimGear.lib jpeg32.lib libpng.lib zlib.lib /libpath:"..\3rdparty\lib" /nologo /subsystem:console /machine:I386 /out:.\bin\Atlas.exe +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib ws2_32.lib freeglut_static.lib sg.lib fnt.lib pui.lib net.lib puAux.lib ul.lib jpeg32.lib libpng.lib zlib.lib libsgmagvar_a.lib libsgtiming_a.lib libsgmisc_a.lib libsgio_a.lib libsgserial_a.lib libsgdebug_a.lib libsgbucket_a.lib libsgstructure_a.lib libsgmath_a.lib /libpath:"..\3rdparty\lib" /nologo /subsystem:console /machine:I386 /out:.\bin\Atlas.exe !ELSEIF "$(CFG)" == "Atlas - Win32 Debug" @@ -67,7 +67,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir "." # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "." /I ".\winsrc" /I "..\3rdparty\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_DEPRECATE" /D "HAVE_CONFIG_H" /D "NOMINMAX" /D "ATLAS_JPEG" /D "FREEGLUT_STATIC" /FD /c +# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /ZI /Od /I "." /I ".\winsrc" /I "..\3rdparty\include" /I "C:\Projects\OSG\OSG-3.0.1\include" /I "C:\FGCVS\boost-trunk" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_DEPRECATE" /D "HAVE_CONFIG_H" /D "NOMINMAX" /D "ATLAS_JPEG" /D "FREEGLUT_STATIC" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG" @@ -76,7 +76,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib ws2_32.lib freeglut_staticd.lib sg_d.lib fnt_d.lib pui_d.lib net_d.lib puAux_d.lib ul_d.lib SimGeard.lib jpeg32d.lib libpngd.lib zlibd.lib /libpath:"..\3rdparty\lib" /nologo /subsystem:console /debug /machine:I386 /out:.\bin\AtlasD.exe +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib ws2_32.lib freeglut_staticd.lib sg_d.lib fnt_d.lib pui_d.lib net_d.lib puAux_d.lib ul_d.lib jpeg32d.lib libpngd.lib zlibd.lib libsgmagvar_aD.lib libsgtiming_aD.lib libsgmisc_aD.lib libsgio_aD.lib libsgserial_aD.lib libsgdebug_aD.lib libsgbucket_aD.lib libsgstructure_aD.lib libsgmath_aD.lib /libpath:"..\3rdparty\lib" /nologo /subsystem:console /debug /machine:I386 /out:.\bin\AtlasD.exe !ENDIF @@ -173,6 +173,10 @@ # End Source File # Begin Source File +SOURCE=..\..\src\RangeRingsOverlay.cxx +# End Source File +# Begin Source File + SOURCE=..\..\src\Scenery.cxx # End Source File # Begin Source File @@ -258,6 +262,10 @@ # Begin Source File SOURCE=..\..\src\Preferences.hxx +# End Source File +# Begin Source File + +SOURCE=..\..\src\RangeRingsOverlay.hxx # End Source File # Begin Source File diff -ur C:\FGCVS\Atlas\projects\msvc\atlas.sln Atlas-0.4.9\projects\msvc\atlas.sln --- C:\FGCVS\Atlas\projects\msvc\atlas.sln Tue May 11 19:05:06 2010 +++ Atlas-0.4.9\projects\msvc\atlas.sln Tue Oct 04 14:14:25 2011 @@ -1,20 +1,20 @@  -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual C++ Express 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Map", "Map.vcproj", "{4ECE9B47-4C73-4018-80B8-2F457EBEAC70}" +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual C++ Express 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Map", "Map.vcproj", "{9E648005-F572-4050-8779-48D7BB490CA0}" ProjectSection(ProjectDependencies) = postProject - {4472E39D-700B-4D1A-81C3-8877B29021A7} = {4472E39D-700B-4D1A-81C3-8877B29021A7} + {381FBD75-3612-47CA-B1B1-1FCB5E903C06} = {381FBD75-3612-47CA-B1B1-1FCB5E903C06} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Atlas", "Atlas.vcproj", "{0FE9A694-A9AD-4ACC-9040-054E8EE7F737}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Atlas", "Atlas.vcproj", "{A76BCCC0-16D3-4718-9A63-CE77724E8A9C}" ProjectSection(ProjectDependencies) = postProject - {4472E39D-700B-4D1A-81C3-8877B29021A7} = {4472E39D-700B-4D1A-81C3-8877B29021A7} - {4ECE9B47-4C73-4018-80B8-2F457EBEAC70} = {4ECE9B47-4C73-4018-80B8-2F457EBEAC70} + {381FBD75-3612-47CA-B1B1-1FCB5E903C06} = {381FBD75-3612-47CA-B1B1-1FCB5E903C06} + {9E648005-F572-4050-8779-48D7BB490CA0} = {9E648005-F572-4050-8779-48D7BB490CA0} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "win_ulib", "win_ulib.vcproj", "{4472E39D-700B-4D1A-81C3-8877B29021A7}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "win_ulib", "win_ulib.vcproj", "{381FBD75-3612-47CA-B1B1-1FCB5E903C06}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GetMap", "GetMap.vcproj", "{C31230EC-9CA7-4126-AB63-7244BC70E642}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GetMap", "GetMap.vcproj", "{2E75C951-86BD-4E2D-BEB2-0D716EE9B103}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -22,22 +22,22 @@ Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {4ECE9B47-4C73-4018-80B8-2F457EBEAC70}.Debug|Win32.ActiveCfg = Debug|Win32 - {4ECE9B47-4C73-4018-80B8-2F457EBEAC70}.Debug|Win32.Build.0 = Debug|Win32 - {4ECE9B47-4C73-4018-80B8-2F457EBEAC70}.Release|Win32.ActiveCfg = Release|Win32 - {4ECE9B47-4C73-4018-80B8-2F457EBEAC70}.Release|Win32.Build.0 = Release|Win32 - {0FE9A694-A9AD-4ACC-9040-054E8EE7F737}.Debug|Win32.ActiveCfg = Debug|Win32 - {0FE9A694-A9AD-4ACC-9040-054E8EE7F737}.Debug|Win32.Build.0 = Debug|Win32 - {0FE9A694-A9AD-4ACC-9040-054E8EE7F737}.Release|Win32.ActiveCfg = Release|Win32 - {0FE9A694-A9AD-4ACC-9040-054E8EE7F737}.Release|Win32.Build.0 = Release|Win32 - {4472E39D-700B-4D1A-81C3-8877B29021A7}.Debug|Win32.ActiveCfg = Debug|Win32 - {4472E39D-700B-4D1A-81C3-8877B29021A7}.Debug|Win32.Build.0 = Debug|Win32 - {4472E39D-700B-4D1A-81C3-8877B29021A7}.Release|Win32.ActiveCfg = Release|Win32 - {4472E39D-700B-4D1A-81C3-8877B29021A7}.Release|Win32.Build.0 = Release|Win32 - {C31230EC-9CA7-4126-AB63-7244BC70E642}.Debug|Win32.ActiveCfg = Debug|Win32 - {C31230EC-9CA7-4126-AB63-7244BC70E642}.Debug|Win32.Build.0 = Debug|Win32 - {C31230EC-9CA7-4126-AB63-7244BC70E642}.Release|Win32.ActiveCfg = Release|Win32 - {C31230EC-9CA7-4126-AB63-7244BC70E642}.Release|Win32.Build.0 = Release|Win32 + {9E648005-F572-4050-8779-48D7BB490CA0}.Debug|Win32.ActiveCfg = Debug|Win32 + {9E648005-F572-4050-8779-48D7BB490CA0}.Debug|Win32.Build.0 = Debug|Win32 + {9E648005-F572-4050-8779-48D7BB490CA0}.Release|Win32.ActiveCfg = Release|Win32 + {9E648005-F572-4050-8779-48D7BB490CA0}.Release|Win32.Build.0 = Release|Win32 + {A76BCCC0-16D3-4718-9A63-CE77724E8A9C}.Debug|Win32.ActiveCfg = Debug|Win32 + {A76BCCC0-16D3-4718-9A63-CE77724E8A9C}.Debug|Win32.Build.0 = Debug|Win32 + {A76BCCC0-16D3-4718-9A63-CE77724E8A9C}.Release|Win32.ActiveCfg = Release|Win32 + {A76BCCC0-16D3-4718-9A63-CE77724E8A9C}.Release|Win32.Build.0 = Release|Win32 + {381FBD75-3612-47CA-B1B1-1FCB5E903C06}.Debug|Win32.ActiveCfg = Debug|Win32 + {381FBD75-3612-47CA-B1B1-1FCB5E903C06}.Debug|Win32.Build.0 = Debug|Win32 + {381FBD75-3612-47CA-B1B1-1FCB5E903C06}.Release|Win32.ActiveCfg = Release|Win32 + {381FBD75-3612-47CA-B1B1-1FCB5E903C06}.Release|Win32.Build.0 = Release|Win32 + {2E75C951-86BD-4E2D-BEB2-0D716EE9B103}.Debug|Win32.ActiveCfg = Debug|Win32 + {2E75C951-86BD-4E2D-BEB2-0D716EE9B103}.Debug|Win32.Build.0 = Debug|Win32 + {2E75C951-86BD-4E2D-BEB2-0D716EE9B103}.Release|Win32.ActiveCfg = Release|Win32 + {2E75C951-86BD-4E2D-BEB2-0D716EE9B103}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff -ur C:\FGCVS\Atlas\projects\msvc\Atlas.vcproj Atlas-0.4.9\projects\msvc\Atlas.vcproj --- C:\FGCVS\Atlas\projects\msvc\Atlas.vcproj Tue May 11 19:05:06 2010 +++ Atlas-0.4.9\projects\msvc\Atlas.vcproj Tue Oct 04 14:14:25 2011 @@ -1,10 +1,9 @@ + @@ -134,15 +134,15 @@ + @@ -667,6 +668,28 @@ + + + + + + + + + + +#include #ifndef VERSION -#define VERSION "0.4.8-MSVC9-WIN32" +#define VERSION "0.4.9-MSVC8-WIN32" #endif #endif // #ifndef _win32_config_h_ diff -ur C:\FGCVS\Atlas\projects\msvc\dosetup.bat Atlas-0.4.9\projects\msvc\dosetup.bat --- C:\FGCVS\Atlas\projects\msvc\dosetup.bat Tue May 11 19:05:06 2010 +++ Atlas-0.4.9\projects\msvc\dosetup.bat Sun Oct 09 13:51:45 2011 @@ -32,6 +32,20 @@ @echo Set TEMPPNG=1 in the environment to ouptut PNG files, instead of def jpg... :DNPNG +@REM Check RENDER TO WINDOW OPTION +@if "%TEMPRTW%x" == "x" ( +@echo Set TEMPRTW=1 in the environment to render to window, instead of def to frame buffer... +) else ( +@echo Found TEMPRTW in the environment thus will render to window... +) + +@REM Check scaling factor +@if "%TEMPAA%x" == "x" ( +@echo Set TEMPAA=1 in the environment to set the scaling factor to 1 +) else ( +@echo Found TEMPAA=%TEMPAA%. Will add --aafactor=%TEMPAA% to command +) + @echo Setup/check a '%TEMPAT%' directory... with data... @if EXIST %TEMPAT%\. goto DNAT @echo Creating %TEMPAT% directory... diff -ur C:\FGCVS\Atlas\projects\msvc\GetMap.dsp Atlas-0.4.9\projects\msvc\GetMap.dsp --- C:\FGCVS\Atlas\projects\msvc\GetMap.dsp Tue May 11 19:05:06 2010 +++ Atlas-0.4.9\projects\msvc\GetMap.dsp Tue Oct 04 14:01:28 2011 @@ -42,7 +42,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir "." # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "." /I ".\winsrc" /I "..\3rdparty\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_DEPRECATE" /D "HAVE_CONFIG_H" /D "NOMINMAX" /D "ATLAS_JPEG" /D "FREEGLUT_STATIC" /D "GLEW_STATIC" /D "CURL_STATICLIB" /FD /c +# ADD CPP /nologo /MT /W3 /GR /GX /O2 /I "." /I ".\winsrc" /I "..\3rdparty\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_DEPRECATE" /D "HAVE_CONFIG_H" /D "NOMINMAX" /D "ATLAS_JPEG" /D "FREEGLUT_STATIC" /D "GLEW_STATIC" /D "CURL_STATICLIB" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG" @@ -67,7 +67,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir "." # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "." /I ".\winsrc" /I "..\3rdparty\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_DEPRECATE" /D "HAVE_CONFIG_H" /D "NOMINMAX" /D "ATLAS_JPEG" /D "FREEGLUT_STATIC" /D "GLEW_STATIC" /D "CURL_STATICLIB" /FD /c +# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /ZI /Od /I "." /I ".\winsrc" /I "..\3rdparty\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_DEPRECATE" /D "HAVE_CONFIG_H" /D "NOMINMAX" /D "ATLAS_JPEG" /D "FREEGLUT_STATIC" /D "GLEW_STATIC" /D "CURL_STATICLIB" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG" diff -ur C:\FGCVS\Atlas\projects\msvc\GetMap.vcproj Atlas-0.4.9\projects\msvc\GetMap.vcproj --- C:\FGCVS\Atlas\projects\msvc\GetMap.vcproj Tue May 11 19:05:06 2010 +++ Atlas-0.4.9\projects\msvc\GetMap.vcproj Tue Oct 04 14:14:25 2011 @@ -1,10 +1,9 @@ + @@ -137,12 +137,12 @@ AdditionalIncludeDirectories=".,.\winsrc,..\3rdparty\include" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_CONFIG_H;NOMINMAX;ATLAS_JPEG;FREEGLUT_STATIC;GLEW_STATIC;CURL_STATICLIB" MinimalRebuild="true" - RuntimeLibrary="3" + RuntimeLibrary="1" RuntimeTypeInfo="true" PrecompiledHeaderFile=".\Debug\GetMap/GetMap.pch" AssemblerListingLocation=".\Debug\GetMap/" ObjectFile=".\Debug\GetMap/" - ProgramDataBaseFileName=".\bin\GetMapD.pdb" + ProgramDataBaseFileName=".\Debug\GetMap/" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="4" @@ -168,8 +168,6 @@ GenerateDebugInformation="true" ProgramDatabaseFile=".\Debug\GetMap/GetMapD.pdb" SubSystem="1" - RandomizedBaseAddress="1" - DataExecutionPrevention="0" TargetMachine="1" /> + %TEMPP% @cd %TEMPR% @if NOT EXIST ..\..\..\%TEMPP% goto FAILED +@if EXIST C:\MDOS\dirmin.bat ( +@call dirmin ..\..\..\%TEMPP% +) else ( @dir ..\..\..\%TEMPP% -@echo Done ..\..\..\%TEMPP%... Review... +) +@echo Done ..\..\..\%TEMPP%... Review not exists... +@call fa4 "Only in" ..\..\..\%TEMPP% +@echo Review file... @call np ..\..\..\%TEMPP% @goto END @@ -45,6 +67,13 @@ @echo ERROR: Can NOT locate self on ..\..\..\%TEMPR%\makediff.bat! @echo NOT IN CORRECT LOCATION, of root [%TEMPA%] has changed... @goto END + +:NOVERS +@echo. +@echo Appears my setvers.bat is missing... it sets TEMPV in the environment... +@echo. +@goto END + :END diff -ur C:\FGCVS\Atlas\projects\msvc\Map.dsp Atlas-0.4.9\projects\msvc\Map.dsp --- C:\FGCVS\Atlas\projects\msvc\Map.dsp Tue May 11 19:05:06 2010 +++ Atlas-0.4.9\projects\msvc\Map.dsp Tue Oct 04 14:01:28 2011 @@ -42,7 +42,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir "." # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "." /I ".\winsrc" /I "..\3rdparty\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_DEPRECATE" /D "HAVE_CONFIG_H" /D "NOMINMAX" /D "ATLAS_JPEG" /D "FREEGLUT_STATIC" /D "GLEW_STATIC" /D "ATLAS_MAP" /FD /c +# ADD CPP /nologo /MT /W3 /GR /GX /O2 /I "." /I ".\winsrc" /I "..\3rdparty\include" /I "C:\Projects\OSG\OSG-3.0.1\include" /I "C:\FGCVS\boost-trunk" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_DEPRECATE" /D "HAVE_CONFIG_H" /D "NOMINMAX" /D "ATLAS_JPEG" /D "FREEGLUT_STATIC" /D "GLEW_STATIC" /D "ATLAS_MAP" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG" @@ -51,7 +51,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib ws2_32.lib freeglut_static.lib sg.lib fnt.lib ul.lib SimGear.lib jpeg32.lib libpng.lib zlib.lib /libpath:"..\3rdparty\lib" /nologo /subsystem:console /machine:I386 /out:.\bin\Map.exe +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib ws2_32.lib freeglut_static.lib sg.lib fnt.lib ul.lib jpeg32.lib libpng.lib zlib.lib libsgmagvar_a.lib libsgtiming_a.lib libsgmisc_a.lib libsgio_a.lib libsgdebug_a.lib libsgbucket_a.lib libsgstructure_a.lib libsgmath_a.lib /libpath:"..\3rdparty\lib" /nologo /subsystem:console /machine:I386 /out:.\bin\Map.exe !ELSEIF "$(CFG)" == "Map - Win32 Debug" @@ -67,7 +67,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir "." # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "." /I ".\winsrc" /I "..\3rdparty\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_DEPRECATE" /D "HAVE_CONFIG_H" /D "NOMINMAX" /D "ATLAS_JPEG" /D "FREEGLUT_STATIC" /D "GLEW_STATIC" /D "ATLAS_MAP" /FD /c +# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /ZI /Od /I "." /I ".\winsrc" /I "..\3rdparty\include" /I "C:\Projects\OSG\OSG-3.0.1\include" /I "C:\FGCVS\boost-trunk" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_DEPRECATE" /D "HAVE_CONFIG_H" /D "NOMINMAX" /D "ATLAS_JPEG" /D "FREEGLUT_STATIC" /D "GLEW_STATIC" /D "ATLAS_MAP" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG" @@ -76,7 +76,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib ws2_32.lib freeglut_staticd.lib sg_d.lib fnt_d.lib ul_d.lib SimGeard.lib jpeg32d.lib libpngd.lib zlibd.lib /libpath:"..\3rdparty\lib" /nologo /subsystem:console /debug /machine:I386 /out:.\bin\MapD.exe +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib ws2_32.lib freeglut_staticd.lib sg_d.lib fnt_d.lib ul_d.lib jpeg32d.lib libpngd.lib zlibd.lib libsgmagvar_aD.lib libsgtiming_aD.lib libsgmisc_aD.lib libsgio_aD.lib libsgdebug_aD.lib libsgbucket_aD.lib libsgstructure_aD.lib libsgmath_aD.lib /libpath:"..\3rdparty\lib" /nologo /subsystem:console /debug /machine:I386 /out:.\bin\MapD.exe !ENDIF diff -ur C:\FGCVS\Atlas\projects\msvc\Map.vcproj Atlas-0.4.9\projects\msvc\Map.vcproj --- C:\FGCVS\Atlas\projects\msvc\Map.vcproj Tue May 11 19:05:06 2010 +++ Atlas-0.4.9\projects\msvc\Map.vcproj Tue Oct 04 14:14:25 2011 @@ -1,10 +1,9 @@ + @@ -134,15 +134,15 @@ + , and the class sg_ext_funcs +adjusted accordingly. The requierd GL headers are supplied in +the ..\3rdparty\include\GL folder, so much of the following is +no longer applicable, and in this release the default remains +to render off screen. + Although windows comes with installed, together with the supporting DLLS, OPENGL32.DLL, and GLU32.DLL, the 'extended' functions are NOT exposed through the 'export' header, but @@ -131,5 +139,8 @@ --verbose --fg-root=C:\FG\33\data --fg-scenery=C:\FG\33\data\Scenery --atlas=temp1 --palette=temp1\Palettes\default.ap Also adding --no-lighting|--lighting (def), --render-offscreen|--render-to-window (win32 def) -# EOF - REDME.map.txt +MAP: +--version +--verbose --fg-root=C:\FG\29\data --fg-scenery=C:\FG\29\data\Scenery --atlas=temp --palette=temp\Palettes\default.ap +# EOF - README.map.txt diff -ur C:\FGCVS\Atlas\projects\msvc\README.msvc.txt Atlas-0.4.9\projects\msvc\README.msvc.txt --- C:\FGCVS\Atlas\projects\msvc\README.msvc.txt Tue May 11 19:05:06 2010 +++ Atlas-0.4.9\projects\msvc\README.msvc.txt Tue Oct 04 14:37:08 2011 @@ -1,21 +1,25 @@ -# README.msvc.txt - 2010-04-24 - v0.4.6 +# README.msvc.txt - 2011-10-02 - v0.4.9 +# Commenced 2010-04-24 - v0.4.6 Atlas - http://atlas.sourceforge.net/ -Compiling Atlas Source in native Windows, using MSVC9 Express (2008). +Compiling Atlas Source in native Windows, using MSVC8 Express (2005). All projects, Atlas, Map, and win_util.lib are compiled using the -Multi-threads (DLL) runtime, /MD (& /MDd), as are ALL the dependants. +Multi-threads runtime, /MT (& /MTd), as are ALL the dependants. Getting this wrong causes lots of hassles. There is a general, hand crafted project/msvc/config.h file, where you can adjust the version, and perhaps the default -location of the FlightGear data, set as C:\FG\32\data in +location of the FlightGear data, set as C:\FG\29\data in my case. See FGBASE_DIR, but this can be over-ridden on the command line, so is not so important. There are also some options macros in that file to explore. +Note the need to adjust the OpenSceneGraph (OSG), and Boost paths +below. These must be adjusted in the MSVC IDE BEFORE doing a build. + ========================================================================== Directory Arrangement: @@ -26,10 +30,17 @@ In this build, _ALL_ the dependant includes and libraries are included in the [projects\3rdparty] folder. No other sources are required if these headers and libraries -are used. +are used, except as noed below for OSG and Boost. +Build Set: Atlas.sln (Atlas.vcproj, Map.vcproj, GetMap.vcproj win_ulib.vcproj) Build Set: Atlas.dsw (Atlas.dsp, Map.dsp, GetMap.dsp win_ulib.dsp) +NOTE WELL: TWO DEPENDENCY PATHS MUST BE ADJUSTED IN EITHER BUILD SET +******************************************************************** +For OSG: Uses: C:\Projects\OSG\OSG-3.0.1\include +For Boost: Uses: C:\FGCVS\boost-trunk +In both cases, only the HEADER includes are required. No libraries needed. + But if you wish to download, and build all the dependencies yourself, then read on, else skip to Compiling: @@ -48,10 +59,7 @@ although some are compiled in my C:\Projects folder, such as :- C:\Projects\jpeg-8a - \glew-1.5.3 (optional) - -Build Set: In Atlas-ext.zip - Atlas-ext.dsw - -(Atlas-ext.dsp, Map-ext.dsp, GetMap-ext.dsp) + \glew-1.7.0 (no longer optional) Naturally, any difference in the Directory Structure must be adjusted in the MSVC IDE Property Pages. @@ -67,11 +75,13 @@ FlightGear - binary, and at least the base 'data' site: http://www.flightgear.org/ -I used the CVS version, but there are release versions available. +I used a recent git version, but there are release versions available. Simgear - Simulator Construction Tools site: http://www.simgear.org/ -I used the CVS version, downloaded, and compiled as part of FlightGear +I used a recent git version, downloaded, and compiled as part of FlightGear, +BUT it is highly recommended that you use a RELEASE version, last was 2.4 +for linking with Atlas/Map. PLIB - STEVE'S PORTABLE GAME LIBRARY site: http://plib.sourceforge.net/index.html @@ -89,7 +99,7 @@ OpenSceneGraph - open source high performance 3D graphics toolkit site: http://www.openscenegraph.org/projects/osg -I used a relatively recent SVN version, compiled as part of FlightGear +I used a relatively recent reelease 3.0.1 SVN version, compiled as part of FlightGear libpng - Portable Network Graphics site: http://www.libpng.org/ @@ -110,31 +120,14 @@ OpenGL Extensions ----------------- -I added some switches to be able to compile it without these -extensions. Then maps are all generated in a window, instead of in a frame -buffer. Maybe a little slower, but just as effective. - -Alternatives are: -(a) GLew - The OpenGL Extension Wrangler Library +GLew - The OpenGL Extension Wrangler Library site: http://glew.sourceforge.net/ -Download, unzip, and compile: 04/16/2010 13:25 642,576 glew-1.5.3.zip, or later... +Download, unzip, and compile: glew-1.7.0.zip, or later... Then include , using a GLEW_STATIC macro, and link with glew32s.lib... -So I used this 'static' library, rather than the DLL approach of (b). +So I used this 'static' library, rather than the DLL approach. -(a) OpenLibraries - key building blocks ... to build rich media applications -site: http://sourceforge.net/projects/openlibraries/ -Download and install: 04/16/2010 12:49 6,214,295 openlibraries-0.4.0-sdk.exe, or later... -This adds two environment variable, like :- -OPENLIBRARIES_INCLUDE_PATH=C:\Program Files\OpenLibraries\include\openlibraries-0.4.0 -OPENLIBRARIES_LIB_PATH=C:\Program Files\OpenLibraries\lib -Could not find the *.lib to link with... so gave up on this... - -There may be other GL extension options, and perhaps some later windows systems -have these extensions already installed. Look for a head . If this -is present in your system, then there is a good chance there are also DLLS -to provided these extension. - -See [projects/msvc/config.h] for some option macros to control this. +See [projects/msvc/config.h] for some option macros to control this, but +now the dependency on GLEW is in the base repo, so can NOT be turned off. ========================================================================== @@ -149,7 +142,7 @@ to avoid MSVC questions. Aternatively there are 'solution' files, Atlas.sln, specifically -for MSVC9 (2008). +for MSVC8 (2005). Loading one of these build file sets into your MSVC, and build. @@ -157,15 +150,22 @@ other than projects\3rdparty\include, and projects\3rdparty\lib, used in this build file set, then these will need to be adjusted. +As mentioned else where it is almost certain you will have to adjust the +include paths for OpenSceneGrap (OSG), and Boost in the MSVC IDE +before commencing a build. + The Property Pages -> C/C++ -> General -> Additional Include Directories (AID) _MUST_ be set right. Likewise for the Linker -> General -> Additional Library Directories (ALD) must match the library list in -> Input -> Additional Dependencies (AD)! And these can vary between Debug and Release builds. +Especially see specific notes above about the path the OSG and Boost +include files. No libraries of these are needed for Atlas/Map. + And REMEMBER to _ALWAYS_ carefully check the RUNTIME being used, both for Atlas, Map, and _ALL_ the dependant components. I chose -Multi-threads (DLL) runtime, /MD, and /MDd for Debug. As stated, +Multi-threads (static) runtime, /MT, and /MTd for Debug. As stated, using inconsistent runtimes causes lots of PAIN ;=(). ========================================================================== @@ -193,7 +193,9 @@ --atlas=C:\FG\32\data\Atlas --palette=C:\FG\32\data\Atlas\Palettes\default.ap \ --fg-scenery=C:\FG\32\data\scenery -This source includes a runmap.bat batch file, to give it a try. +This source includes a runmap.bat batch file, to give it a try. If you use +an output directory of 'temp', there is also a viewtemp.htm to view the +generated map files in your default browser. 2: Atlas: Usually some setup of needed data must be done, in addition to the above map generation, before Atlas is run. @@ -210,11 +212,15 @@ progress, to give it a try after you have generated the maps. I maintain a site specifically on building FlightGear, and related -projects - see : http://geoffair.org/fg/ +projects - see : http://geoffair.org/fg/atlas-07.htm, and others... Have fun ;=)) Geoff. +2011-10-04 2010-04-24 + +ATLAS Debug test string: +--fg-scenery=C:\FG\29\data\Scenery --atlas=temp --palette=default.ap # EOF - README.msvc.txt diff -ur C:\FGCVS\Atlas\projects\msvc\README.win_ulib.txt Atlas-0.4.9\projects\msvc\README.win_ulib.txt --- C:\FGCVS\Atlas\projects\msvc\README.win_ulib.txt Tue May 11 19:05:06 2010 +++ Atlas-0.4.9\projects\msvc\README.win_ulib.txt Sun Oct 02 13:48:47 2011 @@ -3,4 +3,3 @@ win_ulib,lib is a static library, providing a number of 'functions' missing in standard WIN32. - diff -ur C:\FGCVS\Atlas\projects\msvc\rungetmap.bat Atlas-0.4.9\projects\msvc\rungetmap.bat --- C:\FGCVS\Atlas\projects\msvc\rungetmap.bat Tue May 11 19:05:06 2010 +++ Atlas-0.4.9\projects\msvc\rungetmap.bat Tue Oct 04 19:36:27 2011 @@ -3,6 +3,9 @@ @REM NOTE THE ESCAPE CHAR, '^', BEFORE EACH '&', TO ENSURE IT REMAINS!!! @REM =================================================================== @set TEMPBASE=http://wms.jpl.nasa.gov/cgi-bin/wms.cgi?LAYERS=modis,global_mosaic^&styles=default,visual^& +@REM TEMPBASE=http://schemas.opengis.net/wms/1.3.0?LAYERS=modis,global_mosaic^&styles=default,visual^& +@REM TEMPBASE=http://wms.opengis.net?LAYERS=modis,global_mosaic^&styles=default,visual^& +@set TEMPWORLD=http://viz.globe.gov/viz-bin/wmt.cgi?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=COASTLINES,RATMAX&STYLES=,&BBOX=-180,-90,180,90&SRS=EPSG:4326&FORMAT=image/gif&HEIGHT=300&WIDTH=600 @set TEMPEXE=bin\GetMap.exe @if NOT EXIST %TEMPEXE% goto ERR1 @if "%1x" == "x" goto HELP diff -ur C:\FGCVS\Atlas\projects\msvc\runmap.bat Atlas-0.4.9\projects\msvc\runmap.bat --- C:\FGCVS\Atlas\projects\msvc\runmap.bat Tue May 11 19:05:06 2010 +++ Atlas-0.4.9\projects\msvc\runmap.bat Tue Oct 04 12:31:27 2011 @@ -38,11 +38,6 @@ @type %TEMPROOT%\version @echo Above is version of FG data... -%TEMPXM% --version >%TEMPTXT% - -@REM Run map EXE... -%TEMPXM% %TEMPMCMD% - @set TEMPI1=w123n37.jpg @set TEMPI2=w122n37.jpg @if "%TEMPPNG%x" == "x" goto DNIPNG @@ -50,8 +45,17 @@ @set TEMPI2=w122n37.png :DNIPNG -@echo Run Date: %DATE% %TIME% >>%TEMPTXT% +@REM %TEMPXM% --version >%TEMPTXT% +@echo Run Date: %DATE% %TIME% >%TEMPTXT% + +@REM Run map EXE... @echo Run CMD : %TEMPXM% %TEMPMCMD% >>%TEMPTXT% +@echo Run CMD : %TEMPXM% %TEMPMCMD% +%TEMPXM% %TEMPMCMD% +@if ERRORLEVEL 1 ( +@echo Map exit with ERRORLEVEL %ERRORLEVEL% +@echo Map exit with ERRORLEVEL %ERRORLEVEL% >>%TEMPTXT% +) @type %TEMPTXT% @if NOT EXIST %TEMPAT%\10\%TEMPI1% goto NOVIEW Only in Atlas-0.4.9\projects\msvc: setvers.bat Only in Atlas-0.4.9\projects\msvc: viewtemp.htm Only in Atlas-0.4.9\projects\msvc: viewtemp2.htm diff -ur C:\FGCVS\Atlas\projects\msvc\win_ulib.dsp Atlas-0.4.9\projects\msvc\win_ulib.dsp --- C:\FGCVS\Atlas\projects\msvc\win_ulib.dsp Tue May 11 19:05:06 2010 +++ Atlas-0.4.9\projects\msvc\win_ulib.dsp Tue Oct 04 14:01:28 2011 @@ -41,8 +41,8 @@ # PROP Intermediate_Dir "Release\win_ulib" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /W3 /GR /GX /O2 /MD /I "." /I ".\winsrc" /I "..\3rdparty\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "WIN32" /D "NDEBUG" /D "_LIB" /D "HAVE_CONFIG_H" /D "FREEGLUT_STATIC" /D "ATLAS_JPEG" /FD /c -# SUBTRACT CPP /YX +# ADD CPP /nologo /W3 /GR /GX /O2 /MT /I "." /I ".\winsrc" /I "..\3rdparty\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "WIN32" /D "NDEBUG" /D "_LIB" /D "HAVE_CONFIG_H" /D "FREEGLUT_STATIC" /D "ATLAS_JPEG" /FD /c +# SUBTRACT CPP /YX /Yc /Yu # ADD BASE RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG" BSC32=bscmake.exe @@ -65,8 +65,8 @@ # PROP Intermediate_Dir "Debug\win_ulib" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /MDd /I "." /I ".\winsrc" /I "..\3rdparty\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "WIN32" /D "_DEBUG" /D "_LIB" /D "HAVE_CONFIG_H" /D "FREEGLUT_STATIC" /D "ATLAS_JPEG" /FD /GZ /c -# SUBTRACT CPP /YX +# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /MTd /I "." /I ".\winsrc" /I "..\3rdparty\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "WIN32" /D "_DEBUG" /D "_LIB" /D "HAVE_CONFIG_H" /D "FREEGLUT_STATIC" /D "ATLAS_JPEG" /FD /GZ /c +# SUBTRACT CPP /YX /Yc /Yu # ADD BASE RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG" BSC32=bscmake.exe @@ -95,11 +95,11 @@ # End Source File # Begin Source File -SOURCE=.\winsrc\strsep.cxx +SOURCE=.\winsrc\sg_ext_funcs.cxx # End Source File # Begin Source File -SOURCE=.\winsrc\sg_ext_funcs.cxx +SOURCE=.\winsrc\strsep.cxx # End Source File # Begin Source File @@ -123,11 +123,11 @@ # End Source File # Begin Source File -SOURCE=.\winsrc\strsep.h +SOURCE=.\winsrc\sg_ext_funcs.hxx # End Source File # Begin Source File -SOURCE=.\winsrc\sg_ext_funcs.hxx +SOURCE=.\winsrc\strsep.h # End Source File # Begin Source File diff -ur C:\FGCVS\Atlas\projects\msvc\win_ulib.vcproj Atlas-0.4.9\projects\msvc\win_ulib.vcproj --- C:\FGCVS\Atlas\projects\msvc\win_ulib.vcproj Tue May 11 19:05:06 2010 +++ Atlas-0.4.9\projects\msvc\win_ulib.vcproj Tue Oct 04 14:14:25 2011 @@ -1,10 +1,9 @@ +#endif #include #include @@ -94,8 +97,38 @@ // void glGenerateMipmapProc pglGenerateMipmap = NULL; // (GLenum target) +#ifdef __GLEW_H__ + + pglGenFramebuffers = glGenFramebuffers; + pglBindFramebuffer = glBindRenderbufferEXT; + // glGenRenderbuffersEXT(1, &rbo); + pglGenRenderbuffers = glGenRenderbuffersEXT; // (GLsizei n, GLuint* renderbuffers) + // glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, rbo); + pglBindRenderbuffer = glBindRenderbufferEXT; // (GLenum target, GLuint renderbuffer) + // glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGB, textureSize, textureSize); + pglRenderbufferStorage = glRenderbufferStorageEXT; //(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) + // glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_RENDERBUFFER_EXT, rbo); + pglFramebufferRenderbuffer = glFramebufferRenderbufferEXT; // (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) (Map) + // glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT) == GL_FRAMEBUFFER_COMPLETE_EXT); + pglCheckFramebufferStatus = glCheckFramebufferStatusEXT; // (GLenum target) + // glDeleteRenderbuffersEXT(1, &rbo); + pglDeleteRenderbuffers = glDeleteRenderbuffersEXT; // (GLsizei n, const GLuint* renderbuffers) + // glDeleteFramebuffersEXT(1, &fbo); + pglDeleteFramebuffers = glDeleteFramebuffersEXT; // (GLsizei n, const GLuint* framebuffers) + + if ( pglGenFramebuffers && pglBindFramebuffer && + pglGenRenderbuffers && pglBindRenderbuffer && + pglRenderbufferStorage && pglFramebufferRenderbuffer && + pglCheckFramebufferStatus && + pglDeleteRenderbuffers && pglDeleteFramebuffers ) + { + IsValid = true; + } +#else // !#ifdef __GLEW_H__ + if (SGIsOpenGLExtensionSupported("GL_EXT_framebuffer_object")) { + // Used by Map // glGenFramebuffersEXT(1, &fbo); pglGenFramebuffers = (glGenFramebuffersProc)SGLookupFunction("glGenFramebuffersEXT"); // (GLsizei n, GLuint* framebuffers) @@ -115,7 +148,6 @@ pglDeleteRenderbuffers = (glDeleteRenderbuffersProc)SGLookupFunction("glDeleteRenderbuffersEXT"); // (GLsizei n, const GLuint* renderbuffers) // glDeleteFramebuffersEXT(1, &fbo); pglDeleteFramebuffers = (glDeleteFramebuffersProc)SGLookupFunction("glDeleteFramebuffersEXT"); // (GLsizei n, const GLuint* framebuffers) - if ( pglGenFramebuffers && pglBindFramebuffer && pglGenRenderbuffers && pglBindRenderbuffer && pglRenderbufferStorage && pglFramebufferRenderbuffer && @@ -125,6 +157,8 @@ IsValid = true; } } +#endif // #ifdef __GLEW_H__ y/n + } // eof - sg_ext_funcs.cxx diff -ur C:\FGCVS\Atlas\projects\msvc\winsrc\sg_ext_funcs.hxx Atlas-0.4.9\projects\msvc\winsrc\sg_ext_funcs.hxx --- C:\FGCVS\Atlas\projects\msvc\winsrc\sg_ext_funcs.hxx Tue May 11 19:05:06 2010 +++ Atlas-0.4.9\projects\msvc\winsrc\sg_ext_funcs.hxx Sat Oct 01 14:18:11 2011 @@ -10,6 +10,39 @@ void init_sg_ext_funcs(void); +#ifdef __GLEW_H__ + // GLboolean + PFNGLISRENDERBUFFERPROC pglIsRenderbuffer; // (GLuint renderbuffer) + // void + PFNGLBINDRENDERBUFFERPROC pglBindRenderbuffer; // (GLenum target, GLuint renderbuffer) (Map) + // void + PFNGLDELETERENDERBUFFERSPROC pglDeleteRenderbuffers; // (GLsizei n, const GLuint* renderbuffers) (Map) + // void + PFNGLGENRENDERBUFFERSPROC pglGenRenderbuffers; // (GLsizei n, GLuint* renderbuffers) (Map) + // void + PFNGLRENDERBUFFERSTORAGEPROC pglRenderbufferStorage; //(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) (Map) + // void + PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC pglGetRenderbufferParameteriv; // (GLenum target, GLenum pname, GLint* params) + // GLboolean + PFNGLISFRAMEBUFFERPROC pglIsFramebuffer; // (GLuint framebuffer) + // void + PFNGLBINDFRAMEBUFFERPROC pglBindFramebuffer; // (GLenum target, GLuint framebuffer) (Map) + // void + PFNGLDELETEFRAMEBUFFERSPROC pglDeleteFramebuffers; // (GLsizei n, const GLuint* framebuffers) (Map) + // void + PFNGLGENFRAMEBUFFERSPROC pglGenFramebuffers; // (GLsizei n, GLuint* framebuffers) (Map) + // GLenum + PFNGLCHECKFRAMEBUFFERSTATUSPROC pglCheckFramebufferStatus; // (GLenum target) (Map) + // void + PFNGLFRAMEBUFFERRENDERBUFFERPROC pglFramebufferRenderbuffer; // (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) (Map) + // void + PFNGLFRAMEBUFFERTEXTURE2DPROC pglFramebufferTexture2D; // (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) + // void + PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC pglGetFramebufferAttachmentParameteriv; // (GLenum target, GLenum attachment, GLenum pname, GLint* params) + // void + PFNGLGENERATEMIPMAPPROC pglGenerateMipmap; // (GLenum target) + +#else // GLboolean glIsRenderbufferProc pglIsRenderbuffer; // (GLuint renderbuffer) // void @@ -40,6 +73,7 @@ glGetFramebufferAttachmentParameterivProc pglGetFramebufferAttachmentParameteriv; // (GLenum target, GLenum attachment, GLenum pname, GLint* params) // void glGenerateMipmapProc pglGenerateMipmap; // (GLenum target) +#endif // #define __GLEW_H__ y/n bool IsValid; }; diff -ur C:\FGCVS\Atlas\projects\msvc\winsrc\win_utils.cxx Atlas-0.4.9\projects\msvc\winsrc\win_utils.cxx --- C:\FGCVS\Atlas\projects\msvc\winsrc\win_utils.cxx Tue May 11 19:05:06 2010 +++ Atlas-0.4.9\projects\msvc\winsrc\win_utils.cxx Sun Oct 09 13:00:15 2011 @@ -3,7 +3,7 @@ Written by Geoff R. McLane, started January 2008. - Copyright (C) 2008-2010 Geoff R. McLane + Copyright (C) 2008-2011 Geoff R. McLane This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -81,7 +81,7 @@ #pragma comment(lib, "User32.lib") #ifndef BUFSIZE -#define BUFSIZE 256 +#define BUFSIZE 1024 // was a mean 256! #endif typedef void (WINAPI *PGNSI)(LPSYSTEM_INFO); @@ -423,21 +423,51 @@ void print_version_details(void) { SYSTEMTIME st; - char _tmp_buf[BUFSIZE]; - char * cp = _tmp_buf; + char * cp = (char *)malloc(BUFSIZE); char * env; char * cfg; + std::string file; #ifdef NDEBUG cfg = "Release"; #else cfg = "Debug"; #endif - - printf("Default base dir : [%s]\n", FGBASE_DIR ); -#if defined(USE_GLEW_153) // just an experiment with GLEW library - in Map.cxx - printf("Using GLEW 1.5.3 library for GL extension functions.\n"); + file = FGBASE_DIR; + env = (char *) "*** NOT VALID***"; + if (is_valid_path(file)) { + file += "/version"; + if (is_valid_path(file)) { + env = (char *)"VALID"; + if (cp) { + set_win_path_sep(file); + FILE *fp = fopen(file.c_str(),"r"); + if (fp) { + int len = fread(cp,1,BUFSIZE-1,fp); + if (len && (len < 32)) { + cp[len] = 0; + while (len) { + len--; + if (cp[len] > ' ') + break; + cp[len] = 0; + } + if (len) { + file = cp; + sprintf(cp, "Version %s", file.c_str()); + env = cp; + } + } + fclose(fp); + } + } + } + } + printf("Default base dir : [%s] %s\n", FGBASE_DIR, env ); +#if defined(USE_GLEW_LIB) // just an experiment with GLEW library - in Map.cxx + printf("Using GLEW %d.%d.%d library for GL extension functions.\n", + GLEW_VERSION_MAJOR, GLEW_VERSION_MINOR, GLEW_VERSION_MICRO ); #else - printf("NOT using GLEW 1.5.3 library for GL extension functions.\n"); + printf("NOT using GLEW library for GL extension functions.\n"); #endif printf("Zlib version : %s\n", zlibVersion()); printf("PNG version : %s", PNG_HEADER_VERSION_STRING); // png_get_header_version()); @@ -445,45 +475,78 @@ printf("Compiler : [%s] Config: %s\n", SG_COMPILER_STR, cfg); printf("Compile Date : %s at %s\n", c_date, c_time); - if (GetOSDisplayString(cp)) - printf("OS version : %s\n",cp); - else if (GetSystemVersion(cp)) - printf("os version : %s\n",cp); - - if (get_processor_stg(cp)) - printf("Processor : %s\n", cp); - - *cp = 0; - env = getenv("COMPUTERNAME"); - if (env) - StringCchPrintf(EndBuf(cp),BUFSIZE,"Running in : %s ", env); - env = getenv("USERNAME"); - if (env) - StringCchPrintf(EndBuf(cp),BUFSIZE,"User: %s ", env); - GetLocalTime(&st); - StringCchPrintf(EndBuf(cp),BUFSIZE,"On: %4d/%02d/%02d, At: %02d:%02d:%02d", - (st.wYear & 0xffff), (st.wMonth & 0xffff), (st.wDay & 0xffff), - (st.wHour & 0xffff), (st.wMinute & 0xffff), (st.wSecond & 0xffff)); - - if (*cp) - printf("%s\n",cp); + if (cp) { + *cp = 0; + if (GetOSDisplayString(cp)) + printf("OS version : %s\n",cp); + else if (GetSystemVersion(cp)) + printf("os version : %s\n",cp); + + *cp = 0; + if (get_processor_stg(cp)) + printf("Processor : %s\n", cp); + + *cp = 0; + env = getenv("COMPUTERNAME"); + if (env) + StringCchPrintf(EndBuf(cp),BUFSIZE,"Running in : %s ", env); + env = getenv("USERNAME"); + if (env) + StringCchPrintf(EndBuf(cp),BUFSIZE,"User: %s ", env); + GetLocalTime(&st); + StringCchPrintf(EndBuf(cp),BUFSIZE,"On: %4d/%02d/%02d, At: %02d:%02d:%02d", + (st.wYear & 0xffff), (st.wMonth & 0xffff), (st.wDay & 0xffff), + (st.wHour & 0xffff), (st.wMinute & 0xffff), (st.wSecond & 0xffff)); + + if (*cp) + printf("%s\n",cp); + + free(cp); + } + // SetErrorMode(-1); // does NOTHING } -// return TRUE if a valid path/file +// return TRUE if a valid path or file // note: (windows) stat will FAIL on a path with a trailing '/', -// so the jiggery pokey stuff is to 'erase' a trailing '/', if it exists +// so the jiggery pokey stuff is to 'erase' a trailing '/', or '\', if it exists // This is NOT a passed 'reference' so no harm is done to the passed path! bool is_valid_path( std::string path ) { struct stat buf; size_t len = path.length(); size_t pos = path.rfind("/"); - if ( pos == (len - 1) ) - path.erase( path.end() - 1 ); + if ( pos == (len - 1) ) { + path.erase( path.end() - 1 ); + } else { + pos = path.rfind("\\"); + if ( pos == (len - 1) ) { + path.erase( path.end() - 1 ); + } + } if ( stat(path.c_str(),&buf) == 0 ) return true; return false; } + +// int is_directory_file +// 2 = is directory +// 1 = is regular file +// 0 = neither +int is_file_directory( std::string file ) +{ + struct stat buf; + if ( stat(file.c_str(),&buf) == 0 ) { + if ( buf.st_mode & _S_IFDIR ) { + return 2; + } else if ( buf.st_mode & _S_IFREG ) { + return 1; + } + } else if ( is_valid_path( file ) ) { + return 2; + } + return 0; +} + #if 0 // ================================== diff -ur C:\FGCVS\Atlas\projects\msvc\winsrc\win_utils.h Atlas-0.4.9\projects\msvc\winsrc\win_utils.h --- C:\FGCVS\Atlas\projects\msvc\winsrc\win_utils.h Tue May 11 19:05:06 2010 +++ Atlas-0.4.9\projects\msvc\winsrc\win_utils.h Sun Oct 09 13:01:39 2011 @@ -33,6 +33,8 @@ extern void set_win_path_sep( std::string & s ); extern bool is_valid_path( std::string path ); extern void print_version_details(void); +// int is_directory_file 2 = is directory 1 = is regular file 0 = neither +extern int is_file_directory( std::string file ); #if 0 // ------------------ extern void ll2pt( double obj_latr, double obj_lonr, diff -ur C:\FGCVS\Atlas\projects\msvc\zipall.bat Atlas-0.4.9\projects\msvc\zipall.bat --- C:\FGCVS\Atlas\projects\msvc\zipall.bat Tue May 11 19:05:06 2010 +++ Atlas-0.4.9\projects\msvc\zipall.bat Thu Oct 06 15:44:07 2011 @@ -1,6 +1,11 @@ @REM setlocal +@set TEMPV= +@call setvers +@if "%TEMPV%x" == "x" goto NOVERS @echo Zip all the source... the zip file is created 3 directories up from here... +@echo This is only to create an 'ALL' zip... Use zipsrc.bat to create the SITE zip files... @if "%1x" == "x" goto HELP +@echo. @set TEMPZIP=..\..\..\%1 @set TEMPXX=%TEMP%\tempatzx.txt @if NOT EXIST %TEMPXX% goto GENEXCL @@ -40,7 +45,7 @@ @echo Just enter the name of the zip file... and the complete @echo source will be zipped to it, excluding some generated MSVC files... @echo The ZIP file will be create 3 folders up, in ..\..\..\., so do NOT -@echo add a path name. +@echo add a path name. The name should contain a version like [%TEMPV%]... @goto END :GENEXCL @@ -90,5 +95,12 @@ @echo. @echo ERROR: Expect a folder depth greater that 3 to do this... @echo The ZIP is created as ..\..\..\%1 + +:NOVERS +@echo. +@echo ERROR: Appears the setvers.bat is missing, to set TEMPV in the environment... +@echo. +@goto END + :END diff -ur C:\FGCVS\Atlas\projects\msvc\zipsrc.bat Atlas-0.4.9\projects\msvc\zipsrc.bat --- C:\FGCVS\Atlas\projects\msvc\zipsrc.bat Tue May 11 19:05:06 2010 +++ Atlas-0.4.9\projects\msvc\zipsrc.bat Thu Oct 06 14:06:01 2011 @@ -1,9 +1,7 @@ -@REM 2010-05-08 - changed to version 8 -@set TEMPV=08 -@set TEMPA=Atlas-0.4.8 -@REM 2010-04-24 - changed to version 7 -@REM set TEMPV=07 -@REM set TEMPA=Atlas-0.4.3 +@set TEMPV= +@call setvers +@if "%TEMPV%x" == "x" goto NOVERS +@set TEMPA=Atlas-0.4.9 @REM ========================================== @cls @@ -12,7 +10,8 @@ @set TEMPZS=atlas-%TEMPV%-src.zip @set TEMPZM=atlas-%TEMPV%-sln.zip @set TEMPZA=atlas-%TEMPV%-all.zip -@set TEMPP=atlas-diff%TEMPV%.patch +@set TEMPP=atlas-%TEMPV%-diff.txt +@REM set TEMPP=atlas-diff%TEMPV%.patch @set TEMPZE=atlas-%TEMPV%-exe.zip @set TEMP3RD=atlas-%TEMPV%-3rd.zip @set TEMPR=%TEMPA%\projects\msvc @@ -41,32 +40,57 @@ @echo ====== READ ALL THE ABOVE CAREFULLY ====== @echo *** CONTINUE? *** Ctrl+C to abort @pause - +@echo *** ARE YOU SURE? *** Ctrl+C to abort. All other keys continue... +@pause @echo Doing cleanup first... @call cleanup +@echo. +@echo Completed CLEANUP... +@dir /ad +@echo *** CONTINUE? *** Ctrl+C to abort +@pause + +@if NOT EXIST ..\..\..\%TEMPP% ( + +@echo Creating ..\..\..\%TEMPP%... +@call makediff %TEMPP% + +@if NOT EXIST ..\..\..\%TEMPP% ( +@echo WARNING: Failed to create ..\..\..\%TEMPP% +@echo *** CONTINUE? *** Only Ctlr+C aborts... all other keys continue +@pause +) + +) @echo Doing Zipping... + +@REM Back up to Altas root @cd ..\.. + @set TEMPU=%TEMPU% -o -P @call zip8 %TEMPU% -x*.sln ..\%TEMPZS% *.* src\*.* @set TEMPU=-a @if NOT EXIST ..\%TEMPZM% goto DNZ2 -@echo This is an update of an existing %TEMPZS% +@echo This is an update of an existing %TEMPZM% @set TEMPU=-u :DNZ2 @set TEMPU=%TEMPU% -o -P @call zip8 %TEMPU% ..\%TEMPZM% projects\msvc\*.* projects\msvc\winsrc\*.* +@REM Back out of Atlas completely cd .. @set TEMPI=%TEMPZM% %TEMPZS% @if NOT EXIST %TEMPP% goto DNZ3 +@echo Including the PATCH file %TEMPP% @set TEMPI=%TEMPP% %TEMPZM% %TEMPZS% :DNZ3 + @set TEMPU=-a @if NOT EXIST %TEMPZA% goto DNZ4 -@echo This is an update of an existing %TEMPZS% +@echo This is an update of an existing %TEMPZA% @set TEMPU=-u :DNZ4 @set TEMPU=%TEMPU% -o @@ -96,9 +120,8 @@ :NOPATCH @echo. @echo WARNING: Can NOT locate the patch file ..\..\..\%TEMPP% -@echo So the PATCH file will NOT be included in the ALL zip +@echo Will run the makediff.bat %TEMPP% later... @echo *** REALLY CONSIDER IF THIS IS WHAT YOU WANT *** -@echo Maybe the makediff.bat needs to be run first... @echo. @goto CONT1 @@ -136,5 +159,12 @@ @echo. @echo ERROR: Can NOT locate cleanup.bat batch file... @goto END + +:NOVERS +@echo. +@echo ERROR: Appears the setvers.bat is missing, to set TEMPV in the environment... +@echo. +@goto END + :END diff -ur C:\FGCVS\Atlas\src\Atlas.cxx Atlas-0.4.9\src\Atlas.cxx --- C:\FGCVS\Atlas\src\Atlas.cxx Tue Sep 20 05:55:05 2011 +++ Atlas-0.4.9\src\Atlas.cxx Sun Oct 09 14:44:51 2011 @@ -399,6 +399,7 @@ return NULL; } + // ScreenLocation maintains a window x, y coordinate, and its // corresponding location on the earth. ScreenLocation does not track // changes to the view, so it must be told when to recalculate its @@ -3638,9 +3639,15 @@ // should be checked periodically to see if the bug still exists // and removed if it has been fixed. #ifdef _MSC_VER +#if defined(GLUT_ACTIVE_CTRL) + if (( key == ' ' ) && + ( glutGetModifiers() & GLUT_ACTIVE_CTRL )) + key = 0; +#elif defined(GLUT_ACTIVE_CONTROL) if (( key == ' ' ) && ( glutGetModifiers() & GLUT_ACTIVE_CONTROL )) key = 0; +#endif #endif // _MSC_VER if (!puKeyboard(key, PU_DOWN)) { @@ -4621,6 +4628,9 @@ } // Load the preferred palette. + // This uses 'strcmp', but if in windows, case is ignored! + // BUT also why does the file HAVE to be in the prefs.path? + // AND the user MUST only give the 'name', with .ap extent, and not a path... globals.setPalette(palettes->setPalette(prefs.palette)); if (!globals.palette()) { printf("%s: Failed to read palette file '%s'\n", diff -ur C:\FGCVS\Atlas\src\GetMap.cxx Atlas-0.4.9\src\GetMap.cxx --- C:\FGCVS\Atlas\src\GetMap.cxx Sat Oct 01 08:40:26 2005 +++ Atlas-0.4.9\src\GetMap.cxx Tue Oct 04 18:31:26 2011 @@ -21,12 +21,19 @@ --------------------------------------------------------------------------- Try with --base-url='http://wms.jpl.nasa.gov/cgi-bin/wms.cgi?LAYERS=modis,global_mosaic&styles=default,visual&' +or --base-url='http://viz.globe.gov/viz-bin/wmt.cgi? +SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap& +LAYERS=COASTLINES,RATMAX&STYLES=,&BBOX=-180,-90,180,90&SRS=EPSG:4326& +FORMAT=image/gif&HEIGHT=300&WIDTH=600' --------------------------------------------------------------------------- CHANGES + 2010-10-04 Added an --asis switch - will donwload any URL as given - grm 2005-09-28 Initial version ---------------------------------------------------------------------------*/ - +#ifdef HAVE_CONFIG_H + #include "config.h" // For version, and lots more ;=)) +#endif #include #include #include @@ -40,6 +47,7 @@ #include bool verbose = false; +bool asis = false; int size = 256; int min_lat = 1000; int min_lon = 1000; @@ -53,16 +61,20 @@ /*****************************************************************************/ void print_help() { - printf("GetMap - FlightGear mapping retrieval utility\n\n"); + printf("GetMap - FlightGear mapping retrieval utility\n"); + printf("Version: " VERSION " compiled " __DATE__ " at " __TIME__ "\n"); printf("Usage:\n"); - printf(" --size=pixels Create map of size pixels*pixels (default 256)\n"); - printf(" --base-url=url Beginning of the url of the WMS server\n"); - printf(" --atlas=path Create maps of all scenery, and store them in path\n"); - printf(" --min-lat Minimum latitude\n"); - printf(" --max-lat Maximum latitude\n"); - printf(" --min-lon Minimum longitude\n"); - printf(" --max-lon Maximum longitude\n"); - printf(" --verbose Display information during processing\n"); + printf(" --size=pixels Create map of size pixels*pixels (default 256)\n"); + printf(" --base-url=url Beginning of the url of the WMS server\n"); + printf(" --atlas=path Create maps of all scenery, and store them in path\n"); + printf(" --min-lat Minimum latitude\n"); + printf(" --max-lat Maximum latitude\n"); + printf(" --min-lon Minimum longitude\n"); + printf(" --max-lon Maximum longitude\n"); + printf(" --verbose Display information during processing\n"); + printf(" --asis Use the base URL as given, without modification.\n"); + printf(" and this means no min. or max. latitude and longitude need be given.\n"); + printf(" The data downloaded in this case will be written to '/tempimg'\n"); } bool parse_arg(char* arg) { @@ -83,7 +95,9 @@ base_url = arg+11; } else if ( strcmp(arg, "--verbose") == 0 ) { verbose = true; - } else if ( strcmp(arg, "--help") == 0 ) { + } else if ( strcmp(arg, "--asis") == 0 ) { + asis = true; + } else if (( strcmp(arg, "--help") == 0 )||( strcmp(arg, "--version") == 0 )) { print_help(); exit(0); } else { @@ -105,7 +119,7 @@ } int main( int argc, char **argv ) { - if (argc == 0) + if (argc < 2) print_help(); // process command line arguments @@ -131,6 +145,8 @@ fprintf(stderr, "%s: --base-url option missing.\n", argv[0]); exit(1); } + if (!asis) { + // then need min. max if ( min_lat == 1000 ) { fprintf(stderr, "%s: --min-lat option missing.\n", argv[0]); exit(1); @@ -167,11 +183,48 @@ if ( min_lon > max_lon ) { max_lon += 360; } + } std::cout << "Getting landsat images from " << base_url.c_str() << std::endl; CURL *ceh = curl_easy_init(); if ( ceh != 0 ) { + if (asis) { + std::ostringstream fname; + fname << outp << "/tempimg"; + std::string url = base_url; + if (verbose) { + std::cout << "Will fetch [" << url << "]" << std::endl; + std::cout << "and write [" << fname.str() << "], if successful..." << std::endl; + } + curl_easy_setopt( ceh, CURLOPT_URL, url.c_str() ); + curl_easy_setopt( ceh, CURLOPT_WRITEFUNCTION, writeData_cb ); + curl_easy_setopt( ceh, CURLOPT_WRITEDATA, 0 ); + curl_easy_setopt( ceh, CURLOPT_NOPROGRESS, 0 ); + curl_easy_setopt( ceh, CURLOPT_PROGRESSFUNCTION, progress_cb ); + curl_easy_setopt( ceh, CURLOPT_PROGRESSDATA, 0 ); + //curl_easy_setopt( ceh, CURLOPT_INFILESIZE, -1 ); + file_size = 0; + memstream.str(""); + int success = curl_easy_perform( ceh ); + if (file_size && ( success == 0 )) { + char *cType = 0; + size_t len = 0; + curl_easy_getinfo( ceh, CURLINFO_CONTENT_TYPE, &cType ); + if (cType) { + len = strlen(cType); + std::cout << "Content type = '" << cType << "'" << std::endl; + } + std::ofstream fstr( fname.str().c_str(), std::ios::binary ); + fstr.write( memstream.str().data(), file_size ); + fstr.close(); + std::cout << "Written '" << fname.str().c_str() << + "', files size " << file_size << std::endl; + } else { + std::cout << "Appears URL fetch by curl FAILED!" << std::endl; + } + } else { + // ================================================== for ( int y = min_lat; y < max_lat; y += 1 ) { for ( int x = min_lon; x < max_lon; x += 1 ) { int rx = x; @@ -182,6 +235,14 @@ fname << outp << "/" << ( rx < 0 ? "w" : "e" ) << std::setw( 3 ) << std::setfill( '0' ) << abs(rx) << ( y < 0 ? "s" : "n" ) << std::setw( 2 ) << std::setfill( '0' ) << abs(y) << ".jpg"; + std::ostringstream fxml; + fxml << outp << "/" << ( rx < 0 ? "w" : "e" ) << std::setw( 3 ) << std::setfill( '0' ) << abs(rx) + << ( y < 0 ? "s" : "n" ) << std::setw( 2 ) << std::setfill( '0' ) << abs(y) + << ".xml"; + std::ostringstream fhtml; + fhtml << outp << "/" << ( rx < 0 ? "w" : "e" ) << std::setw( 3 ) << std::setfill( '0' ) << abs(rx) + << ( y < 0 ? "s" : "n" ) << std::setw( 2 ) << std::setfill( '0' ) << abs(y) + << ".html"; struct stat stat_buf; if ( stat( fname.str().c_str(), &stat_buf ) == 0 ) @@ -192,6 +253,10 @@ << rx << "," << y << "," << rx+1 << "," << y+1 << "&FORMAT=image/jpeg&SRS=EPSG:4326"; std::string url = surl.str(); + if (verbose) { + std::cout << "Will fetch [" << url << "]" << std::endl; + std::cout << "and write [" << fname.str() << "] if successful..." << std::endl; + } curl_easy_setopt( ceh, CURLOPT_URL, url.c_str() ); curl_easy_setopt( ceh, CURLOPT_WRITEFUNCTION, writeData_cb ); curl_easy_setopt( ceh, CURLOPT_WRITEDATA, 0 ); @@ -205,16 +270,50 @@ int success = curl_easy_perform( ceh ); if ( success == 0 ) { - char *cType; + char *cType = 0; + size_t len = 0; curl_easy_getinfo( ceh, CURLINFO_CONTENT_TYPE, &cType ); - if ( strcmp( cType, "image/jpeg" ) == 0 ) { + if (cType) + len = strlen(cType); + if ( len && strcmp( cType, "image/jpeg" ) == 0 ) { std::ofstream fstr( fname.str().c_str(), std::ios::binary ); fstr.write( memstream.str().data(), file_size ); fstr.close(); - std::cout << "Written '" << fname.str().c_str() << "'" << std::endl; + std::cout << "Written '" << fname.str().c_str() << + "', files size " << file_size << std::endl; + } else if ( len && strcmp( cType, "application/vnd.ogc.se_xml" ) == 0 ) { + if ( stat( fxml.str().c_str(), &stat_buf ) == 0 ) { + std::cout << "No image, and file '" << fxml.str().c_str() << + "' already exists." << std::endl; + } else { + std::ofstream xfstr( fxml.str().c_str(), std::ios::binary ); + xfstr.write( memstream.str().data(), file_size ); + xfstr.close(); + std::cout << "No image, but written '" << fxml.str().c_str() << + "', size " << file_size << std::endl; + } + } else if (len && strncmp( cType, "text/html", 9 ) == 0 ) { + if ( stat( fhtml.str().c_str(), &stat_buf ) == 0 ) { + std::cout << "No image, and file '" << fhtml.str().c_str() << + "' already exists." << std::endl; + } else { + std::ofstream hfstr( fhtml.str().c_str(), std::ios::binary ); + hfstr.write( memstream.str().data(), file_size ); + hfstr.close(); + std::cout << "No image, but written '" << fhtml.str().c_str() << + "', size " << file_size << std::endl; + } + } else if (len) { + std::cout << "Got unexpected content type '" << cType << "'!" << std::endl; + } else { + std::cout << "No content type!" << std::endl; } + } else { + std::cout << "Appears URL fetch by curl FAILED!" << std::endl; } } } - } + // ================================================== + } + } // curl init ok } diff -ur C:\FGCVS\Atlas\src\Graphs.cxx Atlas-0.4.9\src\Graphs.cxx --- C:\FGCVS\Atlas\src\Graphs.cxx Tue Aug 23 16:36:45 2011 +++ Atlas-0.4.9\src\Graphs.cxx Sun Oct 02 10:28:25 2011 @@ -1128,7 +1128,9 @@ Graphs::Values::~Values() { free(_label); +#ifndef _MSC_VER // this causes a segfault in windows puDeleteObject(_slider); +#endif } void Graphs::Values::setFlightTrack(FlightTrack *ft) diff -ur C:\FGCVS\Atlas\src\Makefile.am Atlas-0.4.9\src\Makefile.am --- C:\FGCVS\Atlas\src\Makefile.am Fri Sep 30 23:44:35 2011 +++ Atlas-0.4.9\src\Makefile.am Sat Oct 08 18:19:01 2011 @@ -39,7 +39,7 @@ Atlas_LDADD = \ -lsgmagvar -lsgtiming -lsgmisc -lsgio -lsgserial -lsgdebug \ - -lsgbucket -lsgstructure -lsgmath \ + -lsgbucket -lsgstructure -lsgmath -lsgthreads \ -lplibsg -lplibpuaux -lplibpu -lplibul -lplibfnt -lplibnet \ $(opengl_LIBS) \ -lpng -lz -ljpeg @@ -56,7 +56,7 @@ Map_LDADD = \ -lsgmagvar -lsgtiming -lsgmisc -lsgio -lsgdebug \ - -lsgbucket -lsgstructure -lsgmath \ + -lsgbucket -lsgstructure -lsgmath -lsgthreads \ -lplibfnt -lplibsg \ $(opengl_LIBS) \ -lpng -lz -ljpeg \ Only in Atlas-0.4.9\src: Map-ok.cxx diff -ur C:\FGCVS\Atlas\src\Map.cxx Atlas-0.4.9\src\Map.cxx --- C:\FGCVS\Atlas\src\Map.cxx Fri Sep 30 23:44:35 2011 +++ Atlas-0.4.9\src\Map.cxx Sun Oct 09 14:44:55 2011 @@ -107,6 +107,18 @@ static int bufferSize; // Size of rendering buffer. +#ifdef ADD_CHUNK_LIMIT +#define LAT_IN_RANGE(a) (( a >= -90 )&&( a <= 90)) +#define LON_IN_RANGE(a) (( a >= -180 )&&( a <= 180)) +typedef struct tagMAP_CHUNK { + int minlat,minlon,maxlat,maxlon; +}MAP_CHUNK; +typedef vector vmap_chunk; +static vmap_chunk map_chunk; // store of user '--chunks=e000n40' input +static int gotChunkLimits = 0; // count of user 10x10 chunks given +static int forceRewrite = 0; // re-build a set of map (change color, etc) +#endif // #ifdef ADD_CHUNK_LIMIT + //////////////////////////////////////////////////////////////////////////////// // Renders a single scenery tile, perhaps at several different sizes, // storing the results as image files. It only generates maps if they @@ -114,10 +126,28 @@ //////////////////////////////////////////////////////////////////////////////// void renderMap(Tile *t) { +#ifdef ADD_CHUNK_LIMIT + //const bitset& maps = t->missingMaps(); + //const bitset& mapa = t->mapLevels(); + bitset maps = t->missingMaps(); // set missing items + bitset mapa = t->mapLevels(); // set all needed items + if ( forceRewrite ) { + // set ALL that are needed + for (unsigned int j = 0; j < TileManager::MAX_MAP_LEVEL; j++) { + if (mapa[j]) { + maps.set(j); + } + } + } + if (maps.none()) { + return; + } +#else // !#ifdef ADD_CHUNK_LIMIT const bitset& maps = t->missingMaps(); if (maps.none()) { return; } +#endif // #ifdef ADD_CHUNK_LIMIT y/n // This tile has missing maps. Load, render, save, and unload // them. @@ -163,6 +193,11 @@ printf(" --fg-scenery=path Overrides FG_SCENERY environment variable\n"); printf(" --atlas=path Store maps in path\n"); printf(" --palette=path Set the palette file to use\n"); +#ifdef ADD_CHUNK_LIMIT + printf(" --minmax= Set min. and max. limits.\n"); + printf(" --chunk= Limit mapping to a 10x10 degree chunk.\n"); + printf(" --force Force overwrite of existing images.\n"); +#endif // ADD_CHUNK_LIMIT printf(" --png Create PNG images\n"); printf(" --jpeg Create JPEG images with quality %u (default)\n", jpegQuality); @@ -197,6 +232,41 @@ atlas.set(arg + 8); } else if (strncmp(arg, "--palette=", 10) == 0) { palette.set(arg + 10); +#ifdef ADD_CHUNK_LIMIT + } else if (strncmp(arg, "--chunk=", 8) == 0) { + char ns = 'n', ew = 'e'; // like, --chunk=w130n30, for w123n37 KSFO + MAP_CHUNK mc; + if (sscanf(arg + 8, "%c%3d%c%2d", &ew, &mc.minlon, &ns, &mc.minlat) == 4) { + if (ew == 'w') mc.minlon *= -1; + if (ns == 's') mc.minlat *= -1; + mc.maxlat = mc.maxlon + 10; + mc.maxlon = mc.minlon + 10; + if ((mc.minlat < mc.maxlat)&&(mc.minlon < mc.maxlon) && + LAT_IN_RANGE(mc.minlat) && LAT_IN_RANGE(mc.maxlat) && + LON_IN_RANGE(mc.minlon) && LON_IN_RANGE(mc.maxlon) ) { + map_chunk.push_back(mc); + gotChunkLimits++; + } else + return false; + } else { + return false; + } + } else if (strncmp(arg, "--minmax", 8) == 0) { + MAP_CHUNK mc = {-200,-200,-200,-200}; + if (sscanf(arg + 8, "%d,%d,%d,%d", &mc.minlat, &mc.minlon, &mc.maxlat, &mc.maxlat) == 4) { + if ((mc.minlat < mc.maxlat)&&(mc.minlon < mc.maxlon) && + LAT_IN_RANGE(mc.minlat) && LAT_IN_RANGE(mc.maxlat) && + LON_IN_RANGE(mc.minlon) && LON_IN_RANGE(mc.maxlon) ) { + map_chunk.push_back(mc); + gotChunkLimits++; + } else + return false; + } else + return false; + + } else if (strcmp(arg, "--force") == 0) { + forceRewrite = 1; +#endif // #ifdef ADD_CHUNK_LIMIT } else if (strcmp(arg, "--png") == 0) { createJPEG = false; } else if (strcmp(arg, "--jpeg") == 0) { @@ -248,7 +318,7 @@ print_help(); exit(0); } else { - return false; + return false; // unknown argument } return true; @@ -307,6 +377,7 @@ env = getenv("FG_SCENERY"); if (env == NULL) { fg_scenery.set(fg_root.str()); + fg_scenery.append("Scenery"); // add /Scenery } else { fg_scenery.set(env); } @@ -332,8 +403,8 @@ while (!feof(rc)) { line[strlen(line) - 1] = '\0'; if (!parse_arg(line)) { - fprintf(stderr, "%s: unknown argument '%s' in file '%s'\n", - appName, line, rcPath.str()); + fprintf(stderr, "%s: unknown argument '%s' in file '%s'\n", + appName, line, rcPath.str()); } fgets(line, 256, rc); } @@ -343,9 +414,9 @@ // Process command line arguments. for (int arg = 1; arg < argc; arg++) { if (!parse_arg(argv[arg])) { - fprintf(stderr, "%s: unknown argument '%s'.\n", appName, argv[arg]); - print_help(); - exit(1); + fprintf(stderr, "%s: unknown argument '%s'.\n", appName, argv[arg]); + print_help(); + exit(1); } } @@ -364,7 +435,7 @@ } else { fprintf(stderr, "%s: No scenery directory specified.", appName); fprintf(stderr, "\tUse --fg-scenery= or --fg-root= to specify where to find scenery.\n"); - exit(1); + return 1; // exit(1); } if (verbose) { printf("Scenery directories: %s\n", scenery.str().c_str()); @@ -385,7 +456,7 @@ } else { fprintf(stderr, "%s: No map directory specified.", appName); fprintf(stderr, "\tUse --atlas= to specify where to place maps.\n"); - exit(1); + return 1; // exit(1); } if (verbose) { printf("Map directory: %s\n", atlas.str().c_str()); @@ -456,6 +527,10 @@ printf("Scenery: %d tiles\n", tileManager->tileCount(TileManager::DOWNLOADED)); } + if (tileManager->tileCount(TileManager::DOWNLOADED) == 0) { + printf("Found NO tiles to render!!!\n"); + return 1; + } // Find out what our maximum desired map and buffer sizes are. int mapSize = 0, bufferLevel; @@ -527,6 +602,31 @@ printf("be able to read them on this machine.\n"); } +#ifdef ADD_CHUNK_LIMIT + int ii, minlat, minlon, maxlat, maxlon, tlat, tlon, out_range = 0; + if (verbose) { + if (renderToFramebuffer) { + printf("Render to frame buffer...\n"); + } else { + printf("Render to screen...\n"); + } + if ( gotChunkLimits ) { + printf("Chunk Limited: lat,lon "); + for (ii = 0; ii < map_chunk.size(); ii++) { + minlat = map_chunk[ii].minlat; + minlon = map_chunk[ii].minlon; + maxlat = map_chunk[ii].maxlat; + maxlon = map_chunk[ii].maxlon; + printf(" [%d,%d]-[%d,%d]", minlat, minlon, maxlat, maxlon ); + } + printf(", ie %d 10x10 chunk(s).\n", ii); + } + if ( forceRewrite ) { + printf("Got overwrite flag, for all images.\n"); + } + } +#endif // #ifdef ADD_CHUNK_LIMIT + if (test) { // Print out a report, then exit. printf("Scenery directory:\n\t%s\n", scenery.c_str()); @@ -587,6 +687,45 @@ int downloadedTiles = tileManager->tileCount(TileManager::DOWNLOADED); for (int i = 0; i < downloadedTiles; i++) { Tile *t = tileManager->tile(TileManager::DOWNLOADED, i); +#ifdef ADD_CHUNK_LIMIT + tlat = t->lat(); + tlon = t->lon(); + if (verbose) + printf("Rendering tile %d,%d...\n",tlat, tlon); + if (gotChunkLimits) { + // ***TBD*** maybe check for lat,lon wrap? + if (verbose) + printf("Range testing tile [%d,%d] ",tlat, tlon); + int in_range = 0; // assume NOT in range, since we have user limits + for (ii = 0; ii < map_chunk.size(); ii++) { + minlat = map_chunk[ii].minlat; + minlon = map_chunk[ii].minlon; + maxlat = map_chunk[ii].maxlat; + maxlon = map_chunk[ii].maxlon; + if (verbose) + printf("to [%d,%d]-[%d,%d] ", minlat, minlon, maxlat, maxlon); + if ((tlat < minlat) || + (tlat > maxlat) || + (tlon < minlon) || + (tlon > maxlon)) { + // this tile is out of range + } else { + in_range++; // this tile MATCHES a user chunk range + break; // we are interested to build this MAP ;=)) + } + } + if ( !in_range ) { + //skipped_count++; + //sk_not_in_range++; + if (verbose) + printf("Out of range\n"); + continue; + } + if (verbose) + printf("in range\n"); + } +#endif // !#ifdef ADD_CHUNK_LIMIT + renderMap(t); } diff -ur C:\FGCVS\Atlas\src\Notifications.cxx Atlas-0.4.9\src\Notifications.cxx --- C:\FGCVS\Atlas\src\Notifications.cxx Sat Aug 20 21:41:37 2011 +++ Atlas-0.4.9\src\Notifications.cxx Sat Oct 08 18:21:06 2011 @@ -52,10 +52,11 @@ void Notification::unsubscribe(Subscriber *s, type n) { if (n == All) { - assert(_notifications.size() == All); + // NO assert(_notifications.size() == All); for (unsigned int i = 0; i < _notifications.size(); i++) { _notifications[i].erase(s); } + _notifications.clear(); // clear the vector } else { _notifications[n].erase(s); } diff -ur C:\FGCVS\Atlas\src\Preferences.cxx Atlas-0.4.9\src\Preferences.cxx --- C:\FGCVS\Atlas\src\Preferences.cxx Tue Sep 20 05:55:05 2011 +++ Atlas-0.4.9\src\Preferences.cxx Sun Oct 09 15:18:41 2011 @@ -174,19 +174,27 @@ static AtlasString defaultStr; switch(option) { case FG_ROOT_OPTION: + defaultStr.printf("Default: %s", FGBASE_DIR); printOne(indent, "--fg-root=", - "Overrides FG_ROOT environment variable", NULL); + "Overrides FG_ROOT environment variable", + defaultStr.str(), NULL); break; case FG_SCENERY_OPTION: + defaultStr.printf("Default: %s/Scenery", FGBASE_DIR); printOne(indent, "--fg-scenery=", - "Overrides FG_SCENERY environment variable", NULL); + "Overrides FG_SCENERY environment variable", + defaultStr.str(), NULL); break; case PATH_OPTION: - printOne(indent, "--atlas=", "Set path for map images", NULL); + defaultStr.printf("Default: %s/Atlas", FGBASE_DIR); + printOne(indent, "--atlas=", "Set path for map images", + defaultStr.str(), NULL); break; case PALETTE_OPTION: + defaultStr.printf("Default: default.ap"); printOne(indent, "--palette=", - "Specify Atlas palette", NULL); + "Specify Atlas palette file (.ap), in the above", + "/Palettes/ directory", defaultStr.str(), NULL); break; case LAT_OPTION: defaultStr.printf("Default: %.2f", Preferences::defaultLatitude); @@ -370,6 +378,7 @@ env = getenv("FG_SCENERY"); if (env == NULL) { scenery_root.set(fg_root.str()); + scenery_root.append("Scenery"); // ensure /Scenery } else { scenery_root.set(env); } diff -ur C:\FGCVS\Atlas\src\Subbucket.hxx Atlas-0.4.9\src\Subbucket.hxx --- C:\FGCVS\Atlas\src\Subbucket.hxx Sat Aug 20 21:41:37 2011 +++ Atlas-0.4.9\src\Subbucket.hxx Sat Oct 01 14:52:14 2011 @@ -38,6 +38,9 @@ #include #include #if (defined(_MSC_VER) && !defined(HAVE_TRI_UNORDERED)) +#include // TR1 +#include +#include #include #include #else @@ -59,7 +62,12 @@ // Note: the decision to use XOR to combine the two values was // made on the basis of pure ignorance. There are, no doubt, // better ways. +#ifdef _MSC_VER + //return std::hash()(x.first ^ x.second); + return stdext::hash_value(x.first ^ x.second); +#else // !_MSC_VER return std::tr1::hash()(x.first ^ x.second); +#endif // _MSC_VER y/n } }; diff -ur C:\FGCVS\Atlas\src\TileMapper.cxx Atlas-0.4.9\src\TileMapper.cxx --- C:\FGCVS\Atlas\src\TileMapper.cxx Fri Sep 30 23:41:22 2011 +++ Atlas-0.4.9\src\TileMapper.cxx Sat Oct 01 19:53:55 2011 @@ -20,7 +20,7 @@ You should have received a copy of the GNU General Public License along with Atlas. If not, see . ---------------------------------------------------------------------------*/ - +#include "config.h" #include #include @@ -70,8 +70,8 @@ // The result is the minimum of our maximum map size, the maximum // texture size, and the maximum buffer size. - return log2(min(0x1 << TileManager::MAX_MAP_LEVEL, - min(maxTextureSize, maxBufferSize))); + return log2((double)(min(0x1 << TileManager::MAX_MAP_LEVEL, + min(maxTextureSize, maxBufferSize)))); } TileMapper::TileMapper(Palette *p, unsigned int maxDesiredLevel, @@ -347,7 +347,8 @@ SGPath file = _tile->mapsDir(); char str[3]; snprintf(str, 3, "%d", level); - file.concat(str); + // assumption that output directory already has a trailing slash! + file.concat(str); // and now this is taken care of in Tiles.cxx file.append(_tile->name()); if (t == PNG) { file.concat(".png"); diff -ur C:\FGCVS\Atlas\src\Tiles.cxx Atlas-0.4.9\src\Tiles.cxx --- C:\FGCVS\Atlas\src\Tiles.cxx Mon Sep 26 06:23:26 2011 +++ Atlas-0.4.9\src\Tiles.cxx Sat Oct 08 18:49:27 2011 @@ -20,7 +20,7 @@ You should have received a copy of the GNU General Public License along with Atlas. If not, see . ---------------------------------------------------------------------------*/ - +#include "config.h" #include #include #include @@ -33,6 +33,13 @@ #include "Tiles.hxx" #include "tiles.h" // Contains the __scenery array. +#ifdef _MSC_VER +#include +#define ROUND(a) SGMisc::round(a) +#else +#define ROUND(d) round(d) +#endif + using namespace std; //////////////////////////////////////////////////////////////////////////////// @@ -71,7 +78,12 @@ { int lat, lon; char ew, ns; - assert(sscanf(name, "%1c%3d%1c%2d", &ew, &lon, &ns, &lat) == 4); + // assert(sscanf(name, "%1c%3d%1c%2d", &ew, &lon, &ns, &lat) == 4); + // can NOT use 'assert' in Release, with NDEBUG, since this does NOTHING!!! + if ( sscanf(name, "%1c%3d%1c%2d", &ew, &lon, &ns, &lat) != 4 ) { + fprintf(stderr,"GeoLocation: sscanf of [%s] FAILED!\n", name ); + exit(1); + } if (ew == 'w') { lon = 360 - lon; } @@ -79,7 +91,6 @@ lat = -lat; } lat += 90; - setLoc(lat, lon); } @@ -210,10 +221,24 @@ // thinks _maps has a file at the end, we add an empty item, thus // changing the path to "/Foo/Bar/", which will convince it that // the last thing is in fact a directory. +#ifdef _MSC_VER + // this logic seems BAD if the given input path is just say 'temp' + // SGPath::file() searches for a 'separator', but + // sadly 'sgDirPathSep' is not exposed, but + // ALL SGPaths are 'standardized' to '/', so... + int index = _maps.str().rfind('/'); + if ( index >= 0 ) { + if (!_maps.file().empty()) { + _maps.append(""); + } + } else { + _maps.append(""); + } +#else if (!_maps.file().empty()) { _maps.append(""); } - +#endif // Find out what map levels/directories we have. _scanMapLevels(); @@ -382,6 +407,7 @@ char str[3]; snprintf(str, 3, "%d", level); + result.concat(str); result.append(""); @@ -776,7 +802,7 @@ // created). Tile *t = tile(ent->d_name); if (!t) { - fprintf(stderr, "Chunk::_scanScenery: unexpected tile directory '%s' - ignoring\n", ent->d_name); + fprintf(stderr, "Chunk::_scanScenery: ignored tile '%s/%s'\n", directory.c_str(), ent->d_name); } else { if (!t->hasScenery()) { // This is the first time we've seen scenery for this @@ -1015,7 +1041,7 @@ double w = *height * cos(lat() * SGD_DEGREES_TO_RADIANS) * Tile::width(); // Oh yeah, and it has to be a power of 2, and non-zero. - *width = pow(2.0, round(log2f(w))); + *width = pow(2.0, ROUND(log2f(w))); if (*width == 0) { *width = 1; } diff -ur C:\FGCVS\Atlas\src\tiles.h Atlas-0.4.9\src\tiles.h --- C:\FGCVS\Atlas\src\tiles.h Mon Sep 19 04:14:12 2011 +++ Atlas-0.4.9\src\tiles.h Sat Oct 01 13:18:34 2011 @@ -1,3 +1,8 @@ + +#ifdef _MSC_VER +#pragma warning( disable : 4309 ) // 'initializing' : truncation of constant value +#endif + static char __scenery[180][45] = { {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff},