Skip to content
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

Port of Diffuse to macOS #165

Merged
merged 8 commits into from
Oct 23, 2022
Merged

Conversation

hugoholgersson
Copy link
Contributor

Hello there!

I understand this it the most up-to-date repo of Diffuse. It's nice to see that you have taken ownership and made it run with Python 3.

I have been using the tool since 2012, but on Linux. These days I often use macOS at work where I was missing Diffuse as my diff tool for git.

This is my basic port of Diffuse to macOS. Please take a look and accept.

/ Hugo

@hugoholgersson
Copy link
Contributor Author

@chenrui333, would you like to review this PR?

I ask you because I saw your brew formula in #145. It would be awesome to have Diffuse added to brew. I hope these build changes will make it a little easier.

This PR also gives Diffuse more native-macOS feel, including a Dock icon and keyboard shortcuts. Next step could be to port Diffuse to Gtk4 which seems to have better support for the macOS menubar, and other things.

@MightyCreak
Copy link
Owner

Ok! I'm taking a look (at last! 😅 )

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.
Tested on macOS 12.5:

  brew install meson python3 py3cairo pygobject3 gtk+3
  meson setup build
  cd build
  meson compile
  meson test
  meson install

After `meson install`, `diffuse` can be used to launch a
native Mac app that is installed into /Applications/Diffuse.app.

These steps could be put into a Homebrew formula, see
https://docs.brew.sh/Formula-Cookbook, as a way to
distribute Diffuse on macOS.
For example, on macOS, Cmd+F opens Find.
Ctrl+F is kept on other OSes. The same goes
for other standard key commands, like Cmd+S etc.
GTK on Mac needs a helper lib to be able to draw .svg files.
@MightyCreak
Copy link
Owner

I rebased your branch on master

@MightyCreak MightyCreak merged commit 5583ca0 into MightyCreak:master Oct 23, 2022
Copy link
Contributor Author

@hugoholgersson hugoholgersson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few minor post-land comments.

@chenrui333
Copy link

With this PR, the diffuse should be better put into homebrew-cask rather than homebrew-core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants