install ffmpeg and ffmpeg2theora
This commit is contained in:
parent
5593fcb3b8
commit
f173b27cf7
1 changed files with 18 additions and 0 deletions
|
@ -247,6 +247,24 @@ class Client(object):
|
|||
self.save_config()
|
||||
print "\nconfiguration updated."
|
||||
|
||||
#install required programs
|
||||
if sys.platform == 'darwin':
|
||||
osname = 'macosx'
|
||||
elif sys.platform == 'win32':
|
||||
osname = 'exe'
|
||||
else:
|
||||
osname = 'linux'
|
||||
bindir = os.path.expanduser('~/.ox/bin')
|
||||
ox.makedirs(bindir)
|
||||
for p in ('ffmpeg', 'ffmpeg2theora'):
|
||||
path = os.path.join(bindir, p)
|
||||
if sys.platform == 'win32':
|
||||
p += '.exe'
|
||||
if not os.path.exists(path):
|
||||
print "installing %s in %s" % (p, bindir)
|
||||
ox.net.saveUrl('http://firefogg.org/nightly/%s.%s' % (p, osname), path)
|
||||
os.chmod(path, 755)
|
||||
|
||||
def add_volume(self, args):
|
||||
if len(args) != 2:
|
||||
print "Usage: %s add_volume name path" % sys.argv[0]
|
||||
|
|
Loading…
Reference in a new issue