mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Change fift path separator for FIFTPATH and -I argument (#1014)
* add github action for macOS 14 (arm64, M1) * add github action (portable) for macOS 14 (arm64, M1) * rename macOS arm64 output artifact * Colon cannot be used as a path separator for FIFTPATH or -I argument in fift on Windows when absolute paths are used (e.g. C:\path\lib:C:\path\smartcont). Suggestion to use @ as a new path separator on Windows. --------- Co-authored-by: neodiX <neodix42@ton.org>
This commit is contained in:
parent
f9b6d21620
commit
5186c4755c
6 changed files with 192 additions and 6 deletions
|
@ -62,7 +62,7 @@ void usage(const char* progname) {
|
|||
<< " [-i] [-n] [-I <source-include-path>] {-L <library-fif-file>} <source-file1-fif> <source-file2-fif> ...\n";
|
||||
std::cerr << "\t-n\tDo not preload standard preamble file `Fift.fif`\n"
|
||||
"\t-i\tForce interactive mode even if explicit source file names are indicated\n"
|
||||
"\t-I<source-search-path>\tSets colon-separated library source include path. If not indicated, "
|
||||
"\t-I<source-search-path>\tSets colon-separated (unix) or at-separated (windows) library source include path. If not indicated, "
|
||||
"$FIFTPATH is used instead.\n"
|
||||
"\t-L<library-fif-file>\tPre-loads a library source file\n"
|
||||
"\t-d<ton-db-path>\tUse a ton database\n"
|
||||
|
@ -75,11 +75,16 @@ void usage(const char* progname) {
|
|||
void parse_include_path_set(std::string include_path_set, std::vector<std::string>& res) {
|
||||
td::Parser parser(include_path_set);
|
||||
while (!parser.empty()) {
|
||||
auto path = parser.read_till_nofail(':');
|
||||
#if TD_WINDOWS
|
||||
auto path_separator = '@';
|
||||
#else
|
||||
auto path_separator = ':';
|
||||
#endif
|
||||
auto path = parser.read_till_nofail(path_separator);
|
||||
if (!path.empty()) {
|
||||
res.push_back(path.str());
|
||||
}
|
||||
parser.skip_nofail(':');
|
||||
parser.skip_nofail(path_separator);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue