Commit Graph

1341 Commits

Author SHA1 Message Date
David Holdeman 79fbde0894 Add option to use drill/place file origin for kicad-cli gerber export 2023-03-21 12:18:14 +00:00
Ian McInerney 016c958021 Always build spice simulator support
The simulator has advanced considerably, and it is seeing lots of active
development, so make it a required part of KiCad. Additionally, the
build without the simulator has actually been broken for a while, so no
one clearly is building without ngspice right now.
2023-03-20 16:54:32 +00:00
Alex 10c4b948cb Support canceling initial global library table setup. 2023-03-19 14:30:53 +03:00
Alex 672c468342 Fix clashing error dialogs when can't load dynamic library. 2023-03-19 13:01:54 +03:00
Simon Richter 08e6458abc Shrink lifetime of variable
In 7.0, this avoids a warning. In this branch, someone implemented the
compiler's suggestion, but there is an easier way.
2023-03-11 15:46:52 +00:00
jean-pierre charras f569cffa8e Step exporter fixes and enhancements:
- fix duplicate code and a few bugs (some are due to changes in code over the years)
- ADDED: option to export tracks and vias on external layers Exporting tracks is *very* time consuming,
and need a bit of optimization.
2023-03-05 12:55:15 +01:00
Marek Roszko 47cf26f047 Don't destroy the DIALOG_PCM_PROGRESS until after the threads actually terminated 2023-02-26 17:46:49 -05:00
jean-pierre charras 72cc2766ed kicad manager, OnOpenFileInTextEditor(): do not quote the filename.
It will be quoted later.
Fixes #14086
https://gitlab.com/kicad/code/kicad/issues/14086
2023-02-26 08:34:38 +01:00
Alex b592017495 Reduce some flickering in PCM. 2023-02-24 20:06:39 +03:00
Ian McInerney bcb93e9aa7 Modernize setting of compiler definitions in CMake
add_compile_definitions was added in 3.12, and our minimum is now
greater than that.
2023-02-22 01:44:06 +00:00
Marek Roszko 6029fae30b Catch parsing exceptions of the local repository.json
Fixes KICAD-B9
2023-02-21 07:14:18 -05:00
Marek Roszko 7d25b6de87 Fix crash deleting project tree items
Fixes sentry KICAD-C2
2023-02-19 10:09:04 -05:00
Marek Roszko 9b708ce6d1 Fix copypasta typo in export pos
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13991
2023-02-19 00:24:05 -05:00
Wayne Stambaugh 2dffaa4d04 Fix GCC compiler warnings. 2023-02-17 15:29:45 -05:00
qu1ck 2975f53647 PCM: auto reload global libs after dialog is run
This adds Reset() method to KIFACE to reload global libs stored in
global static vars.
Also refactors some lib reload code in various frames to have
common MAIL_RELOAD_LIB handler.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12500
2023-02-17 17:24:32 +00:00
aris-kimi dca1281263 Fix some typos 2023-02-14 23:47:05 +02:00
Marek Roszko 4665823089 Turn on and fix MSVC compliance mode issues
We want /permissive- to enable debug performance improvements in MSVC 17.5+.
This flag is also default under C++20 so we'll have to deal with these compile issues anyway at some point in the future.

In particular, MSVC becomes pedantic about ternary types.
See https://learn.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance?view=msvc-170#ambiguous-conditional-operator-arguments

MSFT cites https://cplusplus.github.io/CWG/issues/1805.html
2023-02-12 16:30:37 -05:00
Mark Roszko 2c8b1a50b0 Add extra dash to the long short args 2023-02-08 13:55:20 +00:00
jean-pierre charras a493a2c822 kicad-cli, pcbnew pàlot: honor the color options when ploting pdf files
--black-and-white and -t were shown in help, but not handled
Fixes #13805
https://gitlab.com/kicad/code/kicad/issues/13805
2023-02-07 20:20:45 +01:00
Marek Roszko 4d811ba975 Enable layer arg for fp export svg 2023-01-27 23:45:42 -05:00
Jon Evans d25b96d72d Squash warnings 2023-01-25 18:01:16 -05:00
qu1ck 7ec2989d30 PCM: progress dialog stay should on top, disable other windows 2023-01-25 22:44:35 +00:00
Jon Evans bd977fffa8 PCM: Make the progress dialog non-modal on other platforms 2023-01-25 13:59:32 -05:00
Jon Evans 9954c18244 PCM: Make the progress dialog modal
I don't know if this was intended to operate modeless, but it doesn't work

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13474
2023-01-25 12:32:13 -05:00
Marek Roszko bc65f3b515 Lazily fix the output arg string for sch svg export
Big brain, just use the string with the colon in it. Sue me.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13647
2023-01-24 23:36:38 -05:00
qu1ck d9e1763484 PCM: keep pinned state on update 2023-01-24 00:01:51 +00:00
Seth Hillbrand a9ed47f06c Update KICAD6->KICAD7 2023-01-23 22:21:12 +00:00
Mark Roszko 26c6760662 Remove new strings 2023-01-17 17:55:48 +00:00
Marek Roszko ac94995f70 Some more wxS 2023-01-16 19:07:50 -05:00
Marek Roszko ba6c23da00 Add help note for the gerber vs gerbers, and make "pos" obvious
Will add more strings in v8 I guess to avoid too many sneaky string additions :P
2023-01-14 14:33:38 -05:00
Seth Hillbrand a5e6f11682 Fix crash when closing non-modal 2023-01-12 13:21:22 -08:00
Seth Hillbrand fa91d906d0 Fix event blocker on GTK
We block events when a modal window is active.  But detecting when the
modal window is closed is harder on GTK than just counting modal closes
because the modal flag can sometimes be unset before the wxEVT_SHOW
event fires.  Instead, we track the stack of modal windows opened and
close the window and subsequent windows when the object pointer matches

