From: Mikko Rasa Date: Fri, 10 Oct 2014 19:59:42 +0000 (+0300) Subject: Move OS X main function to an overlay X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=e9606fcfd202207a029fff31f03b8e1a7a0d2963;p=libs%2Fcore.git Move OS X main function to an overlay --- diff --git a/Build b/Build index 2aa78db..aea04a1 100644 --- a/Build +++ b/Build @@ -38,6 +38,10 @@ package "mspcore" { overlay "windows"; }; + if_arch "darwin" + { + overlay "osx"; + }; if_arch "!windows" { overlay "unix"; diff --git a/source/core/osx/main.cpp b/source/core/osx/main.cpp new file mode 100644 index 0000000..e9a6fe2 --- /dev/null +++ b/source/core/osx/main.cpp @@ -0,0 +1,23 @@ +#include +#include "application.h" + +int main(int argc, char **argv) +{ + void *data = 0; + + /* Applications launched from Finder get a special argument, which would + interfere with GetOpt. Remove it from argv but pass it as data so it can + be used to determine how the application was launhed. */ + int j = 0; + for(int i=0; i #include "application.h" int main(int argc, char **argv) { - void *data = 0; - -#ifdef __APPLE__ - /* Applications launched from Finder get a special argument, which would - interfere with GetOpt. Remove it from argv but pass it as data so it can - be used to determine how the application was launhed. */ - int j = 0; - for(int i=0; i