Fix default icon export

This commit is contained in:
luboslenco
2025-04-10 15:43:41 +02:00
parent 07ad07e02b
commit 087807447f
2 changed files with 19 additions and 8 deletions
+11
View File
@@ -112,6 +112,17 @@ void export_ico(const char *from, const char *to) {
fwrite(png48, 1, png48_len, file);
fwrite(png256, 1, png256_len, file);
fclose(file);
free(data256);
free(data48);
free(data32);
free(data24);
free(data16);
free(png256);
free(png48);
free(png32);
free(png24);
free(png16);
}
void export_png(const char *from, const char *to, int width, int height) {
+8 -8
View File
@@ -2225,24 +2225,24 @@ class CompilerCommandsExporter extends Exporter {
// ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝
function export_ico(icon, to, from) {
if (!fs_exists(path_join(from, icon))) {
from = irondir;
icon = "icon.png";
}
if (fs_exists(to) && fs_mtime(to) > fs_mtime(from)) {
return;
}
if (!fs_exists(path_join(from, icon))) {
from = makedir;
icon = "icon.png";
}
amake.export_ico(path_join(from, icon), to);
}
function export_png_icon(icon, to, width, height, from) {
if (!fs_exists(path_join(from, icon))) {
from = irondir;
icon = "icon.png";
}
if (fs_exists(to) && fs_mtime(to) > fs_mtime(from)) {
return;
}
if (!fs_exists(path_join(from, icon))) {
from = makedir;
icon = "icon.png";
}
amake.export_png(path_join(from, icon), to, width, height);
}