[Qgis-developer] New Script for plugin generation in Mac Os X

William Kyngesburye woklist at kyngchaos.com
Wed Jan 27 10:23:23 EST 2010


I guess I'm assuming that all Qt-related sources are at the top level of the plugin, that's standard for the plugins so far.  Subfolders are usually used for stuff like a bundled supporting library.  I guess it can be helpful to organize a plugin with a lot of sources and ui's.

ls can list subfolders with the -R flag, though files are grouped by subfolder with noise that's unhelpful.  If you want ui files in a subfolder, stripping the paths is not good because the uic command won't know where they are ;)  It would be better to cd into the ui folder first, just change the 'cd' line and leave the ls command as is:

cd ../../src/plugins/$TARGET_PLUGINDIR/myuifolder

All derived sources within a target get dumped into the same DERIVED_FILES_DIR which is automatically added by Xcode to all target compilation, so your sources will still find them to #include.

On Jan 26, 2010, at 11:20 PM, Aju Ajusito wrote:

> Sorry, I don't give a good explanation for the change in the script.
> Suppose that somebady create a plugin with other subfolders and some of this subfolders having inside files with the extension *.ui, the ouput of the command `ls *.ui` is not the same of the `find . -type f -name "*.ui" | sed 's,.\/,,'`( is no V is  \+/ without space) the previous command don't have a recurrent action and therefore the Xcode build system will produce an error.
> Also the UIUI=`find . -type f -name "*.ui" | sed 's,.\/,,'` is not the only change in the script, the line after the "do" is changed by:
> uh=`echo $u | sed 's,[^:]*\/,,' | sed 's,\.ui$,.h,'`
> it's necessary for eliminate the path names and leave only the file name changed with the *.h extension.
> Selecting the good ls command is a possible solution, but I think that the Mac Os X distribution command ls don't have a recurrent action, maybe with some option.

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"Oh, look, I seem to have fallen down a deep, dark hole.  Now what does that remind me of?  Ah, yes - life."

- Marvin




More information about the Qgis-developer mailing list