mirror of https://github.com/odrling/Aegisub
Mostly fix unix build issues related to the new image embedding.
Originally committed to SVN as r3276.
This commit is contained in:
parent
966f88e577
commit
01505e3d37
|
@ -7,4 +7,4 @@ EXTRA_DIST = \
|
|||
wxicon_xpm.xpm
|
||||
|
||||
libresrc.cpp: ../../tools/common-respack
|
||||
../../tools/common-respack libresrc.cpp ../bitmaps/16/* ../bitmaps/24/*
|
||||
../../tools/common-respack libresrc.cpp ../bitmaps/16 ../bitmaps/24 ../bitmaps/misc/splash.png
|
||||
|
|
|
@ -113,14 +113,20 @@ int main(int argc, const char *argv[]) {
|
|||
ofstream outH(headerFileName.GetFullPath().char_str());
|
||||
ofstream outC(argv[1]);
|
||||
|
||||
outC << "/* This is an automatically generated file and should not be modified directly */" << endl;
|
||||
outC << "#include \"" << headerFileName.GetFullName() << "\"" << endl;
|
||||
outC << "/* This is an automatically generated file and should not be modified directly */" << endl
|
||||
<< "#include \"" << headerFileName.GetFullName() << "\"" << endl
|
||||
<< "wxBitmap " << headerFileName.GetName() << "_getimage(const unsigned char *buff, size_t size) {" << endl
|
||||
<< " wxMemoryInputStream mem(buff, size);" << endl
|
||||
<< " wxImage image(mem);" << endl
|
||||
<< " return wxBitmap(image);" << endl
|
||||
<< "}" << endl;
|
||||
|
||||
outH << "/* This is an automatically generated file and should not be modified directly */" << endl;
|
||||
outH << "#include <wx/mstream.h>" << endl;
|
||||
outH << "#include <wx/bitmap.h>" << endl;
|
||||
outH << "#include <wx/image.h>" << endl;
|
||||
outH << "#define GETIMAGE(a) wxBitmap(wxImage(wxMemoryInputStream(a, sizeof(a))))" << endl;
|
||||
outH << "/* This is an automatically generated file and should not be modified directly */" << endl
|
||||
<< "#include <wx/mstream.h>" << endl
|
||||
<< "#include <wx/bitmap.h>" << endl
|
||||
<< "#include <wx/image.h>" << endl
|
||||
<< "wxBitmap " << headerFileName.GetName() << "_getimage(const unsigned char *image, size_t size);" << endl
|
||||
<< "#define GETIMAGE(a) " << headerFileName.GetName() << "_getimage(a, sizeof(a))" << endl;
|
||||
|
||||
wxRegEx nameCleaner("[^A-Za-z_0-9]");
|
||||
wxString filename;
|
||||
|
|
Loading…
Reference in New Issue