nextcloud-desktop/admin/osx/mac-crafter
Claudio Cambra a2f07866f8 Clarify architecture setting has automatic default in mac-crafter readme
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-10-08 14:32:37 +02:00
..
Sources Codesign webengineprocess with correct entitlements on macOS with mac crafter 2024-09-30 11:54:10 +08:00
.gitignore Add mac-crafter Package.resolved to gitignore 2024-08-06 11:05:16 +02:00
Package.swift Fix dependencies for mac-crafter 2024-07-08 15:41:45 +08:00
README.md Clarify architecture setting has automatic default in mac-crafter readme 2024-10-08 14:32:37 +02:00

mac-crafter

A tool to easily build a fully-functional Nextcloud Desktop Client for macOS.

It will create the application bundle with the option to sign it, which is required by Apple when running and debugging the file provider module.

System requirements

  • Mac OS > 11
  • XCode
  • Python

Step by step usage

  1. Clone the desktop client in your mac OS
https://github.com/nextcloud/desktop.git
  1. Build the desktop client:
cd admin/osx/mac-crafter
swift run mac-crafter

3.1 Sign the application bundle by adding the following parameter: -c <Development or developer codesigning certificate name> The whole command will look like this:

swift run mac-crafter -c "Apple Development: <certificate common name>"

The resulting app bundle will be placed under the product folder in the mac-crafter folder.

Tip

Check Apple's oficial documentation about code signing.

3.2 Build the file provider module with this option:

--build-file-provider-module

3.3 Disable the auto-updater:

--disable-autoupdater

3.4 Manually set the architecture you are building for:

--arch arm64

The options are x86_64 and arm64.

How to build the app bundle for arm and intel

To achieve this we are using KDE Craft.

  1. After running the steps above, you will be able to use the CraftMaster.py script for that:
python build/craftmaster/CraftMaster.py --config <cloned desktop repo>/craftmaster.ini --target macos-clang-arm64 -c --add-blueprint-repository https://github.com/nextcloud/desktop-client-blueprints/

The --target options are define in the craftmaster.ini file.

  1. Install the client dependencies
python build/craftmaster/CraftMaster.py --config <cloned desktop repo>/craftmaster.ini --target macos-clang-arm64 -c --install-deps nextcloud-client
  1. Build the client
python build/craftmaster/CraftMaster.py --config <cloned desktop repo>/craftmaster.ini --target macos-clang-arm64 -c --src-dir <cloned desktop repo> nextcloud-client