Change Info::email() to Contact::email(). Remove vcpkg_info.h/cpp
MODIFY
include/vcpkg_Commands.h
include/vcpkg_Commands.h
@@ -127,6 +127,7 @@ namespace vcpkg::Commands
namespace Contact
{
+ const std::string& email();
void perform_and_exit(const vcpkg_cmd_arguments& args);
}

DELETE
include/vcpkg_info.h
-#pragma once
-
-#include <string>
-
-namespace vcpkg::Info
-{
- const std::string& email();
-}

MODIFY
src/commands_build.cpp
src/commands_build.cpp
#include "vcpkg_System.h"
#include "vcpkg_Environment.h"
#include "metrics.h"
-#include "vcpkg_info.h"
#include "vcpkg_Enums.h"
namespace vcpkg::Commands::Build

MODIFY
src/commands_contact.cpp
src/commands_contact.cpp
#include "pch.h"
#include "vcpkg_Commands.h"
#include "vcpkg_System.h"
-#include "vcpkg_info.h"
namespace vcpkg::Commands::Contact
{
+ const std::string& email()
+ {
+ static const std::string s_email = R"(vcpkg@microsoft.com)";
+ return s_email;
+ }
+
void perform_and_exit(const vcpkg_cmd_arguments& args)
{
args.check_exact_arg_count(0);
args.check_and_get_optional_command_arguments({});
- System::println("Send an email to %s with any feedback.", Info::email());
+ System::println("Send an email to %s with any feedback.", email());
exit(EXIT_SUCCESS);
}
}

MODIFY
src/commands_update.cpp
src/commands_update.cpp
#include "vcpkg_System.h"
#include "vcpkg_Files.h"
#include "Paragraphs.h"
-#include "vcpkg_info.h"
namespace vcpkg::Commands::Update
{

MODIFY
src/vcpkg.cpp
src/vcpkg.cpp
#include "vcpkg_System.h"
#include "vcpkg_Input.h"
#include "Paragraphs.h"
-#include "vcpkg_info.h"
#include "vcpkg_Strings.h"
using namespace vcpkg;
@@ -235,7 +234,7 @@ int wmain(const int argc, const wchar_t* const* const argv)
std::cerr
<< "vcpkg.exe has crashed.\n"
<< "Please send an email to:\n"
- << " " << Info::email() << "\n"
+ << " " << Commands::Contact::email() << "\n"
<< "containing a brief summary of what you were trying to do and the following data blob:\n"
<< "\n"
<< "Version=" << Commands::Version::version() << "\n"

DELETE
src/vcpkg_info.cpp
-#include "pch.h"
-#include "vcpkg_info.h"
-
-namespace vcpkg::Info
-{
- const std::string& email()
- {
- static const std::string s_email = R"(vcpkg@microsoft.com)";
- return s_email;
- }
-}

MODIFY
vcpkglib/vcpkglib.vcxproj
vcpkglib/vcpkglib.vcxproj
<ClInclude Include="..\include\vcpkg_Maps.h" />
<ClInclude Include="..\include\vcpkg_optional.h" />
<ClInclude Include="..\include\vcpkg_paths.h" />
- <ClInclude Include="..\include\vcpkg_info.h" />
<ClInclude Include="..\include\vcpkg_Sets.h" />
<ClInclude Include="..\include\vcpkg_Strings.h" />
<ClInclude Include="..\include\vcpkg_System.h" />
<ClCompile Include="..\src\vcpkg_Files.cpp" />
<ClCompile Include="..\src\vcpkg_Input.cpp" />
<ClCompile Include="..\src\vcpkg_paths.cpp" />
- <ClCompile Include="..\src\vcpkg_info.cpp" />
<ClCompile Include="..\src\vcpkg_Strings.cpp" />
<ClCompile Include="..\src\vcpkg_System.cpp" />
</ItemGroup>

MODIFY
vcpkglib/vcpkglib.vcxproj.filters
vcpkglib/vcpkglib.vcxproj.filters
<ClCompile Include="..\src\Paragraphs.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\src\vcpkg_info.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="..\src\metrics.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClInclude Include="..\include\Paragraphs.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\include\vcpkg_info.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\include\metrics.h">
<Filter>Header Files</Filter>
</ClInclude>

Change Info::email() to Contact::email(). Remove vcpkg_info.h/cpp