Fixes https://gitlab.com/kicad/code/kicad/issues/13372
2023-01-12 11:53:00 -08:00
Jeff Young 30c9deb9d5 Flat(er) look for paged dialogs. 2023-01-11 01:11:25 +00:00
Marek Roszko 4dad07eef6 Fix typo 2023-01-09 07:03:48 -05:00
Marek Roszko 684941e4b6 Flip the include/exclude of refdes and value in cli 2023-01-08 22:53:08 -05:00
Marek Roszko 9f71e9af03 Add arg to plot hidden symbol pins in cli 2023-01-08 22:39:38 -05:00
Wayne Stambaugh f28ea5e784 Remove standard dialog button static line separators.
For the sake of consistency across all dialogs and window that behave
like dialogs, remove the static line that separates the main part of
the dialog from the standard buttons.  This only applies to windows
that have the standard button on the bottom of the frame.

This covers the 3D viewer, CvPcb, common, GerbView and KiCad dialogs.
2023-01-08 13:15:33 -05:00
Marek Roszko c3a214983d Fix the --version redirection
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13379
2023-01-04 21:39:37 -05:00
Marek Roszko 0c717ec4f2 Add trailing newline to version prints 2023-01-04 21:31:52 -05:00
qu1ck 50582232ea PCM: fix url detection in pkg description 2023-01-04 21:17:38 +00:00
Seth Hillbrand 98d55ce82f Avoid rebuilding with each commit
We shouldn't include the kicad_build_info.h outside of the wrapper
build_info.h.  Also adds an error directive to prevent re-introduction
of define dependencies
2023-01-04 11:32:15 -08:00
Marek Roszko 33b835ceef Add additional version info options for the cli 2023-01-03 21:54:44 -05:00
Marek Roszko 8ab9934143 Use our own cmake module path variable to avoid conflicting with the main ones listy functional 2023-01-03 19:18:16 -05:00
Marek Roszko f2fcd4b8e1 Add a version command to cli and extend out a major.minor.patch string 2023-01-01 22:41:05 -05:00
Marek Roszko e335423cb6 Fix the handling of help in the cli commands
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13293
2023-01-01 12:00:05 -05:00
Marek Roszko 1b15854da5 Implement --help and --version ourselves for kicad-cli
https://gitlab.com/kicad/code/kicad/-/issues/13293
2022-12-31 23:39:05 -05:00
Jeff Young 4c63b4e061 Class name <-> file name sync. 2022-12-29 18:05:57 +00:00
Jon Evans 7e778c9856 KiWay: Make sure to mark closed windows as closed
Also make sure to veto project import if we couldn't close the existing project.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13215

Maybe also fixes some other weird crashes, we'll see.
2022-12-27 10:31:45 -05:00
Ian McInerney 2f8cc194c1 Initialize variables inside file dialog customizer classes 2022-12-17 23:37:24 +00:00
Jon Evans 5abf73e3c9 Never call ReCreateMenuBar inside a menu event handler
As of wxWidgets 3.2, the wxWidgets event handler runs code after the
the client event handler that depends on the menu still existing.
Because there are potentially many paths to call ReCreateMenuBar from
within a menu event handler, let's just wrap this action in a CallAfter
to make sure it happens after the wx handler call completes.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13149
2022-12-16 16:37:51 -05:00
Jeff Young 5984a6dddd Fixup a few more collapsing textEditCtrls on Mac. 2022-12-14 15:13:29 +00:00
Marek Roszko 2f8cc84551 Hotglue footprint to svg export
This needs additional work
2022-12-13 22:50:15 -05:00
Jeff Young c0872364d4 Get rid of bloated bitmap buttons on wxWidgets 3.2. 2022-12-13 20:48:02 +00:00
Jon Evans 1ebe3dc131 Stub out MacOpenFile for kicad-cli
Avoids needing to link in the project manager and is probably not necessary

If it ends up being necessary, someone can write a new implementation.
2022-12-13 12:09:59 -05:00
Marek Roszko 93e313440e Split the srcs for kicad-cli from kicad to shrink the binary a little 2022-12-12 22:53:39 -05:00
Marek Roszko f1f5fff072 Add cli export of symbols from kicad libraries 2022-12-12 22:44:26 -05:00
Marek Roszko 59a6d14242 Remove the cli pcb/sch export cpps that arent needed 2022-12-12 22:44:26 -05:00
Marek Roszko 7e53663d5d Add a bulk gerber export that's a wee bit smarter 2022-12-11 20:13:26 -05:00
Adam Wolf 05fe0e740d Remove bundled BundleUtilities
Previously, we included a newer version of BundleUtilities and
GetPrerequisites for macOS. However, the changes we needed have long been
included in CMake, and we weren't using our BundleUtilities in all the
places it was being used.
2022-12-09 23:48:31 +00:00
Adam Wolf 98775afcba Support Apple Silicon on macOS
As part of supporting Apple Silicon, we've got to upgrade our embedded
Python to a version that comes with an Apple Silicon build. Python 3.9
suffices. This means we ignore python3.9 while fixing up bundles.

