Install KPackages with kpackage_install_package
ClosedPublic

Authored by apol on Jul 15 2019, 2:22 PM.

Details

Summary

Removes a bunch of boilerplate CMake code and allows kpackage to do
some smart things, e.g. drops our runtime dependency on the
DesktopFileParser and we get to just use json directly.

Test Plan

Ran kwin, now it doesn't use the desktop to json translation path, everything still works.

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
apol created this revision.Jul 15 2019, 2:22 PM
Restricted Application added a project: KWin. · View Herald TranscriptJul 15 2019, 2:22 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
apol requested review of this revision.Jul 15 2019, 2:22 PM
zzag added a subscriber: zzag.EditedJul 15 2019, 2:31 PM

Is it possible to use kpackage_install_package inside of each effect's CMakeLists.txt file? The problem is that now "toplevel" effect directories contain only one directory - package. We should either keep CMakeLists.txt or flatten everything out (I'd prefer the former).

Is it possible to use kpackage_install_package inside of each effect's CMakeLists.txt file? The problem is that now "toplevel" effect directories contain only one directory - package.

how is having only one directory and one CMakeLists.txt better?

zzag added a comment.Jul 15 2019, 2:35 PM

how is having only one directory and one CMakeLists.txt better?

This will be a good example of how to structure third party scripted effects.

apol added a comment.Jul 15 2019, 6:39 PM
In D22474#495857, @zzag wrote:

Is it possible to use kpackage_install_package inside of each effect's CMakeLists.txt file? The problem is that now "toplevel" effect directories contain only one directory - package. We should either keep CMakeLists.txt or flatten everything out (I'd prefer the former).

I don't think that's a good idea. Then you're hiding the call for no reason.

We could consider moving all packages up, but that's also something that could have been done earlier and nobody did the change. It can be revisited in a different patch.

zzag added a comment.Jul 16 2019, 12:06 PM

It can be revisited in a different patch.

Why can't it be done in this patch?

but that's also something that could have been done earlier and nobody did the change

I assume that we followed common kpackage file structure.

apol added a comment.Jul 16 2019, 12:16 PM
In D22474#496273, @zzag wrote:

It can be revisited in a different patch.

Why can't it be done in this patch?

Because my goal is to fix how things are installed not to reorganise the repository.

but that's also something that could have been done earlier and nobody did the change

I assume that we followed common kpackage file structure.

No, we didn't.

zzag accepted this revision.Jul 16 2019, 12:18 PM
This revision is now accepted and ready to land.Jul 16 2019, 12:18 PM
This revision was automatically updated to reflect the committed changes.
zzag reopened this revision.Jul 16 2019, 2:52 PM

This change makes some autotests fail. Please fix it.

This revision is now accepted and ready to land.Jul 16 2019, 2:52 PM
zzag requested changes to this revision.Jul 16 2019, 2:52 PM
This revision now requires changes to proceed.Jul 16 2019, 2:52 PM
zzag added a comment.Jul 16 2019, 2:56 PM

You have to copy scripted effects to the build directory because CI doesn't do make install.

zzag accepted this revision.Jul 16 2019, 3:26 PM

fixed by D22490

This revision is now accepted and ready to land.Jul 16 2019, 3:26 PM
zzag closed this revision.Jul 16 2019, 3:26 PM