|
21 | 21 |
|
22 | 22 | #include <limits.h> |
23 | 23 | #include <cstdint> |
| 24 | +#include <filesystem> |
24 | 25 |
|
25 | 26 | #include "absprim.hh" |
26 | 27 | #include "acosprim.hh" |
@@ -1999,11 +2000,6 @@ void global::parseSourceFiles() |
1999 | 2000 | /**************************************************************** |
2000 | 2001 | Faust directories information |
2001 | 2002 | *****************************************************************/ |
2002 | | -#ifdef WIN32 |
2003 | | -#define kPSEP '\\' |
2004 | | -#else |
2005 | | -#define kPSEP '/' |
2006 | | -#endif |
2007 | 2003 |
|
2008 | 2004 | #ifndef LIBDIR |
2009 | 2005 | #define LIBDIR "lib" |
@@ -2547,27 +2543,27 @@ string global::printHelp() |
2547 | 2543 |
|
2548 | 2544 | string global::printLibDir() |
2549 | 2545 | { |
2550 | | - stringstream sstr; |
2551 | | - sstr << gFaustRootDir << kPSEP << LIBDIR << endl; |
2552 | | - return sstr.str(); |
| 2546 | + namespace fs = std::filesystem; |
| 2547 | + fs::path path = fs::path(gFaustRootDir) / "lib"; |
| 2548 | + return path.string() + '\n'; |
2553 | 2549 | } |
2554 | 2550 | string global::printIncludeDir() |
2555 | 2551 | { |
2556 | | - stringstream sstr; |
2557 | | - sstr << gFaustRootDir << kPSEP << "include" << endl; |
2558 | | - return sstr.str(); |
| 2552 | + namespace fs = std::filesystem; |
| 2553 | + fs::path path = fs::path(gFaustRootDir) / "include"; |
| 2554 | + return path.string() + '\n'; |
2559 | 2555 | } |
2560 | 2556 | string global::printArchDir() |
2561 | 2557 | { |
2562 | | - stringstream sstr; |
2563 | | - sstr << gFaustRootDir << kPSEP << "share" << kPSEP << "faust" << endl; |
2564 | | - return sstr.str(); |
| 2558 | + namespace fs = std::filesystem; |
| 2559 | + fs::path path = fs::path(gFaustRootDir) / "share" / "faust"; |
| 2560 | + return path.string() + '\n'; |
2565 | 2561 | } |
2566 | 2562 | string global::printDspDir() |
2567 | 2563 | { |
2568 | | - stringstream sstr; |
2569 | | - sstr << gFaustRootDir << kPSEP << "share" << kPSEP << "faust" << endl; |
2570 | | - return sstr.str(); |
| 2564 | + namespace fs = std::filesystem; |
| 2565 | + fs::path path = fs::path(gFaustRootDir) / "share" / "faust"; |
| 2566 | + return path.string() + '\n'; |
2571 | 2567 | } |
2572 | 2568 | string global::printPaths() |
2573 | 2569 | { |
|
0 commit comments