Apple requires all code to be signed on Apple Silicon. We've added signing
to the build. This has to be run after anything that adds to or modifies
the installed files. As of Cmake 3.14 (CMP0082), the install rules are run
in the order declared, so we are able to do this just by adding the
signing subdirectory last in the main CMakeLists.txt. By default, the
build will be signed "ad hoc", which does not require a developer to
create keys or get keys from Apple. We added some CMake variables to
control signing, KICAD_OSX_CODESIGN and KICAD_OSX_SIGNING_*.

In order to better support development, we've added some necessary cleanup
steps to KiCad that were performed externally in the release and nightly
build process, like removing any .pyc files and extra Python symlinks
erroneously introduced by fixup_bundle. We also adjusted "refix_rpaths" to
be more accurate. We should not need "wrangle_bundle" when building and
installing a local development copy of KiCad.
2022-12-09 23:48:31 +00:00
Alexander Dewing 91290e8f75 vsrious cleanup, seeing if we dont need to ignore_item for python 2022-12-09 23:48:31 +00:00
Alexander Dewing 02325130fa Initial arm64 work 2022-12-09 23:48:31 +00:00
jean-pierre charras 966f7bfa4c Fix commit 0a881e09, not working on wxWidgets 3.1.5/msys2 2022-12-08 15:39:10 +01:00
Marek Roszko 2fc0cd68ed Avoid crashing due to empty lib tables in cli
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13097
2022-12-07 23:56:03 -05:00
Marek Roszko c0b5fe58c3 Implement output targeting of symlib/fplib upgrade per request 2022-12-06 21:20:27 -05:00
qu1ck 8003e9ab50 Fix segfault in kicad-cli for int arguments
Need to indicate int type to argparse
2022-12-06 02:53:10 +00:00
Marek Roszko bae8cb55c0 Rename the bom cli to pythonbom since we'll have a real bom system later 2022-11-30 19:56:59 -05:00
frutiemax 7d78f0b4d3 Use forward declarations in kicad_manager_frame.h 2022-11-30 03:08:35 +00:00
Marek Roszko 21fed9fc8c Hotglue a symbol upgrade function in cli 2022-11-29 00:00:45 -05:00
Marek Roszko 4a88d2a74d Fix up the top level cli command entries 2022-11-28 20:57:24 -05:00
Marek Roszko 25d5defc10 Add cli for "fp" upgrade 2022-11-28 20:48:14 -05:00
Jon Evans 527da0d18c Reload color settings when changed by PCM 2022-11-24 16:20:52 -05:00
Mike Williams 60d42a7b1e Spelling: fix various suppress misspellings 2022-11-22 13:47:10 -05:00
jean-pierre charras 562676b9f8 Fix missing initialization in PGM_KICAD.
This init was probably removed by mistake.
Fixes #12935
https://gitlab.com/kicad/code/kicad/issues/12935
2022-11-18 09:25:20 +01:00
Alex 53b9baa5ba Some refactoring around Gerber files extension checking.
Fixes a case where most Protel inner layer files couldn't be drag and dropped.
2022-11-18 09:55:34 +05:00
Alex 95b8fe26b4 Fix display and archiving of Protel gerber files in Project manager. 2022-11-18 04:39:18 +05:00
Mark Roszko 0e0e4adf3f Use locale_io since atof is used 2022-11-15 13:30:37 +00:00
Marek Roszko daa6e84d74 Make the cli help translatable 2022-11-14 07:25:47 -05:00
Marek Roszko 95eed30ebe Fix pos file side check 2022-11-13 18:20:26 -05:00
Marek Roszko 9623ea7d57 Remove the -v from the cli subcommands 2022-11-13 14:28:48 -05:00
Marek Roszko e144f05a4f Report back the correct arg info for a failed cli command 2022-11-13 14:25:13 -05:00
Marek Roszko ea83449ef7 Change up the step export arg handling to single quote for now
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12890
2022-11-13 11:49:20 -05:00
Marek Roszko 39d5cc31d4 Add schematic xml bom output 2022-11-12 21:51:32 -05:00
Marek Roszko 3dd2ae762d Refactor step export to use our normal board processing routines 2022-11-12 21:27:10 -05:00
Marek Roszko 9b4505c6d2 Fix some leaking command job objects 2022-11-09 22:40:05 -05:00
Marek Roszko 43f039ef5f Add netlist export cli 2022-11-09 22:37:55 -05:00
Marek Roszko e5d132beec Add missing * layer mask for cli 2022-11-07 23:30:30 -05:00
Marek Roszko cd30da179a Round out the cli with position file export 2022-11-07 19:53:35 -05:00
Marek Roszko b60c42ea41 Add schematic cli plotting 2022-11-01 23:34:49 -04:00
jean-pierre charras d289130627 fix memory leak and missing switch to "C" locale in some handlers
PCBNEW_JOBS_HANDLER::JobExportGerber(): disable plot pad holes.
2022-10-31 10:04:01 +01:00
jean-pierre charras ed0462c7a1 Fix some issues in command_export_pcb_gerber.cpp, mainly force "C" locale. 2022-10-30 19:54:26 +01:00
Marek Roszko 0a134788d0 Implement cli for gerber, drill, pdf export of pcb 2022-10-29 11:56:10 -04:00
Marek Roszko 30211da69f Move the cli definitions to kicad 2022-10-29 11:55:38 -04:00
Marek Roszko a7e1f668a7 Some cleanup of the cli functions 2022-10-25 23:26:23 -04:00
Alex 93133ecd78 pcm: Fix an unnecessary horizontal scrollbar in package info on MSW. 2022-10-23 22:07:22 +03:00
Jeff Young 3fbc6ac29a Minor dialog layout fixes. 2022-10-23 17:56:44 +01:00
Jeff Young 5777254cfa Formatting and "auto" reduction. 2022-10-23 17:56:44 +01:00
Mark Roszko f9659a7e7c Fix kicad-cli not being installed at all 2022-10-20 18:20:27 +00:00
qu1ck d52d1cb489 Better message on PCM repository error
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9587
2022-10-17 16:44:01 +00:00
Jon Evans 8176100cfc One more stab at kicad-cli fixes 2022-10-12 08:31:56 -04:00
Jeff Young ad5df7f4cc More busy cursor tightening.
Fixes https://gitlab.com/kicad/code/kicad/issues/11648
2022-10-11 23:40:58 +01:00
Jon Evans 84cbf38194 Move kicad-cli into bundle 2022-10-11 15:49:55 -04:00
Jon Evans 10f728c7c3 Attempt to fix macos kicad-cli 2022-10-11 10:20:21 -04:00
Jeff Young cd191ed25d Fix a couple of probable copy/paste errors. 2022-10-06 14:59:52 +01:00
Marek Roszko 2bac898298 Make -f set standalone mode in kiway 2022-10-04 23:03:03 -04:00
Marek Roszko 3fe004fd1b New kicad-cli will now be the cli interface 2022-10-04 22:24:13 -04:00
Marek Roszko 201dcabb97 Fix kicad.exe as well for file args 2022-10-04 07:35:03 -04:00
Mark Roszko fb8a4c10f7 Shove kicad2step into pcbnew itself with a new cli 2022-10-04 01:53:37 +00:00
Ian McInerney 40ff7cb9bd Fix some UI element spacing in settings panels 2022-09-25 15:41:39 +01:00
Ian McInerney a7242f423c pcm: Copy schema to build directory in out-of-tree builds
When running from the build directory, the schema must be present in the
build directory. This wasn't working on out-of-tree builds though, since
it was never copied there.
2022-09-25 00:48:38 +01:00
Ian McInerney d8272b0830 pcm: Ensure missing package version properly handled at runtime
wxASSERT is removed in release mode (which most users run), so this will
not prevent future code from possibly using an invalid iterator if the
package version can't actually be found.
2022-09-25 00:48:38 +01:00
Ian McInerney fdb97a46c1 Don't copy items in for loops when not needed 2022-09-24 03:46:06 +01:00
Ian McInerney 6310f84a57 Fix shadowed definition of EAGLE constant 2022-09-24 01:37:57 +01:00
qu1ck 6ebb3baa3b PCM: autoload libs from installed packages to global lib tables
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9713
2022-09-23 16:16:13 +00:00
Jeff Young 30a4d3d2de Coverity fixes. 2022-09-20 00:19:15 +01: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
Marek Roszko 7b29b4ef55 Copy the pcm schema for msvc to run from build directory
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12318
2022-09-18 10:46:48 -04:00
lulu731 0180bcf90a ADDED: Implement Drag and Drop
dropping files to Kicad manager :
  *.kicad_pro, *.pro -> open project;
  gerber and job files -> open in Gerbview editor;
  Eagle and Cadstar files -> open project.
