Compare commits

..

7 Commits
readme ... main

5 changed files with 34 additions and 32 deletions

2
.gitmodules vendored
View File

@ -1,3 +1,3 @@
[submodule "source/sandia"] [submodule "source/sandia"]
path = source/sandia path = source/sandia
url = https://git.donut.eu.org/nez/sandia-Wii.git url = https://git.donut.eu.org/libreshop/sandia-Wii.git

View File

@ -1,26 +1,3 @@
# LibreShop # libreshop_client
LibreShop is a program that lets you download, update, and install homebrew software onto your Wii without even needing to touch a computer. Wii Homebrew downloader
## Development setup
First, install the devkitppc toolchain. [Click here for a guide on how to do so.](https://devkitpro.org/wiki/Getting_Started)
Next, install all the dependencies.
```
# (dkp-)pacman -S ppc-jansson
```
In addition, you'll have to download the submodule dependencies.
```
$ git submodule init
$ git submodule update
```
Now all you need to do is edit, compile, and run!
```
$ make
```
If you have Wiiload installed and correctly setup, you can use it with the following command:
```
$ make run
```

24
source/input_macros.h Normal file
View File

@ -0,0 +1,24 @@
#ifndef INPUT_MACROS_H
#define INPUT_MACROS_H
#include <wiiuse/wpad.h>
// Input definitions table
// TODO: GameCube controller support
// Macro name Classic Controller Wii Remote
#define INPUT_BUTTON_HOME (WPAD_CLASSIC_BUTTON_HOME || WPAD_BUTTON_HOME )
#define INPUT_BUTTON_PLUS (WPAD_CLASSIC_BUTTON_PLUS || WPAD_BUTTON_PLUS )
#define INPUT_BUTTON_MINUS (WPAD_CLASSIC_BUTTON_MINUS || WPAD_BUTTON_MINUS )
#define INPUT_BUTTON_A (WPAD_CLASSIC_BUTTON_Y || WPAD_BUTTON_A )
#define INPUT_BUTTON_B (WPAD_CLASSIC_BUTTON_B || WPAD_BUTTON_B )
#define INPUT_BUTTON_X (WPAD_CLASSIC_BUTTON_X || WPAD_BUTTON_1 )
#define INPUT_BUTTON_Y (WPAD_CLASSIC_BUTTON_A || WPAD_BUTTON_2 )
#define INPUT_BUTTON_UP (WPAD_CLASSIC_BUTTON_UP || WPAD_BUTTON_UP )
#define INPUT_BUTTON_DOWN (WPAD_CLASSIC_BUTTON_DOWN || WPAD_BUTTON_DOWN )
#define INPUT_BUTTON_LEFT (WPAD_CLASSIC_BUTTON_LEFT || WPAD_BUTTON_LEFT )
#define INPUT_BUTTON_RIGHT (WPAD_CLASSIC_BUTTON_RIGHT || WPAD_BUTTON_RIGHT )
#endif // INPUT_MACROS_H

View File

@ -3,11 +3,12 @@
#include <gccore.h> #include <gccore.h>
#include <network.h> #include <network.h>
#include <wiiuse/wpad.h> #include <wiiuse/wpad.h>
#include <jansson.h>
#include <stdbool.h> #include <stdbool.h>
#include "sandia/sandia.h" #include "sandia/sandia.h"
#include <jansson.h>
#include "input_macros.h"
// Uncomment if this is a development build // Uncomment if this is a development build
//#include "debug.h" //#include "debug.h"
@ -89,7 +90,7 @@ int main(int argc, char **argv) {
printf("%s.\n", localip); printf("%s.\n", localip);
sandia req = sandia_create("libreshop.donut.eu.org", 80); sandia req = sandia_create("libreshop.donut.eu.org", 80);
sandia_response res = sandia_get_request(&req, "/"); sandia_response res = sandia_get_request(&req, "/", 1);
bool lastWasNewline = false; bool lastWasNewline = false;
int resBodyLength = strlen(res.body); int resBodyLength = strlen(res.body);
for (int i = 0; i < resBodyLength; i++) { for (int i = 0; i < resBodyLength; i++) {
@ -133,8 +134,8 @@ int main(int argc, char **argv) {
u32 pressed = WPAD_ButtonsDown(0); u32 pressed = WPAD_ButtonsDown(0);
if ( pressed & WPAD_BUTTON_HOME ) { if ( pressed && INPUT_BUTTON_HOME ) {
logprint(0, "HOME pressed, quitting!"); logprint(0, "HOME pressed, quitting!\n");
exit(0); exit(0);
} }

@ -1 +1 @@
Subproject commit 62ea4d024fda8663463ddc20c13eec5e1c08b2de Subproject commit 8f4d62429b06bb851f03c21c7796ae69f78541a8