Formatting, added bash script for installing/updating the dependencies (based on the travis script)

This commit is contained in:
Maschell 2018-03-11 17:12:46 +01:00
parent 0e60a9bb48
commit 6ca382bf6e
14 changed files with 483 additions and 465 deletions

2
.gitignore vendored
View File

@ -4,6 +4,7 @@ loader/*.elf
example_plugin/bin/* example_plugin/bin/*
example_plugin/build/* example_plugin/build/*
example_plugin_pic/* example_plugin_pic/*
portlib_repos/*
plugins/*/bin/* plugins/*/bin/*
plugins/*/build/* plugins/*/build/*
plugins/*/*.cbp plugins/*/*.cbp
@ -17,3 +18,4 @@ release/*
*.nam *.nam
*.til *.til
*.layout *.layout
wups.cbp

21
installupdateportlibs.sh Normal file
View File

@ -0,0 +1,21 @@
#! /bin/bash
#
7z x -y ./loader/libs/portlibs.zip -o${DEVKITPRO}
mkdir portlib_repos
cd portlib_repos
((git clone https://github.com/Maschell/dynamic_libs.git -b lib && (7z x -y ./dynamic_libs/libs/portlibs.zip -o${DEVKITPRO})) || (cd dynamic_libs && git pull))
(git clone https://github.com/dimok789/libiosuhax.git || (cd libiosuhax && git pull))
(git clone https://github.com/aliaspider/libfat.git || (cd libfat && git pull))
(git clone https://github.com/Maschell/libntfs-wiiu.git || (cd libntfs-wiiu && git pull))
(git clone https://github.com/Maschell/libutils.git || (cd libutils && git pull))
((git clone https://github.com/Maschell/libgui.git && (7z x -y ./libgui/libs/portlibs.zip -o${DEVKITPRO})) || (cd libgui && git pull))
(git clone https://github.com/Maschell/fs_wrapper.git || (cd fs_wrapper && git pull))
(git clone https://github.com/Maschell/controller_patcher.git || (cd controller_patcher && git pull))
(cd dynamic_libs && ((make -j8 | grep -c "built ... ") && make install && echo "installed" ) || (echo "no need for make install" && make))
(cd libiosuhax && make -j8 && make install)
(cd libfat && make wiiu-release && make wiiu-install)
(cd libntfs-wiiu && make wiiu-install)
(cd libutils && ((make -j8 | grep -c "built ... ") && make install && echo "installed" ) || (echo "no need for make install" && make))
(cd libgui && ((make -j8 | grep -c "built ... ") && make install) || echo "no need for make install")
(cd fs_wrapper && ((make -j8 | grep -c "built ... ") && make install && echo "installed" ) || (echo "no need for make install" && make))
(cd controller_patcher && ((make -j8 | grep -c "built ... ") && make install && echo "installed" ) || (echo "no need for make install" && make))

View File

@ -22,21 +22,21 @@
#include <dynamic_libs/vpad_functions.h> #include <dynamic_libs/vpad_functions.h>
#include <dynamic_libs/padscore_functions.h> #include <dynamic_libs/padscore_functions.h>
#include <dynamic_libs/proc_ui_functions.h> #include <dynamic_libs/proc_ui_functions.h>
#include <utils/logger.h>
#include <fs/FSUtils.h> #include <fs/FSUtils.h>
#include <fs/sd_fat_devoptab.h> #include <fs/sd_fat_devoptab.h>
#include <utils/logger.h>
#include <utils/utils.h> #include <utils/utils.h>
#include <utils/function_patcher.h>
#include <system/exception_handler.h> #include <system/exception_handler.h>
#include <system/memory.h> #include <system/memory.h>
#include <kernel/kernel_utils.h> #include <kernel/kernel_utils.h>
#include "common/retain_vars.h" #include "common/retain_vars.h"
#include "common/common.h" #include "common/common.h"
#include "plugin/PluginLoader.h" #include "plugin/PluginLoader.h"
#include "plugin/PluginInformation.h" #include "plugin/PluginInformation.h"
#include <utils/function_patcher.h>
#include <wups.h> #include <wups.h>
#include <iosuhax.h> #include <iosuhax.h>

View File

@ -20,12 +20,4 @@
#define SCREEN_WIDTH 1280 #define SCREEN_WIDTH 1280
#define SCREEN_HEIGHT 720 #define SCREEN_HEIGHT 720
#define CONTENT_WIDTH (1280 - 260)
#define CONTENT_EXPANDABLE_FRAME_HEADER_HEIGHT 60
#define MENU_LIST_WIDTH 260
#define MENU_LIST_ELEMENT_HEIGHT 70
#endif #endif

View File

@ -9,11 +9,9 @@
#include <gui/sigslot.h> #include <gui/sigslot.h>
#include <gui/Gui.h> #include <gui/Gui.h>
class TcpReceiver : public CThread class TcpReceiver : public CThread {
{
public: public:
enum eLoadResults enum eLoadResults {
{
SUCCESS = 0, SUCCESS = 0,
INVALID_INPUT = -1, INVALID_INPUT = -1,
FILE_OPEN_FAILURE = -2, FILE_OPEN_FAILURE = -2,

View File

@ -30,8 +30,7 @@ static int *pretend_root_hub = (int*)0xF5003ABC;
static int *ayylmao = (int*)0xF4500000; static int *ayylmao = (int*)0xF4500000;
//!------------------------------------- //!-------------------------------------
typedef struct typedef struct {
{
u32 size; u32 size;
u8 data[0]; u8 data[0];
} payload_info_t; } payload_info_t;
@ -312,8 +311,7 @@ static const int second_chain[] = {
0x1012EA68, // 0xAC stack pivot 0x1012EA68, // 0xAC stack pivot
}; };
static void uhs_exploit_init(int dev_uhs_0_handle, cfw_config_t * config) static void uhs_exploit_init(int dev_uhs_0_handle, cfw_config_t * config) {
{
ayylmao[5] = 1; ayylmao[5] = 1;
ayylmao[8] = 0x500000; ayylmao[8] = 0x500000;
@ -375,8 +373,7 @@ static void uhs_exploit_init(int dev_uhs_0_handle, cfw_config_t * config)
DCStoreRange((void*)0xF4148000, ((u32)payloads) - 0xF4148000); DCStoreRange((void*)0xF4148000, ((u32)payloads) - 0xF4148000);
} }
static int uhs_write32(int dev_uhs_0_handle, int arm_addr, int val) static int uhs_write32(int dev_uhs_0_handle, int arm_addr, int val) {
{
ayylmao[520] = arm_addr - 24; //! The address to be overwritten, minus 24 bytes ayylmao[520] = arm_addr - 24; //! The address to be overwritten, minus 24 bytes
DCStoreRange(ayylmao, 521 * 4); //! Make CPU fetch new data (with updated adress) DCStoreRange(ayylmao, 521 * 4); //! Make CPU fetch new data (with updated adress)
OSSleepTicks(0x200000); //! Improves stability OSSleepTicks(0x200000); //! Improves stability

View File

@ -23,7 +23,9 @@ static void * overlayfunction_ptr __attribute__((section(".data"))) = NULL;
} }
void WUPS_Overlay_PrintTextOnScreen(wups_overlay_options_type_t screen, int x,int y, const char * msg, ...) { void WUPS_Overlay_PrintTextOnScreen(wups_overlay_options_type_t screen, int x,int y, const char * msg, ...) {
if(screen == WUPS_OVERLAY_NONE){ return; } if(screen == WUPS_OVERLAY_NONE) {
return;
}
char * tmp = NULL; char * tmp = NULL;
@ -45,7 +47,9 @@ static void * overlayfunction_ptr __attribute__((section(".data"))) = NULL;
} }
void WUPS_Overlay_OSScreenClear(wups_overlay_options_type_t screen) { void WUPS_Overlay_OSScreenClear(wups_overlay_options_type_t screen) {
if(screen == WUPS_OVERLAY_NONE){ return; } if(screen == WUPS_OVERLAY_NONE) {
return;
}
if(screen != WUPS_OVERLAY_DRC_ONLY) { // Clear TV if it's not DRC exclusive. if(screen != WUPS_OVERLAY_DRC_ONLY) { // Clear TV if it's not DRC exclusive.
OSScreenClearBufferEx(0, 0); OSScreenClearBufferEx(0, 0);
} }
@ -55,7 +59,9 @@ static void * overlayfunction_ptr __attribute__((section(".data"))) = NULL;
} }
void WUPS_Overlay_FlipBuffers(wups_overlay_options_type_t screen) { void WUPS_Overlay_FlipBuffers(wups_overlay_options_type_t screen) {
if(screen == WUPS_OVERLAY_NONE){ return; } if(screen == WUPS_OVERLAY_NONE) {
return;
}
if(screen != WUPS_OVERLAY_DRC_ONLY) { // Flip TV buffer if it's not DRC exclusive. if(screen != WUPS_OVERLAY_DRC_ONLY) { // Flip TV buffer if it's not DRC exclusive.
OSScreenFlipBuffersEx(0); OSScreenFlipBuffersEx(0);
} }

View File

@ -99,7 +99,8 @@ typedef enum wups_loader_library_type_t {
WUPS_LOADER_LIBRARY_VPAD, WUPS_LOADER_LIBRARY_VPAD,
WUPS_LOADER_LIBRARY_VPADBASE, WUPS_LOADER_LIBRARY_VPADBASE,
WUPS_LOADER_LIBRARY_ZLIB125, WUPS_LOADER_LIBRARY_ZLIB125,
} wups_loader_library_type_t; }
wups_loader_library_type_t;
typedef enum wups_loader_entry_type_t { typedef enum wups_loader_entry_type_t {
WUPS_LOADER_ENTRY_FUNCTION, WUPS_LOADER_ENTRY_FUNCTION,

View File

@ -30,7 +30,8 @@ typedef enum wups_overlay_options_type_t {
WUPS_OVERLAY_TV_ONLY, /* Tries to display only on tv screen */ WUPS_OVERLAY_TV_ONLY, /* Tries to display only on tv screen */
WUPS_OVERLAY_DRC_AND_TV, /* Tries to display on both screens. Prioritizes the TV screen if memory is low. */ WUPS_OVERLAY_DRC_AND_TV, /* Tries to display on both screens. Prioritizes the TV screen if memory is low. */
WUPS_OVERLAY_DRC_AND_TV_WITH_DRC_PRIO /* Tries to display on both screens. But if memory is low, prioritize the DRC screen.*/ WUPS_OVERLAY_DRC_AND_TV_WITH_DRC_PRIO /* Tries to display on both screens. But if memory is low, prioritize the DRC screen.*/
} wups_overlay_options_type_t; }
wups_overlay_options_type_t;
typedef void (*overlay_callback)(wups_overlay_options_type_t); typedef void (*overlay_callback)(wups_overlay_options_type_t);