From 17ecda6af3611a5e0c19b16b5a3592695aaea544 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 30 Sep 2023 01:36:32 +0200 Subject: Try to get app name from compiler flag This isn't working with the spaces handling. Not sure if I want to keep going with this approach as it feels like spaces and escaping is going to get hairy to deal with. --- src/MainMenu.m | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/MainMenu.m b/src/MainMenu.m index fff0653..0dff780 100644 --- a/src/MainMenu.m +++ b/src/MainMenu.m @@ -1,5 +1,7 @@ #import "MainMenu.h" +#define AppName MK_APP_NAME + NSMenuItem *MainMenuCreateApplicationMenuItem(); NSMenuItem *MainMenuCreateFileMenuItem(); NSMenuItem *MainMenuCreateEditMenuItem(); @@ -46,6 +48,8 @@ NSMenu *MainMenuCreate() NSString *MainMenuGetApplicationName() { + NSLog(@"App name: %@", AppName); + // TODO: #define this from the Makefile NSString *application_name = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"]; -- cgit v1.2.3