[Kicad-developers] Jenkins build is back to normal : linux-kicad-full-gcc-head #3376

2018-05-07 Thread Miguel Angel Ajo
See 



___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


[Kicad-developers] XDG_CONFIG_HOME environment variable.

2018-05-07 Thread Wayne Stambaugh
I am in the process of fixing a minor bug in the code that fetches the
KiCad user configuration path.  We currently only check for the
XDG_CONFIG_HOME environment variable on non-windows and non-macos
platforms.  Is there any reason not to just go ahead and check for
XDG_CONFIG_HOME on all platforms?  I know in the past someone requested
that we allow it on windows to create a portable windows version of
KiCad.  Is there anything on macos where using this could trip us up?
If not, it will eliminate an ugly #if/#endif section in this code.

Thanks,

Wayne

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] XDG_CONFIG_HOME environment variable.

2018-05-07 Thread Adam Wolf
I do not think it will cause an issue on macOS.

Adam

On Mon, May 7, 2018 at 8:50 AM, Wayne Stambaugh  wrote:
> I am in the process of fixing a minor bug in the code that fetches the
> KiCad user configuration path.  We currently only check for the
> XDG_CONFIG_HOME environment variable on non-windows and non-macos
> platforms.  Is there any reason not to just go ahead and check for
> XDG_CONFIG_HOME on all platforms?  I know in the past someone requested
> that we allow it on windows to create a portable windows version of
> KiCad.  Is there anything on macos where using this could trip us up?
> If not, it will eliminate an ugly #if/#endif section in this code.
>
> Thanks,
>
> Wayne
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] XDG_CONFIG_HOME environment variable.

2018-05-07 Thread Nick Østergaard
I vote for accepting XDG_CONFIG_HOME on all platforms for consistency.
After all this is an advanced configuration feature and should not be
touched by the normal user.

I don't know why the patch was made so complex initially.

2018-05-07 15:54 GMT+02:00 Adam Wolf :

> I do not think it will cause an issue on macOS.
>
> Adam
>
> On Mon, May 7, 2018 at 8:50 AM, Wayne Stambaugh 
> wrote:
> > I am in the process of fixing a minor bug in the code that fetches the
> > KiCad user configuration path.  We currently only check for the
> > XDG_CONFIG_HOME environment variable on non-windows and non-macos
> > platforms.  Is there any reason not to just go ahead and check for
> > XDG_CONFIG_HOME on all platforms?  I know in the past someone requested
> > that we allow it on windows to create a portable windows version of
> > KiCad.  Is there anything on macos where using this could trip us up?
> > If not, it will eliminate an ugly #if/#endif section in this code.
> >
> > Thanks,
> >
> > Wayne
> >
> > ___
> > Mailing list: https://launchpad.net/~kicad-developers
> > Post to : kicad-developers@lists.launchpad.net
> > Unsubscribe : https://launchpad.net/~kicad-developers
> > More help   : https://help.launchpad.net/ListHelp
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


[Kicad-developers] KICAD_CACHE_HOME environment variable

2018-05-07 Thread Mike Wodarczyk
Attached is a patch to use a new KICAD_CACHE_HOME environment variable 
to set a custom path for the lockfiles on all platforms. It's tested 
under Windows and works as expected.


From 7f4245b0e2eacdeaa01d5cd753de5dfdcd28360c Mon Sep 17 00:00:00 2001
From: mwayne 
Date: Mon, 7 May 2018 13:46:33 +0200
Subject: [PATCH] Make lockfile path adjustable.

Use KICAD_CACHE_HOME environment variable on all platforms so users can specify 
a custom cache path.
---
 common/lockfile.cpp | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/common/lockfile.cpp b/common/lockfile.cpp
index 92ee0bd..baae3eb 100644
--- a/common/lockfile.cpp
+++ b/common/lockfile.cpp
@@ -86,12 +86,18 @@ wxString GetKicadLockFilePath()
 lockpath.AppendDir( "kicad" );
 #endif
 
-#if defined( __WXMAC__ ) || defined( __UNIX__ )
+// Use KICAD_CACHE_HOME to allow the user to force a specific cache path.
+if( wxGetEnv( wxT( "KICAD_CACHE_HOME" ), &envstr ) && !envstr.IsEmpty() )
+{
+// Override the assignment above with KICAD_CACHE_HOME
+lockpath.AssignDir( envstr );
+}
+
 if( !lockpath.DirExists() )
 {
 // Lockfiles should be only readable by the user
 lockpath.Mkdir( 0700, wxPATH_MKDIR_FULL );
 }
-#endif
+
 return lockpath.GetPath();
 }
-- 
2.11.1.windows.1

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp