os x and freebsd support (untested)

This commit is contained in:
ingvar1995 2016-07-26 19:09:57 +03:00
parent af5db43248
commit 08ef8294df
3 changed files with 23 additions and 15 deletions

View File

@ -7,10 +7,15 @@ from toxygen.util import program_version
version = program_version + '.0'
MODULES = ['PyAudio']
MODULES = []
if system() == 'Windows':
MODULES.append('PySide')
if system() in ('Windows', 'Darwin'):
MODULES = ['PyAudio', 'PySide']
else:
try:
import pyaudio
except ImportError:
MODULES = ['PyAudio']
class InstallScript(install):
@ -18,11 +23,13 @@ class InstallScript(install):
def run(self):
install.run(self)
OS = system()
if OS == 'Windows':
try:
if system() == 'Windows':
call(["toxygen", "--configure"])
elif OS == 'Linux':
else:
call(["toxygen", "--clean"])
except:
pass
setup(name='Toxygen',
version=version,

View File

@ -8,6 +8,7 @@ try:
from PySide import QtCore
except ImportError:
from PyQt4 import QtCore
QtCore.Signal = QtCore.pyqtSignal
# TODO: threads!
@ -34,10 +35,8 @@ ALLOWED_FILES = ('toxygen_inline.png', 'utox-inline.png', 'sticker.png')
class StateSignal(QtCore.QObject):
try:
signal = QtCore.Signal(int, float, int) # state and progress
except:
signal = QtCore.pyqtSignal(int, float, int) # state and progress - pyqt4
class FileTransfer(QtCore.QObject):

View File

@ -204,10 +204,12 @@ class Settings(dict, Singleton):
@staticmethod
def get_default_path():
if system() == 'Linux':
return os.getenv('HOME') + '/.config/tox/'
elif system() == 'Windows':
if system() == 'Windows':
return os.getenv('APPDATA') + '/Tox/'
elif system() == 'Darwin':
return os.getenv('HOME') + '/Library/Application Support/Tox/'
else:
return os.getenv('HOME') + '/.config/tox/'
class ProfileHelper(Singleton):