summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2010-07-29 12:37:48 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2010-07-29 12:37:48 +0000
commit2d31d77a8ba231cb03ec35863c4c4ce2024f6509 (patch)
treeb85ca1bede3e83695619064ee9a323f0a8da1865 /tools
parente436483b66a931fef6436e9cd3e69eb2b3ff1f7b (diff)
downloadrockbox-2d31d77a8ba231cb03ec35863c4c4ce2024f6509.tar.gz
rockbox-2d31d77a8ba231cb03ec35863c4c4ce2024f6509.zip
FS#11470 - new skin code, finally svn uses the new parser from the theme editor. This means that a skin that passes the editor WILL pass svn and checkwps (unless the target runs out of skin buffer or something.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27613 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
-rw-r--r--tools/checkwps/SOURCES1
-rw-r--r--tools/checkwps/checkwps.c15
-rw-r--r--tools/checkwps/checkwps.make4
-rw-r--r--tools/root.make4
4 files changed, 18 insertions, 6 deletions
diff --git a/tools/checkwps/SOURCES b/tools/checkwps/SOURCES
index 48ed53b330..3e12d1f74e 100644
--- a/tools/checkwps/SOURCES
+++ b/tools/checkwps/SOURCES
@@ -1,7 +1,6 @@
1../../apps/gui/skin_engine/wps_debug.c 1../../apps/gui/skin_engine/wps_debug.c
2../../apps/gui/skin_engine/skin_parser.c 2../../apps/gui/skin_engine/skin_parser.c
3../../apps/gui/skin_engine/skin_backdrops.c 3../../apps/gui/skin_engine/skin_backdrops.c
4../../apps/gui/skin_engine/skin_buffer.c
5#ifdef HAVE_LCD_BITMAP 4#ifdef HAVE_LCD_BITMAP
6../../apps/gui/skin_engine/skin_fonts.c 5../../apps/gui/skin_engine/skin_fonts.c
7#endif 6#endif
diff --git a/tools/checkwps/checkwps.c b/tools/checkwps/checkwps.c
index 94136e02f0..e00fb724bc 100644
--- a/tools/checkwps/checkwps.c
+++ b/tools/checkwps/checkwps.c
@@ -26,6 +26,8 @@
26#include "checkwps.h" 26#include "checkwps.h"
27#include "resize.h" 27#include "resize.h"
28#include "wps.h" 28#include "wps.h"
29#include "skin_buffer.h"
30#include "skin_debug.h"
29#include "skin_engine.h" 31#include "skin_engine.h"
30#include "wps_internals.h" 32#include "wps_internals.h"
31#include "settings.h" 33#include "settings.h"
@@ -237,6 +239,8 @@ int main(int argc, char **argv)
237 struct wps_data wps; 239 struct wps_data wps;
238 enum screen_type screen = SCREEN_MAIN; 240 enum screen_type screen = SCREEN_MAIN;
239 struct screen* wps_screen; 241 struct screen* wps_screen;
242
243 char* buffer = NULL;
240 244
241 /* No arguments -> print the help text 245 /* No arguments -> print the help text
242 * Also print the help text upon -h or --help */ 246 * Also print the help text upon -h or --help */
@@ -261,13 +265,19 @@ int main(int argc, char **argv)
261 wps_verbose_level++; 265 wps_verbose_level++;
262 } 266 }
263 } 267 }
268 buffer = malloc(SKIN_BUFFER_SIZE);
269 if (!buffer)
270 {
271 printf("mallloc fail!\n");
272 return 1;
273 }
264 274
265 skin_buffer_init(); 275 skin_buffer_init(buffer, SKIN_BUFFER_SIZE);
266#ifdef HAVE_LCD_BITMAP 276#ifdef HAVE_LCD_BITMAP
267 skin_font_init(); 277 skin_font_init();
268#endif 278#endif
269 279
270 /* Go through every wps that was thrown at us, error out at the first 280 /* Go through every skin that was thrown at us, error out at the first
271 * flawed wps */ 281 * flawed wps */
272 while (argv[filearg]) { 282 while (argv[filearg]) {
273 printf("Checking %s...\n", argv[filearg]); 283 printf("Checking %s...\n", argv[filearg]);
@@ -285,6 +295,7 @@ int main(int argc, char **argv)
285 295
286 if (!res) { 296 if (!res) {
287 printf("WPS parsing failure\n"); 297 printf("WPS parsing failure\n");
298 skin_error_format_message();
288 return 3; 299 return 3;
289 } 300 }
290 301
diff --git a/tools/checkwps/checkwps.make b/tools/checkwps/checkwps.make
index 0db643bc84..e09ce25aec 100644
--- a/tools/checkwps/checkwps.make
+++ b/tools/checkwps/checkwps.make
@@ -26,6 +26,6 @@ GCCOPTS+=-D__PCTOOL__
26 26
27.SECONDEXPANSION: # $$(OBJ) is not populated until after this 27.SECONDEXPANSION: # $$(OBJ) is not populated until after this
28 28
29$(BUILDDIR)/$(BINARY): $$(OBJ) 29$(BUILDDIR)/$(BINARY): $$(OBJ) $$(SKINLIB)
30 @echo LD $(BINARY) 30 @echo LD $(BINARY)
31 $(SILENT)$(HOSTCC) $(INCLUDE) $(FLAGS) -o $@ $+ 31 $(SILENT)$(HOSTCC) $(INCLUDE) $(FLAGS) -L$(BUILDDIR)/lib -lskin_parser -o $@ $+
diff --git a/tools/root.make b/tools/root.make
index e53c452022..d90b40f0c6 100644
--- a/tools/root.make
+++ b/tools/root.make
@@ -70,6 +70,7 @@ else ifneq (,$(findstring bootbox,$(APPSDIR)))
70 include $(APPSDIR)/bootbox.make 70 include $(APPSDIR)/bootbox.make
71else ifneq (,$(findstring checkwps,$(APPSDIR))) 71else ifneq (,$(findstring checkwps,$(APPSDIR)))
72 include $(APPSDIR)/checkwps.make 72 include $(APPSDIR)/checkwps.make
73 include $(ROOTDIR)/lib/skin_parser/skin_parser.make
73else ifneq (,$(findstring database,$(APPSDIR))) 74else ifneq (,$(findstring database,$(APPSDIR)))
74 include $(APPSDIR)/database.make 75 include $(APPSDIR)/database.make
75else 76else
@@ -170,7 +171,8 @@ $(BUILDDIR)/rockbox.elf : $$(OBJ) $$(FIRMLIB) $$(VOICESPEEXLIB) $$(SKINLIB) $$(L
170$(BUILDDIR)/rombox.elf : $$(OBJ) $$(FIRMLIB) $$(VOICESPEEXLIB) $$(SKINLIB) $$(LINKROM) 171$(BUILDDIR)/rombox.elf : $$(OBJ) $$(FIRMLIB) $$(VOICESPEEXLIB) $$(SKINLIB) $$(LINKROM)
171 $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \ 172 $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \
172 $(VOICESPEEXLIB) $(FIRMLIB) -lgcc $(GLOBAL_LDOPTS) \ 173 $(VOICESPEEXLIB) $(FIRMLIB) -lgcc $(GLOBAL_LDOPTS) \
173 -L$(BUILDDIR)/firmware -T$(LINKROM) -Wl,-Map,$(BUILDDIR)/rombox.map 174 -L$(BUILDDIR)/lib -lskin_parser \
175 -L$(BUILDDIR)/firmware -T$(LINKROM) -Wl,-Map,$(BUILDDIR)/rombox.map
174 176
175$(BUILDDIR)/rockbox.bin : $(BUILDDIR)/rockbox.elf 177$(BUILDDIR)/rockbox.bin : $(BUILDDIR)/rockbox.elf
176 $(call PRINTS,OC $(@F))$(OC) $(if $(filter yes, $(USE_ELF)), -S -x, -O binary) $< $@ 178 $(call PRINTS,OC $(@F))$(OC) $(if $(filter yes, $(USE_ELF)), -S -x, -O binary) $< $@