@@ -629,6 +629,44 @@ def _create_batch_scripts_initial(self):
629629
630630:ffmpeg_bad
631631
632+
633+ rem ******************
634+ rem handle PySide2 if included
635+ rem ******************
636+ set tmp_pyz=%WINPYDIR%\Lib\site-packages\PySide2
637+ if not exist "%tmp_pyz%" goto pyside2_conf_exist
638+ set tmp_pyz=%tmp_pyz%\qt.conf
639+ if exist "%tmp_pyz%" goto pyside2_conf_exist
640+ echo [Paths]>>"%tmp_pyz%"
641+ echo Prefix = .>>"%tmp_pyz%"
642+ echo Binaries = .>>"%tmp_pyz%"
643+ :pyside2_conf_exist
644+
645+ rem ******************
646+ rem handle PyQt5 if included
647+ rem ******************
648+ set tmp_pyz=%WINPYDIR%\Lib\site-packages\PyQt5
649+ if not exist "%tmp_pyz%" goto pyqt5_conf_exist
650+ set tmp_pyz=%tmp_pyz%\qt.conf
651+ if exist "%tmp_pyz%" goto pyqt5_conf_exist
652+ echo [Paths]>>"%tmp_pyz%"
653+ echo Prefix = .>>"%tmp_pyz%"
654+ echo Binaries = .>>"%tmp_pyz%"
655+ :pyqt5_conf_exist
656+
657+ rem ******************
658+ rem handle PyQt4 if included
659+ rem ******************
660+ set tmp_pyz=%WINPYDIR%\Lib\site-packages\PyQt4
661+ if not exist "%tmp_pyz%" goto pyqt4_conf_exist
662+ set tmp_pyz=%tmp_pyz%\qt.conf
663+ if exist "%tmp_pyz%" goto pyqt4_conf_exist
664+ echo [Paths]>>"%tmp_pyz%"
665+ echo Prefix = .>>"%tmp_pyz%"
666+ echo Binaries = .>>"%tmp_pyz%"
667+ :pyqt4_conf_exist
668+
669+
632670rem ******************
633671rem WinPython.ini part (removed from nsis)
634672rem ******************
@@ -710,6 +748,47 @@ def _create_batch_scripts_initial(self):
710748 $env:IMAGEIO_FFMPEG_EXE = "%WINPYDIRBASE%\t\ffmpeg.exe"
711749}
712750
751+ #####################
752+ ### handle PySide2 if included
753+ #####################
754+
755+ $env:tmp_pyz = "$env:WINPYDIR\Lib\site-packages\PySide2"
756+ if (Test-Path "$env:tmp_pyz") {
757+ $env:tmp_pyz = "$env:tmp_pyz\qt.conf"
758+ if (-not (Test-Path "$env:tmp_pyz")) {
759+ "[Paths]"| Add-Content -Path $env:tmp_pyz
760+ "Prefix = ."| Add-Content -Path $env:tmp_pyz
761+ "Binaries = ."| Add-Content -Path $env:tmp_pyz
762+ }
763+ }
764+
765+ #####################
766+ ### handle PyQt5 if included
767+ #####################
768+ $env:tmp_pyz = "$env:WINPYDIR\Lib\site-packages\PyQt5"
769+ if (Test-Path "$env:tmp_pyz") {
770+ $env:tmp_pyz = "$env:tmp_pyz\qt.conf"
771+ if (-not (Test-Path "$env:tmp_pyz")) {
772+ "[Paths]"| Add-Content -Path $env:tmp_pyz
773+ "Prefix = ."| Add-Content -Path $env:tmp_pyz
774+ "Binaries = ."| Add-Content -Path $env:tmp_pyz
775+ }
776+ }
777+
778+ #####################
779+ ### handle PyQt4 if included
780+ #####################
781+ $env:tmp_pyz = "$env:WINPYDIR\Lib\site-packages\PyQt4"
782+ if (Test-Path "$env:tmp_pyz") {
783+ $env:tmp_pyz = "$env:tmp_pyz\qt.conf"
784+ if (-not (Test-Path "$env:tmp_pyz")) {
785+ "[Paths]"| Add-Content -Path $env:tmp_pyz
786+ "Prefix = ."| Add-Content -Path $env:tmp_pyz
787+ "Binaries = ."| Add-Content -Path $env:tmp_pyz
788+ }
789+ }
790+
791+
713792#####################
714793### WinPython.ini part (removed from nsis)
715794#####################
@@ -1050,8 +1129,10 @@ def _create_batch_scripts(self):
10501129 ) else (
10511130 "%WINPYDIR%\Lib\site-packages\PyQt5\designer.exe" %*
10521131 )
1053- ) else (
1132+ ) else if exist "%WINPYDIR%\Lib\site-packages\pyqt4\designer.exe" (
10541133 "%WINPYDIR%\Lib\site-packages\PyQt4\designer.exe" %*
1134+ ) else (
1135+ "%WINPYDIR%\Lib\site-packages\PySide2\designer.exe" %*
10551136)
10561137""" )
10571138
0 commit comments