diff options
author | Teddy Wing | 2018-10-26 04:30:35 +0200 |
---|---|---|
committer | Teddy Wing | 2018-10-26 04:30:35 +0200 |
commit | 8367719d016312c5538216f033fd2f7ec89988f8 (patch) | |
tree | 64034165fabb8528f344317867f5bc7dc5d300d5 | |
parent | 502bc15cabdddbbfb29fcfe6f0bdebda383b0e51 (diff) | |
download | DomeKey-8367719d016312c5538216f033fd2f7ec89988f8.tar.bz2 |
main: Print version string when the `version` command line arg is passed
Store the version string in code, as otherwise the only way to get it
appears to be from Info.plist, and we don't have one of those in this
application.
-rw-r--r-- | DomeKey/main.m | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/DomeKey/main.m b/DomeKey/main.m index 5daf4b8..8cf2c10 100644 --- a/DomeKey/main.m +++ b/DomeKey/main.m @@ -13,6 +13,8 @@ #import "Mappings.h" #import "dome_key_map.h" +static const char *VERSION = "1.0"; + int main(int argc, const char * argv[]) { Config *config = config_get(); @@ -41,6 +43,8 @@ int main(int argc, const char * argv[]) { [NSApp run]; } + } else if (config->args.version) { + printf("DomeKey version %s\n", VERSION); } config_free(config); |