diff --git a/.gitignore b/.gitignore index 4f06b84a..fe80aebc 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,7 @@ logo_bmp.h # Cli files venv/ -scripts/sd-files/ \ No newline at end of file +scripts/sd-files/ + +# Release files +argon-nx.zip \ No newline at end of file diff --git a/Makefile b/Makefile index 852d4ecc..9abb4e41 100644 --- a/Makefile +++ b/Makefile @@ -10,25 +10,25 @@ OUTPUT := output SOURCEDIR := src DATA := data SOURCES := src \ - src/ianos \ - src/libs/fatfs src/libs/elfload src/libs/compr src/libs/lvgl \ - src/libs/lvgl/lv_core src/libs/lvgl/lv_draw src/libs/lvgl/lv_font src/libs/lvgl/lv_hal \ - src/libs/lvgl/lv_misc src/libs/lvgl/lv_objx src/libs/lvgl/lv_themes \ - src/core \ - src/gfx \ - src/mem \ - src/menu/gui \ - src/minerva \ - src/panic \ - src/power \ - src/sec \ - src/soc \ - src/storage \ - src/utils + src/ianos \ + src/libs/fatfs src/libs/elfload src/libs/compr src/libs/lvgl \ + src/libs/lvgl/lv_core src/libs/lvgl/lv_draw src/libs/lvgl/lv_font src/libs/lvgl/lv_hal \ + src/libs/lvgl/lv_misc src/libs/lvgl/lv_objx src/libs/lvgl/lv_themes \ + src/core \ + src/gfx \ + src/mem \ + src/menu/gui \ + src/minerva \ + src/panic \ + src/power \ + src/sec \ + src/soc \ + src/storage \ + src/utils INCLUDES := include VPATH = $(dir $(wildcard ./$(SOURCEDIR)/*/)) $(dir $(wildcard ./$(SOURCEDIR)/*/*/)) -VPATH += $(dir $(wildcard ./$(SOURCEDIR)/*/*/*/)) $(dir $(wildcard ./$(SOURCEDIR)/*/*/*/*/)) +VPATH += $(dir $(wildcard ./$(SOURCEDIR)/*/*/*/)) $(dir $(wildcard ./$(SOURCEDIR)/*/*/*/*/)) CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*))) @@ -41,8 +41,8 @@ OBJS = $(addprefix $(BUILD)/$(TARGET)/, $(OFILES_BIN) $(OFILES_SRC)) INCLUDE :=$(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ - $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ - -I$(BUILD)/$(TARGET) + $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ + -I$(BUILD)/$(TARGET) ARCH := -march=armv4t -mtune=arm7tdmi -mthumb -mthumb-interwork CFLAGS = $(INCLUDE) $(ARCH) -O2 -nostdlib -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-inline -std=gnu11 -Wall @@ -51,7 +51,7 @@ LDFLAGS = $(ARCH) -nostartfiles -lgcc -Wl,--nmagic,--gc-sections .PHONY: all clean -all: directories $(TARGET).bin +all: directories external $(TARGET).bin @echo $(HFILES_BIN) @echo -n "Payload size is " @wc -c < $(OUTPUT)/$(TARGET).bin @@ -68,6 +68,25 @@ clean: @rm -rf $(OUTPUT) @rm -rf logo_bmp.h +external: directories + $(MAKE) -C modules/minerva + +release: directories all + mkdir -p argon/logos + mkdir -p argon/payloads + mkdir -p argon/sys + + cp output/argon-nx.bin argon-nx.bin + cp output/libsys_minerva.bso argon/sys/minerva.bso + cp img/example-custom/logos/* argon/logos + cp img/example-custom/backgrounds/default.bmp argon/background.bmp + cp modules/resources.argon argon/sys/resources.argon + + zip -r argon-nx.zip argon argon-nx.bin + + rm -rf argon + rm argon-nx.bin + $(MODULEDIRS): $(MAKE) -C $@ $(MAKECMDGOALS) diff --git a/modules/resources.argon b/modules/resources.argon new file mode 100755 index 00000000..f635a896 Binary files /dev/null and b/modules/resources.argon differ diff --git a/src/menu/gui/gui_menu.c b/src/menu/gui/gui_menu.c index 6320e928..90e451d4 100644 --- a/src/menu/gui/gui_menu.c +++ b/src/menu/gui/gui_menu.c @@ -145,9 +145,9 @@ static bool render_single_payload_tab(lv_obj_t *par, argon_ctxt_t * ctxt, char* static bool render_payloads_entries(lv_obj_t *par_tabview, argon_ctxt_t *argon_ctxt, char* payloads, u32 group) { - lv_obj_t *btn; - lv_obj_t *label; - lv_img_dsc_t* img; + lv_obj_t *btn = NULL; + lv_obj_t *label = NULL; + lv_img_dsc_t* img = NULL; u32 i = 4 * group;