kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #20045
Re: cwd and windows mess
For what may be the first time ever in KiCad, I vote in favor of the
#ifdef. The standard behavior is different on the two operating systems:
the Windows convention is to default to a documents directory (either
'Documents' or one specifically created for the application), and the
Linux convention is to default to CWD which is $HOME when launched from
the desktop manager. Using an #ifdef for this allows us to have the
conventional behavior on each system.
On Sat, Aug 29, 2015 at 01:49:53PM -0400, Mark Roszko wrote:
> So right now KiCad uses wxGetCwd when it needs a default path. On
> Linux this is HOME or wherever to launched it from command line.
>
> The problem is wxGetCwd returns %PROGRAM FILES%/KiCad as windows uses
> the executable directory by default. This directory is read only on a
> proper Windows 7+ system and requries administrator permissions to
> write. So it is a bad choice.
>
> Ideally we replace wxGetCwd with
> wxStandardPaths::Get().GetDocumentsDir() which will return
> %USER%/Documents on Windows and HOME on linux.
>
> Except this will break Linux users being able to launch kicad in
> command line in their favorite folder.
>
> So do we #ifdef Windows where getCwd used or something else? As of
> right now, wxGetCwd is an bad choice for windows.
>
> --
> Mark
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
Follow ups
References