Skip to content

Commit

Permalink
change --chugin-path:<path> semantics; add --auto-load-chugin-path:<p…
Browse files Browse the repository at this point in the history
…ath>
  • Loading branch information
gewang committed Nov 8, 2024
1 parent 6d85bc3 commit 32ca6de
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 9 deletions.
18 changes: 13 additions & 5 deletions VERSIONS
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,27 @@ ChucK VERSIONS log

1.5.4.2
=======
(fixed) an issue with --chugin: where local paths aren't resolved correctly
(updated) --chugin-path:<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:<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:<name> and --chugin-path:<path> now correctly auto-expand
paths


1.5.4.1 (November 2024)
=======
(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)
Expand Down
2 changes: 1 addition & 1 deletion src/core/chuck_compile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ std::string Chuck_Compiler::resolveFilename( const std::string & filename,
for( list<string>::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
Expand Down
2 changes: 1 addition & 1 deletion src/core/util_string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
11 changes: 9 additions & 2 deletions src/host/chuck_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) )
Expand Down

0 comments on commit 32ca6de

Please sign in to comment.