You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Rebased branch onto i2h3/proper-macos-sandboxing
- Removed extension entitlement source files and related build settings from the Xcode project to be build with CMake instead.
- Set up CMake to generate the required entitlement manifests by itself to be used later on by Mac Crafter in the code signing.
- Updated the mac-crafter build subcommand to rely on URLs instead of path strings.
- Updated the mac-crafter build subcommand to reference the entitlement manifests generated by CMake.
- Updated the mac-crafter codesign subcommand to require arguments for specifying the entitlement manifests to sign the app extensions.
- Updated README of mac-crafter and removed a lot of outdated and redundant information.
Signed-off-by: Iva Horn <[email protected]>
Copy file name to clipboardExpand all lines: admin/osx/mac-crafter/README.md
+6-137Lines changed: 6 additions & 137 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,15 +2,15 @@
2
2
- SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
3
3
- SPDX-License-Identifier: GPL-2.0-or-later
4
4
-->
5
-
# mac-crafter
5
+
# Mac Crafter
6
6
7
7
mac-crafter is a tool to easily build a fully functional Nextcloud Desktop Client for macOS.
8
-
It automates cloning, configuring, crafting, codesigning, packaging, and even DMG creation of the client.
9
-
The tool is built with Swift’s ArgumentParser and it drives the KDE Craft build system along with some Python scripts and shell commands.
8
+
It automates cloning, configuring, crafting, codesigning, packaging, and even disk image creation of the client.
9
+
The tool is built with Apple’s ArgumentParser and it drives the KDE Craft build system along with some Python scripts and shell commands.
10
10
11
11
## System Requirements
12
12
13
-
- macOS 11 Big Sur or newer
13
+
- macOS 12 Monterey or newer
14
14
- Xcode
15
15
- Python3
16
16
- Homebrew (for installing additional tools like `inkscape`, `pyenv`, and `create-dmg`)
@@ -28,139 +28,8 @@ The script will also clone the KDE Craft repository if it is not already present
28
28
29
29
## Usage
30
30
31
-
mac-crafter comes with several subcommands:
32
-
33
-
### Build
34
-
35
-
This is the default command and it handles:
36
-
- Configuring and/or cloning KDE Craft (using the CraftMaster repository)
37
-
- Adding the Nextcloud Desktop Client blueprints
38
-
- Crafting KDE Craft projects and installing dependencies
39
-
- Building the client with options for a full rebuild, offline mode, and more
40
-
41
-
**Usage Example:**
42
-
43
-
```
44
-
swift run mac-crafter [options]
45
-
```
46
-
47
-
**Common Options:**
48
-
49
-
-**Repository and Build Paths:**
50
-
-`--repo-root-dir`: Path to the Nextcloud Desktop Client git repository (default is `../../../` relative to the current directory).
51
-
-`--build-path`: Directory where build files are written.
52
-
-`--product-path`: Directory where the final product (app bundle) will be placed.
53
-
54
-
-**Build Settings:**
55
-
-`--arch`: Architecture to build for (e.g. `arm64`, `x86_64`).
56
-
-`--build-type`: Build type (e.g. `Release`, `RelWithDebInfo`, `Debug`).
57
-
-`--craft-blueprint-name`: Blueprint name for Nextcloud Desktop Client (default is `"nextcloud-client"`).
58
-
-`--full-rebuild`: Forces a full rebuild by wiping existing build artifacts.
59
-
-`--offline`: Run the build offline (do not update craft).
60
-
61
-
-**Code Signing & Notarisation:**
62
-
-`--code-sign-identity (-c)`: Code signing identity for the client and libraries.
63
-
-`--apple-id`, `--apple-password`, `--apple-team-id`: Credentials for notarisation.
64
-
-`--package-signing-id`: Identifier used for package signing.
65
-
66
-
-**Advanced Options:**
67
-
-`--disable-autoupdater`: Build without the Sparkle auto-updater.
68
-
-`--build-tests`: Optionally build the test suite.
69
-
-`--build-file-provider-module`: Build the File Provider Module.
70
-
-`--dev`: Build in developer mode which, for example, appends "Dev" to the app name and sets a dev flag in the craft options.
71
-
-`--override-server-url` and `--force-override-server-url`: Override server URL settings for the client.
72
-
73
-
The build process automatically ensures necessary tools (like git, inkscape, python3) are installed—invoking installation commands on missing dependencies.
74
-
75
-
### Codesign
76
-
77
-
Use this subcommand to codesign an existing Nextcloud Desktop Client app bundle.
78
-
79
-
**Usage Example:**
80
-
81
-
```
82
-
swift run mac-crafter codesign -c "Apple Development: <certificate common name>" <path-to-app-bundle>
83
-
```
84
-
85
-
-**Options:**
86
-
-`appBundlePath`: Path to the app bundle.
87
-
-`--code-sign-identity (-c)`: Code signing identity to use.
88
-
89
-
### Package
90
-
91
-
This command is used to package the client after building. It prepares the app bundle and can also perform package signing and notarisation.
92
-
93
-
**Usage Example:**
94
-
95
-
```
96
-
swift run mac-crafter package [options]
97
-
```
98
-
99
-
-**Options:**
100
-
-`--arch`: Target architecture.
101
-
-`--build-path`, `--product-path`: Build and product directories.
102
-
-`--craft-blueprint-name`: Blueprint name.
103
-
-`--app-name`: The branded name of the application.
104
-
- Various notarisation options (`--apple-id`, `--apple-password`, `--apple-team-id`).
105
-
- Signing options such as `--package-signing-id` and `--sparkle-package-sign-key`.
106
-
107
-
### CreateDMG
108
-
109
-
This subcommand creates a DMG (disk image) for the client app bundle.
110
-
111
-
**Usage Example:**
112
-
113
-
```
114
-
swift run mac-crafter createDMG <path-to-app-bundle> [options]
115
-
```
116
-
117
-
-**Options:**
118
-
-`appBundlePath`: The app bundle’s path.
119
-
-`--product-path`: Where the final DMG and product will be placed.
120
-
-`--build-path`: Directory for temporary build files.
121
-
-`--app-name`: Application's name.
122
-
- Notarisation and signing options similar to the Package command.
123
-
124
-
## How It Works
125
-
126
-
1.**Tooling Configuration:**
127
-
The build command checks for necessary tools (like `codesign`, `git`, `brew`, `inkscape`, and `python3`) and auto-installs missing dependencies if needed.
128
-
2.**KDE Craft Configuration:**
129
-
- If KDE Craft isn’t already cloned or if a reconfiguration is triggered, the tool clones the CraftMaster repository and configures it using a provided INI file.
130
-
- Next, it adds the Nextcloud Desktop Client blueprints, then crafts KDE Craft and installs the required dependencies.
131
-
3.**Craft Options Setup:**
132
-
The build process assembles a set of options including source directory, architecture, build tests, auto-updater settings, and more.
133
-
4.**Building, Codesigning, and Packaging:**
134
-
The tool then builds the client, optionally performs a full rebuild, and if a codesign identity is provided, signs the final app bundle. Finally, it copies the finished app bundle to the product directory.
135
-
5.**Optional DMG Creation:**
136
-
Use the CreateDMG subcommand to bundle the built client into a DMG for distribution.
137
-
138
-
## Quick Start
139
-
140
-
For a basic build and codesigning:
141
-
```
142
-
swift run mac-crafter -c "Apple Development: MyCertificate"
143
-
```
144
-
145
-
For a full rebuild on a specific architecture:
146
-
```
147
-
swift run mac-crafter --arch arm64 --full-rebuild -c "Apple Development: MyCertificate"
148
-
```
149
-
150
-
To package the app:
151
-
```
152
-
swift run mac-crafter package -c "Apple Development: MyCertificate" --arch arm64
153
-
```
154
-
155
-
To create a DMG:
156
-
```
157
-
swift run mac-crafter createDMG /path/to/Nextcloud.app --app-name Nextcloud
158
-
```
159
-
160
-
For more details on all available options, run:
161
-
```
162
-
swift run mac-crafter --help
163
-
```
31
+
mac-crafter comes with several subcommands.
32
+
To see a full reference, run `mac-crafter --help` or `mac-crafter <subcommand> --help` for further specific information about the command.
// Troubleshooting: This can happen because a CraftMaster repository was cloned which does not contain the commit defined in craftmaster.ini of this project due to use of customized forks.
0 commit comments