#ifndef _PARSE_OPTIONS_H_
#define _PARSE_OPTIONS_H_
+#include <string>
+
class Mussa;
//! collect information about runtime options
//! pointer to our analysis, if its null, feel free to die
Mussa *analysis;
+ //! Location of documentation
+ std::string doc_dir;
//! should we use the gui?
bool useGUI;
//! launch as python
void MussaWindow::setupAssistant()
{
-#if 0 && defined(Q_WS_MAC)
- CFURLRef pluginRef = CFBundleCopyBundleURL(CFBundleGetMainBundle());
- CFStringRef macPath = CFURLCopyFileSystemPath(pluginRef,
- kCFURLPOSIXPathStyle);
- const char *pathPtr = CFStringGetCStringPtr(macPath,
- CFStringGetSystemEncoding());
- qDebug("Path = %s", pathPtr);
- CFRelease(pluginRef);
- CFRelease(macPath);
-#endif
-#if defined(QT_ASSISTANT_LIB)
+#if defined(QT_ASSISTANT_FOUND)
QStringList manualAssistantArgs;
manualAssistantArgs = QStringList();
manualAssistantArgs << "-profile" << "./doc/manual/mussagl_manual.adp";
#include <iostream>
#include <QApplication>
-#include "qui/MussaWindow.hpp"
-#include "alg/parse_options.hpp"
-#include "mussa_exceptions.hpp"
+#if defined(Q_WS_MAC)
+#include <CoreFoundation/CoreFoundation.h>
+#endif
+
+std::string get_doc_dir()
+{
+#if defined(Q_WS_MAC)
+ CFURLRef pluginRef = CFBundleCopyBundleURL(CFBundleGetMainBundle());
+ CFStringRef macPath = CFURLCopyFileSystemPath(pluginRef,
+ kCFURLPOSIXPathStyle);
+ const char *pathPtr = CFStringGetCStringPtr(macPath,
+ CFStringGetSystemEncoding());
+ std::string doc_dir(pathPtr);
+ qDebug("Path = %s", pathPtr);
+ CFRelease(pluginRef);
+ CFRelease(macPath);
+#else
+ return string(".");
+#endif
+}
int main(int argc, char **argv)
{
std::clog << "DISPLAY not set, running in console mode only" << std::endl;
}
#endif
+ //opts.doc_dir = get_doc_dir();
QApplication app(argc, argv, opts.useGUI);
Q_INIT_RESOURCE(icons);