dropping file to schematic editor -> append schematic;
dropping library file to Symbol editor -> add library;
dropping board file to PCB editor -> append board;
dropping library or footprint file to Footprint editor -> add library or import footprint;
dropping ZIP file or gerber files to Gerbview editor -> open files;
dropping sheet file to Drawing Sheet editor -> open sheet.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/11638
2022-09-14 22:28:09 +00:00
jean-pierre charras c414dcf967 Kicad: fix project tree icon list after changes in commit a9877ab1.
The icon list and the file types list must be synchronized.
2022-09-11 11:08:37 +02:00
Jeff Young a9877ab117 Include markdown files in project view.
Fixes https://gitlab.com/kicad/code/kicad/issues/12178
2022-09-10 21:11:24 +01:00
Jeff Young f179754118 Implement add-new-on-return for some of our grids.
Fixes https://gitlab.com/kicad/code/kicad/issues/12335
2022-09-09 13:41:13 +01:00
Jeff Young c30a557810 ADDED netclass assignment from PCB canvas.
Fixes https://gitlab.com/kicad/code/kicad/issues/5975
2022-09-03 19:29:59 +01:00
jean-pierre charras c72091d7e0 fix a compil warning. 2022-09-03 19:55:54 +02:00
qu1ck 977b6cd8f3 PCM: add ability to pin packages
Pinned packages don't affect available update notification and will not
be updated with "Update All" button. Manual update is still possible but
will trigger a confirmation dialog.
2022-09-03 17:07:55 +00:00
Seth Hillbrand b736460e71 Move optional access from value() to *operator
`value()` throws.  Where we check for existence, we don't need to use
the throwing version and should just use the unprotected variant
2022-08-30 13:59:39 -07:00
jean-pierre charras abc7335fd7 Cosmetic enhancement: add two missing icons 2022-08-28 16:01:26 +02:00
Seth Hillbrand f1261e71d4 Replace boost::optional with std::optional 2022-08-25 15:50:47 -07:00
Marek Roszko fc99b3ba95 Don't link gdiplus everywhere anymore
Tested on msys2 which is the only place it would have been buggy
CMake seems to share the gdiplus linkage with the other dependencies automatically now
2022-08-23 23:51:35 -04:00
Seth Hillbrand 8757b3f98a Catch errors thrown from `at()`
at() can throw when it doesn't find the proper reference.  This catches
the errors and attempts to properly handle them assuming the user
initiated the removal.  Warns the developer (wxLogDebug) when this is
not the case

