DELETED libs/aem1.0/libaem1.0.dylib Index: libs/aem1.0/libaem1.0.dylib ================================================================== --- libs/aem1.0/libaem1.0.dylib +++ libs/aem1.0/libaem1.0.dylib cannot compute difference between binary files DELETED libs/aem1.0/pkgIndex.tcl Index: libs/aem1.0/pkgIndex.tcl ================================================================== --- libs/aem1.0/pkgIndex.tcl +++ libs/aem1.0/pkgIndex.tcl @@ -1,7 +0,0 @@ -# -# Tcl package index file -# -package ifneeded aem 1.0 " - package require Tk 8.5- - if {\"AppKit\" ni \[winfo server .\]} {error {TkAqua Cocoa required}} - load [list [file join $dir libaem1.0.dylib]] aem" Index: libs/machelp/help.txt ================================================================== --- libs/machelp/help.txt +++ libs/machelp/help.txt @@ -161,11 +161,11 @@ ------------------- title: Scriptability and Services alias: Scriptability -PortAuthority offers extensive AppleScript support, including the following commands: +PortAuthority offers extensive AppleScript support. The following commands can be called via AppleScript's "do script" command: * search_all_ports(searchterm) -- search all ports for a specific item * list_installed_ports -- list all installed ports * get_port_info(port) -- get information about a specific port * list_all_ports -- list all ports @@ -172,10 +172,12 @@ * get_search_term -- returns the current search term for a port search * get_info_term -- returns the currently selected port for requesting information * set_search_term -- sets the term to search for a specific port * run_update -- update the MacPorts infrastructure * dump_ports -- export a list of all ports to a file + +As an example: tell app "PortAuthority" to do script "list_all_ports" These commands allow the user to automate PortAuthority and the MacPorts installation. PortAuthority can also be called from the Mac's Services menu. To call PortAuthority from the services menu, highlight a domain name in a Services-aware application (such as Safari, Mail or TextEdit) and select "PortAuthority: Search Ports" from the Services menu. That search term will be passed to PortAuthority and and search output of the ports will be displayed. PortAuthority also supports the ability to call other Mac applications from the Services menu. To call another application's service--for instance, to display a domain in Safari--simply highlight the text in PortAuthority and then select the appropriate item from the Services menu. Index: libs/portauthority/portauthority-main.tcl ================================================================== --- libs/portauthority/portauthority-main.tcl +++ libs/portauthority/portauthority-main.tcl @@ -17,32 +17,21 @@ package require urltext package require tclservices package require cocoaprint package require Tclapplescript package require tclgrowl -package require aem - +#package require aem package require xplat #handle errors in Tk proc bgerror {args} { exec syslog -s -l Error "PortAuthority: An error occurred: $args" } -#install AppleScript event handlers -aem::installeventhandler CoKv sPrt searchAllPorts -aem::installeventhandler CoKv iPrt listInstalledPorts -aem::installeventhandler CoKv aPrt listAllPorts -aem::installeventhandler CoKv dPrt getInfoAboutPort -aem::installeventhandler CoKv pTrm getSearchTerm -aem::installeventhandler CoKv iTrm getInfoTerm -aem::installeventhandler CoKv ssTm setSearchTerm -aem::installeventhandler CoKv rUpd runUpdate -aem::installeventhandler CoKv dmPt dumpPorts - - -proc dumpPorts {outputpath} { +#Commands called via AppleScript "do script" command + +proc dump_ports {outputpath} { global status global category global portpath global verboselevel @@ -94,21 +83,21 @@ } #set search term from AppleScript -proc setSearchTerm {term} { +proc set_search_term {term} { global searchterm set searchterm $term } #searches MacPorts for a specific port, returns to AppleScript -proc searchAllPorts {term} { +proc search_all_ports {term} { global category global status global searchterm global portpath @@ -134,36 +123,25 @@ set version [lindex $item 2] set mycategory [lindex $item 3] lappend searcharray [list $program $version $mycategory] } - set resultfile [open $::env(TMPDIR)/resultfile.txt w] - - foreach item $searcharray { - puts $resultfile $item - } - - close $resultfile - - - set readfile [open $::env(TMPDIR)/resultfile.txt r] - set resultlist [read $readfile] - close $readfile - - return $resultlist + return $searcharray + + } #run self-update -proc runUpdate {} { +proc run_update {} { updateBase } #list all MacPorts ports, return to AppleScript -proc listAllPorts {} { +proc list_all_ports {} { global status global category global portpath global verboselevel global portlist @@ -201,27 +179,15 @@ } lappend portarray [list $program $version $searchcategory] } - set resultfile [open $::env(TMPDIR)/resultfile.txt w] - - foreach item $portarray { - puts $resultfile $item - } - - close $resultfile - - set readfile [open $::env(TMPDIR)/resultfile.txt r] - set resultlist [read $readfile] - close $readfile - - return $resultlist + return $portarray } #list installed ports, return to AppleScript -proc listInstalledPorts {} { +proc list_installed_ports {} { global status global category global portpath global verboselevel @@ -241,58 +207,43 @@ set searchcategory [lindex [split [lindex $item 2] /] 0] lappend installedarray [list $program $version $searchcategory] } - set resultfile [open $::env(TMPDIR)/resultfile.txt w] - - foreach item $installedarray { - puts $resultfile $item - } - - close $resultfile - - set readfile [open $::env(TMPDIR)/resultfile.txt r] - set resultlist [read $readfile] - close $readfile - - return $resultlist + return $installedarray } #get search term from AppleScript -proc getSearchTerm {} { +proc get_search_term {} { global searchterm return $searchterm } -proc getInfoTerm {} { +proc get_info_term {} { set item [lindex [.t.right.upper.frame.listbox get [.t.right.upper.frame.listbox curselection]] 1] set new [lindex [split $item] 0] return $new } #get info about port, pass to AppleScript -proc getInfoAboutPort {term} { +proc get_port_info {term} { global portpath set infoterm $term - exec $portpath info $infoterm > $::env(TMPDIR)/portinfo.txt 2>$::env(TMPDIR)/infoerrors.txt + set myinfo [exec $portpath info $infoterm] - set readfile [open $::env(TMPDIR)/portinfo.txt r] - set myinfo [read $readfile] - close $readfile return $myinfo } #display user help