-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Refactor make install rules #373
base: master
Are you sure you want to change the base?
Conversation
I'm not quite satisfied with the platform detection; please let me know if there is a better way. |
1196a36
to
9c32462
Compare
I haven't tested the new rules on Darwin, but they should work almost the same if they are POSIX-compliant. I am unable to test that |
9c32462
to
d1fe216
Compare
Marking as a draft, since there is some logic included in the dpkg packages that isn't included anywhere else. |
d1fe216
to
54ae56e
Compare
The I have a variant of this branch that we could incorporate into this one. It:
if @MCJack123 wants that (I didn't want to include it in this PR without asking him first, since it looks distro-specific). |
54ae56e
to
5808e90
Compare
Frankly, I'm scared to touch any of the release code because it's a hassle to test properly, and any singular issue means I have to either a) delete the tag, fix the issue, and re-release (bad), b) do the work for whatever was missed myself (annoying), or c) ignore it and move on (very bad). It's working, so I don't really want to mess with it in such a significant way. This isn't an outright denial, but I'm not going to make a decision on it until I'm ready to dig down and get dirty in testing releases. If you want to help speed it up a bit, I'd appreciate a PR to https://github.com/MCJack123/craftos2-release-resources to update those scripts to work with this new process as well. You could also try testing releases in your own fork to really help me out - just mind the missing secrets and upload build steps that you'd have to remove. (Actually, thinking about it, I just barely was able to get macOS built last version by the skin of my teeth, so I have to rebuild all the macOS stuff anyway. I guess I can merge this once I work on that too.) |
Very understandable :)
Done at MCJack123/craftos2-release-resources#1.
I have been testing the entire build -> install workflow through the Nix package. It appears to work, but I can't speak for other distributions (or MacOS): Tree output of Nix package output
|
1804909
to
c35ff09
Compare
The Apport code and configuration is now included here and is installable with the |
da3f237
to
383328d
Compare
47d87a7
to
eb4bb9c
Compare
Icons ended up in ``resources/linux-icons``. CraftOS-PC.desktop is in ``resources`` since it's not an icon. The appimage workflow has been updated to accomodate this new change. Discussion: https://discord.com/channels/795376232958656564/796330457502580746/1280733785570410497
This is extremely useful for debugging problems in Makefiles.
This refactor aims to reduce the amount of duplicated Bash code that is used in all of the distribution packages (dpkg, AUR, COPR, and Nixpkgs). * Introduce install-linux and install-darwin targets, which are automatically selected by make where appropriate. * install-linux installs icons and the CraftOS-PC.desktop file. * install-darwin installs CraftOS-PC.app to /Applications. * Introduce install-bin, install-liblua, extra-install-headers, and extra-install-linux-plugin targets, which install the respective components. * Introduce fixup-liblua-path target, which uses patchelf to change the name of liblua.so (this patching appears to be common across all packages). * Significantly change the DESTDIR variable. It is now used as a prefix for everything, instead of just the binary. * Introduce the INSTALL_TARGETS variable, which is used to control what dependencies the install rule has. * Introduce the EXTRA_PLATFORM_INSTALL_TARGETS variable, which is conditionally set depending on the platform. * Introduce the LIBLUA_NAME variable, which is used to control what file patchelf changes liblua.so from. This refactor **does not** include code to install craftos2-rom, since that appears to be out-of-scope. [1]: https://www.gnu.org/software/autoconf/manual/autoconf-2.63/html_node/Installation-Directory-Variables.html
This is part of the AppImage build workflow, but it has been turned into a generic Make rule in case a package wants the AppStream-friendly files.
eb4bb9c
to
fb89079
Compare
REUSE headers have been added to all files that are created in this PR, to make integrating with #374 easier. |
This refactor aims to reduce the amount of duplicated Bash code that is
used in all of the distribution packages (dpkg, AUR, COPR, and Nixpkgs), since the code is the same across all packages (with some minor variations to account for the customs of the distributions).
This PR is definitely easier to review by viewing the commits step-by-step. I tried to explain the rationale for all of my changes.
I would definitely appreciate a review from @LeMoonStar and @MCJack123, who maintain the COPR and AUR+dpkg packages, respectively.
Migration guide
This is based on a private conversation between myself and @LeMoonStar.
liblua.so
, including the patchelf invocation(s).liblua.so
is now installed tolibcraftos2-liblua$(LIBEXT)
; make sure to add a symlink to that location from non-standard locations if you your distribution has stability guarantees.desktop
file installationmake extra-install-headers
if you want them in the main package)ccemux
plugin (make sure to domake extra-install-linux-plugin
if you want it in the main package)extra-install-apport
if you want it)make install
in the package, possibly with some additionalextra-install-*
invocations depending on your preferences and the preferences of your distribution.