fix path & add icon

This commit is contained in:
辉鸭蛋
2024-11-09 11:02:13 +08:00
parent bac314ae28
commit 2adcc6d0ba
37 changed files with 71 additions and 2 deletions

View File

@@ -0,0 +1,35 @@
const fs = require('fs');
const path = require('path');
// 定义路径
const pngDir = 'E:\\HuiTask\\更好的原神\\2.资料\\图标处理\\matchedPng';
const iconDir = 'E:\\HuiTask\\更好的原神\\2.资料\\图标处理\\matchedIco';
// 定义输出目录
const outputDir = 'E:\\HuiTask\\更好的原神\\2.资料\\图标处理\\diffPng';
// 确保输出目录存在
if (!fs.existsSync(outputDir)) {
fs.mkdirSync(outputDir, { recursive: true });
}
// 获取两个目录中的文件列表并去除扩展名
const getPureFilenames = (dir) => {
return fs.readdirSync(dir).map(file => path.parse(file).name);
};
const pngFiles = getPureFilenames(pngDir);
const icoFiles = getPureFilenames(iconDir);
// 找出在PNG目录存在但在ICO目录不存在的文件
const unmatchedPng = pngFiles.filter(name => !icoFiles.includes(name));
// 复制不匹配的PNG文件到输出目录
unmatchedPng.forEach(filename => {
const sourcePath = path.join(pngDir, `${filename}.png`);
const destPath = path.join(outputDir, `${filename}.png`);
fs.copyFileSync(sourcePath, destPath);
});
console.log(`找到并复制了 ${unmatchedPng.length} 个不匹配的 PNG 文件到: ${outputDir}`);

View File

@@ -0,0 +1,2 @@
[.ShellClassInfo]
IconResource=icon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@@ -0,0 +1,2 @@
[.ShellClassInfo]
IconResource=icon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

View File

@@ -12,7 +12,7 @@
"id": 1, "id": 1,
"x": 4790.89892578125, "x": 4790.89892578125,
"y": -3182.685546875, "y": -3182.685546875,
"type": "path", "type": "teleport",
"move_mode": "walk", "move_mode": "walk",
"action": "" "action": ""
}, },

View File

@@ -0,0 +1,2 @@
[.ShellClassInfo]
IconResource=icon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View File

@@ -0,0 +1,2 @@
[.ShellClassInfo]
IconResource=icon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@@ -0,0 +1,2 @@
[.ShellClassInfo]
IconResource=icon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View File

@@ -0,0 +1,2 @@
[.ShellClassInfo]
IconResource=icon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View File

@@ -0,0 +1,2 @@
[.ShellClassInfo]
IconResource=icon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@@ -0,0 +1,2 @@
[.ShellClassInfo]
IconResource=icon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View File

@@ -14,7 +14,7 @@
"y": 5091.79931640625, "y": 5091.79931640625,
"action": "", "action": "",
"move_mode": "walk", "move_mode": "walk",
"type": "path" "type": "teleport"
}, },
{ {
"id": 2, "id": 2,

View File

@@ -0,0 +1,2 @@
[.ShellClassInfo]
IconResource=icon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View File

@@ -0,0 +1,2 @@
[.ShellClassInfo]
IconResource=icon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@@ -0,0 +1,2 @@
[.ShellClassInfo]
IconResource=icon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

View File

@@ -0,0 +1,2 @@
[.ShellClassInfo]
IconResource=icon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View File

@@ -0,0 +1,2 @@
[.ShellClassInfo]
IconResource=icon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

View File

@@ -0,0 +1,2 @@
[.ShellClassInfo]
IconResource=icon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@@ -0,0 +1,2 @@
[.ShellClassInfo]
IconResource=icon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

View File

@@ -0,0 +1,2 @@
[.ShellClassInfo]
IconResource=icon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

@@ -0,0 +1,2 @@
[.ShellClassInfo]
IconResource=icon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB