Skip to content

Commit a4cabdf

Browse files
committed
build: Convert to building with --root, rather than with a pair of --components. Fixes #27.
1 parent 9cc6fa9 commit a4cabdf

File tree

2 files changed

+20
-12
lines changed

2 files changed

+20
-12
lines changed

Makefile

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
# You may not be able to build with a modern Xcode, since we still support 10.6.
22
# So, if we have Xcode 4.6 around, we should use it.
3+
#
4+
# You can do this by downloading Xcode 4.6.3 as a dmg from Apple, then
5+
# copying the contents into /Applications, then taking your ancient
6+
# MacOSX10.6.sdk that you keep kicking around, and copying it into
7+
# /Applications/Xcode-4.6.3.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/.
8+
# Don't you love backwards compatibility?
39

4-
XCODEBUILD ?= /Applications/Xcode46-DP4.app/Contents/Developer/usr/bin/xcodebuild
10+
XCODEBUILD ?= /Applications/Xcode-4.6.3.app/Contents/Developer/usr/bin/xcodebuild
511

612
# Ok, no joy there?
713
ifeq (,$(wildcard $(XCODEBUILD)))
@@ -19,13 +25,17 @@ all: build/Release/HoRNDIS.kext build/signed/HoRNDIS.kext build/HoRNDIS.pkg
1925
build/Release/HoRNDIS.kext: HoRNDIS.cpp HoRNDIS.h HoRNDIS-Info.plist HoRNDIS.xcodeproj HoRNDIS.xcodeproj/project.pbxproj
2026
$(XCODEBUILD)
2127

22-
build/HoRNDIS-kext.pkg: build/Release/HoRNDIS.kext
23-
pkgbuild --component $< --install-location /System/Library/Extensions/ $@
28+
build/root: build/Release/HoRNDIS.kext build/signed/HoRNDIS.kext
29+
rm -rf build/root
30+
mkdir -p build/root/System/Library/Extensions/
31+
cp -R build/Release/HoRNDIS.kext build/root/System/Library/Extensions/
32+
mkdir -p build/root/Library/Extensions
33+
cp -R build/signed/HoRNDIS.kext build/root/Library/Extensions/
2434

25-
build/HoRNDIS-signed-kext.pkg: build/signed/HoRNDIS.kext
26-
pkgbuild --component $< --install-location /Library/Extensions/ $@
35+
build/HoRNDIS-kext.pkg: build/root
36+
pkgbuild --identifier com.joshuawise.kexts.HoRNDIS --root $< $@
2737

28-
build/HoRNDIS.pkg: build/HoRNDIS-kext.pkg build/HoRNDIS-signed-kext.pkg package/Distribution.xml
38+
build/HoRNDIS.pkg: build/HoRNDIS-kext.pkg package/Distribution.xml
2939
productbuild --distribution package/Distribution.xml --package-path build --resources package/resources $(if $(CODESIGN_INST),--sign $(CODESIGN_INST)) build/HoRNDIS.pkg
3040

3141
ifeq (,$(CODESIGN_KEXT))

package/Distribution.xml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,17 @@
33
<title>HoRNDIS</title>
44
<welcome file="intro-text.rtf" mime-type="application/rtf" />
55
<conclusion file="post-readme.rtf" mime-type="application/rtf" />
6-
<pkg-ref id="kext-unsigned"/>
76
<options customize="never" hostArchitectures="i386,x86_64" require-scripts="false" rootVolumeOnly="true" />
87
<os-version min="10.6" />
98
<choices-outline>
109
<line choice="default">
1110
<line choice="com.joshuawise.kexts.HoRNDIS"/>
1211
</line>
1312
</choices-outline>
13+
<pkg-ref id="kext"/>
1414
<choice id="default"/>
1515
<choice id="com.joshuawise.kexts.HoRNDIS" visible="false">
16-
<pkg-ref id="kext-unsigned"/>
17-
<pkg-ref id="kext-signed"/>
16+
<pkg-ref id="kext"/>
1817
</choice>
19-
<pkg-ref id="kext-unsigned" version="6.0.0" onConclusion="none">HoRNDIS-kext.pkg</pkg-ref>
20-
<pkg-ref id="kext-signed" version="6.0.0" onConclusion="none">HoRNDIS-signed-kext.pkg</pkg-ref>
21-
</installer-gui-script>
18+
<pkg-ref id="kext" version="6.0.0" onConclusion="none">HoRNDIS-kext.pkg</pkg-ref>
19+
</installer-gui-script>

0 commit comments

Comments
 (0)