summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
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 @@
../../apps/gui/skin_engine/wps_debug.c
../../apps/gui/skin_engine/skin_parser.c
../../apps/gui/skin_engine/skin_backdrops.c
-../../apps/gui/skin_engine/skin_buffer.c
#ifdef HAVE_LCD_BITMAP
../../apps/gui/skin_engine/skin_fonts.c
#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 @@
#include "checkwps.h"
#include "resize.h"
#include "wps.h"
+#include "skin_buffer.h"
+#include "skin_debug.h"
#include "skin_engine.h"
#include "wps_internals.h"
#include "settings.h"
@@ -237,6 +239,8 @@ int main(int argc, char **argv)
struct wps_data wps;
enum screen_type screen = SCREEN_MAIN;
struct screen* wps_screen;
+
+ char* buffer = NULL;
/* No arguments -> print the help text
* Also print the help text upon -h or --help */
@@ -261,13 +265,19 @@ int main(int argc, char **argv)
wps_verbose_level++;
}
}
+ buffer = malloc(SKIN_BUFFER_SIZE);
+ if (!buffer)
+ {
+ printf("mallloc fail!\n");
+ return 1;
+ }
- skin_buffer_init();
+ skin_buffer_init(buffer, SKIN_BUFFER_SIZE);
#ifdef HAVE_LCD_BITMAP
skin_font_init();
#endif
- /* Go through every wps that was thrown at us, error out at the first
+ /* Go through every skin that was thrown at us, error out at the first
* flawed wps */
while (argv[filearg]) {
printf("Checking %s...\n", argv[filearg]);
@@ -285,6 +295,7 @@ int main(int argc, char **argv)
if (!res) {
printf("WPS parsing failure\n");
+ skin_error_format_message();
return 3;
}
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__
.SECONDEXPANSION: # $$(OBJ) is not populated until after this
-$(BUILDDIR)/$(BINARY): $$(OBJ)
+$(BUILDDIR)/$(BINARY): $$(OBJ) $$(SKINLIB)
@echo LD $(BINARY)
- $(SILENT)$(HOSTCC) $(INCLUDE) $(FLAGS) -o $@ $+
+ $(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)))
include $(APPSDIR)/bootbox.make
else ifneq (,$(findstring checkwps,$(APPSDIR)))
include $(APPSDIR)/checkwps.make
+ include $(ROOTDIR)/lib/skin_parser/skin_parser.make
else ifneq (,$(findstring database,$(APPSDIR)))
include $(APPSDIR)/database.make
else
@@ -170,7 +171,8 @@ $(BUILDDIR)/rockbox.elf : $$(OBJ) $$(FIRMLIB) $$(VOICESPEEXLIB) $$(SKINLIB) $$(L
$(BUILDDIR)/rombox.elf : $$(OBJ) $$(FIRMLIB) $$(VOICESPEEXLIB) $$(SKINLIB) $$(LINKROM)
$(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \
$(VOICESPEEXLIB) $(FIRMLIB) -lgcc $(GLOBAL_LDOPTS) \
- -L$(BUILDDIR)/firmware -T$(LINKROM) -Wl,-Map,$(BUILDDIR)/rombox.map
+ -L$(BUILDDIR)/lib -lskin_parser \
+ -L$(BUILDDIR)/firmware -T$(LINKROM) -Wl,-Map,$(BUILDDIR)/rombox.map
$(BUILDDIR)/rockbox.bin : $(BUILDDIR)/rockbox.elf
$(call PRINTS,OC $(@F))$(OC) $(if $(filter yes, $(USE_ELF)), -S -x, -O binary) $< $@