Re: [OSGeo-Discuss] How to set SHARE_DIR?
On Tuesday, October 6, 2020 6:01:45 AM EDT Mateusz Loskot wrote: > Forgive me if I'm a party killer, but why don't you request OSGeo SAC/Admins > to create a mailing list on https://lists.osgeo.org/ dedicated for your > project? This question is about any desktop application on a Unix system, or at least any built with CMake. It's not specific to PerfectTIN; I'm not asking how to handle a dot which, because of roundoff error, is not inside the triangle it's in. Would it make more sense to create a list for programming questions that are not specific to an application? Pierre -- Lanthanidia deliciosa: What the kiwifruit would be if it weren't so radioactive. ___ Discuss mailing list Discuss@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/discuss
Re: [OSGeo-Discuss] How to set SHARE_DIR?
On Tue, 6 Oct 2020 at 11:47, Pierre Abbat wrote: > > On Monday, October 5, 2020 11:04:36 PM EDT Jim Klassen wrote: > > I wouldn't expect someone to set CMAKE_INSTALL_PREFIX=$HOME. That just > > seems like a good way to cause issues to me. > > > > There is a ~/.local/share directory and a ~/.local/share/applications > > directory in my home directory that has desktop files in it. (That might > > imply using CMAKE_INSTALL_PREFIX=$HOME/.local is possible but that still > > seems like it is asking for trouble.) > > > > Standard practice is to put the files under > > ${CMAKE_INSTALL_PREFIX}/share/ unless the user specifically overrides > > that. I consider it hostile behavior when an installer or build system > > starts putting files outside of the path(s) that I have specified for it. > > I can make symlinks for files in ${CMAKE_INSTALL_PREFIX}/share to > > ~/.local/share/applications manually if I want to. > > My build directories are: Pierre, Forgive me if I'm a party killer, but why don't you request OSGeo SAC/Admins to create a mailing list on https://lists.osgeo.org/ dedicated for your project? This is "the public list to talk about the Open Source Geospatial Foundation (OSGeo) in general" with many subscribers who are not interested in programming or any other low-level technical trivias. Best regards, -- Mateusz Loskot, http://mateusz.loskot.net ___ Discuss mailing list Discuss@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/discuss
Re: [OSGeo-Discuss] How to set SHARE_DIR?
On Monday, October 5, 2020 11:04:36 PM EDT Jim Klassen wrote: > I wouldn't expect someone to set CMAKE_INSTALL_PREFIX=$HOME. That just > seems like a good way to cause issues to me. > > There is a ~/.local/share directory and a ~/.local/share/applications > directory in my home directory that has desktop files in it. (That might > imply using CMAKE_INSTALL_PREFIX=$HOME/.local is possible but that still > seems like it is asking for trouble.) > > Standard practice is to put the files under > ${CMAKE_INSTALL_PREFIX}/share/ unless the user specifically overrides > that. I consider it hostile behavior when an installer or build system > starts putting files outside of the path(s) that I have specified for it. > I can make symlinks for files in ${CMAKE_INSTALL_PREFIX}/share to > ~/.local/share/applications manually if I want to. My build directories are: ~/build/perfecttin/cdbg for the debug build (prefix $HOME), ~/build/perfecttin/crel for the release build (prefix $HOME), ~/build/perfecttin/cins for the release build (prefix /usr/local), ~/build/perfecttin/cafl for fuzzing (prefix $HOME, but installing disabled), and the same with 'g' instead of 'c', compiled with g++ instead of clang. I added a desktop file and installed it and the icon under $HOME, then symlinked ~/share/applications/perfecttin.desktop to ~/.local/share/applications/ perfecttin.desktop . It showed up in the menu, but had no icon and didn't run. I then installed under /usr/local and it worked perfectly. Apparently I should install under ~/.local/, but the only directory under ~/.local is share; ~/.local/bin, ~/.local/include, and ~/.local/lib do not exist. Should I add ~/.local/bin to PATH, or should I make symlinks in ~/bin/? Pierre -- li fi'u vu'u fi'u fi'u du li pa ___ Discuss mailing list Discuss@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/discuss
Re: [OSGeo-Discuss] How to set SHARE_DIR?
I wouldn't expect someone to set CMAKE_INSTALL_PREFIX=$HOME. That just seems like a good way to cause issues to me. There is a ~/.local/share directory and a ~/.local/share/applications directory in my home directory that has desktop files in it. (That might imply using CMAKE_INSTALL_PREFIX=$HOME/.local is possible but that still seems like it is asking for trouble.) Standard practice is to put the files under ${CMAKE_INSTALL_PREFIX}/share/ unless the user specifically overrides that. I consider it hostile behavior when an installer or build system starts putting files outside of the path(s) that I have specified for it. I can make symlinks for files in ${CMAKE_INSTALL_PREFIX}/share to ~/.local/share/applications manually if I want to. As an aside, I personally tend to install locally built applications under ~/apps/// where is something like GIS, and would be like QGIS or PDAL, and version is the release or the output of 'git describe --tags'. This lets me keep multiple versions of installed applications which is particularly useful for regression testing and/or ensuring a long job is completed using one version of a program while I can start new jobs with newer versions. I have a (git) versioned build.sh script for each application that does things like make directories, call cmake/make/make test/make install, and sometimes updates desktop files and module files (see the environment-modules Debian package). Occasionally I have special builds with custom patches for a particular task. These fit the structure too (they have a different git tag/hash). If build systems started messing around with files in ~/.local/share/applications behind my back, it would make a real mess of not being certain what build a desktop file was pointing to. On 10/5/20 8:56 PM, Pierre Abbat wrote: When installing an app from a package on Linux, the binaries go in /usr/bin/, the data files go in /usr/share//, and the desktop files go in /usr/share/ applications/. When installing from source, or installing from a package on DragonFly, the binaries go in /usr/local/bin/, the data files go in /usr/local/ share//, and the desktop files go in /usr/share/applications/. When I install it in my home directory, the binaries go in ~/bin/. The desktop files, however, go in ~/.local/applications/. Where should the data files go? I've been setting SHARE_DIR to ${CMAKE_INSTALL_PREFIX}/share/. If I put the desktop file in ${CMAKE_INSTALL_PREFIX}/share/applications/, that would be correct for a system-wide install, but wrong for a personal install. I checked SHARE_DIR in CMakeLists files seven levels deep (PDAL has some that are that deep), but found none that set SHARE_DIR to anything else. Is there another CMake variable that tells where desktop files go? One of the lines in the desktop file tells where the icon is. PerfectTIN has a 256×256 pixel icon. Do I have to shrink it for the desktop file? Pierre ___ Discuss mailing list Discuss@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/discuss
[OSGeo-Discuss] How to set SHARE_DIR?
When installing an app from a package on Linux, the binaries go in /usr/bin/, the data files go in /usr/share//, and the desktop files go in /usr/share/ applications/. When installing from source, or installing from a package on DragonFly, the binaries go in /usr/local/bin/, the data files go in /usr/local/ share//, and the desktop files go in /usr/share/applications/. When I install it in my home directory, the binaries go in ~/bin/. The desktop files, however, go in ~/.local/applications/. Where should the data files go? I've been setting SHARE_DIR to ${CMAKE_INSTALL_PREFIX}/share/. If I put the desktop file in ${CMAKE_INSTALL_PREFIX}/share/applications/, that would be correct for a system-wide install, but wrong for a personal install. I checked SHARE_DIR in CMakeLists files seven levels deep (PDAL has some that are that deep), but found none that set SHARE_DIR to anything else. Is there another CMake variable that tells where desktop files go? One of the lines in the desktop file tells where the icon is. PerfectTIN has a 256×256 pixel icon. Do I have to shrink it for the desktop file? Pierre -- ve ka'a ro klaji la .romas. se jmaji ___ Discuss mailing list Discuss@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/discuss