diff --git a/resources/windows/OpenLP-2.0.iss b/resources/windows/OpenLP-2.0.iss index adeb4ef7c..9d2e6bfaa 100644 --- a/resources/windows/OpenLP-2.0.iss +++ b/resources/windows/OpenLP-2.0.iss @@ -65,6 +65,7 @@ Name: quicklaunchicon; Description: {cm:CreateQuickLaunchIcon}; GroupDescription [Files] Source: ..\..\dist\OpenLP\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs +Source: psvince.dll; Flags: dontcopy ; NOTE: Don't use "Flags: ignoreversion" on any shared system files [Icons] @@ -86,6 +87,9 @@ Root: HKCR; Subkey: "OpenLP\DefaultIcon"; ValueType: string; ValueName: ""; Valu Root: HKCR; Subkey: "OpenLP\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\OpenLP.exe"" ""%1""" [Code] +function IsModuleLoaded(modulename: String ): Boolean; +external 'IsModuleLoaded@files:psvince.dll stdcall'; + function GetUninstallString(): String; var sUnInstPath: String; @@ -126,6 +130,19 @@ begin Result := 1; end; +function InitializeSetup(): Boolean; +begin + Result := true; + while IsModuleLoaded( 'OpenLP.exe' ) and Result do + begin + if MsgBox( 'Openlp is currently running, please close it to continue the install.', + mbError, MB_OKCANCEL ) = IDCANCEL then + begin + Result := false; + end; + end; +end; + procedure CurStepChanged(CurStep: TSetupStep); begin if (CurStep=ssInstall) then diff --git a/resources/windows/psvince.dll b/resources/windows/psvince.dll new file mode 100644 index 000000000..e910509d0 Binary files /dev/null and b/resources/windows/psvince.dll differ diff --git a/scripts/windows-builder.py b/scripts/windows-builder.py index 8f2dc0171..26394f189 100644 --- a/scripts/windows-builder.py +++ b/scripts/windows-builder.py @@ -225,6 +225,8 @@ def copy_windows_files(): os.path.join(dist_path, u'OpenLP.ico')) copy(os.path.join(winres_path, u'LICENSE.txt'), os.path.join(dist_path, u'LICENSE.txt')) + copy(os.path.join(winres_path, u'psvince.dll'), + os.path.join(dist_path, u'psvince.dll')) if os.path.isfile(os.path.join(helpfile_path, u'Openlp.chm')): print u' Windows help file found' copy(os.path.join(helpfile_path, u'Openlp.chm'),