prepare for vWii version (installer atm hangs after applying patches)

This commit is contained in:
Christopher Roy Bratusek 2012-12-31 18:37:27 +01:00
parent 8398918fad
commit f0fd621ef6
16 changed files with 344 additions and 15 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<app version="1">
<name>HomebrewFilter Installer</name>
<coder>Nano</coder>
<version>rev41</version>
<ahb_access/>
<short_description>HBF Installer</short_description>
<long_description>Installs The HomebrewFilter
Changes in rev41:
//rev41:
- fixed auto-connecting Internet via WiFi
- fixed video initialization problem at PAL 50Hz
- fixed categorizing apps from SD Gecko
- removed remaining references to HBC
- basic support for WifiGecko
* most messages are shown via WifiGecko. Those that are
sent prior to network initialization will be missing
* option to en/disable WifiGecko (settings->network)
* no option yet to change IP and Port, currently sending
to 192.168.1.4:4405 (you change your PCs IP from Router
configuration interface)
- support for SDCardGecko (not SD Gecko!)
* saves debug messages to SD:/config/HBF/debug.txt
* endless logging, different logs are split with an
"HBF Log (YYYY-MM-DD / HH:MM:SS)" message. HBF never
deletes the logfile on it's own.
Note: ** Gecko priority:
1. SD Card Gecko
2. Wifi Gecko
3. USB Gecko
if SD Card Gecko is enabled, there's no messages
send via Wifi or USB and so on. By default HBF
tries to connect to USB Gecko.
</long_description>
</app>

View File

@ -1,18 +1,37 @@
all: compile_installer
all:
@echo either use "make compile_installer" or "make compile_installer_vwii"
REV=$(shell grep define svnrev/svnrev.c | gawk '{print $$3}')
dist: compile-installer
@tar cfj HomebrewFilter-rev$(REV).tar.bz HomebrewFilter/
dist: compile_installer
@tar cfj HomebrewFilter-rev$(REV).tar.bz2 HomebrewFilter/
@tar cfj HomebrewFilter-Standalone-rev$(REV).tar.bz2 HomebrewFilter.Standalone/
dist_vwii: compile_installer_vwii
@tar cfj HomebrewFilter-vWii-rev$(REV).tar.bz2 HomebrewFilter.vWii/
clean:
@make -C main clean
@make -C boot clean
@make -C installer clean
@make -C nand-loader clean
@make -C libruntimeiospatch clean
compile_hbf:
clean_vwii:
@make -C main clean
@make -C boot clean
@make -C installer clean
nand_loader:
@make -C nand-loader
libruntimeiospatch:
@make -C libruntimeiospatch
compile_hbf: clean
@echo "==========================="
@echo "======= HBF for Wii ======="
@echo "==========================="
@make -C main
@cp main/hbf.dol boot/source/hbf.dol
@ -25,3 +44,19 @@ compile_installer: compile_boot
@tools/WadMii.exe -input "Z:$(PWD)\installer\wad" -output "Z:$(PWD)\installer\data\install.wad" || wine tools/WadMii.exe -input "Z:$(PWD)\installer\wad" -output "Z:$(PWD)\installer\data\install.wad"
@make -C installer
@cp installer/installer.dol HomebrewFilter/boot.dol
compile_hbf_vwii: clean_vwii
@echo "============================"
@echo "======= HBF for vWii ======="
@echo "============================"
@make -C main -f Makefile.vWii
@cp main/hbf.dol boot/source/hbf.dol
compile_boot_vwii: compile_hbf_vwii
@make -C boot
@cp boot/hbf_boot.dol installer/wad.vwii/00000001.app
compile_installer_vwii: compile_boot_vwii
@tools/WadMii.exe -input "Z:$(PWD)\installer\wad.vwii" -output "Z:$(PWD)\installer\data\install.wad" || wine tools/WadMii.exe -input "Z:$(PWD)\installer\wad.vwii" -output "Z:$(PWD)\installer\data\install.wad"
@make -C installer
@cp installer/installer.dol HomebrewFilter.vWii/boot.dol

View File

@ -105,7 +105,7 @@ $(BUILD):
clean:
@echo clean ...
@rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol
@rm source/hbf.dol
@rm -f source/hbf.dol
#---------------------------------------------------------------------------------
run:

View File

@ -106,7 +106,7 @@ clean:
@echo clean ...
@rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol
@rm -f data/install.wad
@rm wad/00000001.app
@rm -f wad/00000001.app wad.vwii/00000001.app
#---------------------------------------------------------------------------------
run:

