aur/sonic-pi-4.6.0-gui_paths.patch
2025-10-16 11:41:55 +01:00

74 lines
No EOL
4.1 KiB
Diff

diff -ruN a/app/gui/model/sonicpitheme.cpp b/app/gui/model/sonicpitheme.cpp
--- a/app/gui/model/sonicpitheme.cpp 2024-01-01 00:00:00.000000000 +0000
+++ b/app/gui/model/sonicpitheme.cpp 2025-10-14 00:00:00.000000000 +0000
@@ -26,9 +26,9 @@
this->customSettingsFilename = customSettingsFilename;
this->rootPath = rootPath;
- qt_app_theme_path = QDir::toNativeSeparators(rootPath + "/app/gui/theme/app.qss");
+ qt_app_theme_path = QDir::toNativeSeparators(rootPath + "/usr/share/sonic-pi/theme/app.qss");
- qt_browser_dark_css = QDir::toNativeSeparators(rootPath + "/app/gui/theme/dark/doc-styles.css");
- qt_browser_light_css = QDir::toNativeSeparators(rootPath + "/app/gui/theme/light/doc-styles.css");
- qt_browser_hc_css = QDir::toNativeSeparators(rootPath + "/app/gui/theme/high_contrast/doc-styles.css");
+ qt_browser_dark_css = QDir::toNativeSeparators(rootPath + "/usr/share/sonic-pi/theme/dark/doc-styles.css");
+ qt_browser_light_css = QDir::toNativeSeparators(rootPath + "/usr/share/sonic-pi/theme/light/doc-styles.css");
+ qt_browser_hc_css = QDir::toNativeSeparators(rootPath + "/usr/share/sonic-pi/theme/high_contrast/doc-styles.css");
loadToolBarIcons();
diff -ruN a/app/gui/mainwindow.cpp b/app/gui/mainwindow.cpp
--- a/app/gui/mainwindow.cpp 2024-01-01 00:00:00.000000000 +0000
+++ b/app/gui/mainwindow.cpp 2025-10-14 00:00:00.000000000 +0000
@@ -298,9 +298,9 @@
QString root_path = rootPath();
- qt_app_theme_path = QDir::toNativeSeparators(root_path + "/app/gui/theme/app.qss");
- qt_browser_dark_css = QDir::toNativeSeparators(root_path + "/app/gui/theme/dark/doc-styles.css");
- qt_browser_light_css = QDir::toNativeSeparators(root_path + "/app/gui/theme/light/doc-styles.css");
- qt_browser_hc_css = QDir::toNativeSeparators(root_path + "/app/gui/theme/high_contrast/doc-styles.css");
+ qt_app_theme_path = QDir::toNativeSeparators(root_path + "/usr/share/sonic-pi/theme/app.qss");
+ qt_browser_dark_css = QDir::toNativeSeparators(root_path + "/usr/share/sonic-pi/theme/dark/doc-styles.css");
+ qt_browser_light_css = QDir::toNativeSeparators(root_path + "/usr/share/sonic-pi/theme/light/doc-styles.css");
+ qt_browser_hc_css = QDir::toNativeSeparators(root_path + "/usr/share/sonic-pi/theme/high_contrast/doc-styles.css");
}
void MainWindow::checkForStudioMode()
@@ -1331,7 +1331,7 @@
// On Mac, we have the app bundle
return QCoreApplication::applicationDirPath() + "/../../../../..";
#elif defined(Q_OS_WIN)
- // On Windows,
+ // On Windows
return QCoreApplication::applicationDirPath() + "/../../..";
#else
- // On linux, CMake builds app into the build folder
- return QCoreApplication::applicationDirPath() + "/../../../..";
+ // On Linux, installed to /usr
+ return QCoreApplication::applicationDirPath() + "/../..";
#endif
diff -ruN a/app/api/src/sonicpi_api.cpp b/app/api/src/sonicpi_api.cpp
--- a/app/api/src/sonicpi_api.cpp 2024-01-01 00:00:00.000000000 +0000
+++ b/app/api/src/sonicpi_api.cpp 2025-10-15 00:00:00.000000000 +0000
@@ -764,9 +764,9 @@
}
// Set Ruby script paths
- m_paths[SonicPiPath::BootDaemonPath] = m_paths[SonicPiPath::RootPath] / "app/server/ruby/bin/daemon.rb";
- m_paths[SonicPiPath::FetchUrlPath] = m_paths[SonicPiPath::RootPath] / "app/server/ruby/bin/fetch-url.rb";
- m_paths[SonicPiPath::ClearLogsPath] = m_paths[SonicPiPath::RootPath] / "app/server/ruby/bin/clear-logs.rb";
+ m_paths[SonicPiPath::BootDaemonPath] = "/usr/lib/sonic-pi/server/ruby/bin/daemon.rb";
+ m_paths[SonicPiPath::FetchUrlPath] = "/usr/lib/sonic-pi/server/ruby/bin/fetch-url.rb";
+ m_paths[SonicPiPath::ClearLogsPath] = "/usr/lib/sonic-pi/server/ruby/bin/clear-logs.rb";
@@ -779,7 +779,7 @@
m_paths[SonicPiPath::GUILogPath] = m_paths[SonicPiPath::LogPath] / "gui.log";
// Set built-in samples path
- m_paths[SonicPiPath::SamplePath] = m_paths[SonicPiPath::RootPath] / "etc/samples/";
+ m_paths[SonicPiPath::SamplePath] = "/usr/share/sonic-pi/samples/";
// Set Config paths
m_paths[SonicPiPath::ConfigPath] = m_paths[SonicPiPath::UserPath] / "config";