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:
parent
993d8256da
commit
bb998a8785
|
@ -1,34 +1,36 @@
|
||||||
pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
|
pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
|
||||||
|
|
||||||
desktop_file = i18n.merge_file(
|
if build_machine.system() == 'linux'
|
||||||
|
desktop_file = i18n.merge_file(
|
||||||
input: 'io.github.mightycreak.Diffuse.desktop.in',
|
input: 'io.github.mightycreak.Diffuse.desktop.in',
|
||||||
output: 'io.github.mightycreak.Diffuse.desktop',
|
output: 'io.github.mightycreak.Diffuse.desktop',
|
||||||
type: 'desktop',
|
type: 'desktop',
|
||||||
po_dir: '../po',
|
po_dir: '../po',
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: join_paths(get_option('datadir'), 'applications')
|
install_dir: join_paths(get_option('datadir'), 'applications')
|
||||||
)
|
)
|
||||||
|
|
||||||
desktop_utils = find_program('desktop-file-validate', required: false)
|
desktop_utils = find_program('desktop-file-validate', required: false)
|
||||||
if desktop_utils.found()
|
if desktop_utils.found()
|
||||||
test('Validate desktop file', desktop_utils,
|
test('Validate desktop file', desktop_utils,
|
||||||
args: [desktop_file]
|
args: [desktop_file]
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
appstream_file = i18n.merge_file(
|
appstream_file = i18n.merge_file(
|
||||||
input: 'io.github.mightycreak.Diffuse.appdata.xml.in',
|
input: 'io.github.mightycreak.Diffuse.appdata.xml.in',
|
||||||
output: 'io.github.mightycreak.Diffuse.appdata.xml',
|
output: 'io.github.mightycreak.Diffuse.appdata.xml',
|
||||||
po_dir: '../po',
|
po_dir: '../po',
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: join_paths(get_option('datadir'), 'appdata')
|
install_dir: join_paths(get_option('datadir'), 'appdata')
|
||||||
)
|
)
|
||||||
|
|
||||||
appstream_util = find_program('appstream-util', required: false)
|
appstream_util = find_program('appstream-util', required: false)
|
||||||
if appstream_util.found()
|
if appstream_util.found()
|
||||||
test('Validate appstream file', appstream_util,
|
test('Validate appstream file', appstream_util,
|
||||||
args: ['validate', appstream_file]
|
args: ['validate', appstream_file]
|
||||||
)
|
)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Diffuse config file
|
# Diffuse config file
|
||||||
|
|
|
@ -8,7 +8,7 @@ Diffuse depends on these projects:
|
||||||
* PyPi
|
* PyPi
|
||||||
* Cairo and GObject Introspection development headers
|
* Cairo and GObject Introspection development headers
|
||||||
* Meson
|
* Meson
|
||||||
* Flatpak and Flatpak builder
|
* Flatpak and Flatpak builder (Linux only)
|
||||||
|
|
||||||
### Install the distribution dependencies
|
### 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_
|
_Note: Tested on Fedora 34_
|
||||||
</details>
|
</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
|
### Install the project dependencies
|
||||||
|
|
||||||
To install the requirements just to execute the binary, run:
|
To install the requirements just to execute the binary, run:
|
||||||
|
@ -72,7 +86,7 @@ To uninstall Diffuse:
|
||||||
flatpak remove io.github.mightycreak.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.
|
Diffuse build system is meson.
|
||||||
|
|
||||||
|
|
|
@ -10,4 +10,6 @@ subdir('data')
|
||||||
subdir('src')
|
subdir('src')
|
||||||
subdir('po')
|
subdir('po')
|
||||||
|
|
||||||
meson.add_install_script('build-aux/meson/postinstall.py')
|
if build_machine.system() == 'linux'
|
||||||
|
meson.add_install_script('build-aux/meson/postinstall.py')
|
||||||
|
endif
|
||||||
|
|
Loading…
Reference in New Issue