D7253: Add build-flatpak target if there is a flatpak recipe around
elvisangelaccio abandoned this revision. elvisangelaccio added a comment. In https://phabricator.kde.org/D7253#135251, @apol wrote: > Ugh my bad ^^', I don't know what happened. > > > The reason why I'm discussing this is that I think one of the advantages of Flatpak > > is that it makes it much easier to set up the build environment. Documented dependencies and tooling that integrates it. We need to leverage that rather than hiding it in the current state which while it works it's overly complex and part of a problem to solve. This is a good point indeed. REPOSITORY R240 Extra CMake Modules REVISION DETAIL https://phabricator.kde.org/D7253 To: elvisangelaccio, apol, #frameworks Cc: cgiboudeaux, #frameworks, #build_system
D7253: Add build-flatpak target if there is a flatpak recipe around
cgiboudeaux added inline comments. INLINE COMMENTS > KDECMakeSettings.cmake:361 > +function(_find_json_recipe json_recipe) > +execute_process(COMMAND git ls-files *org.kde.*.json > +OUTPUT_VARIABLE json find_package(Git) if(Git_FOUND) execute_process(COMMAND GIT_EXECUTABLE... else() print some message REPOSITORY R240 Extra CMake Modules REVISION DETAIL https://phabricator.kde.org/D7253 To: elvisangelaccio, apol, #frameworks Cc: cgiboudeaux, #frameworks, #build_system
D7253: Add build-flatpak target if there is a flatpak recipe around
apol added a comment. Ugh my bad ^^', I don't know what happened. > The reason why I'm discussing this is that I think one of the advantages of Flatpak is that it makes it much easier to set up the build environment. Documented dependencies and tooling that integrates it. We need to leverage that rather than hiding it in the current state which while it works it's overly complex and part of a problem to solve. REPOSITORY R240 Extra CMake Modules REVISION DETAIL https://phabricator.kde.org/D7253 To: elvisangelaccio, apol, #frameworks Cc: #frameworks, #build_system
D7253: Add build-flatpak target if there is a flatpak recipe around
elvisangelaccio added a comment. In https://phabricator.kde.org/D7253#134703, @apol wrote: > In https://phabricator.kde.org/D7253#134653, @elvisangelaccio wrote: > > > Main reason is having a simple way to run flatpak-builder with the proper arguments. Otherwise you have to copy-paste the command from somewhere (which could be error-prone). > > One usually already has a build folder around, so the idea is you change some code, build it as usual and then you run this target to quickly test the change in flatpak. > > > Note that this is forcing that the file is in the root directory, this doesn't need to be necessarily the case. In fact xdg-portal-kde-test has it in a subdir. > > This would already do what you're after: > `alias fb=flatpak-builder --force-clean --ccache --require-changes --repo=repo app $@` > > Such an alias/script could go in here: https://cgit.kde.org/kde-dev-scripts.git/ > > The reason why I'm discussing this is that I think one of the advantages of Flatpak Did you hit Submit too soon? :p Anyway, an alias certainly works, I can live with that. REPOSITORY R240 Extra CMake Modules REVISION DETAIL https://phabricator.kde.org/D7253 To: elvisangelaccio, apol, #frameworks Cc: #frameworks, #build_system
D7253: Add build-flatpak target if there is a flatpak recipe around
apol added a comment. In https://phabricator.kde.org/D7253#134653, @elvisangelaccio wrote: > Main reason is having a simple way to run flatpak-builder with the proper arguments. Otherwise you have to copy-paste the command from somewhere (which could be error-prone). > One usually already has a build folder around, so the idea is you change some code, build it as usual and then you run this target to quickly test the change in flatpak. Note that this is forcing that the file is in the root directory, this doesn't need to be necessarily the case. In fact xdg-portal-kde-test has it in a subdir. This would already do what you're after: `alias fb=flatpak-builder --force-clean --ccache --require-changes --repo=repo app $@` Such an alias/script could go in here: https://cgit.kde.org/kde-dev-scripts.git/ The reason why I'm discussing this is that I think one of the advantages of Flatpak REPOSITORY R240 Extra CMake Modules REVISION DETAIL https://phabricator.kde.org/D7253 To: elvisangelaccio, apol, #frameworks Cc: #frameworks, #build_system
D7253: Add build-flatpak target if there is a flatpak recipe around
elvisangelaccio added a comment. Main reason is having a simple way to run flatpak-builder with the proper arguments. Otherwise you have to copy-paste the command from somewhere (which could be error-prone). One usually already has a build folder around, so the idea is you change some code, build it as usual and then you run this target to quickly test the change in flatpak. REPOSITORY R240 Extra CMake Modules REVISION DETAIL https://phabricator.kde.org/D7253 To: elvisangelaccio, apol, #frameworks Cc: #frameworks, #build_system
D7253: Add build-flatpak target if there is a flatpak recipe around
apol added a comment. Interesting feature. I'm not opposed to it, but I have the feeling that it belongs to a different layer, so this means creating a build directory to call flatpak to call cmake. :P Also the arguments one passes to cmake won't have any effect on the flatpak. What's the reason you want to work on it? maybe we should work in simplifying the flatpak-builder call? REPOSITORY R240 Extra CMake Modules REVISION DETAIL https://phabricator.kde.org/D7253 To: elvisangelaccio, apol, #frameworks Cc: #frameworks, #build_system
D7253: Add build-flatpak target if there is a flatpak recipe around
elvisangelaccio added reviewers: apol, Frameworks. REPOSITORY R240 Extra CMake Modules REVISION DETAIL https://phabricator.kde.org/D7253 To: elvisangelaccio, apol, #frameworks Cc: #frameworks, #build_system
D7253: Add build-flatpak target if there is a flatpak recipe around
elvisangelaccio created this revision. Restricted Application added projects: Frameworks, Build System. Restricted Application added subscribers: Build System, Frameworks. REVISION SUMMARY If there is a `org.kde.*.json` file in the git repository of the cmake project, we assume is a flatpak recipe and we add an optional target that runs `flatpak-builder` on it. This way we don't have to copy `build.sh` scripts all over the place. TEST PLAN 1. git clone the ark repo 2. run cmake 3. make/ninja build-flatpak REPOSITORY R240 Extra CMake Modules BRANCH master REVISION DETAIL https://phabricator.kde.org/D7253 AFFECTED FILES kde-modules/KDECMakeSettings.cmake To: elvisangelaccio Cc: #frameworks, #build_system