distributing my sources: resources are not packed and other woeeesss!!!
-
Hello,
I am trying to create an archive of the sources of my project to distribute to other computers for compiling and installing. I (naively) assumed that this can be done using
make dist
this is a typical target of autotools and a very convenient too as it allows to create an archive for source distribution. "make dist" ideally should pack all sources and pro files and everything for migration to a new computer where un-archiving and make install would suffice to re-make the project.
Now, I am bewildered because whenever a lot of posts tagged with "make dist, qmake qt" mention that this is only working for unixes and is not something common. Maybe I misunderstand something but "make dist" in any OS is the ultimate source distribution operation. Isn't that right?
Anyway, so I proceeded in "make dist" without making any special changes to my pro file. That was under a linux system.
It did well. But unfortunately it did copy some root-owned files (/usr/lib64/qt5/...) to the distrubution using the usual "cp" command without the switch " --no-preserve=mode" and so all files are copied with their original mode which causes later "rm -rf .tmp" to fail. That's easily fixed. And even if it is not fixed, the archive is created and it fails only at the cleaning up.
Now, my main problem is to tell qmake that I want my resources in src/resources (which contains jpg, gif and mp4 files, in various subdirs) to be included too. So that the received of my distribution can build the executable just like I can. Unfortunately I could not achieve this. And I am seeking for help.
So, to summarise:
- if anyone from qt development is listening, please at "--no-preserve=mode" to the flags to any copy command issued to create a distribution
- please enlighten me as to how to include resources (and possibly other files, like README.txt, docs dir, etc.) to the distribution
- Please PLEASE understand that "make dist" is not a "unixy thing" like I saw mentioned in several comments on the net. "make dist" is THE way to distribute a project to other people and existed long long before github existed. "make dist" creates an archive with all the requirements to build the project in a foreigh machine. So, if anyone from qt-development is listening, we need this feature and we need it to be versatile so with just a "make dist" i pack my project for compiling in a windows or OSX machine.
Right now, can anyone tell me how to include resources and documentation to a distribution archive created using "make dist"?
Many Thanks,
a -
- if anyone from qt development is listening, please at "--no-preserve=mode" to the flags to any copy command issued to create a distribution
Hi @bliako, this forum is maily for users of Qt; you can post bugs and feature requests at https://bugreports.qt.io/
Alternatively, you can submit a patch. qmake is open-source: https://code.woboq.org/qt5/qtbase/qmake/
- please enlighten me as to how to include resources (and possibly other files, like README.txt, docs dir, etc.) to the distribution
- Please PLEASE understand that "make dist" is not a "unixy thing" like I saw mentioned in several comments on the net. "make dist" is THE way to distribute a project to other people and existed long long before github existed. "make dist" creates an archive with all the requirements to build the project in a foreigh machine.
Qt supports CMake too; try CMake (instead of qmake) and see if the generated Makefiles work better with
make dist
.Alternatively, a crude way is to simply create a tarball directly from your source and resource directories.
Finally, I understand that
make dist
was the primary way of distributing sources long before GitHub existed, but would you be nonetheless willing to try other methods of distribution? Source control has also existed long before GitHub existed (CVS, Perforce, Subversion, Mercurial...); it also serves as a project management and backup/history tool. Users just need to checkout their selected vesion of your project, and all of the relevant files will be loaded onto their computer.