From WikiTemp, the GBAtemp wiki
Line 50: Line 50:
 
  /3ds/name of the homebrew/<name of the folder>.icn
 
  /3ds/name of the homebrew/<name of the folder>.icn
 
  /3ds/name of the homebrew/<name of the folder>.smdh
 
  /3ds/name of the homebrew/<name of the folder>.smdh
 +
 +
== Compiling ==
 +
In order to compile The Homebrew Launcher, you need to install zlib for 3DS:
 +
 +
1) Download [http://prdownloads.sourceforge.net/libpng/zlib-1.2.8.tar.gz?download zlib-1.2.8]. You ''don't'' need to extract it.
 +
 +
2) Copy the following text and save it as a file named "Makefile":
 +
<div class="mw-collapsible mw-collapsed"><source lang="make">
 +
FREETYPE            := freetype
 +
FREETYPE_VERSION    := $(FREETYPE)-2.5.4
 +
FREETYPE_SRC        := $(FREETYPE_VERSION).tar.bz2
 +
 +
LIBEXIF              := libexif
 +
LIBEXIF_VERSION      := $(LIBEXIF)-0.6.21
 +
LIBEXIF_SRC          := $(LIBEXIF_VERSION).tar.bz2
 +
 +
LIBJPEGTURBO        := libjpeg-turbo
 +
LIBJPEGTURBO_VERSION := $(LIBJPEGTURBO)-1.3.1
 +
LIBJPEGTURBO_SRC    := $(LIBJPEGTURBO_VERSION).tar.gz
 +
 +
LIBPNG              := libpng
 +
LIBPNG_VERSION      := $(LIBPNG)-1.6.15
 +
LIBPNG_SRC          := $(LIBPNG_VERSION).tar.xz
 +
 +
SQLITE              := sqlite
 +
SQLITE_VERSION      := $(SQLITE)-autoconf-3080704
 +
SQLITE_SRC          := $(SQLITE_VERSION).tar.gz
 +
 +
ZLIB                := zlib
 +
ZLIB_VERSION        := $(ZLIB)-1.2.8
 +
ZLIB_SRC            := $(ZLIB_VERSION).tar.gz
 +
 +
export PORTLIBS        := $(DEVKITPRO)/portlibs/armv6k
 +
export PATH            := $(DEVKITARM)/bin:$(PATH)
 +
export PKG_CONFIG_PATH := $(PORTLIBS)/lib/pkgconfig
 +
export CFLAGS          := -march=armv6k -mtune=mpcore -mfloat-abi=hard -O3 -mword-relocations
 +
export CPPFLAGS        := -I$(PORTLIBS)/include
 +
export LDFLAGS        := -L$(PORTLIBS)/lib
 +
 +
.PHONY: all install install-zlib clean \
 +
        $(FREETYPE) \
 +
        $(LIBEXIF) \
 +
        $(LIBJPEGTURBO) \
 +
        $(LIBPNG) \
 +
        $(SQLITE) \
 +
        $(ZLIB)
 +
 +
all:
 +
@echo "Please choose one of the following targets:"
 +
@echo "  $(FREETYPE) (requires zlib to be installed)"
 +
@echo "  $(LIBEXIF)"
 +
@echo "  $(LIBJPEGTURBO)"
 +
@echo "  $(LIBPNG) (requires zlib to be installed)"
 +
@echo "  $(SQLITE)"
 +
@echo "  $(ZLIB)"
 +
 +
$(FREETYPE): $(FREETYPE_SRC)
 +
@[ -d $(FREETYPE_VERSION) ] || tar -xaf $<
 +
@cd $(FREETYPE_VERSION) && \
 +
./configure --prefix=$(PORTLIBS) --host=arm-none-eabi --disable-shared --enable-static
 +
@$(MAKE) -C $(FREETYPE_VERSION)
 +
 +
$(LIBEXIF): $(LIBEXIF_SRC)
 +
@[ -d $(LIBEXIF_VERSION) ] || tar -xaf $<
 +
@cd $(LIBEXIF_VERSION) && \
 +
./configure --prefix=$(PORTLIBS) --host=arm-none-eabi --disable-shared --enable-static
 +
