Skip to content

Commit

Permalink
Configure dmg builds to use newer APFS/LZFSE formats for non-legacy b…
Browse files Browse the repository at this point in the history
…uild

Use newer formats for creating the DMG file for distributing MacVim.
APFS has been supported fully since macOS 10.13, and from testing it
extracts faster than HFS+.

LZFSE (ULFO format) is newer than zlib/DEFLATE (UDZO format) and also
decompresses faster as well from testing. Note that there is a newer
compression scheme using LZMA (ULMO format) but it is only supported in
10.15+ which is too high for us as non-legacy builds need to target
10.13+. Also, from testing, the newer LZMA yields smaller files, but
takes more time to decompress than LZFSE.

Also, makae legacy builds use the old formats (HFS+/zlib) since they
need to work on 10.9.
  • Loading branch information
ychin committed Jul 5, 2023
1 parent 5614bcc commit e08e431
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/ci-macvim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,11 @@ jobs:
run: |
# Use the --skip-jenkins flag to skip the prettify osascript calls which could fail due to permission issues in
# CI environment.
make -C src macvim-dmg CREATEDMG_FLAGS=--skip-jenkins
if ${{ matrix.legacy == true }}; then
make -C src macvim-dmg-legacy CREATEDMG_FLAGS=--skip-jenkins
else
make -C src macvim-dmg CREATEDMG_FLAGS=--skip-jenkins
fi
if ${{ matrix.publish_postfix != '' }}; then
mv src/MacVim/build/Release/MacVim.dmg src/MacVim/build/Release/MacVim${{ matrix.publish_postfix }}.dmg
Expand Down
10 changes: 10 additions & 0 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3633,18 +3633,28 @@ DMGDIR = MacVim/build/dmg
DMGFILE = MacVim.dmg
ENTITLEMENTS = MacVim/MacVim.entitlements

# APFS is supported in 10.13+, ULFO (LZFSE compression) in 10.11+.
DMGFILESYSTEM = APFS
DMGFORMAT = ULFO

macvim: $(VIMTARGET)
xcodebuild -project MacVim/MacVim.xcodeproj $(XCODEFLAGS)

macvim-signed:
MacVim/scripts/sign-developer-id $(RELEASEDIR)/MacVim.app $(ENTITLEMENTS)

macvim-dmg-legacy: DMGFILESYSTEM = HFS+
macvim-dmg-legacy: DMGFORMAT = UDZO
macvim-dmg-legacy: macvim-dmg

macvim-dmg:
rm -rf $(DMGDIR)
mkdir -p $(DMGDIR)
cp -a $(RELEASEDIR)/MacVim.app $(DMGDIR)/
rm -rf $(RELEASEDIR)/$(DMGFILE)
MacVim/create-dmg/create-dmg \
--filesystem "$(DMGFILESYSTEM)" \
--format "$(DMGFORMAT)" \
--volname "MacVim" \
--volicon MacVim/icons/MacVim.icns \
--background MacVim/dmg/background.png \
Expand Down

0 comments on commit e08e431

Please sign in to comment.