Commit b41ae558 authored by bitplane's avatar bitplane

Option to compile without the different archive loaders. Added GUI editor to codeblocks workspace

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2597 dfc29bdd-3216-0410-991c-e03cc46cb475
parent c3240d15
......@@ -22,6 +22,7 @@
<Project filename="20.ManagedLights/ManagedLights.cbp" />
<Project filename="21.Quake3Explorer/Quake3Explorer.cbp" />
<Project filename="Demo/demo.cbp" />
<Project filename="../tools/GUIEditor/GUIEditor_gcc.cbp" />
<Project filename="../source/Irrlicht/Irrlicht-gcc.cbp" active="1" />
</Workspace>
</CodeBlocks_workspace_file>
......@@ -349,6 +349,15 @@ B3D, MS3D or X meshes */
//! Define _IRR_COMPILE_WITH_TGA_WRITER_ if you want to write .tga files
#define _IRR_COMPILE_WITH_TGA_WRITER_
//! Define __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_ if you want to open ZIP and GZIP archives
#define __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_
//! Define __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_ if you want to mount folders as archives
#define __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_
//! Define __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_ if you want to open ID software PAK archives
#define __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_
//! Define __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_ if you want to open TAR archives
#define __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_
//! Set FPU settings
/** Irrlicht should use approximate float and integer fpu techniques
precision will be lower but speed higher. currently X86 only
......
......@@ -55,10 +55,21 @@ CFileSystem::CFileSystem()
//! reset current working directory
getWorkingDirectory();
#ifdef __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_
ArchiveLoader.push_back(new CArchiveLoaderZIP(this));
#endif
#ifdef __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_
ArchiveLoader.push_back(new CArchiveLoaderMount(this));
#endif
#ifdef __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_
ArchiveLoader.push_back(new CArchiveLoaderPAK(this));
#endif
#ifdef __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_
ArchiveLoader.push_back(new CArchiveLoaderTAR(this));
#endif
}
......
......@@ -3,8 +3,10 @@
// For conditions of distribution and use, see copyright notice in irrlicht.h
#include "CMountPointReader.h"
#include "CReadFile.h"
#ifdef __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_
#include "CReadFile.h"
#include "os.h"
namespace irr
......@@ -171,3 +173,5 @@ IReadFile* CMountPointReader::createAndOpenFile(const core::string<c16>& filenam
} // io
} // irr
#endif // __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_
......@@ -5,6 +5,10 @@
#ifndef __C_MOUNT_READER_H_INCLUDED__
#define __C_MOUNT_READER_H_INCLUDED__
#include "IrrCompileConfig.h"
#ifdef __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_
#include "IFileSystem.h"
#include "CFileList.h"
......@@ -87,4 +91,5 @@ namespace io
} // io
} // irr
#endif
#endif // __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_
#endif // __C_MOUNT_READER_H_INCLUDED__
......@@ -3,8 +3,10 @@
// For conditions of distribution and use, see copyright notice in irrlicht.h
// Code contributed by skreamz
#include "IrrCompileConfig.h"
#include "CPakReader.h"
#ifdef __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_
#include "os.h"
#include "coreutil.h"
......@@ -187,3 +189,4 @@ IReadFile* CPakReader::createAndOpenFile(u32 index)
} // end namespace io
} // end namespace irr
#endif // __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_
......@@ -5,6 +5,10 @@
#ifndef __C_PAK_READER_H_INCLUDED__
#define __C_PAK_READER_H_INCLUDED__
#include "IrrCompileConfig.h"
#ifdef __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_
#include "IReferenceCounted.h"
#include "IReadFile.h"
#include "irrArray.h"
......@@ -112,5 +116,7 @@ namespace io
} // end namespace io
} // end namespace irr
#endif
#endif // __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_
#endif // __C_PAK_READER_H_INCLUDED__
......@@ -3,14 +3,15 @@
// For conditions of distribution and use, see copyright notice in irrlicht.h
#include "CTarReader.h"
#ifdef __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_
#include "CFileList.h"
#include "CLimitReadFile.h"
#include "os.h"
#include "coreutil.h"
#include "errno.h"
#include "IrrCompileConfig.h"
namespace irr
{
namespace io
......@@ -250,3 +251,4 @@ IReadFile* CTarReader::createAndOpenFile(u32 index)
} // end namespace io
} // end namespace irr
#endif // __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_
......@@ -5,6 +5,10 @@
#ifndef __C_TAR_READER_H_INCLUDED__
#define __C_TAR_READER_H_INCLUDED__
#include "IrrCompileConfig.h"
#ifdef __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_
#include "IReferenceCounted.h"
#include "IReadFile.h"
#include "irrArray.h"
......@@ -139,5 +143,5 @@ namespace io
} // end namespace io
} // end namespace irr
#endif
#endif // __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_
#endif // __C_TAR_READER_H_INCLUDED__
......@@ -3,6 +3,9 @@
// For conditions of distribution and use, see copyright notice in irrlicht.h
#include "CZipReader.h"
#ifdef __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_
#include "CFileList.h"
#include "CReadFile.h"
#include "os.h"
......@@ -527,42 +530,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
}
/*
//! returns fileindex
s32 CZipReader::findFile( const core::string<c16>& simpleFilename)
{
SZipFileEntry entry;
entry.simpleFileName = simpleFilename;
if (IgnoreCase)
entry.simpleFileName.make_lower();
if (IgnorePaths)
core::deletePathFromFilename(entry.simpleFileName);
s32 res = FileList.binary_search(entry);
#ifdef _DEBUG
if (res == -1)
{
for (u32 i=0; i<FileList.size(); ++i)
if (FileList[i].simpleFileName == entry.simpleFileName)
{
os::Printer::log("File in archive but not found.", entry.simpleFileName.c_str(), ELL_ERROR);
break;
}
}
#endif
return res;
}
*/
} // end namespace io
} // end namespace irr
#endif // __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_
......@@ -5,6 +5,10 @@
#ifndef __C_ZIP_READER_H_INCLUDED__
#define __C_ZIP_READER_H_INCLUDED__
#include "IrrCompileConfig.h"
#ifdef __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_
#include "IReadFile.h"
#include "irrArray.h"
#include "irrString.h"
......@@ -211,5 +215,5 @@ namespace io
} // end namespace io
} // end namespace irr
#endif
#endif // __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_
#endif // __C_ZIP_READER_H_INCLUDED__
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment