Files
GitVer/GitVer/GitVer_process.h
Jeff 6b0f602e57 1、加强注释
2、上传时,添加-f参数才会强制上传,否则需要根据当前Tag标签信息来判断是否需要上传。
2026-06-28 20:56:56 +08:00

14 lines
565 B
C++
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#pragma once
/// <summary>
/// 按顺序将文件中多处旧字符串替换为新字符串并写回。
/// </summary>
BOOL ReplaceFileContent(LPCTSTR lpFile, std::vector<std::string>& vtOldContent, std::vector<std::string>& vtNewContent);
/// <summary>
/// 启动子进程并捕获 stdout/stderr。
/// nOutputCodePage 为管道原始字节的解码代码页,默认 CP_ACP按系统 ANSI/GBK 直接使用);
/// CP_UTF8 时先按 UTF-8 解码为宽字符MultiByte 工程再转为 GBK 存入 CString。
/// </summary>
CString StartProcess(LPCTSTR program, LPCTSTR args, LPCTSTR lpCurrentDirectory, UINT nOutputCodePage = CP_ACP);