Docs and build fixes to run Diffuse on macOS

Here we strip away Linux-only stuff so devs
can create a local "Mac build".

There might be other Linux-only stuff that
are not needed on Mac still. Follow-ups are
welcome.
This commit is contained in:
Hugo Holgersson 2022-08-16 17:10:17 +02:00 committed by Romain Failliot
parent 993d8256da
commit bb998a8785
3 changed files with 46 additions and 28 deletions

View File

@ -1,5 +1,6 @@
pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
if build_machine.system() == 'linux'
desktop_file = i18n.merge_file(
input: 'io.github.mightycreak.Diffuse.desktop.in',
output: 'io.github.mightycreak.Diffuse.desktop',
@ -30,6 +31,7 @@ if appstream_util.found()
args: ['validate', appstream_file]
)
endif
endif
# Diffuse config file
conf = configuration_data()

View File

@ -8,7 +8,7 @@ Diffuse depends on these projects:
* PyPi
* Cairo and GObject Introspection development headers
* Meson
* Flatpak and Flatpak builder
* Flatpak and Flatpak builder (Linux only)
### Install the distribution dependencies
@ -35,6 +35,20 @@ sudo dnf install python-pip cairo-devel cairo-gobject-devel meson flatpak flatpa
_Note: Tested on Fedora 34_
</details>
<details>
<summary>Mac OS</summary>
On Mac, all deps can be fetched using [Homebrew](https://docs.brew.sh/).
```sh
brew install meson python3 py3cairo pygobject3 gtk+3
```
_Note: Tested on macOS 12.5 (Monterey)_
You don't need to use `pip` because the above `brew` command installs all dependencies.
</details>
### Install the project dependencies
To install the requirements just to execute the binary, run:
@ -72,7 +86,7 @@ To uninstall Diffuse:
flatpak remove io.github.mightycreak.Diffuse
```
### Build, test and install using Meson
## Build, test and install using Meson on Linux and Mac OS
Diffuse build system is meson.

View File

@ -10,4 +10,6 @@ subdir('data')
subdir('src')
subdir('po')
if build_machine.system() == 'linux'
meson.add_install_script('build-aux/meson/postinstall.py')
endif