Head r738

This commit is contained in:
Jon Tibble 2010-03-13 12:11:44 +00:00
commit af74e1d295
7 changed files with 58 additions and 21 deletions

View File

@ -32,6 +32,7 @@ from PyQt4 import QtCore, QtGui
from bibleimportwizard import Ui_BibleImportWizard from bibleimportwizard import Ui_BibleImportWizard
from openlp.core.lib import Receiver from openlp.core.lib import Receiver
from openlp.core.utils import AppLocation
from openlp.plugins.bibles.lib.manager import BibleFormat from openlp.plugins.bibles.lib.manager import BibleFormat
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -258,9 +259,8 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
Load the list of Crosswalk and BibleGateway bibles. Load the list of Crosswalk and BibleGateway bibles.
""" """
#Load and store Crosswalk Bibles #Load and store Crosswalk Bibles
filepath = os.path.abspath(os.path.join( filepath = AppLocation.get_directory(AppLocation.PluginsDir)
os.path.split(os.path.abspath(__file__))[0], filepath = os.path.join(filepath, u'bibles', u'resources')
u'..', u'resources'))
fbibles = None fbibles = None
try: try:
self.web_bible_list[DownloadLocation.Crosswalk] = {} self.web_bible_list[DownloadLocation.Crosswalk] = {}

View File

@ -31,6 +31,7 @@ import sqlite3
from BeautifulSoup import BeautifulSoup from BeautifulSoup import BeautifulSoup
from openlp.core.lib import Receiver from openlp.core.lib import Receiver
from openlp.core.utils import AppLocation
from common import BibleCommon, SearchResults from common import BibleCommon, SearchResults
from db import BibleDB from db import BibleDB
from openlp.plugins.bibles.lib.models import Book from openlp.plugins.bibles.lib.models import Book
@ -43,8 +44,9 @@ class HTTPBooks(object):
@staticmethod @staticmethod
def get_cursor(): def get_cursor():
if HTTPBooks.cursor is None: if HTTPBooks.cursor is None:
filepath = os.path.join(os.path.dirname(os.path.abspath(__file__)), filepath = os.path.join(
u'..', u'resources', u'httpbooks.sqlite') AppLocation.get_directory(AppLocation.PluginsDir), u'bibles',
u'resources', u'httpbooks.sqlite')
conn = sqlite3.connect(filepath) conn = sqlite3.connect(filepath)
HTTPBooks.cursor = conn.cursor() HTTPBooks.cursor = conn.cursor()
return HTTPBooks.cursor return HTTPBooks.cursor

View File

@ -33,6 +33,7 @@ import re
from PyQt4 import QtCore from PyQt4 import QtCore
from openlp.core.lib import Receiver from openlp.core.lib import Receiver
from openlp.core.utils import AppLocation
from db import BibleDB from db import BibleDB
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -66,9 +67,9 @@ class OSISBible(BibleDB):
self.q_regex = re.compile(r'<q (.*?)>') self.q_regex = re.compile(r'<q (.*?)>')
self.spaces_regex = re.compile(r'([ ]{2,})') self.spaces_regex = re.compile(r'([ ]{2,})')
self.books = {} self.books = {}
filepath = os.path.split(os.path.abspath(__file__))[0] filepath = os.path.join(
filepath = os.path.abspath(os.path.join( AppLocation.get_directory(AppLocation.PluginsDir), u'bibles',
filepath, u'..', u'resources', u'osisbooks.csv')) u'resources', u'osisbooks.csv')
fbibles = None fbibles = None
try: try:
fbibles = open(filepath, u'r') fbibles = open(filepath, u'r')

View File

@ -27,6 +27,7 @@ import os
import logging import logging
from openlp.core.lib import Plugin, build_icon, Receiver, PluginStatus from openlp.core.lib import Plugin, build_icon, Receiver, PluginStatus
from openlp.core.utils import AppLocation
from openlp.plugins.presentations.lib import * from openlp.plugins.presentations.lib import *
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -84,11 +85,13 @@ class PresentationPlugin(Plugin):
If Not do not install the plugin. If Not do not install the plugin.
""" """
log.debug(u'check_pre_conditions') log.debug(u'check_pre_conditions')
dir = os.path.join(os.path.dirname(__file__), u'lib') controller_dir = os.path.join(
for filename in os.listdir(dir): AppLocation.get_directory(AppLocation.PluginsDir),
u'presentations', u'lib')
for filename in os.listdir(controller_dir):
if filename.endswith(u'controller.py') and \ if filename.endswith(u'controller.py') and \
not filename == 'presentationcontroller.py': not filename == 'presentationcontroller.py':
path = os.path.join(dir, filename) path = os.path.join(controller_dir, filename)
if os.path.isfile(path): if os.path.isfile(path):
modulename = u'openlp.plugins.presentations.lib.' + \ modulename = u'openlp.plugins.presentations.lib.' + \
os.path.splitext(filename)[0] os.path.splitext(filename)[0]

