Fix default icon export
This commit is contained in:
@@ -112,6 +112,17 @@ void export_ico(const char *from, const char *to) {
|
|||||||
fwrite(png48, 1, png48_len, file);
|
fwrite(png48, 1, png48_len, file);
|
||||||
fwrite(png256, 1, png256_len, file);
|
fwrite(png256, 1, png256_len, file);
|
||||||
fclose(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) {
|
void export_png(const char *from, const char *to, int width, int height) {
|
||||||
|
|||||||
+8
-8
@@ -2225,24 +2225,24 @@ class CompilerCommandsExporter extends Exporter {
|
|||||||
// ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝
|
// ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝
|
||||||
|
|
||||||
function export_ico(icon, to, from) {
|
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)) {
|
if (fs_exists(to) && fs_mtime(to) > fs_mtime(from)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!fs_exists(path_join(from, icon))) {
|
|
||||||
from = makedir;
|
|
||||||
icon = "icon.png";
|
|
||||||
}
|
|
||||||
amake.export_ico(path_join(from, icon), to);
|
amake.export_ico(path_join(from, icon), to);
|
||||||
}
|
}
|
||||||
|
|
||||||
function export_png_icon(icon, to, width, height, from) {
|
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)) {
|
if (fs_exists(to) && fs_mtime(to) > fs_mtime(from)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!fs_exists(path_join(from, icon))) {
|
|
||||||
from = makedir;
|
|
||||||
icon = "icon.png";
|
|
||||||
}
|
|
||||||
amake.export_png(path_join(from, icon), to, width, height);
|
amake.export_png(path_join(from, icon), to, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user