Closed probonopd closed 5 years ago
The default way to build is now CMake.. the old Makefile still remains, because, well, it works and someone might prefer it. But I don't intend to maintain it beyond trivial changes. So, feel free to change how it installs with a PR.
Oh, if this is for the AppImage, then it would be best if that was generated thru a CMake build.
I am using CMake...
Ah sorry did not spot that. I'm going to remove the old Makefile to end the confusion.
Please reopen. make install
should install things in a FHS structure, not in random places. Trying to work around this has already cost me over an hour now.
Sorry, I am not familiar with what is required to make CMake work with this FHS structure, and like I said, the code expects files it needs relative to the exe. That's how TreeSheets has worked for the past 10 years on Linux. I am open to changing it if that is better for Linux, though the current structure is what is required for the other OSes (Windows & OSX) which also keep exe and data files in one place.
D'oh, make install
does not even strip and set executable the binary. Anyway, I now have worked around everything and the AppImage should become available soon for testing.
I am open to changing it if that is better for Linux, though the current structure is what is required for the other OSes (Windows & OSX) which also keep exe and data files in one place.
Yes, I am not the biggest fan of how "Linux" is doing things (FHS) either, hence AppImage exists - everything neatly inside one file :-)
Well, hurray for AppImages then. So if AppImages keep things neatly together, why is make install
even needed then? All the files it needs are already in place in TS
before make install
.
Most (almost all) applications written for Linux have make install
that puts things into the "usual" locations. There are tools that take the ingredients from there and put them into a single-file AppImage almost automatically. For this to be automagic, we need to pick things up from "the usual locations".
Anyhow, if no other Linux users have requested make install
to work as "usual", then I think this can be closed again here, since we seem to have a working workaround as far as AppImage is concerned.
This is how voidlinux installs treesheets:
do_install() {
sed \
-e "s|%PKGNAME%|${pkgname}|" \
-e "s|%EXENAME%|${pkgname}|" \
${FILESDIR}/treesheets.sh.in > ${wrksrc}/treesheets.sh
vbin ${wrksrc}/treesheets.sh treesheets
vlicense ${wrksrc}/ZLIB_LICENSE.txt
vmkdir usr/lib/${pkgname} 755
vcopy ${wrksrc}/TS/docs usr/lib/${pkgname}
vinstall ${wrksrc}/TS/readme.html 644 usr/lib/${pkgname}
vcopy ${wrksrc}/TS/examples usr/lib/${pkgname}
vcopy ${wrksrc}/TS/images usr/lib/${pkgname}
vinstall ${wrksrc}/src/treesheets 755 usr/lib/${pkgname}
vinstall ${wrksrc}/TS/treesheets.desktop 644 usr/share/applications
vinstall ${wrksrc}/TS/images/icon32.png 644 usr/share/pixmaps treesheets.png
vinstall ${wrksrc}/TS/images/icon16.png 644 usr/share/pixmaps treesheets-16x16.png
vinstall ${wrksrc}/TS/images/treesheets.svg 644 usr/share/pixmaps treesheets.svg
sed -i "s|Icon=images/treesheets.svg|Icon=treesheets.png|" ${DESTDIR}/usr/share/applications/treesheets.desktop
vdoc ${wrksrc}/TODO.txt
}
For whatever reason, make install
didn't work for me, and I just built this way instead.
make install
installs things in quite unusual locations.When using
I would expect to get something like
but this is what actually happens:
Build log: https://travis-ci.com/probonopd/treesheets/jobs/230979045