@@ -17,7 +17,7 @@ APP_NAME:=Julia-$(JULIA_VERSION_MAJOR_MINOR).app
17
17
VOL_NAME: =Julia-$(JULIA_VERSION_OPT_COMMIT )
18
18
19
19
APP_ID: =org.julialang.launcherapp
20
- APP_COPYRIGHT: =© 2016 The Julia Project
20
+ APP_COPYRIGHT: =© $( shell date '+ % Y') The Julia Project
21
21
22
22
23
23
all : clean $(DMG_NAME )
@@ -51,7 +51,7 @@ dmg/$(APP_NAME): startup.applescript julia.icns
51
51
tar zxf $(JULIAHOME ) /$(JULIA_BINARYDIST_FILENAME ) .tar.gz -C $@ /Contents/Resources/julia --strip-components 1
52
52
if [ -n " $$ MACOS_CODESIGN_IDENTITY" ]; then \
53
53
echo " Codesigning with identity $$ MACOS_CODESIGN_IDENTITY" ; \
54
- codesign -s " $$ MACOS_CODESIGN_IDENTITY" -v --deep $@ ; \
54
+ codesign -s " $$ MACOS_CODESIGN_IDENTITY" --option=runtime --entitlements Entitlements.plist - v --deep $@ ; \
55
55
else \
56
56
true ; \
57
57
fi
@@ -60,9 +60,35 @@ ROOTFILES := $(shell ls -ld dmg/*.app *.dmg 2> /dev/null | awk '{print $$3}')
60
60
clean :
61
61
ifneq ($(filter root,$(ROOTFILES ) ) ,)
62
62
@echo "We have to use sudo here to clean out folders owned by root. You may be asked for your password"
63
- sudo rm -rf dmg *.dmg
63
+ sudo rm -rf dmg *.dmg notarize-*.xml
64
64
else
65
65
rm -rf dmg *.dmg
66
66
endif
67
67
68
- .PHONY : clean all
68
+ notarize-upload-$(DMG_NAME ) .xml : $(DMG_NAME )
69
+ @# Upload the `.dmg` for notarization
70
+ xcrun altool --notarize-app --primary-bundle-id org.julialang.launcherapp --username " $$ APPLEID" --password " $$ APPLEID_PASSWORD" -itc_provider A427R7F42H --file " $( DMG_NAME) " --output-format xml > " $@ "
71
+ @# Sleep for a few seconds so that we don't immediately error out when we request the UUID from Apple
72
+ @sleep 5
73
+
74
+
75
+ notarize-check : notarize-upload-$(DMG_NAME ) .xml
76
+ @# We wait in a while loop for notarization to complete
77
+ ./notarize_check.sh " $<"
78
+
79
+ # This is the top-level notarization target. Note that this is still a somewhat manual
80
+ # process; things can go wrong, and so if it fails, you may need to inspect the `.xml`
81
+ # files to see what went wrong, but in general you can just run `make notarize` and it
82
+ # should upload, notarize, staple, and re-package the .dmg for you.
83
+ # Note that for this to work, you need to have exported `APPLEID`, `APPLEID_PASSWORD`
84
+ # and `MACOS_CODESIGN_IDENTITY` to have signed the `.app` in the first place.
85
+ notarize : notarize-check
86
+ @# Delete old .dmg file
87
+ rm -f $(DMG_NAME )
88
+ @# Staple the .app
89
+ xcrun stapler staple dmg/$(APP_NAME )
90
+ @# re-build the .dmg
91
+ $(MAKE ) $(DMG_NAME )
92
+
93
+
94
+ .PHONY : clean all notarize-upload notarize-check
0 commit comments