Reword the documentation to take care of Mac OS too

This commit is contained in:
Romain Failliot 2022-10-23 16:32:04 -04:00
parent e8a7abb679
commit 6622792e71
5 changed files with 86 additions and 34 deletions

6
.markdownlint.json Normal file
View File

@ -0,0 +1,6 @@
{
"default": true,
"no-duplicate-heading": false,
"no-inline-html": false,
"no-emphasis-as-heading": false
}

View File

@ -63,34 +63,42 @@ For developer tools, run this one instead (it includes requirements.txt):
pip install -r requirements.dev.txt pip install -r requirements.dev.txt
``` ```
## Setup on Linux ## Setup
### Build, test and install using Flatpak ### Setup on Linux using Flatpak
To install Diffuse locally: #### Build, test and install
To build, test and install Diffuse locally:
```sh ```sh
flatpak install runtime/org.gnome.Sdk/$(uname -p)/42 flatpak install runtime/org.gnome.Sdk/$(uname -p)/42
flatpak-builder --user --install build-flatpak io.github.mightycreak.Diffuse.yml flatpak-builder --user --install build-flatpak io.github.mightycreak.Diffuse.yml
``` ```
#### Run
To run Diffuse through Flatpak: To run Diffuse through Flatpak:
```sh ```sh
flatpak run io.github.mightycreak.Diffuse flatpak run io.github.mightycreak.Diffuse
``` ```
#### Uninstall
To uninstall Diffuse: To uninstall Diffuse:
```sh ```sh
flatpak remove io.github.mightycreak.Diffuse flatpak remove io.github.mightycreak.Diffuse
``` ```
## Build, test and install using Meson on Linux and Mac OS ### Setup on Linux using Meson
Diffuse build system is meson. #### Build and test
To compile and test Diffuse: Diffuse is using Meson as its build system.
To build and test Diffuse:
```sh ```sh
meson setup build meson setup build
@ -99,55 +107,81 @@ meson compile
meson test meson test
``` ```
#### Install on system and run
To install Diffuse on your system (e.g. `/usr/local/`): To install Diffuse on your system (e.g. `/usr/local/`):
```sh ```sh
meson install # requires admin privileges meson install # requires admin privileges
```
# Run Diffuse To run Diffuse:
```sh
diffuse diffuse
``` ```
To install Diffuse on a custom directory (e.g. `~/bin/diffuse`): #### Install in a custom directory and run
Meson allows to change the default installation directories, see
[command-line documentation](https://mesonbuild.com/Commands.html#configure).
To install Diffuse in a custom directory (e.g. `~/bin/diffuse`):
```sh ```sh
meson install --destdir ~/bin/diffuse meson install --destdir ~/bin/diffuse
# Run Diffuse
cd ~/bin/diffuse/usr/local/bin
PYTHONPATH=$HOME/bin/diffuse/usr/local/share/diffuse ./diffuse
``` ```
To uninstall diffuse afterwards: To run Diffuse:
```sh
export PYTHONPATH=$HOME/bin/diffuse/usr/local/share/diffuse
cd ~/bin/diffuse/usr/local/bin
./diffuse
```
#### Uninstall
To uninstall Diffuse afterwards:
```sh ```sh
sudo ninja uninstall -C build sudo ninja uninstall -C build
sudo rm -v /usr/local/share/locale/*/LC_MESSAGES/diffuse.mo sudo rm -v /usr/local/share/locale/*/LC_MESSAGES/diffuse.mo
``` ```
Meson allows to change the default installation directories, see ### Setup on Mac OS
[command-line documentation](https://mesonbuild.com/Commands.html#configure).
## Setup on Mac OS #### Build and test
Building on Mac OS is similar to building on Linux. To recap, these are Diffuse is using Meson as its build system.
the steps needed to build and install Diffuse manually:
```brew install meson python3 py3cairo pygobject3 gtk+3 librsvg To build and test Diffuse:
```sh
meson setup build meson setup build
cd build cd build
meson compile meson compile
meson test meson test
meson install
``` ```
After `meson install`, the `diffuse` command can be used to launch Diffuse #### Install on system and run
as a native Mac app that is installed into `/Applications/Diffuse.app`.
The `diffuse` command is compatible with git. To use Diffuse as git's To install Diffuse on your system (e.g. `/usr/local/`):
`git difftool` run `git config --global diff.tool diffuse`
## Setup on Windows ```sh
meson install # requires admin privileges
```
To run Diffuse:
```sh
diffuse
```
_Note: The `diffuse` command can be used to launch Diffuse as a native Mac app_
_that is installed into `/Applications/Diffuse.app`._
### Setup on Windows (deprecated)
_Note:_ The Windows port is not maintained and would need some love. _Note:_ The Windows port is not maintained and would need some love.
Contributions are very welcome! 😉 Contributions are very welcome! 😉

View File

@ -19,16 +19,16 @@ few manual steps.
- data/usr/share/gnome/help/diffuse/*/diffuse.xml - data/usr/share/gnome/help/diffuse/*/diffuse.xml
- data/usr/share/omf/diffuse/diffuse-*.omf - data/usr/share/omf/diffuse/diffuse-*.omf
- utils/book2manual.xsl - utils/book2manual.xsl
3. Update CHANGELOG.md 4. Update CHANGELOG.md
- Add new line under `## Unreleased` following this syntax: `## x.y.z - YYYY-MM-DD` - Add new line under `## Unreleased` following this syntax: `## x.y.z - YYYY-MM-DD`
- Copy the content of the changes for this release - Copy the content of the changes for this release
4. Update AppData release notes in data/io.github.mightycreak.Diffuse.appdata.xml.in: 5. Update AppData release notes in data/io.github.mightycreak.Diffuse.appdata.xml.in:
- Create a new `<release>` tag under `<releases>`, fill the `version` and - Create a new `<release>` tag under `<releases>`, fill the `version` and
`date` attributes `date` attributes
- Create a new `<description>` tag under the new `<release>` tag - Create a new `<description>` tag under the new `<release>` tag
- Add one paragraph to sum the release in one sentence (e.g. highlights, ...) - Add one paragraph to sum the release in one sentence (e.g. highlights, ...)
- Paste the changes from the changelog and adapt it to HTML - Paste the changes from the changelog and adapt it to HTML
5. Create new branch and PR 6. Create new branch and PR
## Create new release on GitHub ## Create new release on GitHub

View File

@ -70,6 +70,7 @@ Use `update-translations.py` to validate one or more PO files.
Here is an example with `ja.po` and `ko.po`: Here is an example with `ja.po` and `ko.po`:
Command-line: Command-line:
```sh ```sh
./update-translations.py --check-only ja.po ko.po ./update-translations.py --check-only ja.po ko.po
``` ```
@ -99,8 +100,10 @@ POSIX platforms. The conversion tools insert some English text that gets
localized using search and replace. Manually add new search and replace rules localized using search and replace. Manually add new search and replace rules
to these files: to these files:
```text
../windows-installer/translations.txt ../windows-installer/translations.txt
../utils/translations.txt ../utils/translations.txt
```
The format of each line is: \<language id\>:\<English text\>:\<localised text\> The format of each line is: \<language id\>:\<English text\>:\<localised text\>

View File

@ -22,3 +22,12 @@ The Diffuse package statuses for every distributions can been seen on
Huge thanks to [@bongochong](https://github.com/bongochong) for maintaining the Huge thanks to [@bongochong](https://github.com/bongochong) for maintaining the
Diffuse package on Fedora. Diffuse package on Fedora.
## Integrate with Git
Diffuse is compatible with `git difftool` command-line. To use Diffuse as Git
diff tool, run:
```sh
git config --global diff.tool diffuse
```