Maybe some of thar stuff depends on CMAKE_INSTALL_PREFIX in some unexpected
way?

lør. 23. maj 2020 22.38 skrev Ian McInerney <ian.s.mciner...@ieee.org>:

> Have you tried redefining the environment variables to point to the
> correct system libraries? Specifically I believe the 4 you need are:
> KICAD_TEMPLATE_DIR (the templates)
> KICAD_SYMBOL_DIR (the eeschema symbols)
> KISYSMOD (the modules)
> KISYS3DMOD (the 3d models)
>
> -Ian
>
>
>
> On Sat, May 23, 2020 at 8:50 PM Johannes Maibaum <jmaib...@gmail.com>
> wrote:
>
>> Hello KiCad developers,
>>
>> TL;DR:
>> How can I redefine the default system
>> footprint/symbols/packages3d/templates base search paths at build time
>> using CMake options, so that KISYSMOD, KISYS3DMOD, KICAD_SYMBOL_DIR, and
>> KICAD_TEMPLATE_DIR all point to the directories:
>>
>> $PREFIX/data/share/kicad/{modules,modules/packages3d,symbols,templates}
>>
>> instead of:
>>
>> $PREFIX/share/kicad/{modules,modules/packages3d,symbols,templates}?
>>
>>
>> Longer version:
>>
>> First a quick update from flatpak land:
>>
>> This week I merged the update to KiCad 5.1.6, fixed the ngspice
>> simulator in Eeschema, activated Python scripting, and added user
>> documentation to the KiCad flatpak. This means that flatpak users by now
>> get a KiCad experience that should support close to all features that
>> the software package offers.
>>
>> But what I would like to do in order to make the installed size
>> (currently 6.2GB, mostly due to the 3D packages) a little bit more
>> controllable from the user perspective [1] is to move the footprint,
>> symbols, 3D models, and templates into separate "flatpak app extensions"
>> which can then be installed or removed independently of the main
>> application.
>>
>> The way flatpak extensions work is that you basically define an
>> "extension mount point" inside your main flatpak (I chose /app/data) for
>> whatever files and directories an installed extension wants to add into
>> the bundle.
>>
>> I have set up those library extensions already, and they are being
>> mounted correctly inside the flatpak at runtime, but so far I wasn't
>> able to configure KiCad correctly to use this mount point as base dir
>> for the data files.
>>
>> So far, I have tried either -DDEFAULT_INSTALL_PATH=/app/data or
>> -DCMAKE_INSTALL_DATADIR=/app/data during CMake configuration in two
>> different test builds (as those two options were appearing in
>> CMakeLists.txt and the surrounding lines seemed to indicate that they
>> were doing what I was trying to achieve).
>>
>> Yet, none of the two did change anything (though I didn't try using both
>> together yet) regarding to the KiCad system paths. This is what I see in
>> "Preferences->Configure Paths" with or without redefining the CMake
>> options:
>>
>> KICAD_SYMBOL_DIR=/app/share/kicad/library
>> KICAD_TEMPLATE_DIR=/app/share/kicad/template
>> KISY3DSMOD=/app/share/kicad/modules/packages3d
>> KISYSMOD=/app/share/kicad/modules
>>
>> I saw further CMake options which are all marked as advanced, thus I did
>> not try them yet.
>>
>> Is there a way to achieve what I want to do with the current set of
>> CMake switches or would this need deeper plumbing?
>>
>>
>> Here's my current CMake setup:
>>
>> "config-opts": [
>>     "-DBOOST_ROOT=/app",
>>     "-DDEFAULT_INSTALL_PATH=/app/data",
>>     "-DGLEW_INCLUDE_DIR=/app/include/GL",
>>     "-DOPENGL_glu_LIBRARY=/app/lib/libGLU.so",
>>     "-DKICAD_BUILD_QA_TESTS=OFF",
>>     "-DKICAD_SCRIPTING_PYTHON3=ON",
>>     "-DKICAD_SCRIPTING_WXPYTHON_PHOENIX=ON"
>> ]
>>
>> (--prefix=/app is the default in flatpak land).
>>
>>
>> And version info:
>>
>> Application: KiCad
>> Version: 5.1.6, release build
>> Libraries:
>>     wxWidgets 3.0.5
>>     libcurl/7.65.3-DEV GnuTLS/3.6.13 (NSS/3.46.1) (OpenSSL/1.1.1d)
>> zlib/1.2.11 libidn2/2.2.0
>> Platform: Linux 5.6.14-arch1-1 x86_64, 64 bit, Little endian, wxGTK
>> Build Info:
>>     wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8) GTK+
>> 3.24
>>     Boost: 1.66.0
>>     OpenCASCADE Community Edition: 6.9.1
>>     Curl: 7.65.3-DEV
>>     Compiler: GCC 9.2.0 with C++ ABI 1013
>>
>> Build settings:
>>     USE_WX_GRAPHICS_CONTEXT=OFF
>>     USE_WX_OVERLAY=ON
>>     KICAD_SCRIPTING=ON
>>     KICAD_SCRIPTING_MODULES=ON
>>     KICAD_SCRIPTING_PYTHON3=ON
>>     KICAD_SCRIPTING_WXPYTHON=ON
>>     KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
>>     KICAD_SCRIPTING_ACTION_MENU=ON
>>     BUILD_GITHUB_PLUGIN=ON
>>     KICAD_USE_OCE=ON
>>     KICAD_USE_OCC=OFF
>>     KICAD_SPICE=ON
>>
>>
>>
>> Cheers,
>> Johannes
>>
>>
>> [1] To quote a user: "KiCad is AFAIK the biggest flatpak on Flathub" (
>>
>> https://github.com/flathub/org.kicad_pcb.KiCad/issues/19#issuecomment-632761066
>> )
>>
>>
>> _______________________________________________
>> 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

Reply via email to