Fixes https://gitlab.com/kicad/code/kicad/issues/12241
2022-08-22 11:57:13 -07:00
jean-pierre charras 1a18f9a839 Kicad/PCM: Better message asking for **plugins** update.
Previous message asked for update, but the update is not for Kicad, only for loaded plugins
2022-08-21 08:39:42 +02:00
qu1ck e19e039a47 PCM: fix crash in background update on project switch
Fixes #12244
2022-08-19 15:18:19 -07:00
Jeff Young 508df402f6 Cleanup. 2022-08-19 18:54:19 +01:00
jean-pierre charras e0fbe2542f Fix a few compil and Coverity warnings. 2022-08-19 10:53:29 +02:00
Seth Hillbrand 5ed7e28252 Remove KICAD_OCC build option
We don't really support builds without OCC these days.  Removing to
clear up build flags and settings
2022-08-18 17:06:29 -07:00
qu1ck f4fa3b02c5 PCM: automatic check for repository updates 2022-08-18 20:41:43 +00:00
Wayne Stambaugh 898ec0d094 Fix wxWidgets 3.1 and later deprecated build warnings.
wxWidgets 3.1 has deprecated wxPATH_NORM_ALL when normalizing file
paths when calling wxFileName::Normalize().  This change keeps the
existing behavior except in places where our own internal
ExpandEnvVarSubstitutions() to expand environment variables.
2022-08-15 08:00:40 -04:00
Jeff Young 5c9aed62aa Use wxWidgets IDs for cut/copy/paste.
This allows them to work in places like search boxes in standard file
dialogs.  If wxWidgets doesn't find the standard IDs in our menus
then it won't enable them.
2022-08-07 11:28:16 +01:00
jean-pierre charras 4915f6ca20 Fix a few compil warnings 2022-07-30 14:06:51 +02:00
jean-pierre charras 4d48376eae Fix some warnings detected by PVS-STUDIO (not used vars) 2022-07-26 16:00:14 +02:00
Mark Roszko 097f30a272 Move the PCM download cache to PATHS::GetUserCachePath
Second commit for https://gitlab.com/kicad/code/kicad/-/issues/10165
2022-07-22 14:40:55 +00:00
Marek Roszko a855be28fa Move the PCM cache to PATHS::GetUserCachePath
It still remains that on Windows, Documents can be bounded to network or cloud storage.
AppData\Local is intended for local PC caching.

Fix https://gitlab.com/kicad/code/kicad/-/issues/10165
2022-07-21 23:19:14 -04:00
Seth Hillbrand 93fb00d815 Protect the Kiway dereference
Also find a few more places where we are reaching into a new frame to
perform actions that need to have dialogs closed.

Running actions should also wait for the next cycle rather than being
immediately executed when we are calling into a new frame.  This allow
for the cleanup actions onClose() to happen prior to the next action
starting

Fixes https://gitlab.com/kicad/code/kicad/issues/11891
2022-07-14 11:37:45 -07:00
jean-pierre charras 4db72f2d55 Fix minor compil and Coverity warnings. 2022-07-07 12:38:34 +02:00
Seth Hillbrand 2f7de851f4 Remove variable shadows 2022-07-06 16:05:20 -07:00
qu1ck 955c5d039e PCM: package update functionality
Adds package update available state, package update operation and all
the corresponding logic around it to make updating package to another
version easy.
2022-07-06 22:37:21 +00:00
Seth Hillbrand 03c279ffd4 ADDED: Threadpool
Thread pools are long-lasting executors that have close to zero overhead
when launching new jobs.  This is advantageous over creating new threads
as we can use this for threading smalling jobs and smaller quanta.  It
also avoids the heuristics needed to determine the optimal number of
threads to spawn
2022-06-24 22:59:24 +00:00
Seth Hillbrand a852286eb5 Cleanup compile warnings 2022-06-21 17:04:56 -07:00
qu1ck 06028d5015 PCM: fix kicad version restriction logic
The json schema for packages implies that kicad min/max version
restriction takes major.minor.patch string but actual logic
only checks major and minor.

This fixes the logic to work with full major.minor.patch tuple.
Additionally the version max logic will substitute missing portions
with 999 for a reasonable default so that say 7.1 is still considered
as >= 7.1.5 when checking for max version.

Reported here
https://forum.kicad.info/t/updating-already-installed-plugins-using-content-manager/35532/5?u=qu1ck
2022-06-14 17:18:25 +00:00
Marek Roszko bccc2f5792 Fix LEGACYFILEDLG_NEW_PROJECT build error 2022-06-11 23:45:22 -04:00
Marek Roszko 415af260a4 Fix the naming of the kicad filedlg customize headers 2022-06-11 23:04:15 -04:00
Marek Roszko ff94d289c7 Move the eeschema standalone to the new save dialog 2022-06-11 22:06:42 -04:00
Marek Roszko 577f59f570 Add usage of the new filedlg customize api for improved windows file dialogs 2022-06-11 21:45:38 -04:00
Jeff Young cff52c70d0 Handle empty directories in template projects.
Fixes https://gitlab.com/kicad/code/kicad/issues/10191
2022-05-31 17:48:38 +01:00
Jeff Young 2f2c506926 Coding conventions. 2022-05-31 17:48:38 +01:00
jean-pierre charras 2701642b1b minor fixes and French translation update 2022-05-30 11:23:20 +02:00
canwail c44b15e9f5 PCM: remove redundant calculations on resize 2022-05-25 00:08:50 +00:00
qu1ck 3dd5600f95 Remove forward_declare in dialog_manage_repositories_base 2022-05-23 14:06:36 -07:00
qu1ck 0b7c79ea44 PCM: add "Add default" to manage repositories dialog
Allows to restore default repo url if it was removed.

