diff --git a/scripts/installer_linux/make_rpm.sh b/scripts/installer_linux/make_rpm.sh index 7dbd7f54ec4..5dd48748fac 100755 --- a/scripts/installer_linux/make_rpm.sh +++ b/scripts/installer_linux/make_rpm.sh @@ -127,10 +127,13 @@ find %{buildroot}%{_libdir}/vst3/ -type f -iname "*.so" -exec chmod 0644 {} + %files -%{_bindir} -%{_libdir}/vst3/ -%{_libdir}/lv2/ -%{_datarootdir}/surge-xt/ +"%{_bindir}/Surge XT" +"%{_bindir}/Surge XT Effects" +"%{_libdir}/vst3/Surge XT.vst3/*" +"%{_libdir}/lv2/Surge XT.lv2/*" +"%{_libdir}/vst3/Surge XT Effects.vst3/*" +"%{_libdir}/lv2/Surge XT Effects.lv2/*" +"%{_datarootdir}/surge-xt/*" %changelog diff --git a/src/common/SurgeStorage.cpp b/src/common/SurgeStorage.cpp index 21e5c6c72e7..eec5188f6c4 100644 --- a/src/common/SurgeStorage.cpp +++ b/src/common/SurgeStorage.cpp @@ -309,8 +309,13 @@ SurgeStorage::SurgeStorage(std::string suppliedDataPath) : otherscene_clients(0) ** Compensating for whether your distro makes you a ~/Documents or not */ - // FIXME: This "if" chain makes no sense. It's only here as a 1:1 mapping from the old code. - if (auto documentsSurge = homePath / "Documents/Surge XT"; fs::is_directory(documentsSurge)) + if (auto xdgdd = getenv("XDG_DOCUMENTS_DIR")) + { + auto xdgpath = fs::path{xdgdd} / "Surge XT"; + userDataPath = std::move(xdgpath); + } + else if (auto documentsSurge = homePath / "Documents/Surge XT"; + fs::is_directory(documentsSurge)) { userDataPath = std::move(documentsSurge); }