Page MenuHomePhabricator

meson: support signing and installing
Needs RevisionPublic

Authored by bu5hm4n on Jan 8 2019, 7:27 AM.

Details

Summary

when a .dll file is signed, it can be installed using gac which means no
MONOPATH is not needed anymore. And the efl_mono library can be used by
a c# IDE like monodevelop.

Note: after the keyoption is used, the .dll will *not* be installed in
the normal /usr/share/lib directory.

In order to create a key you should be using the cli tool 'sn', further
instructions can be found at: https://www.mono-project.com/docs/advanced/assemblies-and-the-gac/

The resulting workflow for getting a signed dll installed in the gac is:

sn -k efl-key.key

meson [...] -Defl-sharp-key-file=./efl-key.key
ninja all
ninja install

in the c# application:

mcs [...] `pkgconfig --libs efl_mono`

./Application.exe

Diff Detail

Repository
rEFL core/efl
Branch
master
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 9409
bu5hm4n created this revision.Jan 8 2019, 7:27 AM

It seems that this patch has no reviewers specified. If you are unsure who can review your patch, please check this wiki page and see if anyone can be added: https://phab.enlightenment.org/w/maintainers_reviewers/

bu5hm4n requested review of this revision.Jan 8 2019, 7:27 AM
segfaultxavi added a comment.EditedJan 8 2019, 9:22 AM

It would be nice to provide some usage instructions in the task.
I understand this patch adds a meson option, which points to a file, but I do not know what file should I use.
Also, once installed in the GAC, how do I use the dll? No more pkg-config I guess?

Also, calling a dll a he is extremely sexist and offends me.

bu5hm4n updated this revision to Diff 18333.Jan 10 2019, 8:38 AM
bu5hm4n edited the summary of this revision. (Show Details)

update to review comments

@segfaultxavi so is this like good wine ? The longer it sits arround the better it gets ? What are we doing with this now ? :)

Honestly, I wanted to test this more thoroughly, since I have never used the GAC. But we are in the middle of a crunch period so nobody has the time...

On the other hand, this can only be harmful if you activate it by using the efl-sharp-key-file option, so it is not an immediate threat for anybody.

Let's push this, and see if problems crop up in the future when somebody tries to use this new feature :)

segfaultxavi requested changes to this revision.Jan 16 2019, 6:00 AM

Needs rebasing, though.

This revision now requires changes to proceed.Jan 16 2019, 6:00 AM
lauromoura added inline comments.Feb 8 2019, 9:10 AM
src/bindings/mono/meson.build
145

Instead of hardcoding /usr/, use the prefix variable from mono's pkg-config?

From the GAC docs, we have

The -package NAME option will surface the assembly (using a symbolic link) in /usr/lib/mono/NAME directory, which is a convenient assembly to pass to the compiler.

But running gacutil outputs

-package <NAME>
     Used to create a directory in prefix/lib/mono with the name NAME, and a
     symlink is created from NAME/assembly_name to the assembly on the GAC.
     This is used so developers can reference a set of libraries at once.
bu5hm4n marked an inline comment as done.Feb 8 2019, 9:47 AM
bu5hm4n updated this revision to Diff 19262.Feb 8 2019, 9:47 AM

no hardcoded paths

Ping everyone?

segfaultxavi accepted this revision.Feb 12 2019, 2:09 AM

On the other hand, this can only be harmful if you activate it by using the efl-sharp-key-file option, so it is not an immediate threat for anybody.

Let's push this, and see if problems crop up in the future when somebody tries to use this new feature :)

I stand by my previous comment :)

This revision is now accepted and ready to land.Feb 12 2019, 2:09 AM

I meant that you can land this, if that's what was puzzling you.

zmike requested changes to this revision.Fri, Mar 8, 5:20 AM

No longer applies.

This revision now requires changes to proceed.Fri, Mar 8, 5:20 AM