mirror of
https://github.com/mapmapteam/mapmap.git
synced 2026-06-16 12:33:19 +02:00
set env vars if needed (for OS X)
This commit is contained in:
@@ -6,10 +6,25 @@
|
||||
#include "Common.h"
|
||||
#include "MainWindow.h"
|
||||
#include "MainApplication.h"
|
||||
#include <stdlib.h>
|
||||
#include <iostream>
|
||||
|
||||
static void set_env_vars_if_needed()
|
||||
{
|
||||
#ifdef __MACOSX_CORE__
|
||||
std::cout << "OS X detected. Set environment for GStreamer-SDK support." << std::endl;
|
||||
if (0 == setenv("GST_PLUGIN_PATH", "/Library/Frameworks/GStreamer.framework/Libraries", 1))
|
||||
std::cout << " * GST_PLUGIN_PATH=Library/Frameworks/GStreamer.framework/Libraries" << std::endl;
|
||||
if (0 == setenv("GST_DEBUG", "2", 1))
|
||||
std::cout << " * GST_DEBUG=2" << std::endl;
|
||||
//setenv("LANG", "C", 1);
|
||||
#endif // __MACOSX_CORE__
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
// TODO: avoid segfaults when OSC port is busy
|
||||
set_env_vars_if_needed();
|
||||
|
||||
MainApplication app(argc, argv);
|
||||
|
||||
if (! QGLFormat::hasOpenGL())
|
||||
@@ -23,9 +38,7 @@ int main(int argc, char *argv[])
|
||||
app.installTranslator(&translator);
|
||||
|
||||
MainWindow win;
|
||||
|
||||
//win.setLocale(QLocale("fr"));
|
||||
|
||||
win.show();
|
||||
|
||||
return app.exec();
|
||||
|
||||
Reference in New Issue
Block a user