Fixes #9588
2022-05-23 20:40:12 +00:00
Jeff Young fe17dca71f Remove programmer-oriented message that clobbers project path.
Fixes https://gitlab.com/kicad/code/kicad/issues/10749
2022-05-21 23:20:22 +01:00
qu1ck d252ce9026 PCM: Add "Open Package Directory" to main dialog
Fixes #10411
2022-05-13 05:15:46 -07:00
lulu731 f4f3638103 Adding drag and drop project file feature.
ADDED Drag and drop of project file from file explorer to Kicad manager window.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8146
2022-05-12 22:38:45 +00:00
Seth Hillbrand cdd0145490 Remove debugging cout
(cherry picked from commit e317818076)
2022-05-12 15:31:15 -07:00
Seth Hillbrand dedbcac3ae Enable/Disable the apply/discard buttons
When there are no pending actions, we should not show the user the
ability to apply/discard the pending actions.  This uses wxUpdateUI in
the correct manner, limiting it to only the elements being updated and
using the event actions to ensure we don't have a cascade

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

(cherry picked from commit 09a2d50e09)
2022-05-11 13:51:33 -07:00
Seth Hillbrand 40e0d06381 Don't wait after installing from ZIP
The extraction process completes prior to the call to KeepRefreshing(),
so we should only let it update once and close

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

(cherry picked from commit d9ec998ff0)
2022-05-11 11:42:43 -07:00
Jeff Young cc18c31cb5 Fix some layout issues in the Project Template Selector.
Fixes https://gitlab.com/kicad/code/kicad/issues/5222
2022-04-18 22:45:02 +01:00
Marek Roszko 392ed5fecd Add policy to enable/disable pcm 2022-04-12 10:08:34 -04:00
Marek Roszko f88e0481c8 Change the behavior of ACTION_MENU::Add to require clones if required outside the function
This reverts commit 2a5769607f.
2022-04-11 19:03:01 -04:00
Seth Hillbrand 2a5769607f Revert "Change the behavior of ACTION_MENU::Add to require clones if required outside the function"
This reverts commit 403992a6f4.
2022-04-11 11:39:03 -07:00
jean-pierre charras ac8e2d0768 Ensure "Open Recent" and "Clear files" menu titles are updated after language change. 2022-04-11 11:09:05 +02:00
Marek Roszko 403992a6f4 Change the behavior of ACTION_MENU::Add to require clones if required outside the function
Fix https://gitlab.com/kicad/code/kicad/-/issues/10994
2022-04-10 22:38:13 -04:00
Marek Roszko 5bb2cdf73d Revert "Stop leaking submenu items"
This reverts commit 34c70a51ea.
2022-04-10 22:33:43 -04:00
Marek Roszko 34c70a51ea Stop leaking submenu items
Our menu bar code is interestingly complex. But we were throwing away newly made menu items to the void in the cases of constructed on the fly submenus
2022-04-10 22:04:48 -04:00
Jeff Young 08b7842c03 Fix compile warnings. 2022-04-10 17:29:47 +01:00
Jeff Young c4b6801f3a Improve some strings and measurements.
Fixes https://gitlab.com/kicad/code/kicad/issues/10482
2022-03-03 22:40:18 +00:00
Jeff Young 8d28fe962f Don't rename archives when doing a project save-as.
Fixes https://gitlab.com/kicad/code/kicad/issues/10184
2022-02-27 23:15:07 +00:00
jean-pierre charras 898d0e42cc Kicad manager: fix a typo 2022-02-21 17:28:29 +01:00
jean-pierre charras 0cc47d98f5 Kicad manager: show *.zip files in project tree. 2022-02-21 12:54:43 +01:00
Marek Roszko d9c04da407 Sprinkle in some make_unique 2022-02-05 21:26:36 -05:00
Wayne Stambaugh 00ba580915 Don't create new project on save as when project file already exists.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10625

(cherry picked from commit c875af48e7)
2022-02-05 12:00:54 -05:00
jean-pierre charras 1440c0a2d2 minor fix 2022-02-01 18:07:14 +01: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
Marek Roszko 8030bf1cc4 Implement use of the kicad nightly icon where needed 2022-01-23 09:21:07 -05:00
Seth Hillbrand fd9d923bb7 Do not call SafeYield on close
wxSafeYield() is not "safe".  Pending actions may include deletion of
the currently active class.  This will cause crashes when exiting.  If
needed for specific behaviors, we should use wxSafeYieldFor( flag ) with
the appropriate events specified rather than a general yield which can
cause more problems

(cherry picked from commit 9864337914)
2022-01-06 12:36:51 -08:00
qu1ck 211820a689 Remove KICAD_PCM cmake option 2022-01-03 04:16:42 +00:00
qu1ck 721403eb0e PCM: sort installed packages by date 2022-01-03 04:14:17 +00:00
Simon Richter d25fe17b28 Bump minimum required CMake version to 3.11
Signed-off-by: Marek Roszko <mark.roszko@gmail.com>
2022-01-01 21:35:08 -05:00
Marek Roszko 3f711b8958 Add win32 VERSION_INFO resource blocks for the DLLs 2021-12-28 23:54:27 -05:00
Wayne Stambaugh fcc497509a Don't treat project Save As path as a path and file name.
The single string ctor of wxFileName treats the string as a path and file
name.  If there is a dot in the last path name, it assumes that the last
path is actually a file name and extension.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/10116
2021-12-26 17:02:54 -05:00
Jeff Young c3552a940a Make sure standard OK/Cancel buttons respond to current language.
Fixes https://gitlab.com/kicad/code/kicad/issues/9635
2021-12-24 18:13:11 +00:00
Jeff Young 84a9732497 PCM strings. 2021-12-24 18:13:06 +00:00
Jeff Young d28714167c All the preferences, all the time.
Fixes https://gitlab.com/kicad/code/kicad/issues/7877

