Can something please be done about the inconsistent include directory
protocol in wxArt2D?

For example, I have to include both "$(WXART2D)/include/" AND
"$(WXART2D)/include/wxart2d/" in the include paths, because different
source files point to either destination as their root include
directories.  A sub-directory of another include directory should not
need to be added to the include paths; they should be unified so that
they're consistent. The latter format, "$(WXART2D)/include/", should
be the only one used, as is standard practice in libraries.  It'll
also help make the paths in the #include directives less ambiguous, as
there will be a "wxart2d" preceding all sub-directories.

If this ends up breaking programs that use this library, so be it.
They can run the same simple scripts to fix their own code.

Here's a (bash) shell script script that will perform the above task
when run from the base wxArt2D folder:

#!/bin/bash
files=$(find modules -type f |grep '\.cpp\|\.h')
for file in $files
do
    echo -n "Fixing: $file ... "
    cat $file | sed
"s/aggdrawer\/include/wxart2d\/aggdrawer\/include/g" > $file.1
    cat $file.1 | sed "s/artbase\/include/wxart2d\/artbase\/include/g" > $file.0
    cat $file.0 | sed
"s/canextobj\/include/wxart2d\/canextobj\/include/g" > $file.1
    cat $file.1 | sed "s/canvas\/include/wxart2d\/canvas\/include/g" > $file.0
    cat $file.0 | sed "s/curves\/include/wxart2d\/curves\/include/g" > $file.1
    cat $file.1 | sed "s/docview\/include/wxart2d\/docview\/include/g" > $file.0
    cat $file.0 | sed "s/editor\/include/wxart2d\/editor\/include/g" > $file.1
    cat $file.1 | sed
"s/gdiplusdrawer\/include/wxart2d\/gdiplusdrawer\/include/g" > $file.0
    cat $file.0 | sed "s/gdsio\/include/wxart2d\/gdsio\/include/g" > $file.1
    cat $file.1 | sed "s/general\/include/wxart2d\/general\/include/g" > $file.0
    cat $file.0 | sed "s/include\/include/wxart2d\/include\/include/g" > $file.1
    cat $file.1 | sed "s/keyio\/include/wxart2d\/keyio\/include/g" > $file.0
    cat $file.0 | sed
"s/luawraps\/include/wxart2d\/luawraps\/include/g" > $file.1
    cat $file.1 | sed "s/svgio\/include/wxart2d\/svgio\/include/g" > $file.0
    cat $file.0 | sed
"s/xmlparse\/include/wxart2d\/xmlparse\/include/g" > $file.1
    rm -f $file.0
    mv $file.1 $file
    echo "done!"
done

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Wxart2d-users_dev mailing list
Wxart2d-users_dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxart2d-users_dev

Reply via email to