@$(MAKE) -C $(LIBEXIF_VERSION)
 +
 +
$(LIBJPEGTURBO): $(LIBJPEGTURBO_SRC)
 +
@[ -d $(LIBJPEGTURBO_VERSION) ] || tar -xaf $<
 +
@cd $(LIBJPEGTURBO_VERSION) && \
 +
./configure --prefix=$(PORTLIBS) --host=arm-none-eabi --disable-shared --enable-static
 +
@$(MAKE) CFLAGS+="\"-Drandom()=rand()\"" -C $(LIBJPEGTURBO_VERSION)
 +
 +
$(LIBPNG): $(LIBPNG_SRC)
 +
@[ -d $(LIBPNG_VERSION) ] || tar -xaf $<
 +
@cd $(LIBPNG_VERSION) && \
 +
./configure --prefix=$(PORTLIBS) --host=arm-none-eabi --disable-shared --enable-static
 +
@$(MAKE) -C $(LIBPNG_VERSION)
 +
 +
# sqlite won't work with -ffast-math
 +
$(SQLITE): $(SQLITE_SRC)
 +
@[ -d $(SQLITE_VERSION) ] || tar -xaf $<
 +
@cd $(SQLITE_VERSION) && \
 +
CFLAGS="$(filter-out -ffast-math,$(CFLAGS)) -DSQLITE_OS_OTHER=1" ./configure --disable-shared --disable-threadsafe --disable-dynamic-extensions --host=arm-none-eabi --prefix=$(PORTLIBS)
 +
# avoid building sqlite3 shell
 +
@$(MAKE) -C $(SQLITE_VERSION) libsqlite3.la
 +
 +
$(ZLIB): $(ZLIB_SRC)
 +
@[ -d $(ZLIB_VERSION) ] || tar -xaf $<
 +
@cd $(ZLIB_VERSION) && \
 +
CHOST=arm-none-eabi ./configure --static --prefix=$(PORTLIBS)
 +
@$(MAKE) -C $(ZLIB_VERSION)
 +
 +
install-zlib:
 +
@$(MAKE) -C $(ZLIB_VERSION) install
 +
 +
install:
 +
@[ ! -d $(FREETYPE_VERSION) ] || $(MAKE) -C $(FREETYPE_VERSION) install
 +
@[ ! -d $(LIBEXIF_VERSION) ] || $(MAKE) -C $(LIBEXIF_VERSION) install
 +
@[ ! -d $(LIBJPEGTURBO_VERSION) ] || $(MAKE) -C $(LIBJPEGTURBO_VERSION) install
 +
@[ ! -d $(LIBPNG_VERSION) ] || $(MAKE) -C $(LIBPNG_VERSION) install
 +
@[ ! -d $(SQLITE_VERSION) ] || $(MAKE) -C $(SQLITE_VERSION) install-libLTLIBRARIES install-data
 +
 +
clean:
 +
@$(RM) -r $(FREETYPE_VERSION)
 +
@$(RM) -r $(LIBEXIF_VERSION)
 +
@$(RM) -r $(LIBJPEGTURBO_VERSION)
 +
@$(RM) -r $(LIBPNG_VERSION)
 +
@$(RM) -r $(SQLITE_VERSION)
 +
@$(RM) -r $(ZLIB_VERSION)
 +
</source></div>
 +
3) Place both the makefile and the tar.gz in the same folder.
 +
 +
4) Open a command prompt/terminal and navigate to the folder with the Makefile
 +
 +
5) Run the commands <code>make zlib</code> and <code>make install-zlib</code>
 +
 +
6) You can now compile the homebrew launcher.
  
 
==Changelog==
 
==Changelog==

Revision as of 13:50, 26 August 2015

The Homebrew Launcher
3dshb TheHomebrewLauncher logo.png
General
Author[[User:Smealum]], [[User:GEMISIS]], [[User:fincs]], [[User:mtheall]]
Graphics by[[User:Fluto]], [[User:Arkhandar]]
Version0.1
Format3dsx
3ds
cia
bin/elf
dat
Links
Source

