Skip to content

Commit

Permalink
Add test for the SDL library on startup on Linux.
Browse files Browse the repository at this point in the history
  • Loading branch information
ddennedy committed Jan 24, 2015
1 parent 4a70c8d commit 65a60b2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,22 @@ MainWindow::MainWindow()
, m_exitCode(EXIT_SUCCESS)
{
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
QLibrary libJack("jack");
QLibrary libJack("libjack.so.0");
if (!libJack.load()) {
QMessageBox::critical(this, qApp->applicationName(),
tr("Error: This program requires the JACK 1 library.\n\nPlease install it using your package manager. It may be named libjack0, jack-audio-connection-kit, jack, or similar."));
::exit(EXIT_FAILURE);
} else {
libJack.unload();
}
QLibrary libSDL("libSDL-1.2.so.0");
if (!libSDL.load()) {
QMessageBox::critical(this, qApp->applicationName(),
tr("Error: This program requires the SDL 1.2 library.\n\nPlease install it using your package manager. It may be named libsdl1.2debian, SDL, or similar."));
::exit(EXIT_FAILURE);
} else {
libSDL.unload();
}
#endif

qDebug() << "begin";
Expand Down

0 comments on commit 65a60b2

Please sign in to comment.