- libvlc_exception_t ex, dummy;
- libvlc_exception_init (&ex);
- libvlc_exception_init (&dummy);
+ argv[argc++] = "--no-ignore-config";
+#ifdef TOP_BUILDDIR
+ argv[argc++] = FromLocale ("--plugin-path="TOP_BUILDDIR"/modules");
+#endif
+#ifdef TOP_SRCDIR
+ argv[argc++] = FromLocale ("--data-path="TOP_SRCDIR"/share");
+#endif
+
+ int i = 1;
+#ifdef __APPLE__
+ /* When VLC.app is run by double clicking in Mac OS X, the 2nd arg
+ * is the PSN - process serial number (a unique PID-ish thingie)
+ * still ok for real Darwin & when run from command line
+ * for example -psn_0_9306113 */
+ if(i_argc >= 2 && !strncmp( ppsz_argv[1] , "-psn" , 4 ))
+ i = 2;
+#endif
+ for (; i < i_argc; i++)
+ if ((argv[argc++] = FromLocale (ppsz_argv[i])) == NULL)
+ return 1; // BOOM!
+ argv[argc] = NULL;