You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ImageJ Launcher has --set-icon hidden argument to call UpdateResource to set the native launcher EXE's icon.
intset_exe_icon(constchar*exe_path, constchar*ico_path)
{
intid=1, i;
structiconicon;
HANDLEhandle;
if (suffixcmp(exe_path, -1, ".exe")) {
error("Not an .exe file: '%s'", exe_path);
return1;
}
if (!file_exists(exe_path)) {
error("File not found: '%s'", exe_path);
return1;
}
if (suffixcmp(ico_path, -1, ".ico")) {
error("Not an .ico file: '%s'", ico_path);
return1;
}
if (!file_exists(ico_path)) {
error("File not found: '%s'", ico_path);
return1;
}
if (parse_ico_file(ico_path, &icon))
return1;
handle=BeginUpdateResource(exe_path, FALSE);
if (!handle) {
error("Could not update resources of '%s'", exe_path);
return1;
}
UpdateResource(handle, RT_GROUP_ICON,
"MAINICON", MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US),
icon.header, sizeof(structheader) +icon.count*sizeof(structresource_directory));
for (i=0; i<icon.count; i++) {
UpdateResource(handle, RT_ICON,
MAKEINTRESOURCE(id++), MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US),
icon.images[i], icon.items[i].bytes_in_resource);
}
return !EndUpdateResource(handle, FALSE);
}
At first I thought this would be better served by an external tool. But it would actually be nice for the Jaunch configurator to have a set-icon directive that does this, making it as easy as possible for people to build out their own native launchers without needing to install another tool.
The text was updated successfully, but these errors were encountered:
Electron's rcedit.exe tool is a standalone program ~1MB in size that can edit EXE file icons and other resource metadata, which is currently actively maintained. So for the moment, to resolve this issue in Jaunch, let's simply document the recommendation to use it, rather than adding more C code to Jaunch.
The ImageJ Launcher has
--set-icon
hidden argument to callUpdateResource
to set the native launcher EXE's icon.At first I thought this would be better served by an external tool. But it would actually be nice for the Jaunch configurator to have a set-icon directive that does this, making it as easy as possible for people to build out their own native launchers without needing to install another tool.
The text was updated successfully, but these errors were encountered: