[PySide] Creating deployable GUI app (Mark)

Michael Herrmann michael at herrmann.io
Wed Feb 27 10:44:27 CET 2019


Hi Mark,

You could also use my https://build-system.fman.io. It extends PyInstaller
to fix the exact problems you described (DLLs, creating an installer).
Cristián is aware of it, don't know why he didn't mention it.

Cheers,
Michael


On Wed, Feb 27, 2019, 10:26 <pyside-request at qt-project.org wrote:

> Send PySide mailing list submissions to
>         pyside at qt-project.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://lists.qt-project.org/listinfo/pyside
> or, via email, send a message with subject or body 'help' to
>         pyside-request at qt-project.org
>
> You can reach the person managing the list at
>         pyside-owner at qt-project.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of PySide digest..."
>
>
> Today's Topics:
>
>    1. Creating deployable GUI app (Mark)
>    2. QOpenGLContext::versionFunctions() returns type
>       QAbstractOpenGLFunctions (Maxime Lemonnier)
>    3.  Creating deployable GUI app (Mark)
>    4. Re: @Property syntax broken? (Cristián Maureira-Fredes)
>    5. Re: Creating deployable GUI app (Cristián Maureira-Fredes)
>    6. Re: QOpenGLContext::versionFunctions() returns    type
>       QAbstractOpenGLFunctions (Cristián Maureira-Fredes)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 26 Feb 2019 15:37:24 +0000
> From: Mark <list at qtrac.plus.com>
> To: pyside at qt-project.org
> Subject: [PySide] Creating deployable GUI app
> Message-ID: <86f5df69840557321bf39a73318ea0df at imap.plus.net>
> Content-Type: text/plain; charset=US-ASCII; format=flowed
>
> Hi,
>
> I'm trying to create a .msi or -setup.exe (or even just a .zip) that's
> deployable.
>
> I'm using Python 3.6 and PySide2 5.12.
>
> With Python 3.4 and PySide1 I was able to use cx-freeze with no
> problems. But I can't get things to work with 3.6 and PySide2.
>
> The error is:
> 'failed to start because no qt platform plugin could be initialized'
>
> I've made sure that I create a plugins folder with imageformats and
> platforms etc., that I populate from PySide2 in site-packages, but when
> I use a dependency tool on the resultant .exe it lists these as missing:
>
> API-MS-WIN-APPMODEL-RUNTIME-L1-1-0.DLL
> API-MS-WIN-CORE-WINRT-ERROR-L1-1-0.DLL
> API-MS-WIN-CORE-WINRT-L1-1-0.DLL
> API-MS-WIN-CORE-WINRT-ROBUFFER-L1-1-0.DLL
> API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL
> API-MS-WIN-SHCORE-SCALING-L1-1-1.DLL
> DCOMP.DLL
> IESHIMS.DLL
>
> Has anyone else had similar problems and come up with solutions?
>
> Thanks!
>
>
> ------------------------------
>
> Message: 2
> Date: Tue, 26 Feb 2019 18:37:05 +0000
> From: Maxime Lemonnier <maxime.lemonnier at gmail.com>
> To: pyside at qt-project.org
> Subject: [PySide] QOpenGLContext::versionFunctions() returns type
>         QAbstractOpenGLFunctions
> Message-ID:
>         <CAK_=
> Pd0r-ghkzPhQ4Xpdgd7gJWSmzzt+fRg-QtqMDcGVGQD3dA at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi,
>
> porting my app from PyQt5 to PySide2 (5.12, PyPI latest)
>
> QOpenGLContext.versionFunctions(some_profile) returns type
> QAbstractOpenGLFunctions with a absent API.
>
> In PyQt5, it would returned a properly casted e.g.
> QOpenGLFunctions_4_1_Core*
> type which would allow me to use the gl API.
>
> Is there a workaround?
>
> Thanks
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.qt-project.org/pipermail/pyside/attachments/20190226/5137ff4a/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 3
> Date: Tue, 26 Feb 2019 18:50:22 +0000
> From: Mark <list at qtrac.plus.com>
> To: pyside at qt-project.org
> Subject: [PySide]  Creating deployable GUI app
> Message-ID: <1e1c083a251cc3c8e3c070750227a00d at imap.plus.net>
> Content-Type: text/plain; charset=US-ASCII; format=flowed
>
> I've now successfully used PyInstaller to create a 'dist' folder with
> all the correct dependencies:
>
> C:\> C:\bin\py36\Scripts\pyinstaller.exe ^
> --noupx -y -D -w --clean --log-level WARN ^
> -p "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64" ^
> -p "C:\bin\py36\\Lib\site-packages\shiboken2" ^
> -n MyApp -i icon.ico myapp.py
>
> This creates a dist subdir with a MyApp folder with all the correct
> .pyd's and .dll's (as far as I can tell).
>
> But when I run MyApp.exe I get a 'Fatal error detected' message saying
> 'Failed to execute script pyi_rth_pkgres'.
>
> So now I'm stuck again!
>
> Looking forward to the day the PySide2 project provides some nice
> Qt-quality support for redeployment:-)
>
>
> ------------------------------
>
> Message: 4
> Date: Wed, 27 Feb 2019 08:51:17 +0000
> From: Cristián Maureira-Fredes  <Cristian.Maureira-Fredes at qt.io>
> To: Maxime Lemonnier <maxime.lemonnier at gmail.com>,
>         "pyside at qt-project.org" <pyside at qt-project.org>
> Subject: Re: [PySide] @Property syntax broken?
> Message-ID:
>         <
> AM6PR02MB48668B91BDD20BB7DCEFD63ADA740 at AM6PR02MB4866.eurprd02.prod.outlook.com
> >
>
> Content-Type: text/plain; charset="iso-8859-9"
>
> Hello Maxime,
>
> you are right, that's a real bug.
> Luckily we managed to solve that issue and it will be included in the next
> release.
> https://codereview.qt-project.org/#/c/252324/
>
> Cheers
>
> ________________________________________
> From: PySide <pyside-bounces at qt-project.org> on behalf of Maxime
> Lemonnier <maxime.lemonnier at gmail.com>
> Sent: 25 February 2019 22:47
> To: pyside at qt-project.org
> Subject: [PySide] @Property syntax broken?
>
> Hi, using the latest pyside2 from PyPi (version 5.12). I fail to use the
> decorator syntax with PySide2:
>
> The following works:
>
> -----------------------------------------------------------
> from PySide2.QtCore import Signal, Property, Slot, QObject, QTimer
> class Foo(QObject):
>     def __init__(self, parent=None):
>         super(Foo, self).__init__(parent)
>
>     autoUpdateChanged = Signal()
>     def autoUpdate_(self):
>         return self._autoUpdate
>
>     def autoUpdate__(self, d):
>         if self._autoUpdate != d:
>             self._autoUpdate = d
>             self.autoUpdateChanged.emit()
>
>     autoUpdate = Property(bool, autoUpdate_, autoUpdate__, notify =
> autoUpdateChanged)
>
>
> The following fails with Cannot assign to non-existent property
> "autoUpdate" :
>
>
> ------------------------------------------------------------------------------------
> from PySide2.QtCore import Signal, Property, Slot, QObject, QTimer
> class Foo(QObject):
>     def __init__(self, parent=None):
>         super(Foo, self).__init__(parent)
>
>     autoUpdateChanged = Signal()
>     @Property(bool, notify = autoUpdateChanged)
>     def autoUpdate(self):
>         return self._autoUpdate
>
>     @autoUpdate.setter
>     def autoUpdate(self, d):
>         if self._autoUpdate != d:
>             self._autoUpdate = d
>             self.autoUpdateChanged.emit()
>
>
>
> --------------------------
>
> Am-I missusing the syntax? I googled for more than one hour in search for
> a similar issue before posting here.
>
> Thank you
>
>
> ------------------------------
>
> Message: 5
> Date: Wed, 27 Feb 2019 09:19:40 +0000
> From: Cristián Maureira-Fredes  <Cristian.Maureira-Fredes at qt.io>
> To: Mark <list at qtrac.plus.com>, "pyside at qt-project.org"
>         <pyside at qt-project.org>
> Subject: Re: [PySide] Creating deployable GUI app
> Message-ID:
>         <
> AM6PR02MB4866D2D607809AA9D7A0F112DA740 at AM6PR02MB4866.eurprd02.prod.outlook.com
> >
>
> Content-Type: text/plain; charset="iso-8859-9"
>
> Hello Mark,
>
> I personally recommend PyInstaller over cx_Freeze,
> so I'm glad things worked out.
> Regarding your issue there is a similar case here:
>
> https://github.com/pyinstaller/pyinstaller/issues/2137
>
> Are you using the latest PyInstaller and PySide2 versions?
> There has been a couple of issues recently, like:
> https://bugreports.qt.io/browse/PYSIDE-942
> but at the moment your error seems to be related to PyInstaller.
>
> Maybe you can drop by our IRC channel on freenode #qt-pyside
> and ask around when facing a new problem, since there are
> many people currently using PyInstaller.
>
> Cheers
>
> ________________________________________
> From: PySide <pyside-bounces at qt-project.org> on behalf of Mark <
> list at qtrac.plus.com>
> Sent: 26 February 2019 19:50
> To: pyside at qt-project.org
> Subject: [PySide]  Creating deployable GUI app
>
> I've now successfully used PyInstaller to create a 'dist' folder with
> all the correct dependencies:
>
> C:\> C:\bin\py36\Scripts\pyinstaller.exe ^
> --noupx -y -D -w --clean --log-level WARN ^
> -p "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64" ^
> -p "C:\bin\py36\\Lib\site-packages\shiboken2" ^
> -n MyApp -i icon.ico myapp.py
>
> This creates a dist subdir with a MyApp folder with all the correct
> .pyd's and .dll's (as far as I can tell).
>
> But when I run MyApp.exe I get a 'Fatal error detected' message saying
> 'Failed to execute script pyi_rth_pkgres'.
>
> So now I'm stuck again!
>
> Looking forward to the day the PySide2 project provides some nice
> Qt-quality support for redeployment:-)
> _______________________________________________
> PySide mailing list
> PySide at qt-project.org
> https://lists.qt-project.org/listinfo/pyside
>
>
> ------------------------------
>
> Message: 6
> Date: Wed, 27 Feb 2019 09:25:50 +0000
> From: Cristián Maureira-Fredes  <Cristian.Maureira-Fredes at qt.io>
> To: Maxime Lemonnier <maxime.lemonnier at gmail.com>,
>         "pyside at qt-project.org" <pyside at qt-project.org>
> Subject: Re: [PySide] QOpenGLContext::versionFunctions() returns
> type
>         QAbstractOpenGLFunctions
> Message-ID:
>         <
> AM6PR02MB4866AAB377A83EFE97A59BC6DA740 at AM6PR02MB4866.eurprd02.prod.outlook.com
> >
>
> Content-Type: text/plain; charset="iso-8859-9"
>
> Hello Maxime,
>
> Since you said it does not contain a proper API,
> it seems to be a bug.
>
> Can you please report it in https://bugreports.qt.io/projects/PYSIDE
> along with a small reproducible example.
>
>
> Cheers
>
> ________________________________________
> From: PySide <pyside-bounces at qt-project.org> on behalf of Maxime
> Lemonnier <maxime.lemonnier at gmail.com>
> Sent: 26 February 2019 19:37
> To: pyside at qt-project.org
> Subject: [PySide] QOpenGLContext::versionFunctions() returns type
>  QAbstractOpenGLFunctions
>
> Hi,
>
> porting my app from PyQt5 to PySide2 (5.12, PyPI latest)
>
> QOpenGLContext.versionFunctions(some_profile) returns type
> QAbstractOpenGLFunctions with a absent API.
>
> In PyQt5, it would returned a properly casted e.g.
> QOpenGLFunctions_4_1_Core* type which would allow me to use the gl API.
>
> Is there a workaround?
>
> Thanks
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> PySide mailing list
> PySide at qt-project.org
> https://lists.qt-project.org/listinfo/pyside
>
>
> ------------------------------
>
> End of PySide Digest, Vol 73, Issue 8
> *************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20190227/5b658ddb/attachment-0001.html>


More information about the PySide mailing list