Fixes https://gitlab.com/kicad/code/kicad/issues/5153
2021-12-24 13:08:44 +00:00
jean-pierre charras 40752afafd DIALOG_TEMPLATE_SELECTOR: Force display refresh after selecting a path
For some reason the panel showing the templates did not show the new selection
Fixes #10106
https://gitlab.com/kicad/code/kicad/issues/10106
2021-12-24 11:40:20 +01:00
Seth Hillbrand a4db439cf8 Move quitting flag to manager quit
The flag is to protect against the frame going out of scope with the
references intact.  This shouldn't be in CloseProject because we close
the project without removing the frame.  Instead, placing it in OnExit
gets set correctly when closing the whole project manager

Fixes https://gitlab.com/kicad/code/kicad/issues/10018
2021-12-17 13:10:27 +00:00
jean-pierre charras 0f728e4d67 Fix some issues in PCM code.
Try to fix 9955, due to a problem with WX_PROGRESS_REPORTER (issue with its parent)
Fixes #9955
https://gitlab.com/kicad/code/kicad/issues/9955
2021-12-12 18:25:31 +01:00
jean-pierre charras 3a04a1ee64 Fix incorrect use of NULL (aka nullptr on wxWidgets) instead of 0 2021-12-12 09:09:50 +01:00
Jeff Young 329f00acdc Fix logic error in Save As recursion guard.
Fixes https://gitlab.com/kicad/code/kicad/issues/9916
2021-12-09 17:04:40 +00:00
jean-pierre charras 0ba11e9856 Kicad manager: minor cosmetic enhancement: show a busy cursor when launching an editor 2021-12-06 20:03:31 +01:00
Ian McInerney ab797d191f Disregard the project manager window size on migration
An old size for the window could cut off the PCM button if it were
migrated, so to ensure the button is visible, just always use a fresh
window size on migration.

Fixes https://gitlab.com/kicad/code/kicad/issues/9649
2021-12-03 01:43:53 +00:00
Seth Hillbrand 84cfa052a1 Unify KiCad Manager title bar versions 2021-11-29 16:19:37 -08:00
Jon Evans fca3367873 PCM: Disable actions while task manager is open
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9788
2021-11-27 08:46:19 -05:00
jean-pierre charras d03a13b8d8 Kicad and PCM: fix some (minor) issues:
- do not use KICAD_MANAGER_CONTROL::Execute() to run PCM: it is not an external app.
- add a workaround to avoid keeping incorrect focus on buttons in PANEL_KICAD_LAUNCHER.
Fixes #9780
https://gitlab.com/kicad/code/kicad/issues/9780
2021-11-26 10:52:52 +01:00
qu1ck 78aa76d0e6 PCM: reuse download prrogress dialog 2021-11-25 21:23:23 +00:00
Jon Evans 250de83bf2 Prevent divide-by-zero in DIALOG_PCM_PROGRESS 2021-11-25 16:23:16 -05:00
Jeff Young ba6ae4fa9b Kicad has many plugins. This one is for the pcb. 2021-11-25 12:56:46 +00:00
Wayne Stambaugh 802cfc1a7d Don't allow project files to be renamed or deleted in project tree pane.
This prevents any potential breakage of a project due to the file changes.
It is overly zealous because the project manager doesn't actually have any
knowledge of which files belong to the project.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9654
2021-11-19 11:39:24 -05:00
Jeff Young c01649fc6e Make it easier to open legacy files. 2021-11-19 13:36:14 +00:00
jean-pierre charras cc339e56a2 Kicad manager: fix a minor cosmetic issue when clicking on a launcher button.
- On GTK the next button was gaining the focus.
- On MSW the button disappears a bit of time.
Fixes #9676
https://gitlab.com/kicad/code/kicad/issues/9676
2021-11-18 13:44:23 +01:00
jean-pierre charras cf334b1ebb PCM: fix a minor cosmetic issue when resizing the dialog.
Fixes #9647
https://gitlab.com/kicad/code/kicad/issues/9647
2021-11-18 10:57:52 +01:00
Seth Hillbrand a699cccaaf Fix two string issues
Comp -> Compatible
Update string reference to changed string
2021-11-16 10:38:56 -08:00
Seth Hillbrand f950d96324 Prevent dereferencing frame on exit
Processing a menu event for quitting results in the frame being
destroyed.  This crashes the program when it tries to access the newly
freed frame to check for autosave data.  We bind the closing flag into
the base program which will be the last item freed on exit to ensure we
can correctly check for data loss

