Index: /Vago/trunk/Vago/converter.cpp
===================================================================
--- /Vago/trunk/Vago/converter.cpp	(revision 1034)
+++ /Vago/trunk/Vago/converter.cpp	(revision 1035)
@@ -37,5 +37,5 @@
 
             commandToExec=commands.mid(currentIndex,(nextIndex-currentIndex));
-            this->myProcess->start(GlobalVars::OniSplitExeName+" "+commandToExec);
+            this->myProcess->start(Util::getOniSplitExeName() +" "+commandToExec);
             this->myProcess->waitForFinished(-1);
 
Index: /Vago/trunk/Vago/main.cpp
===================================================================
--- /Vago/trunk/Vago/main.cpp	(revision 1034)
+++ /Vago/trunk/Vago/main.cpp	(revision 1035)
@@ -1,9 +1,2 @@
-//#define USING_VM_TABLET_WARNING_FIX // Comment this line if not using a mac vm
-
-#ifdef USING_VM_TABLET_WARNING_FIX
-#include <qapplication.h>
-void myMessageOutput(QtMsgType type, const QMessageLogContext &, const QString & str);
-#endif
-
 #include <QtWidgets/QApplication>
 #include "mainwindow.h"
@@ -11,8 +4,4 @@
 int main(int argc, char *argv[])
 {
-
-#ifdef USING_VM_TABLET_WARNING_FIX
-    qInstallMessageHandler(myMessageOutput);
-#endif
 
     QApplication a(argc, argv);
@@ -24,26 +13,2 @@
 }
 
-#ifdef USING_VM_TABLET_WARNING_FIX
-void myMessageOutput(QtMsgType type, const QMessageLogContext &, const QString & str)
-{
-
-    const char * msg = str.toStdString().c_str();
-
-    switch (type) {
-    case QtWarningMsg:
-        if(QString(msg)=="QNSView handleTabletEvent: This tablet device is unknown (received no proximity event for it). Discarding event."){ // ignore this message
-            return;
-        }
-        else{
-            fprintf(stderr, "%s\n", msg);
-            break;
-        }
-    case QtFatalMsg:
-        fprintf(stderr, "%s\n", msg);
-        abort();
-    default:
-        fprintf(stderr, "%s\n", msg);
-        break;
-    }
-}
-#endif
Index: /Vago/trunk/Vago/mainwindow.cpp
===================================================================
--- /Vago/trunk/Vago/mainwindow.cpp	(revision 1034)
+++ /Vago/trunk/Vago/mainwindow.cpp	(revision 1035)
@@ -10,24 +10,22 @@
     ui->setupUi(this);
 
-    this->AppDir=getOSIndependentAppPath();
-
-    this->myLogger = new Logger(this->AppDir); //start logger
-
-    this->myLogger->writeString("Detected AppDir: "+this->AppDir);
+    this->myLogger = new Logger(Util::getAppPath()); //start logger
+
+    this->myLogger->writeString("Detected AppDir: "+Util::getAppPath());
     this->myLogger->writeString("True app dir: "+QDir::currentPath());
 
     this->setWindowTitle("Vago v"+GlobalVars::AppVersion);
 
