install ffmpeg and ffmpeg2theora

This commit is contained in:
j 2012-02-24 22:48:22 +05:30
parent 5593fcb3b8
commit f173b27cf7

View file

@ -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]