Skip to content

Commit 4e81625

Browse files
committed
update
1 parent 61bd144 commit 4e81625

5 files changed

Lines changed: 2087 additions & 655 deletions

File tree

Editor/ProjectCreatorWindow.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,27 @@ backlog_post("Hello World!")
215215
}
216216
}
217217
}
218+
219+
// icon replacement in the Linux executable:
220+
if (iconResource.IsValid())
221+
{
222+
wi::graphics::Texture tex = iconResource.GetTexture();
223+
224+
std::string match = "Wicked Editor Embedded Icon Data SDL";
225+
226+
// searches for match string:
227+
auto it = std::search(exedata.begin(), exedata.end(), match.begin(), match.end());
228+
if (it != exedata.end())
229+
{
230+
wi::vector<uint8_t> iconfiledata;
231+
if (wi::helper::saveTextureToMemoryFile(tex, "raw", iconfiledata))
232+
{
233+
// replace the pixel data part:
234+
std::copy(iconfiledata.begin(), iconfiledata.end(), it + match.length() + 1);
235+
}
236+
}
237+
}
238+
218239
wi::helper::FileWrite(exepath_dst, exedata.data(), exedata.size());
219240
}
220241
}

0 commit comments

Comments
 (0)