View File

@ -5,7 +5,7 @@
#define MyAppVerName "OpenLP 2.0" #define MyAppVerName "OpenLP 2.0"
#define MyAppPublisher "OpenLP Developers" #define MyAppPublisher "OpenLP Developers"
#define MyAppURL "http://openlp.org/" #define MyAppURL "http://openlp.org/"
#define MyAppExeName "openlp.exe" #define MyAppExeName "OpenLP.exe"
[Setup] [Setup]
; NOTE: The value of AppId uniquely identifies this application. ; NOTE: The value of AppId uniquely identifies this application.
@ -20,12 +20,14 @@ AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL} AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName} DefaultDirName={pf}\{#MyAppName}
DefaultGroupName=OpenLP 2.0 DefaultGroupName=OpenLP 2.0
AllowNoIcons=yes AllowNoIcons=true
LicenseFile=LICENSE.txt LicenseFile=LICENSE.txt
OutputBaseFilename=OpenLP-2.0-setup OutputBaseFilename=OpenLP-1.9.0-bzr737-setup
Compression=lzma Compression=lzma
SolidCompression=true SolidCompression=true
SetupIconFile=OpenLP.ico SetupIconFile=C:\Program Files\Inno Setup 5\Examples\Setup.ico
WizardImageFile=C:\Program Files\Inno Setup 5\WizModernImage-IS.bmp
WizardSmallImageFile=C:\Program Files\Inno Setup 5\WizModernSmallImage-IS.bmp
[Languages] [Languages]
Name: english; MessagesFile: compiler:Default.isl Name: english; MessagesFile: compiler:Default.isl
@ -51,14 +53,16 @@ Name: slovenian; MessagesFile: compiler:Languages\Slovenian.isl
Name: spanish; MessagesFile: compiler:Languages\Spanish.isl Name: spanish; MessagesFile: compiler:Languages\Spanish.isl
[Tasks] [Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}
Name: quicklaunchicon; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked Name: quicklaunchicon; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}
[Files] [Files]
Source: C:\Documents and Settings\raoul\My Documents\My Projects\openlp\pyinstaller\dist\openlp\*; DestDir: {app}; Flags: ignoreversion Source: ..\..\dist\OpenLP\*; DestDir: {app}; Flags: ignoreversion
Source: C:\Documents and Settings\raoul\My Documents\My Projects\openlp\pyinstaller\dist\openlp\plugins\*; DestDir: {app}\plugins; Flags: ignoreversion recursesubdirs createallsubdirs Source: ..\..\dist\OpenLP\plugins\*; DestDir: {app}\plugins; Flags: ignoreversion recursesubdirs createallsubdirs
Source: C:\Documents and Settings\raoul\My Documents\My Projects\openlp\pyinstaller\dist\openlp\Microsoft.VC90.CRT\*; DestDir: {app}\Microsoft.VC90.CRT; Flags: ignoreversion recursesubdirs createallsubdirs Source: ..\..\dist\OpenLP\Microsoft.VC90.CRT\*; DestDir: {app}\Microsoft.VC90.CRT; Flags: ignoreversion recursesubdirs createallsubdirs
Source: C:\Documents and Settings\raoul\My Documents\My Projects\openlp\pyinstaller\dist\openlp\qt4_plugins\*; DestDir: {app}\qt4_plugins; Flags: ignoreversion recursesubdirs createallsubdirs Source: ..\..\dist\OpenLP\qt4_plugins\*; DestDir: {app}\qt4_plugins; Flags: ignoreversion recursesubdirs createallsubdirs
Source: ..\..\dist\OpenLP\eggs\*; DestDir: {app}\eggs; Flags: ignoreversion recursesubdirs createallsubdirs
Source: openlp.conf; DestDir: {userappdata}\openlp; Flags: ignoreversion onlyifdoesntexist
; NOTE: Don't use "Flags: ignoreversion" on any shared system files ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons] [Icons]

View File

@ -0,0 +1,26 @@
[bibles]
status = 1
[media]
status = 1
[alerts]
status = 1
[presentations]
status = 1
[custom]
status = 1
[remotes]
status = 0
[images]
status = 1
[songusage]
status = 1
[songs]
status = 1

View File

@ -0,0 +1 @@
hiddenimports = ['lxml.etree']