On 1/27/2015 2:57 PM, Bernhard Stegmaier wrote: > Hi Wayne, > > I had a look at the patch and I currently see a small issue on OS X (maybe > not only being OS X specific…). > > The definition of the data path is as follows in config.h.make: > /// The install prefex used for KiCad's libraries. > #define KICAD_DATA_PATH > "@CMAKE_INSTALL_PREFIX@/@KICAD_DATA@" > > CMAKE_INSTALL_PREFIX is of course defined when building on OS X, it is the > folder where the app bundle will be stored.
Is this not the path where the libraries are installed? By default CMAKE_INSTALL_PREFIX is set to the correct platform dependent path. When building KiCad, you should always set CMAKE_INSTALL_PREFIX if the default path is not where you want KiCad installed. > > I know there recently was a discussion on the list on where to place what on > OS X. > I don’t want to start this again, some of the mentioned possibilities for a > default path on OS X could be > * /Library/Application Support/kicad/… > * ~/Library/Application Support/kicad/… > * ~/Documents/kicad/… > => None of these paths will normally be used for CMAKE_INSTALL_PREFIX, so > above #define will be way off. > In general, I think this problem will also arise on Linux/Windows when not > installing to the real target folder (like / or /usr/local)? If I'm following the current OSX install path logic, this statement in the main CMakeLists.txt file: set( KICAD_DATA ${OSX_BUNDLE_INSTALL_DIR}/${OSX_BUNDLE_SUP_DIR} CACHE PATH "Location of KiCad data files." FORCE ) does not use CMAKE_INSTALL_PREFIX as the base path for the install location of the data files. It is the full install path. I could add: #if defined( APPLE ) #define KICAD_DATA_PATH "@KICAD_DATA@" #else #define KICAD_DATA_PATH "@CMAKE_INSTALL_PREFIX@/@KICAD_DATA@" #endif That should resolve the issue shouldn't it or am I missing something else about how OSX bundles work? If the above does work, then we really should fix the OSX bundle install paths to use CMAKE_INSTALL_PREFIX as the default base path so my original solution would work in all cases. > > That should be easy to solve by either using some @KICAD_DATA_BASE@ instead > of @CMAKE_INSTALL_PREFIX@, which can be set in the various platform dependent > if’s in CMakeLists.txt to the desired base. > Or, just don’t use any combination of variables in config.h.cmake, but just a > single one set correctly in CMakeLists.txt. > > Apart from that I don’t see anything that should brake something on OS X. > The only thing to add is that as soon as the patch made it in, we can again > remove setting KIGITHUB from Info.plist. > > If you change your patch, I can make the OS X relevant modifications, test > them, and send a patch back to you. > > > Regards, > Bernhard > > >> On 25.01.2015, at 23:33, Wayne Stambaugh <stambau...@gmail.com> wrote: >> >> No hurry Bernhard. Whenever you get a chance. I just want to have a >> complete solution before I commit the changes. >> >> Thanks, >> >> Wayne >> >> On 1/25/2015 2:22 PM, Bernhard Stegmaier wrote: >>> Hi Wayne, >>> >>> I’ll try to look at it starting tomorrow, so I hope I can give feedback >>> until mid of the week. >>> >>> >>> Regards, >>> Bernhard >>> >>> On 25.01.2015, at 20:02, Wayne Stambaugh <stambau...@gmail.com >>> <mailto:stambau...@gmail.com>> wrote: >>> >>>> On 1/25/2015 10:29 AM, Nick Østergaard wrote: >>>>> 2015-01-23 14:42 GMT+01:00 Wayne Stambaugh <stambau...@gmail.com >>>>> <mailto:stambau...@gmail.com>>: >>>>>> As you all know, we have had many users struggle with setting up the >>>>>> environment variables used in the footprint library table and 3D model >>>>>> code. The attached patch sets the process environment variables >>>>>> KIGITHUB and KISYS3DMOD. KIGITHUB should work for all platforms since >>>>>> it is the URL for the kicad library repos on GitHub which is always >>>>>> https://github.com/KiCad. KISYS3DMOD uses the 3D model library install >>>>>> path created during the CMake configuration. This works fine for me on >>>>>> windows and linux. OSX may be a different story due to the way the >>>>>> bundle paths are defined. Would on of the OSX devs please test this and >>>>>> give me some feedback? Please don't forget to remove these environment >>>>>> variables that are set elsewhere. Otherwise, the environment variable >>>>>> in this patch will be ignored. My guess is that if we get the default >>>>>> environment variable set correctly that it would solve the problem for >>>>>> the largest percentage of users until I get some time to work on the >>>>>> dialog to edit them. I will also add KISYSMOD to this code once have >>>>>> the default OSX paths established. >>>>> >>>>> What would the default KISYSMOD be? I currently set it to >>>>> /usr/share/kicad/footprints in my kicad-pretty-git AUR package [1]. >>>>> >>>>> [1] https://aur.archlinux.org/packages/kicad-pretty-git/ >>>>> >>>> >>>> The default KISYSMOD on Linux would be >>>> /usr/local/share/kicad/footprints. However, this can be changed during >>>> the CMake configuration by passing -DCMAKE_INSTALL_PREFIX=/install/path. >>>> My guess is that packagers set this to /usr instead of the default >>>> /usr/local when building distro specific KiCad packages. The default >>>> should always correctly point to the correct path as long a the library >>>> install path is also set to the same path as the source build install >>>> path. The problem child is OSX because of the way the install paths are >>>> defined so I still need an answer from the OSX devs before I commit this >>>> patch. The Windows NSIS installer can also be problematic if the user >>>> installs KiCad anywhere but the default path which is c:\Program Files. >>>> >>>> >>>> _______________________________________________ >>>> Mailing list: https://launchpad.net/~kicad-developers >>>> Post to : kicad-developers@lists.launchpad.net >>>> <mailto: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