-    if(!QFile::exists(this->AppDir+"/"+GlobalVars::OniSplitString)){
+    if(!QFile::exists(Util::getAppPath()+"/"+GlobalVars::OniSplitString)){
         Util::showErrorPopUp("OniSplit not found. Please download it at "+GlobalVars::ModsDomain+" and put it in the same folder of Vago. \n\nProgram will now exit.");
         exit(1);
     }
 
-    if(!QFile::exists(this->AppDir+"/"+GlobalVars::XmlToolsString)){
+    if(!QFile::exists(Util::getAppPath()+"/"+GlobalVars::XmlToolsString)){
         Util::showErrorPopUp("xmlTools not found. Please download it at "+GlobalVars::ModsDomain+" and put it in the same folder of Vago. \n\nProgram will now exit.");
         exit(1);
     }
 
-    this->vagoSettings = new QSettings(this->AppDir + "/" + this->VagoSettingsName, QSettings::IniFormat);
+    this->vagoSettings = new QSettings(Util::getAppPath() + "/" + this->VagoSettingsName, QSettings::IniFormat);
 
     //First Execution? Old configuration? Settings missed?
@@ -38,5 +36,5 @@
     }
     if(!this->vagoSettings->contains("Workspace")){
-        this->vagoSettings->setValue("Workspace", this->AppDir+"/VagoWorkspace");
+        this->vagoSettings->setValue("Workspace", Util::getAppPath()+"/VagoWorkspace");
         iniChanged=true;
     }
@@ -121,5 +119,5 @@
 
     //Create a thread for do the conversion in background
-    this->myConverter = new Converter(this->AppDir,this->myLogger,this->listToProccess);
+    this->myConverter = new Converter(Util::getAppPath(),this->myLogger,this->listToProccess);
 
     // User interface
@@ -189,5 +187,5 @@
 void MainWindow::on_actionSound_Wizard_triggered()
 {
-    SoundWizard myWizard (this->AppDir, this->workspaceWizardsLocation, this->myLogger, &this->commandMap);
+    SoundWizard myWizard (Util::getAppPath(), this->workspaceWizardsLocation, this->myLogger, &this->commandMap);
     myWizard.exec();
 }
@@ -1189,6 +1187,6 @@
 {
     QProcess *myProcess = new QProcess();
-    myProcess->setWorkingDirectory(this->AppDir);
-    myProcess->start(GlobalVars::OniSplitExeName+" -version");
+    myProcess->setWorkingDirectory(Util::getAppPath());
+    myProcess->start(Util::getOniSplitExeName()+" -version");
     myProcess->waitForFinished(-1);
     QString result=myProcess->readAllStandardOutput();
@@ -1200,6 +1198,6 @@
 {
     QProcess *myProcess = new QProcess();
-    myProcess->setWorkingDirectory(this->AppDir);
-    myProcess->start(GlobalVars::XmlToolsExeName+" version");
+    myProcess->setWorkingDirectory(Util::getAppPath());
+    myProcess->start(Util::getXmlToolsExeName()+" version");
     myProcess->waitForFinished(-1);
     QString result=myProcess->readLine();
@@ -1573,21 +1571,4 @@
 }
 
-/**
-  Gets application directory. In mac os gets the .app directory
-  **/
-QString MainWindow::getOSIndependentAppPath(){
-#ifdef Q_OS_MAC
-    QDir dir = QDir(QCoreApplication::applicationDirPath());
-    if(dir.absolutePath().contains(".app")){ // include bundle, but we don't want it
-        dir.cdUp();
-        dir.cdUp();
-        dir.cdUp();
-    }
-    return dir.absolutePath();
-#else
-    return  QDir::currentPath();
-#endif
-}
-
 void MainWindow::connectSlots(){
 
Index: /Vago/trunk/Vago/mainwindow.h
===================================================================
--- /Vago/trunk/Vago/mainwindow.h	(revision 1034)
+++ /Vago/trunk/Vago/mainwindow.h	(revision 1035)
@@ -184,5 +184,4 @@
     Ui::MainWindow *ui;
     Logger *myLogger;
-    QString AppDir;
     QString workspaceLocation; //Workspace location
     QString workspaceWizardsLocation; //Workspace wizard location
Index: /Vago/trunk/Vago/manualcommands.cpp
===================================================================
--- /Vago/trunk/Vago/manualcommands.cpp	(revision 1034)
+++ /Vago/trunk/Vago/manualcommands.cpp	(revision 1035)
@@ -1,4 +1,5 @@
 #include "manualcommands.h"
 #include "ui_manualcommands.h"
+#include <QDebug>
 
 ManualCommands::ManualCommands(QWidget *parent) :
@@ -10,4 +11,5 @@
     this->myProcess = new QProcess();
     this->myProcess->setProcessChannelMode(QProcess::MergedChannels);
+    this->myProcess->setWorkingDirectory(Util::getAppPath());
     ui->leManualCommand->installEventFilter(this);
 
@@ -60,5 +62,7 @@
     }
 
-    this->myProcess->start(GlobalVars::OniSplitExeName+" "+ui->leManualCommand->text());
+    QString var = Util::getOniSplitExeName() +" "+ui->leManualCommand->text();
+
+    this->myProcess->start(Util::getOniSplitExeName()+" "+ui->leManualCommand->text());
     this->myProcess->waitForFinished(120000); //wait 2 minutes at maximum
     ui->ptOutput->appendPlainText("> "+command);
@@ -135,5 +139,5 @@
                         !(this->nextInsertHistoryIdx==0 && this->searchHistoryIdx==this->limHistory-1)){ //for when it did the round
                     this->searchHistoryIdx++;
-                 }
+                }
 
                 //rotate
