diff --git a/VERSIONS b/VERSIONS index 3a124345f..d04f4ef01 100644 --- a/VERSIONS +++ b/VERSIONS @@ -4,7 +4,15 @@ ChucK VERSIONS log 1.5.4.2 ======= -(fixed) an issue with --chugin: where local paths aren't resolved correctly +(updated) --chugin-path: no longer auto-loads chugins found in the + specified paths; instead the specified paths are added to the import + system user paths, and the .chug and .ck files within the specified + paths can be @imported. +(added) --auto-load-chugin-path: flag -- this behaves as + --chugin-path previously did: chugins in the specified path(s) are + auto-loaded; .ck files can be @imported +(fixed) --chugin: and --chugin-path: now correctly auto-expand + paths 1.5.4.1 (November 2024) @@ -12,11 +20,11 @@ ChucK VERSIONS log (patch release) - (fixed, linux) a crash when the OTF handles an OTF command (add or replace) - (added) support for crawling subdirectories for importing for packages - to be managed by the upcoming ChuMP (ChucK Manager of Packages) + to be managed by the upcoming ChuMP (ChucK Manager of Packages) - (updated) --chugin-probe now prints .ck files in the import search paths - NOTE: as of 1.5.4.1 chuck auto-loads ONLY chugins in the system search - paths; all other chugins and all chuck files in the import search paths - must be @imported in order to be used. + NOTE: as of 1.5.4.1 chuck auto-loads ONLY chugins in the system search + paths; all other chugins and all chuck files in the import search paths + must be @imported in order to be used. 1.5.4.0 (November 2024) diff --git a/src/core/chuck_compile.cpp b/src/core/chuck_compile.cpp index 30853254e..e9ed171ec 100644 --- a/src/core/chuck_compile.cpp +++ b/src/core/chuck_compile.cpp @@ -685,7 +685,7 @@ std::string Chuck_Compiler::resolveFilename( const std::string & filename, for( list::iterator it = searchPaths.begin(); it != searchPaths.end(); it++ ) { // construct path; expand path again here in case search path has things like ~ - absolutePath = expand_filepath(*it+fname); + absolutePath = get_full_path(expand_filepath(normalize_directory_name(*it)+fname)); // try to match hasMatch = matchFilename( absolutePath, extension, exts ); // log diff --git a/src/core/util_string.cpp b/src/core/util_string.cpp index 0cbe8cca3..bf3589e21 100644 --- a/src/core/util_string.cpp +++ b/src/core/util_string.cpp @@ -771,7 +771,7 @@ std::string get_full_path( const std::string & fp, t_CKBOOL treatAsDir ) char * result = realpath(fp.c_str(), buf); // try with .ck extension - if( result == NULL && !extension_matches(fp, ".ck") ) + if( result == NULL && !treatAsDir && !extension_matches(fp, ".ck") ) result = realpath((fp + ".ck").c_str(), buf); if( result == NULL ) diff --git a/src/host/chuck_main.cpp b/src/host/chuck_main.cpp index 7715c0284..10e9dab94 100644 --- a/src/host/chuck_main.cpp +++ b/src/host/chuck_main.cpp @@ -916,17 +916,24 @@ t_CKBOOL go( int argc, const char ** argv ) break; } } + // add to system path(s); chugins in system paths are auto-loaded... + // .ck files can be @imported | 1.5.4.2 (ge) added + else if( !strncmp(argv[i], "--auto-load-chugin-path:", sizeof("--auto-load-chugin-path:")-1) ) + { + // get the rest + dl_search_path_system.push_back( argv[i]+sizeof("--auto-load-chugin-path:")-1 ); + } // (added 1.3.0.0) else if( !strncmp(argv[i], "--chugin-path:", sizeof("--chugin-path:")-1) ) { // get the rest - dl_search_path_system.push_back( argv[i]+sizeof("--chugin-path:")-1 ); + dl_search_path_user.push_back( argv[i]+sizeof("--chugin-path:")-1 ); } // (added 1.3.0.0) else if( !strncmp(argv[i], "-G", sizeof("-G")-1) ) { // get the rest - dl_search_path_system.push_back( argv[i]+sizeof("-G")-1 ); + dl_search_path_user.push_back( argv[i]+sizeof("-G")-1 ); } // (added 1.3.0.0) else if( !strncmp(argv[i], "--chugin:", sizeof("--chugin:")-1) )