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
Copy file name to clipboardexpand all lines: README.md
+40-27
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
mac-dist-helper-examples
2
2
========================
3
3
4
-
Example projects for the [mac-dist-helper Makefiles](https://github.com/zkmkarlsruhe/mac-dist-helper) which automate packaging macOS binaries for distribution
4
+
Example projects for the [mac-dist-helper Makefile](https://github.com/zkmkarlsruhe/mac-dist-helper) which automates packaging macOS binaries for distribution
5
5
6
6
This code base has been developed by [ZKM | Hertz-Lab](https://zkm.de/en/about-the-zkm/organization/hertz-lab) as part of the project [»The Intelligent Museum«](#the-intelligent-museum).
7
7
@@ -15,6 +15,12 @@ WARRANTIES, see the file, "LICENSE.txt," in this distribution.
15
15
16
16
Inspired by the [Hello World](https://github.com/pure-data/helloworld) Pure Data external using pd-lib-builder.
Next, make sure all requirements are setup: [mac-dist-helper requirements](https://github.com/zkmkarlsruhe/mac-dist-helper#requirements)
34
+
Next, make sure all requirements are set up: [mac-dist-helper requirements](https://github.com/zkmkarlsruhe/mac-dist-helper#requirements)
29
35
30
36
Examples
31
37
--------
32
38
33
-
These are very basic instructions to buiild both the examples and distribution images. For details, see the [mac-dist-helper readme](https://github.com/zkmkarlsruhe/mac-dist-helper).
39
+
These are very basic instructions to build both the examples and distribution images. For details, see the [mac-dist-helper readme](https://github.com/zkmkarlsruhe/mac-dist-helper).
* hello: simple console program with a bundled dynamic library
38
-
* hellopd: [Pure Data](https://pure-data.info) C external
46
+
To do a full clean on any example:
47
+
48
+
```shell
49
+
make clean dist-clean dist-clobber
50
+
```
39
51
40
52
### HelloWorld
41
53
42
54
![media/helloworld-screenshot.png]
43
55
56
+
This is a basic single-window Cocoa application.
57
+
44
58
In the Xcode project Signing & Capabilities settings:
45
59
* enable Automatically manage signing for Release and set the team
46
-
* enable Hardened Runtime, if not set (default for Xcode 14+)
60
+
* enable Hardened Runtime, if not set
47
61
48
62
Next, set the codesign identity in `HelloWorld/Makefile`.
49
63
50
-
Create a signed & notarized distribution `.dmg` disk image with:
64
+
Create a signed & notarized distribution `dmg` disk image with:
51
65
52
66
```shell
53
67
cd HelloWorld
54
-
make app
55
-
make distdmg
68
+
make app dist-dmg
56
69
```
57
70
58
71
### HelloOF
59
72
60
73
![media/helloof-screenshot.png]
61
74
75
+
This is an [openFrameworks](https://openframeworks.cc) application with an external `data` folder.
76
+
62
77
The Xcode project file is not included so you will need to generate it using the OF ProjectGenerator which is included with the openFrameworks distribution.
63
78
64
79
To (re)generate the Xcode project:
@@ -69,7 +84,7 @@ To (re)generate the Xcode project:
69
84
70
85
Additionally, in the Xcode project Signing & Capabilities settings:
71
86
* enable Automatically manage signing for Release and set the team
72
-
* enable Hardened Runtime, if not set (default for Xcode 14+)
87
+
* enable Hardened Runtime, if not set
73
88
74
89
Next, set the codesign identity in `HelloOF/Makefile`.
75
90
@@ -79,42 +94,41 @@ Before building for distribution, make sure the OF lib itself is built by buildi
79
94
80
95
```shell
81
96
cd HelloOF
82
-
make app
83
-
make distdmg
97
+
make all app dist-dmg
84
98
```
85
99
86
100
### hello
87
101
88
102
![media/hello-screenshot.png]
89
103
104
+
This is a C console program which links to a custom dynamic library. Both binaries need to be signed "in place" then packaged and notarized.
105
+
90
106
Before starting, set the codesign identity in `hello/Makefile`.
91
107
108
+
When building, the following extra steps are performed for distribution:
109
+
* an Info.plist is embedded in each program executable using `-sectcreate TEXT`
110
+
* the dynamic lib loading paths are set to `@executable_path` using `install_name_tool`
111
+
92
112
Build for distribution with:
93
113
94
114
```shell
95
115
cd hello
96
-
make
97
-
make dist codesign distdmg
98
-
```
99
-
100
-
The separate `dist` and `codesign` targets are important to call before `distdmg` if the program is built without Xcode, so code signing needs to be performed manually on the binaries in the `dist` temp directory before creating a dmg or zip.
101
-
102
-
If encountering errors, do a full clean with:
103
-
104
-
```shell
105
-
make clean distclean distclobber
116
+
make all dist-dmg
106
117
```
107
118
108
119
### hellopd
109
120
110
121
![media/hellopd-screenshot.png]
111
122
123
+
This is a [Pure Data](https://pure-data.info) external library which is build using the [pd-lib-builder](https://github.com/pure-data/pd-lib-builder) makefile. The `pd_darwin` file (renamed dylib) needs to be signed then packaged and notarized.
124
+
125
+
Before starting, set the codesign identity in `hello/Makefile`.
126
+
112
127
Build for distribution with:
113
128
114
129
```shell
115
130
cd hellopd
116
-
make
117
-
make dist codesign distdmg
131
+
make all dist-dmg
118
132
```
119
133
120
134
The Intelligent Museum
@@ -127,4 +141,3 @@ The [ZKM | Center for Art and Media](https://zkm.de/en) and the [Deutsches Museu
127
141
As part of the project, digital curating will be critically examined using various approaches of digital art. Experimenting with new digital aesthetics and forms of expression enables new museum experiences and thus new ways of museum communication and visitor participation. The museum is transformed to a place of experience and critical exchange.
0 commit comments