From cdd5b3e4f186828662ddb15d8fc95375cfad9a52 Mon Sep 17 00:00:00 2001 From: oaq Date: Thu, 2 Jul 2026 13:39:32 +1000 Subject: [PATCH] str2str: support building this console app under win32 Add BCC and MSC project files, and cmake support. --- app/consapp/CMakeLists.txt | 10 +- app/consapp/rtklib_consapp.groupproj | 18 +- app/consapp/str2str/bcc/_str2str.cbproj | 1355 +++++++++++++++++++++++ app/consapp/str2str/bcc/clean.bat | 22 + app/consapp/str2str/bcc/install.bat | 1 + app/consapp/str2str/msc/clean.bat | 19 + app/consapp/str2str/msc/install.bat | 1 + app/consapp/str2str/msc/msc.sln | 31 + app/consapp/str2str/msc/msc.vcxproj | 203 ++++ app/consapp/str2str/str2str.c | 19 +- 10 files changed, 1665 insertions(+), 14 deletions(-) create mode 100644 app/consapp/str2str/bcc/_str2str.cbproj create mode 100644 app/consapp/str2str/bcc/clean.bat create mode 100644 app/consapp/str2str/bcc/install.bat create mode 100644 app/consapp/str2str/msc/clean.bat create mode 100644 app/consapp/str2str/msc/install.bat create mode 100644 app/consapp/str2str/msc/msc.sln create mode 100644 app/consapp/str2str/msc/msc.vcxproj diff --git a/app/consapp/CMakeLists.txt b/app/consapp/CMakeLists.txt index 10cb3f565..1e7e69681 100644 --- a/app/consapp/CMakeLists.txt +++ b/app/consapp/CMakeLists.txt @@ -13,15 +13,15 @@ add_executable(pos2kml pos2kml/pos2kml.c) target_link_libraries(pos2kml rtklib) install(TARGETS pos2kml RUNTIME DESTINATION bin) +add_executable(str2str str2str/str2str.c) +target_link_libraries(str2str rtklib) +install(TARGETS str2str RUNTIME DESTINATION bin) + # add executables only supported on unix-like systems if (UNIX) add_executable(rtkrcv rtkrcv/rtkrcv.c rtkrcv/vt.c) target_link_libraries(rtkrcv rtklib) install(TARGETS rtkrcv RUNTIME DESTINATION bin) - - add_executable(str2str str2str/str2str.c) - target_link_libraries(str2str rtklib) - install(TARGETS str2str RUNTIME DESTINATION bin) endif() # add additional libraries to compile on windows @@ -29,9 +29,9 @@ if(WIN32) target_link_libraries(rnx2rtkp wsock32 ws2_32) target_link_libraries(convbin wsock32 ws2_32) target_link_libraries(pos2kml wsock32 ws2_32) + target_link_libraries(str2str wsock32 ws2_32) endif() - ### define tests # convbin add_test(NAME convbin_test1 COMMAND convbin -r nov ${TEST_DATA_DIR}/rcvraw/oemv_200911218.gps -ti 10 -d . -os) diff --git a/app/consapp/rtklib_consapp.groupproj b/app/consapp/rtklib_consapp.groupproj index eb5253f88..4b8b7472f 100644 --- a/app/consapp/rtklib_consapp.groupproj +++ b/app/consapp/rtklib_consapp.groupproj @@ -12,6 +12,9 @@ + + + Default.Personality.12 @@ -47,14 +50,23 @@ + + + + + + + + + - + - + - + diff --git a/app/consapp/str2str/bcc/_str2str.cbproj b/app/consapp/str2str/bcc/_str2str.cbproj new file mode 100644 index 000000000..7a2abebb2 --- /dev/null +++ b/app/consapp/str2str/bcc/_str2str.cbproj @@ -0,0 +1,1355 @@ + + + {AE35571B-56E7-4D62-B782-3A1F44084EC5} + CppConsoleApplication + True + Release + None + 20.1 + Win64 + 2 + Console + _str2str + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + true + Cfg_2 + true + true + + + true + Cfg_2 + true + true + + + $(BDS)\bin\cbuilder_PROJECTICNS.icns + $(BDS)\bin\cbuilder_PROJECTICON.ico + _str2str + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace) + ..\;..\..\..\..\src\rcv\;..\..\..\..\src\;$(IncludePath) + None + 1041 + vclx.bpi;vcl.bpi;rtl.bpi;dbrtl.bpi;vcldb.bpi;dbxcds.bpi;dbexpress.bpi;xmlrtl.bpi;vclie.bpi;inet.bpi;inetdbbde.bpi;inetdbxpress.bpi;dsnap.bpi;adortl.bpi;soaprtl.bpi;bdertl.bpi;vcldbx.bpi;$(PackageImports) + ..\..\..\..\src;..\;..\..\..\..\src\rcv;$(BDS)\include;$(BDS)\include\vcl;$(TASM_IncludePath) + ..\..\..\..\src\rcv;..\;..\..\..\..\src;..\..\str2str;$(DCC_ObjPath) + ..\..\..\..\src;..\;..\..\..\..\src\rcv;$(BDS)\include;$(BDS)\include\vcl;$(BRCC_IncludePath) + false + ..\..\..\..\src\rcv;..\;..\..\..\..\src;..\..\str2str;$(BDS)\lib;$(BDS)\lib\obj;$(DCC_IncludePath) + ..\..\..\..\src\rcv;..\;..\..\..\..\src;..\..\str2str;$(ILINK_ObjectSearchPath) + false + ..\..\..\..\src;..\..\..\..\src\rcv;$(BDS)\include;$(BCC_IncludePath) + ..\..\..\..\src\rcv;..\;..\..\..\..\src;..\..\str2str;$(BDS)\lib;$(BDS)\lib\obj;$(DCC_UnitSearchPath) + ..\..\..\..\src\rcv;..\;..\..\..\..\src;..\..\str2str;$(DCC_ResourcePath) + ..\..\..\..\src\rcv\;..\..\..\..\src\;..\..\str2str;$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;$(ILINK_LibraryPath) + JPHNE + _RTLDLL;_NO_VCL;WIN32;ENAGLO;TRACE;ENAQZS;ENAGAL;NFREQ=4;NEXOBS=3;SVR_REUSEADDR;$(TASM_Defines) + _RTLDLL;_NO_VCL;WIN32;ENAGLO;TRACE;ENAQZS;ENAGAL;NFREQ=4;NEXOBS=3;SVR_REUSEADDR;$(BRCC_Defines) + _RTLDLL;WIN32;TRACE;ENAGLO;ENAQZS;ENAGAL;ENACMP;NFREQ=4;NEXOBS=3;SVR_REUSEADDR;$(BCC_Defines) + + + exe + -tWM -tWC + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + 1033 + true + Debug + CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments= + none + + + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) + Debug + CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments= + 1033 + none + + + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) + Debug + CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments= + 1033 + $(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_44.png + $(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_150.png + + + -V + DEBUG;$(DCC_Define);$(DCC_Define) + Debug_Build + true + true + true + true + false + Full + true + $(BDS)\lib\debug;$(ILINK_LibraryPath);$(ILINK_LibraryPath) + true + true + + + -tWM -tWC -k + _DEBUG;$(BCC_Defines);$(BCC_Defines) + 1033 + CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments= + + + _DEBUG;$(BCC_Defines);$(BCC_Defines) + 1033 + CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments= + + + -$O+ + Release_Build + None + true + $(BDS)\lib\release;$(ILINK_LibraryPath);$(ILINK_LibraryPath) + + + NDEBUG;$(BCC_Defines);$(BCC_Defines) + -tWM -tWC -r + false + false + false + 1033 + CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments= + + + NDEBUG;$(BCC_Defines);$(BCC_Defines) + 1033 + CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments= + + + + 8 + 3 + + + 7 + 14 + + + 9 + 2 + + + 3 + 10 + + + 20 + + + 9 + 4 + + + 5 + 16 + + + 5 + 14 + + + 18 + + + 25 + + + 26 + + + 6 + 13 + + + 24 + + + 7 + 12 + + + 26 + + + 12 + 1 + + + 17 + + + 16 + + + 19 + + + 11 + + + 22 + + + 23 + + + -1 + 1 + + + 28 + + + 24 + + + Base + + + Cfg_1 + Base + + + Cfg_2 + Base + + + + CPlusPlusBuilder.Personality.12 + CppConsoleApplication + + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1041 + 932 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + + + + rtcm3_testglo.rtcm3 -tr 2009/12/18 23:20 + + True + + + + + + + False + + False + + True + False + + + Embarcadero C++Builder Office 2000 Servers Package + Embarcadero C++Builder Office XP Servers Package + + + False + True + True + False + + + + False + True + False + + + + + + true + + + + + true + + + + + true + + + + + + true + + + + + true + + + + + + + + true + + + + + + + + + + + true + + + + + true + + + + + true + + + + + true + + + + + true + + + + + + + + + + + true + + + + + true + + + + + true + + + + + true + + + + + + + + + + + true + + + + + true + + + + + true + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + _str2str.exe + true + + + + + 1 + + + 0 + + + + + classes + 64 + + + classes + 64 + + + + + res\xml + 1 + + + res\xml + 1 + + + + + library\lib\armeabi-v7a + 1 + + + + + library\lib\armeabi + 1 + + + library\lib\armeabi + 1 + + + + + library\lib\armeabi-v7a + 1 + + + + + library\lib\mips + 1 + + + library\lib\mips + 1 + + + + + library\lib\armeabi-v7a + 1 + + + library\lib\arm64-v8a + 1 + + + + + library\lib\armeabi-v7a + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\drawable-anydpi-v21 + 1 + + + res\drawable-anydpi-v21 + 1 + + + + + res\values + 1 + + + res\values + 1 + + + + + res\values-v21 + 1 + + + res\values-v21 + 1 + + + + + res\values-v31 + 1 + + + res\values-v31 + 1 + + + + + res\drawable-anydpi-v26 + 1 + + + res\drawable-anydpi-v26 + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\drawable-anydpi-v33 + 1 + + + res\drawable-anydpi-v33 + 1 + + + + + res\values + 1 + + + res\values + 1 + + + + + res\values-night-v21 + 1 + + + res\values-night-v21 + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\drawable-xxhdpi + 1 + + + res\drawable-xxhdpi + 1 + + + + + res\drawable-xxxhdpi + 1 + + + res\drawable-xxxhdpi + 1 + + + + + res\drawable-ldpi + 1 + + + res\drawable-ldpi + 1 + + + + + res\drawable-mdpi + 1 + + + res\drawable-mdpi + 1 + + + + + res\drawable-hdpi + 1 + + + res\drawable-hdpi + 1 + + + + + res\drawable-xhdpi + 1 + + + res\drawable-xhdpi + 1 + + + + + res\drawable-mdpi + 1 + + + res\drawable-mdpi + 1 + + + + + res\drawable-hdpi + 1 + + + res\drawable-hdpi + 1 + + + + + res\drawable-xhdpi + 1 + + + res\drawable-xhdpi + 1 + + + + + res\drawable-xxhdpi + 1 + + + res\drawable-xxhdpi + 1 + + + + + res\drawable-xxxhdpi + 1 + + + res\drawable-xxxhdpi + 1 + + + + + res\drawable-small + 1 + + + res\drawable-small + 1 + + + + + res\drawable-normal + 1 + + + res\drawable-normal + 1 + + + + + res\drawable-large + 1 + + + res\drawable-large + 1 + + + + + res\drawable-xlarge + 1 + + + res\drawable-xlarge + 1 + + + + + res\values + 1 + + + res\values + 1 + + + + + res\drawable-anydpi-v24 + 1 + + + res\drawable-anydpi-v24 + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\drawable-night-anydpi-v21 + 1 + + + res\drawable-night-anydpi-v21 + 1 + + + + + res\drawable-anydpi-v31 + 1 + + + res\drawable-anydpi-v31 + 1 + + + + + res\drawable-night-anydpi-v31 + 1 + + + res\drawable-night-anydpi-v31 + 1 + + + + + 1 + + + 1 + + + 0 + + + + + 1 + .framework + + + 1 + .framework + + + 1 + .framework + + + 0 + + + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + 0 + .dll;.bpl + + + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + 0 + .bpl + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 1 + + + 1 + + + + + + + + Contents\Resources + 1 + + + Contents\Resources + 1 + + + Contents\Resources + 1 + + + + + library\lib\armeabi-v7a + 1 + + + library\lib\arm64-v8a + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 0 + + + + + library\lib\armeabi-v7a + 1 + + + + + 1 + + + 1 + + + 1 + + + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + + + + + + 1 + + + 1 + + + 1 + + + + + Assets + 1 + + + Assets + 1 + + + Assets + 1 + + + + + Assets + 1 + + + Assets + 1 + + + Assets + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + + + + + + + + + + + + + + 12 + + + + + diff --git a/app/consapp/str2str/bcc/clean.bat b/app/consapp/str2str/bcc/clean.bat new file mode 100644 index 000000000..5bf367e75 --- /dev/null +++ b/app/consapp/str2str/bcc/clean.bat @@ -0,0 +1,22 @@ +del Release_Build\*.obj +del Release_Build\*.tds +del Release_Build\*.exe +del Release_Build\*.pch +del Release_Build\*.map +del Release_Build\*.ilc +del Release_Build\*.ild +del Release_Build\*.ilf +del Release_Build\*.ils +del Release_Build\*.o +del Release_Build\*.d +del Debug_Build\*.obj +del Debug_Build\*.tds +del Debug_Build\*.exe +del Debug_Build\*.pch +del Debug_Build\*.map +del Debug_Build\*.ilc +del Debug_Build\*.ild +del Debug_Build\*.ilf +del Debug_Build\*.ils +del Debug_Build\*.o +del Debug_Build\*.d diff --git a/app/consapp/str2str/bcc/install.bat b/app/consapp/str2str/bcc/install.bat new file mode 100644 index 000000000..8b5c7d3e3 --- /dev/null +++ b/app/consapp/str2str/bcc/install.bat @@ -0,0 +1 @@ +copy Release_Build\_str2str.exe ..\..\..\..\..\RTKLIB_bin\bin\str2str.exe diff --git a/app/consapp/str2str/msc/clean.bat b/app/consapp/str2str/msc/clean.bat new file mode 100644 index 000000000..cc57642c6 --- /dev/null +++ b/app/consapp/str2str/msc/clean.bat @@ -0,0 +1,19 @@ +del Release\*.obj +del Release\*.exe +del Release\*.res +del Release\*.manifest +del Release\*.pdb +del Release\*.idb +del Release\*.ilk +del Release\*.dep +del Release\*.htm +del Debug\*.obj +del Debug\*.exe +del Debug\*.res +del Debug\*.manifest +del Debug\*.pdb +del Debug\*.idb +del Debug\*.ilk +del Debug\*.dep +del Debug\*.htm +del *.ncb diff --git a/app/consapp/str2str/msc/install.bat b/app/consapp/str2str/msc/install.bat new file mode 100644 index 000000000..15d1dc9b7 --- /dev/null +++ b/app/consapp/str2str/msc/install.bat @@ -0,0 +1 @@ +copy Release\str2str.exe ..\..\..\bin diff --git a/app/consapp/str2str/msc/msc.sln b/app/consapp/str2str/msc/msc.sln new file mode 100644 index 000000000..ce19c222e --- /dev/null +++ b/app/consapp/str2str/msc/msc.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 18 +VisualStudioVersion = 18.6.11822.322 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{1908dcd7-d2dc-436a-a85f-85deb6c51246}") = "msc", "msc.vcxproj", "{83aeda6c-73c5-40c6-a91d-c51f7d2513ae}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {83aeda6c-73c5-40c6-a91d-c51f7d2513ae}.Debug|Win32.ActiveCfg = Debug|Win32 + {83aeda6c-73c5-40c6-a91d-c51f7d2513ae}.Debug|Win32.Build.0 = Debug|Win32 + {83aeda6c-73c5-40c6-a91d-c51f7d2513ae}.Debug|x64.ActiveCfg = Debug|x64 + {83aeda6c-73c5-40c6-a91d-c51f7d2513ae}.Debug|x64.Build.0 = Debug|x64 + {83aeda6c-73c5-40c6-a91d-c51f7d2513ae}.Release|Win32.ActiveCfg = Release|Win32 + {83aeda6c-73c5-40c6-a91d-c51f7d2513ae}.Release|Win32.Build.0 = Release|Win32 + {83aeda6c-73c5-40c6-a91d-c51f7d2513ae}.Release|x64.ActiveCfg = Release|x64 + {83aeda6c-73c5-40c6-a91d-c51f7d2513ae}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {3E1704BE-3ED0-4969-81B9-0AD591AF4943} + EndGlobalSection +EndGlobal diff --git a/app/consapp/str2str/msc/msc.vcxproj b/app/consapp/str2str/msc/msc.vcxproj new file mode 100644 index 000000000..ddefed10b --- /dev/null +++ b/app/consapp/str2str/msc/msc.vcxproj @@ -0,0 +1,203 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {83aeda6c-73c5-40c6-a91d-c51f7d2513ae} + msc + Win32Proj + 10.0 + + + + Application + NotSet + true + v145 + + + Application + NotSet + true + v145 + + + Application + NotSet + v145 + + + Application + NotSet + v145 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + true + true + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + false + str2str + str2str + str2str + str2str + + + + Disabled + ..\..\..\..\src;%(AdditionalIncludeDirectories) + WIN32;WIN_STATIC;TRACE;_CRT_SECURE_NO_DEPRECATE;ENAGLO;ENAQZS;ENAGAL;ENACMP;ENAIRN;NFREQ=4;NEXOBS=3;SVR_REUSEADDR;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + ws2_32.lib;%(AdditionalDependencies) + $(OutDir)str2str.exe + true + Console + false + + + MachineX86 + + + + + Disabled + ..\..\..\..\src;%(AdditionalIncludeDirectories) + WIN32;WIN_STATIC;TRACE;_CRT_SECURE_NO_DEPRECATE;ENAGLO;ENAQZS;ENAGAL;ENACMP;ENAIRN;NFREQ=4;NEXOBS=3;SVR_REUSEADDR;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + ws2_32.lib;%(AdditionalDependencies) + $(OutDir)str2str.exe + true + Console + false + + + + + + + ..\..\..\..\src;%(AdditionalIncludeDirectories) + WIN32;WIN_STATIC;TRACE;_CRT_SECURE_NO_DEPRECATE;ENAGLO;ENAQZS;ENAGAL;ENACMP;ENAIRN;NFREQ=4;NEXOBS=3;SVR_REUSEADDR;%(PreprocessorDefinitions) + MultiThreaded + + + Level3 + ProgramDatabase + + + ws2_32.lib;%(AdditionalDependencies) + $(OutDir)str2str.exe + %(AdditionalLibraryDirectories) + true + Console + true + true + false + + + MachineX86 + + + + + ..\..\..\..\src;%(AdditionalIncludeDirectories) + WIN32;WIN_STATIC;TRACE;_CRT_SECURE_NO_DEPRECATE;ENAGLO;ENAQZS;ENAGAL;ENACMP;ENAIRN;NFREQ=4;NEXOBS=3;SVR_REUSEADDR;%(PreprocessorDefinitions) + MultiThreaded + + + Level3 + ProgramDatabase + + + ws2_32.lib;%(AdditionalDependencies) + $(OutDir)str2str.exe + %(AdditionalLibraryDirectories) + true + Console + true + true + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/consapp/str2str/str2str.c b/app/consapp/str2str/str2str.c index 7c1708a44..adaedb172 100644 --- a/app/consapp/str2str/str2str.c +++ b/app/consapp/str2str/str2str.c @@ -32,7 +32,9 @@ #define _POSIX_C_SOURCE 200112L #include #include +#ifndef WIN32 #include +#endif #include "rtklib.h" #define PRGNAME "str2str" /* program name */ @@ -60,7 +62,7 @@ static const char *help[]={ " respective -out options. To specify the log file use the -log option before", " a respective -in or -out option, and the streams should have separate", " log files. If the options -in or -out are omitted then stdin for input or", -" stdout for output are used. If the stream for the option -in or -out is null," +" stdout for output are used. If the stream for the option -in or -out is null,", " the stdin or stdout are used. Command options are as follows.", "", " -in stream[#format] input stream path and format", @@ -94,7 +96,7 @@ static const char *help[]={ "", " -msg \"type[(tint)][,type[(tint)]...]\"", " rtcm message types and output intervals (s)", -" -log file input log file or output return log file" +" -log file input log file or output return log file", " -sta sta station id", " -opt opt receiver dependent options", " -s msec timeout time (ms) [10000]", @@ -116,7 +118,9 @@ static const char *help[]={ " -b str_no relay back messages from output str to input str [no]", " -t level trace level [0]", " -fl file log file [str2str.trace]", +#ifndef WIN32 " --daemon detach from the console", +#endif " --version print version", " -h print help", "", @@ -142,6 +146,7 @@ static void printhelp(void) /* signal handler ------------------------------------------------------------*/ static void sigfunc(int sig) { + (void)sig; intrflg=1; } /* decode format -------------------------------------------------------------*/ @@ -246,9 +251,9 @@ static void readcmd(const char *file, char *cmd, size_t size, int type) fclose(fp); } +#ifndef WIN32 static void daemonise(void) { -#ifndef WIN32 /* In case we were not started in the background, fork and let the parent * exit. Guarantees that the child is not a process group leader. */ int childpid = fork(); @@ -275,8 +280,8 @@ static void daemonise(void) reppath(LOGFILE, path, time, "", ""); open(path, O_WRONLY|O_CREAT|O_TRUNC, 0666); dup(1); -#endif } +#endif /* str2str -------------------------------------------------------------------*/ int main(int argc, char **argv) @@ -407,11 +412,13 @@ int main(int argc, char **argv) matcpy(conv[i]->out.sta.pos,stapos,3,1); matcpy(conv[i]->out.sta.del,stadel,3,1); } +#ifndef WIN32 if (daemon) daemonise(); - signal(SIGTERM,sigfunc); - signal(SIGINT ,sigfunc); signal(SIGHUP ,SIG_IGN); signal(SIGPIPE,SIG_IGN); +#endif + signal(SIGTERM,sigfunc); + signal(SIGINT ,sigfunc); strsvrinit(&strsvr,n+1);