+ exit_code = exitCode;
+ eApp->quit(0);
+}
+
+static void sigterm_handler(int num)
+{
+ quitMainloop(128 + num);
+}
+
+void setSigTermHandler()
+{
+ struct sigaction act;
+
+ act.sa_handler = sigterm_handler;
+ act.sa_flags = SA_RESTART;
+
+ if (sigemptyset(&act.sa_mask) == -1)
+ perror("sigemptyset");
+ if (sigaction(SIGTERM, &act, 0) == -1)
+ perror("SIGTERM");
+}
+
+int main(int argc, char **argv)
+{
+#ifdef MEMLEAK_CHECK
+ atexit(DumpUnfreed);
+#endif
+
+#ifdef OBJECT_DEBUG
+ atexit(object_dump);
+#endif
+
+ gst_init(&argc, &argv);
+
+ // set pythonpath if unset
+ setenv("PYTHONPATH", eEnv::resolve("${libdir}/enigma2/python").c_str(), 0);
+ printf("PYTHONPATH: %s\n", getenv("PYTHONPATH"));
+
+ bsodLogInit();
+
+ ePython python;
+ eMain main;
+
+#if 1
+ ePtr<gMainDC> my_dc;
+ gMainDC::getInstance(my_dc);
+
+ //int double_buffer = my_dc->haveDoubleBuffering();
+
+ ePtr<gLCDDC> my_lcd_dc;
+ gLCDDC::getInstance(my_lcd_dc);
+
+
+ /* ok, this is currently hardcoded for arabic. */
+ /* some characters are wrong in the regular font, force them to use the replacement font */
+ for (int i = 0x60c; i <= 0x66d; ++i)
+ eTextPara::forceReplacementGlyph(i);
+ eTextPara::forceReplacementGlyph(0xfdf2);
+ for (int i = 0xfe80; i < 0xff00; ++i)
+ eTextPara::forceReplacementGlyph(i);
+
+ eWidgetDesktop dsk(eSize(720, 576));
+ eWidgetDesktop dsk_lcd(my_lcd_dc->size());
+
+ dsk.setStyleID(0);
+ dsk_lcd.setStyleID(my_lcd_dc->size().width() == 96 ? 2 : 1);
+
+/* if (double_buffer)
+ {
+ eDebug(" - double buffering found, enable buffered graphics mode.");
+ dsk.setCompositionMode(eWidgetDesktop::cmBuffered);
+ } */