The Homebrew Launcher (hbmenu for short) is the default menu for ninjhax, a 3DS homebrew-enabling exploit released on November 20th 2014. It is a fairly simple (and beautiful) menu that lists homebrew applications and lets you run them.

Usage

Installation

To use The Homebrew Launcher as your ninjhax main menu, simply rename the 3dsx executable to boot.3dsx and place it at the root of your SD card.

Controls

  • Start: reboot your console into home menu.
  • D-PAD, CIRCLE-PAD, Stylus: Navigate and select an application
  • A or Stylus: Start application.

Supported format

Only executable files in 3dsx format are supported.

Icons and banners are supported in smdh, bin, and icn format.

Supported paths

The Homebrew Launcher scans all the .3dsx files located in the sdmc:/3ds/ folders and its sub-folders.

It can list 3dsx executables located in the sdmc:/3ds/ directory, but ideally, you should have a folder for each application, containing an executable and an icon (SMDH) file.

The executable should be named either boot.3dsx or [folder name].3dsx.

The icon file can be named either icon.bin, icon.smdh, icon.icn, [folder name].smdh, or [folder name].icn. They are all the same smdh format, only the name is different, so use the filename you prefer.

Here is a list of all supported paths and filename for executable:

/3ds/<filename>.3dsx
/3ds/name of the homebrew/boot.3dsx
/3ds/name of the homebrew/<name of the folder>.3dsx

And a list of all supported paths and filename for the icons:

/3ds/name of the homebrew/icon.bin
/3ds/name of the homebrew/icon.icn
/3ds/name of the homebrew/icon.smdh
/3ds/name of the homebrew/<name of the folder>.icn
/3ds/name of the homebrew/<name of the folder>.smdh

Compiling

In order to compile The Homebrew Launcher, you need to install zlib for 3DS:

1) Download zlib-1.2.8. You don't need to extract it.

2) Copy the following text and save it as a file named "Makefile":

FREETYPE             := freetype
FREETYPE_VERSION     := $(FREETYPE)-2.5.4
FREETYPE_SRC         := $(FREETYPE_VERSION).tar.bz2
 
LIBEXIF              := libexif
LIBEXIF_VERSION      := $(LIBEXIF)-0.6.21
LIBEXIF_SRC          := $(LIBEXIF_VERSION).tar.bz2
 
LIBJPEGTURBO         := libjpeg-turbo
LIBJPEGTURBO_VERSION := $(LIBJPEGTURBO)-1.3.1
LIBJPEGTURBO_SRC     := $(LIBJPEGTURBO_VERSION).tar.gz
 
LIBPNG               := libpng
LIBPNG_VERSION       := $(LIBPNG)-1.6.15
LIBPNG_SRC           := $(LIBPNG_VERSION).tar.xz
 
SQLITE               := sqlite
SQLITE_VERSION       := $(SQLITE)-autoconf-3080704
SQLITE_SRC           := $(SQLITE_VERSION).tar.gz
 
ZLIB                 := zlib
ZLIB_VERSION         := $(ZLIB)-1.2.8
ZLIB_SRC             := $(ZLIB_VERSION).tar.gz
 
export PORTLIBS        := $(DEVKITPRO)/portlibs/armv6k
export PATH            := $(DEVKITARM)/bin:$(PATH)
export PKG_CONFIG_PATH := $(PORTLIBS)/lib/pkgconfig
export CFLAGS          := -march=armv6k -mtune=mpcore -mfloat-abi=hard -O3 -mword-relocations
export CPPFLAGS        := -I$(PORTLIBS)/include
export LDFLAGS         := -L$(PORTLIBS)/lib
 
.PHONY: all install install-zlib clean \
        $(FREETYPE) \
        $(LIBEXIF) \
        $(LIBJPEGTURBO) \
        $(LIBPNG) \
        $(SQLITE) \
        $(ZLIB)
 
all:
	@echo "Please choose one of the following targets:"
	@echo "  $(FREETYPE) (requires zlib to be installed)"
	@echo "  $(LIBEXIF)"
	@echo "  $(LIBJPEGTURBO)"
	@echo "  $(LIBPNG) (requires zlib to be installed)"
	@echo "  $(SQLITE)"
	@echo "  $(ZLIB)"
 
