Commit Graph

208 Commits

Author SHA1 Message Date
Jon Evans 1dbe78c68b Add QA tests and expand serialization for API 2024-04-02 19:51:18 -04:00
Jon Evans a3b6ab48a4 Add a new plugin system for the new API 2024-04-02 19:51:16 -04:00
Jon Evans f613cd1cb4 ADDED: A new IPC API based on protobuf and nng
Details, documentation, and language bindings are works in
progress and will be evolving over the course of KiCad 9
development.
2024-04-02 19:34:36 -04:00
Roberto Fernandez Bautista 9957c58c14 Remove unused function RunPythonMethodWithReturnedString
pcbnewRunPythonMethodWithReturnedString already exists
2024-03-30 15:23:14 +01:00
Marek Roszko 46e301cd7f Add missing header include that only fails on msys2 ucrt
Weird
2024-03-21 07:41:51 -04:00
Marek Roszko 83ef5fd7d6 Move PGM_BASE to kicommon 2024-03-20 23:29:42 -04:00
Jeff Young 9ff66d0e71 Don't capture references to local variables for CallAfter.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16934

(cherry picked from commit 9d40374baf)
2024-02-23 16:53:30 +01:00
Jon Evans 7b0bb59b37 Remove hard-coded versioned env vars in most places 2024-02-15 15:31:08 +00:00
Jeff Young 7cc663ad77 Schematic parity checking for CLI DRC. 2024-02-02 23:05:37 +00:00
Marek Roszko 5c20c5732d We don't need pgm_base to expose pybind to everything 2023-12-25 23:28:33 -05:00
Marek Roszko 34a51d3c21 Make wxPython work under run from build directory on macOS 2023-11-14 07:14:13 -05:00
Marek Roszko e5f1cfd2b2 Set PYTHONPATH internally for macOS run from build dir 2023-11-13 23:09:12 -05:00
Jon Evans d371bb06ae New macOS installation scripts
Replaces BundleUtilities that got broken by recent updates
and is basically unmaintained by cmake.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15376
2023-09-19 17:23:30 -04:00
Marek Roszko 11de95778b Unwrap the FROM_UTF8 macro in favor of direct function
The extern just gets annoying to try to export the func later. We also yeet TO_UTF8 to string_utils.h for parity.
2023-09-09 00:10:57 -04:00
Nimish Telang 51e55dd750 Convert sprintf to snprintf in most files 2023-04-17 15:39:34 +00:00
Ian McInerney a6ebd60c3b CMake: Modernize Boost import to use imported targets 2023-03-10 16:38:35 +00:00
aris-kimi 22bca5c2a0 Disable link maps by default and fix compile issue with lld linker
The link maps were actually disabled by default before
912f1d5cec, and required KICAD_MAKE_LINK_MAPS
to be provided to enable them. So switch back to disabling them by
default.

Also, The lld linker is unable to accept a single dash cref option, while
ld and gold can. Instead, use the double dash version that is supported
by all three.

xref: https://github.com/llvm/llvm-project/issues/60932

