Skip to content

Commit

Permalink
Makefile: Bump version, separate DMGs for .pkg and .app
Browse files Browse the repository at this point in the history
You can install either from the DMG with the .pkg file
or with the DMG with the .app bundle.

The PKG file doesn't seem to work as well with macOS 14, so I only
recommend it on older systems, and, even then, it's not my first
recommendation.  I might delete the .pkg installer targets eventually...
  • Loading branch information
targetdisk committed Jan 23, 2024
1 parent 4c11e6d commit b6115e1
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
PREFIX=/usr/local
IDENTIFIER=org.targetdisk.RDeeM

VERSION ?= 2.4
VERSION ?= 2.5

PACKAGE_BUILD = $(shell which pkgbuild)
#ARCH_FLAGS=-arch x86_64
#ARCH_FLAGS=-arch x86_64 -arch arm64

.PHONY: build

Expand All @@ -29,7 +29,7 @@ clean:
rm -f *.o
rm -f *icns
rm -rf RDeeM.app
rm -rf pkgroot dmgroot
rm -rf dmgroot dmgroot.pkg pkgroot
rm -f *.pkg *.dmg

%.o: %.mm
Expand All @@ -41,21 +41,30 @@ clean:

pkg: RDeeM.app
mkdir -p pkgroot/Applications
mv $< pkgroot/Applications/
cp -rv $< pkgroot/Applications/
$(PACKAGE_BUILD) --root pkgroot/ --identifier $(IDENTIFIER) \
--version $(VERSION) "RDeeM-$(VERSION).pkg"
rm -f RDeeM.pkg
ln -s RDeeM-$(VERSION).pkg RDeeM.pkg

dmg: pkg
pkgdmg: pkg
mkdir -p dmgroot.pkg
cp RDeeM-$(VERSION).pkg dmgroot.pkg/
rm -f RDeeM-installer-$(VERSION).dmg
hdiutil makehybrid -hfs -hfs-volume-name "RDeeM $(VERSION) Installer" \
-o "RDeeM-installer-$(VERSION).dmg" dmgroot.pkg/
rm -f RDeeM-installer.dmg
ln -s RDeeM-installer--$(VERSION).dmg RDeeM-installer.dmg

dmg: RDeeM.app
mkdir -p dmgroot
cp RDeeM-$(VERSION).pkg dmgroot/
cp -rv $< dmgroot
rm -f RDeeM-$(VERSION).dmg
hdiutil makehybrid -hfs -hfs-volume-name "RDeeM $(VERSION)" \
-o "RDeeM-$(VERSION).dmg" dmgroot/
rm -f RDeeM.dmg
ln -s RDeeM-$(VERSION).dmg RDeeM.dmg

all: dmg pkg
all: dmg pkg pkgdmg

.PHONY: pkg dmg build clean all

0 comments on commit b6115e1

Please sign in to comment.