Thanks all for your help.  I was able to get it to work. I almost never 
use the command line on Windows, so I'm not up on the fine points. I 
suspect that many people who might be interested in developing a Python 
plugin could be in the same situation.
Here is what I found to work

Option 1. Use the Start>Run window. The command has to specify full 
paths for everything, even if C:\Python25 is correctly listed in the 
PATH variable.
The command I used was this:
C:\Python25\pyrcc4 -o "C:\Program Files\Quantum 
GIS\share\qgis\python\plugins\new_layer\resources.py" "C:\Program 
Files\Quantum GIS\share\qgis\python\plugins\new_layer\resources.qrc"
Quotes are necessary because of the spaces in the folder names.

Option 2. Use the Command Prompt Window
 a. Open the Command Prompt by clicking Start>Run and enter cmd.exe or 
click Start>All Programs>Accessories>Command Prompt
 b. Navigate to the new_layer folder by entering
     cd C:\Program Files\Quantum GIS\share\qgis\python\plugins\new_layer
     or whatever is the correct path, which can be copied from the 
Address line in Windows Explorer when the folder is open.
    Right-click to paste. Quotes aren't needed.
 c. Enter
              pyrcc4 -o resources.py resources.qrc
    at the prompt

Perhaps there is a place on the wiki to store this sort of stuff that is 
needed by novice Windows-based Python developers, but irrelevant to others?

Tara

Richard Duivenvoorde wrote:
>
> Hi Tara,
>
> don't know if I can make it more clear, but on Linux this command 
> 'pyrcc4' is in you PATH when you installed PyQt.
> On windows, it's possible that these binaries are not in your path. 
> With me they were found here: "C:\program files\Python25\pyrcc4.exe"  
> after installing. So you either call it by using the full path to it, 
> or you add the path to python binaries to your PATH environment 
> variable (I would do that...).
>
> The bigger picture:
> # QtDesigner4 will give you an '.ui' file
> # This .ui file is compiled using pyuic4 to a python source file 
> containing the gui python class definition
> # You'll need pyrcc4 for generating a python resource file (will hold 
> your images/icons etc)
> # You can then define your own class (inheriting from the gui class 
> file above AND QDialog and add event/signal handlers to it
>
> No need to build stuff from source.
> Docs for PyQt4 (handy for some code examples...):
> http://www.riverbankcomputing.com/Docs/PyQt4/pyqt4ref.html
>
> other resources:
> http://wiki.qgis.org/qgiswiki/DevelopingPluginsWithPython
> http://wiki.qgis.org/qgiswiki/PythonPluginCodeSnippets
> and qgis wiki and blog
> or download some plugins from:
> http://spatialserver.net:3001/
> and look into the source code
> for example: 
> http://spatialserver.net/pyqgis/plugins/imagemap_plugin_v0.2.zip
> this is a python plugin with gui and resources (there is also some 
> docs in the zip).
> http://spatialserver.net/pyqgis/plugins/rasterinfo.zip is an ever 
> simpler example.
>
> Hope this helps you something
>
> Regards,
>
> Richard Duivenvoorde
>
>
> Tara Athan wrote:
>> I have PyQt GPL v4.3.3 installed, but I don't know how to make it 
>> perform this task (of compiling the resource file).
>>
>> The QGIS 0.9 manual does not describe anything so complicated as 
>> building from source.
>> Tim, I appreciate the help, but this URL is way beyond my level at 
>> present.
>>
>> Tara
>>
>> Tim Sutton wrote:
>>> Hi Tara
>>>
>>> I'm guessing you are probably going to need PyQt installed on your
>>> computer (and by extension Qt too). Martin or Aaron will probably be
>>> able to better confirm this. There are notes on how to do this here:
>>>
>>> http://wiki.qgis.org/qgiswiki/BuildingFromSource (section 3)
>>>
>>> Hope that helps!
>>>
>>> Regards
>>>
>>> Tim
>>>
>>> 2008/1/30, Tara Athan <[EMAIL PROTECTED]>:
>>>  
>>>> I am trying to follow the manual,
>>>> Section 12, Subsection 7
>>>> to get started writing Python Plugins
>>>> I am getting stuck at step 3 because I am using Windows (XP)
>>>>
>>>> To turn the resource file into something the plugin can use, it 
>>>> must be
>>>> compiled using the PyQt resource compiler:
>>>>
>>>>   pyrcc4 -o resources.py resources.qrc
>>>>
>>>> Can anyone tell me how to perform this step on the Windows platform?
>>>>
>>>> Thanks, Tara
>>>>
>>>>
>>>> -- 
>>>> My e-mail delivery has been unreliable lately, so I am asking for
>>>> return receipts from all my email messages.
>>>> OK'ing the return receipt lets me know that my message was delivered.
>>>> Thank you.
>>>>
>>>> Tara Athan
>>>> Principal, Alternatives to Invasive Species
>>>> [EMAIL PROTECTED]
>>>> 707-485-1198
>>>> PO Box 415
>>>> Redwood Valley, CA 95470
>>>>
>>>> _______________________________________________
>>>> Qgis-user mailing list
>>>> [email protected]
>>>> http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
>>>>
>>>>     
>>>
>>>
>>>   
>>
>>
>> -- 
>> My e-mail delivery has been unreliable lately, so I am asking for
>> return receipts from all my email messages.
>> OK'ing the return receipt lets me know that my message was delivered.
>> Thank you.
>>
>> Tara Athan
>> Principal, Alternatives to Invasive Species
>> [EMAIL PROTECTED]
>> 707-485-1198
>> PO Box 415
>> Redwood Valley, CA 95470
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Qgis-user mailing list
>> [email protected]
>> http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
>
>
>


-- 
My e-mail delivery has been unreliable lately, so I am asking for
return receipts from all my email messages.
OK'ing the return receipt lets me know that my message was delivered.
Thank you.

Tara Athan
Principal, Alternatives to Invasive Species
[EMAIL PROTECTED]
707-485-1198
PO Box 415
Redwood Valley, CA 95470

_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user

Reply via email to