From: <ip...@us...> - 2008-08-22 06:20:37
|
Revision: 3348 http://hugin.svn.sourceforge.net/hugin/?rev=3348&view=rev Author: ippei Date: 2008-08-22 06:20:35 +0000 (Fri, 22 Aug 2008) Log Message: ----------- Mac: plugin architecture finish up Modified Paths: -------------- hugin/trunk/mac/Hugin-Info.plist Added Paths: ----------- hugin/trunk/mac/PutAutoCPtoApplicationSupport.applescript Modified: hugin/trunk/mac/Hugin-Info.plist =================================================================== --- hugin/trunk/mac/Hugin-Info.plist 2008-08-21 15:16:20 UTC (rev 3347) +++ hugin/trunk/mac/Hugin-Info.plist 2008-08-22 06:20:35 UTC (rev 3348) @@ -24,6 +24,18 @@ <key>LSTypeIsPackage</key> <false/> </dict> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>huginAutoCP</string> + </array> + <key>CFBundleTypeName</key> + <string>Hugin Automatic Control-point Detection plugin</string> + <key>CFBundleTypeRole</key> + <string>None</string> + <key>LSTypeIsPackage</key> + <true/> + </dict> </array> <key>CFBundleExecutable</key> <string>Hugin</string> Added: hugin/trunk/mac/PutAutoCPtoApplicationSupport.applescript =================================================================== --- hugin/trunk/mac/PutAutoCPtoApplicationSupport.applescript (rev 0) +++ hugin/trunk/mac/PutAutoCPtoApplicationSupport.applescript 2008-08-22 06:20:35 UTC (rev 3348) @@ -0,0 +1,23 @@ +to open the droppedFiles + repeat with eachFile in droppedFiles + installAutoCP(eachFile) + end repeat +end open + +installAutoCP(choose file with prompt "Choose AutoCP plugin for Hugin" of type {"BNDL", "????"} without invisibles) + +to installAutoCP(theFile) + tell application "Finder" to set theExtension to the name extension of theFile + if theExtension is not equal to "huginAutoCP" then + display alert "Wrong file type" message \xC2 + "The file extension ." & theExtension & " indicates this file is not an AutoCP plugin for Hugin." buttons {"Quit"} as critical + quit + end if + + set theDestination to (the path to application support from user domain as text) & "Hugin:Autopano:" + tell application "Finder" + if not (exists theDestination) then do shell script "mkdir -p \"" & (POSIX path of theDestination) & "\"" + if (exists (theDestination & the name of theFile)) then delete (theDestination & the name of theFile) + duplicate theFile to theDestination + end tell +end installAutoCP \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |