From 4ad663b935fa1845d426dde99a8272942b620e11 Mon Sep 17 00:00:00 2001 From: kali Date: Wed, 2 Jan 2013 18:06:13 +0900 Subject: initial OSX packaging --- pkg/osx/Makefile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 pkg/osx/Makefile (limited to 'pkg/osx/Makefile') diff --git a/pkg/osx/Makefile b/pkg/osx/Makefile new file mode 100644 index 00000000..54fbf14a --- /dev/null +++ b/pkg/osx/Makefile @@ -0,0 +1,17 @@ +pkg : dist dmg + +dist : + ~/pyinstaller/pyinstaller.py -w -s leap-client.spec + cp -r /opt/local/Library/Frameworks/QtGui.framework/Versions/4/Resources/qt_menu.nib "dist/LEAP Client.app/Contents/Resources" + cp Info.plist "dist/LEAP Client.app/Contents/Info.plist" + cp ../../data/images/leap-client.icns "dist/LEAP Client.app/Contents/Resources/icon-windowed.icns" + + +dmg : + #TODO: remove if already present + #rm dist/LEAPClient.dmg + hdiutil create -format UDBZ -srcfolder "dist/LEAP Client.app/" "dist/LEAP Client.dmg" + +clean : + rm -rf dist/ build/ + -- cgit v1.2.3 From e35eb606faef1ccd06201a0b38a462375426cedd Mon Sep 17 00:00:00 2001 From: kali Date: Mon, 7 Jan 2013 21:10:41 +0900 Subject: Working OSX installer workflow. Using platypus for installer. Working installer at 17.6MB compressed. --- pkg/osx/Makefile | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) (limited to 'pkg/osx/Makefile') diff --git a/pkg/osx/Makefile b/pkg/osx/Makefile index 54fbf14a..b302fa31 100644 --- a/pkg/osx/Makefile +++ b/pkg/osx/Makefile @@ -1,4 +1,8 @@ -pkg : dist dmg +#WARNING: You need to run this with an activated VIRTUALENV. + +OSX = dist/LEAP\ Client.app/Contents/MacOS/ + +pkg : dist trim installer dmg dist : ~/pyinstaller/pyinstaller.py -w -s leap-client.spec @@ -6,12 +10,34 @@ dist : cp Info.plist "dist/LEAP Client.app/Contents/Info.plist" cp ../../data/images/leap-client.icns "dist/LEAP Client.app/Contents/Resources/icon-windowed.icns" +trim: + #XXX this should go properly in pyinstaller spec excludes, but going quick'n'dirty + rm $(OSX)QtSvg $(OSX)QtXml $(OSX)QtNetwork $(OSX)QtOpenGL $(OSX)Qt3Support $(OSX)QtSql + +installer: + #XXX need to fix some paths there (binary, etc) + platypus -P install/leap-installer.platypus -y dist/LEAPClient_installer.app + #XXX should build tuntap extensions ourselves + mkdir "dist/LEAPClient_installer.app/Contents/Resources/StartupItems" + mkdir "dist/LEAPClient_installer.app/Contents/Resources/Extensions/" + cp -r /opt/local/Library/StartupItems/tun "dist/LEAPClient_installer.app/Contents/Resources/StartupItems/" + cp -r /opt/local/Library/StartupItems/tap "dist/LEAPClient_installer.app/Contents/Resources/StartupItems/" + cp -r /opt/local/Library/Extensions/tun.kext "dist/LEAPClient_installer.app/Contents/Resources/Extensions/" + cp -r /opt/local/Library/Extensions/tap.kext "dist/LEAPClient_installer.app/Contents/Resources/Extensions/" + #copy the binary that we have previously built + #XXX not building it yet... + cp ../../openvpn/build/openvpn.leap "dist/LEAPClient_installer.app/Contents/Resources/" + #copy startup scripts + cp install/client.up.sh "dist/LEAP Client.app/Contents/Resources" + cp install/client.down.sh "dist/LEAP Client.app/Contents/Resources" + cp install/ProcessNetworkChanges.plist.template "dist/LEAP Client.app/Contents/Resources" + #Finally, copy application bundle... + cp -r "dist/LEAP Client.app" "dist/LEAPClient_installer.app/Contents/Resources/" dmg : #TODO: remove if already present #rm dist/LEAPClient.dmg - hdiutil create -format UDBZ -srcfolder "dist/LEAP Client.app/" "dist/LEAP Client.dmg" + hdiutil create -format UDBZ -srcfolder "dist/LEAPClient_installer.app/" "dist/LEAP Client Installer.dmg" clean : rm -rf dist/ build/ - -- cgit v1.2.3 From ade0eded09176fd687d1ee30724468c048d15065 Mon Sep 17 00:00:00 2001 From: kali Date: Fri, 11 Jan 2013 09:16:49 +0900 Subject: fix for missing cacert bundle frozen app cannot find requests cacert bundle. added to Resources to get us going. --- pkg/osx/Makefile | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) (limited to 'pkg/osx/Makefile') diff --git a/pkg/osx/Makefile b/pkg/osx/Makefile index b302fa31..f2520fcf 100644 --- a/pkg/osx/Makefile +++ b/pkg/osx/Makefile @@ -1,6 +1,10 @@ #WARNING: You need to run this with an activated VIRTUALENV. OSX = dist/LEAP\ Client.app/Contents/MacOS/ +GITC = `git rev-parse --short HEAD` +DMG = "dist/leap-client-$(GITC).dmg" +INST = "dist/LEAP Client installer.app" +INSTR = "dist/LEAP Client installer.app/Contents/Resources" pkg : dist trim installer dmg @@ -16,28 +20,27 @@ trim: installer: #XXX need to fix some paths there (binary, etc) - platypus -P install/leap-installer.platypus -y dist/LEAPClient_installer.app + platypus -P install/leap-installer.platypus -y $(INST) #XXX should build tuntap extensions ourselves - mkdir "dist/LEAPClient_installer.app/Contents/Resources/StartupItems" - mkdir "dist/LEAPClient_installer.app/Contents/Resources/Extensions/" - cp -r /opt/local/Library/StartupItems/tun "dist/LEAPClient_installer.app/Contents/Resources/StartupItems/" - cp -r /opt/local/Library/StartupItems/tap "dist/LEAPClient_installer.app/Contents/Resources/StartupItems/" - cp -r /opt/local/Library/Extensions/tun.kext "dist/LEAPClient_installer.app/Contents/Resources/Extensions/" - cp -r /opt/local/Library/Extensions/tap.kext "dist/LEAPClient_installer.app/Contents/Resources/Extensions/" + mkdir $(INSTR)/StartupItems + mkdir $(INSTR)/Extensions + cp -r /opt/local/Library/StartupItems/tun $(INSTR)/StartupItems + cp -r /opt/local/Library/StartupItems/tap $(INSTR)/StartupItems + cp -r /opt/local/Library/Extensions/tun.kext $(INSTR)/Extensions + cp -r /opt/local/Library/Extensions/tap.kext $(INSTR)/Extensions #copy the binary that we have previously built #XXX not building it yet... - cp ../../openvpn/build/openvpn.leap "dist/LEAPClient_installer.app/Contents/Resources/" + cp ../../openvpn/build/openvpn.leap $(INSTR) #copy startup scripts - cp install/client.up.sh "dist/LEAP Client.app/Contents/Resources" - cp install/client.down.sh "dist/LEAP Client.app/Contents/Resources" - cp install/ProcessNetworkChanges.plist.template "dist/LEAP Client.app/Contents/Resources" + cp install/client.up.sh $(INSTR) + cp install/client.down.sh $(INSTR) + cp install/ProcessNetworkChanges.plist.template $(INSTR) #Finally, copy application bundle... - cp -r "dist/LEAP Client.app" "dist/LEAPClient_installer.app/Contents/Resources/" + cp -r "dist/LEAP Client.app" $(INSTR) dmg : - #TODO: remove if already present - #rm dist/LEAPClient.dmg - hdiutil create -format UDBZ -srcfolder "dist/LEAPClient_installer.app/" "dist/LEAP Client Installer.dmg" + rm -f $(DMG) + hdiutil create -format UDBZ -srcfolder $(INST) $(DMG) clean : rm -rf dist/ build/ -- cgit v1.2.3