diff --git a/libretroshare/src/rsserver/rsinit.cc b/libretroshare/src/rsserver/rsinit.cc index 244a1e608..fe01152e0 100644 --- a/libretroshare/src/rsserver/rsinit.cc +++ b/libretroshare/src/rsserver/rsinit.cc @@ -381,8 +381,22 @@ int RsInit::InitRetroShare(int argcIgnored, char **argvIgnored, bool strictCheck //RsInitConfig::logfname = "" ; //RsInitConfig::inet = "" ; +#ifdef __APPLE__ + /* HACK to avoid stupid OSX Finder behaviour + * remove the commandline arguments - if we detect we are launched from Finder, + * and we have the unparsable "-psn_0_12332" option. + * this is okay, as you cannot pass commandline arguments via Finder anyway + */ + if ((argc >= 2) && (0 == strncmp(argv[1], "-psn", 4))) + { + argc = 1; + } +#endif + + argstream as(argc,argv) ; + as >> option('a',"auto-login" ,RsInitConfig::autoLogin ,"AutoLogin (Windows Only) + StartMinimised") >> option('m',"minimized" ,RsInitConfig::startMinimised ,"Start minimized." ) >> option('s',"stderr" ,RsInitConfig::outStderr ,"output to stderr instead of log file." ) diff --git a/libretroshare/src/util/argstream.h b/libretroshare/src/util/argstream.h index 08310ef72..77f4012cf 100644 --- a/libretroshare/src/util/argstream.h +++ b/libretroshare/src/util/argstream.h @@ -1,18 +1,23 @@ /* Copyright (C) 2004 Xavier Décoret * - * argsteam is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * Foobar is distributed in the hope that it will be useful, + * argstream is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 Foobar; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA. + * + * This licence has been changed from GPL to LPGL, with permission + * of the original author. (August 2013). + * */ #ifndef ARGSTREAM_H