diff --git a/tools/auto-tester/src/TestRunner.cpp b/tools/auto-tester/src/TestRunner.cpp index 89d9867784..2d5b013f31 100644 --- a/tools/auto-tester/src/TestRunner.cpp +++ b/tools/auto-tester/src/TestRunner.cpp @@ -176,10 +176,26 @@ void TestRunner::runInstaller() { QString installerFullPath = _workingFolder + "/" + _installerFilename; +#ifdef Q_OS_WIN QString commandLine = "\"" + QDir::toNativeSeparators(installerFullPath) + "\"" + " /S /D=" + QDir::toNativeSeparators(_installationFolder); installerWorker->setCommandLine(commandLine); +#elif defined Q_OS_MAC + QFile script; + script.setFileName(_workingFolder + "/install_app.sh"); + if (!script.open(QIODevice::Append | QIODevice::Text)) { + QMessageBox::critical(0, "Internal error: " + QString(__FILE__) + ":" + QString::number(__LINE__), + "Could not open 'install_app.sh'"); + exit(-1); + } + + script.write("#/bin/sh\n\n"); + script.write("VOLUME=`hdiutil attach \"$1\" | grep Volumes | awk '{print $3}'`"); + script.write((QString("#cp -rf \"$VOLUME/") + _installerFilename + "High Fidelity/interface.app\"").toStdString().c_str()); + + QString commandLine = "yes | ../install_app.sh HighFidelity-Beta-latest-dev.dmg"; +#endif emit startInstaller(); } @@ -614,4 +630,4 @@ int Worker::runCommand() { int result = system(_commandLine.toStdString().c_str()); emit commandComplete(); return result; -} \ No newline at end of file +}