(* Applescript to run 'Unix' version of mythtv-setup
For use with MacPorts install of Myth
Author: Craig Treleaven, ctreleaven at cogeco.ca
2012Sep08 Force working themepainter
2013Sep25 revert logserver stuff, themepainter no longer necessary
property MSUappPath : "@PREFIX@/bin/mythtv-setup"
property MSUlogArg : "--logpath @MYTHTVLOGDIR@"
property MSUlogLevel : "info" -- single string
property MSUverboseLevel : {"general"} -- a list, can be multiple strings
set welcome to "Initial setup of Myth is done through the mythtv-setup program.
This includes defining where recordings and other media are stored, tuners and sources of listings data and scanning for available channels, etc.
--Should test if mythbackend is running and warn user...
set Clicked to display dialog welcome with title ¬
"Run mythtv-setup" buttons {"Cancel", "Start"} default button "Start"
set CmdList to {MSUappPath, MSUlogArg, "--loglevel " & MSUlogLevel, "--verbose " & joinlist(MSUverboseLevel, ",")}
set Cmd to (joinlist(CmdList, " "))
--display alert button returned of Clicked
if Clicked is not false then
if button returned of Clicked = "Start" then
do shell script Cmd -- run it!
to joinlist(aList, delimiter)
set prevDelimiter to AppleScript's text item delimiters
set AppleScript's text item delimiters to delimiter
set retVal to aList as string
set AppleScript's text item delimiters to prevDelimiter