mirror of
https://github.com/palera1n/palera1n.git
synced 2026-10-25 02:29:49 +01:00
gui build stuff
This commit is contained in:
1 parent
d82965f140
commit
0278d19df8
4 files changed
+62
-1
No files matched your search
@@ -4,9 +4,11 @@ SRC = $(shell pwd)
|
||||
DEP = $(SRC)/dep_root
|
||||
STRIP = strip
|
||||
CC ?= cc
|
||||
CXX ?= c++
|
||||
CFLAGS += -I$(DEP)/include -I$(SRC)/include -I$(SRC)
|
||||
CFLAGS += -Wall -Wextra -DPALERAIN_VERSION=\"2.0.0\" -Wall -Wextra -Wno-unused-parameter
|
||||
CFLAGS += -Wno-unused-variable -I$(SRC)/src -std=c99 -pedantic-errors -D_C99_SOURCE -D_POSIX_C_SOURCE=200112L
|
||||
CXXFLAGS += -I$(DEP)/include -I$(SRC)/include -I$(SRC) -std=c++11
|
||||
LIBS += $(DEP)/lib/libimobiledevice-1.0.a $(DEP)/lib/libirecovery-1.0.a $(DEP)/lib/libusbmuxd-2.0.a
|
||||
LIBS += $(DEP)/lib/libimobiledevice-glue-1.0.a $(DEP)/lib/libplist-2.0.a -pthread
|
||||
ifeq ($(TARGET_OS),)
|
||||
@@ -31,6 +33,13 @@ ifeq ($(TARGET_OS),Linux)
|
||||
LIBS += $(DEP)/lib/libgpm.a
|
||||
endif
|
||||
endif
|
||||
ifeq ($(GUI),1)
|
||||
LIBS += $(DEP)/lib/libguira1n.a
|
||||
ifeq ($(TARGET_OS),Darwin)
|
||||
LIBS += -framework Foundation -framework AppKit
|
||||
CXXFLAGS += -x objective-c++
|
||||
endif
|
||||
endif
|
||||
ifeq ($(DEV_BUILD),1)
|
||||
CFLAGS += -O0 -g -DDEV_BUILD -fno-omit-frame-pointer
|
||||
ifeq ($(ASAN),1)
|
||||
@@ -64,7 +73,7 @@ CFLAGS += -DBUILD_WHOAMI="\"$(BUILD_WHOAMI)\"" -DBUILD_TAG="\"$(BUILD_TAG)\""
|
||||
CFLAGS += -DBUILD_NUMBER="\"$(BUILD_NUMBER)\"" -DBUILD_BRANCH="\"$(BUILD_BRANCH)\""
|
||||
CFLAGS += -DBUILD_COMMIT="\"$(BUILD_COMMIT)\""
|
||||
|
||||
export SRC DEP CC CFLAGS LDFLAGS LIBS TARGET_OS DEV_BUILD BUILD_DATE BUILD_TAG BUILD_WHOAMI BUILD_STYLE BUILD_NUMBER BUILD_BRANCH
|
||||
export SRC DEP CC CXX CFLAGS CXXFLAGS LDFLAGS LIBS TARGET_OS DEV_BUILD BUILD_DATE BUILD_TAG BUILD_WHOAMI BUILD_STYLE BUILD_NUMBER BUILD_BRANCH
|
||||
|
||||
all: palera1n
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
#ifndef GUI_H
|
||||
#define GUI_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
|
||||
#define WINDOW_X 0
|
||||
#define WINDOW_Y 0
|
||||
#define WINDOW_SIZE_X 550
|
||||
#define WINDOW_SIZE_Y 300
|
||||
|
||||
#define WINDOW_TITLE "palera1n"
|
||||
#define WINDOW_RESIZE false
|
||||
#define WINDOW_RESTORE true
|
||||
#define WINDOW_ALLOW_FULLSCREEN false
|
||||
#define WINDOW_BORDERLESS false
|
||||
#define WINDOW_DECORATIONS true
|
||||
|
||||
#define IDLE false
|
||||
#define TARGET_FPS 60
|
||||
#define CONFIG_FILE "palera1n.ini"
|
||||
#define EMBED_ASSETS true
|
||||
#define ASSETS_DIRECTORY "assets"
|
||||
|
||||
#define NORMAL_MODE 1
|
||||
#define RECOVERY_MODE 2
|
||||
#define DFU_MODE 3
|
||||
#define NONE 4
|
||||
#define PONGO_MODE 5
|
||||
|
||||
int palera1n(int argc, char *argv[]);
|
||||
|
||||
#endif
|
||||
@@ -56,6 +56,12 @@ BUILD_OPTIONS += TUI
|
||||
CFLAGS += -DTUI
|
||||
endif
|
||||
|
||||
ifeq ($(GUI),1)
|
||||
CXXOBJECTS = gui_alerts.o gui_design.o gui_device.o gui_main.o
|
||||
BUILD_OPTIONS += GUI
|
||||
CFLAGS += -DGUI
|
||||
endif
|
||||
|
||||
CHECKRA1N_VERSION ?= 0.1337.1
|
||||
LIPO = lipo
|
||||
LDID = ldid
|
||||
@@ -125,8 +131,15 @@ xxd-%.c: %
|
||||
%.o: %.c $(wildcard ../include/*.h)
|
||||
$(CC) -c $(CFLAGS) $<
|
||||
|
||||
%.o: %.cpp $(wildcard ../include/*.h)
|
||||
$(CXX) -c $(CXXFLAGS) $<
|
||||
|
||||
palera1n: $(OBJECTS)
|
||||
ifeq ($(GUI),1)
|
||||
$(CXX) $(LDFLAGS) $(OBJECTS) $(CXXOBJECTS) $(LIBS) -o palera1n
|
||||
else
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) $(LIBS) -o palera1n
|
||||
endif
|
||||
ifeq (,$(findstring macosx, $(CFLAGS)))
|
||||
ifneq (,$(findstring version-min=, $(CFLAGS)))
|
||||
$(LDID) -Susb.xml palera1n
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <palerain.h>
|
||||
#include <xxd-embedded.h>
|
||||
#include <kerninfo.h>
|
||||
#include <gui.h>
|
||||
|
||||
#define CMD_LEN_MAX 512
|
||||
#define OVERRIDE_MAGIC 0xd803b376
|
||||
@@ -187,6 +188,8 @@ cleanup:
|
||||
}
|
||||
|
||||
|
||||
#ifndef GUI
|
||||
int main (int argc, char* argv[]) {
|
||||
return palera1n(argc, argv);
|
||||
}
|
||||
#endif
|
||||
Reference in new issue
Block a user