Co-authored-by: aris-kimi <aris_kimi@hotmail.com>
Co-authored-by: Ian McInerney <ian.s.mcinerney@ieee.org>
2023-02-22 23:18:36 +00:00
Ian McInerney 912f1d5cec Modernize setting link map linker flags 2023-02-22 01:44:06 +00:00
Ian McInerney 2b1040ae67 Fix compatibility with older wx versions
ToInt was only added in wx 3.1.6 apparently, so for now make them long
types. Fixes bug introduced in 8ce0a84ca7.
2023-02-14 13:48:47 +00:00
Ian McInerney 1e8cc6855d Relax wxPython version mismatch check to major.minor
The previous version check failed when the version was even slightly
different, including on the revision field. Theoretically the ABI of the
wx minor versions in use should be the same, so this might work. On the
other hand, with wxPython it could break as well. YOLO.
2023-02-14 00:21:15 +00:00
Seth Hillbrand a9ed47f06c Update KICAD6->KICAD7 2023-01-23 22:21:12 +00:00
Marek Roszko 0ff32d20cd wxS more things 2023-01-22 09:41:42 -05:00
Jon Evans 70ec2f990f Work around wxPython / wxPropertyGrid fighting over global state
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13280
2023-01-21 17:06:51 -05:00
Stefan 2449f209b1 python version check: fix error message edge case 2023-01-02 20:20:01 +00:00
Jon Evans 5067e82e06 Only run the wxPython version check once 2023-01-02 13:26:55 -05:00
Jon Evans af0b176f57 Just catch any Python exception, we don't care what it is.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13354
2023-01-02 13:06:20 -05:00
Jon Evans f4a80903f0 Attempt to handle more edge cases in wxPython version check
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13354
2023-01-02 12:58:49 -05:00
Jon Evans 0a044656e3 Disable scripting and warn when wxPython version doesn't match 2023-01-02 11:52:14 -05:00
Jeff Young 66208b0ac0 Silence "menu item ID of 0 doesn't work on Mac" assert. 2022-12-30 22:59:08 +00:00
jean-pierre charras 9501f4303d Rename CreateWindow to CreateKiWindow to avoid a collision name with a windows header
No code change, but it fix an issue specific to msys2 that bother me when
trying to fix issues with wx 3.0.x version
2022-11-08 12:31:07 +01:00
Marek Roszko 7e089182b8 Swap out deprecated Iconized for IsIconized in python
Supported since wx 3.0, wxpython seems to have dropped it
2022-09-19 20:29:52 -04:00
Jeff Young 64a6fc0fd4 Push UNITS_PROVIDER down into a low-level mixin.
This allows us to also construct cheap UNIT_PROVIDERs for specific
tasks when necessary.
2022-09-19 17:10:59 +01:00
Wayne Stambaugh 7155d1af29 Fix a few more compile warnings. 2022-08-15 15:15:35 -04:00
Marek Roszko 47fe8ff8eb bitmaps and template are resources. 2022-07-21 20:14:10 -04:00
Marek Roszko b6b4ae959e Shuffle around the helper script folders 2022-07-21 19:04:08 -04:00
Ian McInerney b51d8c9825 Introduce new CMake variable to store kiface install location 2022-06-22 23:40:25 +01:00
Marek Roszko 44296dfea2 Forcefully ignore PYTHONPATH env variable on Windows
Fix https://gitlab.com/kicad/code/kicad/-/issues/11328
2022-04-04 22:10:59 -04:00
Marek Roszko 46f86e51e4 Stuff a resource manifest into the kipython kiface 2022-03-14 20:35:02 -04:00
Seth Hillbrand 455e330f3b Cleanup a few more raw strings 2022-03-10 11:22:18 -08:00
Seth Hillbrand 5881471a52 Don't write bytecode on MacOS
MacOS packages are signed and checked on each run.  Since Python lives
inside the package, adding byte code will break the package signature
2022-03-10 11:17:24 -08:00
qu1ck b53b68c686 Fix double loading plugins and sys.path entires multiplying 2022-02-17 17:41:52 +00:00
Seth Hillbrand 917845cf00 Ensure we can version scripting properly
Adds Version() and FullVersion() calls to support reporting version to
scripts and scripting window

Fixes https://gitlab.com/kicad/code/kicad/issues/10079

(cherry picked from commit 0a13f15a9d)
2022-02-03 15:59:10 -08: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
Seth Hillbrand fe148df57e Catch language switch before Python
We don't translate the python scripting window yet, so we need to catch
the KIWAY message to change the language and simply discard it

Fixes https://gitlab.com/kicad/code/kicad/issues/10021
2021-12-17 13:11:28 +00:00
qu1ck 8170e2f57c When reloading plugins delete top level module too
importlib.reload() has some differences in semantics from import
which leads to some plugins not reloading correctly
2021-12-06 15:07:25 +00:00
qu1ck 0f67c7ed25 When reloading plugins don't delete system modules 2021-12-02 02:18:41 +00:00
Seth Hillbrand 182ccb63ae Remove config options menu from PyShell
We should figure out how to get these into the json settings.  In the
meantime, disable as they are broken on close

Fixes https://gitlab.com/kicad/code/kicad/issues/9691
2021-11-20 14:37:18 -08:00
Seth Hillbrand 70df3822b5 Link command IDs to window frame
This should be compatible with both 4.0 and 4.1 of wxPython

Fixes https://gitlab.com/kicad/code/kicad/issues/9432
2021-10-20 11:54:25 -07:00
Seth Hillbrand 93b25b115b Handle alternate exception
Apparently, some versions throw one exception, some another.  We really
don't care which, we just want an ID value
2021-10-20 09:28:49 -07:00