← Back to team overview

openlp-core team mailing list archive

Re: [Merge] lp:~raoul-snyman/openlp/wix-packaging into lp:openlp/packaging

 

Replied :-)

Diff comments:

> 
> === modified file 'builders/windows-builder.py'
> --- builders/windows-builder.py	2019-03-13 21:00:05 +0000
> +++ builders/windows-builder.py	2019-05-20 22:20:27 +0000
> @@ -303,23 +389,30 @@
>          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'))
> +        self._print_verbose('... service_file.ico')
> +        config_dir = os.path.dirname(self.config_path)
> +        copy(os.path.join(config_dir, 'service_file.ico'), os.path.join(self.dist_path, 'service_file.ico'))
>          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'))
>          else:
>              self._print('... WARNING: Windows help file not found')
> -        self._print_verbose('... mutool.exe')
> -        if self.mutool_exe and os.path.isfile(self.mutool_exe):
> -            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')
> +        try:
> +            # Check if PyMuPDF is installed
> +            import fitz  # noqa
> +            HAS_PYMUPDF = True
> +        except ImportError:
> +            HAS_PYMUPDF = False
> +        if not HAS_PYMUPDF:
> +            self._print_verbose('... mutool.exe')
> +            if self.mutool_exe and os.path.isfile(self.mutool_exe):
> +                copy(os.path.join(self.mutool_exe), os.path.join(self.dist_path, 'mutool.exe'))
> +            else:
> +                self._print('... WARNING: mutool.exe not found')
> +        vlc_path = os.path.join(self.program_files, 'VideoLAN', 'VLC')

In 32-bit Python, "%PROGRAMFILES%" is set to "Program Files (x86)" while in 64-bot Python, "%PROGRAMFILES" is set to "Program Files". This line picks up the correct bit-ness version of VLC based on the bit-ness of Python.

> +        for fname in ['libvlc.dll', 'libvlccore.dll']:
> +            self._print_verbose('... {}'.format(fname))
> +            copy(os.path.join(vlc_path, fname), os.path.join(self.dist_path, fname))
>  
>      def after_run_sphinx(self):
>          """


-- 
https://code.launchpad.net/~raoul-snyman/openlp/wix-packaging/+merge/367668
Your team OpenLP Core is subscribed to branch lp:openlp/packaging.


References