mirror of
https://github.com/lc-soft/LCUI.git
synced 2026-11-30 16:48:21 +01:00
- Add ptk_window_set_icons with Win32 WM_SETICON, X11 _NET_WM_ICON and fb no-op. - Add LCUI window/default icon APIs, DPI-aware HICON selection and pre-rendered built-in icon assets. - Add pandagl memory image readers and fix bilinear zoom edge sampling. - Cover file/data icons, defaults and high-DPI sizes with integration tests.
32 lines
627 B
JavaScript
32 lines
627 B
JavaScript
import { existsSync } from "node:fs";
|
|
import { execFileSync } from "node:child_process";
|
|
|
|
const sizes = [16, 24, 32, 48, 64, 128, 256];
|
|
|
|
for (const size of sizes) {
|
|
const input =
|
|
size === 256
|
|
? "resources/lcui-icon.png"
|
|
: `resources/lcui-icon-${size}.png`;
|
|
const output = `src/resources/lcui-icon-${size}.png.inc`;
|
|
|
|
if (!existsSync(input)) {
|
|
console.error(`missing icon source: ${input}`);
|
|
process.exit(1);
|
|
}
|
|
|
|
execFileSync(
|
|
"xmake",
|
|
[
|
|
"l",
|
|
"cli.binutils.bin2c",
|
|
"-i",
|
|
input,
|
|
"-o",
|
|
output,
|
|
"--nozeroend",
|
|
],
|
|
{ stdio: "inherit" }
|
|
);
|
|
}
|