diff --git a/branches/0.3/arch/PKGBUILD b/arch/PKGBUILD similarity index 100% rename from branches/0.3/arch/PKGBUILD rename to arch/PKGBUILD diff --git a/branches/0.3/arch/pywinery.install b/arch/pywinery.install similarity index 100% rename from branches/0.3/arch/pywinery.install rename to arch/pywinery.install diff --git a/branches/0.1/debian/changelog b/branches/0.1/debian/changelog deleted file mode 100644 index 31b41cc..0000000 --- a/branches/0.1/debian/changelog +++ /dev/null @@ -1,35 +0,0 @@ -pywinery (0.1-6) testing; urgency=high - - * Fixed error with wine's version numbers containing chars - - -- spayder26 Sat, 22 May 2010 23:59:00 +0000 -pywinery (0.1-5) testing; urgency=high - - * Fixed wine dependency (wine1.2's branch) - - -- spayder26 Sat, 20 Feb 2010 20:45:00 +0000 -pywinery (0.1-4) testing; urgency=medium - - * Bugfix. (Closes: #1) - * Some random tweaking. - - -- spayder26 Sun, 25 Oct 2009 21:05:00 +0000 - -pywinery (0.1-3) testing; urgency=low - - * Bugfix. Error messages added, - - -- spayder26 Mon, 12 Oct 2009 20:33:00 +0000 - -pywinery (0.1-2) testing; urgency=low - - * Fixing some wine deprecation issues, and abnormal behaviour. - - -- spayder26 Mon, 12 Oct 2009 18:31:00 +0000 - -pywinery (0.1-1) unstable; urgency=low - - * Initial release - - -- spayder26 Mon, 16 Mar 2009 18:31:27 +0000 - diff --git a/branches/0.1/debian/control b/branches/0.1/debian/control deleted file mode 100755 index 9c1e4c1..0000000 --- a/branches/0.1/debian/control +++ /dev/null @@ -1,15 +0,0 @@ -Source: pywinery -Section: utils -Priority: optional -Maintainer: Spayder26 -Build-Depends: debhelper (>= 5.0.38) -Build-Depends-Indep: cdbs (>= 0.4.43), python-dev (>= 2.4), python (>= 2.4) -Standards-Version: 3.7.2 -XS-Python-Version: all - -Package: pywinery -Architecture: all -Depends: ${python:Depends}, python-glade2 (>=2.6), python-gtk2 (>=2.6), wine (>=0.9.50) | wine1.2 -Suggests: wine-doors -XB-Python-Version: ${python:Versions} -Description: Simple Wine multiple prefix manager, working as launcher or standalone application. diff --git a/branches/0.1/debian/copyright b/branches/0.1/debian/copyright deleted file mode 100644 index 94ce798..0000000 --- a/branches/0.1/debian/copyright +++ /dev/null @@ -1,24 +0,0 @@ -This package was debianized by orpheus on -Mon, 16 Mar 2009 18:31:27 +0000. - -It was downloaded from - -Upstream Author(s): - - - - -Copyright: - - - - -License: - - - -The Debian packaging is (C) 2009, orpheus and -is licensed under the GPL, see `/usr/share/common-licenses/GPL'. - -# Please also look if there are files or directories which have a -# different copyright/license attached and list them here. diff --git a/branches/0.1/debian/files b/branches/0.1/debian/files deleted file mode 100644 index edc84e6..0000000 --- a/branches/0.1/debian/files +++ /dev/null @@ -1 +0,0 @@ -pywinery_0.1-5_all.deb utils optional diff --git a/branches/0.1/debian/pycompat b/branches/0.1/debian/pycompat deleted file mode 100644 index 0cfbf08..0000000 --- a/branches/0.1/debian/pycompat +++ /dev/null @@ -1 +0,0 @@ -2 diff --git a/branches/0.1/debian/pywinery.debhelper.log b/branches/0.1/debian/pywinery.debhelper.log deleted file mode 100644 index bd3417d..0000000 --- a/branches/0.1/debian/pywinery.debhelper.log +++ /dev/null @@ -1,33 +0,0 @@ -dh_installdirs -dh_installdirs -dh_installdocs -dh_installexamples -dh_installman -dh_installinfo -dh_installmenu -dh_installcron -dh_installinit -dh_installdebconf -dh_installemacsen -dh_installcatalogs -dh_installpam -dh_installlogrotate -dh_installlogcheck -dh_installchangelogs -dh_installudev -dh_lintian -dh_install -dh_link -dh_installmime -dh_pycentral -dh_strip -dh_compress -dh_fixperms -dh_makeshlibs -dh_installdeb -dh_perl -dh_shlibdeps -dh_gencontrol -dh_link -dh_md5sums -dh_builddeb diff --git a/branches/0.1/debian/pywinery.postinst.debhelper b/branches/0.1/debian/pywinery.postinst.debhelper deleted file mode 100644 index 46fb409..0000000 --- a/branches/0.1/debian/pywinery.postinst.debhelper +++ /dev/null @@ -1,9 +0,0 @@ -# Automatically added by dh_pycentral -rm -f /var/lib/pycentral/pywinery.pkgremove -if which pycentral >/dev/null 2>&1; then - pycentral pkginstall pywinery - if grep -qs '^pywinery$' /var/lib/pycentral/delayed-pkgs; then - sed -i '/^pywinery$/d' /var/lib/pycentral/delayed-pkgs - fi -fi -# End automatically added section diff --git a/branches/0.1/debian/pywinery.preinst.debhelper b/branches/0.1/debian/pywinery.preinst.debhelper deleted file mode 100644 index bb6c814..0000000 --- a/branches/0.1/debian/pywinery.preinst.debhelper +++ /dev/null @@ -1,8 +0,0 @@ -# Automatically added by dh_pycentral -case "$1" in - install|upgrade) - mkdir -p /var/lib/pycentral - echo '# the presence of this file allows calling pkgremove on upgrade' \ - > /var/lib/pycentral/pywinery.pkgremove -esac -# End automatically added section diff --git a/branches/0.1/debian/pywinery.prerm.debhelper b/branches/0.1/debian/pywinery.prerm.debhelper deleted file mode 100644 index 848eeaf..0000000 --- a/branches/0.1/debian/pywinery.prerm.debhelper +++ /dev/null @@ -1,45 +0,0 @@ -# Automatically added by dh_pycentral -case "$1" in remove|upgrade) - pkgremove=y -esac -if [ -f /var/lib/pycentral/pywinery.pkgremove ] || [ -f /var/lib/pycentral/pkgremove ]; then - pkgremove=y -fi -if [ "$pkgremove" = y ]; then -if which python >/dev/null 2>&1 && which pycentral >/dev/null 2>&1; then - pycentral pkgremove pywinery -else - flist=$(tempfile) - slist=$(tempfile) - dpkg -L pywinery | tee $flist | \ - while read n; do - case "$n" in - /usr/share/pyshared/*) - n2=${n#/usr/share/pyshared/*} - case "$n" in - *.py) echo "p $n";; - *) [ -d "$n" ] && echo "d $n2" || echo "f $n2" - esac - ;; - *) continue - esac - done > $slist - if [ -s $slist ]; then - for d in /usr/lib/python[0-9].[0-9]/????-packages; do - case "$d" in */python2.1/*|*/python2.2/*) continue; esac - while read t n; do - case "$t" in - p) rm -f $d/$n $d/${n}[co];; - d) rmdir $d/$n 2>/dev/null || true;; - *) rm -f $d/$n - esac - done < $slist - done - fi - awk '/\/usr\/share\/pyshared/ {next} /\.py$/ {print $0"c\n" $0"o"}' $flist \ - | xargs -r rm -f >&2 - rm -f $flist $slist -fi -rm -f /var/lib/pycentral/pywinery.pkgremove -fi -# End automatically added section diff --git a/branches/0.1/debian/pywinery.substvars b/branches/0.1/debian/pywinery.substvars deleted file mode 100644 index 4b30422..0000000 --- a/branches/0.1/debian/pywinery.substvars +++ /dev/null @@ -1,3 +0,0 @@ -python:Versions=all -python:Depends=python, python-central (>= 0.6.11) -misc:Depends= diff --git a/branches/0.1/debian/rules b/branches/0.1/debian/rules deleted file mode 100755 index fbb7664..0000000 --- a/branches/0.1/debian/rules +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/make -f - -DEB_PYTHON_SYSTEM=pycentral -DBK2MAN_XSL=/usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl - -include /usr/share/cdbs/1/rules/debhelper.mk -include /usr/share/cdbs/1/class/python-distutils.mk - -install/pywinery:: - mv $(CURDIR)/debian/pywinery/usr/bin/pywinery.py $(CURDIR)/debian/pywinery/usr/bin/pywinery - diff --git a/branches/0.1/gui.glade b/branches/0.1/gui.glade deleted file mode 100644 index b5d9158..0000000 --- a/branches/0.1/gui.glade +++ /dev/null @@ -1,808 +0,0 @@ - - - - - - True - True - Pywinery - wine prefix tool - False - center - pywinery.svg - dialog - True - - - - True - 10 - 10 - 10 - 10 - - - True - 10 - - - True - 4 - - - True - 0.5 - none - 0 - - - True - 0 - 0 - pywinery - 6 - - - - - False - 0 - - - - - True - 5 - 2 - - - True - - - True - - - - 0 - - - - - True - - - True - True - True - - - - True - gtk-add - 1 - - - - - 0 - - - - - True - True - True - - - - True - gtk-delete - 1 - - - - - 1 - - - - - False - 1 - - - - - False - 0 - - - - - True - True - - - - True - True - False - - - True - 0 - 0 - 0 - 0 - - - True - True - - - True - True - none - - - - True - - - True - wine-doors - 5 - - - 0 - - - - - True - Wine-doors - center - - - 1 - - - - - - - False - 0 - - - - - True - True - True - none - - - - True - - - True - wine-winecfg - 5 - - - 0 - - - - - True - Winecfg - center - - - 1 - - - - - - - False - 1 - - - - - True - True - True - none - - - - True - - - True - 0 - none - - - True - - - True - terminal - 5 - - - - - True - wine - 5 - - - -9 - - - - - - - 0 - - - - - True - Console - center - - - 1 - - - - - - - 2 - - - - - True - True - True - none - - - - True - - - True - wine-uninstaller - 5 - - - 0 - - - - - True - Uninstaller - center - - - 1 - - - - - - - False - 3 - - - - - True - True - True - none - - - - True - - - True - wine-winefile - 5 - - - 0 - - - - - True - File browser - center - True - - - 1 - - - - - - - False - 4 - - - - - True - True - True - none - - - - True - - - True - 0 - none - - - True - - - True - wine - 5 - - - -9 - - - - - True - gtk-add - 5 - - - - - - - 0 - - - - - True - Initialize prefix - center - - - 1 - - - - - - - False - 5 - - - - - True - True - True - none - - - - True - - - True - 0 - none - - - True - - - True - gtk-directory - 5 - - - - - True - wine - 5 - - - -9 - - - - - - - 0 - - - - - True - Directory - center - - - 1 - - - - - - - False - 6 - - - - - - - - - - tab - - - - - - - True - Tools on prefix - - - label_item - - - - - False - 1 - - - - - True - vertical - 1 - - - True - 0 - Creating wine prefix on - - - False - 0 - - - - - True - 15 - - - True - 0 - / - True - start - 100 - - - - - 1 - - - - - True - True - - - False - 2 - - - - - True - end - - - gtk-stop - True - True - True - True - - - - False - False - 0 - - - - - 3 - - - - - False - 2 - - - - - True - 5 - - - True - 5 - - - True - gtk-dialog-error - - - False - 0 - - - - - True - 0 - Error - - - 1 - - - - - - - 3 - - - - - 1 - - - - - 0 - - - - - True - 5 - True - end - - - gtk-cancel - True - True - True - True - - - - False - False - 0 - - - - - gtk-execute - True - True - True - True - - - - - False - False - 1 - - - - - True - True - True - - - - - True - 0 - none - - - True - 2 - - - True - gtk-add - - - False - 0 - - - - - True - 0 - Install - True - True - - - False - 1 - - - - - - - - - False - False - 2 - - - - - False - end - 1 - - - - - - - - - 5 - Question - False - gtk-dialog-question - dialog - False - - - - True - vertical - 2 - - - True - 5 - - - True - 0 - gtk-dialog-question - 6 - - - False - 0 - - - - - True - 0 - 0 - The given file is located into an unknown prefix. -Should Pywinery remember it? - - - False - 1 - - - - - False - 1 - - - - - True - end - - - gtk-yes - 1 - True - True - True - True - - - False - False - 0 - - - - - gtk-no - True - True - True - True - - - False - False - 1 - - - - - False - end - 0 - - - - - - diff --git a/branches/0.1/python-build-stamp-2.6 b/branches/0.1/python-build-stamp-2.6 deleted file mode 100644 index e69de29..0000000 diff --git a/branches/0.1/pywinery.desktop b/branches/0.1/pywinery.desktop deleted file mode 100644 index ff47cc9..0000000 --- a/branches/0.1/pywinery.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Categories=Wine;Applications;GTK;System;Emulator -Comment=Wine prefix manager and launcher -Encoding=UTF-8 -Exec=pywinery -Icon=pywinery.svg -Name=PyWinery -GenericName=Wine prefix manager -Terminal=false -Type=Application -MimeType=application/x-ms-dos-executable;application/x-msi;application/x-win-lnk;application/x-dosexec diff --git a/branches/0.1/pywinery.py b/branches/0.1/pywinery.py deleted file mode 100755 index f7cc21f..0000000 --- a/branches/0.1/pywinery.py +++ /dev/null @@ -1,432 +0,0 @@ -#!/usr/bin/env python2.5 -# -*- coding: utf-8 -*- -from sys import exit as sys_exit, argv as sys_argv -try: - import pygtk - pygtk.require("2.0") -except: - pass -try: - import gtk - import pango - import gtk.glade - import gobject -except: - sys_exit(1) - -from os.path import realpath, split as path_split, join as path_join, isfile, isdir, expandvars, dirname -from os import environ, listdir, sep, linesep, kill as os_kill -from commands import getoutput -from subprocess import Popen -from distutils.dir_util import mkpath -from mimetypes import guess_type -from threading import Thread -from time import sleep -from exceptions import ValueError - -def getBin(name): - return getoutput("which %s" % name).strip() - -def checkBin(name): - return bool(getBin(name)) - -def killPopen(p, signal=15): - if hasattr(p, "send_signal"): - p.send_signal(signal) - else: - # For python < 2.6 - os_kill(p.pid, signal) - -def getWineVersion(): - a = getoutput("wine --version") - v = a.strip().split("-")[1].split(".") - tr = [0]*len(v) - for i in xrange(len(tr)): - tr[i] = int(v[i]) - - return tuple(tr) - -class LoopHalt(Exception): - def __str__(self): - return "Loop halted" - -class ErrorManager(object): - def __init__(self): - self.__d = {} - self.__l = [] - - def add(self, id, message): - self.__d[id] = message - self.__l.append(id) - - def remove(self, id): - while id in self.__l: - self.__l.remove(id) - - def last(self): - if self.isEmpty(): - return None - return self.__d[self.__l[-1]] - - def isEmpty(self): - return len(self.__l)==0 - -def returnFalse(): - return False - - -class Main(object): - def __init__(self, args=None): - if args==None: - args = [__file__] - guifile = "/usr/share/pywinery/gui.glade" - localgui = path_join(dirname(args[0]),"gui.glade") - if isfile(localgui): - guifile = localgui - - self.killable_threads = [] - self.xml = gtk.glade.XML(guifile) - self.configfile = expandvars("$HOME/.config/pywinery/prefixes.config") - self.configlines = [] - self.readConfigFile() - - self.msi = None - self.wineversion = [0] - self.autocreateprefix = False - self.errors = ErrorManager() - - self.winebin = getBin("wine") - - if not bool(self.winebin): - self.showError("nowine","Wine is not detected on your system") - self.xml.get_widget("expander1").set_property("visible", False) - self.xml.get_widget("button1").set_property("visible", False) - self.xml.get_widget("button8").set_property("visible", False) - - else: - self.wineversion = getWineVersion() - self.autocreateprefix = self.wineversion > (1,) - self.xml.get_widget("button13").set_property("visible",checkBin("wine-doors")) - - - self.silent = False - self.nodebug = False - c=1 - for i in args[1:]: - if i[0]!="-": - break # Given commands can contains - and -- too - elif i in ("-x","--nogui"): - self.silent = True - elif i in ("-s","--silent"): - self.nodebug = True - c += 1 - - self.zig = args[c:] - self.favprefix = None - self.path = None - - if self.zig: - path = realpath(self.zig[0]) - self.path = dirname(path) - sp = self.path.split(sep) - for i in ("drive_c","c:"): - if i in sp: - self.favprefix = sep.join(sp[:sp.index(i)]) - if not self.favprefix in self.configlines: - self.unknowndir() - break - - if isfile(self.zig[0]) and guess_type(realpath(self.zig[0]))[0].lower()=="application/x-msi": - self.msi = realpath(args[1]) - self.xml.get_widget("hbuttonbox1").set_property("visible", True) - self.xml.get_widget("hbox2").set_property("visible", False) - - - self.xml.get_widget("button1").set_property("visible", not bool(self.msi)) - self.xml.get_widget("button8").set_property("visible", bool(self.msi)) - else: - self.xml.get_widget("expander1").set_expanded(True) - self.xml.get_widget("hbuttonbox1").set_property("visible", False) - self.xml.get_widget("hbox2").set_property("visible", True) - - for i in (11,1,3,4,5,6,7): - self.xml.get_widget("label%d" % i ).set_property("visible",False) - - - self.xml.get_widget("vbox10").set_property("visible",False) - - self.comboInit() - dic = {"on_window1_destroy" : self.__quit, - "on_button12_clicked" : self.__quit, - "on_combobox1_changed" : self.combochange, - "on_button1_clicked" : None, - "on_button6_clicked" : self.adddir, - "on_button7_clicked" : self.removeprefix, - "on_button1_clicked" : self.runAndExit, - "on_button8_clicked" : lambda x: (self.execute([self.winebin,"msiexec","/i",self.msi]), self.__quit()), - "on_button2_clicked" : lambda x: self.execute("winecfg"), - "on_button4_clicked" : lambda x: self.execute("winefile"), - "on_button5_clicked" : lambda x: self.execute([self.winebin,"uninstaller"]), - "on_button3_clicked" : lambda x: self.execute(["xdg-open",self.getComboValue()]), - "on_button10_clicked" : self.createPrefix, - "on_button11_clicked" : lambda x: self.execute(["xterm","-e","wine","cmd"]), - "on_button13_clicked" : lambda x: self.execute("wine-doors"), - "on_dialog1_delete_event" : returnFalse, - } - self.xml.signal_autoconnect(dic) - self.env = environ.copy() - if self.nodebug: - self.env["WINEDEBUG"] = "-all" - - def readConfigFile(self): - if isfile(self.configfile): - f = open(self.configfile,"r") - self.configlines = [i.strip() for i in f.readlines()] - f.close() - self.configlines.sort() - else: - self.writeConfigFile() - - def writeConfigFile(self): - mkpath(path_split(self.configfile)[0]) - f = open(self.configfile,"w") - f.writelines([ i+linesep for i in self.configlines ]) - f.close() - - def showError(self, id=None, message=None): - if id==None: - message = self.errors.last() - else: - self.errors.add( id, message ) - - if message: - self.xml.get_widget("labelerror").set_label(message) - self.xml.get_widget("errorbox").set_property("visible",True) - else: - self.xml.get_widget("errorbox").set_property("visible",False) - - def hideError(self,id=None): - if id != None: - self.errors.remove(id) - self.showError() - - def no_delete(self, w): - w.hide() - return True - - def runAndExit(self, *args): - self.execute( [self.winebin] + self.zig ) - self.__quit() - - def run(self): - try: - if self.silent: - if self.zig: - if self.favprefix: - self.env["WINEPREFIX"] = self.favprefix - self.runAndExit() - else: - print "Pywinery is unable to find a suitable prefix." - else: - print "Nothing to do" - sys_exit(1) - else: - gtk.gdk.threads_init() - self.xml.get_widget("window1").show() - self.combochange() - gtk.main() - except KeyboardInterrupt: - sys_exit(1) - sys_exit(0) - - def comboInit(self,auto=True): - combo = self.xml.get_widget("combobox1") - new = True - modelp = combo.get_model() - if modelp != None: - modelp.clear() - combo.set_model(None) - new = False - model = gtk.ListStore(gobject.TYPE_STRING) - combo.set_model(model) - - if new: - render = gtk.CellRendererText() - combo.pack_start(render) - combo.add_attribute(render, 'text', 0) - - for i in self.configlines: - model.append([i]) - - if self.favprefix and auto: - for i in model: - if i[0]==self.favprefix: - combo.set_active_iter(i.iter) - break - - def adddir(self,*args): - dialog = gtk.FileChooserDialog( - "Select a directory", - self.xml.get_widget("window1"), - gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER, - (gtk.STOCK_CANCEL,gtk.RESPONSE_CANCEL,gtk.STOCK_ADD,gtk.RESPONSE_OK)) - - response = dialog.run() - if response == gtk.RESPONSE_OK: - self.addfilenames(dialog.get_filenames()) - dialog.destroy() - - def unknowndir(self,*args): - dialog = self.xml.get_widget("dialog1") - response = dialog.run() - if response == 1: - self.addfilenames([self.favprefix]) - dialog.hide() - - def addfilenames(self,list): - if list: - a = len(self.configlines) - self.configlines += list - self.writeConfigFile() - self.comboInit(auto=False) - combo = self.xml.get_widget("combobox1") - combo.set_active_iter(combo.get_model()[a].iter) - - def removeprefix(self,*args): - combo = self.xml.get_widget("combobox1") - model = combo.get_model() - dialog = gtk.MessageDialog( - self.xml.get_widget("window1"), - gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, - gtk.MESSAGE_QUESTION, - gtk.BUTTONS_YES_NO, - ("¿Do you really want to remove %s dir from prefixes list?" % model[combo.get_active()][0]) - ) - dialog.set_property("use-markup",True) - - response = dialog.run() - dialog.destroy() - if response==gtk.RESPONSE_YES: - model.remove(model.get_iter(combo.get_active())) - self.configlines = [i[0] for i in model] - self.writeConfigFile() - - def getComboValue(self): - combo = self.xml.get_widget("combobox1") - model = combo.get_model() - return model[combo.get_active()][0] - - def checkIsPrefix(self, path): - ls = listdir(path) - for i in ("drive_c","dosdevices","user.reg","system.reg","userdef.reg"): - if i not in ls: - return False - return True - - def combochange(self,*args): - eid = "dirnotfound" - self.hideError(eid) - - a = bool(self.xml.get_widget("combobox1").get_active() > -1) - self.xml.get_widget("button1").set_property("sensitive", False) - self.xml.get_widget("button8").set_property("sensitive", False) - self.xml.get_widget("button7").set_property("sensitive", False) - self.xml.get_widget("hbox1").set_property("sensitive", False) - if a: - self.xml.get_widget("button7").set_property("sensitive", True) - path = self.getComboValue() - if isdir(path): - if bool(self.winebin): - self.xml.get_widget("hbox1").set_property("sensitive", True) - - t = self.checkIsPrefix(path) - b = self.autocreateprefix or t - - self.xml.get_widget("button1").set_property("sensitive", b) - self.xml.get_widget("button8").set_property("sensitive", b) - self.xml.get_widget("button2").set_property("sensitive", b) - self.xml.get_widget("button4").set_property("sensitive", b) - self.xml.get_widget("button5").set_property("sensitive", b) - self.xml.get_widget("button10").set_property("sensitive", not t) - self.xml.get_widget("button11").set_property("sensitive", b) - self.xml.get_widget("button13").set_property("sensitive", b) - self.env["WINEPREFIX"] = path - - else: - self.showError(eid,"Directory not found.") - - - def __quit(self,*args): - for i in self.killable_threads: - killPopen(i) - if gtk.main_level()>0: - gtk.main_quit() - - - def createPrefix(self, path): - if self.autocreateprefix: - p = self.execute(["wineboot","-i"]) - else: - p = self.execute("wineprefixcreate") - - pid = len(self.killable_threads) - self.killable_threads.append( p ) - - path = self.env["WINEPREFIX"] - - tohide = ( "expander1", "hbox3" ) - states = [ self.xml.get_widget(i).get_property("visible") for i in tohide ] - - def wait(): - while True: - poll = p.poll() - if (poll == 0 and self.checkIsPrefix(path)) or poll != None: - break - sleep(0.25) - gtk.gdk.threads_enter() - self.xml.get_widget("progressbar1").pulse() - gtk.gdk.threads_leave() - - gtk.gdk.threads_enter() - self.xml.get_widget("progressbar1").set_fraction(1) - gtk.gdk.threads_leave() - sleep(0.5) - gtk.gdk.threads_enter() - for i in range(len(tohide)): - self.xml.get_widget( tohide[i] ).set_property( "visible", states[i] ) - self.xml.get_widget("vbox10").set_property("visible",False) - self.killable_threads.pop(pid) - self.combochange() - self.xml.get_widget("button10").set_property("sensitive",False) - gtk.gdk.threads_leave() - - def terminate(*args): - killPopen(p) - - for i in tohide: - self.xml.get_widget(i).set_property("visible", False) - - self.xml.signal_autoconnect({"on_button9_clicked":terminate}) - self.xml.get_widget("progressbar1").set_fraction(0) - self.xml.get_widget("label14").set_label("%s" % path) - self.xml.get_widget("vbox10").set_property("visible",True) - - Thread(target=wait).start() - - def execute(self,command): - return Popen(command, env=self.env) - -if len(sys_argv)>1 and sys_argv[1] in ("--help","-h"): - print '''pywinery - an easy graphical tool for wineprefixing - Usage: - pywinery [OPTIONS...] FILE [ARGs...] Call an exe with wine. - - Options: - -x, --nogui Run with autodetected prefix. - -s, --silent Hide winedebug messages. - -h, --help Show this help. - ''' -else: - if __name__ == "__main__": - app = Main(sys_argv) - app.run() diff --git a/branches/0.1/pywinery.svg b/branches/0.1/pywinery.svg deleted file mode 100755 index b86d1d9..0000000 --- a/branches/0.1/pywinery.svg +++ /dev/null @@ -1,1558 +0,0 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/0.1/setup.py b/branches/0.1/setup.py deleted file mode 100755 index ad680f5..0000000 --- a/branches/0.1/setup.py +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env python - -from distutils.core import setup - -setup(name = 'pywinery', - version = '0.1.2', - description = 'Wine prefix manager and launcher', - author = 'Spayder26', - author_email = '', - url = '', - license = 'GPLv3', - data_files = [ - ('/usr/share/pywinery',['gui.glade','pywinery.svg']), - ('/usr/share/pixmaps',['pywinery.svg']), - ('/usr/share/applications',["pywinery.desktop"]) - ], - scripts = ['pywinery.py'] - ) diff --git a/branches/0.2/debian/README.Debian b/branches/0.2/debian/README.Debian deleted file mode 100644 index 9aab1d1..0000000 --- a/branches/0.2/debian/README.Debian +++ /dev/null @@ -1,6 +0,0 @@ -pywinery for Debian -------------------- - - - - -- orpheus Mon, 16 Mar 2009 18:31:27 +0000 diff --git a/branches/0.2/debian/changelog b/branches/0.2/debian/changelog deleted file mode 100644 index a8c12d3..0000000 --- a/branches/0.2/debian/changelog +++ /dev/null @@ -1,99 +0,0 @@ -pywinery (0.2-1) testing; urgency=high - - * Fixed issue#10. - - -- Felipe A. Hernandez Wed, 7 Sep 2010 17:04:00 +0000 - -pywinery (0.2-0) testing; urgency=low - - * GUI simplification: Prefix list operations via context menu. - * Disable winemenubuilder option. - * Custom wine binary per prefix. - * Open prefix directory and launch known executable via double-clicking. - * Dropped wine dependency. - * Wine BottleSpec compliant. - * Huge code refactor for maintainability. - * Improved icon. - - -- Felipe A. Hernandez Wed, 7 Sep 2010 17:04:00 +0000 - -pywinery (0.1-12) testing; urgency=medium - - * Enhanced tool's dialog and bugfixing: - * Now winecmd runs on x-terminal-emulator. - * Improved command-line help. - * Added -v --version command line option. - * Added GPL and authority to code. - * Removed the big PyWinery icon from the dialog. - - -- Felipe A. Hernandez Thu, 15 Apr 2011 11:42:00 +0000 - -pywinery (0.1-11) testing; urgency=low - - * Added winetricks button, and fixed captions and sizes on options. - - -- Felipe A. Hernandez Thu, 30 Dec 2010 18:55:00 +0000 - -pywinery (0.1-10) testing; urgency=high - - * Bugfix - - -- Felipe A. Hernandez Fri, 22 Nov 2010 12:20:00 +0000 - -pywinery (0.1-9) testing; urgency=high - - * Bugfix - - -- Felipe A. Hernandez Fri, 15 Nov 2010 15:05:00 +0000 - -pywinery (0.1-8) testing; urgency=high - - * Bugfix - - -- Felipe A. Hernandez Fri, 12 Nov 2010 18:10:00 +0000 - -pywinery (0.1-7) testing; urgency=medium - - * Added "Remember prefix for this app" option. - * Now is a lot easier to manage prefixes and known apps. - * Clearer interface. - - -- Felipe A. Hernandez Sun, 10 Oct 2010 15:20:00 +0000 - -pywinery (0.1-6) testing; urgency=high - - * Fixed error with wine's version numbers containing chars - - -- Felipe A. Hernandez Sat, 22 May 2010 23:59:00 +0000 - -pywinery (0.1-5) testing; urgency=high - - * Fixed wine dependency (wine1.2's branch) - - -- Felipe A. Hernandez Sat, 20 Feb 2010 20:45:00 +0000 - -pywinery (0.1-4) testing; urgency=medium - - * Bugfix. (Closes: #1) - * Some random tweaking. - - -- Felipe A. Hernandez Sun, 25 Oct 2009 21:05:00 +0000 - -pywinery (0.1-3) testing; urgency=low - - * Bugfix. Error messages added, - - -- Felipe A. Hernandez Mon, 12 Oct 2009 20:33:00 +0000 - -pywinery (0.1-2) testing; urgency=low - - * Fixing some wine deprecation issues, and abnormal behaviour. - - -- Felipe A. Hernandez Mon, 12 Oct 2009 18:31:00 +0000 - -pywinery (0.1-1) unstable; urgency=low - - * Initial release - - -- Felipe A. Hernandez Mon, 16 Mar 2009 18:31:27 +0000 - diff --git a/branches/0.2/debian/compat b/branches/0.2/debian/compat deleted file mode 100644 index 7f8f011..0000000 --- a/branches/0.2/debian/compat +++ /dev/null @@ -1 +0,0 @@ -7 diff --git a/branches/0.2/debian/control b/branches/0.2/debian/control deleted file mode 100755 index 9b8be47..0000000 --- a/branches/0.2/debian/control +++ /dev/null @@ -1,28 +0,0 @@ -Source: pywinery -Maintainer: Felipe A. Hernandez -Build-Depends: debhelper (>= 5.0.38) -Build-Depends-Indep: cdbs (>= 0.4.43), python-dev (>= 2.4), python (>= 2.4) -Standards-Version: 3.7.2 -XS-Python-Version: all -Original-Maintainer: Felipe A. Hernandez - -Package: pywinery -Maintainer: Felipe A. Hernandez -Homepage: http://code.google.com/p/pywinery -Section: utils -Priority: optional -Installed-Size: 216 -Architecture: all -Depends: ${python:Depends}, python-glade2 (>=2.4), python-gtk2 (>=2.4), xdg-utils -Recommends: wine, winetricks -XB-Python-Version: ${python:Versions} -Description: Simple wineprefix manager and launcher - Pywinery is a simple and easy-to-use wine prefix management tool. - It can be used to run exe files working as wine launcher. - It's written in Python and uses the Gtk toolkit. - . - Features: - * Simple dialog interface. - * Shortcuts to winecfg, wine cmd, winetricks and more. - * Easy prefix creation and management, BottleSpec compliant. -Original-Maintainer: Felipe A. Hernandez diff --git a/branches/0.2/debian/cron.d.ex b/branches/0.2/debian/cron.d.ex deleted file mode 100644 index ba9f760..0000000 --- a/branches/0.2/debian/cron.d.ex +++ /dev/null @@ -1,4 +0,0 @@ -# -# Regular cron jobs for the pywinery package -# -0 4 * * * root [ -x /usr/bin/pywinery_maintenance ] && /usr/bin/pywinery_maintenance diff --git a/branches/0.2/debian/dirs b/branches/0.2/debian/dirs deleted file mode 100644 index ca882bb..0000000 --- a/branches/0.2/debian/dirs +++ /dev/null @@ -1,2 +0,0 @@ -usr/bin -usr/sbin diff --git a/branches/0.2/debian/docs b/branches/0.2/debian/docs deleted file mode 100644 index e69de29..0000000 diff --git a/branches/0.2/debian/emacsen-install.ex b/branches/0.2/debian/emacsen-install.ex deleted file mode 100644 index 65e5230..0000000 --- a/branches/0.2/debian/emacsen-install.ex +++ /dev/null @@ -1,45 +0,0 @@ -#! /bin/sh -e -# /usr/lib/emacsen-common/packages/install/pywinery - -# Written by Jim Van Zandt , borrowing heavily -# from the install scripts for gettext by Santiago Vila -# and octave by Dirk Eddelbuettel . - -FLAVOR=$1 -PACKAGE=pywinery - -if [ ${FLAVOR} = emacs ]; then exit 0; fi - -echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR} - -#FLAVORTEST=`echo $FLAVOR | cut -c-6` -#if [ ${FLAVORTEST} = xemacs ] ; then -# SITEFLAG="-no-site-file" -#else -# SITEFLAG="--no-site-file" -#fi -FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile" - -ELDIR=/usr/share/emacs/site-lisp/${PACKAGE} -ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE} - -# Install-info-altdir does not actually exist. -# Maybe somebody will write it. -if test -x /usr/sbin/install-info-altdir; then - echo install/${PACKAGE}: install Info links for ${FLAVOR} - install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/share/info/${PACKAGE}.info.gz -fi - -install -m 755 -d ${ELCDIR} -cd ${ELDIR} -FILES=`echo *.el` -cp ${FILES} ${ELCDIR} -cd ${ELCDIR} - -cat << EOF > path.el -(setq load-path (cons "." load-path) byte-compile-warnings nil) -EOF -${FLAVOR} ${FLAGS} ${FILES} -rm -f *.el path.el - -exit 0 diff --git a/branches/0.2/debian/emacsen-remove.ex b/branches/0.2/debian/emacsen-remove.ex deleted file mode 100644 index 08c6bac..0000000 --- a/branches/0.2/debian/emacsen-remove.ex +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -e -# /usr/lib/emacsen-common/packages/remove/pywinery - -FLAVOR=$1 -PACKAGE=pywinery - -if [ ${FLAVOR} != emacs ]; then - if test -x /usr/sbin/install-info-altdir; then - echo remove/${PACKAGE}: removing Info links for ${FLAVOR} - install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/share/info/pywinery.info.gz - fi - - echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR} - rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE} -fi diff --git a/branches/0.2/debian/emacsen-startup.ex b/branches/0.2/debian/emacsen-startup.ex deleted file mode 100644 index d9503eb..0000000 --- a/branches/0.2/debian/emacsen-startup.ex +++ /dev/null @@ -1,25 +0,0 @@ -;; -*-emacs-lisp-*- -;; -;; Emacs startup file, e.g. /etc/emacs/site-start.d/50pywinery.el -;; for the Debian pywinery package -;; -;; Originally contributed by Nils Naumann -;; Modified by Dirk Eddelbuettel -;; Adapted for dh-make by Jim Van Zandt - -;; The pywinery package follows the Debian/GNU Linux 'emacsen' policy and -;; byte-compiles its elisp files for each 'emacs flavor' (emacs19, -;; xemacs19, emacs20, xemacs20...). The compiled code is then -;; installed in a subdirectory of the respective site-lisp directory. -;; We have to add this to the load-path: -(let ((package-dir (concat "/usr/share/" - (symbol-name flavor) - "/site-lisp/pywinery"))) -;; If package-dir does not exist, the pywinery package must have -;; removed but not purged, and we should skip the setup. - (when (file-directory-p package-dir) - (setq load-path (cons package-dir load-path)) - (autoload 'pywinery-mode "pywinery-mode" - "Major mode for editing pywinery files." t) - (add-to-list 'auto-mode-alist '("\\.pywinery$" . pywinery-mode)))) - diff --git a/branches/0.2/debian/files b/branches/0.2/debian/files deleted file mode 100644 index 7795690..0000000 --- a/branches/0.2/debian/files +++ /dev/null @@ -1 +0,0 @@ -pywinery_0.2-1_all.deb utils optional diff --git a/branches/0.2/debian/init.d.ex b/branches/0.2/debian/init.d.ex deleted file mode 100644 index 16790de..0000000 --- a/branches/0.2/debian/init.d.ex +++ /dev/null @@ -1,157 +0,0 @@ -#! /bin/sh -# -# skeleton example file to build /etc/init.d/ scripts. -# This file should be used to construct scripts for /etc/init.d. -# -# Written by Miquel van Smoorenburg . -# Modified for Debian -# by Ian Murdock . -# Further changes by Javier Fernandez-Sanguino -# -# Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl -# - -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -DAEMON=/usr/sbin/pywinery -NAME=pywinery -DESC=pywinery - -test -x $DAEMON || exit 0 - -LOGDIR=/var/log/pywinery -PIDFILE=/var/run/$NAME.pid -DODTIME=1 # Time to wait for the server to die, in seconds - # If this value is set too low you might not - # let some servers to die gracefully and - # 'restart' will not work - -# Include pywinery defaults if available -if [ -f /etc/default/pywinery ] ; then - . /etc/default/pywinery -fi - -set -e - -running_pid() -{ - # Check if a given process pid's cmdline matches a given name - pid=$1 - name=$2 - [ -z "$pid" ] && return 1 - [ ! -d /proc/$pid ] && return 1 - cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1` - # Is this the expected child? - [ "$cmd" != "$name" ] && return 1 - return 0 -} - -running() -{ -# Check if the process is running looking at /proc -# (works for all users) - - # No pidfile, probably no daemon present - [ ! -f "$PIDFILE" ] && return 1 - # Obtain the pid and check it against the binary name - pid=`cat $PIDFILE` - running_pid $pid $DAEMON || return 1 - return 0 -} - -force_stop() { -# Forcefully kill the process - [ ! -f "$PIDFILE" ] && return - if running ; then - kill -15 $pid - # Is it really dead? - [ -n "$DODTIME" ] && sleep "$DODTIME"s - if running ; then - kill -9 $pid - [ -n "$DODTIME" ] && sleep "$DODTIME"s - if running ; then - echo "Cannot kill $LABEL (pid=$pid)!" - exit 1 - fi - fi - fi - rm -f $PIDFILE - return 0 -} - -case "$1" in - start) - echo -n "Starting $DESC: " - start-stop-daemon --start --quiet --pidfile $PIDFILE \ - --exec $DAEMON -- $DAEMON_OPTS - if running ; then - echo "$NAME." - else - echo " ERROR." - fi - ;; - stop) - echo -n "Stopping $DESC: " - start-stop-daemon --stop --quiet --pidfile $PIDFILE \ - --exec $DAEMON - echo "$NAME." - ;; - force-stop) - echo -n "Forcefully stopping $DESC: " - force_stop - if ! running ; then - echo "$NAME." - else - echo " ERROR." - fi - ;; - #reload) - # - # If the daemon can reload its config files on the fly - # for example by sending it SIGHUP, do it here. - # - # If the daemon responds to changes in its config file - # directly anyway, make this a do-nothing entry. - # - # echo "Reloading $DESC configuration files." - # start-stop-daemon --stop --signal 1 --quiet --pidfile \ - # /var/run/$NAME.pid --exec $DAEMON - #;; - force-reload) - # - # If the "reload" option is implemented, move the "force-reload" - # option to the "reload" entry above. If not, "force-reload" is - # just the same as "restart" except that it does nothing if the - # daemon isn't already running. - # check wether $DAEMON is running. If so, restart - start-stop-daemon --stop --test --quiet --pidfile \ - /var/run/$NAME.pid --exec $DAEMON \ - && $0 restart \ - || exit 0 - ;; - restart) - echo -n "Restarting $DESC: " - start-stop-daemon --stop --quiet --pidfile \ - /var/run/$NAME.pid --exec $DAEMON - [ -n "$DODTIME" ] && sleep $DODTIME - start-stop-daemon --start --quiet --pidfile \ - /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS - echo "$NAME." - ;; - status) - echo -n "$LABEL is " - if running ; then - echo "running" - else - echo " not running." - exit 1 - fi - ;; - *) - N=/etc/init.d/$NAME - # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 - echo "Usage: $N {start|stop|restart|force-reload|status|force-stop}" >&2 - exit 1 - ;; -esac - -exit 0 diff --git a/branches/0.2/debian/init.d.lsb.ex b/branches/0.2/debian/init.d.lsb.ex deleted file mode 100644 index 40a28d5..0000000 --- a/branches/0.2/debian/init.d.lsb.ex +++ /dev/null @@ -1,296 +0,0 @@ -#!/bin/sh -# -# Example init.d script with LSB support. -# -# Please read this init.d carefully and modify the sections to -# adjust it to the program you want to run. -# -# Copyright (c) 2007 Javier Fernandez-Sanguino -# -# This is free software; you may redistribute it and/or modify -# it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2, -# or (at your option) any later version. -# -# This 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 with -# the Debian operating system, in /usr/share/common-licenses/GPL; if -# not, write to the Free Software Foundation, Inc., 59 Temple Place, -# Suite 330, Boston, MA 02111-1307 USA -# -### BEGIN INIT INFO -# Provides: pywinery -# Required-Start: $network $local_fs -# Required-Stop: -# Should-Start: $named -# Should-Stop: -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: -# Description: -# <...> -# <...> -### END INIT INFO - -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin - -DAEMON=/usr/sbin/pywinery # Introduce the server's location here -NAME=#PACKAGE # Introduce the short server's name here -DESC=#PACKAGE # Introduce a short description here -LOGDIR=/var/log/pywinery # Log directory to use - -PIDFILE=/var/run/$NAME.pid - -test -x $DAEMON || exit 0 - -. /lib/lsb/init-functions - -# Default options, these can be overriden by the information -# at /etc/default/$NAME -DAEMON_OPTS="" # Additional options given to the server - -DIETIME=10 # Time to wait for the server to die, in seconds - # If this value is set too low you might not - # let some servers to die gracefully and - # 'restart' will not work - -#STARTTIME=2 # Time to wait for the server to start, in seconds - # If this value is set each time the server is - # started (on start or restart) the script will - # stall to try to determine if it is running - # If it is not set and the server takes time - # to setup a pid file the log message might - # be a false positive (says it did not start - # when it actually did) - -LOGFILE=$LOGDIR/$NAME.log # Server logfile -#DAEMONUSER=pywinery # Users to run the daemons as. If this value - # is set start-stop-daemon will chuid the server - -# Include defaults if available -if [ -f /etc/default/$NAME ] ; then - . /etc/default/$NAME -fi - -# Use this if you want the user to explicitly set 'RUN' in -# /etc/default/ -#if [ "x$RUN" != "xyes" ] ; then -# log_failure_msg "$NAME disabled, please adjust the configuration to your needs " -# log_failure_msg "and then set RUN to 'yes' in /etc/default/$NAME to enable it." -# exit 1 -#fi - -# Check that the user exists (if we set a user) -# Does the user exist? -if [ -n "$DAEMONUSER" ] ; then - if getent passwd | grep -q "^$DAEMONUSER:"; then - # Obtain the uid and gid - DAEMONUID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $3}'` - DAEMONGID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $4}'` - else - log_failure_msg "The user $DAEMONUSER, required to run $NAME does not exist." - exit 1 - fi -fi - - -set -e - -running_pid() { -# Check if a given process pid's cmdline matches a given name - pid=$1 - name=$2 - [ -z "$pid" ] && return 1 - [ ! -d /proc/$pid ] && return 1 - cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1` - # Is this the expected server - [ "$cmd" != "$name" ] && return 1 - return 0 -} - -running() { -# Check if the process is running looking at /proc -# (works for all users) - - # No pidfile, probably no daemon present - [ ! -f "$PIDFILE" ] && return 1 - pid=`cat $PIDFILE` - running_pid $pid $DAEMON || return 1 - return 0 -} - -start_server() { -# Start the process using the wrapper - if [ -z "$DAEMONUSER" ] ; then - start_daemon -p $PIDFILE $DAEMON -- $DAEMON_OPTS - errcode=$? - else -# if we are using a daemonuser then change the user id - start-stop-daemon --start --quiet --pidfile $PIDFILE \ - --chuid $DAEMONUSER \ - --exec $DAEMON -- $DAEMON_OPTS - errcode=$? - fi - return $errcode -} - -stop_server() { -# Stop the process using the wrapper - if [ -z "$DAEMONUSER" ] ; then - killproc -p $PIDFILE $DAEMON - errcode=$? - else -# if we are using a daemonuser then look for process that match - start-stop-daemon --stop --quiet --pidfile $PIDFILE \ - --user $DAEMONUSER \ - --exec $DAEMON - errcode=$? - fi - - return $errcode -} - -reload_server() { - [ ! -f "$PIDFILE" ] && return 1 - pid=pidofproc $PIDFILE # This is the daemon's pid - # Send a SIGHUP - kill -1 $pid - return $? -} - -force_stop() { -# Force the process to die killing it manually - [ ! -e "$PIDFILE" ] && return - if running ; then - kill -15 $pid - # Is it really dead? - sleep "$DIETIME"s - if running ; then - kill -9 $pid - sleep "$DIETIME"s - if running ; then - echo "Cannot kill $NAME (pid=$pid)!" - exit 1 - fi - fi - fi - rm -f $PIDFILE -} - - -case "$1" in - start) - log_daemon_msg "Starting $DESC " "$NAME" - # Check if it's running first - if running ; then - log_progress_msg "apparently already running" - log_end_msg 0 - exit 0 - fi - if start_server ; then - # NOTE: Some servers might die some time after they start, - # this code will detect this issue if STARTTIME is set - # to a reasonable value - [ -n "$STARTTIME" ] && sleep $STARTTIME # Wait some time - if running ; then - # It's ok, the server started and is running - log_end_msg 0 - else - # It is not running after we did start - log_end_msg 1 - fi - else - # Either we could not start it - log_end_msg 1 - fi - ;; - stop) - log_daemon_msg "Stopping $DESC" "$NAME" - if running ; then - # Only stop the server if we see it running - errcode=0 - stop_server || errcode=$? - log_end_msg $errcode - else - # If it's not running don't do anything - log_progress_msg "apparently not running" - log_end_msg 0 - exit 0 - fi - ;; - force-stop) - # First try to stop gracefully the program - $0 stop - if running; then - # If it's still running try to kill it more forcefully - log_daemon_msg "Stopping (force) $DESC" "$NAME" - errcode=0 - force_stop || errcode=$? - log_end_msg $errcode - fi - ;; - restart|force-reload) - log_daemon_msg "Restarting $DESC" "$NAME" - errcode=0 - stop_server || errcode=$? - # Wait some sensible amount, some server need this - [ -n "$DIETIME" ] && sleep $DIETIME - start_server || errcode=$? - [ -n "$STARTTIME" ] && sleep $STARTTIME - running || errcode=$? - log_end_msg $errcode - ;; - status) - - log_daemon_msg "Checking status of $DESC" "$NAME" - if running ; then - log_progress_msg "running" - log_end_msg 0 - else - log_progress_msg "apparently not running" - log_end_msg 1 - exit 1 - fi - ;; - # Use this if the daemon cannot reload - reload) - log_warning_msg "Reloading $NAME daemon: not implemented, as the daemon" - log_warning_msg "cannot re-read the config file (use restart)." - ;; - # And this if it cann - #reload) - # - # If the daemon can reload its config files on the fly - # for example by sending it SIGHUP, do it here. - # - # If the daemon responds to changes in its config file - # directly anyway, make this a do-nothing entry. - # - # log_daemon_msg "Reloading $DESC configuration files" "$NAME" - # if running ; then - # reload_server - # if ! running ; then - # Process died after we tried to reload - # log_progress_msg "died on reload" - # log_end_msg 1 - # exit 1 - # fi - # else - # log_progress_msg "server is not running" - # log_end_msg 1 - # exit 1 - # fi - #;; - - *) - N=/etc/init.d/$NAME - echo "Usage: $N {start|stop|force-stop|restart|force-reload|status}" >&2 - exit 1 - ;; -esac - -exit 0 diff --git a/branches/0.2/debian/manpage.1.ex b/branches/0.2/debian/manpage.1.ex deleted file mode 100644 index 68a7588..0000000 --- a/branches/0.2/debian/manpage.1.ex +++ /dev/null @@ -1,59 +0,0 @@ -.\" Hey, EMACS: -*- nroff -*- -.\" First parameter, NAME, should be all caps -.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection -.\" other parameters are allowed: see man(7), man(1) -.TH PYWINERY SECTION "March 16, 2009" -.\" Please adjust this date whenever revising the manpage. -.\" -.\" Some roff macros, for reference: -.\" .nh disable hyphenation -.\" .hy enable hyphenation -.\" .ad l left justify -.\" .ad b justify to both left and right margins -.\" .nf disable filling -.\" .fi enable filling -.\" .br insert line break -.\" .sp insert n+1 empty lines -.\" for manpage-specific macros, see man(7) -.SH NAME -pywinery \- program to do something -.SH SYNOPSIS -.B pywinery -.RI [ options ] " files" ... -.br -.B bar -.RI [ options ] " files" ... -.SH DESCRIPTION -This manual page documents briefly the -.B pywinery -and -.B bar -commands. -.PP -.\" TeX users may be more comfortable with the \fB\fP and -.\" \fI\fP escape sequences to invode bold face and italics, -.\" respectively. -\fBpywinery\fP is a program that... -.SH OPTIONS -These programs follow the usual GNU command line syntax, with long -options starting with two dashes (`-'). -A summary of options is included below. -For a complete description, see the Info files. -.TP -.B \-h, \-\-help -Show summary of options. -.TP -.B \-v, \-\-version -Show version of program. -.SH SEE ALSO -.BR bar (1), -.BR baz (1). -.br -The programs are documented fully by -.IR "The Rise and Fall of a Fooish Bar" , -available via the Info system. -.SH AUTHOR -pywinery was written by . -.PP -This manual page was written by orpheus , -for the Debian project (but may be used by others). diff --git a/branches/0.2/debian/manpage.sgml.ex b/branches/0.2/debian/manpage.sgml.ex deleted file mode 100644 index 7a6d499..0000000 --- a/branches/0.2/debian/manpage.sgml.ex +++ /dev/null @@ -1,156 +0,0 @@ - manpage.1'. You may view - the manual page with: `docbook-to-man manpage.sgml | nroff -man | - less'. A typical entry in a Makefile or Makefile.am is: - -manpage.1: manpage.sgml - docbook-to-man $< > $@ - - - The docbook-to-man binary is found in the docbook-to-man package. - Please remember that if you create the nroff version in one of the - debian/rules file targets (such as build), you will need to include - docbook-to-man in your Build-Depends control field. - - --> - - - FIRSTNAME"> - SURNAME"> - - March 16, 2009"> - - SECTION"> - orpheus@unknown"> - - PYWINERY"> - - - Debian"> - GNU"> - GPL"> -]> - - - -
- &dhemail; -
- - &dhfirstname; - &dhsurname; - - - 2003 - &dhusername; - - &dhdate; -
- - &dhucpackage; - - &dhsection; - - - &dhpackage; - - program to do something - - - - &dhpackage; - - - - - - - - DESCRIPTION - - This manual page documents briefly the - &dhpackage; and bar - commands. - - This manual page was written for the &debian; distribution - because the original program does not have a manual page. - Instead, it has documentation in the &gnu; - Info format; see below. - - &dhpackage; is a program that... - - - - OPTIONS - - These programs follow the usual &gnu; command line syntax, - with long options starting with two dashes (`-'). A summary of - options is included below. For a complete description, see the - Info files. - - - - - - - - Show summary of options. - - - - - - - - Show version of program. - - - - - - SEE ALSO - - bar (1), baz (1). - - The programs are documented fully by The Rise and - Fall of a Fooish Bar available via the - Info system. - - - AUTHOR - - This manual page was written by &dhusername; &dhemail; for - the &debian; system (but may be used by others). Permission is - granted to copy, distribute and/or modify this document under - the terms of the &gnu; General Public License, Version 2 any - later version published by the Free Software Foundation. - - - On Debian systems, the complete text of the GNU General Public - License can be found in /usr/share/common-licenses/GPL. - - - -
- - - - diff --git a/branches/0.2/debian/manpage.xml.ex b/branches/0.2/debian/manpage.xml.ex deleted file mode 100644 index 3d97346..0000000 --- a/branches/0.2/debian/manpage.xml.ex +++ /dev/null @@ -1,291 +0,0 @@ - -.
will be generated. You may view the -manual page with: nroff -man .
| less'. A typical entry -in a Makefile or Makefile.am is: - -DB2MAN = /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl -XP = xsltproc -''-nonet -''-param man.charmap.use.subset "0" - -manpage.1: manpage.xml - $(XP) $(DB2MAN) $< - -The xsltproc binary is found in the xsltproc package. The XSL files are in -docbook-xsl. A description of the parameters you can use can be found in the -docbook-xsl-doc-* packages. Please remember that if you create the nroff -version in one of the debian/rules file targets (such as build), you will need -to include xsltproc and docbook-xsl in your Build-Depends control field. -Alternatively use the xmlto command/package. That will also automatically -pull in xsltproc and docbook-xsl. - -Notes for using docbook2x: docbook2x-man does not automatically create the -AUTHOR(S) and COPYRIGHT sections. In this case, please add them manually as - ... . - -To disable the automatic creation of the AUTHOR(S) and COPYRIGHT sections -read /usr/share/doc/docbook-xsl/doc/manpages/authors.html. This file can be -found in the docbook-xsl-doc-html package. - -Validation can be done using: `xmllint -''-noout -''-valid manpage.xml` - -General documentation about man-pages and man-page-formatting: -man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/ - ---> - - - - - - - - - - - - - -]> - - - - &dhtitle; - &dhpackage; - - - &dhfirstname; - &dhsurname; - Wrote this manpage for the Debian system. -
- &dhemail; -
-
-
- - 2007 - &dhusername; - - - This manual page was written for the Debian system - (but may be used by others). - Permission is granted to copy, distribute and/or modify this - document under the terms of the GNU General Public License, - Version 2 or (at your option) any later version published by - the Free Software Foundation. - On Debian systems, the complete text of the GNU General Public - License can be found in - /usr/share/common-licenses/GPL. - -
- - &dhucpackage; - &dhsection; - - - &dhpackage; - program to do something - - - - &dhpackage; - - - - - - - - - this - - - - - - - - this - that - - - - - &dhpackage; - - - - - - - - - - - - - - - - - - - DESCRIPTION - This manual page documents briefly the - &dhpackage; and bar - commands. - This manual page was written for the Debian distribution - because the original program does not have a manual page. - Instead, it has documentation in the GNU - info - 1 - format; see below. - &dhpackage; is a program that... - - - OPTIONS - The program follows the usual GNU command line syntax, - with long options starting with two dashes (`-'). A summary of - options is included below. For a complete description, see the - - info - 1 - files. - - - - - - - Does this and that. - - - - - - - Show summary of options. - - - - - - - Show version of program. - - - - - - FILES - - - /etc/foo.conf - - The system-wide configuration file to control the - behaviour of &dhpackage;. See - - foo.conf - 5 - for further details. - - - - ${HOME}/.foo.conf - - The per-user configuration file to control the - behaviour of &dhpackage;. See - - foo.conf - 5 - for further details. - - - - - - ENVIONMENT - - - FOO_CONF - - If used, the defined file is used as configuration - file (see also ). - - - - - - DIAGNOSTICS - The following diagnostics may be issued - on stderr: - - - Bad configuration file. Exiting. - - The configuration file seems to contain a broken configuration - line. Use the option, to get more info. - - - - - &dhpackage; provides some return codes, that can - be used in scripts: - - Code - Diagnostic - - 0 - Program exited successfully. - - - 1 - The configuration file seems to be broken. - - - - - - BUGS - The program is currently limited to only work - with the foobar library. - The upstreams BTS can be found - at . - - - SEE ALSO - - - bar - 1 - , - baz - 1 - , - foo.conf - 5 - - The programs are documented fully by The Rise and - Fall of a Fooish Bar available via the - info - 1 - system. - -
- diff --git a/branches/0.2/debian/menu.ex b/branches/0.2/debian/menu.ex deleted file mode 100644 index e891b25..0000000 --- a/branches/0.2/debian/menu.ex +++ /dev/null @@ -1,2 +0,0 @@ -?package(pywinery):needs="X11|text|vc|wm" section="Applications/see-menu-manual"\ - title="pywinery" command="/usr/bin/pywinery" diff --git a/branches/0.2/debian/postinst.ex b/branches/0.2/debian/postinst.ex deleted file mode 100644 index a156a50..0000000 --- a/branches/0.2/debian/postinst.ex +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -# postinst script for pywinery -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `configure' -# * `abort-upgrade' -# * `abort-remove' `in-favour' -# -# * `abort-remove' -# * `abort-deconfigure' `in-favour' -# `removing' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - configure) - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - ;; - - *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 - - diff --git a/branches/0.2/debian/postrm.ex b/branches/0.2/debian/postrm.ex deleted file mode 100644 index 669dde1..0000000 --- a/branches/0.2/debian/postrm.ex +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -# postrm script for pywinery -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `remove' -# * `purge' -# * `upgrade' -# * `failed-upgrade' -# * `abort-install' -# * `abort-install' -# * `abort-upgrade' -# * `disappear' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) - ;; - - *) - echo "postrm called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 - - diff --git a/branches/0.2/debian/preinst.ex b/branches/0.2/debian/preinst.ex deleted file mode 100644 index 087ec53..0000000 --- a/branches/0.2/debian/preinst.ex +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh -# preinst script for pywinery -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `install' -# * `install' -# * `upgrade' -# * `abort-upgrade' -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - install|upgrade) - ;; - - abort-upgrade) - ;; - - *) - echo "preinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 - - diff --git a/branches/0.2/debian/prerm.ex b/branches/0.2/debian/prerm.ex deleted file mode 100644 index 40c1e20..0000000 --- a/branches/0.2/debian/prerm.ex +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -# prerm script for pywinery -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `remove' -# * `upgrade' -# * `failed-upgrade' -# * `remove' `in-favour' -# * `deconfigure' `in-favour' -# `removing' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - remove|upgrade|deconfigure) - ;; - - failed-upgrade) - ;; - - *) - echo "prerm called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 - - diff --git a/branches/0.2/debian/pycompat b/branches/0.2/debian/pycompat deleted file mode 100644 index 0cfbf08..0000000 --- a/branches/0.2/debian/pycompat +++ /dev/null @@ -1 +0,0 @@ -2 diff --git a/branches/0.2/debian/pywinery.debhelper.log b/branches/0.2/debian/pywinery.debhelper.log deleted file mode 100644 index 45c74e7..0000000 --- a/branches/0.2/debian/pywinery.debhelper.log +++ /dev/null @@ -1,35 +0,0 @@ -dh_prep -dh_installdirs -dh_installdirs -dh_installdocs -dh_installexamples -dh_installman -dh_installinfo -dh_installmenu -dh_installcron -dh_installinit -dh_installdebconf -dh_installemacsen -dh_installcatalogs -dh_installpam -dh_installlogrotate -dh_installlogcheck -dh_installchangelogs -dh_installudev -dh_lintian -dh_bugfiles -dh_install -dh_link -dh_installmime -dh_pycentral -dh_strip -dh_compress -dh_fixperms -dh_makeshlibs -dh_installdeb -dh_perl -dh_shlibdeps -dh_gencontrol -dh_link -dh_md5sums -dh_builddeb diff --git a/branches/0.2/debian/pywinery.default.ex b/branches/0.2/debian/pywinery.default.ex deleted file mode 100644 index b25b826..0000000 --- a/branches/0.2/debian/pywinery.default.ex +++ /dev/null @@ -1,10 +0,0 @@ -# Defaults for pywinery initscript -# sourced by /etc/init.d/pywinery -# installed at /etc/default/pywinery by the maintainer scripts - -# -# This is a POSIX shell fragment -# - -# Additional options that are passed to the Daemon. -DAEMON_OPTS="" diff --git a/branches/0.2/debian/pywinery.doc-base.EX b/branches/0.2/debian/pywinery.doc-base.EX deleted file mode 100644 index 2d3509a..0000000 --- a/branches/0.2/debian/pywinery.doc-base.EX +++ /dev/null @@ -1,22 +0,0 @@ -Document: pywinery -Title: Debian pywinery Manual -Author: -Abstract: This manual describes what pywinery is - and how it can be used to - manage online manuals on Debian systems. -Section: unknown - -Format: debiandoc-sgml -Files: /usr/share/doc/pywinery/pywinery.sgml.gz - -Format: postscript -Files: /usr/share/doc/pywinery/pywinery.ps.gz - -Format: text -Files: /usr/share/doc/pywinery/pywinery.text.gz - -Format: HTML -Index: /usr/share/doc/pywinery/html/index.html -Files: /usr/share/doc/pywinery/html/*.html - - diff --git a/branches/0.2/debian/pywinery.postinst.debhelper b/branches/0.2/debian/pywinery.postinst.debhelper deleted file mode 100644 index 46fb409..0000000 --- a/branches/0.2/debian/pywinery.postinst.debhelper +++ /dev/null @@ -1,9 +0,0 @@ -# Automatically added by dh_pycentral -rm -f /var/lib/pycentral/pywinery.pkgremove -if which pycentral >/dev/null 2>&1; then - pycentral pkginstall pywinery - if grep -qs '^pywinery$' /var/lib/pycentral/delayed-pkgs; then - sed -i '/^pywinery$/d' /var/lib/pycentral/delayed-pkgs - fi -fi -# End automatically added section diff --git a/branches/0.2/debian/pywinery.preinst.debhelper b/branches/0.2/debian/pywinery.preinst.debhelper deleted file mode 100644 index bb6c814..0000000 --- a/branches/0.2/debian/pywinery.preinst.debhelper +++ /dev/null @@ -1,8 +0,0 @@ -# Automatically added by dh_pycentral -case "$1" in - install|upgrade) - mkdir -p /var/lib/pycentral - echo '# the presence of this file allows calling pkgremove on upgrade' \ - > /var/lib/pycentral/pywinery.pkgremove -esac -# End automatically added section diff --git a/branches/0.2/debian/pywinery.prerm.debhelper b/branches/0.2/debian/pywinery.prerm.debhelper deleted file mode 100644 index 848eeaf..0000000 --- a/branches/0.2/debian/pywinery.prerm.debhelper +++ /dev/null @@ -1,45 +0,0 @@ -# Automatically added by dh_pycentral -case "$1" in remove|upgrade) - pkgremove=y -esac -if [ -f /var/lib/pycentral/pywinery.pkgremove ] || [ -f /var/lib/pycentral/pkgremove ]; then - pkgremove=y -fi -if [ "$pkgremove" = y ]; then -if which python >/dev/null 2>&1 && which pycentral >/dev/null 2>&1; then - pycentral pkgremove pywinery -else - flist=$(tempfile) - slist=$(tempfile) - dpkg -L pywinery | tee $flist | \ - while read n; do - case "$n" in - /usr/share/pyshared/*) - n2=${n#/usr/share/pyshared/*} - case "$n" in - *.py) echo "p $n";; - *) [ -d "$n" ] && echo "d $n2" || echo "f $n2" - esac - ;; - *) continue - esac - done > $slist - if [ -s $slist ]; then - for d in /usr/lib/python[0-9].[0-9]/????-packages; do - case "$d" in */python2.1/*|*/python2.2/*) continue; esac - while read t n; do - case "$t" in - p) rm -f $d/$n $d/${n}[co];; - d) rmdir $d/$n 2>/dev/null || true;; - *) rm -f $d/$n - esac - done < $slist - done - fi - awk '/\/usr\/share\/pyshared/ {next} /\.py$/ {print $0"c\n" $0"o"}' $flist \ - | xargs -r rm -f >&2 - rm -f $flist $slist -fi -rm -f /var/lib/pycentral/pywinery.pkgremove -fi -# End automatically added section diff --git a/branches/0.2/debian/pywinery.substvars b/branches/0.2/debian/pywinery.substvars deleted file mode 100644 index 4b30422..0000000 --- a/branches/0.2/debian/pywinery.substvars +++ /dev/null @@ -1,3 +0,0 @@ -python:Versions=all -python:Depends=python, python-central (>= 0.6.11) -misc:Depends= diff --git a/branches/0.2/debian/rules b/branches/0.2/debian/rules deleted file mode 100755 index fbb7664..0000000 --- a/branches/0.2/debian/rules +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/make -f - -DEB_PYTHON_SYSTEM=pycentral -DBK2MAN_XSL=/usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl - -include /usr/share/cdbs/1/rules/debhelper.mk -include /usr/share/cdbs/1/class/python-distutils.mk - -install/pywinery:: - mv $(CURDIR)/debian/pywinery/usr/bin/pywinery.py $(CURDIR)/debian/pywinery/usr/bin/pywinery - diff --git a/branches/0.2/debian/watch.ex b/branches/0.2/debian/watch.ex deleted file mode 100644 index ec9eb7e..0000000 --- a/branches/0.2/debian/watch.ex +++ /dev/null @@ -1,23 +0,0 @@ -# Example watch control file for uscan -# Rename this file to "watch" and then you can run the "uscan" command -# to check for upstream updates and more. -# See uscan(1) for format - -# Compulsory line, this is a version 3 file -version=3 - -# Uncomment to examine a Webpage -# -#http://www.example.com/downloads.php pywinery-(.*)\.tar\.gz - -# Uncomment to examine a Webserver directory -#http://www.example.com/pub/pywinery-(.*)\.tar\.gz - -# Uncommment to examine a FTP server -#ftp://ftp.example.com/pub/pywinery-(.*)\.tar\.gz debian uupdate - -# Uncomment to find new files on sourceforge, for devscripts >= 2.9 -# http://sf.net/pywinery/pywinery-(.*)\.tar\.gz - -# Uncomment to find new files on GooglePages -# http://example.googlepages.com/foo.html pywinery-(.*)\.tar\.gz diff --git a/branches/0.2/gui.glade b/branches/0.2/gui.glade deleted file mode 100644 index aed2538..0000000 --- a/branches/0.2/gui.glade +++ /dev/null @@ -1,1401 +0,0 @@ - - - - - - 380 - 120 - False - 5 - Unknown prefix - False - True - center-on-parent - gtk-dialog-question - dialog - True - window1 - False - - - - True - False - 2 - - - True - False - end - - - gtk-no - True - True - False - False - True - - - False - False - 0 - - - - - gtk-yes - 1 - True - True - True - False - True - - - False - False - 1 - - - - - False - True - end - 0 - - - - - True - False - 5 - - - True - False - 0 - gtk-dialog-question - 6 - - - False - True - 0 - - - - - True - False - 0 - The given file is located into an unknown prefix. -Should Pywinery remember it? - - - False - True - 1 - - - - - False - True - 1 - - - - - - - 380 - 120 - False - 5 - Prefix name - False - True - center-on-parent - gtk-harddisk - dialog - window1 - False - - - - True - False - - - True - False - end - - - gtk-cancel - True - True - False - False - True - - - False - False - 0 - - - - - gtk-add - 1 - True - True - False - True - - - False - False - 1 - - - - - gtk-ok - 1 - True - True - False - True - - - False - False - 2 - - - - - False - True - end - 0 - - - - - True - False - 5 - - - True - False - 0 - gtk-harddisk - 6 - - - False - True - 0 - - - - - True - False - 4 - - - True - False - - - True - False - 0 - 1 - Prefix name: - - - True - True - 0 - - - - - True - False - Prefixes are created as folders under ~/.local/share/winebottles/ directory. -Imported prefixes are symlinks at the same location. - gtk-info - - - False - True - 1 - - - - - True - True - 0 - - - - - True - True - - True - False - False - True - True - - - False - True - 1 - - - - - True - True - 1 - - - - - False - True - 1 - - - - - - - 380 - 120 - False - 5 - Prefix removal - False - True - center-on-parent - gtk-dialog-question - dialog - window1 - False - - - - True - False - 2 - - - True - False - end - - - gtk-cancel - True - True - True - False - True - - - False - False - 0 - - - - - gtk-ok - 1 - True - True - False - False - True - - - False - False - 1 - - - - - False - True - end - 0 - - - - - True - False - 5 - - - True - False - 0 - gtk-dialog-question - 6 - - - False - True - 0 - - - - - True - False - 2 - - - True - False - 0 - What should I do? - - - False - True - 0 - - - - - True - False - - - Remove from list but preserve on disk - True - True - False - False - True - True - - - True - True - 0 - - - - - Remove definitively from disk - True - True - False - False - True - radiobutton1 - - - True - True - 1 - - - - - False - True - 1 - - - - - True - True - 1 - - - - - False - True - 1 - - - - - - - True - False - - - New prefix - True - False - False - False - True - - - - True - False - gtk-new - 1 - - - - - - - Import prefix - True - False - False - False - - - - True - False - document-import - 1 - - - - - - - True - False - - - gtk-open - True - False - False - True - True - - - - - - True - False - False - - - - - New prefix - True - False - False - False - - - - True - False - gtk-new - 1 - - - - - - - Import prefix - True - False - False - False - - - - True - False - document-import - 1 - - - - - - - Add application - True - False - False - False - - - - True - False - gtk-add - 1 - - - - - - - True - False - False - - - - - Remove - True - False - False - False - - - - True - False - gtk-remove - 1 - - - - - - - True - False - False - - - - - Rename - True - False - False - False - - - - True - False - gtk-edit - 1 - - - - - - - True - False - - - gtk-execute - True - False - False - True - True - - - - - - True - False - False - - - - - New prefix - True - False - False - False - - - - True - False - gtk-new - 1 - - - - - - - Import prefix - True - False - False - False - - - - True - False - document-import - 1 - - - - - - - Add application - True - False - False - False - - - - True - False - gtk-add - 1 - - - - - - - True - False - False - - - - - Remove - True - False - False - False - - - - True - False - gtk-remove - 1 - - - - - - - 380 - False - True - True - Pywinery - wine prefix tool - center-on-parent - pywinery - dialog - True - - - - True - False - 5 - 5 - 5 - 5 - - - True - False - 2 - - - True - False - 4 - - - False - 0.5 - none - 0 - - - True - False - 0 - 0 - 48 - pywinery - 6 - - - - - False - True - 0 - - - - - True - False - - - True - False - - - False - - - True - False - - - - True - True - 0 - - - - - True - True - True - True - Manage prefixes - False - - - - True - False - Manage prefixes - gtk-zoom-in - - - - - False - False - 1 - - - - - False - True - 0 - - - - - False - - - True - True - automatic - automatic - - - True - False - queue - - - True - True - False - - - - - - - - True - True - 0 - - - - - True - False - - - True - True - True - Abbreviate view - False - - - - True - False - gtk-zoom-out - - - - - False - True - 0 - - - - - True - False - - - - - - True - True - 1 - - - - - True - False - Use the context menu of treeview to perform any action. - gtk-info - - - False - True - 2 - - - - - False - True - 1 - - - - - True - True - 1 - - - - - True - True - 0 - - - - - False - 5 - 5 - 1 - - - True - False - 5 - - - True - False - gtk-dialog-error - 1 - - - False - True - 0 - - - - - True - False - 0 - Error - - - True - True - 1 - - - - - - - False - True - 1 - - - - - True - True - - - - True - True - left - - - True - False - - - 200 - 200 - True - True - automatic - automatic - in - - - True - False - True - horizontal - 2 - 0 - - - - - - True - True - 0 - - - - - - - True - False - gtk-execute - - - False - tab - - - - - True - False - True - True - automatic - automatic - - - True - True - False - none - - - True - True - False - 4 - 4 - 4 - 4 - - - True - False - 2 - 2 - 2 - 2 - - - True - False - 5 - - - True - False - 0 - Custom wine binary - True - - - True - True - 0 - - - - - 100 - True - False - - - - True - True - 1 - - - - - GTK_FILL - - - - - True - True - True - False - - - - True - False - gtk-clear - - - - - 1 - 2 - GTK_FILL - GTK_FILL - - - - - True - True - True - False - - - - True - False - gtk-clear - - - - - 1 - 2 - 1 - 2 - GTK_FILL - GTK_FILL - - - - - True - False - 5 - - - 200 - True - False - 0 - Disable winemenubuilder.exe -(desktop files and mimetypes) - True - - - True - True - 0 - - - - - True - True - False - False - bottom - True - - - - - - - False - True - 1 - - - - - 1 - 2 - GTK_FILL - - - - - - - - - - - 1 - - - - - True - False - gtk-preferences - - - 1 - False - tab - - - - - - - True - False - More... - - - label_item - - - - - False - True - 2 - - - - - False - - - True - False - - - False - True - 0 - - - - - Remember selected prefix for application - True - True - False - False - True - - - - False - True - 1 - - - - - False - True - 3 - - - - - True - True - 1 - - - - - True - True - 0 - - - - - True - False - 4 - True - end - - - gtk-cancel - True - True - False - True - - - - False - False - 1 - - - - - gtk-execute - True - True - False - True - - - - - False - False - 2 - - - - - True - True - False - - - - - True - False - 0 - none - - - True - False - 2 - - - True - False - gtk-add - - - False - True - 0 - - - - - True - False - 0 - Install - True - True - - - False - True - 1 - - - - - - - - - False - False - 3 - - - - - gtk-close - True - True - False - True - - - - False - False - 4 - - - - - False - True - end - 1 - - - - - - - - diff --git a/branches/0.2/pywinery.desktop b/branches/0.2/pywinery.desktop deleted file mode 100644 index ff47cc9..0000000 --- a/branches/0.2/pywinery.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Categories=Wine;Applications;GTK;System;Emulator -Comment=Wine prefix manager and launcher -Encoding=UTF-8 -Exec=pywinery -Icon=pywinery.svg -Name=PyWinery -GenericName=Wine prefix manager -Terminal=false -Type=Application -MimeType=application/x-ms-dos-executable;application/x-msi;application/x-win-lnk;application/x-dosexec diff --git a/branches/0.2/pywinery.py b/branches/0.2/pywinery.py deleted file mode 100755 index 1f48cd5..0000000 --- a/branches/0.2/pywinery.py +++ /dev/null @@ -1,1126 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -''' - This program 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. - - This program 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 . -''' -__version__ = (0, 2, 1) -__author__ = "Felipe A. Hernandez " - -from sys import exit as sys_exit, argv as sys_argv, stderr -try: - import pygtk - pygtk.require("2.0") -except: - pass -try: - import gtk - import pango - import gtk.glade - import gobject - import atk -except: - sys_exit(1) - -from os.path import realpath, abspath, split as path_split, join as path_join,\ - isfile, isdir, islink, isabs, expandvars, dirname, exists -from os import environ, listdir, sep, linesep, kill as os_kill, getuid,\ - getgid, remove, mkdir, symlink, access, X_OK - -from commands import getoutput -from subprocess import Popen -from mimetypes import guess_type -from threading import Thread -from time import sleep, time -from exceptions import ValueError - -from shutil import rmtree - -def mkpath(path): - path = path.split(sep) - unfinished = "" - for i in path: - unfinished += "%s%s" % (i, sep) - if not isdir(unfinished): - mkdir(unfinished) - -def getPrefixes(defaults): - configdir = expandvars("$HOME/.config/pywinery") - newdir = expandvars("$HOME/.local/share/wineprefixes") - old = path_join(configdir, "prefixes.config") - if not isdir(newdir): mkpath(newdir) - #if not isdir(configdir): mkpath(configdir) - if isfile(old): - # Load prefixes with exe lists - f = open(old,"r") - configlines = {} - lastconfigline = None - for i in f.readlines(): - si = i.strip() - if si: - if si[0]==">": - if lastconfigline: - configlines[lastconfigline].append(si[1:].strip()) - else: - lastconfigline = si - configlines[si] = [] - f.close() - - # Skip prefixes already in newdir but update cfg with execs - for i in listdir(newdir): - rpath = realpath(path_join(newdir, i)) - for j in configlines.keys(): - if realpath(j) == rpath: - prefix = Prefix(rpath, defaults) - prefix.extend_known_executables(configlines[j]) - del configlines[j] - - # Newdir prefix linking - for key, values in configlines.iteritems(): - if isdir(key): # We cannot import broken prefixes - end = key.split(sep)[-1] - prefix = Prefix(key, defaults) - prefix["ww_name"] = end - prefix.extend_known_executables(values) - prefix.memorize() - remove(old) - - #TODO: ignore behavior - tr = [] - for i in listdir(newdir): - apath = abspath(path_join(newdir, i)) - rpath = realpath(path_join(newdir, i)) - if isdir(rpath): - prefix = Prefix(apath, defaults) - if prefix["ww_ignore"]: continue - tr.append(prefix) - else: tr.append(BrokenPrefix(apath, defaults)) - return tr - -def namer(path): - ''' Receives a path and returns an alternative if alredy exists ''' - temptative = path - counter = 1 - while exists(temptative): - counter += 1 - temptative = "%s_%d" % (path, counter) - return temptative - -# Enviroment's detection and actions -def getBin(name): - return getoutput("which %s" % name).strip() or None - -def checkBin(name): - if exists(name) and access(name, X_OK): return True - return bool(getBin(name)) - -def killPopen(p, signal=15): - if hasattr(p, "send_signal"): - p.send_signal(signal) - else: - # For python < 2.6 - os_kill(p.pid, signal) - -def toolModel( winepath = "wine", wineprefix = "", model = None ): - ''' - Returns a model of found prefix-related tools using the following row - format: - ( icon_pixbuf, icon_text, GTuple( executable_path, *arguments )) - ''' - # tools format: - # text : (list of options...) - # option format: - # (icon_name, required_binaries, command, WTF) - tools = { - "Winetricks":( - ("wine-winetricks", ("winetricks",), ("winetricks",)),), - "Winecfg":( - ("wine-winecfg", (winepath,), (winepath, "winecfg",)),), - "Wine cmd":( - ("terminal", ("x-terminal-emulator", winepath,), ( - "x-terminal-emulator","-e", winepath, "cmd")), - ("terminal", ("xterm", winepath,), ( - "xterm","-e", winepath, "cmd")), - ), - "Wine uninstaller":( - ("wine-uninstaller", (winepath,), (winepath, "uninstaller")),), - "Wine explorer":( - ("wine", (winepath,), (winepath, "explorer")),), - "Wine regedit":( - ("wine", (winepath,), (winepath, "regedit")),), - "Browse prefix folder":( - ("gtk-directory", ("xdg-open",), ("xdg-open","%s" % wineprefix)),), - } - theme = gtk.icon_theme_get_default() - if model is None: model = gtk.ListStore(gtk.gdk.Pixbuf, str, GTuple) - for text in tools: - for icon_name, requirements, command in tools[text]: - valid_option = True - for i in requirements: - if not checkBin(i): - valid_option = False - break - if valid_option: - icon = "gtk-missing-image" - try: - if theme.has_icon(icon_name): icon = icon_name - except: pass - model.append(( - theme.load_icon(icon, 24, 0), - text, - GTuple((getBin(command[0]),)+command[1:]))) - break - return model - -class LoopHalt(Exception): - def __str__(self): - return "Loop halted" - -class GTuple(gobject.GObject): - ''' - Custom gobject type to store any value. - Used getTools to return a gtk.TreeModel compatible model. - ''' - tup = None - def __init__(self, tup): - gobject.GObject.__init__(self) - self.tup = tup - -class Prefix(object): - @property - def path(self): return self._path - - @property - def winepath(self): - tr = self["ww_wine"] - if tr: return self.unrelativize(tr) - return tr - - @winepath.setter - def winepath(self, x): - if x: self["ww_wine"] = self.relativize(x) - else: self["ww_wine"] = self._defaults["ww_wine"] - - @property - def known_executables(self): - if self["ww_known_executables"]: - return tuple(self.unrelativize(i) for i in self["ww_known_executables"].split(":")) - return () - - - @property - def imported(self): - return islink(self._path) - - def __init__(self, path, defaults): - if not isabs(path): - path = expandvars("$HOME/.local/share/wineprefixes/%s" % path) - self._path = path - self._config = path_join(path, "wrapper.cfg") - self._defaults = defaults - self._cache = {} - - def __setitem__(self, x, y): - found = False - del_item = False - if x in self._defaults and y == self._defaults[x]: - if x in self._cache: del self._cache[x] - del_item = True - else: self._cache[x] = y - if isfile(self._config): - f = open(self._config, "r") - data = f.readlines() - newlinechar = linesep - if not f.newlines is None: - if f.newlines is tuple: - newlinechar = f.newlines[-1] - else: - newlinechar = f.newlines - f.close() - - for i in xrange(len(data)): - if data[i].split("=")[0] == x: - if del_item: data[i] = "" - else: data[i] = "%s=\"%s\"%s" % (x, y, newlinechar) - found = True - break - else: - newlinechar = linesep - data = [] - if not found and not del_item: data.append("%s=\"%s\"%s" % (x, y, newlinechar)) - f = open(self._config, "w") - f.writelines(data) - f.close() - - def __getitem__(self, x): - if x in self._cache: return self._cache[x] - elif isfile(self._config): - f = open(self._config, "r") - data = f.readlines() - newlinechar = linesep - if not f.newlines is None: - if f.newlines is tuple: newlinechar = f.newlines[-1] - else: newlinechar = f.newlines - f.close() - for i in xrange(len(data)): # We cache all data - if "=" in data[i] and data[i].strip()[0] != "#": - key, value = data[i].split("=") - key = key.strip() - value = value.strip() - if value[0] == "\"": value = value[1:-1] - #if key in self._defaults and value != self._defaults[key]: - self._cache[key] = value - if x in self._cache: return self._cache[x] - if x in self._defaults: return self._defaults[x] - raise KeyError("No variable with name %s." % x) - - def relativize(self, path): - path = abspath(path) - home = environ["HOME"] - if home[-1] == sep: home = home[:-1] - for old, new in ((self.path, ""), (realpath(self.path), ""), (home, "$HOME")): - if path.startswith(old): return "%s%s%s" % (new, sep if new else "", path[len(old)+1:]) - return path - - def unrelativize(self, path): - path = expandvars(path) - if isabs(path): return path - return path_join(self.path, path) - - def add_known_executable(self, x): - x = self.relativize(x) - known = self["ww_known_executables"] - if known: - known = known.split(":") - if x not in known: - known.append(x) - self["ww_known_executables"] = ":".join(known) - else: - self["ww_known_executables"] = x - - def remove_known_executable(self, x): - known = self["ww_known_executables"] - if known: - known = known.split(":") - x = self.relativize(x) - if x in known: - known.remove(x) - self["ww_known_executables"] = ":".join(known) - - def extend_known_executables(self, x): - known = self["ww_known_executables"] - if known: known = known.split(":") - else: known = [] - nold = len(known) - for i in x: - i = self.relativize(i) - if i not in known: known.append(i) - if len(known) != nold: self["ww_known_executables"] = ":".join(known) - - def memorize(self): - newdir = expandvars("$HOME/.local/share/wineprefixes") - if self._path.startswith(newdir): # internal prefix - if not exists(self._path): mkdir(self._path) - else: # external prefix, must symlink and change self._path - if not exists(self._path): mkdir(self._path) - # Symlink to wineprefixes directory - - # Generate symlink name - old_path = self._path - new_path = namer(path_join(newdir, path_split(self._path)[-1])) - - symlink(old_path, new_path) - self._path = new_path - - - -class BrokenPrefix(Prefix): - def knows_executable(self, x): return False - - def add_known_executable(self, x): pass - - def remove_known_executable(self, x): pass - - def extend_known_executables(self, x): pass - - def __setitem__(self, x, y): pass - - def __getitem__(self, x): return self._defaults[x] - - -class Main(object): - @classmethod - def default_treeview_sort(self, model, iter1, iter2): - a1 = model.get_value(iter1, 0) - a2 = model.get_value(iter1, 4) - b1 = model.get_value(iter2, 0) - b2 = model.get_value(iter2, 4) - if a2 and b2: - return cmp(a1+a2,b1+b2) - return cmp(a1,b1) - - constant_treeview_prefix = 0 - constant_treeview_executable = 1 - constant_treeview_broken_prefix = 2 - constant_treeview_broken_executable = 3 - - def __init__(self, args=None): - if args == None: args = [__file__] - guifile = "/usr/share/pywinery/gui.glade" - localgui = path_join(dirname(args[0]),"gui.glade") - if isfile(localgui): guifile = localgui - - self.killable_threads = [] - self.xml = gtk.glade.XML(guifile) - - self.default_prefix_config = { - "ww_name": None, - "ww_known_executables" : "", - "ww_wine": None, - "ww_winemenubuilder_disable" : None, - "ww_ignore" : None - } - self.prefixes = getPrefixes(self.default_prefix_config) - self.prefixes_by_id = dict((id(i), i) for i in self.prefixes) - self.prefixes_by_path = dict((i.path, i) for i in self.prefixes) - - self.lastTreeviewClick = 0 - - self.initialized_combo = False - self.initialized_treeview = False - - self.default_winepath = getBin("wine") - self.default_environment = environ.copy() - - self.given_msi = None - self.given_cmd = None - self.given_exe = None # absolute, not real - - self.flag_mode_config = False - self.flag_mode_debug = False - self.flag_mode_nogui = False - - self.flag_remember = False - self.flag_unknown_prefix = False - - self.flag_treeview_click_time = 0 - - self.current_prefix = None - - c = 1 - for i in args[1:]: - if i[0] != "-": break # Given commands can contains - and -- too - elif i == "-x" or i == "--nogui": self.flag_mode_nogui = True - elif i == "-d" or i == "--debug": self.flag_mode_debug = True - elif i == "-c" or i == "--config": self.flag_mode_config = True - c += 1 - - if len(args) > c: - apath = abspath(args[c]) - if isfile(apath): # Given arg is file, thus is exe or msi - if guess_type(apath)[0].lower() == "application/x-msi": - self.given_msi = (apath,)+tuple(args[c+1:]) - else: - self.given_exe = (apath,)+tuple(args[c+1:]) - for i in self.prefixes: - if i.relativize(apath) in i["ww_known_executables"].split(":"): - self.current_prefix = i - self.flag_remember = True - break - - if not self.current_prefix: - for i in self.prefixes: - if apath.startswith(i.path) or ( i.imported and - abspath(apath).startswith(realpath(i.path)) ): - self.current_prefix = i - break - else: # If given cmd isn't on any prefix - sp = apath.split(sep)[:-1] - while len(sp) > 1: - lookdir = sep.join(sp) - print lookdir - lookdir_content = listdir(lookdir) - if ( - "system.reg" in lookdir_content and - "drive_c" in lookdir_content and - "dosdevices" in lookdir_content): - self.flag_unknown_prefix = True - self.current_prefix = Prefix(lookdir, self.default_prefix_config) - break - sp.pop() - else: - self.given_cmd = tuple(args[c:]) - - def action_open_directory(self, directory): - for i in ("xdg-open", ): - if checkBin(i): - Popen((i, directory), env=self.default_environment) - break - else: - self.xml.get_widget("labelerror").set_label("Cannot open: exo-open nor xdg-open found.") - self.xml.get_widget("errorbox").set_property("visible", True) - - def action_add_prefix(self, prefix): - self.prefixes_by_id[id(prefix)] = prefix - self.prefixes_by_path[prefix.path] = prefix - if prefix not in self.prefixes: self.prefixes.append(prefix) - - def action_remove_prefix(self, prefix): - del self.prefixes_by_id[id(prefix)] - del self.prefixes_by_path[prefix.path] - self.prefixes.remove(prefix) - - def action_run_at_prefix(self, prefix, command): - if self.flag_mode_debug: print("Pywinery: %s" % repr(command)) - if isinstance(prefix, int): prefix = self.prefixes_by_id[prefix] - elif isinstance(prefix, basestring): prefix = self.prefixes_by_path[prefix] - env = self.default_environment.copy() - if self.flag_mode_debug: env["WINEDEBUG"] = "+all" - else: env["WINEDEBUG"] = "-all" - if prefix["ww_winemenubuilder_disable"]: ov = "winemenubuilder.exe=d" - else: ov = "winemenubuilder.exe=n" - if "WINEDLLOVERRIDES" in env: env["WINEDLLOVERRIDES"] = "%s;%s" % (env["WINEDLLOVERRIDES"], ov) - else: env["WINEDLLOVERRIDES"] = ov - env["WINEPREFIX"] = prefix.path - Popen(command, env = env) - - def run(self): - if self.flag_mode_nogui: - if self.given_msi or self.given_exe or self.given_cmd: - if self.current_prefix: - if self.flag_unknown_prefix: stderr.write("Autodetected unknown prefix.") - self.handler_launch() - else: stderr.write("Pywinery is unable to find a suitable prefix.%s" % linesep) - else: stderr.write("Nothing to do.%s" % linesep) - sys_exit(1) - else: - if self.flag_unknown_prefix: - dialog = self.xml.get_widget("dialog1") - if dialog.run() == 1: - self.current_prefix.memorize() - self.action_add_prefix(self.current_prefix) - else: self.current_prefix = None - dialog.hide() - gtk.gdk.threads_init() - self.guiStart() - self.xml.get_widget("window1").set_property("visible", True) - gtk.main() - - def initialize_combo(self): - combo = self.xml.get_widget("combobox1") - model = combo.get_model() - if self.initialized_combo: - model.clear() - for i in model: model.remove(i.iter) - else: - model = gtk.ListStore(gobject.TYPE_INT, gtk.gdk.Pixbuf, gobject.TYPE_STRING, gobject.TYPE_STRING) - model.set_sort_column_id(2, gtk.SORT_ASCENDING) - combo.set_model(model) - render = gtk.CellRendererPixbuf() - #render.set_property("alignment", pango.ALIGN_RIGHT) - combo.pack_start(render, False) - combo.add_attribute(render, 'pixbuf', 1) - - render = gtk.CellRendererText() - render.set_property("ellipsize-set", False) - render.set_property("alignment", pango.ALIGN_LEFT) - combo.pack_start(render, True) - combo.add_attribute(render, 'text', 2) - - render = gtk.CellRendererText() - render.set_property("ellipsize-set", pango.ELLIPSIZE_START) - render.set_property("weight", 300) - render.set_property("scale", 0.8) - #render.set_property("alignment", pango.ALIGN_RIGHT) - combo.pack_start(render, False) - combo.add_attribute(render, 'text', 3) - - self.initialized_combo = True - - names = dict((i,i["ww_name"] or path_split(i.path)[-1]) for i in self.prefixes) - names_values = names.values() - for i in self.prefixes: - model.append((id(i), None, names[i], - "%s" % path_split(i.path)[-1] - if names_values.count(names[i]) > 1 else "")) - - self.refresh_combo() - - def initialize_treeview(self): - tree = self.xml.get_widget("treeview1") - treeselection = tree.get_selection() - - model = tree.get_model() - if isinstance(model, gtk.TreeModelSort): - model = model.get_model() - if self.initialized_treeview: - model.clear() - for i in model: model.remove(i.iter) - else: - col = gtk.TreeViewColumn("prefix") - col_cell_img = gtk.CellRendererPixbuf() - col.pack_start(col_cell_img, False) - col.add_attribute(col_cell_img, "pixbuf", 1) - - col.set_sort_order(gtk.SORT_ASCENDING) - col.set_sort_column_id(0) - col_cell_text = gtk.CellRendererText() - col.pack_start(col_cell_text, False) - col.add_attribute(col_cell_text, "text", 0) - - col_cell_text2 = gtk.CellRendererText() - col_cell_text2.set_property("weight", 300) - col_cell_text2.set_property("scale", 0.8) - col_cell_text2.set_property("ellipsize-set", pango.ELLIPSIZE_START) - col.pack_start(col_cell_text2, False) - col.add_attribute(col_cell_text2, "text", 4) - - col_cell_text3 = gtk.CellRendererText() - col.pack_start(col_cell_text3, True) - col.add_attribute(col_cell_text3, "text", 6) - tree.append_column(col) - - model = gtk.TreeStore(str, gtk.gdk.Pixbuf, int, int, str, str, str) - sortmodel = gtk.TreeModelSort(model) - sortmodel.set_default_sort_func(self.default_treeview_sort) - tree.set_model(sortmodel) - treeselection.set_mode(gtk.SELECTION_SINGLE) - self.initialized_treeview = True - - treeselection.set_select_function(self.handler_treeselect) - - imgdir = tree.render_icon(stock_id="gtk-directory", size=gtk.ICON_SIZE_MENU, detail=None) - imgprefix = tree.render_icon(stock_id="gtk-harddisk", size=gtk.ICON_SIZE_MENU, detail=None) - imgexe = tree.render_icon(stock_id="gtk-execute", size=gtk.ICON_SIZE_MENU, detail=None) - imgerror = tree.render_icon(stock_id="gtk-dialog-error", size=gtk.ICON_SIZE_MENU, detail=None) - - names = dict((i, i["ww_name"] or path_split(i.path)[-1]) for i in self.prefixes) - names_values = names.values() - - # ( name, pixbuf, id, type, comment, path, comment ) - for i in self.prefixes: - broken = isinstance(i, BrokenPrefix) - known = i.known_executables - lk = len(known) - li = model.append( None, ( - names[i], - imgerror if broken else imgprefix, - id(i), - self.constant_treeview_broken_prefix - if broken else self.constant_treeview_prefix, - "%s" % path_split(i.path)[-1] - if names_values.count(names[i]) > 1 else "", - i.path, - "(%d application%s)" % (lk, "s" if lk > 1 else "") - if known else "" )) - for j in known: - broken = not isfile(j) - model.append(li, ( - path_split(j)[-1], - imgerror if broken else imgexe, - 0, - self.constant_treeview_broken_executable - if broken else self.constant_treeview_executable, - "", j, "" )) - self.refresh_treeview() - - def refresh_combo(self): - combo = self.xml.get_widget("combobox1") - - if self.initialized_combo: - if self.current_prefix is None: combo.set_active(-1) - else: - current_id = id(self.current_prefix) - for i in combo.get_model(): - if i[0] == current_id: - combo.set_active_iter(i.iter) - self.guiChange() - break - else: - self.initialize_combo() - - def refresh_treeview(self): - tree = self.xml.get_widget("treeview1") - selection = tree.get_selection() - - if self.initialized_treeview: - if self.current_prefix is None: selection.unselect_all() - else: - model = tree.get_model() - prefix_id = id(self.current_prefix) - for i in model: - if model.get_value(i.iter, 2) == prefix_id: - path = model.get_path(i.iter) - if not selection.iter_is_selected(i.iter): - selection.select_iter(i.iter) - tree.expand_row(path, True) - break - else: - self.initialize_treeview() - - def handler_iconview(self, iconview, path): - model = iconview.get_model() - command = model.get_value(model.get_iter(path), 2).tup - self.action_run_at_prefix(self.current_prefix, command) - - def handler_error(self, code=None, message=None): - if code == None: - self.xml.get_widget("errorbox").set_property("visible", False) - else: - self.xml.get_widget("labelerror").set_label(message) - self.xml.get_widget("errorbox").set_property("visible", True) - - def handler_launch(self, *args, **kwargs): - winepath = (self.current_prefix.winepath or self.default_winepath,) - if self.given_msi: command = winepath + ("msiexec", "/i") + self.given_msi - elif self.given_exe: - rpath = realpath(self.given_exe[0]) - if self.flag_remember: - self.current_prefix.add_known_executable(rpath) - else: - self.current_prefix.remove_known_executable(rpath) - command = winepath + self.given_exe - else: command = winepath + self.given_cmd - self.action_run_at_prefix(self.current_prefix, command) - self.handler_quit() - - def handler_show_treeview(self, *args, **kwargs): - self.refresh_treeview() - self.xml.get_widget("aspectframe1").set_property("visible", False) - self.xml.get_widget("hbox1").set_property("visible", True) - self.xml.get_widget("hbox3").set_property("visible", False) - - #while gtk.events_pending(): gtk.main_iteration() - - tree = self.xml.get_widget("treeview1") - model = tree.get_model() - prefix_id = id(self.current_prefix) - for i in model: - if model.get_value(i.iter, 2) == prefix_id: - tree.scroll_to_cell(model.get_path(i.iter), tree.get_column(0), True, 0, 0.5) - break - - def handler_show_combo(self, *args, **kwargs): - self.refresh_combo() - self.xml.get_widget("aspectframe1").set_property("visible", True) - self.xml.get_widget("hbox1").set_property("visible", False) - self.xml.get_widget("hbox3").set_property("visible", True) - - def handler_menu_newprefix(self, *args): - dialog = self.xml.get_widget("dialog2") - self.xml.get_widget("button5").set_property("visible", True) # add button - self.xml.get_widget("button7").set_property("visible", False) # ok button - #dialog.set_property("visible", True) - while True: # Repeat if not name is given - response = dialog.run() - dialog.hide() - if response == 1: - name = self.xml.get_widget("entry1").get_text().strip() - if name: - prefix = Prefix( - namer(expandvars( - "$HOME/.local/share/wineprefixes/%s" % name)), - self.default_prefix_config) - prefix.memorize() - prefix["ww_name"] = name - self.action_add_prefix(prefix) - self.guiPrefix() - break - else: break - - def handler_menu_addprefix(self, *args): - dialog1 = gtk.FileChooserDialog( - "Select prefix directory", - self.xml.get_widget("window1"), - gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER, - (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_ADD, gtk.RESPONSE_OK)) - dialog1.set_local_only(True) - while True: - response = dialog1.run() - dialog1.hide() - if response == gtk.RESPONSE_OK: - filename = dialog1.get_filename() - prefix = Prefix(abspath(filename), self.default_prefix_config) - dialog2 = self.xml.get_widget("dialog2") - self.xml.get_widget("button5").set_property("visible", True) # add button - self.xml.get_widget("button7").set_property("visible", False) # ok button - self.xml.get_widget("entry1").set_text(prefix["ww_name"] or path_split(filename)[-1]) - response = dialog2.run() - dialog2.hide() - if response == 1: - name = self.xml.get_widget("entry1").get_text() - if prefix["ww_name"] != name: prefix["ww_name"] = name - if prefix["ww_ignore"] != None: prefix["ww_ignore"] = None - prefix.memorize() - self.action_add_prefix(prefix) - self.guiPrefix() - break - else: break - dialog1.destroy() - - def handler_menu_addexe(self, *args): - fil = gtk.FileFilter() - fil.set_name("Windows executable") - fil.add_pattern("*.exe") - dialog1 = gtk.FileChooserDialog( - "Select executable or executables", - self.xml.get_widget("window1"), - gtk.FILE_CHOOSER_ACTION_OPEN, - (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_ADD, gtk.RESPONSE_OK)) - dialog1.set_local_only(True) - dialog1.set_select_multiple(True) - dialog1.add_filter(fil) - response = dialog1.run() - dialog1.hide() - if response == gtk.RESPONSE_OK: - - tree = self.xml.get_widget("treeview1") - model, items = tree.get_selection().get_selected_rows() - treeiter = model.get_iter(items[0]) - row_type = model.get_value(treeiter, 3) - prefix_id = None - if row_type == self.constant_treeview_prefix: - prefix_id = model.get_value(treeiter, 2) - elif row_type in (self.constant_treeview_broken_executable, - self.constant_treeview_executable): - prefix_id = model.get_value(model.iter_parent(treeiter), 2) - if prefix_id: - prefix = self.prefixes_by_id[prefix_id] - filenames = dialog1.get_filenames() - if filenames: - prefix.extend_known_executables(filenames) - self.guiExecutable() - dialog1.destroy() - - def handler_remember(self, *args): - self.flag_remember = self.xml.get_widget("checkbutton1").get_property("active") - - def handler_treebutton(self, widget, event): - tree = self.xml.get_widget("treeview1") - path_at_pos = tree.get_path_at_pos(int(event.x), int(event.y)) - if path_at_pos is None: - tree.get_selection().unselect_all() - self.current_prefix = None - self.guiChange() - if event.button == 3: - menu = "menu1" - disable = () - enable = () - if path_at_pos != None: - model = tree.get_model() - treeiter = model.get_iter(path_at_pos[0]) - treeselection = tree.get_selection() - if not treeselection.iter_is_selected(treeiter): - treeselection.select_iter(treeiter) - if treeiter: - a = model.get_value(treeiter, 3) - if a == self.constant_treeview_prefix: - menu = "menu2" - enable = ("menuitem10","menuitem13") - elif a == self.constant_treeview_broken_prefix: - menu = "menu2" - disable = ("menuitem10","menuitem13") - elif a == self.constant_treeview_executable: - menu = "menu3" - enable = ("menuitem14",) - elif a == self.constant_treeview_broken_executable: - menu = "menu3" - disable = ("menuitem14",) - for i in disable: - self.xml.get_widget(i).set_property("sensitive", False) - for i in enable: - self.xml.get_widget(i).set_property("sensitive", True) - self.xml.get_widget(menu).popup( None, None, None, event.button, event.time) - elif event.button == 1 and event.type == gtk.gdk._2BUTTON_PRESS: - if path_at_pos != None: - model = tree.get_model() - treeiter = model.get_iter(path_at_pos[0]) - #tree.get_selection().select_iter(treeiter) - if treeiter: - a = model.get_value(treeiter, 3) - if a == self.constant_treeview_prefix: - directory = model.get_value(treeiter, 5) - if islink(directory): directory = realpath(directory) - self.action_open_directory(directory) - elif a == self.constant_treeview_executable: - prefix = self.prefixes_by_id[model.get_value(model.iter_parent(treeiter), 2)] - self.action_run_at_prefix(prefix, ( - prefix.winepath or self.default_winepath, - model.get_value(treeiter, 5))) - - def handler_set_winepath(self, filechooserbutton): - winepath = filechooserbutton.get_filename() - if winepath: self.current_prefix.winepath = winepath - else: self.current_prefix.winepath = None - self.guiChange() - - def handler_reset_winepath(self, *args): - self.xml.get_widget("filechooserbutton1").unselect_all() - self.current_prefix["ww_wine"] = None - elf.guiChange() - - def handler_reset_winemenubuilder(self, *args): - self.xml.get_widget("checkbutton2").set_property("active", False) - - def handler_winemenubuilder_toggle(self, *args): - if self.current_prefix: - value = None - if self.xml.get_widget("checkbutton2").get_property("active"): - value = "1" - if value != self.current_prefix["ww_winemenubuilder_disable"]: - self.current_prefix["ww_winemenubuilder_disable"] = value - - def handler_treeselect(self, selection): - t = time() - if t - self.flag_treeview_click_time < 0.1: return True - self.flag_treeview_click_time = t - tree = self.xml.get_widget("treeview1") - model = tree.get_model() - selected = model.get_iter(selection) - a = model.get_value(selected, 3) - b = model.get_value(selected, 2) - if b == 0: self.current_prefix = None - else: self.current_prefix = self.prefixes_by_id[b] - self.guiChange() - return True - - def handler_menu_open_prefix(self, *args): - tree = self.xml.get_widget("treeview1") - model, items = tree.get_selection().get_selected_rows() - treeiter = model.get_iter(items[0]) - directory = model.get_value(treeiter, 5) - if islink(directory): directory = realpath(directory) - self.action_open_directory(directory) - - def handler_menu_run_executable(self, *args): - tree = self.xml.get_widget("treeview1") - model, items = tree.get_selection().get_selected_rows() - treeiter = model.get_iter(items[0]) - prefix = self.prefixes_by_id[model.get_value(model.iter_parent(treeiter), 2)] - self.action_run_at_prefix(prefix, ( - prefix.winepath or self.default_winepath, - model.get_value(treeiter, 5))) - - def handler_menu_rename_prefix(self, *args): - dialog = self.xml.get_widget("dialog2") - self.xml.get_widget("button5").set_property("visible", False) # add button - self.xml.get_widget("button7").set_property("visible", True) # ok button - tree = self.xml.get_widget("treeview1") - model, rows = tree.get_selection().get_selected_rows() - if len(rows) != 1: return - prefix = self.prefixes_by_id[model.get_value(model.get_iter(rows[0]), 2)] - default_name = path_split(prefix.path)[-1] - current_name = prefix["ww_name"] or default_name - while True: # Repeat if not name is given - self.xml.get_widget("entry1").set_text(current_name) - response = dialog.run() - dialog.hide() - if response == 1: - name = self.xml.get_widget("entry1").get_text().strip() - if name: - if name == default_name: prefix["ww_name"] = None - elif name != current_name: prefix["ww_name"] = name - self.guiPrefix() - break - else: break - - def handler_menu_remove_prefix(self, *args): - dialog = self.xml.get_widget("dialog3") - tree = self.xml.get_widget("treeview1") - model, items = tree.get_selection().get_selected_rows() - if len(items) == 1: - treeiter = model.get_iter(items[0]) - prefix = self.prefixes_by_id[model.get_value(treeiter, 2)] - self.xml.get_widget("radiobutton2").set_property("sensitive", not prefix.imported) - self.xml.get_widget("radiobutton1").set_property("active", True) - response = dialog.run() - dialog.set_property("visible", False) - - if response == 1: - if (self.xml.get_widget("radiobutton2").get_property("active") - and not self.xml.get_widget("radiobutton1").get_property("active")): - rmtree(prefix.path) - elif prefix.imported: - remove(prefix.path) - else: - prefix["ww_ignore"] = "1" - self.action_remove_prefix(prefix) - self.guiPrefix() - - def handler_menu_remove_executable(self, *args): - tree = self.xml.get_widget("treeview1") - model, items = tree.get_selection().get_selected_rows() - for i in items: - treeiter = model.get_iter(i) - treeiter_parent = model.iter_parent(treeiter) - prefix = self.prefixes_by_id[model.get_value(treeiter_parent, 2)] - prefix.remove_known_executable(model.get_value(treeiter, 5)) - self.guiPrefix() - - def handler_combo(self, *args): - combo = self.xml.get_widget("combobox1") - active = combo.get_active() - if active > -1: - prefix = self.prefixes_by_id[combo.get_model()[active][0]] - self.current_prefix = prefix - self.guiChange() - - def handler_quit(self,*args): - for i in self.killable_threads: killPopen(i) - if gtk.main_level() > 0: gtk.main_quit() - - def handler_delete_event(self, widget, *args): - widget.set_property("visible", False) - return gtk.TRUE - - def guiStart(self): - # Gui is started for first time (call this one once) - show = () - hide = () - if self.flag_mode_config: - show = ("button20",) # Close - self.handler_show_treeview() - elif self.given_msi: - show = ("button8", "button12") # Install, Cancel - self.handler_show_combo() - elif self.given_exe: - show = ("button1", "button12", "vbox15") # Launch, cancel, remember - self.handler_show_combo() - elif self.given_cmd: - show = ("button1", "button12") # Launch, cancel - self.handler_show_combo() - else: # Nothing given (configmode) - show = ("button20",) # Close - - self.handler_show_treeview() - - for i in show: self.xml.get_widget(i).set_property("visible", True) - for i in hide: self.xml.get_widget(i).set_property("visible", False) - - if self.flag_remember: - self.xml.get_widget("checkbutton1").set_property("active", True) - - self.xml.signal_autoconnect({ - "on_window1_destroy" : self.handler_quit, - "on_button12_clicked" : self.handler_quit, - "on_combobox1_changed" : self.handler_combo, - "on_button1_clicked" : self.handler_launch, - "on_button8_clicked" : self.handler_launch, - "on_button16_clicked" : self.handler_show_treeview, - "on_button2_clicked" : self.handler_show_combo, - "on_checkbutton1_toggled" : self.handler_remember, - "on_dialog1_delete_event" : self.handler_delete_event, - "on_dialog2_delete_event" : self.handler_delete_event, - "on_dialog3_delete_event" : self.handler_delete_event, - "on_iconview1_item_activated" : self.handler_iconview, - "on_treeview1_button_press_event" : self.handler_treebutton, - "on_menuitem1_activate" : self.handler_menu_newprefix, - "on_menuitem2_activate" : self.handler_menu_newprefix, - "on_menuitem6_activate" : self.handler_menu_newprefix, - "on_menuitem4_activate" : self.handler_menu_addprefix, - "on_menuitem5_activate" : self.handler_menu_addprefix, - "on_menuitem7_activate" : self.handler_menu_addprefix, - "on_menuitem10_activate" : self.handler_menu_addexe, - "on_menuitem11_activate" : self.handler_menu_addexe, - "on_menuitem15_activate" : self.handler_menu_open_prefix, - "on_menuitem14_activate" : self.handler_menu_run_executable, - "on_menuitem13_activate" : self.handler_menu_rename_prefix, - "on_menuitem3_activate" : self.handler_menu_remove_prefix, - "on_menuitem12_activate" : self.handler_menu_remove_executable, - "on_button3_clicked": self.handler_reset_winepath, - "on_button4_clicked": self.handler_reset_winemenubuilder, - "on_filechooserbutton1_file_set" : self.handler_set_winepath, - "on_checkbutton2_toggled" : self.handler_winemenubuilder_toggle, - }) - self.guiChange() - - def guiExecutable(self): - # Executable list is changed - self.initialize_treeview() - - def guiPrefix(self): - # Prefix list is changed - self.initialize_combo() - self.initialize_treeview() - - def guiChange(self): - # Gui is changed (current_prefix changed) - iconview = self.xml.get_widget("iconview1") - model = iconview.get_model() - if model: model.clear() - if self.current_prefix is None or isinstance(self.current_prefix, BrokenPrefix): - iconview.set_property("sensitive", False) - self.xml.get_widget("scrolledwindow3").set_property("sensitive", False) - else: - wineprefix = self.current_prefix.path - winepath = self.current_prefix.winepath or self.default_winepath - if model: toolModel(winepath, wineprefix, model) - else: - iconview.set_model(toolModel(winepath, wineprefix, model)) - iconview.set_pixbuf_column(0) - iconview.set_text_column(1) - iconview.set_property("sensitive", True) - self.xml.get_widget("scrolledwindow3").set_property("sensitive", True) - - # Prefix configuration - winepath = self.current_prefix.winepath - if winepath: - self.xml.get_widget("filechooserbutton1").set_filename(winepath) - else: - self.xml.get_widget("filechooserbutton1").unselect_all() - - self.xml.get_widget("checkbutton2").set_property("active", - self.current_prefix["ww_winemenubuilder_disable"] == "1") - - # Dialog buttons and error - error = None - if self.current_prefix: - show = True - winepath = self.current_prefix.winepath or self.default_winepath - if isinstance(self.current_prefix, BrokenPrefix): - error = "Selected prefix is unavailable." - show = False - elif not winepath or not checkBin(winepath): - error = "Wine binary not found on selected prefix." - show = False - else: - show = False - if error: - self.xml.get_widget("labelerror").set_label(error) - self.xml.get_widget("errorbox").set_property("visible", True) - else: - self.xml.get_widget("errorbox").set_property("visible", False) - self.xml.get_widget("button1").set_property("sensitive", show) # Launch - self.xml.get_widget("button8").set_property("sensitive", show) # Install - -if len(sys_argv)>1 and sys_argv[1] in ("--help","-h"): - print('''%s - an easy graphical tool for wineprefixing. - Usage: - pywinery [OPTIONS...] FILE [ARGs...] Execute command on with wine. - - Options: - -v, --version Prints Wine and Pywinery's version. - -x, --nogui Run with autodetected prefix if possible. - -d, --debug Show debug messages. - -c, --config Force run as configuration mode. - -h, --help Show this help. - ''' % sys_argv[0]) -elif len(sys_argv)>1 and sys_argv[1] in ("--version","-v"): - print("Pywinery %s, wine %s." % ( - ".".join(str(i) for i in __version__), - ".".join(str(i) for i in getWineVersion()) - )) -else: - if __name__ == "__main__": - app = Main(sys_argv) - app.run() diff --git a/branches/0.2/setup.py b/branches/0.2/setup.py deleted file mode 100755 index 9c5a2f9..0000000 --- a/branches/0.2/setup.py +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env python - -from distutils.core import setup - -setup(name = 'pywinery', - version = '0.2.1', - description = 'Wine prefix manager and launcher', - author = 'Spayder26', - author_email = '', - url = '', - license = 'GPLv3', - data_files = [ - ('/usr/share/pywinery',['gui.glade']), - ('/usr/share/icons/hicolor/scalable/apps',['pywinery.svg']), - ('/usr/share/applications',["pywinery.desktop"]) - ], - scripts = ['pywinery.py'] - ) diff --git a/branches/0.3/README.rst b/branches/0.3/README.rst deleted file mode 100644 index 8b13789..0000000 --- a/branches/0.3/README.rst +++ /dev/null @@ -1 +0,0 @@ - diff --git a/branches/0.3/debian/README.Debian b/branches/0.3/debian/README.Debian deleted file mode 100644 index 9aab1d1..0000000 --- a/branches/0.3/debian/README.Debian +++ /dev/null @@ -1,6 +0,0 @@ -pywinery for Debian -------------------- - - - - -- orpheus Mon, 16 Mar 2009 18:31:27 +0000 diff --git a/branches/0.3/debian/compat b/branches/0.3/debian/compat deleted file mode 100644 index 7f8f011..0000000 --- a/branches/0.3/debian/compat +++ /dev/null @@ -1 +0,0 @@ -7 diff --git a/branches/0.3/debian/copyright b/branches/0.3/debian/copyright deleted file mode 100644 index 81d8545..0000000 --- a/branches/0.3/debian/copyright +++ /dev/null @@ -1,33 +0,0 @@ -This package was debianized by Felipe A. Hernandez on -Wed, 07 Sep 2011 22:04:00 +0000. - -It was downloaded from - -Upstream Author(s): - - Felipe A. Hernandez - -Copyright: - - - -License: - - This program 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. - - This program 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 . - -The Debian packaging is (C) 2011, Felipe A. Hernandez and -is licensed under the GPL, see `/usr/share/common-licenses/GPL'. - -# Please also look if there are files or directories which have a -# different copyright/license attached and list them here. diff --git a/branches/0.3/debian/cron.d.ex b/branches/0.3/debian/cron.d.ex deleted file mode 100644 index ba9f760..0000000 --- a/branches/0.3/debian/cron.d.ex +++ /dev/null @@ -1,4 +0,0 @@ -# -# Regular cron jobs for the pywinery package -# -0 4 * * * root [ -x /usr/bin/pywinery_maintenance ] && /usr/bin/pywinery_maintenance diff --git a/branches/0.3/debian/dirs b/branches/0.3/debian/dirs deleted file mode 100644 index ca882bb..0000000 --- a/branches/0.3/debian/dirs +++ /dev/null @@ -1,2 +0,0 @@ -usr/bin -usr/sbin diff --git a/branches/0.3/debian/docs b/branches/0.3/debian/docs deleted file mode 100644 index e69de29..0000000 diff --git a/branches/0.3/debian/emacsen-install.ex b/branches/0.3/debian/emacsen-install.ex deleted file mode 100644 index 65e5230..0000000 --- a/branches/0.3/debian/emacsen-install.ex +++ /dev/null @@ -1,45 +0,0 @@ -#! /bin/sh -e -# /usr/lib/emacsen-common/packages/install/pywinery - -# Written by Jim Van Zandt , borrowing heavily -# from the install scripts for gettext by Santiago Vila -# and octave by Dirk Eddelbuettel . - -FLAVOR=$1 -PACKAGE=pywinery - -if [ ${FLAVOR} = emacs ]; then exit 0; fi - -echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR} - -#FLAVORTEST=`echo $FLAVOR | cut -c-6` -#if [ ${FLAVORTEST} = xemacs ] ; then -# SITEFLAG="-no-site-file" -#else -# SITEFLAG="--no-site-file" -#fi -FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile" - -ELDIR=/usr/share/emacs/site-lisp/${PACKAGE} -ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE} - -# Install-info-altdir does not actually exist. -# Maybe somebody will write it. -if test -x /usr/sbin/install-info-altdir; then - echo install/${PACKAGE}: install Info links for ${FLAVOR} - install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/share/info/${PACKAGE}.info.gz -fi - -install -m 755 -d ${ELCDIR} -cd ${ELDIR} -FILES=`echo *.el` -cp ${FILES} ${ELCDIR} -cd ${ELCDIR} - -cat << EOF > path.el -(setq load-path (cons "." load-path) byte-compile-warnings nil) -EOF -${FLAVOR} ${FLAGS} ${FILES} -rm -f *.el path.el - -exit 0 diff --git a/branches/0.3/debian/emacsen-remove.ex b/branches/0.3/debian/emacsen-remove.ex deleted file mode 100644 index 08c6bac..0000000 --- a/branches/0.3/debian/emacsen-remove.ex +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -e -# /usr/lib/emacsen-common/packages/remove/pywinery - -FLAVOR=$1 -PACKAGE=pywinery - -if [ ${FLAVOR} != emacs ]; then - if test -x /usr/sbin/install-info-altdir; then - echo remove/${PACKAGE}: removing Info links for ${FLAVOR} - install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/share/info/pywinery.info.gz - fi - - echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR} - rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE} -fi diff --git a/branches/0.3/debian/emacsen-startup.ex b/branches/0.3/debian/emacsen-startup.ex deleted file mode 100644 index d9503eb..0000000 --- a/branches/0.3/debian/emacsen-startup.ex +++ /dev/null @@ -1,25 +0,0 @@ -;; -*-emacs-lisp-*- -;; -;; Emacs startup file, e.g. /etc/emacs/site-start.d/50pywinery.el -;; for the Debian pywinery package -;; -;; Originally contributed by Nils Naumann -;; Modified by Dirk Eddelbuettel -;; Adapted for dh-make by Jim Van Zandt - -;; The pywinery package follows the Debian/GNU Linux 'emacsen' policy and -;; byte-compiles its elisp files for each 'emacs flavor' (emacs19, -;; xemacs19, emacs20, xemacs20...). The compiled code is then -;; installed in a subdirectory of the respective site-lisp directory. -;; We have to add this to the load-path: -(let ((package-dir (concat "/usr/share/" - (symbol-name flavor) - "/site-lisp/pywinery"))) -;; If package-dir does not exist, the pywinery package must have -;; removed but not purged, and we should skip the setup. - (when (file-directory-p package-dir) - (setq load-path (cons package-dir load-path)) - (autoload 'pywinery-mode "pywinery-mode" - "Major mode for editing pywinery files." t) - (add-to-list 'auto-mode-alist '("\\.pywinery$" . pywinery-mode)))) - diff --git a/branches/0.3/debian/init.d.ex b/branches/0.3/debian/init.d.ex deleted file mode 100644 index 16790de..0000000 --- a/branches/0.3/debian/init.d.ex +++ /dev/null @@ -1,157 +0,0 @@ -#! /bin/sh -# -# skeleton example file to build /etc/init.d/ scripts. -# This file should be used to construct scripts for /etc/init.d. -# -# Written by Miquel van Smoorenburg . -# Modified for Debian -# by Ian Murdock . -# Further changes by Javier Fernandez-Sanguino -# -# Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl -# - -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -DAEMON=/usr/sbin/pywinery -NAME=pywinery -DESC=pywinery - -test -x $DAEMON || exit 0 - -LOGDIR=/var/log/pywinery -PIDFILE=/var/run/$NAME.pid -DODTIME=1 # Time to wait for the server to die, in seconds - # If this value is set too low you might not - # let some servers to die gracefully and - # 'restart' will not work - -# Include pywinery defaults if available -if [ -f /etc/default/pywinery ] ; then - . /etc/default/pywinery -fi - -set -e - -running_pid() -{ - # Check if a given process pid's cmdline matches a given name - pid=$1 - name=$2 - [ -z "$pid" ] && return 1 - [ ! -d /proc/$pid ] && return 1 - cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1` - # Is this the expected child? - [ "$cmd" != "$name" ] && return 1 - return 0 -} - -running() -{ -# Check if the process is running looking at /proc -# (works for all users) - - # No pidfile, probably no daemon present - [ ! -f "$PIDFILE" ] && return 1 - # Obtain the pid and check it against the binary name - pid=`cat $PIDFILE` - running_pid $pid $DAEMON || return 1 - return 0 -} - -force_stop() { -# Forcefully kill the process - [ ! -f "$PIDFILE" ] && return - if running ; then - kill -15 $pid - # Is it really dead? - [ -n "$DODTIME" ] && sleep "$DODTIME"s - if running ; then - kill -9 $pid - [ -n "$DODTIME" ] && sleep "$DODTIME"s - if running ; then - echo "Cannot kill $LABEL (pid=$pid)!" - exit 1 - fi - fi - fi - rm -f $PIDFILE - return 0 -} - -case "$1" in - start) - echo -n "Starting $DESC: " - start-stop-daemon --start --quiet --pidfile $PIDFILE \ - --exec $DAEMON -- $DAEMON_OPTS - if running ; then - echo "$NAME." - else - echo " ERROR." - fi - ;; - stop) - echo -n "Stopping $DESC: " - start-stop-daemon --stop --quiet --pidfile $PIDFILE \ - --exec $DAEMON - echo "$NAME." - ;; - force-stop) - echo -n "Forcefully stopping $DESC: " - force_stop - if ! running ; then - echo "$NAME." - else - echo " ERROR." - fi - ;; - #reload) - # - # If the daemon can reload its config files on the fly - # for example by sending it SIGHUP, do it here. - # - # If the daemon responds to changes in its config file - # directly anyway, make this a do-nothing entry. - # - # echo "Reloading $DESC configuration files." - # start-stop-daemon --stop --signal 1 --quiet --pidfile \ - # /var/run/$NAME.pid --exec $DAEMON - #;; - force-reload) - # - # If the "reload" option is implemented, move the "force-reload" - # option to the "reload" entry above. If not, "force-reload" is - # just the same as "restart" except that it does nothing if the - # daemon isn't already running. - # check wether $DAEMON is running. If so, restart - start-stop-daemon --stop --test --quiet --pidfile \ - /var/run/$NAME.pid --exec $DAEMON \ - && $0 restart \ - || exit 0 - ;; - restart) - echo -n "Restarting $DESC: " - start-stop-daemon --stop --quiet --pidfile \ - /var/run/$NAME.pid --exec $DAEMON - [ -n "$DODTIME" ] && sleep $DODTIME - start-stop-daemon --start --quiet --pidfile \ - /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS - echo "$NAME." - ;; - status) - echo -n "$LABEL is " - if running ; then - echo "running" - else - echo " not running." - exit 1 - fi - ;; - *) - N=/etc/init.d/$NAME - # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 - echo "Usage: $N {start|stop|restart|force-reload|status|force-stop}" >&2 - exit 1 - ;; -esac - -exit 0 diff --git a/branches/0.3/debian/init.d.lsb.ex b/branches/0.3/debian/init.d.lsb.ex deleted file mode 100644 index 40a28d5..0000000 --- a/branches/0.3/debian/init.d.lsb.ex +++ /dev/null @@ -1,296 +0,0 @@ -#!/bin/sh -# -# Example init.d script with LSB support. -# -# Please read this init.d carefully and modify the sections to -# adjust it to the program you want to run. -# -# Copyright (c) 2007 Javier Fernandez-Sanguino -# -# This is free software; you may redistribute it and/or modify -# it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2, -# or (at your option) any later version. -# -# This 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 with -# the Debian operating system, in /usr/share/common-licenses/GPL; if -# not, write to the Free Software Foundation, Inc., 59 Temple Place, -# Suite 330, Boston, MA 02111-1307 USA -# -### BEGIN INIT INFO -# Provides: pywinery -# Required-Start: $network $local_fs -# Required-Stop: -# Should-Start: $named -# Should-Stop: -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: -# Description: -# <...> -# <...> -### END INIT INFO - -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin - -DAEMON=/usr/sbin/pywinery # Introduce the server's location here -NAME=#PACKAGE # Introduce the short server's name here -DESC=#PACKAGE # Introduce a short description here -LOGDIR=/var/log/pywinery # Log directory to use - -PIDFILE=/var/run/$NAME.pid - -test -x $DAEMON || exit 0 - -. /lib/lsb/init-functions - -# Default options, these can be overriden by the information -# at /etc/default/$NAME -DAEMON_OPTS="" # Additional options given to the server - -DIETIME=10 # Time to wait for the server to die, in seconds - # If this value is set too low you might not - # let some servers to die gracefully and - # 'restart' will not work - -#STARTTIME=2 # Time to wait for the server to start, in seconds - # If this value is set each time the server is - # started (on start or restart) the script will - # stall to try to determine if it is running - # If it is not set and the server takes time - # to setup a pid file the log message might - # be a false positive (says it did not start - # when it actually did) - -LOGFILE=$LOGDIR/$NAME.log # Server logfile -#DAEMONUSER=pywinery # Users to run the daemons as. If this value - # is set start-stop-daemon will chuid the server - -# Include defaults if available -if [ -f /etc/default/$NAME ] ; then - . /etc/default/$NAME -fi - -# Use this if you want the user to explicitly set 'RUN' in -# /etc/default/ -#if [ "x$RUN" != "xyes" ] ; then -# log_failure_msg "$NAME disabled, please adjust the configuration to your needs " -# log_failure_msg "and then set RUN to 'yes' in /etc/default/$NAME to enable it." -# exit 1 -#fi - -# Check that the user exists (if we set a user) -# Does the user exist? -if [ -n "$DAEMONUSER" ] ; then - if getent passwd | grep -q "^$DAEMONUSER:"; then - # Obtain the uid and gid - DAEMONUID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $3}'` - DAEMONGID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $4}'` - else - log_failure_msg "The user $DAEMONUSER, required to run $NAME does not exist." - exit 1 - fi -fi - - -set -e - -running_pid() { -# Check if a given process pid's cmdline matches a given name - pid=$1 - name=$2 - [ -z "$pid" ] && return 1 - [ ! -d /proc/$pid ] && return 1 - cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1` - # Is this the expected server - [ "$cmd" != "$name" ] && return 1 - return 0 -} - -running() { -# Check if the process is running looking at /proc -# (works for all users) - - # No pidfile, probably no daemon present - [ ! -f "$PIDFILE" ] && return 1 - pid=`cat $PIDFILE` - running_pid $pid $DAEMON || return 1 - return 0 -} - -start_server() { -# Start the process using the wrapper - if [ -z "$DAEMONUSER" ] ; then - start_daemon -p $PIDFILE $DAEMON -- $DAEMON_OPTS - errcode=$? - else -# if we are using a daemonuser then change the user id - start-stop-daemon --start --quiet --pidfile $PIDFILE \ - --chuid $DAEMONUSER \ - --exec $DAEMON -- $DAEMON_OPTS - errcode=$? - fi - return $errcode -} - -stop_server() { -# Stop the process using the wrapper - if [ -z "$DAEMONUSER" ] ; then - killproc -p $PIDFILE $DAEMON - errcode=$? - else -# if we are using a daemonuser then look for process that match - start-stop-daemon --stop --quiet --pidfile $PIDFILE \ - --user $DAEMONUSER \ - --exec $DAEMON - errcode=$? - fi - - return $errcode -} - -reload_server() { - [ ! -f "$PIDFILE" ] && return 1 - pid=pidofproc $PIDFILE # This is the daemon's pid - # Send a SIGHUP - kill -1 $pid - return $? -} - -force_stop() { -# Force the process to die killing it manually - [ ! -e "$PIDFILE" ] && return - if running ; then - kill -15 $pid - # Is it really dead? - sleep "$DIETIME"s - if running ; then - kill -9 $pid - sleep "$DIETIME"s - if running ; then - echo "Cannot kill $NAME (pid=$pid)!" - exit 1 - fi - fi - fi - rm -f $PIDFILE -} - - -case "$1" in - start) - log_daemon_msg "Starting $DESC " "$NAME" - # Check if it's running first - if running ; then - log_progress_msg "apparently already running" - log_end_msg 0 - exit 0 - fi - if start_server ; then - # NOTE: Some servers might die some time after they start, - # this code will detect this issue if STARTTIME is set - # to a reasonable value - [ -n "$STARTTIME" ] && sleep $STARTTIME # Wait some time - if running ; then - # It's ok, the server started and is running - log_end_msg 0 - else - # It is not running after we did start - log_end_msg 1 - fi - else - # Either we could not start it - log_end_msg 1 - fi - ;; - stop) - log_daemon_msg "Stopping $DESC" "$NAME" - if running ; then - # Only stop the server if we see it running - errcode=0 - stop_server || errcode=$? - log_end_msg $errcode - else - # If it's not running don't do anything - log_progress_msg "apparently not running" - log_end_msg 0 - exit 0 - fi - ;; - force-stop) - # First try to stop gracefully the program - $0 stop - if running; then - # If it's still running try to kill it more forcefully - log_daemon_msg "Stopping (force) $DESC" "$NAME" - errcode=0 - force_stop || errcode=$? - log_end_msg $errcode - fi - ;; - restart|force-reload) - log_daemon_msg "Restarting $DESC" "$NAME" - errcode=0 - stop_server || errcode=$? - # Wait some sensible amount, some server need this - [ -n "$DIETIME" ] && sleep $DIETIME - start_server || errcode=$? - [ -n "$STARTTIME" ] && sleep $STARTTIME - running || errcode=$? - log_end_msg $errcode - ;; - status) - - log_daemon_msg "Checking status of $DESC" "$NAME" - if running ; then - log_progress_msg "running" - log_end_msg 0 - else - log_progress_msg "apparently not running" - log_end_msg 1 - exit 1 - fi - ;; - # Use this if the daemon cannot reload - reload) - log_warning_msg "Reloading $NAME daemon: not implemented, as the daemon" - log_warning_msg "cannot re-read the config file (use restart)." - ;; - # And this if it cann - #reload) - # - # If the daemon can reload its config files on the fly - # for example by sending it SIGHUP, do it here. - # - # If the daemon responds to changes in its config file - # directly anyway, make this a do-nothing entry. - # - # log_daemon_msg "Reloading $DESC configuration files" "$NAME" - # if running ; then - # reload_server - # if ! running ; then - # Process died after we tried to reload - # log_progress_msg "died on reload" - # log_end_msg 1 - # exit 1 - # fi - # else - # log_progress_msg "server is not running" - # log_end_msg 1 - # exit 1 - # fi - #;; - - *) - N=/etc/init.d/$NAME - echo "Usage: $N {start|stop|force-stop|restart|force-reload|status}" >&2 - exit 1 - ;; -esac - -exit 0 diff --git a/branches/0.3/debian/manpage.1.ex b/branches/0.3/debian/manpage.1.ex deleted file mode 100644 index 68a7588..0000000 --- a/branches/0.3/debian/manpage.1.ex +++ /dev/null @@ -1,59 +0,0 @@ -.\" Hey, EMACS: -*- nroff -*- -.\" First parameter, NAME, should be all caps -.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection -.\" other parameters are allowed: see man(7), man(1) -.TH PYWINERY SECTION "March 16, 2009" -.\" Please adjust this date whenever revising the manpage. -.\" -.\" Some roff macros, for reference: -.\" .nh disable hyphenation -.\" .hy enable hyphenation -.\" .ad l left justify -.\" .ad b justify to both left and right margins -.\" .nf disable filling -.\" .fi enable filling -.\" .br insert line break -.\" .sp insert n+1 empty lines -.\" for manpage-specific macros, see man(7) -.SH NAME -pywinery \- program to do something -.SH SYNOPSIS -.B pywinery -.RI [ options ] " files" ... -.br -.B bar -.RI [ options ] " files" ... -.SH DESCRIPTION -This manual page documents briefly the -.B pywinery -and -.B bar -commands. -.PP -.\" TeX users may be more comfortable with the \fB\fP and -.\" \fI\fP escape sequences to invode bold face and italics, -.\" respectively. -\fBpywinery\fP is a program that... -.SH OPTIONS -These programs follow the usual GNU command line syntax, with long -options starting with two dashes (`-'). -A summary of options is included below. -For a complete description, see the Info files. -.TP -.B \-h, \-\-help -Show summary of options. -.TP -.B \-v, \-\-version -Show version of program. -.SH SEE ALSO -.BR bar (1), -.BR baz (1). -.br -The programs are documented fully by -.IR "The Rise and Fall of a Fooish Bar" , -available via the Info system. -.SH AUTHOR -pywinery was written by . -.PP -This manual page was written by orpheus , -for the Debian project (but may be used by others). diff --git a/branches/0.3/debian/manpage.sgml.ex b/branches/0.3/debian/manpage.sgml.ex deleted file mode 100644 index 7a6d499..0000000 --- a/branches/0.3/debian/manpage.sgml.ex +++ /dev/null @@ -1,156 +0,0 @@ - manpage.1'. You may view - the manual page with: `docbook-to-man manpage.sgml | nroff -man | - less'. A typical entry in a Makefile or Makefile.am is: - -manpage.1: manpage.sgml - docbook-to-man $< > $@ - - - The docbook-to-man binary is found in the docbook-to-man package. - Please remember that if you create the nroff version in one of the - debian/rules file targets (such as build), you will need to include - docbook-to-man in your Build-Depends control field. - - --> - - - FIRSTNAME"> - SURNAME"> - - March 16, 2009"> - - SECTION"> - orpheus@unknown"> - - PYWINERY"> - - - Debian"> - GNU"> - GPL"> -]> - - - -
- &dhemail; -
- - &dhfirstname; - &dhsurname; - - - 2003 - &dhusername; - - &dhdate; -
- - &dhucpackage; - - &dhsection; - - - &dhpackage; - - program to do something - - - - &dhpackage; - - - - - - - - DESCRIPTION - - This manual page documents briefly the - &dhpackage; and bar - commands. - - This manual page was written for the &debian; distribution - because the original program does not have a manual page. - Instead, it has documentation in the &gnu; - Info format; see below. - - &dhpackage; is a program that... - - - - OPTIONS - - These programs follow the usual &gnu; command line syntax, - with long options starting with two dashes (`-'). A summary of - options is included below. For a complete description, see the - Info files. - - - - - - - - Show summary of options. - - - - - - - - Show version of program. - - - - - - SEE ALSO - - bar (1), baz (1). - - The programs are documented fully by The Rise and - Fall of a Fooish Bar available via the - Info system. - - - AUTHOR - - This manual page was written by &dhusername; &dhemail; for - the &debian; system (but may be used by others). Permission is - granted to copy, distribute and/or modify this document under - the terms of the &gnu; General Public License, Version 2 any - later version published by the Free Software Foundation. - - - On Debian systems, the complete text of the GNU General Public - License can be found in /usr/share/common-licenses/GPL. - - - -
- - - - diff --git a/branches/0.3/debian/manpage.xml.ex b/branches/0.3/debian/manpage.xml.ex deleted file mode 100644 index 3d97346..0000000 --- a/branches/0.3/debian/manpage.xml.ex +++ /dev/null @@ -1,291 +0,0 @@ - -.
will be generated. You may view the -manual page with: nroff -man .
| less'. A typical entry -in a Makefile or Makefile.am is: - -DB2MAN = /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl -XP = xsltproc -''-nonet -''-param man.charmap.use.subset "0" - -manpage.1: manpage.xml - $(XP) $(DB2MAN) $< - -The xsltproc binary is found in the xsltproc package. The XSL files are in -docbook-xsl. A description of the parameters you can use can be found in the -docbook-xsl-doc-* packages. Please remember that if you create the nroff -version in one of the debian/rules file targets (such as build), you will need -to include xsltproc and docbook-xsl in your Build-Depends control field. -Alternatively use the xmlto command/package. That will also automatically -pull in xsltproc and docbook-xsl. - -Notes for using docbook2x: docbook2x-man does not automatically create the -AUTHOR(S) and COPYRIGHT sections. In this case, please add them manually as - ... . - -To disable the automatic creation of the AUTHOR(S) and COPYRIGHT sections -read /usr/share/doc/docbook-xsl/doc/manpages/authors.html. This file can be -found in the docbook-xsl-doc-html package. - -Validation can be done using: `xmllint -''-noout -''-valid manpage.xml` - -General documentation about man-pages and man-page-formatting: -man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/ - ---> - - - - - - - - - - - - - -]> - - - - &dhtitle; - &dhpackage; - - - &dhfirstname; - &dhsurname; - Wrote this manpage for the Debian system. -
- &dhemail; -
-
-
- - 2007 - &dhusername; - - - This manual page was written for the Debian system - (but may be used by others). - Permission is granted to copy, distribute and/or modify this - document under the terms of the GNU General Public License, - Version 2 or (at your option) any later version published by - the Free Software Foundation. - On Debian systems, the complete text of the GNU General Public - License can be found in - /usr/share/common-licenses/GPL. - -
- - &dhucpackage; - &dhsection; - - - &dhpackage; - program to do something - - - - &dhpackage; - - - - - - - - - this - - - - - - - - this - that - - - - - &dhpackage; - - - - - - - - - - - - - - - - - - - DESCRIPTION - This manual page documents briefly the - &dhpackage; and bar - commands. - This manual page was written for the Debian distribution - because the original program does not have a manual page. - Instead, it has documentation in the GNU - info - 1 - format; see below. - &dhpackage; is a program that... - - - OPTIONS - The program follows the usual GNU command line syntax, - with long options starting with two dashes (`-'). A summary of - options is included below. For a complete description, see the - - info - 1 - files. - - - - - - - Does this and that. - - - - - - - Show summary of options. - - - - - - - Show version of program. - - - - - - FILES - - - /etc/foo.conf - - The system-wide configuration file to control the - behaviour of &dhpackage;. See - - foo.conf - 5 - for further details. - - - - ${HOME}/.foo.conf - - The per-user configuration file to control the - behaviour of &dhpackage;. See - - foo.conf - 5 - for further details. - - - - - - ENVIONMENT - - - FOO_CONF - - If used, the defined file is used as configuration - file (see also ). - - - - - - DIAGNOSTICS - The following diagnostics may be issued - on stderr: - - - Bad configuration file. Exiting. - - The configuration file seems to contain a broken configuration - line. Use the option, to get more info. - - - - - &dhpackage; provides some return codes, that can - be used in scripts: - - Code - Diagnostic - - 0 - Program exited successfully. - - - 1 - The configuration file seems to be broken. - - - - - - BUGS - The program is currently limited to only work - with the foobar library. - The upstreams BTS can be found - at . - - - SEE ALSO - - - bar - 1 - , - baz - 1 - , - foo.conf - 5 - - The programs are documented fully by The Rise and - Fall of a Fooish Bar available via the - info - 1 - system. - -
- diff --git a/branches/0.3/debian/menu.ex b/branches/0.3/debian/menu.ex deleted file mode 100644 index e891b25..0000000 --- a/branches/0.3/debian/menu.ex +++ /dev/null @@ -1,2 +0,0 @@ -?package(pywinery):needs="X11|text|vc|wm" section="Applications/see-menu-manual"\ - title="pywinery" command="/usr/bin/pywinery" diff --git a/branches/0.3/debian/postinst.ex b/branches/0.3/debian/postinst.ex deleted file mode 100644 index a156a50..0000000 --- a/branches/0.3/debian/postinst.ex +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -# postinst script for pywinery -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `configure' -# * `abort-upgrade' -# * `abort-remove' `in-favour' -# -# * `abort-remove' -# * `abort-deconfigure' `in-favour' -# `removing' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - configure) - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - ;; - - *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 - - diff --git a/branches/0.3/debian/postrm.ex b/branches/0.3/debian/postrm.ex deleted file mode 100644 index 669dde1..0000000 --- a/branches/0.3/debian/postrm.ex +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -# postrm script for pywinery -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `remove' -# * `purge' -# * `upgrade' -# * `failed-upgrade' -# * `abort-install' -# * `abort-install' -# * `abort-upgrade' -# * `disappear' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) - ;; - - *) - echo "postrm called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 - - diff --git a/branches/0.3/debian/preinst.ex b/branches/0.3/debian/preinst.ex deleted file mode 100644 index 087ec53..0000000 --- a/branches/0.3/debian/preinst.ex +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh -# preinst script for pywinery -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `install' -# * `install' -# * `upgrade' -# * `abort-upgrade' -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - install|upgrade) - ;; - - abort-upgrade) - ;; - - *) - echo "preinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 - - diff --git a/branches/0.3/debian/prerm.ex b/branches/0.3/debian/prerm.ex deleted file mode 100644 index 40c1e20..0000000 --- a/branches/0.3/debian/prerm.ex +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -# prerm script for pywinery -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `remove' -# * `upgrade' -# * `failed-upgrade' -# * `remove' `in-favour' -# * `deconfigure' `in-favour' -# `removing' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - remove|upgrade|deconfigure) - ;; - - failed-upgrade) - ;; - - *) - echo "prerm called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 - - diff --git a/branches/0.3/debian/pywinery.default.ex b/branches/0.3/debian/pywinery.default.ex deleted file mode 100644 index b25b826..0000000 --- a/branches/0.3/debian/pywinery.default.ex +++ /dev/null @@ -1,10 +0,0 @@ -# Defaults for pywinery initscript -# sourced by /etc/init.d/pywinery -# installed at /etc/default/pywinery by the maintainer scripts - -# -# This is a POSIX shell fragment -# - -# Additional options that are passed to the Daemon. -DAEMON_OPTS="" diff --git a/branches/0.3/debian/pywinery.doc-base.EX b/branches/0.3/debian/pywinery.doc-base.EX deleted file mode 100644 index 2d3509a..0000000 --- a/branches/0.3/debian/pywinery.doc-base.EX +++ /dev/null @@ -1,22 +0,0 @@ -Document: pywinery -Title: Debian pywinery Manual -Author: -Abstract: This manual describes what pywinery is - and how it can be used to - manage online manuals on Debian systems. -Section: unknown - -Format: debiandoc-sgml -Files: /usr/share/doc/pywinery/pywinery.sgml.gz - -Format: postscript -Files: /usr/share/doc/pywinery/pywinery.ps.gz - -Format: text -Files: /usr/share/doc/pywinery/pywinery.text.gz - -Format: HTML -Index: /usr/share/doc/pywinery/html/index.html -Files: /usr/share/doc/pywinery/html/*.html - - diff --git a/branches/0.3/debian/watch.ex b/branches/0.3/debian/watch.ex deleted file mode 100644 index ec9eb7e..0000000 --- a/branches/0.3/debian/watch.ex +++ /dev/null @@ -1,23 +0,0 @@ -# Example watch control file for uscan -# Rename this file to "watch" and then you can run the "uscan" command -# to check for upstream updates and more. -# See uscan(1) for format - -# Compulsory line, this is a version 3 file -version=3 - -# Uncomment to examine a Webpage -# -#http://www.example.com/downloads.php pywinery-(.*)\.tar\.gz - -# Uncomment to examine a Webserver directory -#http://www.example.com/pub/pywinery-(.*)\.tar\.gz - -# Uncommment to examine a FTP server -#ftp://ftp.example.com/pub/pywinery-(.*)\.tar\.gz debian uupdate - -# Uncomment to find new files on sourceforge, for devscripts >= 2.9 -# http://sf.net/pywinery/pywinery-(.*)\.tar\.gz - -# Uncomment to find new files on GooglePages -# http://example.googlepages.com/foo.html pywinery-(.*)\.tar\.gz diff --git a/branches/0.3/pywinery/pywinery.svg b/branches/0.3/pywinery/pywinery.svg deleted file mode 100755 index cf8efe2..0000000 --- a/branches/0.3/pywinery/pywinery.svg +++ /dev/null @@ -1,1005 +0,0 @@ - - - - - PyWinery tango icon - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - PyWinery tango icon - 2011.09.09 - - - Felipe A. Hernandez - - - - - - - - Barrel with a wine glass. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/0.1/debian/README.Debian b/debian/README.Debian similarity index 100% rename from branches/0.1/debian/README.Debian rename to debian/README.Debian diff --git a/branches/0.3/debian/changelog b/debian/changelog similarity index 100% rename from branches/0.3/debian/changelog rename to debian/changelog diff --git a/branches/0.1/debian/compat b/debian/compat similarity index 100% rename from branches/0.1/debian/compat rename to debian/compat diff --git a/branches/0.3/debian/control b/debian/control similarity index 100% rename from branches/0.3/debian/control rename to debian/control diff --git a/branches/0.2/debian/copyright b/debian/copyright similarity index 100% rename from branches/0.2/debian/copyright rename to debian/copyright diff --git a/branches/0.1/debian/cron.d.ex b/debian/cron.d.ex similarity index 100% rename from branches/0.1/debian/cron.d.ex rename to debian/cron.d.ex diff --git a/branches/0.1/debian/dirs b/debian/dirs similarity index 100% rename from branches/0.1/debian/dirs rename to debian/dirs diff --git a/branches/0.1/debian/docs b/debian/docs similarity index 100% rename from branches/0.1/debian/docs rename to debian/docs diff --git a/branches/0.1/debian/emacsen-install.ex b/debian/emacsen-install.ex similarity index 100% rename from branches/0.1/debian/emacsen-install.ex rename to debian/emacsen-install.ex diff --git a/branches/0.1/debian/emacsen-remove.ex b/debian/emacsen-remove.ex similarity index 100% rename from branches/0.1/debian/emacsen-remove.ex rename to debian/emacsen-remove.ex diff --git a/branches/0.1/debian/emacsen-startup.ex b/debian/emacsen-startup.ex similarity index 100% rename from branches/0.1/debian/emacsen-startup.ex rename to debian/emacsen-startup.ex diff --git a/branches/0.3/debian/files b/debian/files similarity index 100% rename from branches/0.3/debian/files rename to debian/files diff --git a/branches/0.1/debian/init.d.ex b/debian/init.d.ex similarity index 100% rename from branches/0.1/debian/init.d.ex rename to debian/init.d.ex diff --git a/branches/0.1/debian/init.d.lsb.ex b/debian/init.d.lsb.ex similarity index 100% rename from branches/0.1/debian/init.d.lsb.ex rename to debian/init.d.lsb.ex diff --git a/branches/0.1/debian/manpage.1.ex b/debian/manpage.1.ex similarity index 100% rename from branches/0.1/debian/manpage.1.ex rename to debian/manpage.1.ex diff --git a/branches/0.1/debian/manpage.sgml.ex b/debian/manpage.sgml.ex similarity index 100% rename from branches/0.1/debian/manpage.sgml.ex rename to debian/manpage.sgml.ex diff --git a/branches/0.1/debian/manpage.xml.ex b/debian/manpage.xml.ex similarity index 100% rename from branches/0.1/debian/manpage.xml.ex rename to debian/manpage.xml.ex diff --git a/branches/0.1/debian/menu.ex b/debian/menu.ex similarity index 100% rename from branches/0.1/debian/menu.ex rename to debian/menu.ex diff --git a/branches/0.3/debian/postinst b/debian/postinst similarity index 100% rename from branches/0.3/debian/postinst rename to debian/postinst diff --git a/branches/0.1/debian/postinst.ex b/debian/postinst.ex similarity index 100% rename from branches/0.1/debian/postinst.ex rename to debian/postinst.ex diff --git a/branches/0.1/debian/postrm.ex b/debian/postrm.ex similarity index 100% rename from branches/0.1/debian/postrm.ex rename to debian/postrm.ex diff --git a/branches/0.1/debian/preinst.ex b/debian/preinst.ex similarity index 100% rename from branches/0.1/debian/preinst.ex rename to debian/preinst.ex diff --git a/branches/0.1/debian/prerm.ex b/debian/prerm.ex similarity index 100% rename from branches/0.1/debian/prerm.ex rename to debian/prerm.ex diff --git a/branches/0.1/debian/pywinery.default.ex b/debian/pywinery.default.ex similarity index 100% rename from branches/0.1/debian/pywinery.default.ex rename to debian/pywinery.default.ex diff --git a/branches/0.1/debian/pywinery.doc-base.EX b/debian/pywinery.doc-base.EX similarity index 100% rename from branches/0.1/debian/pywinery.doc-base.EX rename to debian/pywinery.doc-base.EX diff --git a/branches/0.3/debian/pywinery.postinst.debhelper b/debian/pywinery.postinst.debhelper similarity index 100% rename from branches/0.3/debian/pywinery.postinst.debhelper rename to debian/pywinery.postinst.debhelper diff --git a/branches/0.3/debian/pywinery.prerm.debhelper b/debian/pywinery.prerm.debhelper similarity index 100% rename from branches/0.3/debian/pywinery.prerm.debhelper rename to debian/pywinery.prerm.debhelper diff --git a/branches/0.3/debian/rules b/debian/rules similarity index 100% rename from branches/0.3/debian/rules rename to debian/rules diff --git a/branches/0.1/debian/watch.ex b/debian/watch.ex similarity index 100% rename from branches/0.1/debian/watch.ex rename to debian/watch.ex diff --git a/branches/0.3/locale/es/LC_MESSAGES/pywinery.mo b/locale/es/LC_MESSAGES/pywinery.mo similarity index 100% rename from branches/0.3/locale/es/LC_MESSAGES/pywinery.mo rename to locale/es/LC_MESSAGES/pywinery.mo diff --git a/branches/0.3/locale/es/LC_MESSAGES/pywinery.po b/locale/es/LC_MESSAGES/pywinery.po similarity index 100% rename from branches/0.3/locale/es/LC_MESSAGES/pywinery.po rename to locale/es/LC_MESSAGES/pywinery.po diff --git a/branches/0.3/pywinery.desktop b/pywinery.desktop similarity index 100% rename from branches/0.3/pywinery.desktop rename to pywinery.desktop diff --git a/branches/0.3/pywinery/__init__.py b/pywinery/__init__.py similarity index 99% rename from branches/0.3/pywinery/__init__.py rename to pywinery/__init__.py index 41f11b4..c25d8fe 100755 --- a/branches/0.3/pywinery/__init__.py +++ b/pywinery/__init__.py @@ -37,6 +37,8 @@ import math import shutil +import gi +gi.require_version('Gtk', '3.0') from gi.repository import Gtk, Gdk, GLib, Gio, GdkPixbuf, GObject py3k = sys.version > '3' diff --git a/branches/0.3/pywinery/__main__.py b/pywinery/__main__.py similarity index 100% rename from branches/0.3/pywinery/__main__.py rename to pywinery/__main__.py diff --git a/branches/0.3/pywinery/gui.glade b/pywinery/gui.glade similarity index 100% rename from branches/0.3/pywinery/gui.glade rename to pywinery/gui.glade diff --git a/branches/0.2/pywinery.svg b/pywinery/pywinery.svg similarity index 100% rename from branches/0.2/pywinery.svg rename to pywinery/pywinery.svg diff --git a/branches/0.3/scripts/pywinery b/scripts/pywinery similarity index 100% rename from branches/0.3/scripts/pywinery rename to scripts/pywinery diff --git a/branches/0.3/setup.py b/setup.py similarity index 100% rename from branches/0.3/setup.py rename to setup.py diff --git a/tools/compile_trunk_locales.sh b/tools/compile_trunk_locales.sh index 4ccb3fb..0c0fcd3 100755 --- a/tools/compile_trunk_locales.sh +++ b/tools/compile_trunk_locales.sh @@ -1,13 +1,13 @@ #!/usr/bin/env bash dir=`dirname $0` -localedir="$dir/../trunk/locale" +localedir="$dir/locale" domain="pywinery" for i in "$localedir/*"; do podir="`echo $i`" - echo -n "Compiling locale in $podir " + echo -n "Compiling locale in $podir " msgfmt "$podir/LC_MESSAGES/$domain.po" -o "$podir/LC_MESSAGES/$domain.mo" echo " [ DONE ]" diff --git a/tools/generate_trunk_locale_templates.sh b/tools/generate_trunk_locale_templates.sh index 71e1cba..9841e22 100755 --- a/tools/generate_trunk_locale_templates.sh +++ b/tools/generate_trunk_locale_templates.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash dir=`dirname $0` -localedir="$dir/../trunk/locale" -gladefile="$dir/../trunk/gui.glade" -echo -n "Generating locale template in $podir " +localedir="$dir/locale" +gladefile="$dir/gui.glade" +echo -n "Generating locale template in $podir " xgettext --sort-output --keyword=translatable -o "$localedir/template.pot" "$gladefile" echo " [ DONE ]" diff --git a/trunk b/trunk deleted file mode 120000 index a239e1f..0000000 --- a/trunk +++ /dev/null @@ -1 +0,0 @@ -branches/0.3 \ No newline at end of file