$(FREETYPE): $(FREETYPE_SRC)
	@[ -d $(FREETYPE_VERSION) ] || tar -xaf $<
	@cd $(FREETYPE_VERSION) && \
	 ./configure --prefix=$(PORTLIBS) --host=arm-none-eabi --disable-shared --enable-static
	@$(MAKE) -C $(FREETYPE_VERSION)
 
$(LIBEXIF): $(LIBEXIF_SRC)
	@[ -d $(LIBEXIF_VERSION) ] || tar -xaf $<
	@cd $(LIBEXIF_VERSION) && \
	 ./configure --prefix=$(PORTLIBS) --host=arm-none-eabi --disable-shared --enable-static
	@$(MAKE) -C $(LIBEXIF_VERSION)
 
$(LIBJPEGTURBO): $(LIBJPEGTURBO_SRC)
	@[ -d $(LIBJPEGTURBO_VERSION) ] || tar -xaf $<
	@cd $(LIBJPEGTURBO_VERSION) && \
	 ./configure --prefix=$(PORTLIBS) --host=arm-none-eabi --disable-shared --enable-static
	@$(MAKE) CFLAGS+="\"-Drandom()=rand()\"" -C $(LIBJPEGTURBO_VERSION)
 
$(LIBPNG): $(LIBPNG_SRC)
	@[ -d $(LIBPNG_VERSION) ] || tar -xaf $<
	@cd $(LIBPNG_VERSION) && \
	 ./configure --prefix=$(PORTLIBS) --host=arm-none-eabi --disable-shared --enable-static
	@$(MAKE) -C $(LIBPNG_VERSION)
 
# sqlite won't work with -ffast-math
$(SQLITE): $(SQLITE_SRC)
	@[ -d $(SQLITE_VERSION) ] || tar -xaf $<
	@cd $(SQLITE_VERSION) && \
	 CFLAGS="$(filter-out -ffast-math,$(CFLAGS)) -DSQLITE_OS_OTHER=1" ./configure --disable-shared --disable-threadsafe --disable-dynamic-extensions --host=arm-none-eabi --prefix=$(PORTLIBS)
	# avoid building sqlite3 shell
	@$(MAKE) -C $(SQLITE_VERSION) libsqlite3.la
 
$(ZLIB): $(ZLIB_SRC)
	@[ -d $(ZLIB_VERSION) ] || tar -xaf $<
	@cd $(ZLIB_VERSION) && \
	 CHOST=arm-none-eabi ./configure --static --prefix=$(PORTLIBS)
	@$(MAKE) -C $(ZLIB_VERSION)
 
install-zlib: 
	@$(MAKE) -C $(ZLIB_VERSION) install
 
install:
	@[ ! -d $(FREETYPE_VERSION) ] || $(MAKE) -C $(FREETYPE_VERSION) install
	@[ ! -d $(LIBEXIF_VERSION) ] || $(MAKE) -C $(LIBEXIF_VERSION) install
	@[ ! -d $(LIBJPEGTURBO_VERSION) ] || $(MAKE) -C $(LIBJPEGTURBO_VERSION) install
	@[ ! -d $(LIBPNG_VERSION) ] || $(MAKE) -C $(LIBPNG_VERSION) install
	@[ ! -d $(SQLITE_VERSION) ] || $(MAKE) -C $(SQLITE_VERSION) install-libLTLIBRARIES install-data
 
clean:
	@$(RM) -r $(FREETYPE_VERSION)
	@$(RM) -r $(LIBEXIF_VERSION)
	@$(RM) -r $(LIBJPEGTURBO_VERSION)
	@$(RM) -r $(LIBPNG_VERSION)
	@$(RM) -r $(SQLITE_VERSION)
	@$(RM) -r $(ZLIB_VERSION)

3) Place both the makefile and the tar.gz in the same folder.

4) Open a command prompt/terminal and navigate to the folder with the Makefile

5) Run the commands make zlib and make install-zlib

6) You can now compile the homebrew launcher.

Changelog

v0.1

Initial release

Credits

  • Smealum : code
  • GEMISIS : code
  • fincs : code
  • mtheall : code
  • Fluto : graphics
  • Arkhandar : graphics