aboutsummaryrefslogtreecommitdiff
path: root/devtools/create_project/create_project.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/create_project/create_project.cpp')
-rw-r--r--devtools/create_project/create_project.cpp35
1 files changed, 23 insertions, 12 deletions
diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index a48d4df786..17b3d29d0b 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// HACK to allow building with the SDL backend on MinGW
@@ -245,6 +242,9 @@ int main(int argc, char *argv[]) {
} else if (!std::strcmp(argv[i], "--build-events")) {
setup.runBuildEvents = true;
+ } else if (!std::strcmp(argv[i], "--installer")) {
+ setup.runBuildEvents = true;
+ setup.createInstaller = true;
} else {
std::cerr << "ERROR: Unknown parameter \"" << argv[i] << "\"\n";
return -1;
@@ -516,6 +516,8 @@ void displayHelp(const char *exe) {
" The default is \"9\", thus \"Visual Studio 2008\"\n"
" --build-events Run custom build events as part of the build\n"
" (default: false)\n"
+ " --installer Create NSIS installer after the build (implies --build-events)\n"
+ " (default: false)\n"
"\n"
"Engines settings:\n"
" --list-engines list all available engines and their default state\n"
@@ -634,7 +636,7 @@ bool setEngineBuildState(const std::string &name, EngineDescList &engines, bool
if (engine != engines.end()) {
engine->enable = enable;
- // When we disable an einge, we also need to disable all the sub engines.
+ // When we disable an engine, we also need to disable all the sub engines.
if (!enable && !engine->subEngines.empty()) {
for (StringList::const_iterator j = engine->subEngines.begin(); j != engine->subEngines.end(); ++j) {
EngineDescList::iterator subEngine = std::find(engines.begin(), engines.end(), *j);
@@ -725,8 +727,8 @@ const Feature s_features[] = {
{ "mad", "USE_MAD", "libmad", true, "libmad (MP3) support" },
{ "vorbis", "USE_VORBIS", "libvorbisfile_static libvorbis_static libogg_static", true, "Ogg Vorbis support" },
{ "flac", "USE_FLAC", "libFLAC_static", true, "FLAC support" },
- { "png", "USE_PNG", "libpng", false, "libpng support" },
- { "theora", "USE_THEORADEC", "libtheora_static", false, "Theora decoding support" },
+ { "png", "USE_PNG", "libpng", true, "libpng support" },
+ { "theora", "USE_THEORADEC", "libtheora_static", true, "Theora decoding support" },
{ "mpeg2", "USE_MPEG2", "libmpeg2", false, "mpeg2 codec for cutscenes" },
// Feature flags
@@ -735,8 +737,7 @@ const Feature s_features[] = {
{ "16bit", "USE_RGB_COLOR", "", true, "16bit color support" },
{ "mt32emu", "USE_MT32EMU", "", true, "integrated MT-32 emulator" },
{ "nasm", "USE_NASM", "", true, "IA-32 assembly support" }, // This feature is special in the regard, that it needs additional handling.
- { "opengl", "USE_OPENGL", "opengl32", false, "OpenGL support" },
- { "indeo3", "USE_INDEO3", "", true, "Indeo3 codec support"},
+ { "opengl", "USE_OPENGL", "opengl32", true, "OpenGL support" },
{ "translation", "USE_TRANSLATION", "", true, "Translation support" },
{ "vkeybd", "ENABLE_VKEYBD", "", false, "Virtual keyboard support"},
{ "langdetect", "USE_DETECTLANG", "", true, "System language detection support" } // This feature actually depends on "translation", there
@@ -1220,10 +1221,20 @@ void ProjectProvider::createModuleList(const std::string &moduleDir, const Strin
tokens = tokenize(line);
i = tokens.begin();
} else {
- if (shouldInclude.top())
- includeList.push_back(moduleDir + "/" + unifyPath(*i));
- else
- excludeList.push_back(moduleDir + "/" + unifyPath(*i));
+ const std::string filename = moduleDir + "/" + unifyPath(*i);
+
+ if (shouldInclude.top()) {
+ // In case we should include a file, we need to make
+ // sure it is not in the exclude list already. If it
+ // is we just drop it from the exclude list.
+ excludeList.remove(filename);
+
+ includeList.push_back(filename);
+ } else if (std::find(includeList.begin(), includeList.end(), filename) == includeList.end()) {
+ // We only add the file to the exclude list in case it
+ // has not yet been added to the include list.
+ excludeList.push_back(filename);
+ }
++i;
}
}