-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
298 changed files
with
86,408 additions
and
108,841 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,6 @@ SdOut/ | |
*.nsp | ||
.vs/ | ||
bin/ | ||
obj/ | ||
obj/ | ||
old/ | ||
out/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[submodule "Plutonium"] | ||
path = Plutonium | ||
path = libs/Plutonium | ||
url = https://github.com/XorTroll/Plutonium | ||
[submodule "Atmosphere-libs"] | ||
path = Atmosphere-libs | ||
path = libs/Atmosphere-libs | ||
url = https://github.com/Atmosphere-NX/Atmosphere-libs |
Submodule Atmosphere-libs
deleted from
590cda
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,52 @@ | ||
|
||
export UL_MAJOR := 0 | ||
export UL_MINOR := 3 | ||
export UL_MICRO := 4 | ||
export UL_VERSION := $(UL_MAJOR).$(UL_MINOR).$(UL_MICRO) | ||
VERSION_MAJOR := 0 | ||
VERSION_MINOR := 4 | ||
VERSION_MICRO := 0 | ||
VERSION := $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_MICRO) | ||
|
||
export UL_DEFS := -DUL_MAJOR=$(UL_MAJOR) -DUL_MINOR=$(UL_MINOR) -DUL_MICRO=$(UL_MICRO) -DUL_VERSION=\"$(UL_VERSION)\" | ||
DEFAULT_HB_NAME := Unnamed homebrew | ||
DEFAULT_HB_AUTHOR := Unknown author | ||
DEFAULT_HB_VERSION := Unknown version | ||
|
||
export UL_COMMON_SOURCES := ../uLaunch/source ../uLaunch/source/am ../uLaunch/source/dmi ../uLaunch/source/cfg ../uLaunch/source/db ../uLaunch/source/fs ../uLaunch/source/net ../uLaunch/source/os ../uLaunch/source/util | ||
export UL_COMMON_INCLUDES := ../uLaunch/include | ||
export CPP_DEFS := -DUL_VERSION=\"$(VERSION)\" | ||
|
||
export UL_CXXFLAGS := -fno-rtti -fexceptions -fpermissive -std=gnu++20 | ||
.PHONY: all fresh clean default_hb usystem uloader umenu | ||
|
||
.PHONY: all base make_hbtarget hbtarget make_daemon daemon make_menu menu clean | ||
all: default_hb usystem uloader umenu | ||
|
||
all: hbtarget daemon menu | ||
|
||
base: | ||
@mkdir -p SdOut/ | ||
|
||
make_hbtarget: | ||
@$(MAKE) -C uHbTarget/ | ||
@mkdir -p SdOut/ulaunch/bin/uHbTarget | ||
@mkdir -p SdOut/ulaunch/bin/uHbTarget/sys | ||
@mkdir -p SdOut/ulaunch/bin/uHbTarget/applet | ||
@mkdir -p SdOut/ulaunch/bin/uHbTarget/app | ||
@cp uHbTarget/uHbTarget.nso SdOut/ulaunch/bin/uHbTarget/sys/main | ||
@cp uHbTarget/uHbTarget.nso SdOut/ulaunch/bin/uHbTarget/applet/main | ||
@cp uHbTarget/uHbTarget.nso SdOut/ulaunch/bin/uHbTarget/app/main | ||
@cp uHbTarget/uHbTarget_sys.npdm SdOut/ulaunch/bin/uHbTarget/sys/main.npdm | ||
@cp uHbTarget/uHbTarget_applet.npdm SdOut/ulaunch/bin/uHbTarget/applet/main.npdm | ||
@cp uHbTarget/uHbTarget_app.npdm SdOut/ulaunch/bin/uHbTarget/app/main.npdm | ||
|
||
hbtarget: base make_hbtarget | ||
|
||
make_daemon: | ||
@$(MAKE) -C uDaemon/ | ||
@mkdir -p SdOut/atmosphere/contents/0100000000001000 | ||
@cp uDaemon/out/nintendo_nx_arm64_armv8a/release/uDaemon.nsp SdOut/atmosphere/contents/0100000000001000/exefs.nsp | ||
|
||
daemon: base make_daemon | ||
|
||
make_menu: | ||
@$(MAKE) -C Plutonium/ | ||
@$(MAKE) -C uMenu/ | ||
@mkdir -p SdOut/ulaunch/bin/uMenu | ||
@cp uMenu/uMenu.nso SdOut/ulaunch/bin/uMenu/main | ||
@cp uMenu/uMenu.npdm SdOut/ulaunch/bin/uMenu/main.npdm | ||
@build_romfs uMenu/romfs SdOut/ulaunch/bin/uMenu/romfs.bin | ||
|
||
menu: base make_menu | ||
fresh: clean all | ||
|
||
clean: | ||
@rm -rf SdOut/ | ||
@$(MAKE) clean -C uDaemon/ | ||
@$(MAKE) clean -C uMenu/ | ||
@$(MAKE) clean -C uHbTarget/ | ||
@$(MAKE) clean -C projects/uSystem | ||
@$(MAKE) clean -C projects/uLoader | ||
@$(MAKE) clean -C projects/uMenu | ||
@rm -rf SdOut | ||
|
||
default_hb: | ||
@nacptool --create "$(DEFAULT_HB_NAME)" "$(DEFAULT_HB_AUTHOR)" "$(DEFAULT_HB_VERSION)" default_hb_nacp.nacp | ||
@mkdir -p SdOut/umad | ||
@cp default_hb_nacp.nacp SdOut/umad/default_hb_nacp.nacp | ||
@cp default_hb_icon.jpg SdOut/umad/default_hb_icon.jpg | ||
|
||
usystem: | ||
@$(MAKE) -C projects/uSystem | ||
@mkdir -p SdOut/atmosphere/contents/0100000000001000 | ||
@cp projects/uSystem/out/nintendo_nx_arm64_armv8a/release/uSystem.nsp SdOut/atmosphere/contents/0100000000001000/exefs.nsp | ||
|
||
uloader: | ||
@$(MAKE) -C projects/uLoader | ||
@mkdir -p SdOut/umad/bin/uLoader | ||
@mkdir -p SdOut/umad/bin/uLoader/applet | ||
@cp projects/uLoader/uLoader.nso SdOut/umad/bin/uLoader/applet/main | ||
@cp projects/uLoader/uLoader_applet.npdm SdOut/umad/bin/uLoader/applet/main.npdm | ||
@mkdir -p SdOut/umad/bin/uLoader/application | ||
@cp projects/uLoader/uLoader.nso SdOut/umad/bin/uLoader/application/main | ||
@cp projects/uLoader/uLoader_application.npdm SdOut/umad/bin/uLoader/application/main.npdm | ||
|
||
umenu: | ||
@$(MAKE) -C projects/uMenu | ||
@mkdir -p SdOut/umad/bin/uMenu | ||
@cp projects/uMenu/uMenu.nso SdOut/umad/bin/uMenu/main | ||
@cp projects/uMenu/uMenu.npdm SdOut/umad/bin/uMenu/main.npdm | ||
@cp -r uitest SdOut/umad/ | ||
# @build_romfs uMenu/romfs SdOut/umad/bin/uMenu/romfs.bin |
Submodule Plutonium
deleted from
8891b6
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Submodule Atmosphere-libs
added at
b1607d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
#--------------------------------------------------------------------------------- | ||
.SUFFIXES: | ||
#--------------------------------------------------------------------------------- | ||
|
||
ifeq ($(strip $(DEVKITPRO)),) | ||
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>/devkitpro") | ||
endif | ||
|
||
include $(DEVKITPRO)/devkitA64/base_rules | ||
include $(DEVKITPRO)/libnx/switch_rules | ||
|
||
#--------------------------------------------------------------------------------- | ||
# TARGET is the name of the output | ||
# SOURCES is a list of directories containing source code | ||
# DATA is a list of directories containing data files | ||
# INCLUDES is a list of directories containing header files | ||
#--------------------------------------------------------------------------------- | ||
BUILD := build | ||
TARGET := $(notdir $(CURDIR)) | ||
SOURCES := source source/ul source/ul/cfg source/ul/smi source/ul/system | ||
INCLUDES := include | ||
OUT_LIB := lib | ||
|
||
#--------------------------------------------------------------------------------- | ||
# options for code generation | ||
#--------------------------------------------------------------------------------- | ||
ARCH := -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIC -ftls-model=local-exec | ||
|
||
CFLAGS := -g -Wall -Werror -O2 -ffunction-sections -fdata-sections $(ARCH) $(INCLUDE) -D__SWITCH__ | ||
|
||
CXXFLAGS := $(CFLAGS) -fno-rtti -fexceptions -std=gnu++20 | ||
|
||
ASFLAGS := -g $(ARCH) | ||
|
||
#--------------------------------------------------------------------------------- | ||
# list of directories containing libraries, this must be the top level containing | ||
# include and lib | ||
#--------------------------------------------------------------------------------- | ||
LIBDIRS := $(PORTLIBS) $(LIBNX) | ||
|
||
#--------------------------------------------------------------------------------- | ||
# no real need to edit anything past this point unless you need to add additional | ||
# rules for different file extensions | ||
#--------------------------------------------------------------------------------- | ||
ifneq ($(BUILD),$(notdir $(CURDIR))) | ||
#--------------------------------------------------------------------------------- | ||
|
||
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \ | ||
$(foreach dir,$(DATA),$(CURDIR)/$(dir)) | ||
|
||
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) | ||
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) | ||
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) | ||
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*))) | ||
|
||
#--------------------------------------------------------------------------------- | ||
# use CXX for linking C++ projects, CC for standard C | ||
#--------------------------------------------------------------------------------- | ||
ifeq ($(strip $(CPPFILES)),) | ||
#--------------------------------------------------------------------------------- | ||
export LD := $(CC) | ||
#--------------------------------------------------------------------------------- | ||
else | ||
#--------------------------------------------------------------------------------- | ||
export LD := $(CXX) | ||
#--------------------------------------------------------------------------------- | ||
endif | ||
#--------------------------------------------------------------------------------- | ||
export OUTPUT := $(CURDIR)/$(OUT_LIB)/lib$(TARGET).a | ||
export DEPSDIR := $(CURDIR)/$(BUILD) | ||
export OFILES_BIN := $(addsuffix .o,$(BINFILES)) | ||
export OFILES_SRC := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) | ||
export OFILES := $(OFILES_BIN) $(OFILES_SRC) | ||
export HFILES := $(addsuffix .h,$(subst .,_,$(BINFILES))) | ||
|
||
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ | ||
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \ | ||
-I$(CURDIR)/$(BUILD) | ||
|
||
.PHONY: $(BUILD) clean all | ||
|
||
#--------------------------------------------------------------------------------- | ||
all: $(BUILD) | ||
|
||
$(BUILD): | ||
@[ -d $@ ] || mkdir -p $@ | ||
@[ -d $(OUT_LIB) ] || mkdir -p $(OUT_LIB) | ||
@$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile | ||
|
||
#--------------------------------------------------------------------------------- | ||
clean: | ||
@echo clean ... | ||
@rm -fr $(CURDIR)/$(BUILD) | ||
@rm -fr $(CURDIR)/$(OUT_LIB) | ||
|
||
#--------------------------------------------------------------------------------- | ||
else | ||
|
||
DEPENDS := $(OFILES:.o=.d) | ||
|
||
#--------------------------------------------------------------------------------- | ||
# main targets | ||
#--------------------------------------------------------------------------------- | ||
$(OUTPUT) : $(OFILES) | ||
|
||
$(OFILES_SRC) : $(HFILES) | ||
|
||
#--------------------------------------------------------------------------------- | ||
%_bin.h %.bin.o : %.bin | ||
#--------------------------------------------------------------------------------- | ||
@echo $(notdir $<) | ||
@$(bin2o) | ||
|
||
|
||
-include $(DEPENDS) | ||
|
||
#--------------------------------------------------------------------------------------- | ||
endif | ||
#--------------------------------------------------------------------------------------- |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
|
||
#pragma once | ||
#include <switch.h> | ||
#include <string> | ||
|
||
namespace ul::cfg { | ||
|
||
enum class HomebrewLaunchMode : u32 { | ||
None = 0, | ||
Applet = 1, | ||
Application = 2 | ||
}; | ||
|
||
struct Config { | ||
static constexpr const char ConfigPath[] = "sdmc:/umad/config.json"; | ||
|
||
u64 menu_takeover_program_id; | ||
u64 hb_applet_takeover_program_id; | ||
u64 hb_application_takeover_program_id; | ||
std::string active_theme_name; | ||
u32 entry_menu_h_count; | ||
HomebrewLaunchMode default_hb_launch_mode; | ||
|
||
bool Load(); | ||
bool Save() const; | ||
|
||
inline bool ResetDefault() { | ||
// Take over eShop applet by default | ||
this->menu_takeover_program_id = 0x010000000000100B; | ||
|
||
// Take over parental-control applet by default | ||
this->hb_applet_takeover_program_id = 0x0100000000001001; | ||
|
||
// No donor application by default | ||
this->hb_application_takeover_program_id = 0; | ||
|
||
// Default theme name | ||
this->active_theme_name = "Default"; | ||
|
||
// Default entry count | ||
this->entry_menu_h_count = 4; | ||
|
||
// No default launch mode | ||
this->default_hb_launch_mode = HomebrewLaunchMode::None; | ||
|
||
return this->Save(); | ||
} | ||
|
||
inline bool EnsureLoad() { | ||
return this->Load() || this->ResetDefault(); | ||
} | ||
}; | ||
|
||
} |
Oops, something went wrong.