Skip to content

Commit 6d5e24a

Browse files
authored
适配 ege25.11 进行一些改进, 版本号更新至 1.0.0 (#10)
* update version * 适配 ege25.11 进行一些改进 * 删除重复的库文件 * 单文件编译适配 vs2026 * fix: 消除递归调用,优化安装流程逻辑 * fix: 修复 VS2026 的 lib 目录路径映射问题
1 parent 65fc07f commit 6d5e24a

11 files changed

Lines changed: 64 additions & 51 deletions

File tree

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@ All notable changes to the "ege" extension will be documented in this file.
44

55
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
66

7+
## 1.0.0
8+
9+
- 大版本更新: 内置的 EGE 升级至 25.11
10+
- 新增 Visual Studio 2026 支持
11+
- 新增配置项 `ege.downloadFromOfficial`:支持配置是否从官网下载 EGE(默认使用内置版本)
12+
- 移除安装时的版本选择弹窗,默认使用内置版本,提升用户体验
13+
- EGE 25.11 新特性:
14+
- 新增颜色类型 `color_type` 枚举,支持 PRGB32/ARGB32/RGB32
15+
- 新增 `image_convertcolor()` 函数用于图像颜色类型转换
16+
- 新增 `keypress()`/`keyrelease()`/`keyrepeat()` 键盘输入查询函数
17+
- 相机模块增强:支持查询设备支持的分辨率
18+
- 图像处理改用预乘 alpha 格式提升渲染性能
19+
720
## 0.7.0
821

922
- 将 ege 更新为更新的 2025 版本, 带来了相机相关 feature.

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ A VSCode plugin to help the configuration of [ege](https://xege.org). Enjoy it!
1515

1616
## Deps
1717

18-
- Windows: Visual Studio `2017`/`2019`/`2022`/`20XX+`
18+
- Windows: Visual Studio `2017`/`2019`/`2022`/`2026+`
1919
- MacOS: `mingw-w64`, `wine-stable` (wine64)
2020
- You can install via `brew install mingw-w64 wine-stable`
2121
- Linux: `mingw-w64`, `wine64`
@@ -36,9 +36,14 @@ You can define some options like below:
3636
"ege.update_url": "",
3737
"ege.showEditorContextMenu": true, // Show 'ege' in editor context menu
3838
"ege.explorerContextMenu": true, // Show 'ege' in explorer context menu
39+
"ege.downloadFromOfficial": false // Download EGE from official website instead of using the builtin version
3940
}
4041
```
4142

43+
### Configuration Details
44+
45+
- **`ege.downloadFromOfficial`**: By default, the plugin uses the builtin EGE library (tested and stable). If you want to download the latest version from the official website (<https://xege.org>), set this option to `true`. Note that the official download may not always be stable or compatible with the plugin.
46+
4247
## MileStone
4348

4449
- Install:

README.zh-CN.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
## 依赖项
1717

18-
- Windows: Visual Studio `2017`/`2019`/`2022`/`20XX+`
18+
- Windows: Visual Studio `2017`/`2019`/`2022`/`2026+`
1919
- MacOS: `mingw-w64`, `wine-stable` (wine64)
2020
- 您可以通过 `brew install mingw-w64 wine-stable` 安装
2121
- Linux: `mingw-w64`, `wine64`
@@ -34,10 +34,15 @@
3434
{
3535
"ege.update_url": "https://xege.org/download/ege-latest-version",
3636
"ege.showEditorContextMenu": true,
37-
"ege.explorerContextMenu": true
37+
"ege.explorerContextMenu": true,
38+
"ege.downloadFromOfficial": false // 从官网下载 EGE 而不是使用内置版本
3839
}
3940
```
4041

42+
### 配置说明
43+
44+
- **`ege.downloadFromOfficial`**: 默认情况下,插件使用内置的 EGE 库(经过测试且稳定)。如果您想从官网 (<https://xege.org>) 下载最新版本,请将此选项设置为 `true`。注意:官网下载的版本可能不总是稳定或与插件兼容。
45+
4146
## 命令
4247

4348
此扩展提供以下命令:

bundle/ege_bundle/lib/vs2026/vs2026/x64/graphics.lib

Lines changed: 0 additions & 3 deletions
This file was deleted.

bundle/ege_bundle/lib/vs2026/vs2026/x86/graphics.lib

Lines changed: 0 additions & 3 deletions
This file was deleted.

package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "ege",
33
"displayName": "ege",
44
"description": "Auto configuration for ege (https://xege.org)",
5-
"version": "0.7.0",
5+
"version": "1.0.0",
66
"icon": "images/logo.png",
77
"publisher": "wysaid",
88
"repository": {
@@ -73,6 +73,12 @@
7373
"default": true,
7474
"description": "%config.explorerContextMenu.description%",
7575
"scope": "resource"
76+
},
77+
"ege.downloadFromOfficial": {
78+
"type": "boolean",
79+
"default": false,
80+
"description": "%config.downloadFromOfficial.description%",
81+
"scope": "resource"
7682
}
7783
}
7884
},

