Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider switching to CMake for consistency with other Papyros projects #360

Closed
iBelieve opened this issue Jan 11, 2016 · 8 comments
Closed

Comments

@iBelieve
Copy link
Member

This would allow us to have a consisent build system across all Papyros projects, as well as letting us use any additional CMake features we might want to use in the future.

App developers: how would this affect you? Would CMake make it harder for you to use qml-material, especially on non-Linux platforms?

Also, how would this work with qpm (#358)?

@iBelieve iBelieve added this to the Version 0.3 milestone Jan 11, 2016
@marco-piccolino
Copy link
Contributor

@ibeliever I don't think this would affect mobile app developers very much. They way we internally use qml-material now is to just include the library into a .pri and .qrc file, and then it's the app's responsibility to do the compiling.
Installing qml-material at system level is a bad option for mobile developers, as the library would be included by Qt into all Android and iOS applications, even those not using it, so project-level inclusion is currently the way to go.
Same goes for qpm, it also leverages the project inclusion mechanism.

iBelieve added a commit that referenced this issue Jan 15, 2016
iBelieve added a commit that referenced this issue Jan 20, 2016
@nbigaouette
Copy link
Contributor

As @marco-piccolino mentioned, I do not install qml-material system-wide (even though I use cmake for my project), I include it in my project using a Qt resource file (.qrc).

For me, including a .qrc file in the project would be useful. I could then simply add qt5_add_resources() in my own CMakeLists.txt. For now I'm generating it by hand/automatically.

@marco-piccolino
Copy link
Contributor

@nbigaouette I am currently maintaining this qrc wrapper:
https://github.com/maply/org-qtmob-material-wrapper

It was written with qmake in mind but maybe it's useful to you too.
I agree that adding a .qrc (and a .pri) directly to the project would make things easier.

@iBelieve
Copy link
Member Author

Thanks for the feedback guys. It would be great if one of you could submit a pull request for a .qrc and .pri file, as I'm not as familiar with the way you use the project.

@marco-piccolino
Copy link
Contributor

@ibeliever I'm happy to do it
Il 20/gen/2016 03:20 PM, "Michael Spencer" [email protected] ha
scritto:

Thanks for the feedback guys. It would be great if one of you could submit
a pull request for a .qrc and .pri file, as I'm not as familiar with the
way you use the project.


Reply to this email directly or view it on GitHub
#360 (comment)
.

@nbigaouette
Copy link
Contributor

@marco-piccolino That's interesting! It seems more complicated than what is needed though. What I did was to create 3 .qrc files: Material.qrc, QtQuick.qrc, FontAwesome.qrc and FontRoboto.qrc. These files were generated automatically with a shell script that find the required files (see https://gist.github.com/nbigaouette/c0cbdeac54e8a23a3d0b for example).

What makes this "complex" to create (and hence the alias in there) is that the <file> tags should point to the required files with a path relative to where the .qrc file is located. In my case, they are not side-by-side qml-material and as such, I need to use the alias.

What would be better is to put the .qrc file(s) in the qml-material.git/modules directory, so the alias could be removed. But it/they would need to be automatically generated as to prevent missing any required files.

I personally prefer having the 4 resources files split; I don't necessarily want to include the fonts (which are big and slow to compile).

@marco-piccolino
Copy link
Contributor

@nbigaouette good points.
In order to update the qrc wrapper I take advantage of Qt Creator's
scanning capabilities based on file extensions to add qrcs - the same could
be done if more qrc files are needed.

Whatever we come up with, it should be something which makes it easy to
include the library on Windows hosts, where most users currently seem to
have issues, without any further processing other than including the qrc in
their project. So a script is fine, as long as it's run automatically e.g.
by the C.I..

Any ideas about what's the best approach?

2016-01-20 15:32 GMT+01:00 Nicolas Bigaouette [email protected]:

@marco-piccolino https://github.com/marco-piccolino That's interesting!
It seems more complicated than what is needed though. What I did was to
create 3 .qrc files: Material.qrc, QtQuick.qrc, FontAwesome.qrc and
FontRoboto.qrc. These files were generated automatically with a shell
script that find the required files (see
https://gist.github.com/nbigaouette/c0cbdeac54e8a23a3d0b for example).

What makes this "complex" to create (and hence the alias in there) is
that the tags should point to the required files with a path
relative to where the .qrc file is located. In my case, they are not
side-by-side qml-material and as such, I need to use the alias.

What would be better is to put the .qrc file(s) in the
qml-material.git/modules directory, so the alias could be removed. But
it/they would need to be automatically generated as to prevent missing any
required files.

I personally prefer having the 4 resources files split; I don't
necessarily want to include the fonts (which are big and slow to compile).


Reply to this email directly or view it on GitHub
#360 (comment)
.

@nbigaouette
Copy link
Contributor

Let's continue that discussion in #374.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants