Salome HOME
Fix path to mpicc and mpicxx
[tools/sat_salome.git] / products / compil_scripts / PyQt-5.9.bat
index ebd688fa0a33d331ade0a4fef3ef56b08ab0cde8..b1b2313c9c3111eaf9500fa1dc427555ae167fa3 100644 (file)
@@ -4,6 +4,10 @@ echo ##########################################################################
 echo PyQt %VERSION%
 echo ##########################################################################
 
+IF NOT DEFINED SAT_DEBUG (
+  SET SAT_DEBUG=0
+)
+
 if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL%
 REM clean BUILD directory
 if exist "%BUILD_DIR%" rmdir /Q /S %BUILD_DIR%
@@ -23,7 +27,12 @@ echo --------------------------------------------------------------------------
 echo *** python configure.py
 echo --------------------------------------------------------------------------
 
-python configure.py --confirm-license --no-designer-plugin --bindir=%PRODUCT_INSTALL%\bin --destdir=%PRODUCT_INSTALL%\lib\%python_name%\site-packages --sipdir=%PRODUCT_INSTALL%\sip --spec=win32-msvc --sip-incdir=%sip_incdir% --pyuic5-interpreter=%python_exe% --disable QtNfc --disable=QtNetwork --disable=QtWebSockets 2>&1
+set PRODUCT_BUILD_TYPE=
+if %SAT_DEBUG% == 1 (
+   python configure.py --confirm-license --no-designer-plugin --debug --bindir=%PRODUCT_INSTALL%\bin --destdir=%PRODUCT_INSTALL%\lib\%python_name%\site-packages --sipdir=%PRODUCT_INSTALL%\sip --spec=win32-msvc --sip-incdir=%sip_incdir% --pyuic5-interpreter=%python_exe% --disable QtNfc --disable=QtNetwork --disable=QtWebSockets 2>&1
+) else (
+   python configure.py --confirm-license --no-designer-plugin --bindir=%PRODUCT_INSTALL%\bin --destdir=%PRODUCT_INSTALL%\lib\%python_name%\site-packages --sipdir=%PRODUCT_INSTALL%\sip --spec=win32-msvc --sip-incdir=%sip_incdir% --pyuic5-interpreter=%python_exe% --disable QtNfc --disable=QtNetwork --disable=QtWebSockets 2>&1
+) 
 if NOT %ERRORLEVEL% == 0 (
     echo ERROR on python configure.py
     exit 1
@@ -53,6 +62,13 @@ if NOT %ERRORLEVEL% == 0 (
     exit 3
 )
 
+REM In debug mode, we need to rename all .pyd to _d.pyd.
+if %SAT_DEBUG% == 1 (
+  cd %PRODUCT_INSTALL%\lib\%python_name%\site-packages\PyQt5
+  powershell -Command "Get-ChildItem -File -Recurse *.pyd| ForEach-Object {if ((!$_.Name.EndsWith('_d.pyd'))) {  $_ | Copy-Item -Destination {$_.Name  -replace '.pyd','_d.pyd'}}}"
+  powershell -Command "Get-ChildItem -File -Recurse *_d.pyd| ForEach-Object {if (($_.Name.EndsWith('_d.pyd'))) {  $_ | Copy-Item -Destination {$_.Name  -replace '_d.pyd','.pyd'}}}"
+)
+
 echo.
 echo ########## END
 
@@ -61,4 +77,4 @@ EXIT /B
 
 :NORMALIZEPATH
   SET RETVAL=%~dpfn1
-  EXIT /B
\ No newline at end of file
+  EXIT /B