Hey Sophie!

Exactly. You first call …/pyrcc.bat without any arguments, and the console 
tells you what arguments pyrcc.bat takes.
Then you change directory, away from the pyrcc.bat and try to call after having 
changed to the directory where your resource file is.

Remain in the folder where the pyrcc5.bat is (otherwise the console will not 
know the command) and give the absolute paths of your target files in quotation 
mark (in case you have whitespaces in your dirs.) like I did in the below 
screenshot.

You might encounter the same problem with the pyuic5.bat -> which you use, when 
you want to translate the .ui file to python code with the pyqt5 bindings. In 
that case, I built myself a .bat file with the following commands, making the 
same as Jürgen suggested, (just in case of further tampering attempts ;) )

REM take all .ui files and apply it to the pyuic5.bat to all of them and output 
them as .py files
REM when calling this batch file the first argument needs to be the path to 
/python36/script
pushd %~dp0
echo off
call c:
cd %1
cd ../../../bin/
call "o4w_env.bat"
call qt5_env.bat
call py3_env.bat

path %OSGEO4W_ROOT%\apps\qgis-dev\bin;%PATH%
set QGIS_PREFIX_PATH=%OSGEO4W_ROOT:\=/%/apps/qgis-dev
set GDAL_FILENAME_IS_UTF8=YES
rem Set VSI cache to be used as buffer, see #6448
set VSI_CACHE=TRUE
set VSI_CACHE_SIZE=1000000
set 
QT_PLUGIN_PATH=%OSGEO4W_ROOT%\apps\qgis-dev\qtplugins;%OSGEO4W_ROOT%\apps\qt5\plugins
set PYTHONPATH=%OSGEO4W_ROOT%\apps\qgis-dev\python;%PYTHONPATH%

echo off

popd
for %%i in (*.ui) do (
                call "%1\pyuic5.bat" -o "%%~ni.py" "%%~ni.ui"
)

I hope that helped

Cheers,
Hannes


[cid:image006.png@01D3BD18.F7381970]

Von: Sophie Crommelinck [mailto:sophie.crommeli...@gmail.com]
Gesendet: Freitag, 16. März 2018 10:53
An: KOHLMANN Hannes; j...@norbit.de
Cc: qgis-developer@lists.osgeo.org
Betreff: Re: [QGIS-Developer] Unable to compile QGIS3 plugin

I think my images broke while sending,
here they are again:

Jürgen's suggestion:
[cid:image002.jpg@01D3BD19.8B6D6230]
Hannes' suggestion:
[cid:image004.jpg@01D3BD19.8B6D6230]
python-core.bat
[cid:image005.png@01D3BD16.85DD2830]


2018-03-16 10:45 GMT+01:00 Sophie Crommelinck 
<sophie.crommeli...@gmail.com<mailto:sophie.crommeli...@gmail.com>>:
Hello Jürgen and Hannes,
thanks for your support. I tried both suggestions, with little success.
Jürgen's suggestion:
[http://?ui=2&ik=ad514a8e24&view=att&th=1622e15a2bbbae15&attid=0.1&disp=safe&realattid=ii_jetq74350_1622e15a2bbbae15&zw]
This creates the resources.py file (attached). However, when I open QGIS3 it 
crashes every time I reload the plugin (crash report attached).
Hannes' suggestion:
[http://?ui=2&ik=ad514a8e24&view=att&th=1622e24472fdda7d&attid=0.2&disp=safe&realattid=ii_jetqrnzt1_1622e24472fdda7d&zw]
which results in the same as above. However, here I am not entirely sure if I 
followed the suggestion correctly as I go back to the plugin folder for 
compiling.
Also, I wonder, why the result of calling python-qgis-dev.bat lists win32, 
while I have a win64 machine.

I also tried changing the python path as suggested in the stack exchange 
question to Python36 in C:\OSGeo4W64\etc\ini\python-core without success
[http://?ui=2&ik=ad514a8e24&view=att&th=1622e29d99d79ebd&attid=0.0.3&disp=safe&realattid=ii_jetqzhre4_1622e29d99d79ebd&zw]
Best,
Sophie




2018-03-16 1:11 GMT+01:00 KOHLMANN Hannes 
<h.kohlm...@ove.at<mailto:h.kohlm...@ove.at>>:
Hey Sophie!

There is one .bat file that does all the work of setting the Environment 
variables properly: /osgeo4w_root/bin/python-qgis-dev.bat
Call that file in the console and in the same console cd to the directory with 
the pyrcc.bat file (osgeo4w_root/apps/python36/scripts)

Here is the link to a gis.stackexchange question concerning that:
https://gis.stackexchange.com/questions/260743/how-to-compile-qtdesigner-user-interface-ui-and-resource-qrc-files-with-qg/264377#264377

Good luck and compiling ;)

Cheers,
Hannes
_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org<mailto:QGIS-Developer@lists.osgeo.org>
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to