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

Aju Ajusito namsfpfgo at gmail.com
Wed Jan 27 00:20:33 EST 2010


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.

2010/1/26 William Kyngesburye <woklist at kyngchaos.com>

> On Jan 26, 2010, at 4:59 PM, Aju Ajusito wrote:
>
> > Hi, I have worked over a year to understand the QGIS development and now
> I try to contribute.
> > The subject is:
> > If we want to create a plugin for QGIS with some folders inside for
> example on FreeBSD is easy but in Mac Os X using Xcode is not same, because
> the script for compile the plugin is not really good.
> > Let's see the old script:
> > ------------------------------------------------------------------
>
> > UIUI=`ls *.ui`
>
> > ------------------------------------------------------------------
> >
> > and now take a look to my new script
> >
> > ------------------------------------------------------------------
>
> > UIUI=`find . -type f -name "*.ui" | sed 's,.\/,,'`
>
> > ------------------------------------------------------------------
> > I decided to use the find function and not the ls.
> > what you think?
>
> Not to be defensive, but what is wrong with ls?  Did you have a problem?
>  Seems like find + sed is a lot more work.
>
> One thing I probably should do is hardwire the path to /bin/ls so it
> doesn't accidentally get a MacPorts or Fink ls, which may behave differently
> than expected.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20100127/3a7beb0a/attachment.html


More information about the Qgis-developer mailing list