diff --git a/IncBuildVer/IncBuildVer.cpp b/IncBuildVer/IncBuildVer.cpp index 5647e2c..c33a2f4 100644 --- a/IncBuildVer/IncBuildVer.cpp +++ b/IncBuildVer/IncBuildVer.cpp @@ -8,7 +8,7 @@ #include "stdafx.h" #include "Shellapi.h" #include "IncBuildVer.h" -#include "VerFile.h" +#include "VersionManager.h" @@ -24,15 +24,13 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance, // 获取命令行参数数量 int nArgc; LPWSTR *ppArgv = CommandLineToArgvW(GetCommandLine(), &nArgc); - do{ - // 判断命令行参数数量是否大于等于3 - if (nArgc < 3) - break; - + + // 判断命令行参数数量是否大于1 + if (nArgc > 1) { // 对编译版本号加一 - CVerFile file; - file.IncBuildVer(ppArgv[2]); - } while (false); + CVersionManager manager; + manager.IncBuildVer(ppArgv[1]); + } LocalFree(ppArgv); return 0; diff --git a/IncBuildVer/IncBuildVer.vcxproj b/IncBuildVer/IncBuildVer.vcxproj index 922a2c2..69aee80 100644 --- a/IncBuildVer/IncBuildVer.vcxproj +++ b/IncBuildVer/IncBuildVer.vcxproj @@ -154,7 +154,7 @@ - + @@ -164,7 +164,7 @@ Create Create - + diff --git a/IncBuildVer/IncBuildVer.vcxproj.filters b/IncBuildVer/IncBuildVer.vcxproj.filters index 26dd289..5630356 100644 --- a/IncBuildVer/IncBuildVer.vcxproj.filters +++ b/IncBuildVer/IncBuildVer.vcxproj.filters @@ -1,62 +1,62 @@ -锘 - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - 澶存枃浠 - - - 澶存枃浠 - - - 澶存枃浠 - - - 澶存枃浠 - - - 澶存枃浠 - - - - - 婧愭枃浠 - - - 婧愭枃浠 - - - 婧愭枃浠 - - - - - 璧勬簮鏂囦欢 - - - - - 璧勬簮鏂囦欢 - - - 璧勬簮鏂囦欢 - - - - - - +锘 + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + 澶存枃浠 + + + 澶存枃浠 + + + 澶存枃浠 + + + 澶存枃浠 + + + 澶存枃浠 + + + + + 婧愭枃浠 + + + 婧愭枃浠 + + + 婧愭枃浠 + + + + + 璧勬簮鏂囦欢 + + + + + 璧勬簮鏂囦欢 + + + 璧勬簮鏂囦欢 + + + + + + \ No newline at end of file diff --git a/IncBuildVer/VerFile.cpp b/IncBuildVer/VersionManager.cpp similarity index 52% rename from IncBuildVer/VerFile.cpp rename to IncBuildVer/VersionManager.cpp index 0845f71..075eb28 100644 --- a/IncBuildVer/VerFile.cpp +++ b/IncBuildVer/VersionManager.cpp @@ -6,31 +6,45 @@ //////////////////////////////////////////////////////////////////////////////// #include "stdafx.h" -#include "VerFile.h" +#include "VersionManager.h" -#define MAJOR 0 -#define MINOR 1 -#define REVISION 2 -#define BUILD 3 +enum { + MAJOR, + MINOR, + REVISION, + BUILD +}; +#define VERSION_COUNT 4 +static LPCTSTR g_pszSign[] = { + TEXT("MAJOR_VER_NUM"), + TEXT("MINOR_VER_NUM"), + TEXT("REVISION_VER_NUM"), + TEXT("BUILD_VER_NUM"), + NULL +}; +DWORD g_dwSignLen[VERSION_COUNT]; -CVerFile::CVerFile() +CVersionManager::CVersionManager() : m_dwOffset(0) , m_dwCode(0) , m_hFile(nullptr) , m_pContent(nullptr) { + memset(m_dwVerArr, 0, sizeof(m_dwVerArr)); + for (int i = 0; g_pszSign[i]; ++i) + g_dwSignLen[i] = _tcslen(g_pszSign[i]); } -CVerFile::~CVerFile() +CVersionManager::~CVersionManager() { if (m_pContent) delete[] m_pContent; @@ -39,81 +53,191 @@ CVerFile::~CVerFile() } // 将指定文件中编译版本号宏的值加一 -bool CVerFile::IncBuildVer(LPCTSTR lpszDirPath) +bool CVersionManager::IncBuildVer(LPCTSTR lpszProjectPath) { - TCHAR szFilePath[MAX_PATH]; - _stprintf_s(szFilePath, TEXT("%sresource.h"), lpszDirPath); - // resource.h + TCHAR szFilePath[MAX_PATH] = {}; + _stprintf_s(szFilePath, TEXT("%sresource.h"), lpszProjectPath); + // 获取并更改 resource.h 中的版本信息 if (!IncResourceVer(szFilePath)) return false; - // .rc文件路径 - auto pos = _tcsrchr(lpszDirPath, TEXT('\\')); - if (!pos) + // *.rc文件路径 + int nIndex = _tcslen(lpszProjectPath); + for (--nIndex; nIndex > 0 && lpszProjectPath[nIndex - 1] != TEXT('\\'); --nIndex); + if (nIndex <= 0) return false; - while (pos != lpszDirPath && *(pos - 1) != TEXT('\\')) - --pos; - if (pos == lpszDirPath) - return false; - _stprintf_s(szFilePath, TEXT("%s%s"), lpszDirPath, pos); + _stprintf_s(szFilePath, TEXT("%s%s"), lpszProjectPath, lpszProjectPath + nIndex); szFilePath[_tcslen(szFilePath) - 1] = 0; _tcscat_s(szFilePath, TEXT(".rc")); - // .rc + // 更改 *.rc 中版本信息 if (!IncRCFileVer(szFilePath)) return false; return true; } -bool CVerFile::IncResourceVer(LPCTSTR lpszFilePath) +DWORD CVersionManager::ParseVerPos(LPCTSTR lpszContent, LPCTSTR &lpszFirstValidPos, LPCTSTR *lppszVerPos) { - static LPCTSTR pszVerSign[] = { - TEXT("MAJOR_VER_NUM"), - TEXT("MINOR_VER_NUM"), - TEXT("REVISION_VER_NUM"), - TEXT("BUILD_VER_NUM"), - NULL + assert(lpszContent); + + enum { + COMMENT_NONE, + COMMENT_LINE, + COMMENT_BLOCK }; + TCHAR chLast = 0x20; + DWORD dwComment = 0, dwCount = 0; + LPCTSTR pos = lpszContent, pszTemp = nullptr; + for (; *pos && dwCount < VERSION_COUNT; ++pos) { + switch (dwComment) { + case COMMENT_LINE: + if (*pos == TEXT('\n')) + dwComment = COMMENT_NONE; + chLast = 0x20; + break; + case COMMENT_BLOCK: + if (*pos == TEXT('/') && chLast == TEXT('*')) + dwComment = COMMENT_NONE; + chLast = 0x20; + break; + default: + if (*pos == TEXT('/')) { + if (pos[1] == TEXT('/')) { + ++pos; + dwComment = COMMENT_LINE; + chLast = 0x20; + break; + }else if (pos[1] == TEXT('*')) { + ++pos; + dwComment = COMMENT_BLOCK; + chLast = 0x20; + break; + } + } + + if (!lpszFirstValidPos && _istgraph(*pos)) + lpszFirstValidPos = pos; + + if (_istspace(chLast)) { + for (int i = 0; g_pszSign[i]; ++i) { + if (*pos == g_pszSign[i][0] && !_tcsncmp(pos, g_pszSign[i], g_dwSignLen[i]) && + _istspace(*(pos + g_dwSignLen[i]))) { + pos += g_dwSignLen[i]; + while (!_istdigit(*pos)) ++pos; + lppszVerPos[i] = pos; + m_dwVerArr[i] = _ttoi(pos); + ++dwCount; + break; + } + } + } + + chLast = *pos; + break; + } + } + if (!lpszFirstValidPos) + lpszFirstValidPos = pos; + return dwCount; +} + + +bool CVersionManager::IncResourceVer(LPCTSTR lpszFilePath) +{ bool bRes = true; - + LPCTSTR pszFirstValidPos = nullptr, pszVerPos[VERSION_COUNT] = {}; + // 读取文件内容 if (!GetFileContent(lpszFilePath)) return false; - auto pszBegin = m_pContent; - for (int i = 0; pszVerSign[i]; ++i){ - pszBegin = _tcsstr(m_pContent, pszVerSign[i]); - if (!pszBegin) - return false; - pszBegin += _tcslen(pszVerSign[i]); - m_dwVersion[i] = _ttoi(pszBegin); - } + // 解析版本宏,获取版本号 + auto dwCount = ParseVerPos(m_pContent, pszFirstValidPos, pszVerPos); + //TCHAR chLast = 0; + //bool bComment = false; + //for (auto pos = m_pContent; *pos; ++pos) { + // if (bComment) { + + // } + //} + //auto pszBegin = m_pContent; + //for (int i = 0; g_pszSign[i]; ++i){ + // pszVerPos[i] = m_pContent; + // int nLen = _tcslen(g_pszSign[i]); + // while ((pszVerPos[i] = _tcsstr(pszVerPos[i] + 1, g_pszSign[i])) && + // !_istspace(*(pszVerPos[i] - 1)) && !_istspace(*(pszVerPos[i] + nLen))); + // if (!pszVerPos[i]) { + // bMissVersion = true; + // continue; + // } + // m_dwVersion[i] = _ttoi(pszVerPos[i] + nLen); + //} // 跳转到编译版本号的位置 - while (*pszBegin && !_istdigit(*pszBegin)) ++pszBegin; - if (!*pszBegin) - return false; - auto pszEnd = pszBegin; - while (*pszEnd && _istdigit(*pszEnd)) ++pszEnd; - // 根据就版本号计算新版本号,并转换为字符串 + //while (*pszBegin && !_istdigit(*pszBegin)) ++pszBegin; + //if (!*pszBegin) + // return false; + //auto pszEnd = pszBegin; + //while (*pszEnd && _istdigit(*pszEnd)) ++pszEnd; + // 根据旧版本号计算新版本号,并转换为字符串 //DWORD dwBuildVer = _ttoi(pszBegin); - TCHAR szNewVer[20]; - _stprintf_s(szNewVer, TEXT("%u"), ++m_dwVersion[BUILD]); - // 使用版本号以前的字符串重定位文件指针 - if (!SetFilePtrWithString(m_pContent, pszBegin - m_pContent)) - return false; - // 写入新版本号 - if (!WriteContent(szNewVer, _tcslen(szNewVer))) - return false; - // 判断版本号长度是否一致,只有不一致时才需要重新写入版本号后的内容 - if (pszEnd - pszBegin != _tcslen(szNewVer)){ - bRes = WriteContent(pszEnd, _tcslen(pszEnd)); + TCHAR szText[100]; + if (dwCount != VERSION_COUNT) { + // 使用第一个有效字符以前的字符串重定位文件指针 + if (!SetFilePtrWithString(m_pContent, pszFirstValidPos - m_pContent)) + return false; + + for (int i = 0; i < VERSION_COUNT; ++i) { + if (!pszVerPos[i]) { + if (i == BUILD) + ++m_dwVerArr[BUILD]; + _stprintf_s(szText, TEXT("#define %s\t\t\t\t\t%u\r\n"), g_pszSign[i], m_dwVerArr[i]); + if (!WriteContent(szText, _tcslen(szText))) + return false; + } + } + if (pszVerPos[BUILD]) { + assert(pszVerPos[BUILD] > pszFirstValidPos); + if (!WriteContent(pszFirstValidPos, pszVerPos[BUILD] - pszFirstValidPos)) + return false; + // 写入新版本号 + _stprintf_s(szText, TEXT("%u"), ++m_dwVerArr[BUILD]); + if (!WriteContent(szText, _tcslen(szText))) + return false; + while (_istdigit(*(pszVerPos[BUILD]))) ++(pszVerPos[BUILD]); + // 判断版本号长度是否一致,只有不一致时才需要重新写入版本号后的内容 + if (!WriteContent(pszVerPos[BUILD], _tcslen(pszVerPos[BUILD]))) + return false; + }else { + if (!WriteContent(pszFirstValidPos, _tcslen(pszFirstValidPos))) + return false; + } SetEndOfFile(m_hFile); + } else { + // 使用编译版本号以前的字符串重定位文件指针 + if (!SetFilePtrWithString(m_pContent, pszVerPos[BUILD] - m_pContent)) + return false; + // 写入新版本号 + _stprintf_s(szText, TEXT("%u"), ++m_dwVerArr[BUILD]); + if (!WriteContent(szText, _tcslen(szText))) + return false; + int nLen = 0; + while (_istdigit(*(pszVerPos[BUILD]))) { + ++(pszVerPos[BUILD]); + ++nLen; + } + // 判断版本号长度是否一致,只有不一致时才需要重新写入版本号后的内容 + if (nLen != _tcslen(szText)) { + bRes = WriteContent(pszVerPos[BUILD], _tcslen(pszVerPos[BUILD])); + SetEndOfFile(m_hFile); + } } + + return bRes; } -bool CVerFile::IncRCFileVer(LPCTSTR lpszFilePath) +bool CVersionManager::IncRCFileVer(LPCTSTR lpszFilePath) { static LPCTSTR pszSign[] = { TEXT("FILEVERSION"), @@ -149,11 +273,11 @@ bool CVerFile::IncRCFileVer(LPCTSTR lpszFilePath) return false; if (!i){ - _stprintf_s(szText, TEXT("%u,%u,%u,%u"), m_dwVersion[MAJOR], m_dwVersion[MINOR] - , m_dwVersion[REVISION], m_dwVersion[BUILD]); + _stprintf_s(szText, TEXT("%u,%u,%u,%u"), m_dwVerArr[MAJOR], m_dwVerArr[MINOR] + , m_dwVerArr[REVISION], m_dwVerArr[BUILD]); }else if(i == 2){ - _stprintf_s(szText, TEXT("\"%u.%u.%u.%u\""), m_dwVersion[MAJOR], m_dwVersion[MINOR] - , m_dwVersion[REVISION], m_dwVersion[BUILD]); + _stprintf_s(szText, TEXT("\"%u.%u.%u.%u\""), m_dwVerArr[MAJOR], m_dwVerArr[MINOR] + , m_dwVerArr[REVISION], m_dwVerArr[BUILD]); } if (!WriteContent(szText, _tcslen(szText))) return false; @@ -171,7 +295,7 @@ bool CVerFile::IncRCFileVer(LPCTSTR lpszFilePath) } // 读取指定文件内容,并转换为 Unicode 编码 -bool CVerFile::GetFileContent(LPCTSTR lpszFilePath) +bool CVersionManager::GetFileContent(LPCTSTR lpszFilePath) { // 打开文件 if (m_hFile) @@ -204,7 +328,7 @@ bool CVerFile::GetFileContent(LPCTSTR lpszFilePath) } // 获取该文件内容的编码格式 -bool CVerFile::GetFileContentCode(LPCSTR pData, LONGLONG llLen) +bool CVersionManager::GetFileContentCode(LPCSTR pData, LONGLONG llLen) { if (llLen > 3) { DWORD dwBOM = MAKELONG(MAKEWORD(pData[0], pData[1]), MAKEWORD(pData[2], 0)); @@ -232,7 +356,7 @@ bool CVerFile::GetFileContentCode(LPCSTR pData, LONGLONG llLen) } // 判断给定的内容是否为utf-8编码 -bool CVerFile::IsCodeUtf8(LPCSTR pString, LONGLONG llLen) +bool CVersionManager::IsCodeUtf8(LPCSTR pString, LONGLONG llLen) { bool bRet = false; auto pData = (PBYTE)pString; @@ -257,7 +381,7 @@ bool CVerFile::IsCodeUtf8(LPCSTR pString, LONGLONG llLen) } // 判断给定内容是否为utf-16格式的编码,如果是则返回字符编码,否则返回零 -int CVerFile::IsCodeUtf16(LPCSTR pString, LONGLONG llLen) +int CVersionManager::IsCodeUtf16(LPCSTR pString, LONGLONG llLen) { if (llLen % 2) return 0; @@ -270,7 +394,7 @@ int CVerFile::IsCodeUtf16(LPCSTR pString, LONGLONG llLen) return 0; } -LPTSTR CVerFile::FileContentToUnicode(LPCSTR lpszSrc, LONGLONG llLen) +LPTSTR CVersionManager::FileContentToUnicode(LPCSTR lpszSrc, LONGLONG llLen) { LPTSTR pContent = nullptr; if (m_dwCode == CP_UTF16) { @@ -308,15 +432,14 @@ LPTSTR CVerFile::FileContentToUnicode(LPCSTR lpszSrc, LONGLONG llLen) // 从给定的版本号之前的字符串,并根据原文件编码方式和文件内容的偏移量, // 计算并设置文件指针的位置,跳过编译版本号之前不会被更改的内容, // 用于后续写入,并减少 I/O 提高效率 -bool CVerFile::SetFilePtrWithString(LPCTSTR lpszProBuildVer, DWORD dwLen) +bool CVersionManager::SetFilePtrWithString(LPCTSTR lpszProBuildVer, DWORD dwLen) { LARGE_INTEGER large = { m_dwOffset }; if (m_dwCode != CP_UTF16 && m_dwCode != CP_UTF16B) { - int nLen = WideCharToMultiByte(m_dwCode, 0, lpszProBuildVer, dwLen, nullptr, 0, nullptr, nullptr); - if (!nLen) - return false; - large.QuadPart += nLen; + if(dwLen) + dwLen = WideCharToMultiByte(m_dwCode, 0, lpszProBuildVer, dwLen, nullptr, 0, nullptr, nullptr); + large.QuadPart += dwLen; } else large.QuadPart += dwLen * sizeof(TCHAR); @@ -325,7 +448,7 @@ bool CVerFile::SetFilePtrWithString(LPCTSTR lpszProBuildVer, DWORD dwLen) } // 将给定的内容,转换为原文件编码格式后,写入文件 -bool CVerFile::WriteContent(LPCTSTR lpszContent, DWORD dwLen) +bool CVersionManager::WriteContent(LPCTSTR lpszContent, DWORD dwLen) { DWORD dwWriten; diff --git a/IncBuildVer/VerFile.h b/IncBuildVer/VersionManager.h similarity index 88% rename from IncBuildVer/VerFile.h rename to IncBuildVer/VersionManager.h index 506ea98..ee626ed 100644 --- a/IncBuildVer/VerFile.h +++ b/IncBuildVer/VersionManager.h @@ -12,24 +12,26 @@ -class CVerFile +class CVersionManager { public: - CVerFile(); - ~CVerFile(); + CVersionManager(); + ~CVersionManager(); // 功能:将指定文件中编译版本号宏的值加一 // 参数:LPCTSTR lpszFilePath:目标文件的完整路径 // 返回值:成功时返回 true,否则返回 false - bool IncBuildVer(LPCTSTR lpszDirPath); + bool IncBuildVer(LPCTSTR lpszProjectPath); protected: DWORD m_dwOffset; // 有效文件内容相对文件开头的偏移字节数 DWORD m_dwCode; // 文件的字符编码格式 - DWORD m_dwVersion[4]; // 项目的版本号 + DWORD m_dwVerArr[4]; // 项目的版本号 HANDLE m_hFile; // 目标文件句柄 LPTSTR m_pContent; // 转换为 Unicode 编码格式后的文件内容的指针 + DWORD ParseVerPos(LPCTSTR lpszContent, LPCTSTR &lpszFirstValidPos, LPCTSTR *lppszVerPos); + // 从 resource.h 文件获取原始版本号,并更新编译版本号写回 bool IncResourceVer(LPCTSTR lpszFilePath); @@ -54,5 +56,6 @@ class CVerFile bool SetFilePtrWithString(LPCTSTR lpszProBuildVer, DWORD dwLen); // 将给定的内容,转换为原文件编码格式后,写入文件 bool WriteContent(LPCTSTR lpszContent, DWORD dwLen); + }; diff --git a/IncBuildVer/resource.h b/IncBuildVer/resource.h index 1b0ba15..5b562e8 100644 Binary files a/IncBuildVer/resource.h and b/IncBuildVer/resource.h differ diff --git a/IncBuildVer/stdafx.h b/IncBuildVer/stdafx.h index b9c5cdb..490b431 100644 --- a/IncBuildVer/stdafx.h +++ b/IncBuildVer/stdafx.h @@ -17,6 +17,6 @@ #include #include #include +#include -// TODO: 在此处引用程序需要的其他头文件 diff --git a/ReadMe.md b/ReadMe.md index 64b24a0..45e36e7 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -4,25 +4,27 @@ ## 浣跨敤鏂规硶 1.灏嗚椤圭洰缂栬瘧鍑虹殑鍙墽琛屾枃浠讹細IncBuildVer.exe 鏀惧叆绯荤粺鐩綍锛圵indows鎴朣ystem32锛変笅锛 -2.鍦ㄤ綘椤圭洰涓殑璧勬簮瀹忓0鏄庢枃浠讹紙resource.h锛夌殑寮澶存坊鍔狅細 - - #define MAJOR_VER_NUM 1 // 涓荤増鏈彿 - #define MINOR_VER_NUM 0 // 瀛愮増鏈彿 - #define REVISION_VER_NUM 0 // 淇鐗堟湰鍙 - #define BUILD_VER_NUM 0 // 缂栬瘧鐗堟湰鍙 - -3.鍦ㄩ」鐩睘鎬р滆彍鍗曟爮 - 椤圭洰 - 灞炴р濅腑鍒囨崲鍒拌浣跨敤鐨勭紪璇戠被鍨嬶紙Debug/Release锛夛紝鐒跺悗鍦ㄥ彸渚р滈厤缃睘鎬 - 鐢熸垚浜嬩欢 - 棰勫厛鐢熸垚浜嬩欢鈥濈殑鈥滃懡浠よ鈥濇坊鍔犲涓嬶細 +2.鍦ㄩ」鐩睘鎬р滆彍鍗曟爮 - 椤圭洰 - 灞炴р濅腑鍒囨崲鍒拌浣跨敤鐨勭紪璇戠被鍨嬶紙Debug/Release锛夛紝鐒跺悗鍦ㄥ彸渚р滈厤缃睘鎬 - 鐢熸垚浜嬩欢 - 棰勫厛鐢熸垚浜嬩欢鈥濈殑鈥滃懡浠よ鈥濇坊鍔犲涓嬶細 IncBuildVer $(ProjectDir) ## 浣跨敤璇存槑 -1.濡傛灉鎯冲湪浠g爜涓垨鍦ㄧ晫闈笂浣跨敤褰撳墠鐗堟湰鍙凤紝鍙渶鍖呭惈鈥渞esource.h鈥濆ご鏂囦欢锛岀劧鍚庣洿鎺ヤ娇鐢ㄤ笂杩板畯锛 +1.绋嬪簭浼氳嚜鍔ㄥ湪浣犻」鐩腑鐨勮祫婧愬畯澹版槑鏂囦欢锛坮esource.h锛夌殑寮澶存坊鍔狅細 + + #define MAJOR_VER_NUM 0 + #define MINOR_VER_NUM 0 + #define REVISION_VER_NUM 0 + #define BUILD_VER_NUM 1 -2.鎵嬪姩缂栬緫鐗堟湰鍙锋椂锛屽彧闇瑕佷慨鏀瑰ご鏂囦欢鈥渞esource.h鈥濅腑瀵瑰簲瀹忓嵆鍙紝绋嬪簭浼氬湪杩欎簺瀹忓搴斿肩殑鍩虹涓婃洿鏂癇UILD_VER_NUM鍙*.rc涓殑鐗堟湰瀛楁銆 +2.濡傛灉鎯冲湪浠g爜涓垨鍦ㄧ晫闈笂浣跨敤褰撳墠鐗堟湰鍙凤紝鍙渶鍖呭惈鈥渞esource.h鈥濆ご鏂囦欢锛岀劧鍚庣洿鎺ヤ娇鐢ㄤ笂杩板畯锛 + +3.鎵嬪姩缂栬緫鐗堟湰鍙锋椂锛屽彧闇瑕佷慨鏀瑰ご鏂囦欢鈥渞esource.h鈥濅腑瀵瑰簲瀹忓嵆鍙紝绋嬪簭浼氬湪杩欎簺瀹忓搴斿肩殑鍩虹涓婃洿鏂癇UILD_VER_NUM鍙*.rc涓殑鐗堟湰瀛楁銆 ## 淇敼绾綍 +2018-02-03锛氬鍔犺嚜鍔ㄦ坊鍔犵増鏈畯鐨勫姛鑳斤紝涓嶉渶瑕佺敤鎴峰啀鎵嬪姩娣诲姞銆 + 2016-12-25锛氱簿绠閫昏緫锛屽幓鎺夌紪璇戠被鍨嬬殑鍒ゆ柇锛岀敱鐢ㄦ埛鍐冲畾鍦ㄥ摢绉嶇紪璇戠被鍨嬩笅浣跨敤銆 2016-12-14锛氶噸鏋勯」鐩紝鏇存敼鑷缂栬瘧鐗堟湰鍙风殑瀹炵幇鏂规硶銆備笉闇瑕佸悜鐩爣椤圭洰棰濆娣诲姞鏂囦欢锛屼篃涓嶇敤鍦╲s涓紪杈戝璇濇绛夎祫婧愬悗閲嶆柊缂栬緫*.rc鏂囦欢銆