]> git.lyx.org Git - lyx.git/blobdiff - src/main.C
- Link against qt-mt333.lib which is what the current qt3 cvs produces
[lyx.git] / src / main.C
index 7c10c5dde6685cb3385838e60952a7044f0b30de..10e94692314a894cb483ff0d35c14ae5e69dac20 100644 (file)
@@ -1,33 +1,49 @@
 /**
  * \file main.C
- * Copyright 2002 the LyX Team
- * Read the file COPYING
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- * \author unknown
+ * \author Lars Gullik Bjønnes
+ * \author Jean Marc Lasgouttes
+ *
+ * Full author contact details are available in file CREDITS.
  */
 
 #include <config.h>
 
+#include "debug.h"
 #include "lyx_main.h"
 #include "gettext.h"
-#include "LString.h"
-#include "support/filetools.h"
+
 #include "support/os.h"
 
+#include <boost/filesystem/path.hpp>
+
+#ifdef HAVE_IOS
+#include <ios>
+#endif
+
+
+namespace os = lyx::support::os;
+namespace fs = boost::filesystem;
+
 int main(int argc, char * argv[])
 {
-       os::init(&argc, &argv);
+#ifdef HAVE_IOS
+       std::ios_base::sync_with_stdio(false);
+#endif
+       fs::path::default_name_check(fs::no_check);
+
+       // To avoid ordering of global object problems with some
+       // stdlibs we do the initialization here, but still as
+       // early as possible.
+       lyxerr.rdbuf(std::cerr.rdbuf());
 
-       // lyx_localedir is used by gettext_init() is we have
-       //   i18n support built-in
-       string lyx_localedir = GetEnvPath("LYX_LOCALEDIR");
-       if (lyx_localedir.empty())
-               lyx_localedir = LOCALEDIR;
+       os::init(argc, argv);
 
        // initialize for internationalized version *EK*
        locale_init();
-       gettext_init(lyx_localedir);
 
-       LyX lyx(argc, argv);
+       LyX::exec(argc, argv);
        return 0;
 }