Merge branch 'dev/andris/cmake_tools/github_issue_1036' of https://github.com/microsoft/vscode-cmake-tools into dev/andris/cmake_tools/github_issue_1036
This commit is contained in:
Коммит
38541ba116
|
@ -37,7 +37,7 @@
|
|||
"kit.for.toolchain.file": "适用于工具链文件 {0} 的工具包",
|
||||
"using.compilers.for": "将编译器用于 {0} ({1} 体系结构)",
|
||||
"using.compilers": "使用编译器: {0}",
|
||||
"search.for.compilers": "Search for compilers on this computer",
|
||||
"search.for.compilers": "在这台计算机上搜索编译器",
|
||||
"unspecified.let.cmake.guess": "未指定(让 CMake 猜测要使用的编译器和环境)",
|
||||
"not.reading.nonexistent.kit": "未读取不存在的工具包文件: {0}",
|
||||
"reading.kits.file": "正在读取工具包文件 {0}",
|
||||
|
|
|
@ -9,46 +9,46 @@
|
|||
"cmake-tools.command.cmake.scanForKits.title": "掃描套件",
|
||||
"cmake-tools.command.cmake.selectKit.title": "選取套件",
|
||||
"cmake-tools.command.cmake.setVariant.title": "選取 Variant",
|
||||
"cmake-tools.command.cmake.setVariantAll.title": "Select Variant for All Projects",
|
||||
"cmake-tools.command.cmake.setVariantAll.title": "選取所有專案的變化",
|
||||
"cmake-tools.command.cmake.configure.title": "設定",
|
||||
"cmake-tools.command.cmake.configureAll.title": "Configure All Projects",
|
||||
"cmake-tools.command.cmake.configureAll.title": "設定所有專案",
|
||||
"cmake-tools.command.cmake.build.title": "建置",
|
||||
"cmake-tools.command.cmake.buildAll.title": "Build All Projects",
|
||||
"cmake-tools.command.cmake.buildAll.title": "建置所有專案",
|
||||
"cmake-tools.command.cmake.buildNamedTarget.title": "(內部) 依名稱建置目標",
|
||||
"cmake-tools.command.cmake.compileFile.title": "編譯使用中的檔案",
|
||||
"cmake-tools.command.cmake.outline.compileFile.title": "編譯檔案",
|
||||
"cmake-tools.command.cmake.install.title": "安裝",
|
||||
"cmake-tools.command.cmake.installAll.title": "Install All Projects",
|
||||
"cmake-tools.command.cmake.installAll.title": "安裝所有專案",
|
||||
"cmake-tools.command.cmake.buildWithTarget.title": "建置目標",
|
||||
"cmake-tools.command.cmake.setDefaultTarget.title": "設定建置目標",
|
||||
"cmake-tools.command.cmake.cleanConfigure.title": "刪除快取並重新設定",
|
||||
"cmake-tools.command.cmake.cleanConfigureAll.title": "Delete Cache and Reconfigure All Projects",
|
||||
"cmake-tools.command.cmake.cleanConfigureAll.title": "刪除快取並重新設定所有專案",
|
||||
"cmake-tools.command.cmake.outline.cleanConfigure.title": "清除重新設定",
|
||||
"cmake-tools.command.cmake.outline.cleanConfigureAll.title": "Clean Reconfigure All Projects",
|
||||
"cmake-tools.command.cmake.outline.cleanConfigureAll.title": "清除重新設定所有專案",
|
||||
"cmake-tools.command.cmake.clean.title": "清除",
|
||||
"cmake-tools.command.cmake.cleanAll.title": "Clean All Projects",
|
||||
"cmake-tools.command.cmake.cleanAll.title": "清除所有專案",
|
||||
"cmake-tools.command.cmake.cleanRebuild.title": "清除重建",
|
||||
"cmake-tools.command.cmake.cleanRebuildAll.title": "Clean Rebuild All Projects",
|
||||
"cmake-tools.command.cmake.cleanRebuildAll.title": "清除重建所有專案",
|
||||
"cmake-tools.command.cmake.ctest.title": "執行測試",
|
||||
"cmake-tools.command.cmake.ctestAll.title": "Run Tests for All Projects",
|
||||
"cmake-tools.command.cmake.ctestAll.title": "執行所有專案的測試",
|
||||
"cmake-tools.command.cmake.editCache.title": "編輯 CMake 快取",
|
||||
"cmake-tools.command.cmake.quickStart.title": "快速入門",
|
||||
"cmake-tools.command.cmake.debugTarget.title": "偵錯",
|
||||
"cmake-tools.command.cmake.debugTargetAll.title": "Debug All Projects",
|
||||
"cmake-tools.command.cmake.debugTargetAll.title": "偵錯所有專案",
|
||||
"cmake-tools.command.cmake.launchTarget.title": "執行但不進行偵錯",
|
||||
"cmake-tools.command.cmake.launchTargetAll.title": "Run All Projects Without Debugging",
|
||||
"cmake-tools.command.cmake.launchTargetAll.title": "執行所有專案但不進行偵錯",
|
||||
"cmake-tools.command.cmake.selectLaunchTarget.title": "設定偵錯目標",
|
||||
"cmake-tools.command.cmake.stop.title": "取消建置",
|
||||
"cmake-tools.command.cmake.stopAll.title": "Cancel Build for All Projects",
|
||||
"cmake-tools.command.cmake.stopAll.title": "取消所有專案的組建",
|
||||
"cmake-tools.command.cmake.resetState.title": "重設 CMake 工具延伸模組狀態 (進行疑難排解)",
|
||||
"cmake-tools.command.cmake.selectActiveFolder.title": "Select Active Folder",
|
||||
"cmake-tools.command.cmake.selectActiveFolder.title": "選取作用中的資料夾",
|
||||
"cmake-tools.command.cmake.outline.runUtilityTarget.title": "執行公用程式",
|
||||
"cmake-tools.command.cmake.outline.debugTarget.title": "偵錯",
|
||||
"cmake-tools.command.cmake.outline.launchTarget.title": "在終端機中執行",
|
||||
"cmake-tools.command.cmake.outline.setDefaultTarget.title": "設定為建置目標",
|
||||
"cmake-tools.command.cmake.outline.setLaunchTarget.title": "設定為啟動/偵錯目標",
|
||||
"cmake-tools.command.cmake.outline.revealInCMakeLists.title": "開啟 CMakeLists.txt",
|
||||
"cmake-tools.command.cmake.folders.setActiveFolder.title": "Set Active Folder",
|
||||
"cmake-tools.command.cmake.folders.setActiveFolder.title": "設定作用中的資料夾",
|
||||
"cmake-tools.configuration.title": "CMake 工具組態",
|
||||
"cmake-tools.configuration.cmake.cmakePath.description": "要使用的 CMake 可執行檔名稱/路徑。",
|
||||
"cmake-tools.configuration.cmake.buildDirectory.description": "接收 CMake 建置檔案的目錄。",
|
||||
|
@ -110,7 +110,7 @@
|
|||
"cmake-tools.configuration.cmake.buildTask.description": "使用 tasks.json 而非內部處理序的組建。",
|
||||
"cmake-tools.configuration.cmake.outputLogEncoding.description": "外部命令輸出的編譯 (例如 cmake -- build)。",
|
||||
"cmake-tools.configuration.cmake.enableTraceLogging.description": "為檔案及主控台啟用追蹤記錄 (雜訊非常多)。",
|
||||
"cmake-tools.configuration.cmake.autoSelectActiveFolder.description": "Select active folder automatically",
|
||||
"cmake-tools.configuration.cmake.autoSelectActiveFolder.description": "自動選取作用中的資料夾",
|
||||
"cmake-tools.configuration.views.cmake.folders.description": "資料夾",
|
||||
"cmake-tools.configuration.views.cmake.outline.description": "專案大綱"
|
||||
}
|
|
@ -14,7 +14,7 @@
|
|||
"no.source.directory.found": "您未開啟任何來源目錄",
|
||||
"quickstart.cmake.project": "快速上手新的 CMake 專案",
|
||||
"edit.setting": "編輯 'cmake.sourceDirectory' 設定",
|
||||
"missing.cmakelists": "CMakeLists.txt was not found in the root of the folder '{0}'",
|
||||
"missing.cmakelists": "在資料夾 '{0}' 的根中,找不到 CMakeLists.txt",
|
||||
"starting.cmake.driver": "正在啟動 CMake 驅動程式",
|
||||
"bad.cmake.executable": "錯誤的 CMake 可執行檔 \"{0}\"。",
|
||||
"please.upgrade.cmake": "For the best experience, CMake server or file-api support is required. Please upgrade CMake to {0} or newer.",
|
||||
|
@ -44,7 +44,7 @@
|
|||
"failed.to.copy": "無法將 \"{0}\" 複製到 \"{1}\": {2}",
|
||||
"configuring.project": "正在設定專案",
|
||||
"preparing.to.configure": "正在準備設定",
|
||||
"run.configure": "Configuring folder: {0}",
|
||||
"run.configure": "正在設定資料夾: {0}",
|
||||
"unexpected.configure.type": "未預期的設定類型",
|
||||
"finishing.configure": "正在完成設定",
|
||||
"configure.failed": "無法設定專案",
|
||||
|
@ -58,7 +58,7 @@
|
|||
"waiting.on.variant": "正在等候變化選取項目",
|
||||
"no.variant.abort": "未選取任何變化。中止設定",
|
||||
"cmake.drive.died.during.tasksbuildcommend": "CMake 驅動程式在 tasksBuildCommand 期間已終止",
|
||||
"run.build": "Building folder: {0}",
|
||||
"run.build": "正在建置資料夾: {0}",
|
||||
"unable.to.configure": "建置失敗: 無法設定專案",
|
||||
"driver.died.after.successful.configure": "設定成功後,CMake 驅動程式已隨即終止",
|
||||
"building.status": "正在建置",
|
||||
|
@ -74,7 +74,7 @@
|
|||
"enter.target.name": "輸入目標名稱",
|
||||
"target.to.build.description": "要建置的目標",
|
||||
"driver.died.after.build.succeeded": "建置成功後,CMake 驅動程式已隨即終止。",
|
||||
"select.a.launch.target": "Select a launch target for {0}",
|
||||
"select.a.launch.target": "為 {0} 選取啟動目標",
|
||||
"no.executable.target.found.to.launch": "找不到要啟動的可執行目標。請檢查:",
|
||||
"have.you.called.add_executable": "您有在 CMake 專案中呼叫 add_executable() 嗎?",
|
||||
"have.you.configured": "您執行的 CMake 設定成功了嗎?",
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
{
|
||||
"rereading.kits": "正在重新讀取套件",
|
||||
"dispose.cmake.tools": "處置 CMake 工具",
|
||||
"configure.this.project": "Would you like to configure project '{0}'?",
|
||||
"configure.this.project": "是否要設定專案 '{0}'?",
|
||||
"yes.button": "是",
|
||||
"not.now.button": "現在不要",
|
||||
"always.configure.on.open": "永遠在開啟時設定專案嗎?",
|
||||
|
@ -21,8 +21,8 @@
|
|||
"scan.for.kits.button": "掃描套件",
|
||||
"cancel.button": "取消",
|
||||
"running.in.test.mode": "正在於測試模式中執行 CMakeTools。已停用 selectKit。",
|
||||
"no.active.folder": "No active folder.",
|
||||
"invalid.folder": "Invalid folder.",
|
||||
"no.active.folder": "非作用中的資料夾。",
|
||||
"invalid.folder": "資料夾無效。",
|
||||
"compilation information.not.found": "找不到此檔案的編譯資訊",
|
||||
"initial.setup": "初始設定",
|
||||
"started": "已啟動",
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"update.workspace.folders": "更新工作區資料夾",
|
||||
"same.folder.loaded.twice": "The same workspace folder was loaded twice",
|
||||
"same.folder.loaded.twice": "已載入兩次相同的工作區資料夾",
|
||||
"removed.folder.not.on.record": "工作區資料夾已移除,但未與延伸模組執行個體建立關聯"
|
||||
}
|
|
@ -37,7 +37,7 @@
|
|||
"kit.for.toolchain.file": "工具鏈檔案 {0} 的套件",
|
||||
"using.compilers.for": "使用 {0} 的編譯器({1} 架構)",
|
||||
"using.compilers": "正在使用編譯器: {0}",
|
||||
"search.for.compilers": "Search for compilers on this computer",
|
||||
"search.for.compilers": "搜尋這部電腦上的編譯器",
|
||||
"unspecified.let.cmake.guess": "未指定 (讓 CMake 猜測要使用的編譯器與環境)",
|
||||
"not.reading.nonexistent.kit": "未讀取不存在的套件檔案: {0}",
|
||||
"reading.kits.file": "正在讀取套件檔案 {0}",
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
"start.selection.of.kits": "開始選取套件。找到 {0} 個套件。",
|
||||
"opening.kit.selection": "正在開啟套件選取 QuickPick",
|
||||
"unspecified.kit.name": "未指定",
|
||||
"select.a.kit.placeholder": "Select a Kit for {0}",
|
||||
"select.a.kit.placeholder": "選取 {0} 的套件",
|
||||
"user.cancelled.kit.selection": "使用者已取消套件選取",
|
||||
"user.selected.kit": "使用者已選取套件 {0}",
|
||||
"kit.references.non-existent": "套件 \"{0}\" 參考了不存在的編譯器二進位檔 [{1}]。要執行什麼作業?",
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"active.folder.auto.select.tooltip": "Active folder",
|
||||
"active.folder.tooltip": "Select Active folder",
|
||||
"active.folder.auto.select.tooltip": "作用中的資料夾",
|
||||
"active.folder.tooltip": "選取作用中的資料夾",
|
||||
"unconfigured": "未設定",
|
||||
"loading.status": "正在載入...",
|
||||
"click.to.select.variant.tooltip": "按一下以選取目前的建置變化",
|
||||
|
|
|
@ -14,6 +14,6 @@
|
|||
"item.render.issue": "轉譯此項目時發生問題。這是 Bug",
|
||||
"empty.project": "空白專案",
|
||||
"update.project.with.mismatch": "更新具有不符名稱屬性的專案",
|
||||
"error.update.code.model.on.nonexist.folder": "Updating code model on folder that does not yet exist?",
|
||||
"error.update.code.model.on.nonexist.folder": "要更新不存在於資料夾上的程式碼模型嗎?",
|
||||
"error.rendering.children.nodes": "轉譯子節點時發生錯誤"
|
||||
}
|
|
@ -214,6 +214,7 @@ export abstract class CMakeDriver implements vscode.Disposable {
|
|||
workspaceFolder: ws_root,
|
||||
buildType: this.currentBuildType,
|
||||
workspaceRootFolderName: path.basename(ws_root),
|
||||
workspaceFolderBasename: path.basename(ws_root),
|
||||
generator: this.generatorName || 'null',
|
||||
userHome: paths.userHome,
|
||||
buildKit: this._kit ? this._kit.name : '__unknownkit__',
|
||||
|
|
|
@ -28,6 +28,7 @@ export interface RequiredExpansionContextVars {
|
|||
buildType: string;
|
||||
buildKit: string;
|
||||
workspaceRootFolderName: string;
|
||||
workspaceFolderBasename: string;
|
||||
generator: string;
|
||||
userHome: string;
|
||||
}
|
||||
|
|
|
@ -140,6 +140,7 @@ class Paths {
|
|||
buildType: '',
|
||||
generator: '',
|
||||
workspaceRootFolderName: path.basename(wsc.folder.uri.fsPath),
|
||||
workspaceFolderBasename: path.basename(wsc.folder.uri.fsPath)
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
@ -116,6 +116,24 @@ suite('[Variable Substitution]', async () => {
|
|||
expect(typeof cacheEntry.value).to.eq('string', '[workspaceRootFolderName] unexpected cache entry value type');
|
||||
}).timeout(100000);
|
||||
|
||||
test('Check substitution for "workspaceFolderBasename"', async () => {
|
||||
// Set fake settings
|
||||
testEnv.config.updatePartial({configureSettings: {workspaceFolderBasename: '${workspaceFolderBasename}'}});
|
||||
|
||||
// Configure
|
||||
expect(await cmt.configure()).to.be.eq(0, '[workspaceFolderBasename] configure failed');
|
||||
expect(testEnv.projectFolder.buildDirectory.isCMakeCachePresent).to.eql(true, 'expected cache not present');
|
||||
const cache = await CMakeCache.fromPath(await cmt.cachePath);
|
||||
|
||||
const cacheEntry = cache.get('workspaceFolderBasename') as api.CacheEntry;
|
||||
expect(cacheEntry.type).to.eq(api.CacheEntryType.String, '[workspaceFolderBasename] unexpected cache entry type');
|
||||
expect(cacheEntry.key)
|
||||
.to.eq('workspaceFolderBasename', '[workspaceFolderBasename] unexpected cache entry key name');
|
||||
expect(cacheEntry.as<string>())
|
||||
.to.eq(path.basename(testEnv.projectFolder.location), '[workspaceFolderBasename] substitution incorrect');
|
||||
expect(typeof cacheEntry.value).to.eq('string', '[workspaceFolderBasename] unexpected cache entry value type');
|
||||
}).timeout(100000);
|
||||
|
||||
test('Check substitution for "generator"', async () => {
|
||||
// Set fake settings
|
||||
testEnv.config.updatePartial({configureSettings: {generator: '${generator}'}});
|
||||
|
|
Загрузка…
Ссылка в новой задаче