summaryrefslogtreecommitdiff
path: root/navit/start_apple.m
diff options
context:
space:
mode:
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2011-09-06 18:41:35 +0000
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2011-09-06 18:41:35 +0000
commit5970b21bf40c3e84e0e39af17c3ebebb08ba3cd4 (patch)
treedbc74c65c01a045b3a138bd8efcb8fbd67c3c383 /navit/start_apple.m
parent5b10272ca3c92ca215e6bc83a13ad046ffabee11 (diff)
downloadnavit-svn-5970b21bf40c3e84e0e39af17c3ebebb08ba3cd4.tar.gz
Add:Core:Forgotten file
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@4762 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/start_apple.m')
-rw-r--r--navit/start_apple.m42
1 files changed, 42 insertions, 0 deletions
diff --git a/navit/start_apple.m b/navit/start_apple.m
new file mode 100644
index 00000000..d64691c0
--- /dev/null
+++ b/navit/start_apple.m
@@ -0,0 +1,42 @@
+/**
+ * Navit, a modular navigation system.
+ * Copyright (C) 2005-2008 Navit Team
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "start_real.h"
+#import <Foundation/Foundation.h>
+#include <glib.h>
+#include <stdlib.h>
+
+int
+main(int argc, char **argv)
+{
+ int ret;
+ NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
+ NSString *appFolderPath = [[NSBundle mainBundle] resourcePath];
+ const char *s=[appFolderPath UTF8String];
+ char *user=g_strdup_printf("%s/../Documents",s);
+ chdir(s);
+ argv[0]=g_strdup_printf("%s/bin/navit",s);
+ setenv("NAVIT_USER_DATADIR",user,0);
+
+ ret=main_real(argc, argv);
+ g_free(argv[0]);
+ g_free(user);
+ [pool release];
+ return ret;
+}