mirror of
https://github.com/munki/munki.git
synced 2026-05-03 19:10:21 -05:00
Added MunkiStatus.xcodeproject to build MunkiStatus.app.
Added munkistatus.py to communicate with MunkiStstus.app Modified ManagedInstaller and removepackages to use MunkStatus.app for user feedback instead of iHook. Removed iHook example files (100.mangagedinstalllogout.hook anbd MI_logout.hook) since we no longer use iHook for user feedback. git-svn-id: http://munki.googlecode.com/svn/trunk@44 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,809 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.03">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">1050</int>
|
||||
<string key="IBDocument.SystemVersion">9G3553</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">677</string>
|
||||
<string key="IBDocument.AppKitVersion">949.43</string>
|
||||
<string key="IBDocument.HIToolboxVersion">353.00</string>
|
||||
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<integer value="430"/>
|
||||
<integer value="293"/>
|
||||
</object>
|
||||
<object class="NSArray" key="IBDocument.PluginDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="IBDocument.RootObjects" id="627461608">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSCustomObject" id="770919419">
|
||||
<object class="NSMutableString" key="NSClassName">
|
||||
<characters key="NS.bytes">NSApplication</characters>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSCustomObject" id="212333292">
|
||||
<string key="NSClassName">FirstResponder</string>
|
||||
</object>
|
||||
<object class="NSCustomObject" id="324411882">
|
||||
<string key="NSClassName">NSApplication</string>
|
||||
</object>
|
||||
<object class="NSMenu" id="243632545">
|
||||
<string key="NSTitle">AMainMenu</string>
|
||||
<object class="NSMutableArray" key="NSMenuItems">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSMenuItem" id="475740837">
|
||||
<reference key="NSMenu" ref="243632545"/>
|
||||
<string key="NSTitle">NewApplication</string>
|
||||
<string key="NSKeyEquiv"/>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<object class="NSCustomResource" key="NSOnImage" id="173048731">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">NSMenuCheckmark</string>
|
||||
</object>
|
||||
<object class="NSCustomResource" key="NSMixedImage" id="418662321">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">NSMenuMixedState</string>
|
||||
</object>
|
||||
<string key="NSAction">submenuAction:</string>
|
||||
<object class="NSMenu" key="NSSubmenu" id="43653270">
|
||||
<string key="NSTitle">NewApplication</string>
|
||||
<object class="NSMutableArray" key="NSMenuItems">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSMenuItem" id="402782179">
|
||||
<reference key="NSMenu" ref="43653270"/>
|
||||
<string key="NSTitle">About NewApplication</string>
|
||||
<string key="NSKeyEquiv"/>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="173048731"/>
|
||||
<reference key="NSMixedImage" ref="418662321"/>
|
||||
</object>
|
||||
<object class="NSMenuItem" id="153829354">
|
||||
<reference key="NSMenu" ref="43653270"/>
|
||||
<bool key="NSIsDisabled">YES</bool>
|
||||
<bool key="NSIsSeparator">YES</bool>
|
||||
<string key="NSTitle"/>
|
||||
<string key="NSKeyEquiv"/>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="173048731"/>
|
||||
<reference key="NSMixedImage" ref="418662321"/>
|
||||
</object>
|
||||
<object class="NSMenuItem" id="611149323">
|
||||
<reference key="NSMenu" ref="43653270"/>
|
||||
<string key="NSTitle">Services</string>
|
||||
<string key="NSKeyEquiv"/>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="173048731"/>
|
||||
<reference key="NSMixedImage" ref="418662321"/>
|
||||
<string key="NSAction">submenuAction:</string>
|
||||
<object class="NSMenu" key="NSSubmenu" id="232863866">
|
||||
<string key="NSTitle">Services</string>
|
||||
<object class="NSMutableArray" key="NSMenuItems">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<string key="NSName">_NSServicesMenu</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMenuItem" id="75132000">
|
||||
<reference key="NSMenu" ref="43653270"/>
|
||||
<bool key="NSIsDisabled">YES</bool>
|
||||
<bool key="NSIsSeparator">YES</bool>
|
||||
<string key="NSTitle"/>
|
||||
<string key="NSKeyEquiv"/>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="173048731"/>
|
||||
<reference key="NSMixedImage" ref="418662321"/>
|
||||
</object>
|
||||
<object class="NSMenuItem" id="600599108">
|
||||
<reference key="NSMenu" ref="43653270"/>
|
||||
<string key="NSTitle">Hide NewApplication</string>
|
||||
<string key="NSKeyEquiv">h</string>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="173048731"/>
|
||||
<reference key="NSMixedImage" ref="418662321"/>
|
||||
</object>
|
||||
<object class="NSMenuItem" id="904156917">
|
||||
<reference key="NSMenu" ref="43653270"/>
|
||||
<string key="NSTitle">Hide Others</string>
|
||||
<string key="NSKeyEquiv">h</string>
|
||||
<int key="NSKeyEquivModMask">1572864</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="173048731"/>
|
||||
<reference key="NSMixedImage" ref="418662321"/>
|
||||
</object>
|
||||
<object class="NSMenuItem" id="822293596">
|
||||
<reference key="NSMenu" ref="43653270"/>
|
||||
<string key="NSTitle">Show All</string>
|
||||
<string key="NSKeyEquiv"/>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="173048731"/>
|
||||
<reference key="NSMixedImage" ref="418662321"/>
|
||||
</object>
|
||||
<object class="NSMenuItem" id="650591752">
|
||||
<reference key="NSMenu" ref="43653270"/>
|
||||
<bool key="NSIsDisabled">YES</bool>
|
||||
<bool key="NSIsSeparator">YES</bool>
|
||||
<string key="NSTitle"/>
|
||||
<string key="NSKeyEquiv"/>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="173048731"/>
|
||||
<reference key="NSMixedImage" ref="418662321"/>
|
||||
</object>
|
||||
<object class="NSMenuItem" id="781815771">
|
||||
<reference key="NSMenu" ref="43653270"/>
|
||||
<string key="NSTitle">Quit NewApplication</string>
|
||||
<string key="NSKeyEquiv"/>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="173048731"/>
|
||||
<reference key="NSMixedImage" ref="418662321"/>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSName">_NSAppleMenu</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSName">_NSMainMenu</string>
|
||||
</object>
|
||||
<object class="NSWindowTemplate" id="395427424">
|
||||
<int key="NSWindowStyleMask">5</int>
|
||||
<int key="NSWindowBacking">2</int>
|
||||
<string key="NSWindowRect">{{443, 498}, {508, 123}}</string>
|
||||
<int key="NSWTFlags">1946157056</int>
|
||||
<string key="NSWindowTitle">Managed Software Update</string>
|
||||
<string key="NSWindowClass">NSWindow</string>
|
||||
<nil key="NSViewClass"/>
|
||||
<string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
|
||||
<string key="NSWindowContentMinSize">{213, 107}</string>
|
||||
<object class="NSView" key="NSWindowView" id="758612068">
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">256</int>
|
||||
<object class="NSMutableArray" key="NSSubviews">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSTextField" id="647484157">
|
||||
<reference key="NSNextResponder" ref="758612068"/>
|
||||
<int key="NSvFlags">290</int>
|
||||
<string key="NSFrame">{{101, 90}, {369, 17}}</string>
|
||||
<reference key="NSSuperview" ref="758612068"/>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSTextFieldCell" key="NSCell" id="304405205">
|
||||
<int key="NSCellFlags">67239424</int>
|
||||
<int key="NSCellFlags2">272629760</int>
|
||||
<string key="NSContents"/>
|
||||
<object class="NSFont" key="NSSupport">
|
||||
<string key="NSName">LucidaGrande-Bold</string>
|
||||
<double key="NSSize">1.300000e+01</double>
|
||||
<int key="NSfFlags">16</int>
|
||||
</object>
|
||||
<reference key="NSControlView" ref="647484157"/>
|
||||
<object class="NSColor" key="NSBackgroundColor" id="726718538">
|
||||
<int key="NSColorSpace">6</int>
|
||||
<string key="NSCatalogName">System</string>
|
||||
<string key="NSColorName">controlColor</string>
|
||||
<object class="NSColor" key="NSColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MC42NjY2NjY2OQA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSColor" key="NSTextColor" id="586387264">
|
||||
<int key="NSColorSpace">6</int>
|
||||
<string key="NSCatalogName">System</string>
|
||||
<string key="NSColorName">controlTextColor</string>
|
||||
<object class="NSColor" key="NSColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MAA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSImageView" id="717337505">
|
||||
<reference key="NSNextResponder" ref="758612068"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<object class="NSMutableSet" key="NSDragTypes">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSMutableArray" key="set.sortedObjects">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>Apple PDF pasteboard type</string>
|
||||
<string>Apple PICT pasteboard type</string>
|
||||
<string>Apple PNG pasteboard type</string>
|
||||
<string>NSFilenamesPboardType</string>
|
||||
<string>NeXT Encapsulated PostScript v1.2 pasteboard type</string>
|
||||
<string>NeXT TIFF v4.0 pasteboard type</string>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrame">{{24, 43}, {64, 64}}</string>
|
||||
<reference key="NSSuperview" ref="758612068"/>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSImageCell" key="NSCell" id="463554368">
|
||||
<int key="NSCellFlags">130560</int>
|
||||
<int key="NSCellFlags2">33554432</int>
|
||||
<object class="NSCustomResource" key="NSContents">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">Installer</string>
|
||||
</object>
|
||||
<int key="NSAlign">0</int>
|
||||
<int key="NSScale">0</int>
|
||||
<int key="NSStyle">0</int>
|
||||
<bool key="NSAnimates">NO</bool>
|
||||
</object>
|
||||
<bool key="NSEditable">YES</bool>
|
||||
</object>
|
||||
<object class="NSTextField" id="908929337">
|
||||
<reference key="NSNextResponder" ref="758612068"/>
|
||||
<int key="NSvFlags">290</int>
|
||||
<string key="NSFrame">{{101, 41}, {390, 17}}</string>
|
||||
<reference key="NSSuperview" ref="758612068"/>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSTextFieldCell" key="NSCell" id="809075924">
|
||||
<int key="NSCellFlags">67239424</int>
|
||||
<int key="NSCellFlags2">4194304</int>
|
||||
<string key="NSContents"/>
|
||||
<object class="NSFont" key="NSSupport">
|
||||
<string key="NSName">LucidaGrande</string>
|
||||
<double key="NSSize">1.100000e+01</double>
|
||||
<int key="NSfFlags">3100</int>
|
||||
</object>
|
||||
<reference key="NSControlView" ref="908929337"/>
|
||||
<reference key="NSBackgroundColor" ref="726718538"/>
|
||||
<reference key="NSTextColor" ref="586387264"/>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSProgressIndicator" id="350031422">
|
||||
<reference key="NSNextResponder" ref="758612068"/>
|
||||
<int key="NSvFlags">1316</int>
|
||||
<object class="NSPSMatrix" key="NSDrawMatrix"/>
|
||||
<string key="NSFrame">{{102, 62}, {384, 20}}</string>
|
||||
<reference key="NSSuperview" ref="758612068"/>
|
||||
<int key="NSpiFlags">16396</int>
|
||||
<double key="NSMaxValue">1.000000e+02</double>
|
||||
</object>
|
||||
<object class="NSButton" id="465293275">
|
||||
<reference key="NSNextResponder" ref="758612068"/>
|
||||
<int key="NSvFlags">289</int>
|
||||
<string key="NSFrame">{{410, 12}, {84, 32}}</string>
|
||||
<reference key="NSSuperview" ref="758612068"/>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSButtonCell" key="NSCell" id="96254482">
|
||||
<int key="NSCellFlags">67239424</int>
|
||||
<int key="NSCellFlags2">134217728</int>
|
||||
<string key="NSContents">Stop</string>
|
||||
<object class="NSFont" key="NSSupport" id="114185478">
|
||||
<string key="NSName">LucidaGrande</string>
|
||||
<double key="NSSize">1.300000e+01</double>
|
||||
<int key="NSfFlags">1044</int>
|
||||
</object>
|
||||
<reference key="NSControlView" ref="465293275"/>
|
||||
<int key="NSButtonFlags">-1232977665</int>
|
||||
<int key="NSButtonFlags2">268435457</int>
|
||||
<reference key="NSAlternateImage" ref="114185478"/>
|
||||
<string key="NSAlternateContents"/>
|
||||
<string key="NSKeyEquivalent">.</string>
|
||||
<int key="NSPeriodicDelay">200</int>
|
||||
<int key="NSPeriodicInterval">25</int>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrameSize">{508, 123}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
</object>
|
||||
<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
|
||||
<string key="NSMinSize">{213, 129}</string>
|
||||
<string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||
<object class="NSMutableArray" key="connectionRecords">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">orderFrontStandardAboutPanel:</string>
|
||||
<reference key="source" ref="770919419"/>
|
||||
<reference key="destination" ref="402782179"/>
|
||||
</object>
|
||||
<int key="connectionID">360</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">hide:</string>
|
||||
<reference key="source" ref="770919419"/>
|
||||
<reference key="destination" ref="600599108"/>
|
||||
</object>
|
||||
<int key="connectionID">361</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">hideOtherApplications:</string>
|
||||
<reference key="source" ref="770919419"/>
|
||||
<reference key="destination" ref="904156917"/>
|
||||
</object>
|
||||
<int key="connectionID">362</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">unhideAllApplications:</string>
|
||||
<reference key="source" ref="770919419"/>
|
||||
<reference key="destination" ref="822293596"/>
|
||||
</object>
|
||||
<int key="connectionID">363</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">terminate:</string>
|
||||
<reference key="source" ref="770919419"/>
|
||||
<reference key="destination" ref="781815771"/>
|
||||
</object>
|
||||
<int key="connectionID">364</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<object class="NSArray" key="orderedObjects">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">0</int>
|
||||
<object class="NSArray" key="object" id="328754663">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<reference key="children" ref="627461608"/>
|
||||
<nil key="parent"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-2</int>
|
||||
<reference key="object" ref="770919419"/>
|
||||
<reference key="parent" ref="328754663"/>
|
||||
<string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-1</int>
|
||||
<reference key="object" ref="212333292"/>
|
||||
<reference key="parent" ref="328754663"/>
|
||||
<string key="objectName">First Responder</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-3</int>
|
||||
<reference key="object" ref="324411882"/>
|
||||
<reference key="parent" ref="328754663"/>
|
||||
<string key="objectName">Application</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">280</int>
|
||||
<reference key="object" ref="243632545"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="475740837"/>
|
||||
</object>
|
||||
<reference key="parent" ref="328754663"/>
|
||||
<string key="objectName">MainMenu</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">286</int>
|
||||
<reference key="object" ref="475740837"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="43653270"/>
|
||||
</object>
|
||||
<reference key="parent" ref="243632545"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">293</int>
|
||||
<reference key="object" ref="43653270"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="904156917"/>
|
||||
<reference ref="650591752"/>
|
||||
<reference ref="611149323"/>
|
||||
<reference ref="153829354"/>
|
||||
<reference ref="75132000"/>
|
||||
<reference ref="781815771"/>
|
||||
<reference ref="822293596"/>
|
||||
<reference ref="600599108"/>
|
||||
<reference ref="402782179"/>
|
||||
</object>
|
||||
<reference key="parent" ref="475740837"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">294</int>
|
||||
<reference key="object" ref="904156917"/>
|
||||
<reference key="parent" ref="43653270"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">295</int>
|
||||
<reference key="object" ref="650591752"/>
|
||||
<reference key="parent" ref="43653270"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">296</int>
|
||||
<reference key="object" ref="611149323"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="232863866"/>
|
||||
</object>
|
||||
<reference key="parent" ref="43653270"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">297</int>
|
||||
<reference key="object" ref="153829354"/>
|
||||
<reference key="parent" ref="43653270"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">300</int>
|
||||
<reference key="object" ref="75132000"/>
|
||||
<reference key="parent" ref="43653270"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">301</int>
|
||||
<reference key="object" ref="781815771"/>
|
||||
<reference key="parent" ref="43653270"/>
|
||||
<string key="objectName">1111</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">302</int>
|
||||
<reference key="object" ref="822293596"/>
|
||||
<reference key="parent" ref="43653270"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">303</int>
|
||||
<reference key="object" ref="600599108"/>
|
||||
<reference key="parent" ref="43653270"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">304</int>
|
||||
<reference key="object" ref="402782179"/>
|
||||
<reference key="parent" ref="43653270"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">305</int>
|
||||
<reference key="object" ref="232863866"/>
|
||||
<reference key="parent" ref="611149323"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">430</int>
|
||||
<reference key="object" ref="395427424"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="758612068"/>
|
||||
</object>
|
||||
<reference key="parent" ref="328754663"/>
|
||||
<string key="objectName">Window</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">431</int>
|
||||
<reference key="object" ref="758612068"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="465293275"/>
|
||||
<reference ref="350031422"/>
|
||||
<reference ref="908929337"/>
|
||||
<reference ref="647484157"/>
|
||||
<reference ref="717337505"/>
|
||||
</object>
|
||||
<reference key="parent" ref="395427424"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">432</int>
|
||||
<reference key="object" ref="465293275"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="96254482"/>
|
||||
</object>
|
||||
<reference key="parent" ref="758612068"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">433</int>
|
||||
<reference key="object" ref="350031422"/>
|
||||
<reference key="parent" ref="758612068"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">434</int>
|
||||
<reference key="object" ref="908929337"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="809075924"/>
|
||||
</object>
|
||||
<reference key="parent" ref="758612068"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">435</int>
|
||||
<reference key="object" ref="647484157"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="304405205"/>
|
||||
</object>
|
||||
<reference key="parent" ref="758612068"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">436</int>
|
||||
<reference key="object" ref="717337505"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="463554368"/>
|
||||
</object>
|
||||
<reference key="parent" ref="758612068"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">437</int>
|
||||
<reference key="object" ref="463554368"/>
|
||||
<reference key="parent" ref="717337505"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">438</int>
|
||||
<reference key="object" ref="304405205"/>
|
||||
<reference key="parent" ref="647484157"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">439</int>
|
||||
<reference key="object" ref="809075924"/>
|
||||
<reference key="parent" ref="908929337"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">440</int>
|
||||
<reference key="object" ref="96254482"/>
|
||||
<reference key="parent" ref="465293275"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="flattenedProperties">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSMutableArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>-1.IBPluginDependency</string>
|
||||
<string>-2.IBPluginDependency</string>
|
||||
<string>-3.IBAttributePlaceholdersKey</string>
|
||||
<string>-3.IBPluginDependency</string>
|
||||
<string>280.IBEditorWindowLastContentRect</string>
|
||||
<string>280.IBPluginDependency</string>
|
||||
<string>280.ImportedFromIB2</string>
|
||||
<string>280.WindowOrigin</string>
|
||||
<string>280.editorWindowContentRectSynchronizationRect</string>
|
||||
<string>286.IBPluginDependency</string>
|
||||
<string>286.ImportedFromIB2</string>
|
||||
<string>293.IBEditorWindowLastContentRect</string>
|
||||
<string>293.IBPluginDependency</string>
|
||||
<string>293.ImportedFromIB2</string>
|
||||
<string>293.editorWindowContentRectSynchronizationRect</string>
|
||||
<string>294.IBPluginDependency</string>
|
||||
<string>294.ImportedFromIB2</string>
|
||||
<string>295.IBPluginDependency</string>
|
||||
<string>295.ImportedFromIB2</string>
|
||||
<string>296.IBPluginDependency</string>
|
||||
<string>296.ImportedFromIB2</string>
|
||||
<string>297.IBPluginDependency</string>
|
||||
<string>297.ImportedFromIB2</string>
|
||||
<string>300.IBPluginDependency</string>
|
||||
<string>300.ImportedFromIB2</string>
|
||||
<string>301.IBPluginDependency</string>
|
||||
<string>301.ImportedFromIB2</string>
|
||||
<string>302.IBPluginDependency</string>
|
||||
<string>302.ImportedFromIB2</string>
|
||||
<string>303.IBPluginDependency</string>
|
||||
<string>303.ImportedFromIB2</string>
|
||||
<string>304.IBPluginDependency</string>
|
||||
<string>304.ImportedFromIB2</string>
|
||||
<string>305.IBPluginDependency</string>
|
||||
<string>305.ImportedFromIB2</string>
|
||||
<string>305.editorWindowContentRectSynchronizationRect</string>
|
||||
<string>430.IBAttributePlaceholdersKey</string>
|
||||
<string>430.IBEditorWindowLastContentRect</string>
|
||||
<string>430.IBWindowTemplateEditedContentRect</string>
|
||||
<string>430.NSWindowTemplate.visibleAtLaunch</string>
|
||||
<string>430.editorWindowContentRectSynchronizationRect</string>
|
||||
<string>430.windowTemplate.hasMinSize</string>
|
||||
<string>430.windowTemplate.minSize</string>
|
||||
<string>431.IBPluginDependency</string>
|
||||
<string>432.IBAttributePlaceholdersKey</string>
|
||||
<string>432.IBPluginDependency</string>
|
||||
<string>432.ImportedFromIB2</string>
|
||||
<string>433.IBAttributePlaceholdersKey</string>
|
||||
<string>433.IBPluginDependency</string>
|
||||
<string>433.ImportedFromIB2</string>
|
||||
<string>434.IBAttributePlaceholdersKey</string>
|
||||
<string>434.IBPluginDependency</string>
|
||||
<string>434.ImportedFromIB2</string>
|
||||
<string>435.IBAttributePlaceholdersKey</string>
|
||||
<string>435.IBPluginDependency</string>
|
||||
<string>436.IBAttributePlaceholdersKey</string>
|
||||
<string>436.IBPluginDependency</string>
|
||||
<string>437.IBPluginDependency</string>
|
||||
<string>438.IBPluginDependency</string>
|
||||
<string>439.IBPluginDependency</string>
|
||||
<string>440.IBPluginDependency</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<object class="NSMutableDictionary">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
</object>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>{{0, 803}, {156, 20}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<integer value="1" id="9"/>
|
||||
<string>{74, 862}</string>
|
||||
<string>{{73, 832}, {478, 20}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<string>{{12, 650}, {245, 153}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<string>{{26, 652}, {245, 183}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<string>{{874, 561}, {64, 6}}</string>
|
||||
<object class="NSMutableDictionary">
|
||||
<string key="NS.key.0">IBAppleScriptAttributeName</string>
|
||||
<object class="IBAppleScriptInfoAttribute" key="NS.object.0">
|
||||
<string key="name">IBAppleScriptAttributeName</string>
|
||||
<reference key="object" ref="395427424"/>
|
||||
<int key="appleScriptObjectID">0</int>
|
||||
<int key="appleScriptScriptScope">0</int>
|
||||
<object class="NSArray" key="appleScriptEventHandlerNames">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>AwakeFromNib</string>
|
||||
</object>
|
||||
<string key="appleScriptScriptName">MunkiStatus.applescript</string>
|
||||
<string key="appleScriptObjectName">mainWindow</string>
|
||||
</object>
|
||||
</object>
|
||||
<string>{{112, 97}, {508, 123}}</string>
|
||||
<string>{{112, 97}, {508, 123}}</string>
|
||||
<boolean value="NO"/>
|
||||
<string>{{238, 285}, {480, 360}}</string>
|
||||
<boolean value="YES" id="5"/>
|
||||
<string>{213, 107}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<object class="NSMutableDictionary">
|
||||
<string key="NS.key.0">IBAppleScriptAttributeName</string>
|
||||
<object class="IBAppleScriptInfoAttribute" key="NS.object.0">
|
||||
<string key="name">IBAppleScriptAttributeName</string>
|
||||
<reference key="object" ref="465293275"/>
|
||||
<int key="appleScriptObjectID">0</int>
|
||||
<int key="appleScriptScriptScope">0</int>
|
||||
<object class="NSArray" key="appleScriptEventHandlerNames">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>Clicked</string>
|
||||
</object>
|
||||
<string key="appleScriptScriptName">MunkiStatus.applescript</string>
|
||||
<string key="appleScriptObjectName">stopBtn</string>
|
||||
</object>
|
||||
</object>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="5"/>
|
||||
<object class="NSMutableDictionary">
|
||||
<string key="NS.key.0">IBAppleScriptAttributeName</string>
|
||||
<object class="IBAppleScriptInfoAttribute" key="NS.object.0">
|
||||
<string key="name">IBAppleScriptAttributeName</string>
|
||||
<reference key="object" ref="350031422"/>
|
||||
<int key="appleScriptObjectID">0</int>
|
||||
<int key="appleScriptScriptScope">0</int>
|
||||
<nil key="appleScriptEventHandlerNames"/>
|
||||
<string key="appleScriptScriptName">MunkiStatus.applescript</string>
|
||||
<string key="appleScriptObjectName">progressBar</string>
|
||||
</object>
|
||||
</object>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="5"/>
|
||||
<object class="NSMutableDictionary">
|
||||
<string key="NS.key.0">IBAppleScriptAttributeName</string>
|
||||
<object class="IBAppleScriptInfoAttribute" key="NS.object.0">
|
||||
<string key="name">IBAppleScriptAttributeName</string>
|
||||
<reference key="object" ref="908929337"/>
|
||||
<int key="appleScriptObjectID">0</int>
|
||||
<int key="appleScriptScriptScope">0</int>
|
||||
<nil key="appleScriptEventHandlerNames"/>
|
||||
<string key="appleScriptScriptName">MunkiStatus.applescript</string>
|
||||
<string key="appleScriptObjectName">minorTextFld</string>
|
||||
</object>
|
||||
</object>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="5"/>
|
||||
<object class="NSMutableDictionary">
|
||||
<string key="NS.key.0">IBAppleScriptAttributeName</string>
|
||||
<object class="IBAppleScriptInfoAttribute" key="NS.object.0">
|
||||
<string key="name">IBAppleScriptAttributeName</string>
|
||||
<reference key="object" ref="647484157"/>
|
||||
<int key="appleScriptObjectID">0</int>
|
||||
<int key="appleScriptScriptScope">0</int>
|
||||
<nil key="appleScriptEventHandlerNames"/>
|
||||
<string key="appleScriptScriptName">MunkiStatus.applescript</string>
|
||||
<string key="appleScriptObjectName">mainTextFld</string>
|
||||
</object>
|
||||
</object>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<object class="NSMutableDictionary">
|
||||
<string key="NS.key.0">IBAppleScriptAttributeName</string>
|
||||
<object class="IBAppleScriptInfoAttribute" key="NS.object.0">
|
||||
<string key="name">IBAppleScriptAttributeName</string>
|
||||
<reference key="object" ref="717337505"/>
|
||||
<int key="appleScriptObjectID">0</int>
|
||||
<int key="appleScriptScriptScope">0</int>
|
||||
<nil key="appleScriptEventHandlerNames"/>
|
||||
<string key="appleScriptScriptName">MunkiStatus.applescript</string>
|
||||
<string key="appleScriptObjectName">imageFld</string>
|
||||
</object>
|
||||
</object>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="unlocalizedProperties">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
</object>
|
||||
<nil key="activeLocalization"/>
|
||||
<object class="NSMutableDictionary" key="localizations">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
</object>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">440</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">FirstResponder</string>
|
||||
<string key="superclassName">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBUserSource</string>
|
||||
<string key="minorKey"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<string key="IBDocument.LastKnownRelativeProjectPath">../MunkiStatus.xcodeproj</string>
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
</data>
|
||||
</archive>
|
||||
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.disneyanimation.MunkiStatus</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>NSAppleScriptEnabled</key>
|
||||
<string>YES</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>LSUIElement</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
Executable
+56
@@ -0,0 +1,56 @@
|
||||
-- MunkiStatus.applescript
|
||||
-- MunkiStatus
|
||||
|
||||
-- Created by Greg Neagle on 4/17/09.
|
||||
|
||||
--
|
||||
-- Copyright 2009 Greg Neagle.
|
||||
--
|
||||
-- Licensed under the Apache License, Version 2.0 (the "License");
|
||||
-- you may not use this file except in compliance with the License.
|
||||
-- You may obtain a copy of the License at
|
||||
--
|
||||
-- http://www.apache.org/licenses/LICENSE-2.0
|
||||
--
|
||||
-- Unless required by applicable law or agreed to in writing, software
|
||||
-- distributed under the License is distributed on an "AS IS" BASIS,
|
||||
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
-- See the License for the specific language governing permissions and
|
||||
-- limitations under the License.
|
||||
|
||||
|
||||
on clicked theObject
|
||||
if the name of theObject is "stopBtn" then
|
||||
set the state of theObject to 1
|
||||
set enabled of theObject to false
|
||||
end if
|
||||
end clicked
|
||||
|
||||
--#define kCGNormalWindowLevel 0
|
||||
--#define kCGStatusWindowLevel 25
|
||||
--#define kCGScreenSaverWindowLevel 1000
|
||||
|
||||
property kCGNormalWindowLevel : 0
|
||||
property kCGStatusWindowLevel : 25
|
||||
property kCGScreenSaverWindowLevel : 1000
|
||||
|
||||
on awake from nib theObject
|
||||
if name of theObject is "mainWindow" then
|
||||
-- Leopard is picky about what we can display over the loginwindow
|
||||
call method "setCanBecomeVisibleWithoutLogin:" of theObject with parameter 1
|
||||
|
||||
--if we are in the loginwindow context, we need to set the window level so
|
||||
--we'll show above the loginwindow
|
||||
set myScript to "/usr/bin/who | /usr/bin/grep console"
|
||||
try
|
||||
copy (do shell script myScript) to result
|
||||
on error
|
||||
--grep throws an error if no match
|
||||
--no-one is logged in. We must be at the loginwindow.
|
||||
call method "setLevel:" of theObject with parameter (kCGScreenSaverWindowLevel - 1)
|
||||
end try
|
||||
|
||||
set visible of theObject to true
|
||||
activate
|
||||
end if
|
||||
end awake from nib
|
||||
@@ -0,0 +1,91 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
257572C2072881A4000BE9CA = {
|
||||
activeExec = 0;
|
||||
executables = (
|
||||
25D9445407B1533600FF306F,
|
||||
);
|
||||
};
|
||||
25D9445407B1533600FF306F = {
|
||||
activeArgIndex = 2147483647;
|
||||
activeArgIndices = (
|
||||
);
|
||||
argumentStrings = (
|
||||
);
|
||||
configStateDict = {
|
||||
"PBXLSLaunchAction-1" = {
|
||||
PBXLSLaunchAction = 1;
|
||||
PBXLSLaunchStartAction = 1;
|
||||
PBXLSLaunchStdioStyle = 2;
|
||||
PBXLSLaunchStyle = 0;
|
||||
class = ASKDebuggerLaunchConfig;
|
||||
displayName = "AppleScript Debugger";
|
||||
identifier = com.apple.AppleScriptStudio.ASKDebugLaunchConfig;
|
||||
remoteHostInfo = "";
|
||||
startActionInfo = "";
|
||||
};
|
||||
};
|
||||
cppStopOnCatchEnabled = 0;
|
||||
cppStopOnThrowEnabled = 0;
|
||||
customDataFormattersEnabled = 1;
|
||||
debuggerPlugin = ASKDebugger;
|
||||
disassemblyDisplayState = 0;
|
||||
dylibVariantSuffix = "";
|
||||
enableDebugStr = 1;
|
||||
environmentEntries = (
|
||||
{
|
||||
active = NO;
|
||||
name = AEDebug;
|
||||
value = 1;
|
||||
},
|
||||
{
|
||||
active = NO;
|
||||
name = AEDebugSends;
|
||||
value = 1;
|
||||
},
|
||||
{
|
||||
active = NO;
|
||||
name = AEDebugReceives;
|
||||
value = 1;
|
||||
},
|
||||
{
|
||||
active = NO;
|
||||
name = AEDebugVerbose;
|
||||
value = 1;
|
||||
},
|
||||
);
|
||||
executableSystemSymbolLevel = 0;
|
||||
executableUserSymbolLevel = 0;
|
||||
isa = PBXExecutable;
|
||||
libgmallocEnabled = 0;
|
||||
name = "MunkiStatus";
|
||||
shlibInfoDictList = (
|
||||
);
|
||||
sourceDirectories = (
|
||||
);
|
||||
};
|
||||
25D9445A07B1533700FF306F = {
|
||||
fallbackIsa = XCSourceControlManager;
|
||||
isSCMEnabled = 0;
|
||||
isa = PBXSourceControlManager;
|
||||
scmConfiguration = {
|
||||
};
|
||||
scmType = "";
|
||||
};
|
||||
25D9445B07B1533700FF306F = {
|
||||
indexTemplatePath = "";
|
||||
isa = PBXCodeSenseManager;
|
||||
};
|
||||
29B97313FDCFA39411CA2CEA = {
|
||||
activeBuildStyle = 4A9504CCFFE6A4B311CA0CBA;
|
||||
activeExecutable = 25D9445407B1533600FF306F;
|
||||
activeTarget = 257572C2072881A4000BE9CA;
|
||||
codeSenseManager = 25D9445B07B1533700FF306F;
|
||||
executables = (
|
||||
25D9445407B1533600FF306F,
|
||||
);
|
||||
sourceControlManager = 25D9445A07B1533700FF306F;
|
||||
userBuildSettings = {
|
||||
};
|
||||
};
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,389 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
089C165DFE840E0CC02AAC07 /* English */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {1303, 690}}";
|
||||
sepNavSelRange = "{0, 0}";
|
||||
sepNavVisRange = "{0, 113}";
|
||||
sepNavWindowFrame = "{{15, 55}, {1362, 818}}";
|
||||
};
|
||||
};
|
||||
257572C2072881A4000BE9CA /* MunkiStatus */ = {
|
||||
activeExec = 0;
|
||||
executables = (
|
||||
25D9445407B1533600FF306F /* MunkiStatus */,
|
||||
);
|
||||
};
|
||||
257572D5072881A4000BE9CA /* Info.plist */ = {
|
||||
uiCtxt = {
|
||||
sepNavWindowFrame = "{{131, 60}, {1362, 818}}";
|
||||
};
|
||||
};
|
||||
25D9445407B1533600FF306F /* MunkiStatus */ = {
|
||||
isa = PBXExecutable;
|
||||
activeArgIndices = (
|
||||
);
|
||||
argumentStrings = (
|
||||
);
|
||||
autoAttachOnCrash = 1;
|
||||
breakpointsEnabled = 0;
|
||||
configStateDict = {
|
||||
"PBXLSLaunchAction-1" = {
|
||||
PBXLSLaunchAction = 1;
|
||||
PBXLSLaunchStartAction = 1;
|
||||
PBXLSLaunchStdioStyle = 2;
|
||||
PBXLSLaunchStyle = 0;
|
||||
class = ASKDebuggerLaunchConfig;
|
||||
displayName = "AppleScript Debugger";
|
||||
identifier = com.apple.AppleScriptStudio.ASKDebugLaunchConfig;
|
||||
remoteHostInfo = "";
|
||||
startActionInfo = "";
|
||||
};
|
||||
};
|
||||
customDataFormattersEnabled = 1;
|
||||
debuggerPlugin = ASKDebugger;
|
||||
disassemblyDisplayState = 0;
|
||||
dylibVariantSuffix = "";
|
||||
enableDebugStr = 1;
|
||||
environmentEntries = (
|
||||
{
|
||||
active = NO;
|
||||
name = AEDebug;
|
||||
value = 1;
|
||||
},
|
||||
{
|
||||
active = NO;
|
||||
name = AEDebugSends;
|
||||
value = 1;
|
||||
},
|
||||
{
|
||||
active = NO;
|
||||
name = AEDebugReceives;
|
||||
value = 1;
|
||||
},
|
||||
{
|
||||
active = NO;
|
||||
name = AEDebugVerbose;
|
||||
value = 1;
|
||||
},
|
||||
);
|
||||
executableSystemSymbolLevel = 0;
|
||||
executableUserSymbolLevel = 0;
|
||||
libgmallocEnabled = 0;
|
||||
name = MunkiStatus;
|
||||
sourceDirectories = (
|
||||
);
|
||||
};
|
||||
25D9445A07B1533700FF306F /* Source Control */ = {
|
||||
isa = PBXSourceControlManager;
|
||||
fallbackIsa = XCSourceControlManager;
|
||||
isSCMEnabled = 0;
|
||||
scmConfiguration = {
|
||||
};
|
||||
scmType = "";
|
||||
};
|
||||
25D9445B07B1533700FF306F /* Code sense */ = {
|
||||
isa = PBXCodeSenseManager;
|
||||
indexTemplatePath = "";
|
||||
};
|
||||
29B97313FDCFA39411CA2CEA /* Project object */ = {
|
||||
activeBuildConfigurationName = Release;
|
||||
activeExecutable = 25D9445407B1533600FF306F /* MunkiStatus */;
|
||||
activeTarget = 257572C2072881A4000BE9CA /* MunkiStatus */;
|
||||
addToTargets = (
|
||||
257572C2072881A4000BE9CA /* MunkiStatus */,
|
||||
);
|
||||
codeSenseManager = 25D9445B07B1533700FF306F /* Code sense */;
|
||||
executables = (
|
||||
25D9445407B1533600FF306F /* MunkiStatus */,
|
||||
);
|
||||
perUserDictionary = {
|
||||
PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
|
||||
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
|
||||
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
|
||||
PBXFileTableDataSourceColumnWidthsKey = (
|
||||
20,
|
||||
631,
|
||||
20,
|
||||
48,
|
||||
43,
|
||||
43,
|
||||
20,
|
||||
);
|
||||
PBXFileTableDataSourceColumnsKey = (
|
||||
PBXFileDataSource_FiletypeID,
|
||||
PBXFileDataSource_Filename_ColumnID,
|
||||
PBXFileDataSource_Built_ColumnID,
|
||||
PBXFileDataSource_ObjectSize_ColumnID,
|
||||
PBXFileDataSource_Errors_ColumnID,
|
||||
PBXFileDataSource_Warnings_ColumnID,
|
||||
PBXFileDataSource_Target_ColumnID,
|
||||
);
|
||||
};
|
||||
PBXPerProjectTemplateStateSaveDate = 262042784;
|
||||
PBXWorkspaceStateSaveDate = 262042784;
|
||||
};
|
||||
perUserProjectItems = {
|
||||
C05FFDD00F9E742400A56C5C /* PBXTextBookmark */ = C05FFDD00F9E742400A56C5C /* PBXTextBookmark */;
|
||||
C05FFDD10F9E742400A56C5C /* PBXTextBookmark */ = C05FFDD10F9E742400A56C5C /* PBXTextBookmark */;
|
||||
C05FFDD30F9E742400A56C5C /* PBXBookmark */ = C05FFDD30F9E742400A56C5C /* PBXBookmark */;
|
||||
C05FFDD50F9E742400A56C5C /* PBXTextBookmark */ = C05FFDD50F9E742400A56C5C /* PBXTextBookmark */;
|
||||
C0C84DB50F99218900B6518D /* PBXBookmark */ = C0C84DB50F99218900B6518D /* PBXBookmark */;
|
||||
C0C84DB60F99218900B6518D /* PBXBookmark */ = C0C84DB60F99218900B6518D /* PBXBookmark */;
|
||||
C0C84DBA0F99218900B6518D /* PBXTextBookmark */ = C0C84DBA0F99218900B6518D /* PBXTextBookmark */;
|
||||
C0C84DBC0F99218900B6518D /* PBXTextBookmark */ = C0C84DBC0F99218900B6518D /* PBXTextBookmark */;
|
||||
C0C84DBF0F99218900B6518D /* PBXBookmark */ = C0C84DBF0F99218900B6518D /* PBXBookmark */;
|
||||
C0C84DC00F99218900B6518D /* PBXBookmark */ = C0C84DC00F99218900B6518D /* PBXBookmark */;
|
||||
C0C84DC10F99218900B6518D /* PBXTextBookmark */ = C0C84DC10F99218900B6518D /* PBXTextBookmark */;
|
||||
C0C84DC20F99218900B6518D /* PBXTextBookmark */ = C0C84DC20F99218900B6518D /* PBXTextBookmark */;
|
||||
C0C84DC30F99218900B6518D /* PBXBookmark */ = C0C84DC30F99218900B6518D /* PBXBookmark */;
|
||||
C0C84DC50F99218900B6518D /* PlistBookmark */ = C0C84DC50F99218900B6518D /* PlistBookmark */;
|
||||
C0C84DC70F99218900B6518D /* PBXTextBookmark */ = C0C84DC70F99218900B6518D /* PBXTextBookmark */;
|
||||
C0C84DC90F99218900B6518D /* PBXTextBookmark */ = C0C84DC90F99218900B6518D /* PBXTextBookmark */;
|
||||
C0E765950F9E74B200E9F8C1 /* PlistBookmark */ = C0E765950F9E74B200E9F8C1 /* PlistBookmark */;
|
||||
C0E765960F9E74B200E9F8C1 /* PBXTextBookmark */ = C0E765960F9E74B200E9F8C1 /* PBXTextBookmark */;
|
||||
C0E765970F9E74B200E9F8C1 /* PlistBookmark */ = C0E765970F9E74B200E9F8C1 /* PlistBookmark */;
|
||||
C0E765980F9E74B200E9F8C1 /* PBXTextBookmark */ = C0E765980F9E74B200E9F8C1 /* PBXTextBookmark */;
|
||||
C0E7659D0F9E750300E9F8C1 /* PBXTextBookmark */ = C0E7659D0F9E750300E9F8C1 /* PBXTextBookmark */;
|
||||
};
|
||||
sourceControlManager = 25D9445A07B1533700FF306F /* Source Control */;
|
||||
userBuildSettings = {
|
||||
};
|
||||
};
|
||||
29B97316FDCFA39411CA2CEA /* main.m */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {809, 443}}";
|
||||
sepNavSelRange = "{0, 0}";
|
||||
sepNavVisRange = "{0, 197}";
|
||||
};
|
||||
};
|
||||
C05FFDD00F9E742400A56C5C /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = DA206CF3015C4E8B03C91932 /* MunkiStatus.applescript */;
|
||||
name = "MunkiStatus.applescript: 41";
|
||||
rLen = 0;
|
||||
rLoc = 1780;
|
||||
rType = 0;
|
||||
vrLen = 904;
|
||||
vrLoc = 0;
|
||||
};
|
||||
C05FFDD10F9E742400A56C5C /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = C05FFDD20F9E742400A56C5C /* ChemDraw.h */;
|
||||
name = "ChemDraw.h: 1";
|
||||
rLen = 0;
|
||||
rLoc = 0;
|
||||
rType = 0;
|
||||
vrLen = 1296;
|
||||
vrLoc = 19136;
|
||||
};
|
||||
C05FFDD20F9E742400A56C5C /* ChemDraw.h */ = {
|
||||
isa = PBXFileReference;
|
||||
lastKnownFileType = sourcecode.c.h;
|
||||
name = ChemDraw.h;
|
||||
path = /Users/gneagle/Downloads/ChemDraw.h;
|
||||
sourceTree = "<absolute>";
|
||||
};
|
||||
C05FFDD30F9E742400A56C5C /* PBXBookmark */ = {
|
||||
isa = PBXBookmark;
|
||||
fRef = 65359356078DD41800E8BB2F /* AppleScriptKit.sdef */;
|
||||
};
|
||||
C05FFDD50F9E742400A56C5C /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = C05FFDD60F9E742400A56C5C /* ChemDraw.h */;
|
||||
name = "ChemDraw.h: 1";
|
||||
rLen = 0;
|
||||
rLoc = 0;
|
||||
rType = 0;
|
||||
vrLen = 1296;
|
||||
vrLoc = 19136;
|
||||
};
|
||||
C05FFDD60F9E742400A56C5C /* ChemDraw.h */ = {
|
||||
isa = PBXFileReference;
|
||||
lastKnownFileType = sourcecode.c.h;
|
||||
name = ChemDraw.h;
|
||||
path = /Users/gneagle/Downloads/ChemDraw.h;
|
||||
sourceTree = "<absolute>";
|
||||
};
|
||||
C0C84DB50F99218900B6518D /* PBXBookmark */ = {
|
||||
isa = PBXBookmark;
|
||||
fRef = C0C84CCE0F98FF7800B6518D /* Installer.tiff */;
|
||||
};
|
||||
C0C84DB60F99218900B6518D /* PBXBookmark */ = {
|
||||
isa = PBXBookmark;
|
||||
fRef = C0C84CD00F98FF8400B6518D /* package.tiff */;
|
||||
};
|
||||
C0C84DBA0F99218900B6518D /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = C0C84DBB0F99218900B6518D /* ASKPluginObject.h */;
|
||||
name = "ASKPluginObject.h: 1";
|
||||
rLen = 0;
|
||||
rLoc = 0;
|
||||
rType = 0;
|
||||
vrLen = 193;
|
||||
vrLoc = 0;
|
||||
};
|
||||
C0C84DBB0F99218900B6518D /* ASKPluginObject.h */ = {
|
||||
isa = PBXFileReference;
|
||||
lastKnownFileType = sourcecode.c.h;
|
||||
name = ASKPluginObject.h;
|
||||
path = /System/Library/Frameworks/AppleScriptKit.framework/Headers/ASKPluginObject.h;
|
||||
sourceTree = "<absolute>";
|
||||
};
|
||||
C0C84DBC0F99218900B6518D /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = C0C84DBD0F99218900B6518D /* NSWindow.h */;
|
||||
name = "NSWindow.h: 1";
|
||||
rLen = 0;
|
||||
rLoc = 0;
|
||||
rType = 0;
|
||||
vrLen = 823;
|
||||
vrLoc = 0;
|
||||
};
|
||||
C0C84DBD0F99218900B6518D /* NSWindow.h */ = {
|
||||
isa = PBXFileReference;
|
||||
lastKnownFileType = sourcecode.c.h;
|
||||
name = NSWindow.h;
|
||||
path = /System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h;
|
||||
sourceTree = "<absolute>";
|
||||
};
|
||||
C0C84DBF0F99218900B6518D /* PBXBookmark */ = {
|
||||
isa = PBXBookmark;
|
||||
fRef = C0C84CCE0F98FF7800B6518D /* Installer.tiff */;
|
||||
};
|
||||
C0C84DC00F99218900B6518D /* PBXBookmark */ = {
|
||||
isa = PBXBookmark;
|
||||
fRef = C0C84CD00F98FF8400B6518D /* package.tiff */;
|
||||
};
|
||||
C0C84DC10F99218900B6518D /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = DA206CF3015C4E8B03C91932 /* MunkiStatus.applescript */;
|
||||
name = "MunkiStatus.applescript: 5";
|
||||
rLen = 0;
|
||||
rLoc = 26;
|
||||
rType = 0;
|
||||
vrLen = 293;
|
||||
vrLoc = 0;
|
||||
};
|
||||
C0C84DC20F99218900B6518D /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 29B97316FDCFA39411CA2CEA /* main.m */;
|
||||
name = "main.m: 1";
|
||||
rLen = 0;
|
||||
rLoc = 0;
|
||||
rType = 0;
|
||||
vrLen = 197;
|
||||
vrLoc = 0;
|
||||
};
|
||||
C0C84DC30F99218900B6518D /* PBXBookmark */ = {
|
||||
isa = PBXBookmark;
|
||||
fRef = 65359356078DD41800E8BB2F /* AppleScriptKit.sdef */;
|
||||
};
|
||||
C0C84DC50F99218900B6518D /* PlistBookmark */ = {
|
||||
isa = PlistBookmark;
|
||||
fRef = 257572D5072881A4000BE9CA /* Info.plist */;
|
||||
fallbackIsa = PBXBookmark;
|
||||
isK = 0;
|
||||
kPath = (
|
||||
LSUIElement,
|
||||
);
|
||||
name = /Users/gneagle/Documents/MunkiStatus/Info.plist;
|
||||
rLen = 0;
|
||||
rLoc = 2147483647;
|
||||
};
|
||||
C0C84DC70F99218900B6518D /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = C0C84DC80F99218900B6518D /* ASKPluginObject.h */;
|
||||
name = "ASKPluginObject.h: 1";
|
||||
rLen = 0;
|
||||
rLoc = 0;
|
||||
rType = 0;
|
||||
vrLen = 193;
|
||||
vrLoc = 0;
|
||||
};
|
||||
C0C84DC80F99218900B6518D /* ASKPluginObject.h */ = {
|
||||
isa = PBXFileReference;
|
||||
lastKnownFileType = sourcecode.c.h;
|
||||
name = ASKPluginObject.h;
|
||||
path = /System/Library/Frameworks/AppleScriptKit.framework/Headers/ASKPluginObject.h;
|
||||
sourceTree = "<absolute>";
|
||||
};
|
||||
C0C84DC90F99218900B6518D /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = C0C84DCA0F99218900B6518D /* NSWindow.h */;
|
||||
name = "NSWindow.h: 1";
|
||||
rLen = 0;
|
||||
rLoc = 0;
|
||||
rType = 0;
|
||||
vrLen = 823;
|
||||
vrLoc = 0;
|
||||
};
|
||||
C0C84DCA0F99218900B6518D /* NSWindow.h */ = {
|
||||
isa = PBXFileReference;
|
||||
lastKnownFileType = sourcecode.c.h;
|
||||
name = NSWindow.h;
|
||||
path = /System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h;
|
||||
sourceTree = "<absolute>";
|
||||
};
|
||||
C0E765950F9E74B200E9F8C1 /* PlistBookmark */ = {
|
||||
isa = PlistBookmark;
|
||||
fRef = 257572D5072881A4000BE9CA /* Info.plist */;
|
||||
fallbackIsa = PBXBookmark;
|
||||
isK = 0;
|
||||
kPath = (
|
||||
LSUIElement,
|
||||
);
|
||||
name = /Users/gneagle/Documents/MunkiStatus/Info.plist;
|
||||
rLen = 0;
|
||||
rLoc = 2147483647;
|
||||
};
|
||||
C0E765960F9E74B200E9F8C1 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 29B97316FDCFA39411CA2CEA /* main.m */;
|
||||
name = "main.m: 1";
|
||||
rLen = 0;
|
||||
rLoc = 0;
|
||||
rType = 0;
|
||||
vrLen = 197;
|
||||
vrLoc = 0;
|
||||
};
|
||||
C0E765970F9E74B200E9F8C1 /* PlistBookmark */ = {
|
||||
isa = PlistBookmark;
|
||||
fRef = 257572D5072881A4000BE9CA /* Info.plist */;
|
||||
fallbackIsa = PBXBookmark;
|
||||
isK = 0;
|
||||
kPath = (
|
||||
LSUIElement,
|
||||
);
|
||||
name = /Users/gneagle/Documents/MunkiStatus/Info.plist;
|
||||
rLen = 0;
|
||||
rLoc = 2147483647;
|
||||
};
|
||||
C0E765980F9E74B200E9F8C1 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 29B97316FDCFA39411CA2CEA /* main.m */;
|
||||
name = "main.m: 1";
|
||||
rLen = 0;
|
||||
rLoc = 0;
|
||||
rType = 0;
|
||||
vrLen = 197;
|
||||
vrLoc = 0;
|
||||
};
|
||||
C0E7659D0F9E750300E9F8C1 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = DA206CF3015C4E8B03C91932 /* MunkiStatus.applescript */;
|
||||
name = "MunkiStatus.applescript: 57";
|
||||
rLen = 0;
|
||||
rLoc = 1780;
|
||||
rType = 0;
|
||||
vrLen = 903;
|
||||
vrLoc = 0;
|
||||
};
|
||||
DA206CF3015C4E8B03C91932 /* MunkiStatus.applescript */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {809, 894}}";
|
||||
sepNavSelRange = "{1780, 0}";
|
||||
sepNavVisRange = "{0, 903}";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,310 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 45;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXAppleScriptBuildPhase section */
|
||||
257572C4072881A4000BE9CA /* AppleScript */ = {
|
||||
isa = PBXAppleScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
contextName = "";
|
||||
files = (
|
||||
257572C5072881A4000BE9CA /* MunkiStatus.applescript in AppleScript */,
|
||||
);
|
||||
isSharedContext = 0;
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXAppleScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
257572C5072881A4000BE9CA /* MunkiStatus.applescript in AppleScript */ = {isa = PBXBuildFile; fileRef = DA206CF3015C4E8B03C91932 /* MunkiStatus.applescript */; settings = {ATTRIBUTES = (Debug, ); }; };
|
||||
257572C8072881A4000BE9CA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
|
||||
257572CA072881A4000BE9CA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
|
||||
257572CC072881A4000BE9CA /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
|
||||
257572CD072881A4000BE9CA /* AppleScriptKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA206CF1015C4E2903C91932 /* AppleScriptKit.framework */; };
|
||||
60A014C40DBD2AA20071D9A8 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 60A014C20DBD2AA20071D9A8 /* MainMenu.xib */; };
|
||||
C0C84CCF0F98FF7800B6518D /* Installer.tiff in Resources */ = {isa = PBXBuildFile; fileRef = C0C84CCE0F98FF7800B6518D /* Installer.tiff */; };
|
||||
C0C84CD10F98FF8400B6518D /* package.tiff in Resources */ = {isa = PBXBuildFile; fileRef = C0C84CD00F98FF8400B6518D /* package.tiff */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
|
||||
257572D5072881A4000BE9CA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
257572D6072881A4000BE9CA /* MunkiStatus.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MunkiStatus.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
||||
29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
|
||||
29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
|
||||
60A014C30DBD2AA20071D9A8 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||
65359356078DD41800E8BB2F /* AppleScriptKit.sdef */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.sdef; name = AppleScriptKit.sdef; path = /System/Library/Frameworks/AppleScriptKit.framework/Versions/A/Resources/AppleScriptKit.sdef; sourceTree = "<absolute>"; };
|
||||
C0C84CCE0F98FF7800B6518D /* Installer.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = Installer.tiff; sourceTree = "<group>"; };
|
||||
C0C84CD00F98FF8400B6518D /* package.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = package.tiff; sourceTree = "<group>"; };
|
||||
DA206CF1015C4E2903C91932 /* AppleScriptKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppleScriptKit.framework; path = /System/Library/Frameworks/AppleScriptKit.framework; sourceTree = "<absolute>"; };
|
||||
DA206CF3015C4E8B03C91932 /* MunkiStatus.applescript */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.applescript; path = MunkiStatus.applescript; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
257572CB072881A4000BE9CA /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
257572CC072881A4000BE9CA /* Cocoa.framework in Frameworks */,
|
||||
257572CD072881A4000BE9CA /* AppleScriptKit.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
080E96DDFE201D6D7F000001 /* Scripts */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DA206CF3015C4E8B03C91932 /* MunkiStatus.applescript */,
|
||||
);
|
||||
name = Scripts;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
|
||||
DA206CF1015C4E2903C91932 /* AppleScriptKit.framework */,
|
||||
);
|
||||
name = "Linked Frameworks";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
29B97325FDCFA39411CA2CEA /* Foundation.framework */,
|
||||
29B97324FDCFA39411CA2CEA /* AppKit.framework */,
|
||||
);
|
||||
name = "Other Frameworks";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
19C28FACFE9D520D11CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
257572D6072881A4000BE9CA /* MunkiStatus.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97314FDCFA39411CA2CEA /* MunkiStatus */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
080E96DDFE201D6D7F000001 /* Scripts */,
|
||||
29B97317FDCFA39411CA2CEA /* Resources */,
|
||||
29B97315FDCFA39411CA2CEA /* Other Sources */,
|
||||
29B97323FDCFA39411CA2CEA /* Frameworks */,
|
||||
19C28FACFE9D520D11CA2CBB /* Products */,
|
||||
257572D5072881A4000BE9CA /* Info.plist */,
|
||||
);
|
||||
name = MunkiStatus;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97315FDCFA39411CA2CEA /* Other Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
29B97316FDCFA39411CA2CEA /* main.m */,
|
||||
);
|
||||
name = "Other Sources";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97317FDCFA39411CA2CEA /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
C0C84CD00F98FF8400B6518D /* package.tiff */,
|
||||
C0C84CCE0F98FF7800B6518D /* Installer.tiff */,
|
||||
60A014C20DBD2AA20071D9A8 /* MainMenu.xib */,
|
||||
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
|
||||
65359356078DD41800E8BB2F /* AppleScriptKit.sdef */,
|
||||
);
|
||||
name = Resources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
|
||||
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
257572C3072881A4000BE9CA /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
257572C2072881A4000BE9CA /* MunkiStatus */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 4E71A80508A2C90C0034BBD9 /* Build configuration list for PBXNativeTarget "MunkiStatus" */;
|
||||
buildPhases = (
|
||||
257572C3072881A4000BE9CA /* Headers */,
|
||||
257572C4072881A4000BE9CA /* AppleScript */,
|
||||
257572C6072881A4000BE9CA /* Resources */,
|
||||
257572C9072881A4000BE9CA /* Sources */,
|
||||
257572CB072881A4000BE9CA /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = MunkiStatus;
|
||||
productInstallPath = "$(HOME)/Applications";
|
||||
productName = MunkiStatus;
|
||||
productReference = 257572D6072881A4000BE9CA /* MunkiStatus.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
29B97313FDCFA39411CA2CEA /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = 4E71A80908A2C90C0034BBD9 /* Build configuration list for PBXProject "MunkiStatus" */;
|
||||
compatibilityVersion = "Xcode 3.1";
|
||||
hasScannedForEncodings = 1;
|
||||
mainGroup = 29B97314FDCFA39411CA2CEA /* MunkiStatus */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
257572C2072881A4000BE9CA /* MunkiStatus */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
257572C6072881A4000BE9CA /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
257572C8072881A4000BE9CA /* InfoPlist.strings in Resources */,
|
||||
60A014C40DBD2AA20071D9A8 /* MainMenu.xib in Resources */,
|
||||
C0C84CCF0F98FF7800B6518D /* Installer.tiff in Resources */,
|
||||
C0C84CD10F98FF8400B6518D /* package.tiff in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
257572C9072881A4000BE9CA /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
257572CA072881A4000BE9CA /* main.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
089C165DFE840E0CC02AAC07 /* English */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
60A014C20DBD2AA20071D9A8 /* MainMenu.xib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
60A014C30DBD2AA20071D9A8 /* English */,
|
||||
);
|
||||
name = MainMenu.xib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
4E71A80608A2C90C0034BBD9 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
PRODUCT_NAME = MunkiStatus;
|
||||
WRAPPER_EXTENSION = app;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
4E71A80708A2C90C0034BBD9 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_MODEL_TUNING = G5;
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
OTHER_OSAFLAGS = "-x";
|
||||
PRODUCT_NAME = MunkiStatus;
|
||||
WRAPPER_EXTENSION = app;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
4E71A80A08A2C90C0034BBD9 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = macosx10.5;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
4E71A80B08A2C90C0034BBD9 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = macosx10.5;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
4E71A80508A2C90C0034BBD9 /* Build configuration list for PBXNativeTarget "MunkiStatus" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
4E71A80608A2C90C0034BBD9 /* Debug */,
|
||||
4E71A80708A2C90C0034BBD9 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
4E71A80908A2C90C0034BBD9 /* Build configuration list for PBXProject "MunkiStatus" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
4E71A80A08A2C90C0034BBD9 /* Debug */,
|
||||
4E71A80B08A2C90C0034BBD9 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
extern void ASKInitialize();
|
||||
extern int NSApplicationMain(int argc, const char *argv[]);
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
ASKInitialize();
|
||||
|
||||
return NSApplicationMain(argc, argv);
|
||||
}
|
||||
Binary file not shown.
+242
-159
@@ -14,7 +14,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
"""
|
||||
installomatic
|
||||
ManagedInstaller
|
||||
Tool to automatically install pkgs, mpkgs, and dmgs
|
||||
(containing pkgs and mpkgs) from a defined folder. Intended
|
||||
to be run as part of a logout hook, but can be run manually
|
||||
@@ -27,13 +27,29 @@ import time
|
||||
import plistlib
|
||||
import optparse
|
||||
import managedinstalls
|
||||
import munkistatus
|
||||
|
||||
pathtoremovepackages = "/Users/Shared/munki/munki/code/client/removepackages"
|
||||
|
||||
|
||||
def stopRequested():
|
||||
if options.munkistatusoutput:
|
||||
if munkistatus.getStopButtonState() == 1:
|
||||
log("### User stopped session ###")
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def cleanup():
|
||||
if options.munkistatusoutput:
|
||||
munkistatus.quit()
|
||||
|
||||
|
||||
def createDirsIfNeeded(dirlist):
|
||||
for dir in dirlist:
|
||||
if not os.path.exists(dir):
|
||||
try:
|
||||
os.mkdir(dir)
|
||||
os.makedirs(dir, mode=0755)
|
||||
except:
|
||||
print >>sys.stderr, "Could not create %s" % dir
|
||||
return False
|
||||
@@ -53,8 +69,7 @@ def log(message):
|
||||
|
||||
def countinstallcandidates(dirpath):
|
||||
"""
|
||||
Counts the number of pkgs, mpkgs, and dmgs
|
||||
in dirpath
|
||||
Get the count of items to be installed
|
||||
"""
|
||||
candidatecount = 0
|
||||
items = os.listdir(dirpath)
|
||||
@@ -70,11 +85,8 @@ def install(pkgpath):
|
||||
at pkgpath. Prints status messages to STDOUT.
|
||||
Returns the installer return code and true if a restart is needed.
|
||||
"""
|
||||
global installablecount
|
||||
global currentinstallable
|
||||
global options
|
||||
|
||||
currentinstallable += 1
|
||||
restartneeded = False
|
||||
installeroutput = []
|
||||
|
||||
@@ -84,9 +96,11 @@ def install(pkgpath):
|
||||
(output, err) = p.communicate()
|
||||
packagename = output.splitlines()[0]
|
||||
print >>sys.stderr, "Package name is", packagename
|
||||
if options.ihookoutput:
|
||||
print "%TITLE Installing " + packagename + "..."
|
||||
print "%%%s Item %s of %s" % (0, currentinstallable, installablecount)
|
||||
if options.munkistatusoutput:
|
||||
munkistatus.message("Installing %s..." % packagename)
|
||||
# clear indeterminate progress bar
|
||||
munkistatus.percent(0)
|
||||
|
||||
log("Installing %s from %s" % (packagename, os.path.basename(pkgpath)))
|
||||
cmd = ['/usr/sbin/installer', '-query', 'RestartAction', '-pkg', pkgpath]
|
||||
p = subprocess.Popen(cmd, shell=False, bufsize=1, stdin=subprocess.PIPE,
|
||||
@@ -95,8 +109,11 @@ def install(pkgpath):
|
||||
restartaction = output.rstrip("\n")
|
||||
if restartaction == "RequireRestart":
|
||||
message = "%s requires a restart after installation." % packagename
|
||||
print message
|
||||
sys.stdout.flush()
|
||||
if options.munkistatusoutput:
|
||||
munkistatus.detail(message)
|
||||
else:
|
||||
print message
|
||||
sys.stdout.flush()
|
||||
log(message)
|
||||
restartneeded = True
|
||||
|
||||
@@ -114,31 +131,35 @@ def install(pkgpath):
|
||||
if msg.startswith("PHASE:"):
|
||||
phase = msg[6:]
|
||||
if phase:
|
||||
print phase
|
||||
sys.stdout.flush()
|
||||
if options.munkistatusoutput:
|
||||
munkistatus.detail(phase)
|
||||
else:
|
||||
print phase
|
||||
sys.stdout.flush()
|
||||
elif msg.startswith("STATUS:"):
|
||||
status = msg[7:]
|
||||
if status:
|
||||
print status
|
||||
sys.stdout.flush()
|
||||
if options.munkistatusoutput:
|
||||
munkistatus.detail(status)
|
||||
else:
|
||||
print status
|
||||
sys.stdout.flush()
|
||||
elif msg.startswith("%"):
|
||||
if options.ihookoutput:
|
||||
if options.munkistatusoutput:
|
||||
percent = float(msg[1:])
|
||||
percent = int(percent * 100)
|
||||
print "%%%s Item %s of %s" % (percent, currentinstallable, installablecount)
|
||||
if percent == 100:
|
||||
overallpercentage = min(100,int(currentinstallable/installablecount * 100))
|
||||
print "%%%s Item %s of %s" % (overallpercentage, currentinstallable, installablecount)
|
||||
sys.stdout.flush()
|
||||
munkistatus.percent(percent)
|
||||
elif msg.startswith(" Error"):
|
||||
print msg
|
||||
sys.stdout.flush()
|
||||
print >>sys.stderr, msg
|
||||
if options.munkistatusoutput:
|
||||
munkistatus.detail(msg)
|
||||
else:
|
||||
print >>sys.stderr, msg
|
||||
log(msg)
|
||||
elif msg.startswith(" Cannot install"):
|
||||
print msg
|
||||
sys.stdout.flush()
|
||||
print >>sys.stderr, msg
|
||||
if options.munkistatusoutput:
|
||||
munkistatus.detail(msg)
|
||||
else:
|
||||
print >>sys.stderr, msg
|
||||
log(msg)
|
||||
else:
|
||||
print >>sys.stderr, msg
|
||||
@@ -146,6 +167,8 @@ def install(pkgpath):
|
||||
retcode = p.poll()
|
||||
if retcode:
|
||||
message = "Install of %s failed." % packagename
|
||||
if options.munkistatusoutput:
|
||||
munkistatus.detail(message)
|
||||
print >>sys.stderr, message
|
||||
log(message)
|
||||
message = "-------------------------------------------------"
|
||||
@@ -160,7 +183,9 @@ def install(pkgpath):
|
||||
restartneeded = False
|
||||
else:
|
||||
log("Install of %s was successful." % packagename)
|
||||
|
||||
if options.munkistatusoutput:
|
||||
munkistatus.percent(100)
|
||||
|
||||
return (retcode, restartneeded)
|
||||
|
||||
|
||||
@@ -173,6 +198,8 @@ def installall(dirpath):
|
||||
restartflag = False
|
||||
installitems = os.listdir(dirpath)
|
||||
for item in installitems:
|
||||
if stopRequested():
|
||||
return restartflag
|
||||
itempath = os.path.join(dirpath, item)
|
||||
if (item.endswith(".pkg") or item.endswith(".mpkg")):
|
||||
(retcode, needsrestart) = install(itempath)
|
||||
@@ -180,6 +207,10 @@ def installall(dirpath):
|
||||
restartflag = True
|
||||
if item.endswith(".dmg"):
|
||||
mountpoints = mountdmg(itempath)
|
||||
if stopRequested():
|
||||
for mountpoint in mountpoints:
|
||||
unmountdmg(mountpoint)
|
||||
return restartflag
|
||||
for mountpoint in mountpoints:
|
||||
# install all the pkgs and mpkgs at the root
|
||||
# of the mountpoint -- call us recursively!
|
||||
@@ -190,6 +221,15 @@ def installall(dirpath):
|
||||
|
||||
return restartflag
|
||||
|
||||
|
||||
def getInstallCount(installList):
|
||||
count = 0
|
||||
for item in installList:
|
||||
if 'installed' in item:
|
||||
if not item['installed']:
|
||||
count +=1
|
||||
return count
|
||||
|
||||
|
||||
def installWithInfo(dirpath, installlist):
|
||||
"""
|
||||
@@ -198,17 +238,23 @@ def installWithInfo(dirpath, installlist):
|
||||
"""
|
||||
restartflag = False
|
||||
for item in installlist:
|
||||
if stopRequested():
|
||||
return restartflag
|
||||
if "installer_item" in item:
|
||||
itempath = os.path.join(dirpath, item["installer_item"])
|
||||
if not os.path.exists(itempath):
|
||||
#can't install, so we should stop
|
||||
return restartFlag
|
||||
return restartflag
|
||||
if (itempath.endswith(".pkg") or itempath.endswith(".mpkg")):
|
||||
(retcode, needsrestart) = install(itempath)
|
||||
if needsrestart:
|
||||
restartflag = True
|
||||
if itempath.endswith(".dmg"):
|
||||
mountpoints = mountdmg(itempath)
|
||||
if stopRequested():
|
||||
for mountpoint in mountpoints:
|
||||
unmountdmg(mountpoint)
|
||||
return restartflag
|
||||
for mountpoint in mountpoints:
|
||||
# install all the pkgs and mpkgs at the root
|
||||
# of the mountpoint -- call us recursively!
|
||||
@@ -224,115 +270,133 @@ def installWithInfo(dirpath, installlist):
|
||||
return restartflag
|
||||
|
||||
|
||||
def getRemovalCount(removalList):
|
||||
count = 0
|
||||
for item in removalList:
|
||||
if 'installed' in item:
|
||||
if item['installed']:
|
||||
count +=1
|
||||
return count
|
||||
|
||||
def processRemovals(removalList):
|
||||
restartFlag = False
|
||||
for item in removalList:
|
||||
name = ""
|
||||
if 'name' in item:
|
||||
name = item['name']
|
||||
elif 'catalogitem' in item:
|
||||
name = item['catalogitem']
|
||||
if 'uninstall_method' in item:
|
||||
uninstallmethod = item['uninstall_method'].split(' ')
|
||||
if uninstallmethod[0] == "removepackages":
|
||||
if 'packages' in item:
|
||||
if options.ihookoutput:
|
||||
print "%TITLE Removing %s.." % name
|
||||
#print "%%%s Item %s of %s" % (0, currentinstallable, installablecount)
|
||||
else:
|
||||
print "Removing %s..." % name
|
||||
cmd = ['/Users/Shared/bin/removepackages', '-f']
|
||||
if options.ihookoutput:
|
||||
cmd.append('-i')
|
||||
for package in item['packages']:
|
||||
cmd.append(package)
|
||||
uninstalleroutput = []
|
||||
p = subprocess.Popen(cmd, shell=False, bufsize=1, stdin=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
if stopRequested():
|
||||
return restartFlag
|
||||
if 'installed' in item:
|
||||
if item['installed']:
|
||||
name = ""
|
||||
if 'name' in item:
|
||||
name = item['name']
|
||||
elif 'catalogitem' in item:
|
||||
name = item['catalogitem']
|
||||
if 'uninstall_method' in item:
|
||||
uninstallmethod = item['uninstall_method'].split(' ')
|
||||
if uninstallmethod[0] == "removepackages":
|
||||
if 'packages' in item:
|
||||
if options.munkistatusoutput:
|
||||
munkistatus.message("Removing %s..." % name)
|
||||
# clear indeterminate progress bar
|
||||
munkistatus.percent(0)
|
||||
else:
|
||||
print "Removing %s..." % name
|
||||
cmd = [pathtoremovepackages, '-f']
|
||||
if options.munkistatusoutput:
|
||||
cmd.append('-m')
|
||||
cmd.append('-d')
|
||||
for package in item['packages']:
|
||||
cmd.append(package)
|
||||
uninstalleroutput = []
|
||||
p = subprocess.Popen(cmd, shell=False, bufsize=1, stdin=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
|
||||
while (p.poll() == None):
|
||||
msg = p.stdout.readline()
|
||||
# save all uninstaller output in case there is
|
||||
# an error so we can dump it to the log
|
||||
uninstalleroutput.append(msg)
|
||||
msg = msg.rstrip("\n")
|
||||
if msg.startswith("STATUS: "):
|
||||
status = msg[8:]
|
||||
if status:
|
||||
print status
|
||||
sys.stdout.flush()
|
||||
elif msg.startswith("INFO: "):
|
||||
info = msg[6:]
|
||||
if info:
|
||||
print >>sys.stderr, info
|
||||
elif msg.startswith("ERROR: "):
|
||||
error = msg[7:]
|
||||
if error:
|
||||
print >>sys.stderr, error
|
||||
while (p.poll() == None):
|
||||
msg = p.stdout.readline()
|
||||
# save all uninstaller output in case there is
|
||||
# an error so we can dump it to the log
|
||||
uninstalleroutput.append(msg)
|
||||
msg = msg.rstrip("\n")
|
||||
if msg.startswith("STATUS: "):
|
||||
status = msg[8:]
|
||||
if status:
|
||||
print status
|
||||
sys.stdout.flush()
|
||||
elif msg.startswith("INFO: "):
|
||||
info = msg[6:]
|
||||
if info:
|
||||
print >>sys.stderr, info
|
||||
elif msg.startswith("ERROR: "):
|
||||
error = msg[7:]
|
||||
if error:
|
||||
print >>sys.stderr, error
|
||||
else:
|
||||
print msg
|
||||
sys.stdout.flush()
|
||||
|
||||
retcode = p.poll()
|
||||
if retcode:
|
||||
message = "Uninstall of %s failed." % name
|
||||
print >>sys.stderr, message
|
||||
log(message)
|
||||
message = "-------------------------------------------------"
|
||||
print >>sys.stderr, message
|
||||
log(message)
|
||||
for line in uninstalleroutput:
|
||||
print >>sys.stderr, " ", line.rstrip("\n")
|
||||
log(line.rstrip("\n"))
|
||||
message = "-------------------------------------------------"
|
||||
print >>sys.stderr, message
|
||||
log(message)
|
||||
else:
|
||||
log("Uninstall of %s was successful." % name)
|
||||
|
||||
elif os.path.exists(uninstallmethod[0]) and os.access(uninstallmethod[0], os.X_OK):
|
||||
# it's a script or program to uninstall
|
||||
if options.munkistatusoutput:
|
||||
munkistatus.message("Running uninstall script for %s..." % name)
|
||||
# set indeterminate progress bar
|
||||
munkistatus.percent(-1)
|
||||
|
||||
cmd = uninstallmethod
|
||||
uninstalleroutput = []
|
||||
p = subprocess.Popen(cmd, shell=False, bufsize=1, stdin=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
|
||||
while (p.poll() == None):
|
||||
msg = p.stdout.readline()
|
||||
# save all uninstaller output in case there is
|
||||
# an error so we can dump it to the log
|
||||
uninstalleroutput.append(msg)
|
||||
msg = msg.rstrip("\n")
|
||||
if options.munkistatusoutput:
|
||||
# do nothing with the output
|
||||
pass
|
||||
else:
|
||||
print msg
|
||||
|
||||
retcode = p.poll()
|
||||
if retcode:
|
||||
message = "Uninstall of %s failed." % name
|
||||
print >>sys.stderr, message
|
||||
log(message)
|
||||
message = "-------------------------------------------------"
|
||||
print >>sys.stderr, message
|
||||
log(message)
|
||||
for line in uninstalleroutput:
|
||||
print >>sys.stderr, " ", line.rstrip("\n")
|
||||
log(line.rstrip("\n"))
|
||||
message = "-------------------------------------------------"
|
||||
print >>sys.stderr, message
|
||||
log(message)
|
||||
else:
|
||||
print msg
|
||||
sys.stdout.flush()
|
||||
|
||||
retcode = p.poll()
|
||||
if retcode:
|
||||
message = "Uninstall of %s failed." % name
|
||||
print >>sys.stderr, message
|
||||
log(message)
|
||||
message = "-------------------------------------------------"
|
||||
print >>sys.stderr, message
|
||||
log(message)
|
||||
for line in uninstalleroutput:
|
||||
print >>sys.stderr, " ", line.rstrip("\n")
|
||||
log(line.rstrip("\n"))
|
||||
message = "-------------------------------------------------"
|
||||
print >>sys.stderr, message
|
||||
log(message)
|
||||
log("Uninstall of %s was successful." % name)
|
||||
|
||||
if options.munkstatusoutput:
|
||||
# clear indeterminate progress bar
|
||||
munkistatus.percent(0)
|
||||
|
||||
else:
|
||||
log("Uninstall of %s was successful." % name)
|
||||
|
||||
elif os.path.exists(uninstallmethod[0]) and os.access(uninstallmethod[0], os.X_OK):
|
||||
# it's a script or program to uninstall
|
||||
if options.ihookoutput:
|
||||
print "%TITLE Running uninstall script for " + name + "..."
|
||||
print "%BEGINPOLE"
|
||||
sys.stdout.flush()
|
||||
|
||||
cmd = uninstallmethod
|
||||
uninstalleroutput = []
|
||||
p = subprocess.Popen(cmd, shell=False, bufsize=1, stdin=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
|
||||
while (p.poll() == None):
|
||||
msg = p.stdout.readline()
|
||||
# save all uninstaller output in case there is
|
||||
# an error so we can dump it to the log
|
||||
uninstalleroutput.append(msg)
|
||||
msg = msg.rstrip("\n")
|
||||
if options.ihookoutput:
|
||||
# redirect output to the iHook drawer
|
||||
print >>sys.stderr, msg
|
||||
else:
|
||||
print msg
|
||||
|
||||
retcode = p.poll()
|
||||
if retcode:
|
||||
message = "Uninstall of %s failed." % name
|
||||
print >>sys.stderr, message
|
||||
log(message)
|
||||
message = "-------------------------------------------------"
|
||||
print >>sys.stderr, message
|
||||
log(message)
|
||||
for line in uninstalleroutput:
|
||||
print >>sys.stderr, " ", line.rstrip("\n")
|
||||
log(line.rstrip("\n"))
|
||||
message = "-------------------------------------------------"
|
||||
print >>sys.stderr, message
|
||||
log(message)
|
||||
else:
|
||||
log("Uninstall of %s was successful." % name)
|
||||
|
||||
else:
|
||||
log("Uninstall of %s failed because there was no valid uninstall method." % name)
|
||||
log("Uninstall of %s failed because there was no valid uninstall method." % name)
|
||||
|
||||
return restartFlag
|
||||
|
||||
@@ -377,30 +441,17 @@ def unmountdmg(mountpoint):
|
||||
managedinstallbase = managedinstalls.managed_install_dir()
|
||||
installdir = os.path.join(managedinstallbase , 'Cache')
|
||||
logdir = os.path.join(managedinstallbase, 'Logs')
|
||||
installablecount = 0
|
||||
currentinstallable = 0
|
||||
|
||||
p = optparse.OptionParser()
|
||||
p.add_option('--ihookoutput', '-i', action='store_true')
|
||||
p.add_option('--munkistatusoutput', '-m', action='store_true')
|
||||
options, arguments = p.parse_args()
|
||||
|
||||
|
||||
def main():
|
||||
global installdir
|
||||
global installablecount
|
||||
|
||||
if options.ihookoutput:
|
||||
print '%WINDOWSIZE 512 232'
|
||||
print '%BACKGROUND /Users/Shared/Installer.png'
|
||||
print '%BECOMEKEY'
|
||||
print '%BEGINPOLE'
|
||||
sys.stdout.flush()
|
||||
|
||||
needtorestart = False
|
||||
|
||||
#installablecount = countinstallcandidates(installdir)
|
||||
#if installablecount:
|
||||
installablecount = 5
|
||||
log("### Beginning automated install session ###")
|
||||
if os.path.exists(installdir):
|
||||
installinfo = os.path.join(managedinstallbase, 'InstallInfo.plist')
|
||||
@@ -410,30 +461,62 @@ def main():
|
||||
except:
|
||||
print >>sys.stderr, "Invalid %s" % installinfo
|
||||
exit(-1)
|
||||
|
||||
# remove the install info file
|
||||
# it's no longer valid once we start running
|
||||
os.unlink(installinfo)
|
||||
|
||||
if "removals" in pl:
|
||||
log("Processing removals")
|
||||
needtorestart = processRemovals(pl['removals'])
|
||||
removalcount = getRemovalCount(pl['removals'])
|
||||
if removalcount:
|
||||
if options.munkistatusoutput:
|
||||
if removalcount == 1:
|
||||
munkistatus.message("Removing 1 item...")
|
||||
else:
|
||||
munkistatus.message("Removing %i items..." % removalcount)
|
||||
# set indeterminate progress bar
|
||||
munkistatus.percent(-1)
|
||||
log("Processing removals")
|
||||
needtorestart = processRemovals(pl['removals'])
|
||||
if "managed_installs" in pl:
|
||||
log("Processing installs")
|
||||
needtorestart = installWithInfo(installdir, pl['managed_installs'])
|
||||
# remove the install info
|
||||
os.unlink(installinfo)
|
||||
if not stopRequested():
|
||||
installcount = getInstallCount(pl['managed_installs'])
|
||||
if installcount:
|
||||
if options.munkistatusoutput:
|
||||
if installcount == 1:
|
||||
munkistatus.message("Installing 1 item...")
|
||||
else:
|
||||
munkistatus.message("Installing %i items..." % installcount)
|
||||
# set indeterminate progress bar
|
||||
munkistatus.percent(-1)
|
||||
log("Processing installs")
|
||||
needtorestart = installWithInfo(installdir, pl['managed_installs'])
|
||||
|
||||
else:
|
||||
log("No %s found." % installinfo)
|
||||
log("Installing everything in the cache.")
|
||||
#log("Installing everything in the cache.")
|
||||
# install all pkgs and mpkgs
|
||||
needtorestart = installall(installdir)
|
||||
#needtorestart = installall(installdir)
|
||||
|
||||
if needtorestart:
|
||||
print "Software installed requires a restart."
|
||||
log("Software installed requires a restart.")
|
||||
sys.stdout.flush()
|
||||
log("Software installed or removed requires a restart.")
|
||||
if options.munkistatusoutput:
|
||||
munkistatus.message("Software installed or removed requires a restart.")
|
||||
munkistatus.detail("")
|
||||
munkistatus.percent(-1)
|
||||
else:
|
||||
print "Software installed or removed requires a restart."
|
||||
sys.stdout.flush()
|
||||
|
||||
|
||||
log("### End automated install session ###")
|
||||
if needtorestart:
|
||||
time.sleep(5)
|
||||
cleanup()
|
||||
# uncomment this when testing is done so it will restart.
|
||||
#retcode = subprocess.call(["/sbin/shutdown", "-r", "now"])
|
||||
#retcode = subprocess.call(["/sbin/shutdown", "-r", "now"])
|
||||
else:
|
||||
cleanup()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
@@ -5,6 +5,7 @@ ManagedInstaller - meant to be run as part of a logout hook. Does the actual in
|
||||
makecatalogitem.py: Helper tool to help create catalogitem plists for each installer item.
|
||||
removepackages: used by ManagedInstaller to do package removals.
|
||||
|
||||
Supporting library:
|
||||
managedinstalls.py
|
||||
Supporting libraries:
|
||||
managedinstalls.py - shared functions
|
||||
munkistatus.py - functions to display status using MunkiStatus.app
|
||||
|
||||
|
||||
@@ -914,8 +914,7 @@ def main():
|
||||
|
||||
# now generate a list of items to be uninstalled
|
||||
removallist = processCatalogForRemovals(maincatalogpath)
|
||||
|
||||
|
||||
|
||||
# need to write out install list so the autoinstaller
|
||||
# can use it to install things in the right order
|
||||
pldict = {}
|
||||
|
||||
Executable
+184
@@ -0,0 +1,184 @@
|
||||
#!/usr/bin/env python
|
||||
# encoding: utf-8
|
||||
#
|
||||
# Copyright 2009 Greg Neagle.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
"""
|
||||
munkistatus.py
|
||||
|
||||
Created by Greg Neagle on 2009-04-17.
|
||||
|
||||
Utility functions for using MunkiStatus.app.
|
||||
Can be called as a standalone script with options,
|
||||
or as a Python library
|
||||
"""
|
||||
|
||||
import sys
|
||||
import os
|
||||
import optparse
|
||||
import subprocess
|
||||
|
||||
|
||||
def osascript(osastring):
|
||||
cmd = ['osascript', '-e', osastring]
|
||||
p = subprocess.Popen(cmd, shell=False, bufsize=1, stdin=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
(out, err) = p.communicate()
|
||||
if p.returncode != 0:
|
||||
print >>sys.stderr, "Error: ", err
|
||||
if out:
|
||||
return out.rstrip("\n")
|
||||
|
||||
|
||||
def quit():
|
||||
# see if MunkiStatus is running first
|
||||
cmd = ['/usr/bin/killall', '-s', 'MunkiStatus']
|
||||
p = subprocess.Popen(cmd, shell=False, bufsize=1, stdin=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
(out, err) = p.communicate()
|
||||
if p.returncode == 0:
|
||||
# it's running, send it a quit message
|
||||
result = osascript('tell application "MunkiStatus" to quit')
|
||||
|
||||
|
||||
def activate():
|
||||
osascript('tell application "MunkiStatus" to activate')
|
||||
|
||||
|
||||
def title(titleText):
|
||||
result = osascript('tell application "MunkiStatus" to set title of window "mainWindow" to "%s"' % titleText)
|
||||
|
||||
|
||||
def message(messageText):
|
||||
result = osascript('tell application "MunkiStatus" to set contents of text field "mainTextFld" of window "mainWindow" to "%s"' % messageText)
|
||||
|
||||
|
||||
def detail(detailsText):
|
||||
result = osascript('tell application "MunkiStatus" to set contents of text field "minorTextFld" of window "mainWindow" to "%s"' % detailsText)
|
||||
|
||||
|
||||
def percent(percentage):
|
||||
# Note: this is a relatively slow operation.
|
||||
# If you are calling this on every iteration of a loop,
|
||||
# you may find it slows the loop down unacceptibly, as
|
||||
# Your loop spends more time waiting for this operation
|
||||
# than actually doing its work. You might
|
||||
# instead try calling it once at the beginning of the loop,
|
||||
# once every X iterations, then once at the end to speed things up.
|
||||
# X might equal (number of iterations / 10 or even 20)
|
||||
percent = int(float(percentage))
|
||||
if percent > 100:
|
||||
percent = 100
|
||||
if percent < 0:
|
||||
# set an indeterminate progress bar
|
||||
result = osascript('tell application "MunkiStatus" to set indeterminate of progress indicator "progressBar" of window "mainWindow" to true')
|
||||
result = osascript('tell application "MunkiStatus" to tell window "mainWindow" to tell progress indicator "progressBar" to start')
|
||||
elif percent == 0:
|
||||
# we only clear the indeterminate status when we set the percentage to 0;
|
||||
# we tried always doing it, but it really slows down response times such
|
||||
# that a script spends way more time updating MunkiStatus than it does
|
||||
# actually performing its task
|
||||
result = osascript('tell application "MunkiStatus" to set indeterminate of progress indicator "progressBar" of window "mainWindow" to false')
|
||||
result = osascript('tell application "MunkiStatus" to set contents of progress indicator "progressBar" of window "mainWindow" to 0')
|
||||
else:
|
||||
percentStr = str(percent)
|
||||
result = osascript('tell application "MunkiStatus" to set contents of progress indicator "progressBar" of window "mainWindow" to %s' % percentStr)
|
||||
|
||||
|
||||
def getStopButtonState():
|
||||
# see if MunkiStatus is running first
|
||||
cmd = ['/usr/bin/killall', '-s', 'MunkiStatus']
|
||||
p = subprocess.Popen(cmd, shell=False, bufsize=1, stdin=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
(out, err) = p.communicate()
|
||||
if p.returncode == 0:
|
||||
# it's running, ask it for the button state
|
||||
result = osascript('tell application "MunkiStatus" to get the state of button "stopBtn" of window "mainWindow"')
|
||||
return int(result)
|
||||
else:
|
||||
return 0
|
||||
|
||||
|
||||
def hideStopButton():
|
||||
result = osascript('tell application "MunkiStatus" to set visible of button "stopBtn" of window "mainWindow" to false')
|
||||
|
||||
|
||||
def showStopButton():
|
||||
result = osascript('tell application "MunkiStatus" to set visible of button "stopBtn" of window "mainWindow" to true')
|
||||
|
||||
|
||||
def disableStopButton():
|
||||
result = osascript('tell application "MunkiStatus" to set enabled of button "stopBtn" of window "mainWindow" to false')
|
||||
|
||||
|
||||
def enableStopButton():
|
||||
result = osascript('tell application "MunkiStatus" to set enabled of button "stopBtn" of window "mainWindow" to true')
|
||||
|
||||
|
||||
def main():
|
||||
p = optparse.OptionParser()
|
||||
p.add_option('--activate', '-a', action='store_true',
|
||||
help='Bring MunkiStatus to the front.')
|
||||
p.add_option('--title', '-t', default='',
|
||||
help='Window title.')
|
||||
p.add_option('--message', '-m', default='',
|
||||
help='Main message text.')
|
||||
p.add_option('--detail', '-d',
|
||||
help='Minor message text.')
|
||||
p.add_option('--percent', '-p', default='',
|
||||
help='Update progress bar to show percent done. Negative values show an indeterminate progress bar.')
|
||||
p.add_option('--quit', '-q', action='store_true',
|
||||
help='Tell MunkiStatus to quit.')
|
||||
p.add_option('--getStopButtonState', '-g', action='store_true',
|
||||
help='Returns 1 if stop button has been clicked.')
|
||||
p.add_option('--hideStopButton', action='store_true',
|
||||
help='Hide the stop button.')
|
||||
p.add_option('--showStopButton', action='store_true',
|
||||
help='Show the stop button.')
|
||||
p.add_option('--disableStopButton', action='store_true',
|
||||
help='Disable the stop button.')
|
||||
p.add_option('--enableStopButton', action='store_true',
|
||||
help='Enable the stop button.')
|
||||
|
||||
|
||||
options, arguments = p.parse_args()
|
||||
|
||||
if options.quit:
|
||||
quit()
|
||||
exit()
|
||||
if options.activate:
|
||||
activate()
|
||||
if options.title:
|
||||
title(options.title)
|
||||
if options.message:
|
||||
message(options.message)
|
||||
if options.detail:
|
||||
detail(options.detail)
|
||||
if options.percent:
|
||||
percent(options.percent)
|
||||
if options.getStopButtonState:
|
||||
print getStopButtonState()
|
||||
if options.hideStopButton:
|
||||
hideStopButton()
|
||||
if options.showStopButton:
|
||||
showStopButton()
|
||||
if options.disableStopButton:
|
||||
disableStopButton()
|
||||
if options.enableStopButton:
|
||||
enableStopButton()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
+72
-22
@@ -20,6 +20,7 @@ files unique to the packages given at the command line. No attempt
|
||||
is made to revert to older versions of a file when uninstalling;
|
||||
only file removals are done.
|
||||
"""
|
||||
#TO-DO: refactor this so it can be called as a library as well as a command-line script
|
||||
|
||||
import optparse
|
||||
import os
|
||||
@@ -28,6 +29,7 @@ import sys
|
||||
import plistlib
|
||||
import sqlite3
|
||||
import time
|
||||
import munkistatus
|
||||
#import applereceiptutils
|
||||
|
||||
##################################################################
|
||||
@@ -88,6 +90,14 @@ import time
|
||||
# perms INTEGER )
|
||||
#################################################################
|
||||
|
||||
def stopRequested():
|
||||
if options.munkistatusoutput:
|
||||
if munkistatus.getStopButtonState() == 1:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
|
||||
def getsteps(num_of_steps, limit):
|
||||
"""
|
||||
Helper function for display_percent_done
|
||||
@@ -106,18 +116,17 @@ def getsteps(num_of_steps, limit):
|
||||
def display_percent_done(current,maximum):
|
||||
"""
|
||||
Mimics the command-line progress meter seen in some
|
||||
of Apple's tools (like softwareupdate), or prints
|
||||
percent-done output in iHook directive format.
|
||||
of Apple's tools (like softwareupdate), or tells
|
||||
MunkiStatus to display percent done via progress bar.
|
||||
"""
|
||||
if options.ihookoutput:
|
||||
if options.munkistatusoutput:
|
||||
step = getsteps(101, maximum)
|
||||
if current in step:
|
||||
if current == maximum:
|
||||
percentdone = 100
|
||||
else:
|
||||
percentdone = step.index(current)
|
||||
print "%%%s %s of %s" % (str(percentdone), current, maximum)
|
||||
sys.stdout.flush()
|
||||
munkistatus.percent(str(percentdone))
|
||||
elif not options.verbose:
|
||||
step = getsteps(16, maximum)
|
||||
output = ''
|
||||
@@ -136,8 +145,8 @@ def display_status(msg):
|
||||
Displays major status messages, formatting as needed
|
||||
for verbose/non-verbose and iHook-style output.
|
||||
"""
|
||||
if options.ihookoutput:
|
||||
print "STATUS: %s" % msg
|
||||
if options.munkistatusoutput:
|
||||
munkistatus.detail(msg)
|
||||
elif options.verbose:
|
||||
print "%s..." % msg
|
||||
else:
|
||||
@@ -150,9 +159,9 @@ def display_info(msg):
|
||||
Displays minor info messages, formatting as needed
|
||||
for verbose/non-verbose and iHook-style output.
|
||||
"""
|
||||
if options.ihookoutput:
|
||||
#iHook puts stderr in the drawer
|
||||
print >>sys.stderr, "INFO: %s" % msg
|
||||
if options.munkistatusoutput:
|
||||
#munkistatus.detail(msg)
|
||||
pass
|
||||
elif options.verbose:
|
||||
print msg
|
||||
|
||||
@@ -162,8 +171,7 @@ def display_error(msg):
|
||||
Prints msg to stderr and eventually to the log
|
||||
"""
|
||||
print >>sys.stderr, "ERROR: %s" % msg
|
||||
if options.ihookoutput:
|
||||
sys.stderr.flush()
|
||||
|
||||
|
||||
|
||||
def shouldRebuildDB(pkgdbpath):
|
||||
@@ -443,6 +451,14 @@ def initDatabase(packagedb,forcerebuild=False):
|
||||
if os.path.exists(receiptsdir):
|
||||
receiptlist = os.listdir(receiptsdir)
|
||||
for item in receiptlist:
|
||||
if stopRequested():
|
||||
c.close()
|
||||
conn.close()
|
||||
#our package db isn't valid, so we should delete it
|
||||
os.remove(packagedb)
|
||||
cleanup()
|
||||
exit()
|
||||
|
||||
if item.endswith(".pkg"):
|
||||
receiptpath = os.path.join(receiptsdir, item)
|
||||
display_info("Importing %s..." % receiptpath)
|
||||
@@ -453,6 +469,14 @@ def initDatabase(packagedb,forcerebuild=False):
|
||||
if os.path.exists(bomsdir):
|
||||
bomslist = os.listdir(bomsdir)
|
||||
for item in bomslist:
|
||||
if stopRequested():
|
||||
c.close()
|
||||
conn.close()
|
||||
#our package db isn't valid, so we should delete it
|
||||
os.remove(packagedb)
|
||||
cleanup()
|
||||
exit()
|
||||
|
||||
if item.endswith(".bom"):
|
||||
bompath = os.path.join(bomsdir, item)
|
||||
display_info("Importing %s..." % bompath)
|
||||
@@ -528,9 +552,8 @@ def getpathstoremove(pkgkeylist):
|
||||
combined_query = "select path from paths where (path_key in (%s) and path_key not in (%s))" % (in_selected_packages, not_in_other_packages)
|
||||
|
||||
display_status('Determining which filesystem items to remove')
|
||||
if options.ihookoutput:
|
||||
print '%BEGINPOLE'
|
||||
sys.stdout.flush()
|
||||
if options.munkistatusoutput:
|
||||
munkistatus.percent(-1)
|
||||
|
||||
c.execute(combined_query)
|
||||
results = c.fetchall()
|
||||
@@ -710,6 +733,11 @@ def removeFilesystemItems(removalpaths):
|
||||
display_error("ERROR: couldn't remove bundle %s" % pathtoremove)
|
||||
else:
|
||||
display_error("WARNING: Did not remove %s because it is not empty." % pathtoremove)
|
||||
|
||||
#we'll update the progress bar only on directories because we're too slow
|
||||
#otherwise
|
||||
display_percent_done(itemindex, itemcount)
|
||||
|
||||
else:
|
||||
# not a directory, just unlink it
|
||||
# we're using rm instead of Python because I don't trust
|
||||
@@ -717,9 +745,14 @@ def removeFilesystemItems(removalpaths):
|
||||
retcode = subprocess.call(['/bin/rm', pathtoremove])
|
||||
if retcode:
|
||||
display_error("ERROR: couldn't remove item %s" % pathtoremove)
|
||||
|
||||
display_percent_done(itemindex, itemcount)
|
||||
|
||||
# this should be 100%
|
||||
display_percent_done(itemindex, itemcount)
|
||||
|
||||
def cleanup():
|
||||
if options.munkistatusoutput:
|
||||
if not options.dontquitmunkistatus:
|
||||
munkistatus.quit()
|
||||
|
||||
######################################################
|
||||
# Main
|
||||
@@ -741,8 +774,10 @@ p.add_option('--noremovereceipts', action='store_true',
|
||||
help='Do not remove receipts and boms from /Library/Receipts and update internal package database.')
|
||||
p.add_option('--noupdateapplepkgdb', action='store_true',
|
||||
help='Do not update Apple\'s package database. If --noremovereceipts is also given, this is implied')
|
||||
p.add_option('--ihookoutput', '-i', action='store_true',
|
||||
help='Output is formatted for use with iHook.')
|
||||
p.add_option('--munkistatusoutput', '-m', action='store_true',
|
||||
help='Output is formatted for use with MunkiStatus.')
|
||||
p.add_option('--dontquitmunkistatus', '-d', action='store_true',
|
||||
help="Don't quit MunkiStatus on exit. (For example, when called by ManagedInstaller.)")
|
||||
p.add_option('--verbose', '-v', action='store_true',
|
||||
help='More verbose output.')
|
||||
# Get our options and our package names
|
||||
@@ -751,21 +786,33 @@ options, pkgnames = p.parse_args()
|
||||
# check to see if we're root
|
||||
if os.geteuid() != 0:
|
||||
display_error("You must run this as root!")
|
||||
cleanup()
|
||||
exit(1)
|
||||
|
||||
if pkgnames == []:
|
||||
display_error("You must specify at least one package to remove!")
|
||||
cleanup()
|
||||
exit(1)
|
||||
|
||||
if not initDatabase(packagedb,options.rebuildpkgdb):
|
||||
display_error("Could not initialize receipt database.")
|
||||
cleanup()
|
||||
exit(-1)
|
||||
|
||||
pkgkeyslist = getpkgkeys(pkgnames)
|
||||
if len(pkgkeyslist) == 0:
|
||||
cleanup()
|
||||
exit(1)
|
||||
|
||||
|
||||
if stopRequested():
|
||||
cleanup()
|
||||
exit()
|
||||
removalpaths = getpathstoremove(pkgkeyslist)
|
||||
if stopRequested():
|
||||
cleanup()
|
||||
exit()
|
||||
|
||||
|
||||
if removalpaths:
|
||||
if options.listfiles:
|
||||
removalpaths.sort()
|
||||
@@ -775,14 +822,17 @@ if removalpaths:
|
||||
removeFilesystemItems(removalpaths)
|
||||
if not options.noremovereceipts:
|
||||
removeReceipts(pkgkeyslist)
|
||||
if options.ihookoutput:
|
||||
if options.munkistatusoutput:
|
||||
display_status('Package removal complete.')
|
||||
time.sleep(2)
|
||||
|
||||
else:
|
||||
display_status('Nothing to remove.')
|
||||
if options.ihookoutput:
|
||||
if options.munkistatusoutput:
|
||||
time.sleep(2)
|
||||
|
||||
#cleanup
|
||||
cleanup()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user