Skip to content

Commit

Permalink
Remove misleading deprecation of old support directory
Browse files Browse the repository at this point in the history
On UNIX-like systems, if SuperCollider is compiled from source into
the user's home directory via:

    cmake -DCMAKE_INSTALL_PREFIX=$HOME
    make install

then Platform.systemAppSupportDir and Platform.resourceDir will be set
to

    $HOME/share/SuperCollider

This is due to CMakeLists.txt containing the definition of SC_DATA_DIR:

    elseif(UNIX)
            add_definitions(-DSC_DATA_DIR="${CMAKE_INSTALL_PREFIX}/share/SuperCollider")
    endif()

which is then consumed by common/SC_Filesystem_unix.cpp.

Unfortunately, this resulting path is identical to the old location
for the *user* support directory, so it triggers a misleading warning.
However this deprecation was introduced by 2b77ef6 in August 2011,
so it should be safe to remove it by now.

Fixes supercollider#3367.
  • Loading branch information
aspiers committed Apr 4, 2018
1 parent 3f0d27b commit 9cf80b8
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions lang/LangSource/SC_LanguageClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
*/

#include "SC_LanguageClient.h"
#include "SC_LanguageConfig.hpp"
#include "SC_Lock.h"
#include <cstring>
#include <string>
Expand All @@ -47,16 +46,9 @@
#include "PyrSched.h"
#include "GC.h"
#include "VMGlobals.h"
#include "SC_Filesystem.hpp"
#include "SCBase.h"
#include "SC_StringBuffer.h"

// only needed on linux to detect deprecated support directory (see initRuntime)
#ifdef __linux__
# include <boost/filesystem/path.hpp>
# include <boost/filesystem/operations.hpp>
#endif

void closeAllGUIScreens();
void initGUI();
void initGUIPrimitives();
Expand Down Expand Up @@ -115,23 +107,6 @@ void SC_LanguageClient::initRuntime(const Options& opt)
{
// start virtual machine
if (!mHiddenClient->mRunning) {
#ifdef __linux__
using DirName = SC_Filesystem::DirName;
namespace bfs = boost::filesystem;
bfs::path deprecatedSupportDirectory = SC_Filesystem::instance().getDirectory(DirName::UserHome);
deprecatedSupportDirectory /= "share/SuperCollider";

if (bfs::exists(deprecatedSupportDirectory)) {
bfs::path supportDirectory = SC_Filesystem::instance().getDirectory(DirName::UserAppSupport);
postfl("WARNING: Deprecated support directory detected: %s\n"
"Extensions and other contents in this directory will not be available until you move them to the new support directory:\n"
"%s\n"
"Quarks will need to be reinstalled due to broken symbolic links.\n\n",
deprecatedSupportDirectory.string().c_str(), // we can safely convert to c_str here because the POSIX filesystem uses UTF-8
supportDirectory.string().c_str());
}
#endif

mHiddenClient->mRunning = true;
if (opt.mRuntimeDir) {
int err = chdir(opt.mRuntimeDir);
Expand Down

0 comments on commit 9cf80b8

Please sign in to comment.