Commit Graph

44 Commits

Author SHA1 Message Date
Marek Roszko 7473528cf4 Ensure user paths are created early
Fix #11962
2022-07-05 20:47:53 -04:00
Johannes Maibaum edc7261099 Fix stock templates path for flatpak
Commit ad251b7b broke the template path
lookup for flatpak via `PATHS::GetStockTemplatesPath()`. Fix this by
using `::GetStockEDALibraryPath()` in all EDA Library related path
lookup functions.

`GetStockEDALibraryPath()` effectively does the same as
`GetStockDataPath()`, but it takes care to check the
`KICAD_LIBRARY_DATA` build config, which is being used by flatpak to
point to the flatpak EDA Library extensions in
`/app/extensions/Library/`.

Closes #11174
2022-03-25 08:15:59 +01:00
Marek Roszko 6420bd777f Sprinkle some wxT 2022-02-21 18:49:36 -05:00
Marek Roszko 0b46c75197 Simplify locale data path setting... 2022-02-21 13:08:29 -05:00
Marek Roszko ad251b7b8c Simplify KICAD6_TEMPLATE_DIR default
The search_stack method is bugland

Fix https://gitlab.com/kicad/code/kicad/-/issues/10119
2022-02-21 12:22:23 -05:00
Seth Hillbrand 098e8f7d9b Revert "cmake: adding KICAD_MACOSX_APP_BUNDLE option"
This reverts commit ea9f960cc1.

Reverted for updates as this currently breaks kicad-mac-builder
2022-01-31 15:57:56 -08:00
Davide Gerhard ea9f960cc1 cmake: adding KICAD_MACOSX_APP_BUNDLE option
ADDED: with cmake KICAD_MACOSX_APP_BUNDLE option the user can disable
the macOS app bundle creation when compiling on macOS. This permit to
use/install KiCad like any other *nix platform (/usr/bin, /usr/share,
ecc.). By default, cmake build the app bundle.
2022-01-28 15:49:37 -08:00
Franck Bourdonnec d877f04198 fixe paths 2021-12-02 20:23:00 +00:00
Jon Evans 31f41610f6 Move macOS data path inside the app bundle 2021-11-15 18:56:35 -05:00
qu1ck 4be115ca55 Add KICAD6_3RD_PARTY env variable 2021-08-27 21:11:47 +00:00
Jon Evans 37fd7c785e Make macOS path determination tolerant of bundle renaming
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8922
2021-08-13 17:00:45 -04:00
Marek Roszko 8921eef0be Add a "Open Demos Project" shortcut to the kicad launcher
Small UX improvement for the new user....
2021-07-25 21:58:57 -04:00
Marek Roszko c72914c43c Use Normalize instead of MakeAbsolute
Ugh doing this while headhurts much
2021-06-21 18:07:23 -04:00
Marek Roszko 5184908dd1 Fix accidental oversight for linux run from build dir paths 2021-06-21 18:05:38 -04:00
Marek Roszko aadb62bd42 Avoid generating paths on windows with ".." in them
This causes wxwidgets to failover to legacy windows dialogs as windows doesn't know how to handle them being passed to dialogs.
2021-06-21 18:03:55 -04:00
Jon Evans f00cee438f Fix running from build dir on MacOS after recent build system changes 2021-04-28 23:21:19 -04:00
Marcus A. Romer c5e77e9739 Respect KICAD_DOCS when searching for help files
On Linux, the documentation and help files are potentially installed to
a non-standard location (i.e., outside of /usr/share/doc/kicad/). This
can be the case when, e.g., multiple versions of KiCad are installed in
parallel. Making KICAD_DOCS available at run-time is the only viable
solution to allow the applications to find the help files in this case.

Fixes https://gitlab.com/kicad/code/kicad/issues/7874
2021-04-21 19:19:25 +00:00
Johannes Maibaum 39c1387b5b Allow to relocate EDA libraries out of KICAD_DATA
Introduce a new advanced config variable `KICAD_LIBRARY_DATA` which can
be used to move templates, symbols, footprints, and 3dmodels out of
`KICAD_DATA`. If not defined, everything is kept as before.

To facilitate this, PATHS::GetStockEDALibraryPath() is added. This
allows to differentiate code paths looking for EDA library data vs. code
paths looking for plugins, demos, and the like.

