Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Setup CMake to build for macOS
[xestiaab/.git] / source / tools / bitmapcode.cpp
index b054104..4425062 100644 (file)
@@ -100,8 +100,8 @@ void CreateCPPFile(wxString dirfilename, wxString PNGFilename, int* counter)
        // Setup the inclusion guard.
     
        cppfile << "#include <iostream>" << endl << endl;    
-       cppfile << "#ifndef " << outname.c_str() << "_CPP" << endl;
-       cppfile << "#define " << outname.c_str() << "_CPP" << endl << endl;
+       cppfile << "#ifndef " << outname.ToStdString() << "_CPP" << endl;
+       cppfile << "#define " << outname.ToStdString() << "_CPP" << endl << endl;
     
        outname.Clear();
        outname.Append(wxString::FromUTF8(DirFilenameOnly.c_str()));
@@ -113,7 +113,7 @@ void CreateCPPFile(wxString dirfilename, wxString PNGFilename, int* counter)
     
        // Convert the PNG file into an unsigned char array.
     
-       cppfile << "static unsigned char " << outname.c_str() <<
+       cppfile << "static unsigned char " << outname.ToStdString() <<
                "[] = {" << endl;
     
        while (pngfile){
@@ -148,10 +148,9 @@ void CreateCPPFile(wxString dirfilename, wxString PNGFilename, int* counter)
        cppfile << "#endif" << endl << endl;
        cppfile.close();
     
-       cout << "CPP\t" << CPPFilename.c_str() << endl;    
+       cout << "CPP\t" << CPPFilename.ToStdString() << endl;
     
        ++*counter;
-    
 }
 
 void CreateHPPFileDir(wxString dirfilename, wxArrayString filelist, 
@@ -171,7 +170,7 @@ void CreateHPPFileDir(wxString dirfilename, wxArrayString filelist,
     
        bool fmatch = FALSE;
        wxString finaldirname;
-       wxString HPPFilename = dirfilename.c_str();
+       wxString HPPFilename = dirfilename.ToStdString();
 
        wxString DirFilenameOnly;
        wxString HPPFilenameOnly;
@@ -224,8 +223,8 @@ void CreateHPPFileDir(wxString dirfilename, wxArrayString filelist,
 #endif
 
        hppfile << "#include <iostream>" << endl << endl;
-       hppfile << "#ifndef " << finaldirname.c_str() << "_H" << endl;
-       hppfile << "#define " << finaldirname.c_str() << "_H" << endl << endl;
+       hppfile << "#ifndef " << finaldirname.ToStdString() << "_H" << endl;
+       hppfile << "#define " << finaldirname.ToStdString() << "_H" << endl << endl;
        hppfile << "// List all CPP files in the directory." << endl << endl;
     
        // Write each CPP file into the header file.
@@ -255,8 +254,8 @@ void CreateHPPFileDir(wxString dirfilename, wxArrayString filelist,
                CPPFileOnly.RemoveLast(4);
                CPPFileOnly.Append(wxT(".cpp"));
 
-               hppfile << "#include \"" << DirFilenameOnly.c_str() <<
-                       "/" << CPPFileOnly.c_str() << "\"" << endl;
+               hppfile << "#include \"" << DirFilenameOnly.ToStdString() <<
+                       "/" << CPPFileOnly.ToStdString() << "\"" << endl;
 
        }
     
@@ -267,7 +266,7 @@ void CreateHPPFileDir(wxString dirfilename, wxArrayString filelist,
     
        // Increment the HPP file counter.
 
-       cout << "HPPDIR\t" << HPPFilename.c_str() << endl;
+       cout << "HPPDIR\t" << HPPFilename.ToStdString() << endl;
        ++*counter;
     
 }
@@ -386,7 +385,7 @@ int main(int argc, char *argv[])
     
        DirFilenameWxS.Empty();
 
-       std::cout << BitmapHeaderFilename.c_str() << std::endl;
+       std::cout << BitmapHeaderFilename.ToStdString() << std::endl;
 
 #if defined(__WIN32__)
 
@@ -448,7 +447,7 @@ int main(int argc, char *argv[])
                for (int fi = 0; fi < filelist.GetCount(); fi++)
                {
                
-                       CreateCPPFile(dirlist[bi].wc_str(), filelist[fi].wc_str(), &cppg);
+                       CreateCPPFile(dirlist[bi].ToStdString(), filelist[fi].ToStdString(), &cppg);
                        fp++;
                        
                }
@@ -487,12 +486,12 @@ int main(int argc, char *argv[])
 
 #elif defined(__WIN32__)
 
-               finalhppfile << "#include \"bitmaps\\" << DirNameSplit.c_str() <<
+               finalhppfile << "#include \"bitmaps\\" << DirNameSplit.ToStdString() <<
                        ".h\"" << endl;
 
 #else
 
-               finalhppfile << "#include \"bitmaps/" << DirNameSplit.c_str() <<
+               finalhppfile << "#include \"bitmaps/" << DirNameSplit.ToStdString() <<
                        ".h\"" << endl;
 
 #endif
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy