2 * Navit, a modular navigation system.
3 * Copyright (C) 2005-2008 Navit Team
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * version 2 as published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
20 #include "start_real.h"
21 #import <Foundation/Foundation.h>
26 main(int argc, char **argv)
29 NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
30 NSString *appFolderPath = [[NSBundle mainBundle] resourcePath];
31 NSString *locale = [[NSLocale currentLocale] localeIdentifier];
32 char *lang=g_strdup_printf("%s.UTF-8",[locale UTF8String]);
33 dbg(0,"lang %s\n",lang);
34 setenv("LANG",lang,0);
35 setlocale(LC_ALL, NULL);
37 const char *s=[appFolderPath UTF8String];
38 char *user=g_strdup_printf("%s/../Documents",s);
40 argv[0]=g_strdup_printf("%s/bin/navit",s);
41 setenv("NAVIT_USER_DATADIR",user,0);
43 dbg(0,"calling main_real\n");
44 ret=main_real(argc, argv);