mirror of
https://gitlab.com/openlp/packaging.git
synced 2024-12-22 04:52:50 +00:00
Merge Tomas' fixes
This commit is contained in:
commit
5bb973c118
@ -37,7 +37,8 @@ PyEnchant
|
||||
installed. You can find this on the PyEnchant site.
|
||||
|
||||
WiX Toolset
|
||||
Inno Setup should be installed into "C:\\%PROGRAMFILES%\\Inno Setup 5"
|
||||
The toolset should be installed into "C:\\%PROGRAMFILES%\\WiX Toolset v3.11"
|
||||
or similar.
|
||||
|
||||
Sphinx
|
||||
This is used to build the documentation. The documentation trunk must be at
|
||||
@ -61,15 +62,6 @@ windows-builder.py
|
||||
This script, of course. It should be in the "windows-installer" directory
|
||||
at the same level as OpenLP trunk.
|
||||
|
||||
psvince.dll
|
||||
This dll is used during the actual install of OpenLP to check if OpenLP is
|
||||
running on the users machine prior to the setup. If OpenLP is running,
|
||||
the install will fail. The dll can be obtained from here:
|
||||
|
||||
http://www.vincenzo.net/isxkb/index.php?title=PSVince
|
||||
|
||||
The dll is presently included with this script.
|
||||
|
||||
Mako
|
||||
Mako Templates for Python. This package is required for building the
|
||||
remote plugin. It can be installed by going to your
|
||||
@ -83,11 +75,6 @@ MuPDF
|
||||
mupdf.com, extract it, and set the mutoolbin option in the config file to
|
||||
point to mutool.exe.
|
||||
|
||||
MediaInfo
|
||||
Required for the media plugin. Download the 32-bit CLI windows build from
|
||||
https://mediaarea.net/nn/MediaInfo/Download/Windows and set the
|
||||
mediainfobin option in the config file to point to MediaInfo.exe.
|
||||
|
||||
Portable App Builds
|
||||
The following are required if you are planning to make a portable build of
|
||||
OpenLP. The portable build conforms to the standards published by
|
||||
@ -120,10 +107,6 @@ from lxml.builder import E
|
||||
|
||||
from builder import Builder
|
||||
|
||||
BLACKLIST = [
|
||||
'pptviewlib.dll.intermediate.manifest'
|
||||
]
|
||||
|
||||
|
||||
class WindowsBuilder(Builder):
|
||||
"""
|
||||
@ -169,8 +152,6 @@ class WindowsBuilder(Builder):
|
||||
parent_dir[base] = new_dir
|
||||
parent_dir['__dir__'].append(element)
|
||||
for fname in files:
|
||||
if fname in BLACKLIST:
|
||||
continue
|
||||
source = os.path.join(path, fname) if path else fname
|
||||
source_id = md5(source).hexdigest()
|
||||
file_id = 'file_{source_id}'.format(source_id=source_id)
|
||||
@ -194,17 +175,19 @@ class WindowsBuilder(Builder):
|
||||
self._print_verbose('Reading base WiX file')
|
||||
with open(os.path.join(config_dir, 'OpenLP-base.wxs'), 'rt') as base_file:
|
||||
xml = base_file.read()
|
||||
progfilefolder = 'ProgramFiles64Folder' if self.arch == 'x64' else 'ProgramFilesFolder'
|
||||
xml = xml % dict(dialog=os.path.join(config_dir, 'WizardMain.bmp'),
|
||||
banner=os.path.join(config_dir, 'WizardBanner.bmp'))
|
||||
banner=os.path.join(config_dir, 'WizardBanner.bmp'),
|
||||
platform=self.arch,
|
||||
progfilefolder=progfilefolder)
|
||||
tree = fromstring(xml.encode('utf8'))
|
||||
self._print_verbose('Creating XML fragments from files and directories')
|
||||
fragments = self._get_fragments_from_files(self.dist_path)
|
||||
self._print_verbose('Inserting XML fragments into base WiX file')
|
||||
wix = tree.getroot()
|
||||
for fragment in fragments:
|
||||
wix.append(fragment)
|
||||
tree.append(fragment)
|
||||
self._print_verbose('Writing new WiX file')
|
||||
with open(os.path.join(self.config_path, 'OpenLP.wxs'), 'wb') as f:
|
||||
with open(os.path.join(config_dir, 'OpenLP.wxs'), 'wb') as f:
|
||||
f.write(tostring(tree, encoding='utf-8', xml_declaration=True, pretty_print=True))
|
||||
|
||||
def _run_wix_tools(self):
|
||||
@ -213,7 +196,7 @@ class WindowsBuilder(Builder):
|
||||
"""
|
||||
self._print('Running WiX tools...')
|
||||
msi_file = os.path.join(self.dist_path, 'OpenLP-{}.msi'.format(self.version))
|
||||
if msi_file:
|
||||
if os.path.exists(msi_file):
|
||||
self._print_verbose('Removing old MSI file')
|
||||
os.unlink(msi_file)
|
||||
config_dir = os.path.dirname(self.config_path)
|
||||
@ -380,8 +363,6 @@ class WindowsBuilder(Builder):
|
||||
copy(self.icon_path, os.path.join(self.dist_path, 'OpenLP.ico'))
|
||||
self._print_verbose('... LICENSE.txt')
|
||||
copy(self.license_path, os.path.join(self.dist_path, 'LICENSE.txt'))
|
||||
self._print_verbose('... psvince.dll')
|
||||
copy(self.psvince_exe, os.path.join(self.dist_path, 'psvince.dll'))
|
||||
if os.path.isfile(os.path.join(self.helpfile_path, 'OpenLP.chm')):
|
||||
self._print_verbose('... OpenLP.chm')
|
||||
copy(os.path.join(self.helpfile_path, 'OpenLP.chm'), os.path.join(self.dist_path, 'OpenLP.chm'))
|
||||
@ -392,11 +373,6 @@ class WindowsBuilder(Builder):
|
||||
copy(os.path.join(self.mutool_exe), os.path.join(self.dist_path, 'mutool.exe'))
|
||||
else:
|
||||
self._print('... WARNING: mutool.exe not found')
|
||||
self._print_verbose('... MediaInfo.exe')
|
||||
if self.mediainfo_exe and os.path.isfile(self.mediainfo_exe):
|
||||
copy(os.path.join(self.mediainfo_exe), os.path.join(self.dist_path, 'MediaInfo.exe'))
|
||||
else:
|
||||
self._print('... WARNING: MediaInfo.exe not found')
|
||||
|
||||
def after_run_sphinx(self):
|
||||
"""
|
||||
|
@ -5,7 +5,7 @@
|
||||
UpgradeCode="{8C5881AC-8F1E-4937-BB99-B823FABF18F0}" Language="1033" Codepage="1252" Version="2.5.0">
|
||||
<Package Id="*" Keywords="Installer" Description="Free open source church worship presentation software"
|
||||
Comments="OpenLP is open source under the GNU General Public License" Manufacturer="OpenLP Developers"
|
||||
InstallerVersion="251" Languages="1033" Compressed="yes" SummaryCodepage="1252"/>
|
||||
InstallerVersion="251" Languages="1033" Compressed="yes" SummaryCodepage="1252" Platform="%(platform)s"/>
|
||||
<Condition Message="You need to be an administrator to install this product.">Privileged</Condition>
|
||||
<Media Id="1" Cabinet="openlp.cab" EmbedCab="yes"/>
|
||||
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
|
||||
@ -24,7 +24,7 @@
|
||||
<WixVariable Id="WixUIDialogBmp" Value="%(dialog)s" />
|
||||
<WixVariable Id="WixUIBannerBmp" Value="%(banner)s" />
|
||||
<Directory Id="TARGETDIR" Name="SourceDir">
|
||||
<Directory Id="ProgramFilesFolder">
|
||||
<Directory Id="%(progfilefolder)s">
|
||||
<Directory Id="INSTALLDIR" Name="OpenLP"/>
|
||||
</Directory>
|
||||
<Directory Id="ProgramMenuFolder" Name="Programs">
|
||||
|
@ -1,187 +0,0 @@
|
||||
; Script generated by the Inno Setup Script Wizard.
|
||||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
||||
|
||||
#define AppName "OpenLP"
|
||||
#define AppVerName "OpenLP %(display_version)s"
|
||||
#define AppVersion "%(display_version)s"
|
||||
#define AppPublisher "OpenLP Developers"
|
||||
#define AppURL "http://openlp.org/"
|
||||
#define AppExeName "OpenLP.exe"
|
||||
#define Arch "%(arch)s"
|
||||
|
||||
#define FileHandle FileOpen("%(branch)s\dist\OpenLP\.version")
|
||||
#define FileLine FileRead(FileHandle)
|
||||
#define RealVersion FileLine
|
||||
#expr FileClose(FileHandle)
|
||||
|
||||
[Setup]
|
||||
; 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}
|
||||
AppName={#AppName}
|
||||
AppVerName={cm:NameAndVersion,{#AppName},{#AppVersion}}
|
||||
AppVersion={#AppVersion}
|
||||
AppPublisher={#AppPublisher}
|
||||
AppPublisherURL={#AppURL}
|
||||
AppSupportURL={#AppURL}
|
||||
AppUpdatesURL={#AppURL}
|
||||
DefaultDirName={pf}\{#AppName}
|
||||
DefaultGroupName={#AppName}
|
||||
AllowNoIcons=true
|
||||
LicenseFile=LICENSE.txt
|
||||
OutputDir=%(branch)s\dist\
|
||||
OutputBaseFilename=OpenLP-{#RealVersion}-{#Arch}-setup
|
||||
Compression=lzma/Max
|
||||
SolidCompression=true
|
||||
SetupIconFile=OpenLP.ico
|
||||
VersionInfoVersion={#AppVersion}
|
||||
WizardImageFile=WizImageBig.bmp
|
||||
WizardSmallImageFile=WizImageSmall.bmp
|
||||
ChangesAssociations=true
|
||||
|
||||
[Languages]
|
||||
Name: english; MessagesFile: compiler:Default.isl
|
||||
Name: brazilianportuguese; MessagesFile: compiler:Languages\BrazilianPortuguese.isl
|
||||
Name: catalan; MessagesFile: compiler:Languages\Catalan.isl
|
||||
Name: czech; MessagesFile: compiler:Languages\Czech.isl
|
||||
Name: danish; MessagesFile: compiler:Languages\Danish.isl
|
||||
Name: dutch; MessagesFile: compiler:Languages\Dutch.isl
|
||||
Name: finnish; MessagesFile: compiler:Languages\Finnish.isl
|
||||
Name: french; MessagesFile: compiler:Languages\French.isl
|
||||
Name: german; MessagesFile: compiler:Languages\German.isl
|
||||
Name: hebrew; MessagesFile: compiler:Languages\Hebrew.isl
|
||||
Name: hungarian; MessagesFile: compiler:Languages\Hungarian.isl
|
||||
Name: italian; MessagesFile: compiler:Languages\Italian.isl
|
||||
Name: japanese; MessagesFile: compiler:Languages\Japanese.isl
|
||||
Name: norwegian; MessagesFile: compiler:Languages\Norwegian.isl
|
||||
Name: polish; MessagesFile: compiler:Languages\Polish.isl
|
||||
Name: portuguese; MessagesFile: compiler:Languages\Portuguese.isl
|
||||
Name: russian; MessagesFile: compiler:Languages\Russian.isl
|
||||
Name: slovenian; MessagesFile: compiler:Languages\Slovenian.isl
|
||||
Name: spanish; MessagesFile: compiler:Languages\Spanish.isl
|
||||
|
||||
[Tasks]
|
||||
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}
|
||||
Name: quicklaunchicon; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}; OnlyBelowVersion: 0, 6.1
|
||||
|
||||
[Files]
|
||||
Source: %(branch)s\dist\OpenLP\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||
; DLL used to check if the target program is running at install time
|
||||
Source: psvince.dll; flags: dontcopy
|
||||
; psvince is installed in {app} folder, so it will be loaded at
|
||||
; uninstall time to check if the target program is running
|
||||
Source: psvince.dll; DestDir: {app}
|
||||
|
||||
[Icons]
|
||||
Name: {group}\{#AppName}; Filename: {app}\{#AppExeName}
|
||||
Name: {group}\{#AppName} (Debug); Filename: {app}\{#AppExeName}; Parameters: -l debug
|
||||
Name: {group}\{#AppName} Help; Filename: {app}\{#AppName}.chm; Check: FileExists(ExpandConstant('{app}\{#AppName}.chm'))
|
||||
Name: {group}\{cm:ProgramOnTheWeb,{#AppName}}; Filename: {#AppURL}
|
||||
Name: {group}\{cm:UninstallProgram,{#AppName}}; Filename: {uninstallexe}
|
||||
Name: {commondesktop}\{#AppName}; Filename: {app}\{#AppExeName}; Tasks: desktopicon
|
||||
Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\{#AppName}; Filename: {app}\{#AppExeName}; Tasks: quicklaunchicon
|
||||
|
||||
[Run]
|
||||
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: .oszl; 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"""
|
||||
|
||||
[UninstallDelete]
|
||||
; Remove support directory created when program is run:
|
||||
Type: filesandordirs; Name: {app}\support
|
||||
; Remove program directory if empty:
|
||||
Name: {app}; Type: dirifempty
|
||||
|
||||
[Code]
|
||||
// Function to call psvince.dll at install time
|
||||
function IsModuleLoadedInstall(modulename: AnsiString ): Boolean;
|
||||
external 'IsModuleLoaded@files:psvince.dll stdcall setuponly';
|
||||
|
||||
// Function to call psvince.dll at uninstall time
|
||||
function IsModuleLoadedUninstall(modulename: AnsiString ): Boolean;
|
||||
external 'IsModuleLoaded@{app}\psvince.dll stdcall uninstallonly' ;
|
||||
|
||||
function GetUninstallString(): String;
|
||||
var
|
||||
sUnInstPath: String;
|
||||
sUnInstallString: String;
|
||||
begin
|
||||
sUnInstPath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\{#emit SetupSetting("AppId")}_is1');
|
||||
sUnInstallString := '';
|
||||
if not RegQueryStringValue(HKLM, sUnInstPath, 'UninstallString', sUnInstallString) then
|
||||
RegQueryStringValue(HKCU, sUnInstPath, 'UninstallString', sUnInstallString);
|
||||
Result := sUnInstallString;
|
||||
end;
|
||||
|
||||
function IsUpgrade(): Boolean;
|
||||
begin
|
||||
Result := (GetUninstallString() <> '');
|
||||
end;
|
||||
|
||||
// Return Values:
|
||||
// 1 - uninstall string is empty
|
||||
// 2 - error executing the UnInstallString
|
||||
// 3 - successfully executed the UnInstallString
|
||||
function UnInstallOldVersion(): Integer;
|
||||
var
|
||||
sUnInstallString: String;
|
||||
iResultCode: Integer;
|
||||
begin
|
||||
Result := 0;
|
||||
sUnInstallString := GetUninstallString();
|
||||
if sUnInstallString <> '' then
|
||||
begin
|
||||
sUnInstallString := RemoveQuotes(sUnInstallString);
|
||||
if Exec(sUnInstallString, '/SILENT /NORESTART /SUPPRESSMSGBOXES','', SW_HIDE, ewWaitUntilTerminated, iResultCode) then
|
||||
Result := 3
|
||||
else
|
||||
Result := 2;
|
||||
end
|
||||
else
|
||||
Result := 1;
|
||||
end;
|
||||
|
||||
function InitializeSetup(): Boolean;
|
||||
begin
|
||||
Result := true;
|
||||
while IsModuleLoadedInstall( '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
|
||||
begin
|
||||
if (IsUpgrade()) then
|
||||
begin
|
||||
UnInstallOldVersion();
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function InitializeUninstall(): Boolean;
|
||||
begin
|
||||
Result := true;
|
||||
while IsModuleLoadedUninstall( 'OpenLP.exe' ) and Result do
|
||||
begin
|
||||
if MsgBox( 'Openlp is currently running, please close it to continue the uninstall.',
|
||||
mbError, MB_OKCANCEL ) = IDCANCEL then
|
||||
begin
|
||||
Result := false;
|
||||
end;
|
||||
end;
|
||||
// Unload psvince.dll, otherwise it is not deleted
|
||||
UnloadDLL(ExpandConstant('{app}\psvince.dll'));
|
||||
end;
|
@ -1,14 +1,13 @@
|
||||
[executables]
|
||||
innosetup = %(progfiles)s\Inno Setup 5\ISCC.exe
|
||||
sphinx = %(pyroot)s\Scripts\sphinx-build.exe
|
||||
pyinstaller = %(pyroot)s\Scripts\pyinstaller-script.py
|
||||
htmlhelp = %(progfiles)s\HTML Help Workshop\hhc.exe
|
||||
psvince = %(here)s\psvince.dll
|
||||
lrelease = C:\Qt\5.12\msvc2017\bin\lrelease.exe
|
||||
portablelauncher = %(here)s\..\..\PortableApps.comLauncher\PortableApps.comLauncherGenerator.exe
|
||||
portableinstaller = %(here)s\..\..\PortableApps.comInstaller\PortableApps.comInstaller.exe
|
||||
mutool = %(here)s\..\..\mupdf-1.14.0-windows\mutool.exe
|
||||
mediainfo = %(here)s\..\..\MediaInfo\MediaInfo.exe
|
||||
candle = %(progfiles)s\WiX Toolset v3.11\bin\candle.exe
|
||||
light = %(progfiles)s\WiX Toolset v3.11\bin\light.exe
|
||||
|
||||
[paths]
|
||||
branch = %(projects)s\openlp-branch
|
||||
|
@ -1,22 +1,21 @@
|
||||
[executables]
|
||||
innosetup = %(progfiles)s\Inno Setup 5\ISCC.exe
|
||||
sphinx = %(pyroot)s\Scripts\sphinx-build.exe
|
||||
pyinstaller = %(here)s\..\pyinstaller\pyinstaller.py
|
||||
htmlhelp = %(progfiles)s\HTML Help Workshop\hhc.exe
|
||||
psvince = %(here)s\psvince.dll
|
||||
lrelease = %(sitepackages)s\PyQt5\bin\lrelease.exe
|
||||
portablelauncher = %(progfiles)s\PortableApps.comLauncher\PortableApps.comLauncherGenerator.exe
|
||||
portableinstaller = %(progfiles)s\PortableApps.comInstaller\PortableApps.comInstaller.exe
|
||||
mutool = %(here)s\..\mupdf-1.9a-windows\mutool.exe
|
||||
mediainfo = %(here)s\..\MediaInfo\MediaInfo.exe
|
||||
candle = %(progfiles)s\WiX Toolset v3.11\bin\candle.exe
|
||||
light = %(progfiles)s\WiX Toolset v3.11\bin\light.exe
|
||||
|
||||
[paths]
|
||||
branch = %(projects)s\trunk
|
||||
documentation = %(projects)s\documentation
|
||||
icon = %(here)s\OpenLP.ico
|
||||
hooks = %(here)s\..\pyinstaller-hooks
|
||||
icon = %(here)s\windows\OpenLP.ico
|
||||
hooks = %(here)s\pyinstaller-hooks
|
||||
license = %(here)s\LICENSE.txt
|
||||
portable_source = %(here)s\OpenLPPortable
|
||||
portable_source = %(here)s\windows\OpenLPPortable
|
||||
portable_dest = %(projects)s\OpenLPPortable
|
||||
|
||||
[transifex]
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user