openstreetmap / merkaartor

Home of Merkaartor, an openstreetmap mapping program.
http://merkaartor.be/
Other
298 stars 78 forks source link

Setup Travis CI for different platform #253

Closed alicera closed 3 years ago

alicera commented 3 years ago

Could you tell me how to manage the project code with different platform? Prepareing three computer for linux, mac, windows.Then put the code in three computer? Thanks.

Krakonos commented 3 years ago

Do you mean for development? Sure, have a platform and follow instructions in: https://github.com/openstreetmap/merkaartor/blob/master/COMPILE.md

or do you mean generating installers? That's a bit more involved, but with cmake, there is a new target "package" that should do the job. so after building, just run "make package".

alicera commented 3 years ago

Thanks for your link. But I have another question. I see the https://github.com/openstreetmap/merkaartor/blob/master/COMPILE.md#linux The command is require the " $ sudo apt-get install qt5-default libqt5xml5 libqt5network5 libqt5gui5 libqt5svg5 libqt5webkit5 libqt5quick5 qtdeclarative5-dev qttools5-dev qtbase5-dev qtchooser "

If I package a .deb file, and I can just install it with double click. In installation process, I dont do anything include " apt install " , it install finish. Do you have any idea?

Krakonos commented 3 years ago

Well, this is different for each platform. For linux, this is also different by distribution. Knowing deb is not enough, as it is just a container - a package for your distribution needs to be built, though Merkaartor currently does not provide packages for individual distributions. An effort of using AppImage or similar tool exists, but has issues on it's own.

If you distribution does not provide Merkaartor in repositories, you can also try the snap package recently published by James Carroll: https://snapcraft.io/merkaartor-james-carroll

alicera commented 3 years ago

If my project use the command of “iostat” and I can install it with “sudo apt install sysstat” in my build environment. Make sure the project work. I cpack it to deb and call it A.deb.

Then, I put A.deb in another computer. I know the computer have no the “iostat”.

How can I trigger the “iostat install” when install the A.deb with double click?

Here is another example https://askubuntu.com/questions/58202/how-to-automatically-fetch-missing-dependencies-when-installing-software-from-d

P.S. iostat is a computer system monitor tool used to collect and show operating system storage input and output statistics. Note: Linux iostat Command to Report CPU and I/O Statistics are listed below:

iostat: Get report and statistic. iostat -x: Show more details statistics information. iostat -c: Show only the cpu statistic.

Krakonos commented 3 years ago

As I mentioned, Merkaartor does not support direct generation of deb package. In theory, you could add the feature to the cpack infrastructure, see cpack documentation for more details.

https://cmake.org/cmake/help/v3.6/module/CPackDeb.html

TL;DR: Adding DEB to CPACK_GENERATOR, perhaps like this (insert just before include(CPack))

if (UNIX)
set(CPACK_GENERATOR "DEB")
set(CPACK_DEBIAN_... ) # Set all necessary debian specific variables here, including dependencies.
endif()

If you end up going that route and end up with a decent package, consider creating a pull request.

Krakonos commented 3 years ago

I'm closing this issue due to lack of feedback and my belief it is not something we can address in merkaartor, short of the suggested route of using snap package. Feel free to reopen the ticket if you have additional questions and/or requests.