package.nls.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
"title.egeConfiguration": "ege configuration",
99
"config.updateUrl.description": "An url to get latest version of EGE (default: https://xege.org/download/ege-latest-version)",
1010
"config.showEditorContextMenu.description": "Show 'ege' in editor context menu",
11-
"config.explorerContextMenu.description": "Show 'ege' in explorer context menu"
11+
"config.explorerContextMenu.description": "Show 'ege' in explorer context menu",
12+
"config.downloadFromOfficial.description": "Download EGE from official website (https://xege.org) instead of using the builtin version. Enable this option only if you need the latest version from the official website."
1213
}

package.nls.zh-cn.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
"title.egeConfiguration": "ege 配置",
99
"config.updateUrl.description": "获取最新版本 EGE 的 URL(默认:https://xege.org/download/ege-latest-version)",
1010
"config.showEditorContextMenu.description": "在编辑器上下文菜单中显示 'ege'",
11-
"config.explorerContextMenu.description": "在资源管理器上下文菜单中显示 'ege'"
11+
"config.explorerContextMenu.description": "在资源管理器上下文菜单中显示 'ege'",
12+
"config.downloadFromOfficial.description": "从官网 (https://xege.org) 下载 EGE 而不是使用内置版本。仅当你需要官网最新版本时才启用此选项。"
1213
}

src/buildSingleFileWin32.ts

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,28 @@ export class SingleFileBuilderWin32 extends SingleFileBuilder {
6262
let extraIncludeDir = null;
6363
let extraLibsDir: string | null = null;
6464

65+
// version 通常是年份 (2015, 2017, 2019, 2022),但 VS2026 的安装目录名是 "18"
66+
// 所以 VS2026 的 version 值是 18,而不是 2026
67+
const vsVersion = compilerItem.version;
6568
let cppStandard = 'c++11';
66-
if (compilerItem.version >= 2019) {
67-
/// vs2019, vs2022
69+
if (vsVersion >= 2017 || vsVersion === 18) {
70+
/// vs2017, vs2019, vs2022, vs2026 (version=18)
6871
cppStandard = 'c++17';
69-
} else if (compilerItem.version >= 2015) {
72+
} else if (vsVersion >= 2015) {
73+
/// vs2015
7074
cppStandard = 'c++14';
7175
}
7276

77+
// 将 version 映射到 lib 目录名(VS2026 的 version 是 18,但 lib 目录是 vs2026)
78+
const libDirVersion = vsVersion === 18 ? 2026 : vsVersion;
79+
7380
if (compilerItem.version > 0) {
7481
extraIncludeDir = path.join(installerDir, 'include');
7582
const libDir = path.join(installerDir, 'lib');
76-
extraLibsDir = path.join(libDir, `vs${compilerItem.version}`);
83+
extraLibsDir = path.join(libDir, `vs${libDirVersion}`);
7784
if (!fs.existsSync(extraLibsDir)) {
7885
console.log(`EGE: path "${extraLibsDir}" does not exist, set to default`);
79-
extraLibsDir = path.join(libDir, 'vs2019'); // 目前最新是这个.
86+
extraLibsDir = path.join(libDir, 'vs2022'); // fallback 到 vs2022
8087
}
8188
}
8289

@@ -108,7 +115,7 @@ export class SingleFileBuilderWin32 extends SingleFileBuilder {
108115
let executionCharset = ''; // ANSI (Unuse)
109116
let executionCharsetCommand = ''; // '/execution-charset:' + executionCharset;
110117

111-
const buildCommand = `call "${cmdTool}" ${arch} && cl /nodefaultlib:"MSVCRT" /MDd ${defineConsole} ${extraIncludeCommand} /std:${cppStandard} ${sourceCharsetCommand} ${executionCharsetCommand} /EHsc "${filePath}" /link ${extraLibsCommand}`;
118+
const buildCommand = `call "${cmdTool}" ${arch} && cl /nodefaultlib:"MSVCRT" /MDd ${defineConsole} ${extraIncludeCommand} /std:${cppStandard} /Zc:__cplusplus ${sourceCharsetCommand} ${executionCharsetCommand} /EHsc "${filePath}" /link ${extraLibsCommand}`;
112119

113120
const logMsg = `执行编译指令: ${buildCommand}`;
114121
ege.printWarning(logMsg);

src/compilers.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const TYPE_VS2015 = 'vs2015';
2424
const TYPE_VS2017 = 'vs2017';
2525
const TYPE_VS2019 = 'vs2019';
2626
const TYPE_VS2022 = 'vs2022';
27+
const TYPE_VS2026 = 'vs2026';
2728

2829
/// will try auto detect.
2930
const TYPE_LATEST_VISUAL_STUDIO = 'vs_latest';
@@ -272,6 +273,7 @@ export class Compilers {
272273
case TYPE_VS2017:
273274
case TYPE_VS2019:
274275
case TYPE_VS2022:
276+
case TYPE_VS2026:
275277
case TYPE_LATEST_VISUAL_STUDIO:
276278
this.performInstallVisualStudio(installationPath);
277279
break;

0 commit comments

Comments
 (0)