diff --git a/.gitignore b/.gitignore index dcd8174811..87d05d2af5 100644 --- a/.gitignore +++ b/.gitignore @@ -154,3 +154,5 @@ etc/synthdefs/designs/overtone/sonic-pi/native # Visual Studio settings folder. .vs +app/.cache/clangd/index +sonic-pi.desktop diff --git a/BUILD-LINUX.md b/BUILD-LINUX.md index 89eccaa2dc..f2a5293c3e 100644 --- a/BUILD-LINUX.md +++ b/BUILD-LINUX.md @@ -47,13 +47,15 @@ and to run In order to build Sonic Pi's various components, we need to install a few dependencies: -* Build Tools (c++ compiler, cmake, git.) +* Build Tools (c++ compiler , cmake, git.) * Qt + Dev tools (5.15+) * Jack (and pulse-audio-module-jack if you are running Raspberry Pi OS) * Ruby + Dev tools (2.5+) * Elixir + Dev tools (12.0+) * SuperCollider + SC3 plugins +Note: please make sure that you have gcc12 installed. Compiling vcpkg dependencies does not work with gcc13 currently + ### 1.1 Debian The following is a rough list of Debian packages that are needed that can serve as a starting position: diff --git a/app/gui/qt/main.cpp b/app/gui/qt/main.cpp index c5bf1db726..828a605240 100644 --- a/app/gui/qt/main.cpp +++ b/app/gui/qt/main.cpp @@ -57,8 +57,6 @@ int main(int argc, char *argv[]) #if defined(Q_OS_LINUX) //linux code goes here - QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); - QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); #elif defined(Q_OS_WIN) // windows code goes here diff --git a/app/gui/qt/mainwindow.cpp b/app/gui/qt/mainwindow.cpp index c18242c50a..b02ebd2fea 100644 --- a/app/gui/qt/mainwindow.cpp +++ b/app/gui/qt/mainwindow.cpp @@ -270,7 +270,8 @@ MainWindow::MainWindow(QApplication& app, QSplashScreen* splash) toggleOSCServer(1); - app.setActiveWindow(editorTabWidget->currentWidget()); + editorTabWidget->currentWidget()->activateWindow(); + showWelcomeScreen(); diff --git a/app/gui/qt/utils/sonicpi_i18n.cpp b/app/gui/qt/utils/sonicpi_i18n.cpp index 8f10fcb321..d2f1f2337f 100644 --- a/app/gui/qt/utils/sonicpi_i18n.cpp +++ b/app/gui/qt/utils/sonicpi_i18n.cpp @@ -111,13 +111,15 @@ bool SonicPii18n::loadTranslations(QString lang) { std::cout << "[GUI] [i18n] - Loading translations for " << language.toUtf8().constData() << std::endl; i18n = translator.load("sonic-pi_" + language, ":/lang/") || language == "en_GB" || language == "en" || language == "C"; - if (!i18n) { - std::cout << "[GUI] [i18n] - Error: Failed to load language translation for " << language.toUtf8().constData() << std::endl; - language = "en_GB"; - } - app->installTranslator(&translator); + i18n = translator.load("sonic-pi_" + language, ":/lang/") || language == "en_GB" || language == "en" || language == "C"; + bool translator_succes_qt = qtTranslator.load("qt_" + language, QLibraryInfo::path(QLibraryInfo::TranslationsPath)); + if (!i18n || !translator_succes_qt) + { + std::cout << "[GUI] [i18n] - Error: Failed to load language translation for " << language.toUtf8().constData() << std::endl; + language = "en_GB"; + } + app->installTranslator(&translator); - qtTranslator.load("qt_" + language, QLibraryInfo::location(QLibraryInfo::TranslationsPath)); app->installTranslator(&qtTranslator); this->currently_loaded_language = language; diff --git a/app/linux-prebuild.sh b/app/linux-prebuild.sh index 58286b2388..8d4d4e12c0 100755 --- a/app/linux-prebuild.sh +++ b/app/linux-prebuild.sh @@ -28,6 +28,8 @@ cd "${SCRIPT_DIR}" if [ ! "$system_libs" == true ]; then "${SCRIPT_DIR}"/linux-pre-vcpkg.sh "${args[@]}" + export CC=gcc-12 CXX=g++-12 # Use gcc-12 as the default compiler, since gcc-13 fails to build vcpkg + "${SCRIPT_DIR}"/linux-pre-vcpkg.sh "${args[@]}" fi echo "Compiling native ruby extensions..."