Hi,

On Oct 16, 2010, at 5:14 PM, ext Tim Beaulen wrote:

> Hello,
> 
> I'm creating a plugin that needs to install a couple of script files.
> In doing so I encountered a problem.
> 
> First a question. Is it allowed to install these support files in
> share/qtcreator/myplugin/ ?
> Or is there some etiquette that says not to do that?

I wouldn't know a better place. But, if you consider to provide your plugin 
cross-platform, you should notice that resources are at a different place on 
Mac builds.
You should definitely use $$IDE_DATA_PATH/myplugin/scripts
and in you plugin sources Core::ICore::instance()->resourcePath() + 
QLatin1String("/myplugin/scripts")

> 
> In trying to install these files, I modified the .pro file of the
> plugin like so:
> Note: "..." replaces several other lines.
> 
> 1. ...
> 2.
> 3. OTHER_FILES = ... \
> 4.    tests/testscript.qs
> 5.
> 6. ...
> 7.
> 8. testscriptfiles.files += tests/testscript.qs
> 9. testscriptfiles.path = $$IDE_BUILD_TREE/share/qtcreator/myplugin/scripts
> 10. INSTALLS += testscriptfiles

INSTALLS creates an additional make target "make install". If you don't call 
"make install" the files will not be copied. If you want to actually copy files 
during the "make" step, you'll unfortunately need to do some fancy stuff, 
similar to share/qtcreator/static.pro
/me wonders if we couldn't provide most of the stuff for this task as functions 
in qtcreator.pri ?

++ Eike
_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-creator

Reply via email to