diff --git a/bin/lutris b/bin/lutris index a4a9feb80..fb44d5e51 100755 --- a/bin/lutris +++ b/bin/lutris @@ -21,6 +21,8 @@ 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) @@ -28,9 +30,12 @@ import optparse # See also lutris.constants.py which also has a DATA_PATH LAUNCH_PATH=os.path.abspath(sys.path[0]) -DATA_PATH=os.path.join(LAUNCH_PATH, '..', 'data') -SOURCE_PATH=os.path.join(LAUNCH_PATH, '..') -sys.path.insert(0, SOURCE_PATH) +if LAUNCH_PATH != "/usr/bin": + SOURCE_PATH=os.path.join(LAUNCH_PATH, '..') + sys.path.insert(0, SOURCE_PATH) + DATA_PATH = os.path.join(LAUNCH_PATH, '..', 'data') +else: + DATA_PATH = '/usr/share/lutris' from lutris.installer import Installer from lutris.gui.lutriswindow import LutrisWindow diff --git a/debian/changelog b/debian/changelog index 3a75e187a..c96d72407 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +lutris (0.2.2) maverick; urgency=low + + * Added support for nullDC, joy2key + * New common dialogs + * Basic steam installer + * Many bugfixes + + -- Mathieu Comandon Sat, 25 Sep 2010 12:53:43 +0200 + lutris (0.2.1) maverick; urgency=low * Cleaned some files to prepare for 0.33 release diff --git a/lutris/config.py b/lutris/config.py index 731eb7dc7..0cc063249 100644 --- a/lutris/config.py +++ b/lutris/config.py @@ -31,7 +31,7 @@ class LutrisConfig(): constants.lutris_config_path, constants.runner_config_path, constants.GAME_CONFIG_PATH, - constants.cover_path, + constants.COVER_PATH, constants.tmp_path, constants.cache_path ] diff --git a/lutris/constants.py b/lutris/constants.py index b0c8d9b3b..e45729f0f 100644 --- a/lutris/constants.py +++ b/lutris/constants.py @@ -23,8 +23,9 @@ import os import sys name = "Lutris" -version = "0.2" +version = "0.2.2" website = "http://lutris.net" +protocol_version = 1 #installer_prefix = "http://lutris.net/media/installers/" installer_prefix = "http://localhost:8000/media/installers/" CONFIG_EXTENSION = ".yml" @@ -46,19 +47,23 @@ license = """ You should have received a copy of the GNU General Public License along with this program. If not, see . """ -#Icons -lutris_icon_file = "data/media/logo.svg" -lutris_icon_path = os.path.join(sys.path[0], lutris_icon_file) +#Paths + +LAUNCH_PATH = os.path.abspath(sys.path[0]) + +if not LAUNCH_PATH.startswith('/usr'): + DATA_PATH = os.path.join(sys.path[0], 'data') +else: + DATA_PATH = '/usr/share/lutris' +lutris_icon_file = "media/logo.svg" +lutris_icon_path = os.path.join(DATA_PATH, lutris_icon_file) -#Config files lutris_config_path = os.path.join(os.path.expanduser('~'), '.config', 'lutris') system_config_file = 'system' + CONFIG_EXTENSION -protocol_version = 1 -DATA_PATH = os.path.join(sys.path[0], 'data') system_config_full_path = os.path.join(lutris_config_path, system_config_file) runner_config_path = os.path.join(lutris_config_path, 'runners') GAME_CONFIG_PATH = os.path.join(lutris_config_path, 'games') -cover_path = os.path.join(lutris_config_path, 'covers') +COVER_PATH = os.path.join(lutris_config_path, 'covers') tmp_path = os.path.join(lutris_config_path, 'tmp') cache_path = os.path.join(lutris_config_path, 'cache') diff --git a/lutris/coverflow/coverflow.py b/lutris/coverflow/coverflow.py index 8b4652f86..d300acdb3 100755 --- a/lutris/coverflow/coverflow.py +++ b/lutris/coverflow/coverflow.py @@ -53,7 +53,7 @@ FOVY = 20.0 def setup(): afLightDiffuse = [0.76, 0.75, 0.65, 1.0] - + # set some GL-states glClearColor(1.0, 0.5, 0.25, 1.0) glColor4f(0.25, 0.5, 1.0, 1.0) @@ -81,7 +81,7 @@ def coverflow(): if not PYGLET_ENABLED: return "NOPYGLET" width, height = 640, 480 - path = lutris.constants.cover_path + path = lutris.constants.COVER_PATH filenames = glob.glob(path+"/*")[:200] filenames.sort() #curdir = os.path.abspath(os.curdir) @@ -91,7 +91,7 @@ def coverflow(): return "NOCOVERS" try: # Try and create a window with multisampling (antialiasing) - #config = Config(sample_buffers=1, samples=4, + #config = Config(sample_buffers=1, samples=4, # depth_size=16, double_buffer=True,) config = Config(depth_size=16, double_buffer=True,) w = window.Window(config=config,fullscreen=True ) @@ -140,15 +140,15 @@ def coverflow(): elif tmp_dx[0] < -20: tmp_dx[0] = 0 #advance(True) - + @w.event def on_mouse_scroll(x, y, scroll_x, scroll_y): if scroll_y > 0: advance(True) else: advance(False) - - + + @w.event def on_mouse_press(x, y, button, modifiers): if button == window.mouse.LEFT: diff --git a/lutris/google_image.py b/lutris/google_image.py index cfb2ef7f1..a68ce787b 100644 --- a/lutris/google_image.py +++ b/lutris/google_image.py @@ -33,14 +33,14 @@ class GoogleImage(): def get_google_image_page(self,search_string): self.url_tool = UrlTool() - self.url_tool.local = False - self.fetch_count = 0 + self.url_tool.local = False + self.fetch_count = 0 logging.debug('fetching google data') google_url = "http://images.google.fr/images?q="+urllib2.quote(search_string)+"&oe=utf-8&rls=com.ubuntu:fr:official&client=firefox-a&um=1&ie=UTF-8&sa=N&hl=en&tab=wi" print google_url self.webpage = self.url_tool.read_html(google_url) print self.webpage - + def scan_for_images(self,dest): re_tool = RE_tool() # "Everybody stand back" diff --git a/lutris/gui/lutriswindow.py b/lutris/gui/lutriswindow.py index 59b733aba..ba7d00018 100644 --- a/lutris/gui/lutriswindow.py +++ b/lutris/gui/lutriswindow.py @@ -94,7 +94,6 @@ class LutrisWindow(gtk.Window): self.game_cover_image.set_from_file( os.path.join(data_path, "media/background.png") ) - #Context menu game_rename = "Rename", self.edit_game_name game_config = "Configure", self.edit_game_configuration @@ -288,6 +287,7 @@ class LutrisWindow(gtk.Window): new_name_game_config.config["realname"] = new_name new_name_game_config.save(type="game") self.game_cell.set_property('editable', False) + self.game_cell.set_property('editable', False) def edit_game_configuration(self, button): """Edit game preferences""" @@ -303,7 +303,7 @@ class LutrisWindow(gtk.Window): if self.gameName: extensions = ["png", "jpg", "jpeg"] for extension in extensions: - coverFile = os.path.join(lutris.constants.cover_path, + coverFile = os.path.join(lutris.constants.COVER_PATH, self.gameName + "." + extension) if os.path.exists(coverFile): #Resize the image diff --git a/lutris/lutrisconfig.py b/lutris/lutrisconfig.py index 51cf2686c..0694e0366 100644 --- a/lutris/lutrisconfig.py +++ b/lutris/lutrisconfig.py @@ -23,7 +23,7 @@ # by default, this is ../data, relative your trunk layout #__lutris_data_directory__ = '/usr/local/share/lutris/' -__lutris_data_directory__ = '.' +__lutris_data_directory__ = '/usr/share/lutris/' __license__ = 'GPL-3' import os diff --git a/po/lutris.pot b/po/lutris.pot index d16e219d7..f768c5ed3 100644 --- a/po/lutris.pot +++ b/po/lutris.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-08-31 02:49+0200\n" +"POT-Creation-Date: 2010-09-25 17:07+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/setup.py b/setup.py index e101bbf46..ed042bd5d 100644 --- a/setup.py +++ b/setup.py @@ -2,22 +2,22 @@ # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- ### BEGIN LICENSE # Copyright (C) 2010 Mathieu Comandon -# 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 +# 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 +# +# 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 +# +# You should have received a copy of the GNU General Public License along # with this program. If not, see . ### END LICENSE import os - +import lutris.constants try: import DistUtilsExtra.auto except ImportError: @@ -34,7 +34,7 @@ def update_data_path(prefix, oldvalue=None): fin = file('lutris/lutrisconfig.py', 'r') fout = file(fin.name + '.new', 'w') - for line in fin: + for line in fin: fields = line.split(' = ') # Separate variable from value if fields[0] == '__lutris_data_directory__': # update to prefix, store oldvalue @@ -61,7 +61,7 @@ def update_desktop_file(datadir): fin = file('lutris.desktop.in', 'r') fout = file(fin.name + '.new', 'w') - for line in fin: + for line in fin: if 'Icon=' in line: line = "Icon=%s\n" % (datadir + 'media/lutris.svg') fout.write(line) @@ -86,21 +86,21 @@ class InstallAndUpdateDataDirectory(DistUtilsExtra.auto.install_auto): update_data_path(self.prefix, previous_value) - + ################################################################################## ###################### YOU SHOULD MODIFY ONLY WHAT IS BELOW ###################### ################################################################################## DistUtilsExtra.auto.setup( name='lutris', - version='0.2-public5', + version=lutris.constants.version, license='GPL-3', author='Mathieu Comandon', author_email='strycore@gmail.com', description='Install and play any video game on Linux', - long_description = """Lutris is a gaming platform for GNU/Linux. It's goal is to make + long_description = """Lutris is a gaming platform for GNU/Linux. It's goal is to make gaming on Linux as easy as possible by taking care of installing -and setting up the game for the user. The only thing you have to +and setting up the game for the user. The only thing you have to do is play the game. It aims to support every game that is playable on Linux.""", url='https://launchpad.net/lutris',