View File

@ -16,12 +16,14 @@ int main(int argc, char **argv) {
VIDEO_Init();
Video_SetMode();
if(AHBPROT_DISABLED)
IosPatch_RUNTIME(true, false, false, true);
WPAD_Init();
PAD_Init();
if(AHBPROT_DISABLED)
IosPatch_RUNTIME(true, false, true, true);
else
IOS_ReloadIOS(236);
menu();
signed_blob *p_tmd = NULL;

Binary file not shown.

View File

@ -125,7 +125,8 @@ $(BUILD):
clean:
@echo clean ...
@rm -fr $(BUILD) $(OUTPUT).dol $(OUTPUT).elf
@rm ../HomebrewFilter/boot.dol
@rm -f ../HomebrewFilter/boot.dol
@rm -f ../HomebrewFilter.Standalone/boot.dol
#---------------------------------------------------------------------------------
run:

188
main/Makefile.vWii Normal file
View File

@ -0,0 +1,188 @@
#---------------------------------------------------------------------------------
# Clear the implicit built in rules
#---------------------------------------------------------------------------------
.SUFFIXES:
#---------------------------------------------------------------------------------
ifeq ($(strip $(DEVKITPPC)),)
$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=<path to>devkitPPC")
endif
include $(DEVKITPPC)/wii_rules
#---------------------------------------------------------------------------------
# TARGET is the name of the output
# BUILD is the directory where object files & intermediate files will be placed
# SOURCES is a list of directories containing source code
# INCLUDES is a list of directories containing extra header files
#---------------------------------------------------------------------------------
TARGET := hbf
BUILD := build
SOURCES := source \
source/BootHomebrew \
source/DiskOperations \
source/libwiigui \
source/Prompts \
source/Menus \
source/Network \
source/Tools \
source/Neek \
source/Neek/data \
source/Neek/xml \
../svnrev
INCLUDES := source
DATA := data/fonts \
data/sounds \
data/images \
data/images/design \
data/binary
#---------------------------------------------------------------------------------
# options for code generation
#---------------------------------------------------------------------------------
CFLAGS = -g -O2 -Wall $(MACHDEP) $(INCLUDE) -DVWII
CXXFLAGS = -save-temps -Xassembler -aln=$@.lst $(CFLAGS)
LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map -Wl,--section-start,.init=0x81330000
#LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map
#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project
#---------------------------------------------------------------------------------
LIBS := -ldi -lpng -lz -lfat -lntfs -lwiiuse -lbte -lasnd -logc -lfreetype -lmxml -lext2fs -lruntimeiospatch
#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing
# include and lib
#---------------------------------------------------------------------------------
LIBDIRS := $(PORTLIBS)
#---------------------------------------------------------------------------------
# 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 OUTPUT := $(CURDIR)/$(TARGETDIR)/$(TARGET)
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir))\
$(foreach dir,$(DATA),$(CURDIR)/$(dir))
export DEPSDIR := $(CURDIR)/$(BUILD)
#---------------------------------------------------------------------------------
# automatically build a list of object files for our project
#---------------------------------------------------------------------------------
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
sFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.S)))
TTFFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.ttf)))
PNGFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.png)))
OGGFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.ogg)))
PCMFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.pcm)))
WAVFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.wav)))
DOLFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.dol)))
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.bin)))
#---------------------------------------------------------------------------------
# use CXX for linking C++ projects, CC for standard C
#---------------------------------------------------------------------------------
ifeq ($(strip $(CPPFILES)),)
export LD := $(CC)
else
export LD := $(CXX)
endif
export OFILES := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) \
$(sFILES:.s=.o) $(SFILES:.S=.o) \
$(TTFFILES:.ttf=.ttf.o) $(PNGFILES:.png=.png.o) \
$(OGGFILES:.ogg=.ogg.o) $(PCMFILES:.pcm=.pcm.o) \
$(WAVFILES:.wav=.wav.o) \
$(addsuffix .o,$(DOLFILES)) \
$(addsuffix .o,$(BINFILES))
#---------------------------------------------------------------------------------
# build a list of include paths
#---------------------------------------------------------------------------------
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
-I$(CURDIR)/$(BUILD) \
-I$(LIBOGC_INC) -I$(PORTLIBS)/include/freetype2
#---------------------------------------------------------------------------------
# build a list of library paths
#---------------------------------------------------------------------------------
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \
-L$(LIBOGC_LIB)
export OUTPUT := $(CURDIR)/$(TARGET)
.PHONY: $(BUILD) clean
#---------------------------------------------------------------------------------
$(BUILD):
@[ -d $@ ] || mkdir -p $@
@make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
#---------------------------------------------------------------------------------
clean:
@echo clean ...
@rm -fr $(BUILD) $(OUTPUT).dol $(OUTPUT).elf
@rm -f ../HomebrewFilter.vwii/boot.dol
#---------------------------------------------------------------------------------
run:
wiiload $(OUTPUT).dol
#---------------------------------------------------------------------------------
reload:
wiiload -r $(OUTPUT).dol
#---------------------------------------------------------------------------------
else
DEPENDS := $(OFILES:.o=.d)
#---------------------------------------------------------------------------------
# main targets
#---------------------------------------------------------------------------------
$(OUTPUT).dol: $(OUTPUT).elf
$(OUTPUT).elf: $(OFILES)
#---------------------------------------------------------------------------------
# This rule links in binary data with .ttf, .png, and .mp3 extensions
#---------------------------------------------------------------------------------
%.elf.o : %.elf
@echo $(notdir $<)
@bin2s -a 32 $< | $(AS) -o $(@)
%.dol.o : %.dol
@echo $(notdir $<)
@bin2s -a 32 $< | $(AS) -o $(@)
%.ttf.o : %.ttf
@echo $(notdir $<)
@bin2s -a 32 $< | $(AS) -o $(@)
%.png.o : %.png
@echo $(notdir $<)
@bin2s -a 32 $< | $(AS) -o $(@)
%.ogg.o : %.ogg
@echo $(notdir $<)
@bin2s -a 32 $< | $(AS) -o $(@)
%.pcm.o : %.pcm
@echo $(notdir $<)
@bin2s -a 32 $< | $(AS) -o $(@)
%.wav.o : %.wav
@echo $(notdir $<)
@bin2s -a 32 $< | $(AS) -o $(@)
%.bin.o : %.bin
@echo $(notdir $<)
@bin2s -a 32 $< | $(AS) -o $(@)
-include $(DEPENDS)
#---------------------------------------------------------------------------------
endif
#---------------------------------------------------------------------------------

