mirror of
https://github.com/XorTroll/hb-appstore.git
synced 2025-03-01 14:57:31 +00:00
wiiu: parse locally installed apps based on xml files
This commit is contained in:
parent
c061073b63
commit
8e38e6904a
@ -5,6 +5,7 @@ VPATH := $(BASEDIR)
|
||||
GET := ./libs/get/src
|
||||
RAPIDJSON := ./libs/get/src/libs/rapidjson/include
|
||||
MINIZIP := ./libs/get/src/libs/minizip
|
||||
TINYXML := libs/get/src/libs/tinyxml
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# TARGET is the name of the output
|
||||
@ -14,8 +15,8 @@ MINIZIP := ./libs/get/src/libs/minizip
|
||||
#---------------------------------------------------------------------------------
|
||||
TARGET := appstore
|
||||
BUILD := build
|
||||
SOURCES := . $(GET) $(MINIZIP) console gui
|
||||
INCLUDES := -I. -I$(RAPIDJSON) -I$(MINIZIP)
|
||||
SOURCES := . $(GET) $(MINIZIP) $(TINYXML) console gui
|
||||
INCLUDES := -I. -I$(RAPIDJSON) -I$(MINIZIP) -I$(TINYXML)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# options for code generation
|
||||
@ -54,4 +55,4 @@ include $(WUT_ROOT)/share/wut.mk
|
||||
PORTLIBS := $(DEVKITPRO)/portlibs/ppc
|
||||
LDFLAGS += -L$(PORTLIBS)/lib
|
||||
CFLAGS += -I$(PORTLIBS)/include
|
||||
CXXFLAGS += -I$(PORTLIBS)/include
|
||||
CXXFLAGS += -I$(PORTLIBS)/include
|
||||
|
@ -44,7 +44,7 @@ make
|
||||
If all goes well, `appstore.nro` should be sitting in the current directory.
|
||||
|
||||
### Building for Wii U (with WUT)
|
||||
[See here](https://github.com/vgmoose/hb-appstore/pull/19) for info on how to setup the Wii U environment.
|
||||
[See here](https://github.com/vgmoose/hb-appstore/pull/19) for info on how to setup the Wii U environment. The Wii U build also makes use of the tinyxml library to look up HBL apps that may already be installed.
|
||||
|
||||
Once the environment is setup:
|
||||
```
|
||||
|
@ -55,9 +55,9 @@ void Menu::display()
|
||||
line << cur->title << " (" << cur->version << ")";
|
||||
console->drawString(15, curPosition, line.str().c_str());
|
||||
|
||||
int r = (cur->status == UPDATE)? 0xFF : 0x00;
|
||||
int r = (cur->status == UPDATE || cur->status == LOCAL)? 0xFF : 0x00;
|
||||
int g = (cur->status == UPDATE)? 0xF7 : 0xFF;
|
||||
int b = (cur->status == INSTALLED)? 0xFF : 0x00;
|
||||
int b = (cur->status == INSTALLED || cur->status == LOCAL)? 0xFF : 0x00;
|
||||
console->drawColorString(5, curPosition, cur->statusString(), r, g, b);
|
||||
|
||||
std::stringstream line2;
|
||||
@ -90,9 +90,9 @@ void Menu::display()
|
||||
console->drawString(6, 5, cur->version.c_str());
|
||||
console->drawString(6, 6, cur->author.c_str());
|
||||
|
||||
int r = (cur->status == UPDATE)? 0xFF : 0x00;
|
||||
int r = (cur->status == UPDATE || cur->status == LOCAL)? 0xFF : 0x00;
|
||||
int g = (cur->status == UPDATE)? 0xF7 : 0xFF;
|
||||
int b = (cur->status == INSTALLED)? 0xFF : 0x00;
|
||||
int b = (cur->status == INSTALLED || cur->status == LOCAL)? 0xFF : 0x00;
|
||||
console->drawColorString(5, 8, cur->statusString(), r, g, b);
|
||||
|
||||
console->drawColorString(5, 12, "Press [A] to install this package", 0xff, 0xff, 0x00);
|
||||
|
@ -31,6 +31,9 @@ AppDetails::AppDetails(Package* package, AppList* appList)
|
||||
case INSTALLED:
|
||||
action = "Remove";
|
||||
break;
|
||||
case LOCAL:
|
||||
action = "Reinstall";
|
||||
break;
|
||||
default:
|
||||
action = "?";
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ void AppList::update()
|
||||
this->wipeElements();
|
||||
|
||||
// quickly create a vector of "sorted" apps
|
||||
// (they must be sorted by UPDATE -> INSTALLED -> GET)
|
||||
// (they must be sorted by UPDATE -> INSTALLED -> LOCAL -> GET)
|
||||
// TODO: sort this a better way, and also don't use 3 distinct for loops
|
||||
std::vector<Package*> sorted;
|
||||
|
||||
@ -162,6 +162,11 @@ void AppList::update()
|
||||
for (int x=0; x<packages.size(); x++)
|
||||
if (packages[x]->status == INSTALLED)
|
||||
sorted.push_back(packages[x]);
|
||||
|
||||
// local
|
||||
for (int x=0; x<packages.size(); x++)
|
||||
if (packages[x]->status == LOCAL)
|
||||
sorted.push_back(packages[x]);
|
||||
|
||||
// get
|
||||
for (int x=0; x<packages.size(); x++)
|
||||
@ -229,7 +234,7 @@ void AppList::update()
|
||||
|
||||
Button* sort = new Button("Adjust Sort", 'y', false, 15);
|
||||
sort->position(settings->x - 20 - sort->width, settings->y);
|
||||
// settings->action = std::bind(&AppList::cycleSort, this);
|
||||
sort->action = std::bind(&AppList::cycleSort, this);
|
||||
this->elements.push_back(sort);
|
||||
}
|
||||
else
|
||||
@ -241,6 +246,11 @@ void AppList::update()
|
||||
}
|
||||
}
|
||||
|
||||
void AppList::cycleSort()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void AppList::toggleKeyboard()
|
||||
{
|
||||
if (this->keyboard)
|
||||
|
@ -19,6 +19,7 @@ public:
|
||||
Keyboard* keyboard = NULL;
|
||||
|
||||
void toggleKeyboard();
|
||||
void cycleSort();
|
||||
|
||||
bool touchMode = true;
|
||||
|
||||
|
2
libs/get
2
libs/get
@ -1 +1 @@
|
||||
Subproject commit a02c63b114dfef92ec4f2014ec12aab32d3ffc61
|
||||
Subproject commit bdc771074e050c8006df037f92e204f0db3ec3de
|
2
main.cpp
2
main.cpp
@ -8,7 +8,7 @@
|
||||
#include "libs/get/src/Utils.hpp"
|
||||
#include "libs/get/src/Get.hpp"
|
||||
|
||||
#if defined(__WIIU__)
|
||||
#if !defined(__WIIU__)
|
||||
#define DEFAULT_REPO "http://wiiubru.com/appstore"
|
||||
#else
|
||||
#define DEFAULT_REPO "http://switchbru.com/appstore"
|
||||
|
BIN
res/LOCAL.png
Executable file → Normal file
BIN
res/LOCAL.png
Executable file → Normal file
Binary file not shown.
Before Width: | Height: | Size: 82 B After Width: | Height: | Size: 2.7 KiB |
Loading…
x
Reference in New Issue
Block a user