dupeguru/macos.md

56 lines
2.2 KiB
Markdown
Raw Permalink Normal View History

## How to build dupeGuru for macos
2022-03-27 21:04:37 -05:00
These instructions are for the Qt version of the UI on macOS.
2022-03-27 21:04:37 -05:00
*Note: The Cocoa UI of dupeGuru is hosted in a separate repo: https://github.com/arsenetar/dupeguru-cocoa and is no longer "supported".*
### Prerequisites
2022-03-15 05:09:58 -05:00
- [Python 3.7+][python]
- [Xcode 12.3][xcode] or just Xcode command line tools (older versions can be used if not interested in arm macs)
- [Homebrew][homebrew]
2022-07-06 22:40:36 -05:00
- [qt6](https://www.qt.io/)
#### Prerequisite setup
1. Install Xcode if desired
2. Install [Homebrew][homebrew], if not on the path after install (arm based Macs) create `~/.zshrc`
with `export PATH="/opt/homebrew/bin:$PATH"`. Will need to reload terminal or source the file to take
2021-05-07 02:40:08 -05:00
effect.
2022-07-06 22:40:36 -05:00
3. Install qt6 with `brew`. If you are using a version of macos without system python 3.7+ then you will
also need to install that via brew or with pyenv.
2022-07-06 22:40:36 -05:00
$ brew install qt6
2022-07-06 22:40:36 -05:00
NOTE: Using `brew` to install qt6 is to allow pyqt6 to build without a native wheel
available. If you are using an intel based mac you can probably skip this step.
4. May need to launch a new terminal to have everything working.
### With build.py
OSX comes with a version of python 3 by default in newer versions of OSX. To produce universal
builds either the 3.8 version shipped in macos or 3.9.1 or newer needs to be used. If needing to
2022-07-08 22:17:42 -05:00
build pyqt6 from source then the first line below is needed, else it may be omitted. (Path shown is
for an arm mac.)
$ export PATH="/opt/homebrew/opt/qt/bin:$PATH"
$ cd <dupeGuru directory>
$ python3 -m venv ./env
$ source ./env/bin/activate
$ pip install -r requirements.txt
$ python build.py
$ python run.py
### Generate OSX Packages
The extra requirements need to be installed to run packaging: `pip install -r requirements-extra.txt`.
Run the following in the respective virtual environment.
$ python package.py
This will produce a dupeGuru.app in the dist folder.
### Running tests
The complete test suite can be run with tox just like on linux. NOTE: The extra requirements need to
be installed to run unit tests: `pip install -r requirements-extra.txt`.
[python]: http://www.python.org/
[homebrew]: https://brew.sh/
2021-05-07 02:40:08 -05:00
[xcode]: https://developer.apple.com/xcode/