PR #4054 broke the macOS CI for pull requests and the nightly builds.
As a follow-up requested in the PR this is an attempt to fix it.
* Add a parameter to `configure.am` to define a build-time variable for
use in `Makefile.am` to specify the executables we will be depending
upon for the `dosbox-x.app` rule.
* Fix an issue in the first library scan section of the `dosbox-x.app`
rule in the `Makefile` causing a failure to build on an Apple Silicon
mac when there is no `x86_64` binary present.
* Fix failure to build SDL1 variant after a previous SDL2 build attempt
by deleting `vs/sdl2/linux-host` before attempting the SDL1 build.
* Use `make clean` instead of `make distclean` in the build scripts'
`do_cleanup` function to not clean absolutely everything.
* Make sure we remove the achitecture-specific copies we create of the
`dosbox-x` executable before building, as these are meant to be
used for the universal binary creation with `lipo` and the presence
of an old copy will cause the `dosbox-x.app` bundle to potentially
contain mismatched copies for each architecture, or contain an
architecture that is not intended to be included.
* Add a `distclean-local` rule to `src/Makefile.am` to remove the
architecture-specific temporary copies of the `dosbox-x` executable
when running `distclean` as these shouldn't remain in the tree.
Signed-off-by: Dani Llewellyn <dani@bowlhat.net>
* Add both arm64 and x86_64 binaries to the App Bundle if they are present. If only one architecture is present then it should still build a single-architecture App Bundle
* Search for both arm64 and x86_64 dylibs separately and put them in architecture-specific subfolders
* If both arm64 and x86_64 executables are present, then combine them into a Universal Binary with `lipo`, otherwise move the single architecture executable available to the right place
Signed-off-by: Dani Llewellyn <dani@bowlhat.net>
Use reverse DNS naming for .desktop and .metainfo.xml as your
supposed to do nowadays according to freedesktop.org.
This also happens to match what is mandated by flatpak, so it
simplifies the flatpak post install script a little.
+ cleanup the mess that flatpak builds can leave behind when you
do a clean.
I found that the icon used by DOSBox-X comes from
https://www.vogons.org/viewtopic.php?p=79575#p79575
Which apart from Windows and Mac icons also included a SVG icon
which is preferred on Linux, and looks nicer. So add the SVG icon
and update 'make install' and make-rpm.sh to use it.
The SVG icon is placed in contrib/icons
p.s. I found that the tar operation in make-rpm.sh blindly assumes
the directory containing the tree to be named "dosbox-x", instead
of just the current directory, it effectively will tar
../dosbox-x even if your in, say, dosbox-x.clone to keep different
trees apart... I did not change this for now, but it is something
to watch out for.
The general idea is to clean up the root directory of the tree
a bit, and to possibly prepare to support flatpak in the future
without adding more files to the root.
Both "make install" and make-rpm.sh worked after these changes.
My idea was also to move src/dosbox.png to contrib/icons/dosbox-x.png
And to move any Windows and macOS specific packaging files to
contrib/windows and contrib/macos respectively, but I will not do the
latter two myself as I cannot test it.
This is also similar to how dosbox-staging has it's tree layout.
If there is no objection, I will however move src/dosbox.png and
update any references to it to point to the new location.