aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include
diff options
context:
space:
mode:
authorBilly O'Neal <bion@microsoft.com>2020-09-11 13:52:18 -0700
committerGitHub <noreply@github.com>2020-09-11 13:52:18 -0700
commit6b97dbfce2159e40d71fb69b1fe05c822c43aa90 (patch)
treebefe679c8d5cb8df85be798dccb2b770cfcda2f9 /toolsrc/include
parent0896bb867b61cc35dd3d1850171b92bd2a32cf67 (diff)
downloadvcpkg-6b97dbfce2159e40d71fb69b1fe05c822c43aa90.tar.gz
vcpkg-6b97dbfce2159e40d71fb69b1fe05c822c43aa90.zip
[vcpkg] Merge the vcpkg metadata uploader into the vcpkg binary (#13421)
Diffstat (limited to 'toolsrc/include')
-rw-r--r--toolsrc/include/vcpkg/base/system.process.h2
-rw-r--r--toolsrc/include/vcpkg/commands.upload-metrics.h22
2 files changed, 23 insertions, 1 deletions
diff --git a/toolsrc/include/vcpkg/base/system.process.h b/toolsrc/include/vcpkg/base/system.process.h
index 4bbcba717..e81bcfed7 100644
--- a/toolsrc/include/vcpkg/base/system.process.h
+++ b/toolsrc/include/vcpkg/base/system.process.h
@@ -66,7 +66,7 @@ namespace vcpkg::System
#if defined(_WIN32)
Environment cmd_execute_modify_env(const ZStringView cmd_line, const Environment& env = {});
- void cmd_execute_no_wait(const StringView cmd_line);
+ void cmd_execute_background(const StringView cmd_line);
#endif
ExitCodeAndOutput cmd_execute_and_capture_output(const ZStringView cmd_line, const Environment& env = {});
diff --git a/toolsrc/include/vcpkg/commands.upload-metrics.h b/toolsrc/include/vcpkg/commands.upload-metrics.h
new file mode 100644
index 000000000..dcd855ffb
--- /dev/null
+++ b/toolsrc/include/vcpkg/commands.upload-metrics.h
@@ -0,0 +1,22 @@
+#pragma once
+
+#if !VCPKG_DISABLE_METRICS && defined(_WIN32)
+#define VCPKG_ENABLE_X_UPLOAD_METRICS_COMMAND 1
+#else
+#define VCPKG_ENABLE_X_UPLOAD_METRICS_COMMAND 0
+#endif // !VCPKG_DISABLE_METRICS && defined(_WIN32)
+
+#if VCPKG_ENABLE_X_UPLOAD_METRICS_COMMAND
+
+#include <vcpkg/commands.interface.h>
+
+namespace vcpkg::Commands::UploadMetrics
+{
+ extern const CommandStructure COMMAND_STRUCTURE;
+ struct UploadMetricsCommand : BasicCommand
+ {
+ virtual void perform_and_exit(const VcpkgCmdArguments& args, Files::Filesystem& fs) const override;
+ };
+}
+
+#endif // VCPKG_ENABLE_X_UPLOAD_METRICS_COMMAND