Index: /Vago/trunk/Vago/packageWizard/packagewizard.cpp
===================================================================
--- /Vago/trunk/Vago/packageWizard/packagewizard.cpp	(revision 1034)
+++ /Vago/trunk/Vago/packageWizard/packagewizard.cpp	(revision 1035)
@@ -205,6 +205,6 @@
         }
         QDir().mkpath(path); //create path if doesn't exist
-        if(!Util::cpDir(sourceFolder,path+Util::cutName(sourceFolder))){//copy contents (creates dest destination automatically if not exists yet)
-            QString errorString="An error occurred while copping the folder/files to the package folder: \n"
+        if(!Util::copyDir(sourceFolder,path+Util::cutName(sourceFolder),false)){//copy contents (creates dest destination automatically if not exists yet)
+            QString errorString="An error occurred while copying the folder/files to the package folder: \n"
                     "Copying from "+sourceFolder+"\n to "+path+Util::cutName(sourceFolder);
             Util::showErrorLogPopUp(errorString);
Index: /Vago/trunk/Vago/readme.txt
===================================================================
--- /Vago/trunk/Vago/readme.txt	(revision 1034)
+++ /Vago/trunk/Vago/readme.txt	(revision 1035)
@@ -1,5 +1,5 @@
 Readme.txt
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Vago GUI v0.9a
+Vago GUI v0.9b
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -26,5 +26,5 @@
 ----------------------------------
 
-Script10k, "faob2@hotmail.com"
+s10k, "faob2@hotmail.com"
 
 Oni Central Forum:
@@ -37,4 +37,9 @@
 ----------------------------------
 Change Log:
+----------------------------------
+0.9b, 25-03-2016
+- Fixes for Mac OS X 10.11: fixed OniSplit integration, fixed startup bug (Iritsen's fix), 
+fixed bug when copying and creating AEI packages
+- Fixed OniSplit command in Sound Package Wizard
 ----------------------------------
 0.9a, 25-04-2014
Index: /Vago/trunk/Vago/soundWizard/soundpagefinal.cpp
===================================================================
--- /Vago/trunk/Vago/soundWizard/soundpagefinal.cpp	(revision 1034)
+++ /Vago/trunk/Vago/soundWizard/soundpagefinal.cpp	(revision 1035)
@@ -197,5 +197,5 @@
     for(int i=0; i<this->page2Table->rowCount(); i++){
 
-        (*this->oniSplitCommands) << this->commandMap->value("general->XML->ONI")+" "+outputFolder+" "+Util::insertQuotes(this->page2Table->item(i,1)->text()); // add location of sound file to convert
+        (*this->oniSplitCommands) << this->commandMap->value("xml->XML->ONI")+" "+outputFolder+" "+Util::insertQuotes(this->page2Table->item(i,1)->text()); // add location of sound file to convert
 
         currFileName=this->page2Table->item(i,0)->text(); // get current file name
@@ -213,5 +213,5 @@
     }
 
-    (*this->oniSplitCommands) << this->commandMap->value("general->XML->ONI")+" "+outputFolder+" "+Util::insertQuotes(GlobalVars::VagoTemporaryDir+"/*.xml");
+    (*this->oniSplitCommands) << this->commandMap->value("xml->XML->ONI")+" "+outputFolder+" "+Util::insertQuotes(GlobalVars::VagoTemporaryDir+"/*.xml");
 
     this->myConverter->start(); // finally process the onisplit commands
Index: /Vago/trunk/Vago/util.cpp
===================================================================
--- /Vago/trunk/Vago/util.cpp	(revision 1034)
+++ /Vago/trunk/Vago/util.cpp	(revision 1035)
@@ -140,29 +140,55 @@
 }
 
-//Copied from here: http://stackoverflow.com/questions/2536524/copy-directory-using-qt (ty roop)
-bool cpDir(const QString &srcPath, const QString &dstPath)
+// from here: https://gzeki.com/blog/view/Recursive_copy_files_from_one_directory_to_another_in_C++_(Qt_5)
+bool copyDir(QString from_dir, QString to_dir, bool replace_on_conflit)
 {
-    rmDir(dstPath);
-
-    QDir parentDstDir(QFileInfo(dstPath).path());
-    if (!parentDstDir.mkdir(QFileInfo(dstPath).fileName()))
-        return false;
-
-    QDir srcDir(srcPath);
-    foreach(const QFileInfo &info, srcDir.entryInfoList(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot)) {
-        QString srcItemPath = srcPath + "/" + info.fileName();
-        QString dstItemPath = dstPath + "/" + info.fileName();
-        if (info.isDir()) {
-            if (!cpDir(srcItemPath, dstItemPath)) {
-                return false;
+    QDir dir;
+    dir.setPath(from_dir);
+
+    from_dir += QDir::separator();
+    to_dir += QDir::separator();
+
+    foreach (QString copy_file, dir.entryList(QDir::Files))
+    {
+        QString from = from_dir + copy_file;
+        QString to = to_dir + copy_file;
+
+        if (QFile::exists(to))
+        {
+            if (replace_on_conflit)
+            {
+                if (QFile::remove(to) == false)
+                {
+                    return false;
+                }
             }
-        } else if (info.isFile()) {
-            if (!QFile::copy(srcItemPath, dstItemPath)) {
-                return false;
+            else
+            {
+                continue;
             }
-        } else {
-            qDebug("Unhandled item" + info.filePath().toUtf8() + "in cpDir");
-        }
-    }
+        }
+
+        if (QFile::copy(from, to) == false)
+        {
+            return false;
+        }
+    }
+
+    foreach (QString copy_dir, dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot))
+    {
+        QString from = from_dir + copy_dir;
+        QString to = to_dir + copy_dir;
+
+        if (dir.mkpath(to) == false)
+        {
+            return false;
+        }
+
+        if (copyDir(from, to, replace_on_conflit) == false)
+        {
+            return false;
+        }
+    }
+
     return true;
 }
@@ -187,4 +213,5 @@
 }
 
+
 QString fullTrim(QString str) {
 
@@ -196,5 +223,5 @@
 
 void openLogFile(){
-    QDesktopServices::openUrl(QUrl("file:///"+QDir::currentPath()+"/"+GlobalVars::AppLogName));
+    QDesktopServices::openUrl(QUrl("file:///"+Util::getAppPath()+"/"+GlobalVars::AppLogName));
 }
 
@@ -250,3 +277,58 @@
 }
 
-}
+/**
+  Gets application directory. In mac os gets the .app directory
+  **/
+QString getOSIndependentAppPath(){
+#ifdef Q_OS_MAC
+    QDir dir = QDir(QCoreApplication::applicationDirPath());
+    if(dir.absolutePath().contains(".app")){ // include bundle, but we don't want it
+        dir.cdUp();
+        dir.cdUp();
+        dir.cdUp();
+    }
+    return dir.absolutePath();
+#else
+    return  QDir::currentPath();
+#endif
+}
+
+QString getAppPath(){
+    return getOSIndependentAppPath();
+}
+
+QString getOniSplitExeName(){
+
+#ifdef Q_OS_MAC
+    return getMonoExecutablePath() + " " + GlobalVars::OniSplitString;
+#elif
+    return GlobalVars::OniSplitString;
+#endif
+}
+
+QString getXmlToolsExeName(){
+
+#ifdef Q_OS_MAC
+    return getMonoExecutablePath() + " " + GlobalVars::XmlToolsString;
+#elif
+    return GlobalVars::XmlToolsString;
+#endif
+}
+
+#ifdef Q_OS_MAC
+QString getMonoExecutablePath(){
+
+    // Only way that I found to get mono working in 10.11
+    QString possibleMonoDir = "/usr/local/bin/mono";
+    QFileInfo checkFile(possibleMonoDir);
+
+    if (checkFile.exists() && checkFile.isFile()) {
+        return possibleMonoDir;
+    } else {
+        return "mono";
+    }
+
+}
+#endif
+
+}
Index: /Vago/trunk/Vago/util.h
===================================================================
--- /Vago/trunk/Vago/util.h	(revision 1034)
+++ /Vago/trunk/Vago/util.h	(revision 1035)
@@ -13,5 +13,6 @@
 
 namespace GlobalVars{
-const QString AppVersion="0.9a";
+
+const QString AppVersion="0.9b";
 const QString OniSplitString="OniSplit.exe";
 const QString XmlToolsString="xmlTools.exe";
@@ -19,10 +20,6 @@
 #ifdef Q_OS_WIN
 const QString OniExe="Oni.exe";
-const QString OniSplitExeName=OniSplitString;
-const QString XmlToolsExeName=XmlToolsString;
 #else
 const QString OniExe="Oni.app/Contents/MacOS/Oni";
-const QString OniSplitExeName="mono "+OniSplitString; // Mac uses mono to run .net applications
-const QString XmlToolsExeName="mono "+XmlToolsString;
 #endif
 
@@ -55,4 +52,11 @@
 QString fullTrim(QString str);
 QString normalizeDecimalSeparator(QString value);
+QString getOSIndependentAppPath();
+QString getAppPath();
+QString getOniSplitExeName();
+QString getXmlToolsExeName();
+#ifdef Q_OS_MAC
+QString getMonoExecutablePath();
+#endif
 
 QStringList multipleDirDialog(QString title);
@@ -65,7 +69,6 @@
 bool isStringInteger(QString myString);
 bool isStringDouble(QString myString);
-bool cpDir(const QString &srcPath, const QString &dstPath);
+bool copyDir(QString from_dir, QString to_dir, bool replace_on_conflit);
 bool rmDir(const QString &dirPath);
-bool removeDir(const QString &dirName);
 QRect getScreenResolution();
 void showPopUp(QString message);
@@ -77,4 +80,3 @@
 void openLogFile();
 }
-
 #endif // UTIL_H
Index: /Vago/trunk/Vago/xmlprocessor.cpp
===================================================================
--- /Vago/trunk/Vago/xmlprocessor.cpp	(revision 1034)
+++ /Vago/trunk/Vago/xmlprocessor.cpp	(revision 1035)
@@ -19,5 +19,5 @@
     for(int i=0; i<this->commands->size(); i++){
 
-        myProcess->start(GlobalVars::XmlToolsExeName+" "+this->commands->at(i));
+        myProcess->start(Util::getXmlToolsExeName() +" "+this->commands->at(i));
         myProcess->waitForFinished(-1);
         result=myProcess->readAllStandardError();
