Permalink
Browse files

Added include path as local project dir

  • Loading branch information...
bmcdorman committed Aug 1, 2011
1 parent 46f1c8a commit bdfa7f5da35f832c40e0af35ef1498bc5cd29466
@@ -145,6 +145,7 @@ void SerialServer::processData(quint16 command, QByteArray& data)
case KISS_RELEASE_DOWN_COMMAND: kissReleaseDownCommand(data); break;
case KISS_GET_STATE_COMMAND: kissGetStateCommand(data); break;
case KISS_GET_STDOUT_COMMAND: kissGetStdoutCommand(data); break;
+ case KISS_DELETE_FILE_COMMAND: kissDeleteFileCommand(data); break;
}
}
@@ -314,4 +315,4 @@ void SerialServer::kissGetStateCommand(const QByteArray& data)
}
void SerialServer::kissGetStdoutCommand(const QByteArray& data) { sendCommand(CBC_STDOUT_RESULT, text.toAscii()); text.clear(); }
-
+void SerialServer::kissDeleteFileCommand(const QByteArray& data) { QFile::remove(QString(data)); }
@@ -69,6 +69,7 @@ typedef struct {
#define KISS_RELEASE_DOWN_COMMAND 20
#define KISS_GET_STATE_COMMAND 21
#define KISS_GET_STDOUT_COMMAND 22
+#define KISS_DELETE_FILE_COMMAND 23
#define CBC_REQUEST_FILE_RESULT 127
#define CBC_LS_RESULT 128
@@ -134,6 +135,7 @@ private slots:
void kissReleaseDownCommand(const QByteArray& data);
void kissGetStateCommand(const QByteArray& data);
void kissGetStdoutCommand(const QByteArray& data);
+ void kissDeleteFileCommand(const QByteArray& data);
SharedMem<UIData> m_uiData;
QString text;
@@ -7,8 +7,9 @@ NAME=$DIR/robot_name.txt
rm -rf $DIR
mkdir -p $DIR
-echo "Compiling ${1}"
-/mnt/kiss/usercode/gcc-usercode "${1}" -o $PROG 2>&1
+echo "Compiling ${1}"
+FOLDER="${1%/*}"
+/mnt/kiss/usercode/gcc-usercode -I${FOLDER} "${1}" -o $PROG 2>&1
if [ -e $PROG ]; then
echo "Compile succeeded."
echo "${1}" > $NAME
@@ -8,7 +8,7 @@ rm -rf $DIR
mkdir -p $DIR
echo "Compiling ${1}"
-/mnt/kiss/usercode/g++-usercode "${1}" -o $PROG 2>&1
+/mnt/kiss/usercode/g++-usercode -I${FOLDER} "${1}" -o $PROG 2>&1
if [ -e $PROG ]; then
echo "Compile succeeded."
echo "${1}" > $NAME
@@ -1,5 +1,5 @@
#!/bin/sh
-/mnt/kiss/gcc/bin/g++ -w -I/mnt/kiss/usercode/include -include track.h -include stdio.h -include unistd.h -include fcntl.h -include sys/types.h -include sys/socket.h -include netinet/in.h -include arpa/inet.h -include netdb.h -include errno.h -include string.h -include cbc.h -include compat.h -include process.h -include create.h -include botball.h -include cbc2cxx.h "${1}" "${2}" "${3}" /mnt/kiss/usercode/lib/init.o /mnt/kiss/usercode/lib/libcbc.a /mnt/kiss/usercode/lib/libtrack.a /mnt/kiss/usercode/lib/libshared.a -lpthread -lm
+/mnt/kiss/gcc/bin/g++ -w -I/mnt/kiss/usercode/include -include track.h -include stdio.h -include unistd.h -include fcntl.h -include sys/types.h -include sys/socket.h -include netinet/in.h -include arpa/inet.h -include netdb.h -include errno.h -include string.h -include cbc.h -include compat.h -include process.h -include create.h -include botball.h -include cbc2cxx.h $@ /mnt/kiss/usercode/lib/init.o /mnt/kiss/usercode/lib/libcbc.a /mnt/kiss/usercode/lib/libtrack.a /mnt/kiss/usercode/lib/libshared.a -lpthread -lm
sync
sync
@@ -1,5 +1,5 @@
#!/bin/sh
-/mnt/kiss/gcc/bin/gcc -w -I/mnt/kiss/usercode/include -include track.h -include stdio.h -include unistd.h -include fcntl.h -include sys/types.h -include sys/socket.h -include netinet/in.h -include arpa/inet.h -include netdb.h -include errno.h -include string.h -include cbc.h -include compat.h -include process.h -include create.h -include botball.h "${1}" "${2}" "${3}" /mnt/kiss/usercode/lib/init.o /mnt/kiss/usercode/lib/libcbc.a /mnt/kiss/usercode/lib/libtrack.a /mnt/kiss/usercode/lib/libshared.a -lpthread -lm
+/mnt/kiss/gcc/bin/gcc -w -I/mnt/kiss/usercode/include -include track.h -include stdio.h -include unistd.h -include fcntl.h -include sys/types.h -include sys/socket.h -include netinet/in.h -include arpa/inet.h -include netdb.h -include errno.h -include string.h -include cbc.h -include compat.h -include process.h -include create.h -include botball.h $@ /mnt/kiss/usercode/lib/init.o /mnt/kiss/usercode/lib/libcbc.a /mnt/kiss/usercode/lib/libtrack.a /mnt/kiss/usercode/lib/libshared.a -lpthread -lm
sync
sync

0 comments on commit bdfa7f5

Please sign in to comment.