Thanks to Aimylios for the hints and suggestions with regards to the
stock EDA library data path handling on Windows and MacOS.
2021-04-14 01:51:22 +00:00
Jon Evans 5ae54c1610 Fix Windows stock BOM plugins dir
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8147
2021-04-08 22:16:20 -04:00
Jon Evans c1573744be Lock project files when opening; open locked projects read-only
Also clean up an include-what-you-use problem

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8037
2021-04-02 19:29:56 -04:00
Jon Evans 7a4f5be37e Add back Mac special-case to GetStockPlugins3DPath
3D plugins are not like other plugins

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7750
2021-03-29 17:07:37 -04:00
Marcus A. Romer e9eb5a5e21 Refactor definition of stock data path
It is not always useful to distinguish between the cases when KiCad is
run from the build or the installation directory. E.g., the libraries
are generally not available in the same path as the code. Make the
evaluation of KICAD_RUN_FROM_BUILD_DIR conditional to accomodate these
scenarios.
2021-03-21 00:28:33 +00:00
Jon Evans 18037e2f65 Rework bitmap system to load from archived PNGs
Bitmaps are now identified by an enum class instead of by pointers.
Bitmap loading and caching is now handled by a class in common, and
we no longer compile most bitmaps into the binary, so there is no
longer a bitmaps static library.

Instead, bitmaps are archived to a .tar.gz file which is installed
in ${KICAD_DATA}/resources/images.tar.gz

The source PNGs are checked in to Git as the original CPP files were,
so that people can build without the required dependencies to convert
SVGs to PNGs.

Initial support is also added for dark theme icons, although this
is not yet exposed in the GUI.

Stubs are present for multi-resolution image resources, but this is
not fully-baked yet and could use some refinement.
2021-03-11 08:37:35 -05:00
Jeff Young a088032411 Correct what was meant to be a LINUX compile flag.
(__UNIX__ picks up OSX as well.)

Fixes https://gitlab.com/kicad/code/kicad/issues/7750
2021-03-08 13:49:57 +00:00
jean-pierre charras 35e6e55bc9 3d stock plugins (dll plugins): fix incorrect path on Linux.
Fixes #7750
https://gitlab.com/kicad/code/kicad/issues/7750
2021-03-01 21:02:47 +01:00
Jon Evans a251141d1d Remove extra kicad from Linux plugins path
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7719
2021-02-27 11:02:13 -05:00
Jon Evans e4ef531f7d Fix Mac and Linux stock plugins paths 2021-02-26 19:00:52 -05:00
Marek Roszko 0d98db2eb3 Lowercase check the kicad data dir name in the macos app check
macOS is case insensitive anyway
2021-02-16 23:30:19 -05:00
Marek Roszko b609c7dcd6 Kick the osx specific path helpers into PATHS 2021-02-16 23:29:26 -05:00
Jon Evans 13a91dd49d Allow overriding documents home with an env var
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7543
2021-02-16 20:44:53 -05:00
Marek Roszko 32bf88fa8e Point to the user template path by default in pl editor 2021-01-31 23:57:41 -05:00
jean-pierre charras 7a56608cd5 Fix incorrect path of 3d stock plugins.
Fixes #7330
https://gitlab.com/kicad/code/kicad/issues/7330
2021-01-29 19:29:52 +01:00
Marek Roszko 4c14406788 Further path refinements 2021-01-27 21:48:02 -05:00
Marek Roszko a47e8af0d0 Fix up naming of the kiplatform helpers 2021-01-27 19:12:20 -05:00
Marek Roszko bf0ff2a43b Use pretty case for path strings on windows and mac 2021-01-27 19:12:20 -05:00
Marek Roszko 8baa5b46b0 Template not templates 2021-01-27 19:12:19 -05:00
Marek Roszko daf9c4f319 Centralize the 3d cache path 2021-01-27 19:12:19 -05:00
Marek Roszko 7b5397f81f Move PLUGINDIR to the make config.h 2021-01-27 19:12:19 -05:00
Marek Roszko 3bea9fc3d9 Add comment blocks 2021-01-27 19:12:18 -05:00
Marek Roszko 14327f3708 Cleanup the 3d plugins paths a little bit 2021-01-27 19:12:18 -05:00
Marek Roszko 8622565480 Add GetUserConfigDir 2021-01-27 19:12:18 -05:00
Marek Roszko 2807a37fc0 Create a stock scripting path helper 2021-01-27 19:12:18 -05:00
Marek Roszko e6dd95e83a Create a default user projects folder 2021-01-27 19:12:18 -05:00
Marek Roszko 28c6967dbc Start trying to shuffle around path management 2021-01-27 19:12:18 -05:00