View File

@ -13,7 +13,11 @@ string CheckNewVersions()
{
string revs = "error";
char buffer[100];
#ifdef VWII
sprintf(buffer, "http://www.nanolx.org/hbf/DOL.vwii/revisions.vwii");
#else
sprintf(buffer, "http://www.nanolx.org/hbf/DOL/revisions");
#endif
struct block file = downloadfile(buffer);
if (file.data != NULL)
@ -27,7 +31,11 @@ string CheckNewVersions()
string NewVersionsText()
{
string text = "error";
#ifdef VWII
struct block file = downloadfile("http://www.nanolx.org/hbf/DOL.vwii/updates.vwii");
#else
struct block file = downloadfile("http://www.nanolx.org/hbf/DOL/updates");
#endif
if (file.data != NULL)
{
text = (char*)file.data;
@ -40,10 +48,17 @@ struct block file;
string new_update(string rev, string filename)
{
char url[100];
#ifdef VWII
if(rev == "Beta")
sprintf(url, "http://www.nanolx.org/hbf/DOL.vwii/Beta/%s", filename.c_str());
else
sprintf(url, "http://www.nanolx.org/hbf/DOL.vwii/rev%s/%s", rev.c_str(), filename.c_str());
#else
if(rev == "Beta")
sprintf(url, "http://www.nanolx.org/hbf/DOL/Beta/%s", filename.c_str());
else
sprintf(url, "http://www.nanolx.org/hbf/DOL/rev%s/%s", rev.c_str(), filename.c_str());
#endif
file = downloadfile(url);
if (file.data && file.size > 0)

View File

@ -102,20 +102,43 @@ updatePrompt(string rev)
ResumeGui();
char url[100];
#ifdef VWII
if(rev == "Beta")
sprintf(url, "http://www.nanolx.org/hbf/DOL.vwii/Beta/boot.dol");
else
sprintf(url, "http://www.nanolx.org/hbf/DOL.vwii/rev%s/boot.dol", rev.c_str());
// copy boot.dol to prev.dol
std::ifstream infile((Settings.device_dat + ":/apps/HomebrewFilter.vWii/boot.dol").c_str(), std::ios_base::binary);
std::ofstream outfile((Settings.device_dat + ":/apps/HomebrewFilter.vWii/prev.dol").c_str(), std::ios_base::binary);
#else
if(rev == "Beta")
sprintf(url, "http://www.nanolx.org/hbf/DOL/Beta/boot.dol");
else
sprintf(url, "http://www.nanolx.org/hbf/DOL/rev%s/boot.dol", rev.c_str());
// copy boot.dol to prev.dol
// copy boot.dol to prev.dol
std::ifstream infile((Settings.device_dat + ":/apps/HomebrewFilter/boot.dol").c_str(), std::ios_base::binary);
std::ofstream outfile((Settings.device_dat + ":/apps/HomebrewFilter/prev.dol").c_str(), std::ios_base::binary);
#endif
outfile << infile.rdbuf();
struct block file = downloadfile(url);
if (file.data && file.size > 0)
{
#ifdef VWII
// write file
if(opendir(check_path(Settings.device_dat + ":/apps/HomebrewFilter.vWii").c_str()) == NULL)
mkdir((Settings.device_dat + ":/apps/HomebrewFilter.vWii").c_str(), 0777);
FILE * data = fopen((Settings.device_dat + ":/apps/HomebrewFilter.vWii/boot.dol").c_str(), "wb");
if(data)
{
fwrite(file.data, 1, file.size, data);
fclose(data);
}
#else
// write file
if(opendir(check_path(Settings.device_dat + ":/apps/HomebrewFilter").c_str()) == NULL)
mkdir((Settings.device_dat + ":/apps/HomebrewFilter").c_str(), 0777);
@ -126,7 +149,7 @@ updatePrompt(string rev)
fwrite(file.data, 1, file.size, data);
fclose(data);
}
#endif
if(file.data)
free(file.data);
@ -324,7 +347,7 @@ string checkUpdatePrompt()
ResumeGui();
string rev = "NULL";
// überprüfen, ob netzwerk initialisiert wird
// berprfen, ob netzwerk initialisiert wird
Initialize_Network();
if(!IsNetworkInit())
{

View File

@ -279,7 +279,11 @@ main(int argc, char *argv[])
xprintf("Setting force_reload to NORELOAD\n");
Settings.force_reload = "NORELOAD";
xprintf("Loading boot.dol from online update\n");
#ifdef VWII
LoadHomebrew ((Settings.device_dat + ":/apps/HomebrewFilter.vWii/boot.dol").c_str());
#else
LoadHomebrew ((Settings.device_dat + ":/apps/HomebrewFilter/boot.dol").c_str());
#endif
BootHomebrew();
}
}

View File

@ -1,3 +1,4 @@
42-
41-
40-
39-

1
revisions.vwii Normal file
View File

@ -0,0 +1 @@
42-

View File

@ -5,13 +5,17 @@
- added option for choosing whether bootmii boot2 is
installed (adds "Load BootMii (Boot2)" in Exit-Prompt
- black-listed v65280 of IOS254 (if that version is
installed there's no "Load BootMii (IOS)" anymore
in Exit-Prompt
installed there's no "Load BootMii (IOS)" anymore in Exit-Prompt
- ensure 'Launch Priiloader' is only shown if Priiloader
is really installed (in some cases it could appear even
if Priiloader hasn't been installed)
- fixed a bug that caused black-screen then returning into
HBF from app loaded with <ahb_access/>
- build separate vWii-version using FIX94s NAND-Loader (still using
modified Waninkoko NAND-Loader on real Wii)
- build using libruntimeiospatch 1.3
- vWii version does NOT YET disable functions not applicable von vWii
- installer now falls back to IOS236 if there's no HW_AHBPROT access
//rev41:
- fixed auto-connecting Internet via WiFi

17
updates.vwii Normal file
View File

@ -0,0 +1,17 @@
//rev42:
- changed default options:
* disable checking for new version automatically
* enable sd-card debug logging
- added option for choosing whether bootmii boot2 is
installed (adds "Load BootMii (Boot2)" in Exit-Prompt
- black-listed v65280 of IOS254 (if that version is
installed there's no "Load BootMii (IOS)" anymore in Exit-Prompt
- ensure 'Launch Priiloader' is only shown if Priiloader
is really installed (in some cases it could appear even
if Priiloader hasn't been installed)
- fixed a bug that caused black-screen then returning into
HBF from app loaded with <ahb_access/>
- build separate vWii-version using FIX94s NAND-Loader (still using
modified Waninkoko NAND-Loader on real Wii)
- build using libruntimeiospatch 1.3
- vWii version does NOT YET disable functions not applicable von vWii