Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed documentation

Added setup.py install system (still experimental)

Fixed version number
  • Loading branch information...
commit 67d972e37c15e70fcc947923d9c797a98ea31d7c 1 parent 6a03d14
Sergio Costas authored
View
421 devede
@@ -0,0 +1,421 @@
+#!/usr/bin/env python
+# -*- coding: UTF-8 -*-
+
+# Copyright 2006-2009 (C) Raster Software Vigo (Sergio Costas)
+# Copyright 2006-2009 (C) Peter Gill - win32 parts
+
+# This file is part of DeVeDe
+#
+# DeVeDe is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# DeVeDe is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+import sys
+import os
+import pygtk # for testing GTK version number
+pygtk.require ('2.0')
+import gtk
+import gobject
+import subprocess
+import locale
+import gettext
+import stat
+import shutil
+import pickle
+import cairo
+
+print "DeVeDe 3.22.0"
+if (sys.platform!="win32") and (sys.platform!="win64"):
+ try:
+ print "Locale: "+str(os.environ["LANG"])
+ except:
+ print "Locale not defined"
+
+# append the directories where we install the devede's own modules
+tipo=-1
+
+try:
+ fichero=open("./interface/wmain.ui","r")
+ fichero.close()
+ tipo=2
+ found=True
+except:
+ found=False
+
+if found==False:
+ try:
+ fichero=open("/usr/share/devede/wmain.ui","r")
+ fichero.close()
+ tipo=0
+ found=True
+ except:
+ found=False
+
+if found==False:
+ try:
+ fichero=open("/usr/local/share/devede/wmain.ui","r")
+ fichero.close()
+ tipo=1
+ found=True
+ except:
+ found=False
+
+if tipo==0:
+ #gettext.bindtextdomain('devede', '/usr/share/locale')
+ #Note also before python 2.3 you need the following if
+ #you need translations from non python code (glibc,libglade etc.)
+ #there are other access points to this function
+ #gtk.glade.bindtextdomain("devede","/usr/share/locale")
+ #arbol=gtk.Builder("/usr/share/devede/devede.glade",domain="devede")
+ # append the directories where we install the devede's own modules
+
+ share_locale="/usr/share/locale"
+ glade="/usr/share/devede"
+ sys.path.append("/usr/lib/devede")
+ font_path="/usr/share/devede"
+ pic_path="/usr/share/devede"
+ other_path="/usr/share/devede"
+ help_path="/usr/share/doc/devede"
+ print "Using package-installed files"
+
+elif tipo==1:
+ # if the files aren't at /usr, try with /usr/local
+ #gettext.bindtextdomain('devede', '/usr/share/locale')
+ #Note also before python 2.3 you need the following if
+ #you need translations from non python code (glibc,libglade etc.)
+ #there are other access points to this function
+ #gtk.glade.bindtextdomain("devede","/usr/share/locale")
+ #arbol=gtk.Builder("/usr/local/share/devede/devede.glade",domain="devede")
+
+ share_locale="/usr/share/locale" # Are you sure?
+ # if the files aren't at /usr, try with /usr/local
+ glade="/usr/local/share/devede"
+ sys.path.append("/usr/local/lib/devede")
+ font_path="/usr/local/share/devede"
+ pic_path="/usr/local/share/devede"
+ other_path="/usr/local/share/devede"
+ help_path="/usr/local/share/doc/devede"
+ print "Using local-installed files"
+
+elif tipo==2:
+ # if the files aren't at /usr/local, try with ./
+ #gettext.bindtextdomain('devede', './po/')
+ #Note also before python 2.3 you need the following if
+ #you need translations from non python code (glibc,libglade etc.)
+ #there are other access points to this function
+ #gtk.glade.bindtextdomain("devede","/usr/share/locale")
+ #arbol=gtk.Builder("./devede.glade",domain="devede")
+
+ # if the files aren't at /usr/local, try with ./
+ share_locale="./po/"
+ glade="./interface"
+ sys.path.append(os.getcwd())#("./")
+ font_path=os.getcwd()#"./"
+ pic_path=os.path.join(font_path, "pixmaps") #pic_path=font_path
+ other_path=os.path.join(font_path,"pixmaps")
+ help_path=os.path.join(font_path,"doc")
+ print "Using direct files"
+
+else:
+ print "Can't locate extra files. Aborting."
+ sys.exit(1)
+
+
+#####################
+# GetText Stuff #
+#####################
+
+gettext.bindtextdomain('devede',share_locale)
+try:
+ locale.setlocale(locale.LC_ALL,"")
+except locale.Error:
+ pass
+gettext.textdomain('devede')
+gettext.install("devede",localedir=share_locale) # None is sys default locale
+# Note also before python 2.3 you need the following if
+# you need translations from non python code (glibc,libglade etc.)
+# there are other access points to this function
+#gtk.glade.bindtextdomain("devede",share_locale)
+
+arbol=gtk.Builder()
+arbol.set_translation_domain("devede")
+
+# To actually call the gettext translation functions
+# just replace your strings "string" with gettext("string")
+# The following shortcut are usually used:
+_ = gettext.gettext
+
+try:
+ import devede_other
+except:
+ print "Failed to load modules DEVEDE_OTHER. Exiting"
+ sys.exit(1)
+try:
+ import devede_convert
+except:
+ print "Failed to load modules DEVEDE_CONVERT. Exiting"
+ sys.exit(1)
+try:
+ import devede_newfiles
+except:
+ print "Failed to load module DEVEDE_NEWFILES. Exiting"
+ sys.exit(1)
+try:
+ import devede_xml_menu
+except:
+ print "Failed to load module DEVEDE_XML_MENU"
+ sys.exit(1)
+
+try:
+ import devede_disctype
+except:
+ print "Failed to load module DEVEDE_DISCTYPE"
+ sys.exit(1)
+
+try:
+ import devede_fonts
+except:
+ print "Failed to load module DEVEDE_FONTS"
+ sys.exit(1)
+
+
+home=devede_other.get_home_directory()
+
+#locale.setlocale(locale.LC_ALL,"")
+#gettext.textdomain('devede')
+#_ = gettext.gettext
+
+# global variables used (they are stored in a single dictionary to
+# avoid true global variables):
+# there are these two that aren't stored in the dictionary because they are very widely used:
+# arbol
+# structure
+
+global_vars={}
+
+if pic_path[-1]!=os.sep:
+ pic_path+=os.sep
+
+def get_number(line):
+
+ pos=line.find(":")
+ if pos==-1:
+ return -1
+
+ return int(line[pos+1:])
+
+def get_cores():
+
+ """ Returns the number of cores available in the system """
+
+ try:
+ import multiprocessing
+ hyper=multiprocessing.cpu_count()
+ except:
+ hyper=1
+
+ if (sys.platform=="win32") or (sys.platform=="win64"):
+ logical_cores = win32api.GetSystemInfo()[5] #Logical Cores
+ return (logical_cores,logical_cores)
+
+ failed=False
+ try:
+ proc=open("/proc/cpuinfo","r")
+ except:
+ failed=True
+
+
+ if failed:
+ # If can't read /proc/cpuinfo, try to use the multiprocessing module
+
+ return (hyper,hyper) # if we can't open /PROC/CPUINFO, return only one CPU (just in case)
+
+ siblings=1 # default values
+ cpu_cores=1 # for siblings and cpu cores
+ notfirst=False
+ ncores=0
+ nvirtcores=0
+ while(True):
+ line=proc.readline()
+
+ if (((line[:9]=="processor") and notfirst) or (line=="")):
+
+ # each entry is equivalent to CPU_CORES/SIBLINGS real cores
+ # (always 1 except in HyperThreading systems, where it counts 1/2)
+
+ ncores+=(float(cpu_cores))/(float(siblings))
+ siblings=1
+ cpu_cores=1
+
+ if line=="":
+ break
+
+ if line[:9]=="processor":
+ notfirst=True
+ nvirtcores+=1
+ elif (line[:8]=="siblings"):
+ siblings=get_number(line)
+ elif (line[:9]=="cpu cores"):
+ cpu_cores=get_number(line)
+
+ if (nvirtcores==0):
+ nvirtcores=1
+ if(ncores<=1.0):
+ return (1,nvirtcores)
+ else:
+ return (int(ncores),nvirtcores)
+
+global_vars["PAL"]=True
+global_vars["disctocreate"]=""
+global_vars["path"]=pic_path
+global_vars["install_path"]=other_path
+global_vars["menu_widescreen"]=False
+global_vars["gladefile"]=glade
+global_vars["erase_temporary_files"]=True
+global_vars["number_actions"]=1
+global_vars["expand_advanced"]=False
+global_vars["erase_files"]=True
+global_vars["action_todo"]=2
+global_vars["filmpath"]=""
+global_vars["help_path"]=help_path
+global_vars["finalfolder"]=""
+global_vars["sub_codepage"]="ISO-8859-1"
+global_vars["sub_language"]="EN (ENGLISH)"
+global_vars["with_menu"]=True
+global_vars["AC3_fix"]=False
+(a,b)=get_cores()
+global_vars["cores"]=a
+global_vars["hypercores"]=b
+global_vars["use_ffmpeg"]=True
+global_vars["use_ffmpeg_menu"]=False
+global_vars["warning_ffmpeg"]=False
+global_vars["shutdown_after_disc"]=False
+
+global_vars["menu_top_margin"]=0.125
+global_vars["menu_bottom_margin"]=0.125
+global_vars["menu_left_margin"]=0.1
+global_vars["menu_right_margin"]=0.1
+#global_vars[""]=""
+
+print "Cores: "+str(global_vars["cores"])+" Virtual cores: "+str(global_vars["hypercores"])
+
+if font_path[-1]!=os.sep:
+ font_path+=os.sep
+font_path+="devedesans.ttf"
+global_vars["font_path"]=font_path
+
+print "Entro en fonts"
+fonts_found=devede_fonts.prepare_devede_font(home,font_path)
+print "Salgo de fonts"
+
+devede_other.load_config(global_vars) # load configuration
+
+errors="" # check for installed programs
+if (sys.platform=="win32") or (sys.platform=="win64"):
+ try:
+ devede_other.check_program(["mplayer.exe", "-v"])
+ except:
+ errors+="mplayer\n"
+ try:
+ devede_other.check_program(["mencoder.exe", "-msglevel", "help"])
+ except:
+ errors+="mencoder\n"
+ try:
+ devede_other.check_program(["dvdauthor.exe", "--help"])
+ except:
+ errors+="dvdauthor\n"
+ try:
+ devede_other.check_program(["vcdimager.exe", "--help"])
+ except:
+ errors+="vcdimager\n"
+ try:
+ devede_other.check_program(["iconv.exe", "--help"])
+ except:
+ errors+="iconv\n"
+
+ try:
+ devede_other.check_program(["mkisofs.exe"])
+ mkisofs=True
+ global_vars["iso_creator"]="mkisofs.exe"
+ except:
+ mkisofs=False
+
+ if mkisofs==False:
+ try:
+ devede_other.check_program(["genisoimage.exe"])
+ global_vars["iso_creator"]="genisoimage.exe"
+ except:
+ errors+="genisoimage/mkisofs\n"
+
+ try:
+ devede_other.check_program(["spumux.exe", "--help"])
+ except:
+ errors+="spumux\n"
+
+else:
+
+ if 127==devede_other.check_program("mplayer -v"):
+ errors+="mplayer\n"
+ if 127==devede_other.check_program("mencoder -msglevel help"):
+ errors+="mencoder\n"
+ if 127==devede_other.check_program("ffmpeg --help"):
+ errors+="ffmpeg\n"
+ if 127==devede_other.check_program("dvdauthor --help"):
+ errors+="dvdauthor\n"
+ if 127==devede_other.check_program("vcdimager --help"):
+ errors+="vcdimager\n"
+ if 127==devede_other.check_program("iconv --help"):
+ errors+="iconv\n"
+ if 127==devede_other.check_program("mkisofs -help"):
+ if 127==devede_other.check_program("genisoimage -help"):
+ errors+="genisoimage/mkisofs\n"
+ else:
+ global_vars["iso_creator"]="genisoimage"
+ else:
+ global_vars["iso_creator"]="mkisofs"
+
+ if 127==devede_other.check_program("spumux --help"):
+ errors+="spumux\n"
+
+
+def program_exit(widget):
+
+ gtk.main_quit()
+
+
+if errors!="":
+ arbol.add_from_file(os.path.join(glade,"wprograms.ui"))
+ w=arbol.get_object("programs_label")
+ w.set_text(errors)
+ wprograms=arbol.get_object("wprograms")
+ wprograms.show()
+ w=arbol.get_object("program_exit")
+ w.connect("clicked",program_exit)
+ wprograms.connect("destroy",program_exit)
+elif fonts_found==False:
+ arbol.add_from_file(os.path.join(glade,"wnofonts.ui"))
+ wprograms=arbol.get_object("wnofonts")
+ wprograms.show()
+ w=arbol.get_object("fonts_program_exit")
+ w.connect("clicked",program_exit)
+ wprograms.connect("destroy",program_exit)
+else:
+ new_file=devede_disctype.disctype(global_vars)
+
+gtk.main()
+print "Saving configuration"
+devede_other.save_config(global_vars)
+print "Exiting"
+print "Have a nice day"
+sys.stdout.flush()
+sys.stderr.flush()
View
421 devede.py
@@ -1,421 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-
-# Copyright 2006-2009 (C) Raster Software Vigo (Sergio Costas)
-# Copyright 2006-2009 (C) Peter Gill - win32 parts
-
-# This file is part of DeVeDe
-#
-# DeVeDe is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# DeVeDe is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-
-import sys
-import os
-import pygtk # for testing GTK version number
-pygtk.require ('2.0')
-import gtk
-import gobject
-import subprocess
-import locale
-import gettext
-import stat
-import shutil
-import pickle
-import cairo
-
-print "DeVeDe 3.22.0"
-if (sys.platform!="win32") and (sys.platform!="win64"):
- try:
- print "Locale: "+str(os.environ["LANG"])
- except:
- print "Locale not defined"
-
-# append the directories where we install the devede's own modules
-tipo=-1
-
-try:
- fichero=open("./interface/wmain.ui","r")
- fichero.close()
- tipo=2
- found=True
-except:
- found=False
-
-if found==False:
- try:
- fichero=open("/usr/share/devede/wmain.ui","r")
- fichero.close()
- tipo=0
- found=True
- except:
- found=False
-
-if found==False:
- try:
- fichero=open("/usr/local/share/devede/wmain.ui","r")
- fichero.close()
- tipo=1
- found=True
- except:
- found=False
-
-if tipo==0:
- #gettext.bindtextdomain('devede', '/usr/share/locale')
- #Note also before python 2.3 you need the following if
- #you need translations from non python code (glibc,libglade etc.)
- #there are other access points to this function
- #gtk.glade.bindtextdomain("devede","/usr/share/locale")
- #arbol=gtk.Builder("/usr/share/devede/devede.glade",domain="devede")
- # append the directories where we install the devede's own modules
-
- share_locale="/usr/share/locale"
- glade="/usr/share/devede"
- sys.path.append("/usr/lib/devede")
- font_path="/usr/share/devede"
- pic_path="/usr/share/devede"
- other_path="/usr/share/devede"
- help_path="/usr/share/doc/devede"
- print "Using package-installed files"
-
-elif tipo==1:
- # if the files aren't at /usr, try with /usr/local
- #gettext.bindtextdomain('devede', '/usr/share/locale')
- #Note also before python 2.3 you need the following if
- #you need translations from non python code (glibc,libglade etc.)
- #there are other access points to this function
- #gtk.glade.bindtextdomain("devede","/usr/share/locale")
- #arbol=gtk.Builder("/usr/local/share/devede/devede.glade",domain="devede")
-
- share_locale="/usr/share/locale" # Are you sure?
- # if the files aren't at /usr, try with /usr/local
- glade="/usr/local/share/devede"
- sys.path.append("/usr/local/lib/devede")
- font_path="/usr/local/share/devede"
- pic_path="/usr/local/share/devede"
- other_path="/usr/local/share/devede"
- help_path="/usr/local/share/doc/devede"
- print "Using local-installed files"
-
-elif tipo==2:
- # if the files aren't at /usr/local, try with ./
- #gettext.bindtextdomain('devede', './po/')
- #Note also before python 2.3 you need the following if
- #you need translations from non python code (glibc,libglade etc.)
- #there are other access points to this function
- #gtk.glade.bindtextdomain("devede","/usr/share/locale")
- #arbol=gtk.Builder("./devede.glade",domain="devede")
-
- # if the files aren't at /usr/local, try with ./
- share_locale="./po/"
- glade="./interface"
- sys.path.append(os.getcwd())#("./")
- font_path=os.getcwd()#"./"
- pic_path=os.path.join(font_path, "pixmaps") #pic_path=font_path
- other_path=os.path.join(font_path,"pixmaps")
- help_path=os.path.join(font_path,"doc")
- print "Using direct files"
-
-else:
- print "Can't locate extra files. Aborting."
- sys.exit(1)
-
-
-#####################
-# GetText Stuff #
-#####################
-
-gettext.bindtextdomain('devede',share_locale)
-try:
- locale.setlocale(locale.LC_ALL,"")
-except locale.Error:
- pass
-gettext.textdomain('devede')
-gettext.install("devede",localedir=share_locale) # None is sys default locale
-# Note also before python 2.3 you need the following if
-# you need translations from non python code (glibc,libglade etc.)
-# there are other access points to this function
-#gtk.glade.bindtextdomain("devede",share_locale)
-
-arbol=gtk.Builder()
-arbol.set_translation_domain("devede")
-
-# To actually call the gettext translation functions
-# just replace your strings "string" with gettext("string")
-# The following shortcut are usually used:
-_ = gettext.gettext
-
-try:
- import devede_other
-except:
- print "Failed to load modules DEVEDE_OTHER. Exiting"
- sys.exit(1)
-try:
- import devede_convert
-except:
- print "Failed to load modules DEVEDE_CONVERT. Exiting"
- sys.exit(1)
-try:
- import devede_newfiles
-except:
- print "Failed to load module DEVEDE_NEWFILES. Exiting"
- sys.exit(1)
-try:
- import devede_xml_menu
-except:
- print "Failed to load module DEVEDE_XML_MENU"
- sys.exit(1)
-
-try:
- import devede_disctype
-except:
- print "Failed to load module DEVEDE_DISCTYPE"
- sys.exit(1)
-
-try:
- import devede_fonts
-except:
- print "Failed to load module DEVEDE_FONTS"
- sys.exit(1)
-
-
-home=devede_other.get_home_directory()
-
-#locale.setlocale(locale.LC_ALL,"")
-#gettext.textdomain('devede')
-#_ = gettext.gettext
-
-# global variables used (they are stored in a single dictionary to
-# avoid true global variables):
-# there are these two that aren't stored in the dictionary because they are very widely used:
-# arbol
-# structure
-
-global_vars={}
-
-if pic_path[-1]!=os.sep:
- pic_path+=os.sep
-
-def get_number(line):
-
- pos=line.find(":")
- if pos==-1:
- return -1
-
- return int(line[pos+1:])
-
-def get_cores():
-
- """ Returns the number of cores available in the system """
-
- try:
- import multiprocessing
- hyper=multiprocessing.cpu_count()
- except:
- hyper=1
-
- if (sys.platform=="win32") or (sys.platform=="win64"):
- logical_cores = win32api.GetSystemInfo()[5] #Logical Cores
- return (logical_cores,logical_cores)
-
- failed=False
- try:
- proc=open("/proc/cpuinfo","r")
- except:
- failed=True
-
-
- if failed:
- # If can't read /proc/cpuinfo, try to use the multiprocessing module
-
- return (hyper,hyper) # if we can't open /PROC/CPUINFO, return only one CPU (just in case)
-
- siblings=1 # default values
- cpu_cores=1 # for siblings and cpu cores
- notfirst=False
- ncores=0
- nvirtcores=0
- while(True):
- line=proc.readline()
-
- if (((line[:9]=="processor") and notfirst) or (line=="")):
-
- # each entry is equivalent to CPU_CORES/SIBLINGS real cores
- # (always 1 except in HyperThreading systems, where it counts 1/2)
-
- ncores+=(float(cpu_cores))/(float(siblings))
- siblings=1
- cpu_cores=1
-
- if line=="":
- break
-
- if line[:9]=="processor":
- notfirst=True
- nvirtcores+=1
- elif (line[:8]=="siblings"):
- siblings=get_number(line)
- elif (line[:9]=="cpu cores"):
- cpu_cores=get_number(line)
-
- if (nvirtcores==0):
- nvirtcores=1
- if(ncores<=1.0):
- return (1,nvirtcores)
- else:
- return (int(ncores),nvirtcores)
-
-global_vars["PAL"]=True
-global_vars["disctocreate"]=""
-global_vars["path"]=pic_path
-global_vars["install_path"]=other_path
-global_vars["menu_widescreen"]=False
-global_vars["gladefile"]=glade
-global_vars["erase_temporary_files"]=True
-global_vars["number_actions"]=1
-global_vars["expand_advanced"]=False
-global_vars["erase_files"]=True
-global_vars["action_todo"]=2
-global_vars["filmpath"]=""
-global_vars["help_path"]=help_path
-global_vars["finalfolder"]=""
-global_vars["sub_codepage"]="ISO-8859-1"
-global_vars["sub_language"]="EN (ENGLISH)"
-global_vars["with_menu"]=True
-global_vars["AC3_fix"]=False
-(a,b)=get_cores()
-global_vars["cores"]=a
-global_vars["hypercores"]=b
-global_vars["use_ffmpeg"]=True
-global_vars["use_ffmpeg_menu"]=False
-global_vars["warning_ffmpeg"]=False
-global_vars["shutdown_after_disc"]=False
-
-global_vars["menu_top_margin"]=0.125
-global_vars["menu_bottom_margin"]=0.125
-global_vars["menu_left_margin"]=0.1
-global_vars["menu_right_margin"]=0.1
-#global_vars[""]=""
-
-print "Cores: "+str(global_vars["cores"])+" Virtual cores: "+str(global_vars["hypercores"])
-
-if font_path[-1]!=os.sep:
- font_path+=os.sep
-font_path+="devedesans.ttf"
-global_vars["font_path"]=font_path
-
-print "Entro en fonts"
-fonts_found=devede_fonts.prepare_devede_font(home,font_path)
-print "Salgo de fonts"
-
-devede_other.load_config(global_vars) # load configuration
-
-errors="" # check for installed programs
-if (sys.platform=="win32") or (sys.platform=="win64"):
- try:
- devede_other.check_program(["mplayer.exe", "-v"])
- except:
- errors+="mplayer\n"
- try:
- devede_other.check_program(["mencoder.exe", "-msglevel", "help"])
- except:
- errors+="mencoder\n"
- try:
- devede_other.check_program(["dvdauthor.exe", "--help"])
- except:
- errors+="dvdauthor\n"
- try:
- devede_other.check_program(["vcdimager.exe", "--help"])
- except:
- errors+="vcdimager\n"
- try:
- devede_other.check_program(["iconv.exe", "--help"])
- except:
- errors+="iconv\n"
-
- try:
- devede_other.check_program(["mkisofs.exe"])
- mkisofs=True
- global_vars["iso_creator"]="mkisofs.exe"
- except:
- mkisofs=False
-
- if mkisofs==False:
- try:
- devede_other.check_program(["genisoimage.exe"])
- global_vars["iso_creator"]="genisoimage.exe"
- except:
- errors+="genisoimage/mkisofs\n"
-
- try:
- devede_other.check_program(["spumux.exe", "--help"])
- except:
- errors+="spumux\n"
-
-else:
-
- if 127==devede_other.check_program("mplayer -v"):
- errors+="mplayer\n"
- if 127==devede_other.check_program("mencoder -msglevel help"):
- errors+="mencoder\n"
- if 127==devede_other.check_program("ffmpeg --help"):
- errors+="ffmpeg\n"
- if 127==devede_other.check_program("dvdauthor --help"):
- errors+="dvdauthor\n"
- if 127==devede_other.check_program("vcdimager --help"):
- errors+="vcdimager\n"
- if 127==devede_other.check_program("iconv --help"):
- errors+="iconv\n"
- if 127==devede_other.check_program("mkisofs -help"):
- if 127==devede_other.check_program("genisoimage -help"):
- errors+="genisoimage/mkisofs\n"
- else:
- global_vars["iso_creator"]="genisoimage"
- else:
- global_vars["iso_creator"]="mkisofs"
-
- if 127==devede_other.check_program("spumux --help"):
- errors+="spumux\n"
-
-
-def program_exit(widget):
-
- gtk.main_quit()
-
-
-if errors!="":
- arbol.add_from_file(os.path.join(glade,"wprograms.ui"))
- w=arbol.get_object("programs_label")
- w.set_text(errors)
- wprograms=arbol.get_object("wprograms")
- wprograms.show()
- w=arbol.get_object("program_exit")
- w.connect("clicked",program_exit)
- wprograms.connect("destroy",program_exit)
-elif fonts_found==False:
- arbol.add_from_file(os.path.join(glade,"wnofonts.ui"))
- wprograms=arbol.get_object("wnofonts")
- wprograms.show()
- w=arbol.get_object("fonts_program_exit")
- w.connect("clicked",program_exit)
- wprograms.connect("destroy",program_exit)
-else:
- new_file=devede_disctype.disctype(global_vars)
-
-gtk.main()
-print "Saving configuration"
-devede_other.save_config(global_vars)
-print "Exiting"
-print "Have a nice day"
-sys.stdout.flush()
-sys.stderr.flush()
View
1  devede.py
View
2  docs/html/index.html
@@ -6,7 +6,7 @@
</head>
<body bgcolor="#E8E8F0">
<p><div style="text-align: center;"><h1>DeVeDe, a video DVD creator</h1></div></p>
-<p>Current version: 3.21.0</p>
+<p>Current version: 3.22.0</p>
<p><h2>What is it?</h2></p>
<p>DeVeDe is a program that allows you to create a video DVD from an MPEG, AVI, MOV... video file,
suitable for home DVD players. DeVeDe uses <b>Mplayer</b>, <b>Mencoder</b>, <b>DVDAuthor</b> and
View
9 docs/html/preferences.html
@@ -26,9 +26,16 @@
threads to convert the videos, thus getting advantage of multicore CPUs to run faster. But it can produce some artifacts,
so if the picture quality is not good, try to disable it.</p>
-<p>The next option makes Devede to use FFMpeg instead of Mencoder. This code is still experimental, but also quite stable, so
+<p>Just under is <b>Don't use hyperthreading</b>. This is a technology introduced in the Pentium 4, and reintroduced in the last Intel processors,
+and allows to simulate two virtual cores from each physical core. Unfortunately, in the old Pentium 4 it was quite defective, and could result in a
+loss of performance. In the newer processors it has been fixed.</p>
+
+<p>The next option makes Devede to use FFMpeg instead of Mencoder when encoding videos. This code is still experimental, but also quite stable, so
you should be able to use it without problems. If you experience coding problems, try activating this option.</p>
+<p>The next one makes Devede to use FFMpeg instead of Mencoder when encoding the menus: some versions of FFMpeg aren't capable of creating suitable files
+for the DVD menus, so the solution is to use Mencoder for menus, and FFMpeg for the videos.</p>
+
<p>The next option allows to specify where Devede will store the temporal files for previews.</p>
<p>Finally, the <b>AC3_FIXED workaround</b> activates a workaround for some Mencoder versions. If you experience sound problems when using Mencoder, you
View
BIN  docs/html/preferences.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
9 docs/html/versions.html
@@ -10,6 +10,15 @@
<p><h2>History of versions</h2></p>
+<p><b>Version 3.22.0 (2012-05-22)</b></p>
+<ul>
+<li>Allows to choose which coder use for videos and which for menus</li>
+<li>Allows to choose to use or not hyperthreading</li>
+<li>Set audio bitrate in menus to 192Kbps, and video bitrate to 2500Kbps</li>
+<li>Graceful degradation when the locale is unknown (thanks to Mattbe)</li>
+<li>Added setup.py as an installation method</li>
+</ul>
+
<p><b>Version 3.21.0 (2011-12-30)</b></p>
<ul>
<li>Fixed a bug when creating DVDs with more that one page in the menu</li>
View
66 setup.py
@@ -0,0 +1,66 @@
+#!/usr/bin/python
+
+import os
+from glob import glob
+from distutils.core import setup
+from distutils import dep_util
+
+def get_mopath(pofile):
+ # Function to determine right locale path for a .po file
+ lang = os.path.basename(pofile)[:-3] # len('.po') == 3
+ modir = os.path.join('locale', lang, 'LC_MESSAGES') # e.g. locale/fr/LC_MESSAGES/
+ mofile = os.path.join(modir, 'devede.mo') # e.g. locale/fr/LC_MESSAGES/devede.mo
+ return modir, mofile
+
+def get_data_files():
+ data_files = [
+ (os.path.join('share', 'applications'), ['devede.desktop']),
+ (os.path.join('share', 'pixmaps'), ['devede.svg']),
+ (os.path.join('share', 'devede'), glob("interface/*")),
+ (os.path.join('share', 'devede'), glob('pixmaps/*g')),
+ (os.path.join('share', 'devede'), ['devede.svg']),
+ (os.path.join('share', 'devede'), ['devedesans.ttf']),
+ (os.path.join('share', 'devede', 'backgrounds'), glob('pixmaps/backgrounds/*')),
+ (os.path.join('share', 'doc', 'devede', 'html'), glob('docs/html/*'))
+ ]
+
+ for pofile in [f for f in os.listdir('po') if f.endswith('.po')]:
+ pofile = os.path.join('po', pofile) # po/fr.po
+ modir, mofile = get_mopath(pofile)
+ target = os.path.join('share', modir) # share/locale/fr/LC_MESSAGES/
+ data_files.append((target, [mofile]))
+
+ return data_files
+
+def get_py_modules():
+ return [i.replace(".py","") for i in glob("devede_*.py")]
+
+def compile_translations():
+ for pofile in [f for f in os.listdir('po') if f.endswith('.po')]:
+ pofile = os.path.join('po', pofile)
+ modir, mofile = get_mopath(pofile)
+
+ # create an architecture for these locales
+ if not os.path.isdir(modir):
+ os.makedirs(modir)
+
+ if not os.path.isfile(mofile) or dep_util.newer(pofile, mofile):
+ print 'compiling %s' % mofile
+ # msgfmt.make(pofile, mofile)
+ os.system("msgfmt \"" + pofile + "\" -o \"" + mofile + "\"")
+ else:
+ print 'skipping %s - up to date' % mofile
+
+compile_translations()
+
+setup(
+ name = 'devede',
+ version = '3.22.0',
+ author = "Sergio Costas",
+ author_email = "raster@rastersoft.com",
+ url = "http://www.rastersoft.com/programas/devede.html",
+ license = 'GPL-3',
+ py_modules = get_py_modules(),
+ scripts=['devede'],
+ data_files = get_data_files()
+)
Please sign in to comment.
Something went wrong with that request. Please try again.