diff --git a/CMakeLists.txt b/CMakeLists.txt index ef8b6ade3..291656ed9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,11 @@ include (CPack) project(FlightGear) +set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "add a postfix, usually d on windows") +set(CMAKE_RELEASE_POSTFIX "" CACHE STRING "add a postfix, usually empty on windows") +set(CMAKE_RELWITHDEBINFO_POSTFIX "rd" CACHE STRING "add a postfix, usually empty on windows") +set(CMAKE_MINSIZEREL_POSTFIX "s" CACHE STRING "add a postfix, usually empty on windows") + # read 'version' file into a variable (stripping any newlines or spaces) file(READ version versionFile) string(STRIP ${versionFile} FLIGHTGEAR_VERSION) @@ -48,6 +53,7 @@ option(ENABLE_UIUC_MODEL "Set to ON to build FlightGear with UIUCModel FDM" ON) option(ENABLE_LARCSIM "Set to ON to build FlightGear with LaRCsim FDM" ON) option(ENABLE_YASIM "Set to ON to build FlightGear with YASIM FDM" ON) option(ENABLE_JSBSIM "Set to ON to build FlightGear with JSBSim FDM" ON) +option(ENABLE_FGADMIN "Set to ON to build FlightGear with FGADMIN" ON) option(EVENT_INPUT "Set to ON to build FlightGear with event-based Input support" OFF) set(MSVC_3RDPARTY_DIR NOT_FOUND CACHE PATH "Location where the third-party dependencies are extracted") @@ -94,8 +100,12 @@ find_package(OpenAL REQUIRED) find_package(ALUT REQUIRED) find_package(OpenSceneGraph 2.8.2 REQUIRED osgText osgSim osgDB osgParticle osgFX osgUtil osgViewer osgGA) +if(ENABLE_FGADMIN) + find_package(FLTK) +endif(ENABLE_FGADMIN) + find_package(PLIB REQUIRED puaux pu js fnt) -find_package(SimGear 2.0.0 REQUIRED) +find_package(SimGear 2.2.0 REQUIRED) check_include_file(unistd.h HAVE_UNISTD_H) check_include_file(sys/time.h HAVE_SYS_TIME_H) @@ -157,6 +167,7 @@ if(WIN32) endif(MSVC) set(NOMINMAX 1) + set( WINSOCK_LIBRARY "ws2_32.lib" ) endif(WIN32) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS} ${MSVC_FLAGS} -D_REENTRANT") diff --git a/projects/VC90/FlightGear/FlightGear.vcproj b/projects/VC90/FlightGear/FlightGear.vcproj index 522fb4bba..fc364e851 100644 --- a/projects/VC90/FlightGear/FlightGear.vcproj +++ b/projects/VC90/FlightGear/FlightGear.vcproj @@ -77,7 +77,7 @@ OutputFile="$(OutDir)\fgfs.exe" LinkIncremental="2" SuppressStartupBanner="true" - AdditionalLibraryDirectories="..\..\..\..\install\msvc90\OpenSceneGraph\lib;..\..\..\..\3rdParty\lib;..\..\..\..\boost_1_44_0\lib" + AdditionalLibraryDirectories="..\..\..\..\install\msvc90\OpenSceneGraph\lib;..\..\..\..\3rdParty\lib" IgnoreDefaultLibraryNames="" GenerateDebugInformation="true" SubSystem="1" @@ -165,7 +165,7 @@ OutputFile="$(OutDir)\fgfs.exe" LinkIncremental="2" SuppressStartupBanner="true" - AdditionalLibraryDirectories="..\..\..\..\install\msvc90-64\OpenSceneGraph\lib;..\..\..\..\3rdParty.x64\lib;..\..\..\..\boost_1_44_0\lib64" + AdditionalLibraryDirectories="..\..\..\..\install\msvc90-64\OpenSceneGraph\lib;..\..\..\..\3rdParty.x64\lib" IgnoreDefaultLibraryNames="" GenerateDebugInformation="true" SubSystem="1" @@ -253,7 +253,7 @@ OutputFile="$(OutDir)\fgfs.exe" LinkIncremental="1" SuppressStartupBanner="true" - AdditionalLibraryDirectories="..\..\..\..\install\msvc90\OpenSceneGraph\lib;..\..\..\..\3rdParty\lib;..\..\..\..\boost_1_44_0\lib" + AdditionalLibraryDirectories="..\..\..\..\install\msvc90\OpenSceneGraph\lib;..\..\..\..\3rdParty\lib" IgnoreDefaultLibraryNames="" GenerateDebugInformation="true" SubSystem="1" @@ -340,7 +340,7 @@ OutputFile="$(OutDir)\fgfs.exe" LinkIncremental="1" SuppressStartupBanner="true" - AdditionalLibraryDirectories="..\..\..\..\install\msvc90-64\OpenSceneGraph\lib;..\..\..\..\3rdParty.x64\lib;..\..\..\..\boost_1_44_0\lib64" + AdditionalLibraryDirectories="..\..\..\..\install\msvc90-64\OpenSceneGraph\lib;..\..\..\..\3rdParty.x64\lib" IgnoreDefaultLibraryNames="" GenerateDebugInformation="true" SubSystem="1" diff --git a/projects/VC90/GPSsmooth/GPSsmooth.vcproj b/projects/VC90/GPSsmooth/GPSsmooth.vcproj index b1b37fc75..d804c8d6a 100644 --- a/projects/VC90/GPSsmooth/GPSsmooth.vcproj +++ b/projects/VC90/GPSsmooth/GPSsmooth.vcproj @@ -46,7 +46,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src;..\..\..\..\SimGear;..\..\..\..\install\msvc90\OpenSceneGraph\include;..\..\..\..\3rdParty\include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;HAVE_WINDOWS_H" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -126,7 +126,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\src;..\..\..\..\SimGear;..\..\..\..\install\msvc90-64\OpenSceneGraph\include;..\..\..\..\3rdParty.x64\include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;HAVE_WINDOWS_H" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -204,7 +204,7 @@ 12000) continue; - if (coverage == scattered) { - if (!did_some) transmission += " " + Sky_condition + ": "; - did_some++; + +// BEWARE: At the present time, the environment system has no +// way (so far as I know) to represent a "thin broken" or +// "thin overcast" layer. If/when such things are implemented +// in the environment system, code will have to be written here +// to handle them. + +// First, do the prefix if any: + if (coverage == scattered || coverage == few) { + if (!did_some) { + transmission += " " + Sky_condition + ": "; + did_some++; + } } else /* must be a ceiling */ if (!did_ceiling) { transmission += " " + Ceiling + ": "; did_ceiling++; did_some++; } else { - transmission += " "; + transmission += " "; // no prefix required } int cig00 = int(SGMiscd::round(ceiling/100)); // hundreds of feet if (cig00) { int cig000 = cig00/10; cig00 -= cig000*10; // just the hundreds digit if (cig000) { - snprintf(buf, bs, "%i", cig000); - transmission += ConvertNumToSpokenDigits(buf); - transmission += " " + thousand + " "; + snprintf(buf, bs, "%i", cig000); + transmission += ConvertNumToSpokenDigits(buf); + transmission += " " + thousand + " "; } if (cig00) { - snprintf(buf, bs, "%i", cig00); - transmission += ConvertNumToSpokenDigits(buf); - transmission += " " + hundred + " "; + snprintf(buf, bs, "%i", cig00); + transmission += ConvertNumToSpokenDigits(buf); + transmission += " " + hundred + " "; } } else { // Should this be "sky obscured?" @@ -368,6 +403,7 @@ int FGATIS::GenTransmission(const int regen, const int special) { } transmission += coverage + BRK; } + if (!did_some) transmission += " " + Sky + " " + clear + BRK; transmission += Temperature + ": "; double Tsl = fgGetDouble("/environment/temperature-sea-level-degc"); @@ -377,7 +413,7 @@ int FGATIS::GenTransmission(const int regen, const int special) { } snprintf(buf, bs, "%i", abs(temp)); transmission += ConvertNumToSpokenDigits(buf); - transmission += " " + Celsius; + if (US_CA) transmission += " " + Celsius; transmission += " " + dewpoint + " "; double dpsl = fgGetDouble("/environment/dewpoint-sea-level-degc"); temp = int(SGMiscd::round(FGAtmo().fake_dp_vs_a_us(dpsl, _geod.getElevationFt()))); @@ -386,7 +422,8 @@ int FGATIS::GenTransmission(const int regen, const int special) { } snprintf(buf, bs, "%i", abs(temp)); transmission += ConvertNumToSpokenDigits(buf); - transmission += " " + Celsius + BRK; + if (US_CA) transmission += " " + Celsius; + transmission += BRK; transmission += Visibility + ": "; double visibility = fgGetDouble("/environment/config/boundary/entry[0]/visibility-m"); @@ -409,7 +446,6 @@ int FGATIS::GenTransmission(const int regen, const int special) { } transmission += BRK; - transmission += Altimeter + ": "; double myQNH; double Psl = fgGetDouble("/environment/pressure-sea-level-inhg"); { @@ -424,17 +460,21 @@ int FGATIS::GenTransmission(const int regen, const int special) { #endif myQNH = FGAtmo().QNH(_geod.getElevationM(), press); } - if(ident.substr(0,2) == "EG" && fgGetBool("/sim/atc/use-millibars")) { - // Convert to millibars for the UK! + +// Convert to millibars for most of the world (not US, not CA) + if((!US_CA) && fgGetBool("/sim/atc/use-millibars")) { + transmission += QNH + ": "; myQNH /= mbar; if (myQNH > 1000) myQNH -= 1000; // drop high digit snprintf(buf, bs, "%03.0f", myQNH); + transmission += ConvertNumToSpokenDigits(buf) + " " + millibars + BRK; } else { - myQNH /= inHg; - myQNH *= 100.; // shift two decimal places - snprintf(buf, bs, "%04.0f", myQNH); + transmission += Altimeter + ": "; + double asetting = myQNH / inHg; // use inches of mercury + asetting *= 100.; // shift two decimal places + snprintf(buf, bs, "%04.0f", asetting); + transmission += ConvertNumToSpokenDigits(buf) + BRK; } - transmission += ConvertNumToSpokenDigits(buf) + BRK; if (_type == ATIS /* as opposed to AWOS */) { const FGAirport* apt = fgFindAirportID(ident); @@ -456,27 +496,8 @@ int FGATIS::GenTransmission(const int regen, const int special) { transmission += phonetic_seq_string; transmission += "... " + BRK + PAUSE + PAUSE; } -#ifdef ATIS_TEST - cout << "**** ATIS active on:"; -#endif - for (map::iterator act = active_on.begin(); act != active_on.end(); act++){ - string prop = "/instrumentation/" + act->first + "/atis"; - globals->get_props()->setStringValue(prop.c_str(), - ("
\n" + transmission + "
\n").c_str()); -#ifdef ATIS_TEST - cout << " " << prop; -#endif - } -#ifdef ATIS_TEST - cout << " ****" << endl; - cout << transmission << endl; -// Note that even if we aren't outputting the transmission -// on stdout, you can still see it by pointing a web browser -// at the property tree. The second comm radio is: -// http://localhost:5400/instrumentation/comm[1] -#endif - -// Take the previous English-looking string and munge it to + transmission_readable = transmission; +// Take the previous readable string and munge it to // be relatively-more acceptable to the primitive tts system. // Note that : ; and . are among the token-delimeters recognized // by the tts system. @@ -487,3 +508,27 @@ int FGATIS::GenTransmission(const int regen, const int special) { } return 1; } + +// Put the transmission into the property tree, +// possibly in multiple places if multiple radios +// are tuned to the same ATIS. +// You can see it by pointing a web browser +// at the property tree. The second comm radio is: +// http://localhost:5400/instrumentation/comm[1] +// +// (Also, if in debug mode, dump it to the console.) +void FGATIS::TreeOut(int msg_OK){ + for (map::iterator act = active_on.begin(); + act != active_on.end(); + act++){ + string prop = "/instrumentation/" + act->first + "/atis"; + globals->get_props()->setStringValue(prop.c_str(), + ("
\n" + transmission_readable + "
\n").c_str()); +#ifdef ATIS_TEST + if (msg_OK) cout << "**** ATIS active on: " << prop << endl; +#endif + } +#ifdef ATIS_TEST + if (msg_OK) cout << transmission_readable << endl; +#endif +} diff --git a/src/ATCDCL/atis.hxx b/src/ATCDCL/atis.hxx index cd35ea476..76809eb09 100644 --- a/src/ATCDCL/atis.hxx +++ b/src/ATCDCL/atis.hxx @@ -39,10 +39,15 @@ typedef std::map MSS; class FGATIS : public FGATC { //atc_type type; - std::string transmission; // The actual ATIS transmission - // This is not stored in default.atis but is generated - // from the prevailing conditions when required. + + // The actual ATIS transmission + // This is generated from the prevailing conditions when required. + // This is the version with markup, suitable for voice synthesis: + std::string transmission; + // Same as above, but in a form more readable as text. + std::string transmission_readable; + // for failure modeling std::string trans_ident; // transmitted ident double old_volume; @@ -82,9 +87,13 @@ class FGATIS : public FGATC { std::string refname; // Holds the refname of a transmission in progress - int GenTransmission(const int regen, - const int special); // Generate the transmission string + // Generate the ATIS transmission text: + int GenTransmission(const int regen, const int special); + // Put the text into the property tree + // (and in debug mode, print it on the console): + void TreeOut(int msgOK); + friend std::istream& operator>> ( std::istream&, FGATIS& ); }; diff --git a/src/ATCDCL/atis_lexicon.hxx b/src/ATCDCL/atis_lexicon.hxx index 37c2a03df..d201674ff 100644 --- a/src/ATCDCL/atis_lexicon.hxx +++ b/src/ATCDCL/atis_lexicon.hxx @@ -3,6 +3,9 @@ #include +// NOTE: This file serves as a database. +// It is read by some utility programs that synthesize +// the library of spoken words. #define Q(word) const std::string word(#word); @@ -41,6 +44,7 @@ Q(broken) Q(overcast) Q(thin) Q(Sky_condition) +Q(Sky) Q(Ceiling) Q(minus) Q(dewpoint) @@ -51,6 +55,8 @@ Q(one_half) Q(three_quarters) Q(one_and_one_half) Q(Altimeter) +Q(QNH) +Q(millibars) Q(Landing_and_departing_runway) Q(On_initial_contact_advise_you_have_information) Q(This_is) diff --git a/src/ATCDCL/atis_remap.hxx b/src/ATCDCL/atis_remap.hxx index c2341a2f0..2497197b3 100644 --- a/src/ATCDCL/atis_remap.hxx +++ b/src/ATCDCL/atis_remap.hxx @@ -1,3 +1,7 @@ +// NOTE: This file serves as a database. +// It is read by some utility programs that synthesize +// the library of spoken words. + REMAP(Intl, International) REMAP(Rgnl, Regional) REMAP(Co, County) diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt index f7fad8a71..f3caabb8b 100644 --- a/utils/CMakeLists.txt +++ b/utils/CMakeLists.txt @@ -1,3 +1,7 @@ add_subdirectory(TerraSync) add_subdirectory(fgviewer) +add_subdirectory(GPSsmooth) +if (FLTK_FOUND) + add_subdirectory(fgadmin) +endif (FLTK_FOUND) diff --git a/utils/GPSsmooth/CMakeLists.txt b/utils/GPSsmooth/CMakeLists.txt new file mode 100644 index 000000000..78bc778ef --- /dev/null +++ b/utils/GPSsmooth/CMakeLists.txt @@ -0,0 +1,48 @@ + +add_executable(GPSsmooth gps.cxx gps_main.cxx) +add_executable(MIDGsmooth MIDG-II.cxx MIDG_main.cxx) +add_executable(UGsmooth UGear.cxx UGear_command.cxx UGear_main.cxx UGear_telnet.cxx) + +target_link_libraries(GPSsmooth + ${SIMGEAR_DEBUG_LIBRARY} + ${SIMGEAR_IO_LIBRARY} + ${SIMGEAR_MISC_LIBRARY} + ${SIMGEAR_STRUCTURE_LIBRARY} + ${SIMGEAR_TIMING_LIBRARY} + ${PLIB_SG_LIBRARY} + ${PLIB_UL_LIBRARY} + ${ZLIB_LIBRARIES} + ${WINMM_LIBRARY} + ${WINSOCK_LIBRARY} + ${ZLIB_LIBRARIES} +) + +target_link_libraries(MIDGsmooth + ${SIMGEAR_DEBUG_LIBRARY} + ${SIMGEAR_IO_LIBRARY} + ${SIMGEAR_MATH_LIBRARY} + ${SIMGEAR_SERIAL_LIBRARY} + ${SIMGEAR_STRUCTURE_LIBRARY} + ${SIMGEAR_TIMING_LIBRARY} + ${PLIB_SG_LIBRARY} + ${PLIB_UL_LIBRARY} + ${WINMM_LIBRARY} + ${WINSOCK_LIBRARY} +) + +target_link_libraries(UGsmooth + ${SIMGEAR_DEBUG_LIBRARY} + ${SIMGEAR_IO_LIBRARY} + ${SIMGEAR_MATH_LIBRARY} + ${SIMGEAR_MISC_LIBRARY} + ${SIMGEAR_SERIAL_LIBRARY} + ${SIMGEAR_STRUCTURE_LIBRARY} + ${SIMGEAR_TIMING_LIBRARY} + ${PLIB_SG_LIBRARY} + ${PLIB_UL_LIBRARY} + ${WINMM_LIBRARY} + ${WINSOCK_LIBRARY} + ${ZLIB_LIBRARIES} +) + +install(TARGETS GPSsmooth MIDGsmooth UGsmooth RUNTIME DESTINATION bin) diff --git a/utils/GPSsmooth/MIDG_main.cxx b/utils/GPSsmooth/MIDG_main.cxx index 613f1d39d..118c6198b 100644 --- a/utils/GPSsmooth/MIDG_main.cxx +++ b/utils/GPSsmooth/MIDG_main.cxx @@ -2,16 +2,22 @@ # include #endif +#ifdef HAVE_WINDOWS_H +# include +#else +# include // htonl() ntohl() +#endif + #include #include -#include #include #include #include // endian tests #include #include +#include #include #include @@ -27,7 +33,7 @@ using std::string; // Network channels -static netSocket fdm_sock, ctrls_sock; +static simgear::Socket fdm_sock, ctrls_sock; // midg data MIDGTrack track; @@ -394,7 +400,7 @@ int main( int argc, char **argv ) { // Setup up outgoing network connections - netInit( &argc,argv ); // We must call this before any other net stuff + simgear::Socket::initSockets(); // We must call this before any other net stuff if ( ! fdm_sock.open( false ) ) { // open a UDP socket cout << "error opening fdm output socket" << endl; diff --git a/utils/GPSsmooth/Makefile.am b/utils/GPSsmooth/Makefile.am index c0d4edebd..b3c7ee6b4 100644 --- a/utils/GPSsmooth/Makefile.am +++ b/utils/GPSsmooth/Makefile.am @@ -16,7 +16,7 @@ GPSsmooth_SOURCES = \ gps_main.cxx GPSsmooth_LDADD = \ - $(GPSsmooth_PLIB_LIBS) -lsgtiming -lsgmisc -lsgdebug \ + $(GPSsmooth_PLIB_LIBS) -lsgio -lsgtiming -lsgmisc -lsgdebug -lsgstructure \ $(joystick_LIBS) $(network_LIBS) $(base_LIBS) -lz MIDGsmooth_SOURCES = \ @@ -37,7 +37,7 @@ UGsmooth_SOURCES = \ UGsmooth_LDADD = \ $(UGsmooth_PLIB_LIBS) -lsgio -lsgserial -lsgtiming \ - -lsgmath -lsgbucket -lsgmisc -lsgdebug \ + -lsgmath -lsgbucket -lsgmisc -lsgdebug -lsgstructure \ $(joystick_LIBS) $(network_LIBS) $(base_LIBS) -lz INCLUDES = -I$(top_srcdir)/src diff --git a/utils/GPSsmooth/UGear_main.cxx b/utils/GPSsmooth/UGear_main.cxx index e814c2e07..43d44b6f2 100644 --- a/utils/GPSsmooth/UGear_main.cxx +++ b/utils/GPSsmooth/UGear_main.cxx @@ -2,6 +2,12 @@ # include #endif +#ifdef HAVE_WINDOWS_H +# include +#else +# include // htonl() ntohl() +#endif + #ifndef _WIN32 # include // for bzero() #else @@ -10,12 +16,12 @@ #include #include -#include #include #include #include // endian tests #include +#include #include #include #include @@ -35,7 +41,7 @@ using std::string; // Network channels -static netSocket fdm_sock, ctrls_sock, opengc_sock; +static simgear::Socket fdm_sock, ctrls_sock, opengc_sock; // ugear data UGTrack track; @@ -658,7 +664,7 @@ int main( int argc, char **argv ) { // Setup up outgoing network connections - netInit( &argc,argv ); // We must call this before any other net stuff + simgear::Socket::initSockets(); // We must call this before any other net stuff if ( ! opengc_sock.open( false ) ) { // open a UDP socket cout << "error opening opengc output socket" << endl; diff --git a/utils/GPSsmooth/UGear_telnet.cxx b/utils/GPSsmooth/UGear_telnet.cxx index 602a6a9d8..be5b02e9f 100644 --- a/utils/GPSsmooth/UGear_telnet.cxx +++ b/utils/GPSsmooth/UGear_telnet.cxx @@ -23,14 +23,13 @@ // $Id$ +#include #include #include #include #include -#include - #include "UGear_command.hxx" #include "UGear_telnet.hxx" @@ -41,9 +40,9 @@ using std::ends; * Props connection class. * This class represents a connection to props client. */ -class PropsChannel : public netChat +class PropsChannel : public simgear::NetChat { - netBuffer buffer; + simgear::NetBuffer buffer; /** * Current property node name. @@ -188,9 +187,9 @@ UGTelnet::open() return false; } - netChannel::open(); - netChannel::bind( "", port ); - netChannel::listen( 5 ); + simgear::NetChannel::open(); + simgear::NetChannel::bind( "", port ); + simgear::NetChannel::listen( 5 ); printf("Telnet server started on port %d\n", port ); enabled = true; @@ -214,7 +213,7 @@ UGTelnet::close() bool UGTelnet::process() { - netChannel::poll(); + simgear::NetChannel::poll(); return true; } @@ -224,8 +223,8 @@ UGTelnet::process() void UGTelnet::handleAccept() { - netAddress addr; - int handle = netChannel::accept( &addr ); + simgear::IPAddress addr; + int handle = simgear::NetChannel::accept( &addr ); printf("Telent server accepted connection from %s:%d\n", addr.getHost(), addr.getPort() ); PropsChannel* channel = new PropsChannel(); diff --git a/utils/GPSsmooth/UGear_telnet.hxx b/utils/GPSsmooth/UGear_telnet.hxx index 34500a5c9..15e88633e 100644 --- a/utils/GPSsmooth/UGear_telnet.hxx +++ b/utils/GPSsmooth/UGear_telnet.hxx @@ -33,7 +33,7 @@ using std::string; using std::vector; -#include +#include /** @@ -41,7 +41,7 @@ using std::vector; * This class provides a telnet-like server for remote access to * FlightGear properties. */ -class UGTelnet: netChannel +class UGTelnet: simgear::NetChannel { private: diff --git a/utils/GPSsmooth/gps_main.cxx b/utils/GPSsmooth/gps_main.cxx index f5a10d7ac..5dfc76c67 100644 --- a/utils/GPSsmooth/gps_main.cxx +++ b/utils/GPSsmooth/gps_main.cxx @@ -2,13 +2,19 @@ # include #endif +#ifdef HAVE_WINDOWS_H +# include +#else +# include // htonl() ntohl() +#endif + #include #include -#include #include #include // endian tests +#include #include #include @@ -23,7 +29,7 @@ using std::string; // Network channels -static netSocket fdm_sock, ctrls_sock; +static simgear::Socket fdm_sock, ctrls_sock; // gps data GPSTrack track; @@ -369,7 +375,7 @@ int main( int argc, char **argv ) { // Setup up outgoing network connections - netInit( &argc,argv ); // We must call this before any other net stuff + simgear::Socket::initSockets(); // We must call this before any other net stuff if ( ! fdm_sock.open( false ) ) { // open a UDP socket cout << "error opening fdm output socket" << endl; diff --git a/utils/TerraSync/CMakeLists.txt b/utils/TerraSync/CMakeLists.txt index ae3af2f99..bedc1018d 100644 --- a/utils/TerraSync/CMakeLists.txt +++ b/utils/TerraSync/CMakeLists.txt @@ -5,7 +5,8 @@ add_executable(terrasync terrasync.cxx) target_link_libraries(terrasync ${SIMGEAR_LIBRARIES} - ${ZLIB_LIBRARIES}) + ${ZLIB_LIBRARIES} + ${WINSOCK_LIBRARY}) if(HAVE_SVN_CLIENT) target_link_libraries(terrasync ${SVN_CLIENT_LIBRARIES}) diff --git a/utils/TerraSync/terrasync.cxx b/utils/TerraSync/terrasync.cxx index d48e43f77..bcf6e0ca8 100644 --- a/utils/TerraSync/terrasync.cxx +++ b/utils/TerraSync/terrasync.cxx @@ -33,7 +33,11 @@ #include #include #elif defined(_MSC_VER) -#include +# include +# ifndef HAVE_SVN_CLIENT_H +# include +# include +# endif #endif #include // atoi() atof() abs() system() diff --git a/utils/fgadmin/CMakeLists.txt b/utils/fgadmin/CMakeLists.txt new file mode 100644 index 000000000..febd4f0ab --- /dev/null +++ b/utils/fgadmin/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(src) diff --git a/utils/fgadmin/src/CMakeLists.txt b/utils/fgadmin/src/CMakeLists.txt new file mode 100644 index 000000000..045ab0b4f --- /dev/null +++ b/utils/fgadmin/src/CMakeLists.txt @@ -0,0 +1,11 @@ + +add_executable(fgadmin fgadmin.cxx fgadmin_funcs.cxx main.cxx untarka.c) + +target_link_libraries(fgadmin + ${SIMGEAR_LIBRARIES} + ${ZLIB_LIBRARIES} + ${PLIB_LIBRARIES} + ${FLTK_LIBRARIES} +) + +install(TARGETS fgadmin RUNTIME DESTINATION bin)