Skip to content

Commit

Permalink
Add a Makefile. Transition to new package system. Add support for cod…
Browse files Browse the repository at this point in the history
…e-signing (but still no authorization to sign the kext, so we'll have to wait until Apple reads their e-mail before that warning will go away.)
  • Loading branch information
jwise committed Aug 31, 2014
1 parent 29d0240 commit 879dad6
Show file tree
Hide file tree
Showing 6 changed files with 114 additions and 4 deletions.
4 changes: 2 additions & 2 deletions HoRNDIS-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>6</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0.0d1</string>
<string>6</string>
<key>IOKitPersonalities</key>
<dict>
<key>HoRNDISComposite_SGS2</key>
Expand Down
6 changes: 4 additions & 2 deletions HoRNDIS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
CODE_SIGN_IDENTITY = "";
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1.0.0d1;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
Expand All @@ -251,7 +252,7 @@
INFOPLIST_FILE = "HoRNDIS-Info.plist";
MACOSX_DEPLOYMENT_TARGET = 10.6;
MODULE_NAME = com.joshuawise.HoRNDIS;
MODULE_VERSION = 1.0.0d1;
MODULE_VERSION = 6;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx10.6;
WRAPPER_EXTENSION = kext;
Expand All @@ -262,6 +263,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
CODE_SIGN_IDENTITY = "";
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1.0.0d1;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
Expand All @@ -270,7 +272,7 @@
INFOPLIST_FILE = "HoRNDIS-Info.plist";
MACOSX_DEPLOYMENT_TARGET = 10.6;
MODULE_NAME = com.joshuawise.HoRNDIS;
MODULE_VERSION = 1.0.0d1;
MODULE_VERSION = 6;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx10.6;
WRAPPER_EXTENSION = kext;
Expand Down
41 changes: 41 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# You may not be able to build with a modern Xcode, since we still support 10.6.
# So, if we have Xcode 4.6 around, we should use it.

XCODEBUILD ?= /Applications/Xcode46-DP4.app/Contents/Developer/usr/bin/xcodebuild

# Ok, no joy there?
ifeq (,$(wildcard $(XCODEBUILD)))
XCODEBUILD = xcodebuild
endif

# Should we sign? Hack hack. Oh well.
ifeq (joshua,$(USER))
CODESIGN_KEXT ?= "Developer ID Application: Joshua Wise (54GTJ2AU36)"
CODESIGN_INST ?= "Developer ID Installer: Joshua Wise (54GTJ2AU36)"
endif

all: build/Release/HoRNDIS.kext build/signed/HoRNDIS.kext

build/Release/HoRNDIS.kext: HoRNDIS.cpp HoRNDIS.h HoRNDIS-Info.plist HoRNDIS.xcodeproj HoRNDIS.xcodeproj/project.pbxproj
$(XCODEBUILD)

build/HoRNDIS-kext.pkg: build/Release/HoRNDIS.kext
pkgbuild --component $< --install-location /System/Library/Extensions/ $@

build/HoRNDIS.pkg: build/HoRNDIS-kext.pkg package/Distribution.xml
productbuild --distribution package/Distribution.xml --package-path build --resources package/resources $(if $(CODESIGN_INST),--sign $(CODESIGN_INST)) build/HoRNDIS.pkg

ifeq (,$(CODESIGN_KEXT))

build/signed/%: build/Release/%
@echo not building $@ because we have no key to sign with

else

build/signed/%: build/Release/%
rm -rf $@
mkdir -p build/signed
cp -R $< $@
codesign --force -s $(CODESIGN_KEXT) $@

endif
19 changes: 19 additions & 0 deletions package/Distribution.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<installer-gui-script minSpecVersion="1">
<title>HoRNDIS</title>
<welcome file="intro-text.rtf" mime-type="application/rtf" />
<conclusion file="post-readme.rtf" mime-type="application/rtf" />
<pkg-ref id="kext-unsigned"/>
<options customize="never" hostArchitectures="i386,x86_64" require-scripts="false" rootVolumeOnly="true" />
<os-version min="10.6" />
<choices-outline>
<line choice="default">
<line choice="com.joshuawise.kexts.HoRNDIS"/>
</line>
</choices-outline>
<choice id="default"/>
<choice id="com.joshuawise.kexts.HoRNDIS" visible="false">
<pkg-ref id="kext-unsigned"/>
</choice>
<pkg-ref id="kext-unsigned" version="6.0.0" onConclusion="none">HoRNDIS-kext.pkg</pkg-ref>
</installer-gui-script>
22 changes: 22 additions & 0 deletions package/resources/intro-text.rtf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340
{\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
{\colortbl;\red255\green255\blue255;}
{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
\margl1440\margr1440\vieww10800\viewh8400\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural

\f0\b\fs26 \cf0 HoRNDIS
\b0 is a kernel extension ("kext") that makes it possible to use your Android phone's built-in USB tethering support on your Mac OS X system. In order to use it, you will need:\
\
\pard\tx220\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li720\fi-720\pardirnatural
\ls1\ilvl0\cf0 {\listtext \'95 }a Mac running OS X 10.6 or later (i.e., Snow Leopard, Lion, or Mountain Lion);\
{\listtext \'95 }an Android phone that supports USB tethering natively;\
{\listtext \'95 }and for the USB tethering feature on your phone to be enabled (either by your carrier, or through third-party firmware).\
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
\cf0 \
For support, please visit {\field{\*\fldinst{HYPERLINK "http://www.joshuawise.com/horndis"}}{\fldrslt http://www.joshuawise.com/horndis}}.\
\
You will be guided through the steps necessary to install
\b HoRNDIS
\b0 on your Mac.}
26 changes: 26 additions & 0 deletions package/resources/post-readme.rtf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340
{\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
{\colortbl;\red255\green255\blue255;}
{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
\margl1440\margr1440\vieww10800\viewh8400\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural

\f0\b\fs26 \cf0 HoRNDIS
\b0 installation is complete. Depending on your version of OS X, you may need to restart your Mac for the driver to be loaded.\
\
To get started using
\b HoRNDIS
\b0 , you will need to enable tethering on your phone. To do so:\
\pard\tx220\tx687\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li658\fi-659\pardirnatural
\ls1\ilvl0\cf0 {\listtext \'95 }Connect your phone to your computer.\
{\listtext \'95 }Enter the settings menu on your phone, and select 'More...', below 'Wi-Fi' and 'Bluetooth'.\
{\listtext \'95 }Select 'Hotspot settings'.\
{\listtext \'95 }Check the 'USB tethering' box.\
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
\cf0 (These instructions were developed on a Galaxy Nexus running Android 4.1; exact steps on your phone may vary.)\
\
Your Mac should subsequently detect the device, and connect to the Internet.\
\
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
\cf0 For further support, please visit {\field{\*\fldinst{HYPERLINK "http://www.joshuawise.com/horndis"}}{\fldrslt http://www.joshuawise.com/horndis}}.}

0 comments on commit 879dad6

Please sign in to comment.