Skip to content

Commit 6e2a150

Browse files
committed
Remove patch from Mac .app, addresses #10697.
Also sets identifier to org.julialang.julia
1 parent d14a707 commit 6e2a150

File tree

1 file changed

+23
-12
lines changed

1 file changed

+23
-12
lines changed

contrib/mac/app/Makefile

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,27 @@ ifeq ($(JULIA_PKGDIR),)
1010
JULIA_PKGDIR:=$(shell echo ~)/.julia
1111
endif
1212

13-
VERSION_SUFFIX:=$(shell [ $$(git describe --tags --exact-match 2>/dev/null) ] && echo $(JULIA_VERSION) || echo $(JULIA_VERSION)-$(JULIA_COMMIT))
13+
# X.Y.Z or X.Y.Z-hash
14+
DMG_VERSION_SUFFIX:=$(shell [ $$(git describe --tags --exact-match 2>/dev/null) ] && echo $(JULIA_VERSION) || echo $(JULIA_VERSION)-$(JULIA_COMMIT))
1415

15-
all: clean dmg
16+
# X.Y
17+
APP_VERSION_SUFFIX:=$(shell echo $(JULIA_VERSION) | grep -o '^[0-9]\+.[0-9]\+')
1618

17-
dmg:
19+
DMG_NAME:=Julia-$(DMG_VERSION_SUFFIX).dmg
20+
APP_NAME:=Julia-$(APP_VERSION_SUFFIX).app
21+
VOL_NAME:=Julia-$(DMG_VERSION_SUFFIX)
22+
23+
all: clean $(DMG_NAME)
24+
25+
$(DMG_NAME): dmg/$(APP_NAME)
26+
-cp -f julia.icns dmg/.VolumeIcon.icns
27+
-ln -fs /Applications ./dmg/Applications
28+
-chmod 755 ./dmg/$(APP_NAME)/Contents/MacOS/Julia
29+
@echo "We're going to chown the .app file to root:admin now, which requires sudo. You may be asked for your password:"
30+
sudo chown -R root:admin ./dmg/$(APP_NAME)
31+
sudo hdiutil create $(DMG_NAME) -size 500m -ov -volname "$(VOL_NAME)" -imagekey zlib-level=9 -srcfolder dmg
32+
33+
dmg/$(APP_NAME): julia.icns
1834
make -C ../../../deps install-git
1935
make -C ../../.. binary-dist
2036
tar zxf ../../../julia-*.tar.gz
@@ -24,16 +40,11 @@ dmg:
2440
-cp -a $(build_datarootdir)/git* ./julia/share
2541
rm -f julia/lib/*.{a,la}
2642
-mkdir dmg
27-
platypus -a Julia -p /bin/bash -V $(JULIA_VERSION) -R -u "The Julia Project" -i julia.icns -Q julia.icns -o "None" -I org.julialang -x -f julia script ./dmg/Julia-$(VERSION_SUFFIX).app
28-
-codesign -s "AFB379C0B4CBD9DB9A762797FC2AB5460A2B0DBE" --deep ./dmg/Julia-$(VERSION_SUFFIX).app
29-
-cp -f Julia.icns dmg/.VolumeIcon.icns
30-
-ln -fs /Applications ./dmg/Applications
31-
-chmod 755 ./dmg/Julia-$(VERSION_SUFFIX).app/Contents/MacOS/Julia
32-
@echo "We're going to chown the .app file to root:admin now, which requires sudo. You may be asked for your password:"
33-
sudo chown -R root:admin ./dmg/Julia-$(VERSION_SUFFIX).app
34-
sudo hdiutil create Julia-$(VERSION_SUFFIX).dmg -size 500m -ov -volname "Julia" -imagekey zlib-level=9 -srcfolder dmg
35-
43+
platypus -a Julia -p /bin/bash -V $(JULIA_VERSION) -R -u "The Julia Project" -i julia.icns -Q julia.icns -o "None" -I org.julialang.julia -x -f julia script ./dmg/$(APP_NAME)
44+
-codesign -s "AFB379C0B4CBD9DB9A762797FC2AB5460A2B0DBE" --deep ./dmg/$(APP_NAME)
3645

3746
clean:
3847
@echo "We have to use sudo here to clean out folders owned by root. You may be asked for your password"
3948
sudo rm -fr julia dmg *.dmg
49+
50+
.PHONY: clean all

0 commit comments

Comments
 (0)