forked from openlp/openlp
Open a service file via the command line or by double clicking on the file on Windows systems
bzr-revno: 1563
This commit is contained in:
commit
64b08da271
@ -85,10 +85,13 @@ class OpenLP(QtGui.QApplication):
|
||||
QtGui.QApplication.exec_()
|
||||
self.sharedMemory.detach()
|
||||
|
||||
def run(self):
|
||||
def run(self, args):
|
||||
"""
|
||||
Run the OpenLP application.
|
||||
"""
|
||||
# On Windows, the args passed into the constructor are
|
||||
# ignored. Not very handy, so set the ones we want to use.
|
||||
self.args = args
|
||||
# provide a listener for widgets to reqest a screen update.
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'openlp_process_events'), self.processEvents)
|
||||
@ -115,7 +118,7 @@ class OpenLP(QtGui.QApplication):
|
||||
# make sure Qt really display the splash screen
|
||||
self.processEvents()
|
||||
# start the main app window
|
||||
self.mainWindow = MainWindow(self.clipboard(), self.arguments())
|
||||
self.mainWindow = MainWindow(self.clipboard(), self.args)
|
||||
self.mainWindow.show()
|
||||
if show_splash:
|
||||
# now kill the splashscreen
|
||||
@ -250,7 +253,7 @@ def main():
|
||||
log.debug(u'Could not find default_translator.')
|
||||
if not options.no_error_form:
|
||||
sys.excepthook = app.hookException
|
||||
sys.exit(app.run())
|
||||
sys.exit(app.run(qt_args))
|
||||
|
||||
if __name__ == u'__main__':
|
||||
"""
|
||||
|
@ -625,11 +625,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
if self.liveController.display.isVisible():
|
||||
self.liveController.display.setFocus()
|
||||
self.activateWindow()
|
||||
# On Windows, arguments contains the entire commandline
|
||||
# So args[0]=='python' args[1]=='openlp.pyw'
|
||||
# Therefore this approach is not going to work
|
||||
# Bypass for now.
|
||||
if len(self.arguments) and os.name != u'nt':
|
||||
if len(self.arguments):
|
||||
args = []
|
||||
for a in self.arguments:
|
||||
args.extend([a])
|
||||
|
@ -16,7 +16,7 @@
|
||||
; NOTE: The value of AppId uniquely identifies this application.
|
||||
; Do not use the same AppId value in installers for other applications.
|
||||
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
|
||||
AppId={{AA7699FA-B2D2-43F4-8A70-D497D03C9485}
|
||||
AppID={{AA7699FA-B2D2-43F4-8A70-D497D03C9485}
|
||||
AppName={#AppName}
|
||||
AppVerName={#AppVerName}
|
||||
AppPublisher={#AppPublisher}
|
||||
@ -29,11 +29,12 @@ AllowNoIcons=true
|
||||
LicenseFile=LICENSE.txt
|
||||
OutputDir=..\..\dist
|
||||
OutputBaseFilename=OpenLP-{#RealVersion}-setup
|
||||
Compression=lzma
|
||||
Compression=lzma/Max
|
||||
SolidCompression=true
|
||||
SetupIconFile=OpenLP.ico
|
||||
WizardImageFile=WizImageBig.bmp
|
||||
WizardSmallImageFile=WizImageSmall.bmp
|
||||
ChangesAssociations=true
|
||||
|
||||
[Languages]
|
||||
Name: english; MessagesFile: compiler:Default.isl
|
||||
@ -79,6 +80,10 @@ Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\{#AppName}; Filenam
|
||||
Filename: {app}\{#AppExeName}; Description: {cm:LaunchProgram,{#AppName}}; Flags: nowait postinstall skipifsilent
|
||||
|
||||
[Registry]
|
||||
Root: HKCR; Subkey: ".osz"; ValueType: string; ValueName: ""; ValueData: "OpenLP"; Flags: uninsdeletevalue
|
||||
Root: HKCR; Subkey: "OpenLP"; ValueType: string; ValueName: ""; ValueData: "OpenLP Service"; Flags: uninsdeletekey
|
||||
Root: HKCR; Subkey: "OpenLP\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\OpenLP.exe,0"
|
||||
Root: HKCR; Subkey: "OpenLP\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\OpenLP.exe"" ""%1"""
|
||||
|
||||
[Code]
|
||||
function GetUninstallString(): String;
|
||||
|
Loading…
Reference in New Issue
Block a user