Not Logged In
|
Login
|
Register
Home
|
News
|
Projects
|
Releases
Bugs
|
RFE
|
Repositories
|
Help
projects
/
xestiaab
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove backup and old files which shouldn't be in the source tree.
[xestiaab/.git]
/
source
/
tools
/
bitmapcode.cpp
diff --git
a/source/tools/bitmapcode.cpp
b/source/tools/bitmapcode.cpp
index
f7eecc1
..
b5e6cf8
100644
(file)
--- a/
source/tools/bitmapcode.cpp
+++ b/
source/tools/bitmapcode.cpp
@@
-80,8
+80,18
@@
void CreateCPPFile(wxString dirfilename, wxString PNGFilename, int* counter)
// Setup the PNG file reading and cpp file.
fstream cppfile, pngfile;
// Setup the PNG file reading and cpp file.
fstream cppfile, pngfile;
+
+#if defined(__WIN32__)
+
pngfile.open(PNGFilename.wc_str(), ios::in | ios::binary );
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("_"));
outname.Append(wxString::FromUTF8(DirFilenameOnly.c_str()));
outname.Append(wxT("_"));
@@
-174,9
+184,7
@@
void CreateHPPFileDir(wxString dirfilename, wxArrayString filelist,
wxString HPPFilenameOnly;
wxString CPPFilename;
wxString HPPFilenameOnly;
wxString CPPFilename;
-#if defined(__HAIKU__)
-
-#elif defined(__WIN32__)
+#if defined(__WIN32__)
wxStringTokenizer HPPFilenameTokens(HPPFilename, wxT("\\"));
wxStringTokenizer DirFilenameTokens(dirfilename, wxT("\\"));
wxStringTokenizer HPPFilenameTokens(HPPFilename, wxT("\\"));
wxStringTokenizer DirFilenameTokens(dirfilename, wxT("\\"));
@@
-212,8
+220,16
@@
void CreateHPPFileDir(wxString dirfilename, wxArrayString filelist,
HPPFilename.Append(wxT(".h"));
HPPFilename.Append(wxT(".h"));
+#if defined(__WIN32__)
+
hppfile.open(HPPFilename.wc_str(), ios::out | ios::trunc );
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;
hppfile << "#include <iostream>" << endl << endl;
hppfile << "#ifndef " << finaldirname.c_str() << "_H" << endl;
hppfile << "#define " << finaldirname.c_str() << "_H" << endl << endl;
@@
-333,8
+349,8
@@
int main(int argc, char *argv[])
#else
#else
- BitmapFilename.Append(BitmapDirName);
- BitmapFilename.Append(wxT("/../bitmaps.h"));
+ Bitmap
Header
Filename.Append(BitmapDirName);
+ Bitmap
Header
Filename.Append(wxT("/../bitmaps.h"));
#endif
#endif
@@
-351,7
+367,7
@@
int main(int argc, char *argv[])
wxString BitmapSubDirFull;
bool ContinueProcess = BitmapDir.GetFirst(&BitmapSubDir, wxEmptyString, wxDIR_DEFAULT);
wxString BitmapSubDirFull;
bool ContinueProcess = BitmapDir.GetFirst(&BitmapSubDir, wxEmptyString, wxDIR_DEFAULT);
-
+
while (ContinueProcess){
#if defined(__HAIKU__)
while (ContinueProcess){
#if defined(__HAIKU__)
@@
-369,7
+385,7
@@
int main(int argc, char *argv[])
BitmapSubDirFull.Append(BitmapDirName);
BitmapSubDirFull.Append(wxT("/"));
BitmapSubDirFull.Append(BitmapDirName);
BitmapSubDirFull.Append(wxT("/"));
- BitmapSubDirFull.Append(BitmapSubDir
Full
);
+ BitmapSubDirFull.Append(BitmapSubDir);
#endif
#endif
@@
-418,15
+434,24
@@
int main(int argc, char *argv[])
std::cout << BitmapHeaderFilename.c_str() << std::endl;
std::cout << BitmapHeaderFilename.c_str() << std::endl;
+#if defined(__WIN32__)
+
finalhppfile.open(BitmapHeaderFilename.wc_str(), ios::out | ios::trunc);
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;
finalhppfile << "#include <iostream>" << endl << endl;
finalhppfile << "#ifndef BITMAPS_H" << endl;
finalhppfile << "#define BITMAPS_H" << endl << endl;
-
+
for (int bi = 0; bi < dirlist.GetCount(); bi++)
{
for (int bi = 0; bi < dirlist.GetCount(); bi++)
{
- wxString BitmapSubDirName =
wxString::FromUTF8(dirlist[bi])
;
+ wxString BitmapSubDirName =
dirlist[bi]
;
wxString BitmapFilename;
wxDir BitmapSubDir(BitmapSubDirName);
wxString BitmapFilename;
wxDir BitmapSubDir(BitmapSubDirName);
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software
Xestia Address Book
Xestia Calendar
Development
Xestia Gelforn
Everything else
About
News
Privacy Policy