Friday, 20 March 2015

LaunchServices installation puzzlement


i've been programming unix 20 years or so, i'm absolute newbie @ mac programming. find myself needing write cross platform application windows, mac , linux, , have complete except installation issue mac.

have application needs launch special protocol link in safari. cross platform environment wrote application in (tcl/tk) doesn't support launchservices have little apple script make connection me. this:

on open location iwglink
do shell script "open -a injector --args \"" & iwglink & "\""
end open location

"injector" main application takes link on command line. build script application along suitable info.plist , works. start.

issue installation. little application wrapping above script arrives contained single archive file, carries main application, resources, config, , on. tcl/tk works making archive executable, user downloads it, runs it, , copies place. arriving on mac in manner doesn't allow os spot needs attached launchservices protocol, installer runs "lsregister" command ensure os knows what's going on.

@ point things ok. looking @ lsregister's dump can see little script application, , when click on special link in safari dialog pops asking if want this. if select "show application" option dialog finder pops showing me script application, i'm pretty confident macos knows it's supposed link.

when click "open" in dialog saying want run little script, fails. there's flicker in dock icons move make room new one, instantly move again. effect you'd expect if script started exited. script, in fact, apparently not running. put "beep" in there i'd know if @ least gets going, , doesn't. i'm not sure how debug situation.

there's way solve problem. if go finder , move little script application usb stick, move straight again, works. launch services starts script, script starts application, , works.

question simply: step finder when drag , drop application, running low level copy , lsregister doesn't?
 



Forums Macs Mac Programming


  • iPhone
  • Mac OS & System Software
  • iPad
  • Apple Watch
  • Notebooks
  • iTunes
  • Apple ID
  • iCloud
  • Desktop Computers
  • Apple Music
  • Professional Applications
  • iPod
  • iWork
  • Apple TV
  • iLife
  • Wireless

No comments:

Post a Comment