We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 900b98d commit 3839802Copy full SHA for 3839802
1 file changed
libs/openFrameworks/utils/ofFileUtils.h
@@ -446,6 +446,20 @@ class ofFilePath {
446
static of::filesystem::path getCurrentExeDirFS();
447
static std::string getCurrentExeDir();
448
449
+ /// Get the App name of the running binary
450
+ ///
451
+ /// \param strip_debug removes a trailing "Debug" if present
452
+ /// \returns the App name as native string
453
+ static auto getAppName(bool strip_debug = true) {
454
+ auto name = ofFilePath::getCurrentExePathFS().filename().native();
455
+ if (strip_debug) {
456
+ if (name.size() > 5 && name.compare(name.size() - 5, 5, "Debug") == 0) {
457
+ name.erase(name.size() - 5);
458
+ }
459
460
+ return name;
461
462
+
463
/// Get the absolute path to the user's home directory.
464
///
465
/// Mac OSX: /Users/<username>
0 commit comments