2 * This file is part of NumptyPhysics
3 * Copyright (C) 2008 Tim Edmonds
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 3 of the
8 * License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
16 #if !defined(USE_HILDON) && !defined(WIN32)
24 * Include SDL, so that under Mac OS X it can rename my main()
25 * function to SDL_main (else NP *will* crash on OS X).
27 * http://www.libsdl.org/faq.php?action=listentries&category=7#55
31 class OsFreeDesktop
: public Os
35 virtual bool openBrowser( const char* url
)
37 if ( url
&& strlen(url
) < 200 ) {
39 snprintf(buf
,256,"xdg-open %s",url
);
40 if ( system( buf
) == 0 ) {
47 virtual char* saveDialog( const char* path
)
57 static OsFreeDesktop os
;
61 const char Os::pathSep
= '/';
63 int main(int argc
, char** argv
)