// Setup the PNG file reading and cpp file.
fstream cppfile, pngfile;
+
+#if defined(__WIN32__)
+
pngfile.open(PNGFilename.wc_str(), ios::in | ios::binary );
- cppfile.open(CPPFilename.wc_str(), ios::out | ios::trunc );
+ cppfile.open(CPPFilename.wc_str(), ios::out | ios::trunc );
+
+# else
+
+ pngfile.open(PNGFilename.c_str(), ios::in | ios::binary );
+ cppfile.open(CPPFilename.c_str(), ios::out | ios::trunc );
+
+#endif
outname.Append(wxString::FromUTF8(DirFilenameOnly.c_str()));
outname.Append(wxT("_"));
wxString HPPFilenameOnly;
wxString CPPFilename;
-#if defined(__HAIKU__)
-
-#elif defined(__WIN32__)
+#if defined(__WIN32__)
wxStringTokenizer HPPFilenameTokens(HPPFilename, wxT("\\"));
wxStringTokenizer DirFilenameTokens(dirfilename, wxT("\\"));
HPPFilename.Append(wxT(".h"));
+#if defined(__WIN32__)
+
hppfile.open(HPPFilename.wc_str(), ios::out | ios::trunc );
-
+
+#else
+
+ hppfile.open(HPPFilename.c_str(), ios::out | ios::trunc );
+
+#endif
+
hppfile << "#include <iostream>" << endl << endl;
hppfile << "#ifndef " << finaldirname.c_str() << "_H" << endl;
hppfile << "#define " << finaldirname.c_str() << "_H" << endl << endl;
#else
- BitmapFilename.Append(BitmapDirName);
- BitmapFilename.Append(wxT("/../bitmaps.h"));
+ BitmapHeaderFilename.Append(BitmapDirName);
+ BitmapHeaderFilename.Append(wxT("/../bitmaps.h"));
#endif
wxString BitmapSubDirFull;
bool ContinueProcess = BitmapDir.GetFirst(&BitmapSubDir, wxEmptyString, wxDIR_DEFAULT);
-
+
while (ContinueProcess){
#if defined(__HAIKU__)
BitmapSubDirFull.Append(BitmapDirName);
BitmapSubDirFull.Append(wxT("/"));
- BitmapSubDirFull.Append(BitmapSubDirFull);
+ BitmapSubDirFull.Append(BitmapSubDir);
#endif
std::cout << BitmapHeaderFilename.c_str() << std::endl;
+#if defined(__WIN32__)
+
finalhppfile.open(BitmapHeaderFilename.wc_str(), ios::out | ios::trunc);
+
+#else
+
+ finalhppfile.open(BitmapHeaderFilename.c_str(), ios::out | ios::trunc);
+
+#endif
+
finalhppfile << "#include <iostream>" << endl << endl;
finalhppfile << "#ifndef BITMAPS_H" << endl;
finalhppfile << "#define BITMAPS_H" << endl << endl;
-
+
for (int bi = 0; bi < dirlist.GetCount(); bi++)
{
- wxString BitmapSubDirName = wxString::FromUTF8(dirlist[bi]);
+ wxString BitmapSubDirName = dirlist[bi];
wxString BitmapFilename;
wxDir BitmapSubDir(BitmapSubDirName);