Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 68 lines (55 sloc) 1.318 kb
803af58 @jonocole Wizard, PluginInfo, UnicornSettings changes
jonocole authored
1 #!/bin/bash
2 ROOT_DIR=$(dirname $(cd `dirname $0` && pwd))
3 cd $ROOT_DIR/lib/unicorn/Updater
99cf7a1 @jonocole Fix the configure ordering and make genPluginInfo windows happy
jonocole authored
4 if [ $TERM == "cygwin" ]; then
5 FIND="/bin/find"
6 else
7 FIND="find"
8 fi
9
803af58 @jonocole Wizard, PluginInfo, UnicornSettings changes
jonocole authored
10 while read infoh; do
99cf7a1 @jonocole Fix the configure ordering and make genPluginInfo windows happy
jonocole authored
11 INCLUDELIST=$INCLUDELIST$'\n'"#include \"$infoh\""
3f6e682 @jonocole And now to fix a linux issue in genPluginInfo..
jonocole authored
12 CLASSNAME=$(cat $infoh | grep class | sed "s/class \(UNICORN_DLLEXPORT \)*\(.*\) :.*/\2\(\)/g")
99cf7a1 @jonocole Fix the configure ordering and make genPluginInfo windows happy
jonocole authored
13 INSTANCE=$INSTANCE$'\n'" *this << (new $CLASSNAME);"
14 done < <($FIND ../../../plugins -iname PluginInfo.h)
803af58 @jonocole Wizard, PluginInfo, UnicornSettings changes
jonocole authored
15 cat << EOF
16 #ifndef GEN_PLUGIN_LIST_H_
17 #define GEN_PLUGIN_LIST_H_
18
19 #include <QList>
20 #include "IPluginInfo.h"
21 EOF
22
99cf7a1 @jonocole Fix the configure ordering and make genPluginInfo windows happy
jonocole authored
23 echo "$INCLUDELIST"
803af58 @jonocole Wizard, PluginInfo, UnicornSettings changes
jonocole authored
24
25 cat << EOF
26 class GenPluginList : public QList<IPluginInfo*>
27 {
28 public:
29 GenPluginList()
30 {
31 EOF
32 echo "$INSTANCE"
33 cat << EOF
34
35 }
6c1b68b @jonocole More Wizardry with lots of Bootstrapping work
jonocole authored
36
37
38 GenPluginList( const GenPluginList& that )
02632eb @jonocole Fix various segfaults etc.
jonocole authored
39 :QList<IPluginInfo*>()
6c1b68b @jonocole More Wizardry with lots of Bootstrapping work
jonocole authored
40 {
41 *this = that;
42 }
43
44 virtual GenPluginList& operator= ( const GenPluginList& that )
45 {
46 for( QList<IPluginInfo*>::const_iterator i = that.begin();
47 i != that.end();
48 i++ ) {
49 *this << (*i)->clone();
50 }
51 return *this;
52 }
53
54
55 virtual ~GenPluginList()
56 {
57 while( !this->isEmpty()) {
58 delete (*this)[0];
59 removeAt( 0 );
60 }
61 }
803af58 @jonocole Wizard, PluginInfo, UnicornSettings changes
jonocole authored
62 };
63 EOF
64
65
66 echo
99cf7a1 @jonocole Fix the configure ordering and make genPluginInfo windows happy
jonocole authored
67 echo "#endif //GEN_PLUGIN_LIST_H_"
Something went wrong with that request. Please try again.