diff --git a/app/gui/qt/mainwindow.cpp b/app/gui/qt/mainwindow.cpp index 0af6cf7..97c17ad 100644 --- a/app/gui/qt/mainwindow.cpp +++ b/app/gui/qt/mainwindow.cpp @@ -677,28 +677,9 @@ void MainWindow::startServer(){ serverProcess = new QProcess(); - QString root = rootPath(); - - #if defined(Q_OS_WIN) - QString prg_path = root + "/app/server/native/windows/ruby/bin/ruby.exe"; - QString prg_arg = root + "/app/server/bin/sonic-pi-server.rb"; - sample_path = root + "/etc/samples"; - #elif defined(Q_OS_MAC) - QString prg_path = root + "/server/native/osx/ruby/bin/ruby"; - QString prg_arg = root + "/server/bin/sonic-pi-server.rb"; - sample_path = root + "/etc/samples"; - #else - //assuming Raspberry Pi - QString prg_path = root + "/app/server/native/raspberry/ruby/bin/ruby"; - QFile file(prg_path); - if(!file.exists()) { - // use system ruby if bundled ruby doesn't exist - prg_path = "/usr/bin/ruby"; - } - - QString prg_arg = root + "/app/server/bin/sonic-pi-server.rb"; - sample_path = root + "/etc/samples"; - #endif + QString prg_path = "@ruby@"; + QString prg_arg = "@out@/app/server/bin/sonic-pi-server.rb"; + sample_path = "@out@/etc/samples"; prg_path = QDir::toNativeSeparators(prg_path); prg_arg = QDir::toNativeSeparators(prg_arg);