Added Hack to fix OSX Finder launch.

Changed argstream.h licence from GPL to LGPL with authors permission.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6631 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2013-08-28 02:11:52 +00:00
parent ef2d202c07
commit f184d75703
2 changed files with 31 additions and 12 deletions

View File

@ -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." )

View File

@ -1,18 +1,23 @@
/* Copyright (C) 2004 Xavier Décoret <Xavier.Decoret@imag.fr>
*
* 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.
* 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.
*
* Foobar is distributed in the hope that it will be useful,
* 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.
* 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).
*
* 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
*/
#ifndef ARGSTREAM_H