diff --git a/code/ManagedSoftwareUpdate/English.lproj/MainMenu.xib b/code/ManagedSoftwareUpdate/English.lproj/MainMenu.xib index 90ddefd6..ab796084 100644 --- a/code/ManagedSoftwareUpdate/English.lproj/MainMenu.xib +++ b/code/ManagedSoftwareUpdate/English.lproj/MainMenu.xib @@ -8,10 +8,12 @@ 353.00 YES + YES + com.apple.WebKitIBPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -39,7 +41,7 @@ 15 2 - {{481, 225}, {512, 562}} + {{481, 236}, {512, 551}} 1886912512 Managed Software Update NSWindow @@ -49,7 +51,7 @@ {3.40282e+38, 3.40282e+38} {512, 400} - + 256 YES @@ -76,7 +78,7 @@ 256 - {455, 166} + {455, 161} YES @@ -233,8 +235,9 @@ YES - {{1, 17}, {455, 166}} + {{1, 17}, {455, 161}} + 4 @@ -242,7 +245,7 @@ 256 - {{456, 17}, {15, 166}} + {{456, 17}, {15, 161}} _doScroller: @@ -268,14 +271,16 @@ {{1, 0}, {455, 17}} + 4 - {472, 184} + {472, 179} + 18 @@ -285,7 +290,7 @@ QSAAAEEgAABBmAAAQZgAAA - {472, 184} + {472, 179} NSView @@ -294,137 +299,79 @@ 256 YES - + 274 - + YES - - - 2304 - - YES - - - 2322 - {455, 14} - - - - - - - - - - - YES - - - 6 - - - - 4.550000e+02 - 1 - - - 264453 - - - - YES - - YES - NSBackgroundColor - NSColor - - - YES - - 6 - System - selectedTextBackgroundColor - - - - 6 - System - selectedTextColor - - - - - - - YES - - YES - NSColor - NSUnderline - - - YES - - 1 - MCAwIDEAA - - - - - - - 6 - {927, 1e+07} - {223, 0} - - - - {{1, 1}, {455, 201}} - - - - - {4, -5} - 1 - - 4 - - - - 256 - {{456, 1}, {15, 201}} - - - _doScroller: - 9.696970e-01 - - - - 256 - {{-100, -100}, {87, 18}} - - 1 - - _doScroller: - 1.000000e+00 - 9.456522e-01 + + YES + Apple HTML pasteboard type + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple URL pasteboard type + Apple Web Archive pasteboard type + NSColor pasteboard type + NSFilenamesPboardType + NSStringPboardType + NeXT RTFD pasteboard type + NeXT Rich Text Format v1.0 pasteboard type + NeXT TIFF v4.0 pasteboard type + WebURLsWithTitlesPboardType + public.png + public.url + public.url-name - {472, 203} + {472, 197} - 18 - - - + + + + + + + YES + + YES + WebKitAllowAnimatedImageLoopingPreferenceKey + WebKitAllowAnimatedImagesPreferenceKey + WebKitDefaultFixedFontSize + WebKitDefaultFontSize + WebKitDisplayImagesKey + WebKitJavaEnabled + WebKitJavaScriptCanOpenWindowsAutomatically + WebKitJavaScriptEnabled + WebKitMinimumFontSize + WebKitPluginsEnabled + WebKitStandardFont + + + YES + + + + + + + + + + + Lucida Sans + + + + NO + YES - {{0, 193}, {472, 203}} + {{0, 188}, {472, 197}} NSView - {{20, 66}, {472, 396}} + {{20, 66}, {472, 385}} @@ -470,7 +417,7 @@ 268 - {{104, 521}, {340, 17}} + {{104, 510}, {340, 17}} YES @@ -495,7 +442,7 @@ 266 - {{104, 479}, {385, 34}} + {{104, 468}, {385, 34}} YES @@ -528,7 +475,7 @@ ZHkgdG8gdXBkYXRlIG5vdywgeW91IGNhbiBjaG9vc2UgdG8gdXBkYXRlIGxhdGVyLg NeXT TIFF v4.0 pasteboard type - {{24, 479}, {64, 64}} + {{24, 468}, {64, 64}} YES @@ -563,7 +510,8 @@ ZHkgdG8gdXBkYXRlIG5vdywgeW91IGNhbiBjaG9vc2UgdG8gdXBkYXRlIGxhdGVyLg - {512, 562} + {512, 551} + {{0, 0}, {1440, 878}} {512, 422} @@ -879,6 +827,9 @@ ZHkgdG8gdXBkYXRlIG5vdywgeW91IGNhbiBjaG9vc2UgdG8gdXBkYXRlIGxhdGVyLg _NSMainMenu + + MSUWebViewPolicyDelegate + @@ -1003,6 +954,14 @@ ZHkgdG8gdXBkYXRlIG5vdywgeW91IGNhbiBjaG9vc2UgdG8gdXBkYXRlIGxhdGVyLg 384 + + + policyDelegate + + + + 478 + @@ -1321,15 +1280,6 @@ ZHkgdG8gdXBkYXRlIG5vdywgeW91IGNhbiBjaG9vc2UgdG8gdXBkYXRlIGxhdGVyLg - - 432 - - - YES - - - - 433 @@ -1480,32 +1430,6 @@ ZHkgdG8gdXBkYXRlIG5vdywgeW91IGNhbiBjaG9vc2UgdG8gdXBkYXRlIGxhdGVyLg - - 469 - - - YES - - - - - - - - 470 - - - - - 471 - - - - - 472 - - - 473 @@ -1520,6 +1444,25 @@ ZHkgdG8gdXBkYXRlIG5vdywgeW91IGNhbiBjaG9vc2UgdG8gdXBkYXRlIGxhdGVyLg + + 432 + + + YES + + + + + + 475 + + + + + 476 + + + @@ -1661,15 +1604,12 @@ ZHkgdG8gdXBkYXRlIG5vdywgeW91IGNhbiBjaG9vc2UgdG8gdXBkYXRlIGxhdGVyLg 454.IBPluginDependency 459.IBPluginDependency 460.IBPluginDependency - 469.IBAttributePlaceholdersKey - 469.IBPluginDependency - 470.IBPluginDependency - 471.IBPluginDependency - 472.IBAttributePlaceholdersKey - 472.IBPluginDependency 473.IBAttributePlaceholdersKey 473.IBPluginDependency 474.IBPluginDependency + 475.IBAttributePlaceholdersKey + 475.IBPluginDependency + 476.IBPluginDependency YES @@ -1704,7 +1644,7 @@ ZHkgdG8gdXBkYXRlIG5vdywgeW91IGNhbiBjaG9vc2UgdG8gdXBkYXRlIGxhdGVyLg com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - + IBAppleScriptAttributeName @@ -1722,10 +1662,10 @@ ZHkgdG8gdXBkYXRlIG5vdywgeW91IGNhbiBjaG9vc2UgdG8gdXBkYXRlIGxhdGVyLg mainWindow - {{156, 216}, {512, 562}} - {{156, 216}, {512, 562}} + {{174, -129}, {512, 551}} + {{174, -129}, {512, 551}} - + {{616, 297}, {480, 360}} @@ -1998,34 +1938,6 @@ ZHkgdG8gdXBkYXRlIG5vdywgeW91IGNhbiBjaG9vc2UgdG8gdXBkYXRlIGxhdGVyLg com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - IBAppleScriptAttributeName - - IBAppleScriptAttributeName - - 0 - 0 - - ManagedSoftwareUpdate.applescript - descriptionScrollView - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - IBAppleScriptAttributeName - - IBAppleScriptAttributeName - - 0 - 0 - - ManagedSoftwareUpdate.applescript - description - - - com.apple.InterfaceBuilder.CocoaPlugin IBAppleScriptAttributeName @@ -2040,6 +1952,20 @@ ZHkgdG8gdXBkYXRlIG5vdywgeW91IGNhbiBjaG9vc2UgdG8gdXBkYXRlIGxhdGVyLg com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + + IBAppleScriptAttributeName + + IBAppleScriptAttributeName + + 0 + 0 + + ManagedSoftwareUpdate.applescript + description + + + com.apple.WebKitIBPlugin + com.apple.InterfaceBuilder.CocoaPlugin @@ -2062,7 +1988,7 @@ ZHkgdG8gdXBkYXRlIG5vdywgeW91IGNhbiBjaG9vc2UgdG8gdXBkYXRlIGxhdGVyLg - 474 + 478 @@ -2075,6 +2001,14 @@ ZHkgdG8gdXBkYXRlIG5vdywgeW91IGNhbiBjaG9vc2UgdG8gdXBkYXRlIGxhdGVyLg + + MSUWebViewPolicyDelegate + NSObject + + IBProjectSource + MSUWebViewPolicyDelegate.h + + 0 diff --git a/code/ManagedSoftwareUpdate/Info.plist b/code/ManagedSoftwareUpdate/Info.plist index 5f2f42da..8ebd2189 100644 --- a/code/ManagedSoftwareUpdate/Info.plist +++ b/code/ManagedSoftwareUpdate/Info.plist @@ -17,11 +17,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.4.0 + 1.5.0 CFBundleSignature mMSU CFBundleVersion - 1.4.0 + 1.5.0 NSAppleScriptEnabled YES NSMainNibFile diff --git a/code/ManagedSoftwareUpdate/ManagedSoftwareUpdate.applescript b/code/ManagedSoftwareUpdate/ManagedSoftwareUpdate.applescript index 83a3b3dc..cb30430e 100755 --- a/code/ManagedSoftwareUpdate/ManagedSoftwareUpdate.applescript +++ b/code/ManagedSoftwareUpdate/ManagedSoftwareUpdate.applescript @@ -259,18 +259,11 @@ on selection changed theObject if selected data rows of theObject is not {} then set theDataRow to selected data row of theObject set theDescription to the contents of data cell "description" of theDataRow - set theRestartAction to the contents of data cell "restartaction" of theDataRow - if theRestartAction is "RequireRestart" or theRestartAction is "RecommendRestart" then - set theRestartAction to return & "Restart required after install." - else if theRestartAction is "RequireLogout" then - set theRestartAction to return & "Logout required before install." - end if - set theText to theDescription & return & theRestartAction else - set theText to "" + set theDescription to "" end if - set contents of text view "description" of scroll view ¬ - "descriptionScrollView" of view "splitViewBottom" of split view "splitView" of window id 1 to theText + set webview to call method "mainFrame" of object (view "description" of view "splitViewBottom" of split view "splitView" of window id 1) + call method "loadHTMLString:baseURL:" of webview with parameter theDescription end if end selection changed diff --git a/code/ManagedSoftwareUpdate/ManagedSoftwareUpdate.xcodeproj/project.pbxproj b/code/ManagedSoftwareUpdate/ManagedSoftwareUpdate.xcodeproj/project.pbxproj index f2b027f5..5300e013 100644 --- a/code/ManagedSoftwareUpdate/ManagedSoftwareUpdate.xcodeproj/project.pbxproj +++ b/code/ManagedSoftwareUpdate/ManagedSoftwareUpdate.xcodeproj/project.pbxproj @@ -35,6 +35,9 @@ C0ACDAAC0FB4A387006D30B3 /* package.tiff in Resources */ = {isa = PBXBuildFile; fileRef = C0ACDA9F0FB4A386006D30B3 /* package.tiff */; }; C0ACDAAD0FB4A387006D30B3 /* Restart.tif in Resources */ = {isa = PBXBuildFile; fileRef = C0ACDAA00FB4A386006D30B3 /* Restart.tif */; }; C0ACDAB00FB4A387006D30B3 /* RestartReq.tif in Resources */ = {isa = PBXBuildFile; fileRef = C0ACDAA30FB4A386006D30B3 /* RestartReq.tif */; }; + C0B5D690112260A6009453BD /* MSUWebViewPolicyDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = C0B5D68E112260A6009453BD /* MSUWebViewPolicyDelegate.h */; }; + C0B5D691112260A6009453BD /* MSUWebViewPolicyDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = C0B5D68F112260A6009453BD /* MSUWebViewPolicyDelegate.m */; }; + C0B5D6F0112266FF009453BD /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0B5D6EF112266FF009453BD /* WebKit.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -56,6 +59,9 @@ C0ACDA9F0FB4A386006D30B3 /* package.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = package.tiff; sourceTree = ""; }; C0ACDAA00FB4A386006D30B3 /* Restart.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = Restart.tif; sourceTree = ""; }; C0ACDAA30FB4A386006D30B3 /* RestartReq.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = RestartReq.tif; sourceTree = ""; }; + C0B5D68E112260A6009453BD /* MSUWebViewPolicyDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MSUWebViewPolicyDelegate.h; sourceTree = ""; }; + C0B5D68F112260A6009453BD /* MSUWebViewPolicyDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MSUWebViewPolicyDelegate.m; sourceTree = ""; }; + C0B5D6EF112266FF009453BD /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; }; DA206CF1015C4E2903C91932 /* AppleScriptKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppleScriptKit.framework; path = /System/Library/Frameworks/AppleScriptKit.framework; sourceTree = ""; }; DA206CF3015C4E8B03C91932 /* ManagedSoftwareUpdate.applescript */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.applescript; path = ManagedSoftwareUpdate.applescript; sourceTree = ""; }; /* End PBXFileReference section */ @@ -67,6 +73,7 @@ files = ( 257572CC072881A4000BE9CA /* Cocoa.framework in Frameworks */, 257572CD072881A4000BE9CA /* AppleScriptKit.framework in Frameworks */, + C0B5D6F0112266FF009453BD /* WebKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -124,6 +131,8 @@ isa = PBXGroup; children = ( 29B97316FDCFA39411CA2CEA /* main.m */, + C0B5D68E112260A6009453BD /* MSUWebViewPolicyDelegate.h */, + C0B5D68F112260A6009453BD /* MSUWebViewPolicyDelegate.m */, ); name = "Other Sources"; sourceTree = ""; @@ -150,6 +159,7 @@ 29B97323FDCFA39411CA2CEA /* Frameworks */ = { isa = PBXGroup; children = ( + C0B5D6EF112266FF009453BD /* WebKit.framework */, 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, ); @@ -163,6 +173,7 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + C0B5D690112260A6009453BD /* MSUWebViewPolicyDelegate.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -233,6 +244,7 @@ buildActionMask = 2147483647; files = ( 257572CA072881A4000BE9CA /* main.m in Sources */, + C0B5D691112260A6009453BD /* MSUWebViewPolicyDelegate.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/code/client/munkilib/appleupdates.py b/code/client/munkilib/appleupdates.py index 798788bb..0fd86702 100755 --- a/code/client/munkilib/appleupdates.py +++ b/code/client/munkilib/appleupdates.py @@ -315,33 +315,6 @@ def parseDist(filename): # append the line to the description description += line + "\n" - if description: - # low-brow convert from HTML to plain text - # get rid of embedded styles: - p = re.compile(']*>[^<>]*') - description = p.sub('',description) - # replace
  • with '• ' - p = re.compile('
  • ') - description = p.sub(u'• ',description) - # then get rid of all HTML tags - p = re.compile('<[^<>]*>') - description = p.sub('',description) - # then get entities - p = re.compile(' ') - description = p.sub(' ',description) - p = re.compile('<') - description = p.sub('<',description) - p = re.compile('>') - description = p.sub('>',description) - # fix escaped single quotes - p = re.compile("\\\\'") - description = p.sub("'",description) - # replace two or more consecutive blank lines with one - p = re.compile('\\n{3,}') - description = p.sub("\\n\\n",description) - # get rid of leading blank lines, tabs, and spaces - description = description.lstrip("\n \t").rstrip("\n \t") - return title, vers, description