mirror of
https://github.com/lutris/lutris
synced 2024-10-07 08:19:07 +00:00
Fixed (some) license headers, removed ftp and fuseiso modules
This commit is contained in:
parent
2b1feb7180
commit
0aee4c3979
2
.quickly
2
.quickly
|
@ -1,4 +1,4 @@
|
|||
project = lutris
|
||||
template = ubuntu-application
|
||||
lp_id = lutris
|
||||
version = 0.6
|
||||
version = 0.6.1
|
||||
|
|
|
@ -21,8 +21,6 @@ import gtk
|
|||
import logging
|
||||
import optparse
|
||||
|
||||
|
||||
|
||||
# This is inspired by gwibber because the quickly method was starting to be
|
||||
# annoying, there might be some issues left with running from source tree or
|
||||
# packaged version (and running from source with the packaged version installed)
|
||||
|
@ -35,7 +33,7 @@ if LAUNCH_PATH != "/usr/bin":
|
|||
sys.path.insert(0, SOURCE_PATH)
|
||||
DATA_PATH = os.path.join(LAUNCH_PATH, '..', 'data')
|
||||
else:
|
||||
DATA_PATH = '/usr/share/lutris'
|
||||
DATA_PATH = '/usr/share/lutris'
|
||||
|
||||
from lutris.installer import Installer
|
||||
from lutris.gui.lutriswindow import LutrisWindow
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<requires lib="gtk+" version="2.16"/>
|
||||
<!-- interface-requires lutris_window 1.0 -->
|
||||
|
@ -98,34 +98,6 @@
|
|||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="Tools">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Tools</property>
|
||||
<property name="use_underline">True</property>
|
||||
<child type="submenu">
|
||||
<object class="GtkMenu" id="menu1">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="getfromftp_menuitem">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Get games from FTP</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="on_getfromftp_clicked"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="mount_iso_menuitem">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Mount ISO</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="on_mount_iso_menuitem_activate"/>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="help_menuitem">
|
||||
<property name="visible">True</property>
|
||||
|
|
|
@ -1,23 +1,20 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding:Utf-8 -*-
|
||||
###############################################################################
|
||||
## Lutris
|
||||
##
|
||||
## Copyright (C) 2009 Mathieu Comandon strycore@gmail.com
|
||||
##
|
||||
## 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, write to the Free Software
|
||||
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
###############################################################################
|
||||
#
|
||||
# Copyright (C) 2010 Mathieu Comandon <strider@strycore.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 3 as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
import yaml
|
||||
import os
|
||||
|
|
|
@ -1,34 +1,32 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding:Utf-8 -*-
|
||||
###############################################################################
|
||||
## Lutris
|
||||
##
|
||||
## Copyright (C) 2009 Mathieu Comandon strycore@gmail.com
|
||||
##
|
||||
## 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, write to the Free Software
|
||||
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
###############################################################################
|
||||
import sys, os
|
||||
#
|
||||
# Copyright (C) 2010 Mathieu Comandon <strider@strycore.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 3 as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
from lutris.gconfwrapper import GconfWrapper
|
||||
|
||||
def register_lutris_handler():
|
||||
gconf = GconfWrapper()
|
||||
defaults = (
|
||||
('/desktop/gnome/url-handlers/lutris/command', "lutris '%s'"),
|
||||
('/desktop/gnome/url-handlers/lutris/enabled', True),
|
||||
('/desktop/gnome/url-handlers/lutris/needs-terminal', False),
|
||||
)
|
||||
defaults = (('/desktop/gnome/url-handlers/lutris/command', "lutris '%s'"),
|
||||
('/desktop/gnome/url-handlers/lutris/enabled', True),
|
||||
('/desktop/gnome/url-handlers/lutris/needs-terminal', False),)
|
||||
|
||||
for key, value in defaults:
|
||||
if not gconf.has_key(key):
|
||||
|
@ -37,7 +35,3 @@ def register_lutris_handler():
|
|||
if __name__ == '__main__':
|
||||
register_lutris_handler()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,23 +1,19 @@
|
|||
# -*- coding:Utf-8 -*-
|
||||
###############################################################################
|
||||
## Lutris
|
||||
##
|
||||
## Copyright (C) 2010 Mathieu Comandon strycore@gmail.com
|
||||
##
|
||||
## 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, write to the Free Software
|
||||
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
###############################################################################
|
||||
#
|
||||
# Copyright (C) 2010 Mathieu Comandon <strider@strycore.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 3 as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
|
|
@ -1,23 +1,20 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding:Utf-8 -*-
|
||||
###############################################################################
|
||||
## Lutris
|
||||
##
|
||||
## Copyright (C) 2009, 2010 Mathieu Comandon strycore@gmail.com
|
||||
##
|
||||
## 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, write to the Free Software
|
||||
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
###############################################################################
|
||||
#
|
||||
# Copyright (C) 2010 Mathieu Comandon <strider@strycore.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 3 as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
"""Class to control the user's desktop in many aspects
|
||||
|
||||
|
@ -49,7 +46,7 @@ def make_compiz_rule(class_=None, title=None):
|
|||
|
||||
def get_resolutions():
|
||||
"""Return the list of supported screen resolutions."""
|
||||
xrandr_output = Popen("xrandr",
|
||||
xrandr_output = Popen("xrandr",
|
||||
stdout=PIPE).communicate()[0]
|
||||
resolution_list = []
|
||||
for line in xrandr_output.split("\n"):
|
||||
|
@ -59,7 +56,7 @@ def get_resolutions():
|
|||
|
||||
def get_current_resolution():
|
||||
"""Return the current resolution for the desktop."""
|
||||
xrandr_output = Popen("xrandr",
|
||||
xrandr_output = Popen("xrandr",
|
||||
stdout=PIPE).communicate()[0]
|
||||
for line in xrandr_output.split("\n"):
|
||||
if line.startswith(" ") and "*" in line:
|
||||
|
@ -70,7 +67,7 @@ def change_resolution(resolution):
|
|||
"""change desktop resolution"""
|
||||
if resolution not in get_resolutions():
|
||||
return False
|
||||
Popen("xrandr -s %s" % resolution,
|
||||
Popen("xrandr -s %s" % resolution,
|
||||
shell=True).communicate()[0]
|
||||
return True
|
||||
|
||||
|
@ -140,7 +137,7 @@ class LutrisDesktopControl():
|
|||
|
||||
def set_keyboard_repeat(self, gconf_value = False):
|
||||
"""Desactivate key repeats.
|
||||
|
||||
|
||||
This is needed, for example in Wolfenstein (2009)
|
||||
"""
|
||||
gconf_key = "/desktop/gnome/peripherals/keyboard/repeat"
|
||||
|
|
|
@ -1,32 +1,28 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding:Utf-8 -*-
|
||||
###############################################################################
|
||||
## Lutris
|
||||
##
|
||||
## Copyright (C) 2009 Mathieu Comandon strycore@gmail.com
|
||||
##
|
||||
## 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, write to the Free Software
|
||||
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
###############################################################################
|
||||
#
|
||||
# Copyright (C) 2010 Mathieu Comandon <strider@strycore.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 3 as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
import gobject
|
||||
import urllib
|
||||
|
||||
class Downloader(gobject.GObject):
|
||||
"""Downloader class that doesn't block the program"""
|
||||
__gsignals__ = {
|
||||
'report-progress': (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE,
|
||||
(gobject.TYPE_INT,))
|
||||
}
|
||||
__gsignals__ = {'report-progress': (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE,
|
||||
(gobject.TYPE_INT,))}
|
||||
|
||||
def __init__(self, url, dest):
|
||||
"""Set up the downloader."""
|
||||
|
|
|
@ -1,23 +1,20 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding:Utf-8 -*-
|
||||
###############################################################################
|
||||
## Lutris
|
||||
##
|
||||
## Copyright (C) 2010 Mathieu Comandon strycore@gmail.com
|
||||
##
|
||||
## 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, write to the Free Software
|
||||
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
###############################################################################
|
||||
#
|
||||
# Copyright (C) 2010 Mathieu Comandon <strider@strycore.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 3 as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
class GConfBindingsUnavailable(Exception):
|
||||
def __init__(self, value):
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
import os
|
||||
from ftplib import FTP
|
||||
|
||||
class FTPFetch():
|
||||
def __init__(self):
|
||||
self.destination_path = "/home/strider/Games/mame"
|
||||
|
||||
def append_file(self, data):
|
||||
"""
|
||||
Callback function to save files on local drive
|
||||
"""
|
||||
file = open(self.romname, "a")
|
||||
file.write(data)
|
||||
file.close()
|
||||
|
||||
def fetch(self, global_conf, pattern=None):
|
||||
"""
|
||||
Get files matching pattern from FTP Server
|
||||
"""
|
||||
ftp_source = FTP(global_conf["ftphost"])
|
||||
ftp_source.login(global_conf["ftplogin"], global_conf["ftppassword"])
|
||||
ftp_source.cwd(global_conf["mamedir"])
|
||||
game_list = ftp_source.nlst()
|
||||
os.chdir(self.destination_path)
|
||||
for game in game_list:
|
||||
if pattern in game:
|
||||
self.romname = game
|
||||
ftp_source.retrbinary("RETR " + game, self.append_file)
|
||||
ftp_source.close()
|
|
@ -1,20 +0,0 @@
|
|||
|
||||
from subprocess import Popen, PIPE, STDOUT
|
||||
|
||||
def is_fuseiso_installed():
|
||||
fuseiso_command = Popen(["which","fuseiso"],
|
||||
stdout=PIPE).stdout
|
||||
fuseiso_is_installed = fuseiso_command.readline()
|
||||
if "fuseiso" in fuseiso_is_installed:
|
||||
logging.debug("fuseiso is installed")
|
||||
return True
|
||||
else:
|
||||
logging.debug("fuseiso not here, problems ahead")
|
||||
return False
|
||||
|
||||
def fuseiso_mount(iso, dest):
|
||||
"""Mount an iso file with fuseiso"""
|
||||
fuseiso_command = Popen(["fuseiso", iso, dest],
|
||||
stdout=PIPE, stderr=STDOUT)
|
||||
return dest
|
||||
|
|
@ -1,23 +1,20 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding:Utf-8 -*-
|
||||
###############################################################################
|
||||
## Lutris
|
||||
##
|
||||
## Copyright (C) 2009 Mathieu Comandon strycore@gmail.com
|
||||
##
|
||||
## 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, write to the Free Software
|
||||
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
###############################################################################
|
||||
#
|
||||
# Copyright (C) 2010 Mathieu Comandon <strider@strycore.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 3 as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
import subprocess
|
||||
import gobject
|
||||
|
|
|
@ -1,29 +1,23 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding:Utf-8 -*-
|
||||
|
||||
###############################################################################
|
||||
## GConfWrapper.py
|
||||
##
|
||||
## Copyright (c) 2010 Mathieu Comandon <strycore@gmail.com>
|
||||
##
|
||||
## Author: Mathieu Comandon <strycore@gmail.com>
|
||||
##
|
||||
## 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, write to the Free Software
|
||||
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
###############################################################################
|
||||
|
||||
#
|
||||
# Copyright (C) 2010 Mathieu Comandon <strider@strycore.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 3 as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
import os
|
||||
|
||||
from glib import GError
|
||||
from lutris.exceptions import GConfBindingsUnavailable
|
||||
|
||||
|
@ -96,6 +90,3 @@ class GconfWrapper():
|
|||
success = False
|
||||
return success
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,22 +1,20 @@
|
|||
###############################################################################
|
||||
## Lutris video gaming platform
|
||||
##
|
||||
## Copyright (C) 2009, 2010 Mathieu Comandon <strycore@gmail.com>
|
||||
##
|
||||
## 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, write to the Free Software
|
||||
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
###############################################################################
|
||||
#!/usr/bin/python
|
||||
# -*- coding:Utf-8 -*-
|
||||
#
|
||||
# Copyright (C) 2010 Mathieu Comandon <strider@strycore.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 3 as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
from lutris.tool.url_tool import UrlTool
|
||||
from lutris.tool.re_tool import RE_tool
|
||||
|
|
|
@ -38,7 +38,6 @@ from lutris.gui.common import NoticeDialog
|
|||
from lutris.gui.ftpdialog import FtpDialog
|
||||
from lutris.gui.runnersdialog import RunnersDialog
|
||||
from lutris.gui.addgamedialog import AddGameDialog
|
||||
from lutris.gui.mountisodialog import MountIsoDialog
|
||||
from lutris.gui.installerdialog import InstallerDialog
|
||||
from lutris.gui.systemconfigdialog import SystemConfigDialog
|
||||
from lutris.gui.googleimagedialog import GoogleImageDialog
|
||||
|
|
|
@ -1,94 +0,0 @@
|
|||
import os.path
|
||||
import os
|
||||
# -*- coding:Utf-8 -*-
|
||||
###############################################################################
|
||||
## Lutris
|
||||
##
|
||||
## Copyright (C) 2009 Mathieu Comandon strycore@gmail.com
|
||||
##
|
||||
## 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, write to the Free Software
|
||||
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
###############################################################################
|
||||
|
||||
import gtk
|
||||
import logging
|
||||
|
||||
from lutris.fuseiso import is_fuseiso_installed, fuseiso_mount
|
||||
|
||||
class MountIsoDialog(gtk.Dialog):
|
||||
def __init__(self):
|
||||
|
||||
is_fuseiso_installed()
|
||||
|
||||
gtk.Dialog.__init__(self)
|
||||
self.set_title("Mount ISO image")
|
||||
self.set_size_request(300,200)
|
||||
|
||||
self.iso_filechooserbutton = gtk.FileChooserButton("Open an ISO file",
|
||||
backend=None)
|
||||
self.iso_label = gtk.Label("ISO file")
|
||||
self.iso_label.set_size_request(90,20)
|
||||
self.iso_hbox = gtk.HBox()
|
||||
self.iso_hbox.pack_start(self.iso_label,False,False)
|
||||
self.iso_hbox.pack_start(self.iso_filechooserbutton)
|
||||
self.vbox.pack_start(self.iso_hbox,False,False,10)
|
||||
|
||||
self.mount_point_dialog = gtk.FileChooserDialog(title="Select mount point",
|
||||
parent=self,
|
||||
action=gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER,
|
||||
buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT,
|
||||
gtk.STOCK_OK, gtk.RESPONSE_ACCEPT),
|
||||
backend=None)
|
||||
|
||||
self.mount_point_filechooserbutton = gtk.FileChooserButton(self.mount_point_dialog)
|
||||
self.mount_point_label = gtk.Label("Mount point")
|
||||
self.mount_point_label.set_size_request(90,20)
|
||||
self.mount_point_hbox = gtk.HBox()
|
||||
self.mount_point_hbox.pack_start(self.mount_point_label,False,False)
|
||||
self.mount_point_hbox.pack_start(self.mount_point_filechooserbutton)
|
||||
self.vbox.pack_start(self.mount_point_hbox,False,False,10)
|
||||
|
||||
self.wine_cdrom_hbox = gtk.HBox()
|
||||
self.wine_cdrom_label = gtk.Label("Set Wine CDROM to mount point")
|
||||
self.wine_cdrom_checkbutton = gtk.CheckButton()
|
||||
self.wine_cdrom_hbox.pack_start(self.wine_cdrom_label,False,False)
|
||||
self.wine_cdrom_hbox.pack_start(self.wine_cdrom_checkbutton,False,False)
|
||||
self.vbox.pack_start(self.wine_cdrom_hbox,False,False,10)
|
||||
|
||||
#Action buttons
|
||||
cancel_button = gtk.Button(None, gtk.STOCK_CANCEL)
|
||||
ok_button = gtk.Button(None, gtk.STOCK_OK)
|
||||
self.action_area.pack_start(cancel_button)
|
||||
self.action_area.pack_start(ok_button)
|
||||
cancel_button.connect("clicked", self.close)
|
||||
ok_button.connect("clicked", self.ok_clicked)
|
||||
|
||||
self.show_all()
|
||||
self.run()
|
||||
|
||||
def close(self,widget):
|
||||
self.destroy()
|
||||
|
||||
def ok_clicked(self,wigdet):
|
||||
iso_file = self.iso_filechooserbutton.get_filename()
|
||||
mount_point = self.mount_point_filechooserbutton.get_filename()
|
||||
|
||||
fuseiso_mount(iso_file, mount_point)
|
||||
if self.wine_cdrom_checkbutton.get_active():
|
||||
os.remove(os.path.expanduser('~'), '.wine/dosdevices/d:')
|
||||
os.symlink(mount_point,
|
||||
os.path.join(os.path.expanduser('~'),
|
||||
'.wine/dosdevices/d:'))
|
||||
self.destroy()
|
||||
|
|
@ -1,38 +1,38 @@
|
|||
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
|
||||
### BEGIN LICENSE
|
||||
# Copyright (C) 2010 Mathieu Comandon <strycore@gmail.com>
|
||||
# This program is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 3, as published
|
||||
# by the Free Software Foundation.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranties of
|
||||
# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
### END LICENSE
|
||||
#!/usr/bin/python
|
||||
# -*- coding:Utf-8 -*-
|
||||
#
|
||||
# Copyright (C) 2010 Mathieu Comandon <strider@strycore.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 3 as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
"""Helpers for an Ubuntu application."""
|
||||
|
||||
__all__ = [
|
||||
'make_window',
|
||||
]
|
||||
__all__ = ['make_window',]
|
||||
|
||||
import os
|
||||
import gtk
|
||||
import gettext
|
||||
|
||||
from lutris.lutrisconfig import get_data_file
|
||||
|
||||
import gettext
|
||||
from gettext import gettext as _
|
||||
gettext.textdomain('lutris')
|
||||
|
||||
def get_builder(builder_file_name):
|
||||
"""Return a fully-instantiated gtk.Builder instance from specified ui
|
||||
"""Return a fully-instantiated gtk.Builder instance from specified ui
|
||||
file
|
||||
|
||||
|
||||
:param builder_file_name: The name of the builder file, without extension.
|
||||
Assumed to be in the 'ui' directory under the data path.
|
||||
"""
|
||||
|
|
|
@ -1,23 +1,20 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding:Utf-8 -*-
|
||||
###############################################################################
|
||||
## Lutris
|
||||
##
|
||||
## Copyright (C) 2009, 2010 Mathieu Comandon strycore@gmail.com
|
||||
##
|
||||
## 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, write to the Free Software
|
||||
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
###############################################################################
|
||||
#
|
||||
# Copyright (C) 2010 Mathieu Comandon <strider@strycore.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 3 as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
""" This is where takes place the whole install process for games
|
||||
|
||||
|
@ -236,7 +233,7 @@ class Installer():
|
|||
shutil.copy(url[7:], dest_dir)
|
||||
else:
|
||||
urllib.urlretrieve(url, dest_file, reporthook)
|
||||
|
||||
|
||||
return dest_file
|
||||
|
||||
def delete(self, data):
|
||||
|
@ -265,7 +262,7 @@ class Installer():
|
|||
dst = self.game_dir
|
||||
else:
|
||||
dst = data['dst'].replace('homedir', os.path.expanduser('~'))
|
||||
if not os.path.exists(dst):
|
||||
if not os.path.exists(dst):
|
||||
dst = '/tmp'
|
||||
|
||||
print "Moving %s to %s" % (src, dst)
|
||||
|
@ -280,4 +277,4 @@ class Installer():
|
|||
return False
|
||||
return True
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,23 +1,20 @@
|
|||
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
|
||||
### BEGIN LICENSE
|
||||
# Copyright (C) 2010 Mathieu Comandon <strycore@gmail.com>
|
||||
# This program is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 3, as published
|
||||
# by the Free Software Foundation.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranties of
|
||||
# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
### END LICENSE
|
||||
|
||||
# THIS IS Lutris CONFIGURATION FILE
|
||||
# YOU CAN PUT THERE SOME GLOBAL VALUE
|
||||
# Do not touch until you know what you're doing.
|
||||
# you're warned :)
|
||||
#!/usr/bin/python
|
||||
# -*- coding:Utf-8 -*-
|
||||
#
|
||||
# Copyright (C) 2010 Mathieu Comandon <strider@strycore.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 3 as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# where your project will head for your data (for instance, images and ui files)
|
||||
# by default, this is ../data, relative your trunk layout
|
||||
|
|
|
@ -1,94 +1,86 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding:Utf-8 -*-
|
||||
###############################################################################
|
||||
## Lutris
|
||||
##
|
||||
## Copyright (C) 2009 Mathieu Comandon strycore@gmail.com
|
||||
##
|
||||
## 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, write to the Free Software
|
||||
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
###############################################################################
|
||||
#
|
||||
# Copyright (C) 2010 Mathieu Comandon <strider@strycore.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 3 as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import logging
|
||||
import lutris.constants
|
||||
from lutris.runners.runner import Runner
|
||||
from lutris.fuseiso import fuseiso_mount
|
||||
|
||||
class wine(Runner):
|
||||
def __init__(self,settings = None):
|
||||
self.executable = "wine"
|
||||
self.package = "wine"
|
||||
self.machine = "Windows games"
|
||||
self.description = "Run Windows games with Wine"
|
||||
self.executable = 'wine'
|
||||
self.package = 'wine'
|
||||
self.machine = 'Windows games'
|
||||
self.description = 'Run Windows games with Wine'
|
||||
|
||||
self.is_installable = True
|
||||
|
||||
self.installer_options = [{"option": "installer",
|
||||
"type": "single",
|
||||
"label": "Executable"},
|
||||
{'option': 'iso',
|
||||
self.installer_options = [{'option': 'installer',
|
||||
'type': 'single',
|
||||
'label': 'ISO Image'}]
|
||||
'label': 'Executable'}, ]
|
||||
|
||||
self.game_options = [
|
||||
{"option": "exe","type":"single", "label":"Executable"},
|
||||
{"option": "args", "type": "string", "label": "Arguments" }
|
||||
]
|
||||
self.game_options = [{'option': 'exe', 'type':'single', 'label':'Executable'},
|
||||
{'option': 'args', 'type': 'string', 'label': 'Arguments'}]
|
||||
|
||||
mouse_warp_choices = [("Disable", "disable"),
|
||||
("Enable", "enable"),
|
||||
("Force", "force")]
|
||||
orm_choices = [("BackBuffer","backbuffer"),
|
||||
("FBO","fbo"),
|
||||
("PBuffer","pbuffer")]
|
||||
rtlm_choices = [("Auto","auto"),
|
||||
("Disabled","disabled"),
|
||||
("ReadDraw","readdraw"),
|
||||
("ReadTex","readtex"),
|
||||
("TexDraw","texdraw"),
|
||||
("TexTex","textex")]
|
||||
multisampling_choices = [("Enabled","enabled"),
|
||||
mouse_warp_choices = [('Disable', 'disable'),
|
||||
('Enable', 'enable'),
|
||||
('Force', 'force')]
|
||||
orm_choices = [('BackBuffer', 'backbuffer'),
|
||||
('FBO', 'fbo'),
|
||||
('PBuffer', 'pbuffer')]
|
||||
rtlm_choices = [('Auto', 'auto'),
|
||||
('Disabled', 'disabled'),
|
||||
('ReadDraw', 'readdraw'),
|
||||
('ReadTex', 'readtex'),
|
||||
('TexDraw', 'texdraw'),
|
||||
('TexTex', 'textex')]
|
||||
multisampling_choices = [('Enabled', 'enabled'),
|
||||
("Disabled","disabled")]
|
||||
audio_choices = [("Alsa","alsa"),
|
||||
("OSS","oss"),
|
||||
("Jack","jack")]
|
||||
audio_choices = [('Alsa','alsa'),
|
||||
('OSS','oss'),
|
||||
('Jack','jack')]
|
||||
desktop_choices = [('Yes', 'Default'),
|
||||
('No', 'None')]
|
||||
self.runner_options = [{"option": "cdrom_path",
|
||||
"label": "CDRom mount point",
|
||||
"type": "directory_chooser"},
|
||||
{"option": "MouseWarpOverride",
|
||||
"label": "Mouse Warp Override",
|
||||
"type": "one_choice",
|
||||
"choices": mouse_warp_choices},
|
||||
{"option": "Multisampling",
|
||||
"label": "Multisampling",
|
||||
"type": "one_choice",
|
||||
"choices": multisampling_choices},
|
||||
{"option": "OffscreenRenderingMode",
|
||||
"label": "Offscreen Rendering Mode",
|
||||
"type": "one_choice",
|
||||
"choices": orm_choices},
|
||||
{"option": "RenderTargetLockMode",
|
||||
"label": "Render Target Lock Mode",
|
||||
"type": "one_choice",
|
||||
"choices": rtlm_choices},
|
||||
{"option": "Audio",
|
||||
"label": "Audio driver",
|
||||
"type": "one_choice",
|
||||
"choices": audio_choices},
|
||||
{"option": 'Desktop',
|
||||
self.runner_options = [{'option': 'cdrom_path',
|
||||
'label': 'CDRom mount point',
|
||||
'type': 'directory_chooser'},
|
||||
{'option': 'MouseWarpOverride',
|
||||
'label': 'Mouse Warp Override',
|
||||
'type': 'one_choice',
|
||||
'choices': mouse_warp_choices},
|
||||
{'option': 'Multisampling',
|
||||
'label': 'Multisampling',
|
||||
'type': 'one_choice',
|
||||
'choices': multisampling_choices},
|
||||
{'option': 'OffscreenRenderingMode',
|
||||
'label': 'Offscreen Rendering Mode',
|
||||
'type': 'one_choice',
|
||||
'choices': orm_choices},
|
||||
{'option': 'RenderTargetLockMode',
|
||||
'label': 'Render Target Lock Mode',
|
||||
'type': 'one_choice',
|
||||
'choices': rtlm_choices},
|
||||
{'option': 'Audio',
|
||||
'label': 'Audio driver',
|
||||
'type': 'one_choice',
|
||||
'choices': audio_choices},
|
||||
{'option': 'Desktop',
|
||||
'label': 'Virtual desktop',
|
||||
'type': 'one_choice',
|
||||
'choices': desktop_choices}]
|
||||
|
@ -104,10 +96,10 @@ class wine(Runner):
|
|||
"Desktop": r"HKEY_CURRENT_USER\Software\Wine\Explorer"}
|
||||
|
||||
if settings:
|
||||
if "exe" in settings['game']:
|
||||
self.gameExe = settings["game"]["exe"]
|
||||
if "args" in settings.config["game"]:
|
||||
self.args = settings["game"]["args"]
|
||||
if 'exe' in settings['game']:
|
||||
self.gameExe = settings['game']['exe']
|
||||
if 'args' in settings.config['game']:
|
||||
self.args = settings['game']['args']
|
||||
else:
|
||||
self.args = None
|
||||
if self.__class__.__name__ in settings.config:
|
||||
|
@ -145,12 +137,8 @@ class wine(Runner):
|
|||
"""Return the installer command, either from an exe or an iso"""
|
||||
if exe:
|
||||
command = "%s %s" % (self.executable, exe)
|
||||
elif iso:
|
||||
mount_path = lutris.constants.tmp_path
|
||||
mount_path = fuseiso_mount(iso, mount_path)
|
||||
command = os.path.join(mount_path, 'Setup.exe')
|
||||
else:
|
||||
print "Need either an executable or an iso file"
|
||||
print "Need an executable file"
|
||||
return False
|
||||
return command
|
||||
|
||||
|
|
|
@ -1,23 +1,20 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding:Utf-8 -*-
|
||||
###############################################################################
|
||||
## Lutris
|
||||
##
|
||||
## Copyright (C) 2009 Mathieu Comandon strycore@gmail.com
|
||||
##
|
||||
## 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, write to the Free Software
|
||||
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
###############################################################################
|
||||
#
|
||||
# Copyright (C) 2010 Mathieu Comandon <strider@strycore.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 3 as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
import yaml
|
||||
import urlparse
|
||||
|
@ -29,7 +26,6 @@ import lutris.constants
|
|||
from lutris.tool.url_tool import UrlTool
|
||||
|
||||
class LutrisInterpreter():
|
||||
|
||||
def __init__(self, filename = None):
|
||||
self.valid_schemes = ('http', 'https', 'ftp')
|
||||
self.url_tool = UrlTool()
|
||||
|
@ -95,12 +91,9 @@ class LutrisInterpreter():
|
|||
def move(self,source, destination):
|
||||
os.move
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
filename = '/home/strider/Jeux/quake.lutris'
|
||||
interpreter = LutrisInterpreter(filename)
|
||||
interpreter.get_files()
|
||||
interpreter.install()
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,24 +1,20 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding:Utf-8 -*-
|
||||
###############################################################################
|
||||
## Lutris
|
||||
##
|
||||
## Copyright (C) 2009, 2010 Mathieu Comandon strycore@gmail.com
|
||||
##
|
||||
## 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, write to the Free Software
|
||||
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
###############################################################################
|
||||
#
|
||||
# Copyright (C) 2010 Mathieu Comandon <strider@strycore.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 3 as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
import logging
|
||||
import threading
|
||||
|
|
29
setup.py
29
setup.py
|
@ -1,23 +1,24 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/python
|
||||
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
|
||||
### BEGIN LICENSE
|
||||
# Copyright (C) 2010 Mathieu Comandon <strycore@gmail.com>
|
||||
# This program is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 3, as published
|
||||
# by the Free Software Foundation.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranties of
|
||||
# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
# Copyright (C) 2010 Mathieu Comandon <strider@strycore.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 3 as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
### END LICENSE
|
||||
|
||||
|
||||
import os
|
||||
import lutris.constants
|
||||
|
||||
try:
|
||||
import DistUtilsExtra.auto
|
||||
except ImportError:
|
||||
|
|
|
@ -1,3 +1,21 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding:Utf-8 -*-
|
||||
#
|
||||
# Copyright (C) 2010 Mathieu Comandon <strider@strycore.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 3 as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
import os
|
||||
import sys
|
||||
import logging
|
||||
|
|
|
@ -1,5 +1,19 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
#
|
||||
# Copyright (C) 2010 Mathieu Comandon <strider@strycore.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 3 as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
import unittest
|
||||
import sys
|
||||
import os
|
||||
|
@ -11,13 +25,13 @@ from lutris.runners.steam import steam
|
|||
class TestSomeStuff(unittest.TestCase):
|
||||
def __init__(self):
|
||||
self.steam_runner = steam()
|
||||
|
||||
|
||||
def runTest(self):
|
||||
# Assume that steam is not installed
|
||||
self.assertFalse(self.steam_runner.is_installed())
|
||||
# Assume wine is installed
|
||||
self.assertTrue(self.steam_runner.check_depends())
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
test = TestSomeStuff()
|
||||
test.runTest()
|
||||
test.runTest()
|
||||
|
|
|
@ -1,3 +1,21 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding:Utf-8 -*-
|
||||
#
|
||||
# Copyright (C) 2010 Mathieu Comandon <strider@strycore.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 3 as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
import unittest
|
||||
import sys
|
||||
import os
|
||||
|
|
|
@ -1,4 +1,20 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding:Utf-8 -*-
|
||||
#
|
||||
# Copyright (C) 2010 Mathieu Comandon <strider@strycore.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 3 as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
import unittest
|
||||
import sys
|
||||
import os
|
||||
|
@ -8,7 +24,7 @@ from lutris.config import LutrisConfig
|
|||
|
||||
class PathTest(unittest.TestCase):
|
||||
def __init__(self):
|
||||
self.config = LutrisConfig(runner='wine')
|
||||
self.config = LutrisConfig(runner='wine')
|
||||
|
||||
def runTest(self):
|
||||
print self.config.get_path()
|
||||
|
|
|
@ -1,7 +1,25 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding:Utf-8 -*-
|
||||
#
|
||||
# Copyright (C) 2010 Mathieu Comandon <strider@strycore.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 3 as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
import unittest
|
||||
import sys
|
||||
import os
|
||||
|
||||
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
|
||||
from lutris.config import LutrisConfig
|
||||
|
|
|
@ -10,10 +10,27 @@ class TestSomeStuff(unittest.TestCase):
|
|||
def __init__(self):
|
||||
"""Do some stuff"""
|
||||
pass
|
||||
|
||||
|
||||
def runTest(self):
|
||||
self.assertEqual(True, True)
|
||||
#!/usr/bin/python
|
||||
# -*- coding:Utf-8 -*-
|
||||
#
|
||||
# Copyright (C) 2010 Mathieu Comandon <strider@strycore.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 3 as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
if __name__ == '__main__':
|
||||
test = TestSomeStuff()
|
||||
test.runTest()
|
||||
test.runTest()
|
||||
|
|
Loading…
Reference in a new issue