Fixes https://gitlab.com/kicad/code/kicad/issues/8638
2021-11-15 10:07:28 -08:00
qu1ck 6264dd40ea PCM: don't ignore schema validation errors 2021-11-15 13:46:05 +00:00
qu1ck 2340f82091 Fix empty space in pcm packages view 2021-11-15 10:44:17 +00:00
Jeff Young 47cb7f53fd Stope event propagation when closing project.
Fixes https://gitlab.com/kicad/code/kicad/issues/8638
2021-11-15 00:13:09 +00:00
qu1ck 338d13c1b5 PCM models -> 3dmodels 2021-11-14 15:08:28 -08:00
Jeff Young 5da876af26 Another attempt to fix the inactive scrollbar on GTK.
Fixes https://gitlab.com/kicad/code/kicad/issues/9559
2021-11-14 20:47:25 +00:00
Jeff Young 9bb5310fa5 Implement distructive-button-spacing as per Mac UI guidelines. 2021-11-14 20:33:32 +00:00
Jeff Young 66d9e7073f More discrete borders for Kicad mgr, PCM and appearances panels.
Fixes https://gitlab.com/kicad/code/kicad/issues/9616
2021-11-14 15:01:44 +00:00
Jeff Young 36fd62ccdc Another round of beautification changes for PCM.
Fixes https://gitlab.com/kicad/code/kicad/issues/9616
2021-11-14 13:11:19 +00:00
qu1ck bef43f975d Increase pcm package id allowed length to 100 2021-11-13 13:34:15 -08:00
Jeff Young e3ddc412d2 Better selection colour for PCM packages. 2021-11-13 19:45:10 +00:00
Mikolaj Wielgus 0b59246279 PCM: Select the preferred version first in version grid 2021-11-13 18:02:16 +00:00
Mikolaj Wielgus 0e4e9206ff PCM: Make version grid only selectable by rows, not individual cells
And select the first row from the top by default.
2021-11-13 18:02:16 +00:00
Mikolaj Wielgus 00aa4f3393 PCM: Disable Download, Install buttons when they're non-functional
Fixes https://gitlab.com/kicad/code/kicad/issues/9584
2021-11-13 18:02:16 +00:00
jean-pierre charras b3d44515c9 PCM: call finishDialogSettings(); to run sizer final calculations in dialogs 2021-11-13 15:21:43 +01:00
Jeff Young 2f99621bd3 Fix some layout issues; change packaage highlight scheme. 2021-11-13 11:21:29 +00:00
Mikolaj Wielgus 921105330a Remove printing files from Project Manager 2021-11-12 20:18:32 +00:00
Mikolaj Wielgus aa0a00dee7 PCM: Auto select on download/install if there is only one version 2021-11-12 19:05:27 +00:00
Jeff Young 2515948a7b Jiggle things around to have fewer fixed sizes.
Also adds some code to re-calc the package panel heights to
hopefully get around larger fonts getting clipped.
2021-11-12 15:31:41 +00:00
Jeff Young 43b840d9d2 Clean up download progress vs package progress vs overall progress. 2021-11-12 11:18:11 +00:00
Jeff Young a22dd614b0 Fix type that can lead to deadlock. 2021-11-12 10:49:14 +00:00
Jeff Young 0b48876ce5 Decouple left and right pane minimums for splitter window. 2021-11-12 02:12:44 +00:00
Jeff Young faabcc079a Sniff URLs in descriptions and be more defensive re MSW scrolling. 2021-11-12 00:39:47 +00:00
Jeff Young f9bbaed7a1 Enable URLs in PCM metadata.
Going to HTML_WINDOW also sidesteps the bullet size issue between
platforms.
2021-11-11 23:42:28 +00:00
Jeff Young 8777135d9f Try to make window backgrounds the same on Windows.
Also reduces the use of auto.
2021-11-11 14:02:40 +00:00
Jeff Young c3c2af9cd0 Improve bullets on Mac & GTK; improve scrollbar behaviour on MSW. 2021-11-11 11:33:28 +00:00
Jeff Young 78bedbed93 Update progress during InstallFromFile. 2021-11-11 10:17:53 +00:00
Jeff Young cc938e7a67 Fix a few issues in the PCM dialog tune-up. 2021-11-11 01:03:07 +00:00
qu1ck 54e9f1cf24 Fix pcm fallback loading
Need to add a fake version otherwise the package gets filtered out of
the packages view.
2021-11-10 23:48:54 +00:00
Jeff Young b408cda0b8 Uninitialized variables. 2021-11-10 23:42:33 +00:00
qu1ck d9bd7ed2c1 Fix incorrect include 2021-11-10 15:06:11 -08:00
Jeff Young 59e5c836fc Tighter thread safety for PCM progress dialog. 2021-11-10 22:12:22 +00:00
Jeff Young 7b4d5b2312 Fix wxWidgets annoying assert. 2021-11-10 18:29:43 +00:00
Jeff Young f036243142 Fix a few minor issues in PCM dialogs. 2021-11-10 16:19:13 +00:00
Jeff Young 5c0befa880 Use sdbSizer so buttons are in right platform order. 2021-11-10 13:32:10 +00:00
Jeff Young 7211c5a350 Kicad look & feel and reduce conceptual nesting depth of PCM. 2021-11-10 12:42:54 +00:00
qu1ck 97a4034d95 Coverity report and compile warning fixes 2021-11-10 03:24:14 +00:00
Jon Evans 89f5842a17 PCM: Fix loading bitmaps from installed packages 2021-11-09 21:44:57 -05:00
Jon Evans 8e2d599751 Allow PCM to load schema from build dir 2021-11-09 21:44:40 -05:00
Mikolaj Wielgus ae37ae7072 PCM: Prevent crash on clicking "Install" when there is no versions
Fixes https://gitlab.com/kicad/code/kicad/issues/9585
2021-11-10 02:19:17 +00:00