diff -ruN a/app/server/ruby/core.rb b/app/server/ruby/core.rb --- a/app/server/ruby/core.rb 2021-02-01 12:10:30.000000000 +0100 +++ b/app/server/ruby/core.rb 2021-09-20 02:02:48.452962508 +0200 @@ -139,7 +139,7 @@ # define this helper first so we can set the constants below def self.wav_from_buffer_file(filename) ::WaveFile::Reader.new( - File.expand_path("../../../../etc/buffers/#{filename}", __FILE__), + File.expand_path("/usr/share/sonic-pi/buffers/#{filename}", __FILE__), ::WaveFile::Format.new(:mono, :float, 44100) ).read(441000).samples.freeze end diff -ruN a/app/server/ruby/lib/sonicpi/util.rb b/app/server/ruby/lib/sonicpi/util.rb --- a/app/server/ruby/lib/sonicpi/util.rb 2021-02-01 12:10:30.000000000 +0100 +++ b/app/server/ruby/lib/sonicpi/util.rb 2021-09-20 01:53:31.524788455 +0200 @@ -329,11 +329,11 @@ end def root_path - File.absolute_path("#{File.dirname(__FILE__)}/../../../../../") + File.absolute_path("/usr/share/sonic-pi") end def etc_path - File.absolute_path("#{root_path}/etc") + File.absolute_path("#{root_path}") end def snippets_path @@ -341,7 +341,7 @@ end def doc_path - File.absolute_path("#{etc_path}/doc") + File.absolute_path("/usr/share/doc/sonic-pi") end def cheatsheets_path @@ -353,7 +353,7 @@ end def tmp_path - File.absolute_path("#{root_path}/tmp") + File.absolute_path("/tmp") end def synthdef_path @@ -369,19 +369,20 @@ end def app_path - File.absolute_path("#{root_path}/app") + File.absolute_path("/usr/lib/sonic-pi") end def html_public_path - File.absolute_path("#{app_path}/gui/html/public") + File.absolute_path("#{doc_path}/gui/html/public") end + # this path is only relevant during build time def qt_gui_path File.absolute_path("#{app_path}/gui/qt") end def examples_path - File.absolute_path("#{etc_path}/examples") + File.absolute_path("#{doc_path}/examples") end def server_path @@ -397,7 +398,7 @@ end def server_bin_path - File.absolute_path("#{server_path}/ruby/bin") + File.absolute_path("#{server_path}/bin") end def native_path @@ -414,7 +415,7 @@ end def sox_path - File.join(native_path, "sox", __exe_fix("sox")) + File.absolute_path("/usr/bin/sox") end def scsynth_log_path @@ -450,7 +451,7 @@ end def erlang_server_path - File.join(server_path, "erlang", "sonic_pi_server", "ebin") + File.absolute_path("/usr/lib/sonic-pi") end def user_audio_settings_path diff -ruN a/app/server/ruby/util.rb b/app/server/ruby/util.rb --- a/app/server/ruby/util.rb 2021-02-01 12:10:30.000000000 +0100 +++ b/app/server/ruby/util.rb 2021-09-20 01:53:31.524788455 +0200 @@ -12,15 +12,15 @@ #++ def sp_sonic_pi_path() - File.absolute_path("#{File.dirname(__FILE__)}/../../") + File.absolute_path("#{File.dirname(__FILE__)}/..") end def sp_scripts_path() - File.absolute_path("#{sp_sonic_pi_path}/app/scripts") + File.absolute_path("#{sp_sonic_pi_path}/scripts") end def sp_synthdefs_path() - File.absolute_path("#{sp_sonic_pi_path}/app/etc/synthdefs/compiled") + File.absolute_path("#{sp_sonic_pi_path}/synthdefs/compiled") end def spider_log(message)