Skip to content

Commit

Permalink
Remove misleading deprecation of old support directory
Browse files Browse the repository at this point in the history
At least on Linux, 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 Mar 30, 2018
1 parent 3f0d27b commit cfd2d2b
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions lang/LangSource/SC_LanguageClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,23 +115,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 cfd2d2b

Please sign in to comment.