diff --git a/GitVer/GitVer.cpp b/GitVer/GitVer.cpp index acaf85b..2c55ae1 100644 --- a/GitVer/GitVer.cpp +++ b/GitVer/GitVer.cpp @@ -354,9 +354,10 @@ void PrintFullUsageExamples() _T(" gitver nuitkabuild= [repodir=可选] [-test可选] [params=\" \"可选]\n") _T(" gitver nuitkapydbuild= [repodir=可选] [-test可选] [params=\" \"可选]\n") _T(" gitver pyinstaller= [repodir=可选] [-test可选] [params=\" \"可选]\n") - _T(" gitver -setup=0|1 [pid] [repodir=可选] [-test可选]\n") - _T(" -setup=0: 使用 Inno Setup 脚本 (setup.iss)\n") - _T(" -setup=1: 使用 NSIS 脚本 (setup.nsh)\n") + _T(" gitver setup=n [pid=m可选] [repodir=可选] [-test可选]\n") + _T(" setup=0: 使用 Inno Setup 脚本 (setup.iss)\n") + _T(" setup=1: 使用 NSIS 脚本 (setup.nsi)\n") + _T(" 不指定 pid 时自动从 .rc / AssemblyInfo.cs / version_info.txt 读取版本\n") _T("\n示例:\n") _T(" gitver\n") _T(" gitver rewrite\n") @@ -377,8 +378,9 @@ void PrintFullUsageExamples() _T(" gitver pyinstaller=5 params=\"myapp.spec\"\n") _T(" gitver pyinstaller=5 -test params=\"myapp.spec\"\n") _T(" gitver pyinstaller=5 repodir=E:\\Code\\MyPyProj params=\"myapp.spec\"\n") - _T(" gitver -setup=0 5\n") - _T(" gitver -setup=1 5 repodir=E:\\Code\\MyProj\n") + _T(" gitver setup=0\n") + _T(" gitver setup=0 pid=5\n") + _T(" gitver setup=1 pid=5 repodir=E:\\Code\\MyProj\n") _T("params: 传递给 Nuitka/PyInstaller 的参数(含入口文件),用双引号括起来,如 params=\"main.py --standalone --output-dir=dist\"。\n") _T("-test: 将产品版本号的 major 和 minor 都置为 0(用于测试版本构建)。\n") _T("无参数时会读取当前分支最近三次 tag,并提示选择 major 加 1 或 minor 加 1,然后创建新 tag。\n") @@ -484,7 +486,7 @@ LPCTSTR GetExitCodeHint(int nRetCode) case 35: return _T("rewrite version file failed"); case 36: - return _T("setup: unsupported -setup value"); + return _T("setup: unsupported setup value"); case 37: return _T("setup: setup script not found"); case 38: @@ -631,35 +633,6 @@ int HandleSetVerCommand(int argc, TCHAR* argv[]) _tprintf(_T("ProductVersion=%s\n"), strProductVersion.GetString()); _tprintf(_T("FileVersion=%s\n"), strFileVersion.GetString()); - // 检查是否附带了 -setup=N 标志 - int nSetupType = -1; - for (int i = 2; i < argc; ++i) - { - CString strArg = argv[i]; - if (strArg.GetLength() > 7 && strArg.Left(7).CompareNoCase(_T("-setup=")) == 0) - { - UINT nVal = 0; - if (!TryParseUInt16(strArg.Mid(7), nVal) || (nVal != 0 && nVal != 1)) - { - _tprintf(_T("错误: -setup 参数值 \"%s\" 不支持,仅支持 0(Inno Setup)或 1(NSIS)。\n"), - strArg.Mid(7).GetString()); - return 36; - } - nSetupType = (int)nVal; - break; - } - } - - if (nSetupType >= 0) - { - // -setup=N 存在:不回写版本信息到项目文件,只修改安装脚本并编译 - if (!ExecuteSetupBuild(nSetupType, strProductVersion, strFileVersion)) - { - return 38; - } - return 0; - } - return RewriteSetVerByProjectType(lpRepoPath, strProductVersion, strFileVersion); } @@ -923,12 +896,12 @@ int main(int argc, TCHAR* argv[], TCHAR* envp[]) return nCmdRet; } - if (argc >= 2 && _tcsnicmp(argv[1], _T("-setup="), 7) == 0) + if (argc >= 2 && _tcsnicmp(argv[1], _T("setup="), 6) == 0) { - DWORD dwStartTick = LogCommandStart(_T("-setup")); + DWORD dwStartTick = LogCommandStart(_T("setup")); int nCmdRet = HandleSetupCommand(argc, argv); - LogCommandEnd(_T("-setup"), dwStartTick, nCmdRet); - PrintCommandFailedWithCode(_T("-setup"), nCmdRet); + LogCommandEnd(_T("setup"), dwStartTick, nCmdRet); + PrintCommandFailedWithCode(_T("setup"), nCmdRet); return nCmdRet; } diff --git a/GitVer/GitVer_cli.cpp b/GitVer/GitVer_cli.cpp index c5566b8..1373b77 100644 --- a/GitVer/GitVer_cli.cpp +++ b/GitVer/GitVer_cli.cpp @@ -24,12 +24,6 @@ int ParseSetVerOptions(int argc, TCHAR* argv[], int nStartIndex, LPCTSTR& lpRepo continue; } - // -setup=N 由调用方单独处理,此处静默跳过 - if (strArg.GetLength() > 7 && strArg.Left(7).CompareNoCase(_T("-setup=")) == 0) - { - continue; - } - if (strArg.GetLength() > 8 && strArg.Left(8).CompareNoCase(_T("repodir=")) == 0) { if (lpRepoPath != NULL) diff --git a/GitVer/GitVer_setup.cpp b/GitVer/GitVer_setup.cpp index 66d7b46..1c89fea 100644 --- a/GitVer/GitVer_setup.cpp +++ b/GitVer/GitVer_setup.cpp @@ -15,6 +15,9 @@ BOOL WriteTextFileAsAnsi(LPCTSTR lpFile, const std::string& strContent, const st void PrintInvalidRepoPathError(LPCTSTR lpRepoPath); int ParseSetVerOptions(int argc, TCHAR* argv[], int nStartIndex, LPCTSTR& lpRepoPath, BOOL& bTestMode); +BOOL FindPreferredCppRcFileAt(LPCTSTR lpBaseDir, CString& strResFile); +BOOL FindPreferredAssemblyInfoFileAt(LPCTSTR lpBaseDir, CString& strResFile); +BOOL FindFirstFileByPatternRecursive(LPCTSTR lpBaseDir, LPCTSTR lpPattern, CString& strFoundPath); static const UINT DEFAULT_MAJOR_WHEN_NO_TAG_FOR_SETUP = 1; static const UINT DEFAULT_MINOR_WHEN_NO_TAG_FOR_SETUP = 0; @@ -246,7 +249,105 @@ static CString FindNsisCompiler() } // ───────────────────────────────────────────── -// 公共执行函数(供 HandleSetupCommand 和 setver -setup=N 共用) +// 从项目文件读取版本号(当 setup=n 未指定 pid 时使用) +// ───────────────────────────────────────────── + +/// +/// 从 strContent 中查找 strToken 之后第一个双引号括起来的值。 +/// +static CString ExtractQuotedValueAfterToken(const std::string& strContent, const std::string& strToken) +{ + std::string::size_type nPos = strContent.find(strToken); + if (nPos == std::string::npos) + return CString(); + + std::string::size_type nStart = strContent.find('"', nPos + strToken.size()); + if (nStart == std::string::npos) + return CString(); + ++nStart; + + std::string::size_type nEnd = strContent.find('"', nStart); + if (nEnd == std::string::npos) + return CString(); + + return CString(strContent.substr(nStart, nEnd - nStart).c_str()); +} + +/// +/// 从 .rc / AssemblyInfo.cs / version_info.txt / .spec 文件中读取版本号字符串。 +/// 优先顺序:.rc > AssemblyInfo.cs > version_info.txt/.spec。 +/// +static BOOL ReadVersionFromProjectFiles(LPCTSTR lpBaseDir, CString& strVersion) +{ + strVersion.Empty(); + std::string strContent, strBomPrefix; + + // 1. .rc 文件 -> VALUE "FileVersion", "x.x.x.x" + CString strRcFile; + if (FindPreferredCppRcFileAt(lpBaseDir, strRcFile)) + { + if (ReadTextFileAsAnsi(strRcFile, strContent, strBomPrefix)) + { + CString strVal = ExtractQuotedValueAfterToken(strContent, "VALUE \"FileVersion\","); + if (!strVal.IsEmpty()) + { + strVersion = strVal; + _tprintf(_T("从 .rc 文件读取版本号: %s\n"), strVersion.GetString()); + return TRUE; + } + } + } + + // 2. AssemblyInfo.cs -> AssemblyFileVersion("x.x.x.x") + CString strAiFile; + if (FindPreferredAssemblyInfoFileAt(lpBaseDir, strAiFile)) + { + if (ReadTextFileAsAnsi(strAiFile, strContent, strBomPrefix)) + { + CString strVal = ExtractQuotedValueAfterToken(strContent, "AssemblyFileVersion("); + if (!strVal.IsEmpty()) + { + strVersion = strVal; + _tprintf(_T("从 AssemblyInfo.cs 读取版本号: %s\n"), strVersion.GetString()); + return TRUE; + } + } + } + + // 3. version_info.txt / .spec -> filevers=(x, x, x, x) + CString strSpecFile; + CString strBaseWithSlash = lpBaseDir; + if (!strBaseWithSlash.IsEmpty() && strBaseWithSlash.Right(1) != _T("\\")) + strBaseWithSlash += _T("\\"); + if (FindFirstFileByPatternRecursive(strBaseWithSlash, _T("version_info.txt"), strSpecFile) || + FindFirstFileByPatternRecursive(strBaseWithSlash, _T("*.spec"), strSpecFile)) + { + if (ReadTextFileAsAnsi(strSpecFile, strContent, strBomPrefix)) + { + std::string::size_type nPos = strContent.find("filevers=("); + if (nPos != std::string::npos) + { + nPos += 10; + std::string::size_type nEnd = strContent.find(')', nPos); + if (nEnd != std::string::npos) + { + std::string strTuple = strContent.substr(nPos, nEnd - nPos); + std::string strClean; + for (char c : strTuple) + if (c != ' ') strClean += (c == ',' ? '.' : c); + strVersion = CString(strClean.c_str()); + _tprintf(_T("从 version_info.txt/.spec 读取版本号: %s\n"), strVersion.GetString()); + return TRUE; + } + } + } + } + + return FALSE; +} + +// ───────────────────────────────────────────── +// 公共执行函数 // 不回写版本信息到项目文件,只修改安装脚本并调用编译器打包。 // ───────────────────────────────────────────── @@ -318,7 +419,7 @@ BOOL ExecuteSetupBuild(int nSetupType, const CString& strProductVersion, const C } // ───────────────────────────────────────────── -// 独立命令入口(argv[1] 形如 "-setup=0") +// 独立命令入口(argv[1] 形如 "setup=0") // ───────────────────────────────────────────── int HandleSetupCommand(int argc, TCHAR* argv[]) @@ -326,73 +427,119 @@ int HandleSetupCommand(int argc, TCHAR* argv[]) #ifdef _DEBUG Sleep(15000); #endif - // 解析 -setup=n 中的 n + // 解析 setup=n 中的 n CString strSetupArg = argv[1]; - CString strN = strSetupArg.Mid(7); // 跳过 "-setup=" + CString strN = strSetupArg.Mid(6); // 跳过 "setup=" UINT nSetupType = UINT(-1); if (!TryParseUInt16(strN, nSetupType) || (nSetupType != 0 && nSetupType != 1)) { - _tprintf(_T("错误: -setup 参数值 \"%s\" 不支持,仅支持 0(Inno Setup)或 1(NSIS)。\n"), + _tprintf(_T("错误: setup 参数值 \"%s\" 不支持,仅支持 0(Inno Setup)或 1(NSIS)。\n"), strN.GetString()); return 36; } - if (argc < 3) + // 解析可选的 pid=m、repodir=、-test + LPCTSTR lpRepoPath = NULL; + BOOL bTestMode = FALSE; + BOOL bHasPid = FALSE; + UINT nPid = 0; + + for (int i = 2; i < argc; ++i) { - _tprintf(_T("错误: 参数不足。\n")); - _tprintf(_T("用法:gitver -setup=0|1 [pid] [repodir=可选]\n")); - _tprintf(_T("示例:gitver -setup=0 5\n")); - _tprintf(_T("示例:gitver -setup=1 5 repodir=E:\\Code\\MyProj\n")); + CString strArg = argv[i]; + if (strArg.CompareNoCase(_T("-test")) == 0) + { + bTestMode = TRUE; + continue; + } + if (strArg.GetLength() > 8 && strArg.Left(8).CompareNoCase(_T("repodir=")) == 0) + { + if (lpRepoPath != NULL) + { + _tprintf(_T("错误: repodir 参数重复: %s\n"), argv[i]); + return 23; + } + LPCTSTR lpPath = argv[i] + 8; + if (!PathIsDirectory(lpPath)) + { + PrintInvalidRepoPathError(lpPath); + return 23; + } + lpRepoPath = lpPath; + continue; + } + if (strArg.GetLength() > 4 && strArg.Left(4).CompareNoCase(_T("pid=")) == 0) + { + if (bHasPid) + { + _tprintf(_T("错误: pid 参数重复: %s\n"), argv[i]); + return 3; + } + CString strPid = strArg.Mid(4); + if (!TryParseUInt16(strPid, nPid)) + { + _tprintf(_T("错误: pid 参数值 \"%s\" 无效,应为 0-65535 范围整数。\n"), strPid.GetString()); + return 4; + } + bHasPid = TRUE; + continue; + } + _tprintf(_T("错误: 多余的参数 %s\n"), argv[i]); return 3; } - UINT nPid = 0; - int nArgRet = ParseUInt16ArgOrError(argv, 2, _T("pid"), nPid, 4); - if (nArgRet != 0) + if (lpRepoPath == NULL) { - return nArgRet; - } - - LPCTSTR lpRepoPath = NULL; - BOOL bTestMode = FALSE; - int nRepoArgRet = ParseSetVerOptions(argc, argv, 3, lpRepoPath, bTestMode); - if (nRepoArgRet != 0) - { - return nRepoArgRet; + lpRepoPath = g_szCurModuleDir; } CString strFileVersion; - CString strProductVersion; - VersionBuildErrorCodes errorCodes = { 5, 6, 9 }; - int nVersionRet = BuildVersionsFromRepo( - lpRepoPath, - nPid, - errorCodes, - strProductVersion, - strFileVersion, - DEFAULT_MAJOR_WHEN_NO_TAG_FOR_SETUP, - DEFAULT_MINOR_WHEN_NO_TAG_FOR_SETUP); + CString strProductVersion; - if (nVersionRet != 0) + if (bHasPid) { - return nVersionRet; - } - - if (bTestMode) - { - int nDot1 = strProductVersion.Find(_T('.')); - int nDot2 = (nDot1 >= 0) ? strProductVersion.Find(_T('.'), nDot1 + 1) : -1; - if (nDot2 > nDot1) + // 从 git 仓库生成版本号 + VersionBuildErrorCodes errorCodes = { 5, 6, 9 }; + int nVersionRet = BuildVersionsFromRepo( + lpRepoPath, + nPid, + errorCodes, + strProductVersion, + strFileVersion, + DEFAULT_MAJOR_WHEN_NO_TAG_FOR_SETUP, + DEFAULT_MINOR_WHEN_NO_TAG_FOR_SETUP); + if (nVersionRet != 0) { - strProductVersion = strProductVersion.Left(nDot2 + 1) + _T("0.0"); + return nVersionRet; } - _tprintf(_T("[测试版本] 已将 major/minor 置零: ProductVersion=%s\n"), strProductVersion.GetString()); + + if (bTestMode) + { + int nDot1 = strProductVersion.Find(_T('.')); + int nDot2 = (nDot1 >= 0) ? strProductVersion.Find(_T('.'), nDot1 + 1) : -1; + if (nDot2 > nDot1) + { + strProductVersion = strProductVersion.Left(nDot2 + 1) + _T("0.0"); + } + _tprintf(_T("[测试版本] 已将 major/minor 置零: ProductVersion=%s\n"), strProductVersion.GetString()); + } + + _tprintf(_T("FileVersion=%s\n"), strFileVersion.GetString()); + _tprintf(_T("ProductVersion=%s\n"), strProductVersion.GetString()); + } + else + { + // 从项目文件读取版本号 + if (!ReadVersionFromProjectFiles(lpRepoPath, strFileVersion)) + { + _tprintf(_T("错误: 未找到 .rc、AssemblyInfo.cs 或 version_info.txt/.spec 文件,无法读取版本号。\n")); + _tprintf(_T("请使用 pid=m 参数指定产品 ID 以从 git 仓库生成版本号。\n")); + return 35; + } + strProductVersion = strFileVersion; } - _tprintf(_T("FileVersion=%s\n"), strFileVersion.GetString()); - _tprintf(_T("ProductVersion=%s\n"), strProductVersion.GetString()); - - // 不回写版本信息到项目文件,直接修改安装脚本并编译打包 + // 修改安装脚本并编译打包 if (!ExecuteSetupBuild((int)nSetupType, strProductVersion, strFileVersion)) { return 38; diff --git a/GitVer/GitVer_setup.h b/GitVer/GitVer_setup.h index c0b3cf2..81092f1 100644 --- a/GitVer/GitVer_setup.h +++ b/GitVer/GitVer_setup.h @@ -9,8 +9,8 @@ BOOL ExecuteSetupBuild(int nSetupType, const CString& strProductVersion, const CString& strFileVersion); /// -/// 澶勭悊鐙珛鐨 -setup=n 鍛戒护琛屽叆鍙c -/// 閫鍑虹爜锛0 鎴愬姛锛36 -setup 鍊间笉鏀寔锛37 鏈壘鍒拌剼鏈紝 +/// 澶勭悊鐙珛鐨 setup=n 鍛戒护琛屽叆鍙c +/// 閫鍑虹爜锛0 鎴愬姛锛36 setup 鍊间笉鏀寔锛37 鏈壘鍒拌剼鏈紝 /// 38 淇敼鑴氭湰澶辫触锛39 鏈壘鍒扮紪璇戝櫒锛屽叾浠栧悓閫氱敤閿欒鐮併 /// int HandleSetupCommand(int argc, TCHAR* argv[]); diff --git a/README.md b/README.md index d4015de..e270060 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ gitver setver= [repodir=] [-test] [-setup=0|1] gitver nuitkabuild= [repodir=] [-test] [params=" "] gitver nuitkapydbuild= [repodir=] [-test] [params=" "] gitver pyinstaller= [repodir=] [-test] [params=" "] -gitver -setup=0|1 [repodir=] [-test] +gitver setup=n [pid=m] [repodir=] [-test] ``` **閫氱敤鍙傛暟璇存槑锛** @@ -94,7 +94,7 @@ gitver rewrite -f 浠 Git 浠撳簱璇诲彇 tag锛岀敓鎴愪骇鍝佺増鏈彿涓庢枃浠剁増鏈彿锛屽苟鎸夋簮鐮佺被鍨嬭嚜鍔ㄥ洖鍐欍 ``` -gitver setver= [repodir=] [-test] [-setup=0|1] +gitver setver= [repodir=] [-test] ``` **鐗堟湰鍙风敓鎴愯鍒欙細** @@ -102,26 +102,12 @@ gitver setver= [repodir=] [-test] [-setup=0|1] - `ProductVersion = pid.bid.major.minor`锛堝彇褰撳墠鍒嗘敮鍓嶇紑鐨勬渶鏂 tag锛 - `FileVersion = pid.yy.mmdd.id`锛坕d = 褰撳ぉ褰撳墠鍒嗘敮鎻愪氦娆℃暟锛 -**`-setup=N` 鏍囧織锛堟墦鍖呮ā寮忥級锛** - -瀛樺湪 `-setup=N` 鏃讹紝**涓嶅洖鍐**鐗堟湰淇℃伅鍒伴」鐩枃浠讹紝鏀逛负锛 -1. 鍦 exe 鐩綍鎴栦笂绾х洰褰曟煡鎵惧畨瑁呰剼鏈 -2. 淇敼鑴氭湰涓殑鐗堟湰鍙峰瓧娈 -3. 璋冪敤瀵瑰簲缂栬瘧鍣ㄦ墦鍖 - -| 鍊 | 鑴氭湰鏂囦欢 | 缂栬瘧鍣 | -|---|---|---| -| `0` | `setup.iss` | Inno Setup锛坄ISCC.exe`锛 | -| `1` | `setup.nsi` | NSIS锛坄makensis.exe`锛 | - **绀轰緥锛** ``` gitver setver=5 gitver setver=5 repodir=E:\Code\OTH\gitver gitver setver=5 -test -gitver setver=5 -setup=0 -gitver setver=5 repodir=E:\Code\MyProj -setup=1 ``` **杈撳嚭绀轰緥锛** @@ -247,19 +233,26 @@ FileVersion=5.26.0519.3 --- -### `gitver -setup=0|1`锛堢嫭绔嬫墦鍖呭懡浠わ級 +### `gitver setup=n`锛堢嫭绔嬫墦鍖呭懡浠わ級 -鐙珛璋冪敤瀹夎鑴氭湰鎵撳寘锛屼笉渚濊禆 `setver=` 鍛戒护銆 +鐙珛璋冪敤瀹夎鑴氭湰鎵撳寘锛屼笉渚濊禆鍏朵粬鍛戒护銆 ``` -gitver -setup=0|1 [repodir=] [-test] +gitver setup=n [pid=m] [repodir=] [-test] ``` +| 鍙傛暟 | 璇存槑 | +|---|---| +| `n` | 瀹夎鑴氭湰绫诲瀷锛宍0`=Inno Setup锛坄setup.iss`锛夛紝`1`=NSIS锛坄setup.nsi`锛 | +| `pid=m` | 鍙夛紝浜у搧 ID锛堟暣鏁 0-65535锛夛紱涓嶆寚瀹氭椂鑷姩浠庨」鐩殑 `.rc`銆乣AssemblyInfo.cs` 鎴 `.spec` 鏂囦欢涓鍙栫増鏈俊鎭 | + **绀轰緥锛** ``` -gitver -setup=0 5 -gitver -setup=1 5 repodir=E:\Code\MyProj +gitver setup=0 +gitver setup=1 +gitver setup=0 pid=5 +gitver setup=1 pid=5 repodir=E:\Code\MyProj ``` --- @@ -491,7 +484,7 @@ VSVersionInfo( | 33 | 鏃犲弬鏁版ā寮忎笅鍒涘缓 tag 澶辫触 | | 34 | 鏃犲弬鏁版ā寮忎笅鍒涘缓 tag 鍚庢牎楠屽け璐 | | 35 | 鏈壘鍒板彲鍥炲啓鐩爣鏂囦欢锛屾垨鍥炲啓澶辫触 | -| 36 | `-setup=` 鍊间笉鏀寔锛堜粎鏀寔 0 鍜 1锛 | +| 36 | `setup=` 鍊间笉鏀寔锛堜粎鏀寔 0 鍜 1锛 | | 37 | 鏈壘鍒板畨瑁呰剼鏈紙setup.iss / setup.nsi锛 | | 38 | 淇敼瀹夎鑴氭湰澶辫触 | | 39 | 鏈壘鍒板畨瑁呯紪璇戝櫒锛圛SCC.exe / makensis.exe锛 | @@ -576,12 +569,15 @@ gitver pyinstaller=5 params="main.py --onefile --name=MyApp" # 棰勬湡: 棰濆鍙傛暟浼犻掔粰 PyInstaller ``` -### 楠岃瘉 `-setup=` +### 楠岃瘉 `setup=` ```bash # 纭繚 exe 鐩綍鎴栦笂绾х洰褰曟湁 setup.iss -gitver setver=5 -setup=0 -# 棰勬湡: 淇敼 setup.iss 涓殑鐗堟湰鍙峰苟璋冪敤 ISCC.exe 缂栬瘧 +gitver setup=0 +# 棰勬湡: 浠 .rc 鎴 AssemblyInfo.cs 璇诲彇鐗堟湰鍙凤紝淇敼 setup.iss 骞惰皟鐢 ISCC.exe 缂栬瘧 + +gitver setup=0 pid=5 +# 棰勬湡: 浣跨敤 pid=5 鐢熸垚鐗堟湰鍙凤紝淇敼 setup.iss 骞惰皟鐢 ISCC.exe 缂栬瘧 ``` --- @@ -604,8 +600,6 @@ gitver setver=5 -setup=0 | `gitver setver=5` | 0 | | `gitver setver=5 -test` | 0 | | `gitver setver=5 repodir=E:\NotExists` | 23 | -| `gitver setver=5 -setup=0` | 0 / 37 / 38 / 39 | -| `gitver setver=5 -setup=9` | 36 | | `gitver setver=abc` | 4 | ### nuitkabuild= 缁 @@ -641,6 +635,17 @@ gitver setver=5 -setup=0 | `gitver pyinstaller=5` | 0 | | `gitver pyinstaller=abc params="main.py"` | 41 | +### setup= 缁 + +| 鍛戒护 | 棰勬湡杩斿洖鐮 | +|---|---| +| `gitver setup=0` | 0 / 37 / 38 / 39 | +| `gitver setup=1` | 0 / 37 / 38 / 39 | +| `gitver setup=0 pid=5` | 0 / 37 / 38 / 39 | +| `gitver setup=0 pid=5 repodir=E:\NotExists` | 23 | +| `gitver setup=9` | 36 | +| `gitver setup=0 pid=abc` | 4 | + > **娉ㄦ剰**锛氬鏋滄墦鍖呮椂鎻愮ず鈥滄湭鎵惧埌瀹夎缂栬瘧鍣紙ISCC.exe / makensis.exe锛夆濓紝璇锋墜鍔ㄤ笅杞藉畨瑁呭搴斿伐鍏凤紝骞跺皢鍏跺彲鎵ц鏂囦欢璺緞锛堝 `ISCC.exe` 鎴 `makensis.exe` 鎵鍦ㄧ洰褰曪級娣诲姞鍒扮郴缁熺幆澧冨彉閲 `PATH`銆傚父瑙佷笅杞藉湴鍧锛 > > - Inno Setup: https://jrsoftware.org/isinfo.php