← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] Handle STEP export properly on MacOS when launched from standalone pcbnew.

 

Yes, that’s more or less what I made long ago.

Basically everything is packed into the main kicad app.
This was done to have all the dependencies only in one place.

There is just one kicad app.
"Apps" like pcbnew are not really apps, but it is main kicad binary/executable (project manager) which loads the pcbnew.kiface “plugin”.
The “standalone” apps are not really standalone sub-bundles.
They just contain a single small standalone binary which again pull in the xxx.kiface plugins/libs.
You cannot move the “standalone" (sub-)applications like pcbnew out of this package as it would break (relative) linkage for the standalone case.

So, I think wrt this idea it is correct where things are right now.

This was a design decision back then and mimics what happens on Linux/Windows.
There, the pcbnew binary also is not really a standalone pcbnew binary, but just a small wrapper that loads the pcbnew.kiface.

Of course, you could make a completely self-contained version of the standalone pcbnew app.
But, this means pulling all dependencies and all needed kicad “plugins” into it.
This means that bundles will get way bigger as you duplicate basically everything… might not be a problem nowadays.

What I don’t like about it is that if you have real bundles you are also free to move the individual parts around.
I could imagine that users can create a mess keeping version x of pcbnew here, having version y of kicad there, and so on.

And, it could make things worse with something like plugins.
I don’t know if everything is already cleanly implemented that all user plugin stuff is taken from some single user folder (except supplied stuff).
I read posts where users put stuff into the bundle (which is equivalent to putting to /usr/share on Linux)… yes, it shouldn’t be done, but they will be totally confused why they have to put it into 2 bundles...

So, the kicad notion of the “standalone” apps doesn’t really fit that one of a single application per bundle.
I think the only solution has been mentioned already on the list.
In my opinion it would the cleanest way to ditch these “standalone” apps.
Instead, offer options to open a pcb/schematic from project manager without a project.
Then, there is just one application (kicad aka the project manager) and everything is fine.
I don’t know if this is feasible with current architecture of kiface plugins.

@Adam:
What aspect of the sub-bundles causes problems with signing?
The bundles themselves or just the links?
How do you plan to “fix” this?


Regards,
Bernhard


> On 15. Jun 2018, at 06:58, Adam Wolf <adamwolf@xxxxxxxxxxxxxxxxxxxx> wrote:
> 
> The symlinked subbundles date back to the original KiCad mac packaging
> work, before V4 came out.  There is a pretty massive amount of code in
> our CMake and KiCad already that support how this works.  I think
> Bernhard was the main driver of this work, but I am not sure.
> Specifically, the relative paths are already in KiCad source at least
> 2 other time.  I am not sure why kicad2step got added the way it did.
> I was not involved.
> 
> Removing all of the symlinked subbundles is actually part of my V6
> work, because KiCad.app is not signable until it doesn't have these,
> but that's not a small undertaking.
> 
> Maybe Bernhard can weigh in more?
> 
> Adam Wolf
> On Thu, Jun 14, 2018 at 10:27 PM Seth Hillbrand
> <seth.hillbrand@xxxxxxxxx> wrote:
>> 
>> 
>> Hi Adam-
>> 
>> Is there a reason why the kicad2step is installed in the KiCad base application rather than the pcbnew application?  I didn't look into this in depth but I wonder if we can avoid code dealing with a specific packaging scenario?
>> 
>> Alternatively, we might put a variable in CMAKE defining where these applications are installed and reference that in the code.  Hard-coding the relative paths feels like asking for trouble.
>> 
>> Thoughts?
>> -S
>> 
>> 
>> Am Do., 14. Juni 2018 um 05:41 Uhr schrieb Adam Wolf <adamwolf@xxxxxxxxxxxxxxxxxxxx>:
>>> 
>>> Yeah, this is actually all over the source code.  I'm starting to collect a list of them for V6... but I shall say no more until I'm ready with V5 :)
>>> 
>>> On Thu, Jun 14, 2018, 3:32 AM Nick Østergaard <oe.nick@xxxxxxxxx> wrote:
>>>> 
>>>> Ok.
>>>> 
>>>> 2018-06-14 9:37 GMT+02:00 Bernhard Stegmaier <stegmaier@xxxxxxxxxxxxx>:
>>>>> 
>>>>> I didn’t test this patch, but… something like a install prefix path is not valid for a bundle.
>>>>> A bundle is a self-contained entity and has no fixed location. You can put it wherever you want.
>>>>> So, everything has to be relative to main binary or bundle location.
>>>>> 
>>>>> 
>>>>> Regards,
>>>>> Bernhard
>>>>> 
>>>>> 
>>>>> On 14. Jun 2018, at 08:51, Nick Østergaard <oe.nick@xxxxxxxxx> wrote:
>>>>> 
>>>>> It seems a bit strange to be that relative paths like that has to be used, can't some cmake install prefix path be used wheni is a bundle? Is this also how it is done for other parts of kicad?
>>>>> 
>>>>> 2018-06-13 4:39 GMT+02:00 Adam Wolf <adamwolf@xxxxxxxxxxxxxxxxxxxx>:
>>>>>> 
>>>>>> Hi folks!
>>>>>> 
>>>>>> This patch is meant to fix a crash Seth found when exporting STEP from
>>>>>> standalone pcbnew on macOS.
>>>>>> 
>>>>>> Thanks!  My apologies for having this so late in the cycle.  this is
>>>>>> going to be an amazing release for everyone, especially macOS users!
>>>>>> 
>>>>>> Adam Wolf
>>>>>> 
>>>>>> _______________________________________________
>>>>>> Mailing list: https://launchpad.net/~kicad-developers
>>>>>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>>>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>> 
>>>>> 
>>>>> _______________________________________________
>>>>> Mailing list: https://launchpad.net/~kicad-developers
>>>>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>> 
>>>>> 
>>>> 
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help   : https://help.launchpad.net/ListHelp
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp



References