diff --git a/static/buildResourceCode.sh b/static/buildResourceCode.sh index 523c5f5..419ecb8 100755 --- a/static/buildResourceCode.sh +++ b/static/buildResourceCode.sh @@ -1,8 +1,8 @@ #!/bin/sh SCRIPT_DIR=$(dirname $0) RESOURCE_FILE=$SCRIPT_DIR/../src/common/resourceTools.h -MAP="static std::map createResourceMap() { \n" -MAP=$MAP"\tstd::map m; \n" +MAP="static std::map > createResourceMap() { \n" +MAP=$MAP"\tstd::map > m; \n" # Delete old version of the file rm -f "$RESOURCE_FILE" @@ -26,11 +26,11 @@ do FILE_ID=`echo "$FILE" | sed "s/\//_/g" | sed "s/\./_/g" | sed "s/\-/_/g"` echo "Inserting $FILE... [$FILE_ID]" reswrap -s -x -oa $RESOURCE_FILE -r $FILE_ID $FILE - MAP=$MAP"\tm[\""$FILE"\"] = (const char*)"$FILE_ID"; \n"; + MAP=$MAP"\tm[\""$FILE"\"] = std::pair ("$FILE_ID", sizeof "$FILE_ID"); \n"; done; MAP=$MAP"\treturn m; \n"; MAP=$MAP"} \n\n" -MAP=$MAP"static std::map resourceMap = createResourceMap(); \n\n" +MAP=$MAP"static std::map > resourceMap = createResourceMap(); \n\n" # Create the map table # map m = map_list_of (1,2) (3,4) (5,6) (7,8); diff --git a/static/server/home.html.tmpl b/static/server/home.html.tmpl index b1a7714..5647c2b 100644 --- a/static/server/home.html.tmpl +++ b/static/server/home.html.tmpl @@ -16,6 +16,5 @@ $( "#accordion" ).accordion();
__BOOKS__
-