Skip to content

Commit

Permalink
update libget, remove sdl1 references, update compiling docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vgmoose committed Feb 5, 2025
1 parent 8a943c7 commit be7a4cd
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 46 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/pc-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ jobs:
matrix:
os: [ubuntu, windows, macos]
library: [sdl2]
# library: [sdl2, sdl1]
# exclude:
# - os: macos
# library: sdl1
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@main
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ Pre-compiled builds off the main branch can be downloaded [here](https://nightly
### Instructions
Detailed build instructions for specific platforms can be found in [Compiling.md](https://github.com/fortheusers/hb-appstore/blob/main/docs/Compiling.md).

In general, clone the repository recursively (with `git clone --recursive`) and run `make`, after installing the required platform dependencies.
In general, clone the repository recursively (with `git clone --recursive`) and run `make <platform>`, after installing the required platform dependencies.
10 changes: 1 addition & 9 deletions console/Console.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@
Console::Console(CST_Window* window)
{
this->window = window;
#ifndef SDL1
this->window_surface = SDL_GetWindowSurface(window);
#else
this->window_surface = window;
#endif

// make background black
this->background(0x42, 0x45, 0x48);
}
Expand All @@ -24,12 +21,7 @@ void Console::background(int r, int g, int b)

void Console::update()
{
#ifndef SDL1
SDL_UpdateWindowSurface(this->window);
#else
SDL_Flip(this->window); //TODO: replace this hack with SDL_gfx framerate limiter
#endif

}

void Console::fillRect(int x, int y, int width, int height, int r, int g, int b)
Expand Down
2 changes: 0 additions & 2 deletions console/console_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
int console_main(RootDisplay* rootDisplay, InputEvents* input)
{
// initialize SDL console, ditch Chesto SDL renderer
#ifndef SDL1
SDL_DestroyRenderer(rootDisplay->renderer);
#endif

rootDisplay->renderer = NULL;
Console* console = new Console(rootDisplay->window);
Expand Down
50 changes: 23 additions & 27 deletions docs/Compiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,17 @@ Specific instructions for building on various platforms are covered here!
The easiest way to build is using the [Sealeo](https://github.com/fortheusers/sealeo) docker container. It uses this [dependency helper script](https://github.com/fortheusers/sealeo/blob/main/dependency_helper.sh) to be able to build for all supported platforms. This is how the pre-compiled binaries are built.

1. Install [Docker](https://www.docker.com)
2. Run the following, replacing `switch` with the target platform (one of `switch`, `wiiu`, or `pc`):
2. Run the following, replacing `make switch` with the target platform (one of `switch`, `wiiu`, `wii`, `3ds`, or `pc`):
```
git clone --recursive https://github.com/fortheusers/hb-appstore.git
cd hb-appstore
export PLATFORM=switch # or wiiu, 3ds, wii, pc, pc-sdl1
docker run -v $(pwd):/code -it ghcr.io/fortheusers/sealeo /bin/bash -c "cd /code && make $PLATFORM"
docker run -v $(pwd):/code -it ghcr.io/fortheusers/sealeo /bin/bash
make switch # or wiiu, wii, 3ds, pc
```

Depending on which platform you chose, `appstore.nro` or `appstore.rpx` should now be sitting in the cloned directory. When building for Wii U, an `appstore.wuhb` file will also be present.


## Building for PC
Below instructions are for Ubuntu, but should be similar on other platforms.

Both targets support the addition of `CFLAGS += -D_3DS_MOCK` in the Makefile to build a version that uses 3DS dimensions and layout logic for the window size.

### Using SDL2
The following produces `appstore.bin` in the current directory:
```
sudo apt-get install libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-gfx-dev zlib1g-dev gcc g++ libcurl4-openssl-dev
git clone --recursive https://github.com/fortheusers/hb-appstore.git
cd hb-appstore
make pc
```

### Using SDL1
The following produces `appstore.bin-sdl1` in the current directory:
```
sudo apt-get install libsdl1.2-dev libsdl-ttf2.0-dev libsdl-image1.2-dev libsdl-gfx1.2-dev zlib1g-dev gcc g++ libcurl4-openssl-dev
git clone --recursive https://github.com/fortheusers/hb-appstore.git
cd hb-appstore
make pc-sdl1
```

## Building for Wii U (with WUT)
1. Install [dkp-pacman](https://devkitpro.org/viewtopic.php?f=13&t=8702)
2. Install devkitPPC and needed Wii U dependencies via dkp-pacman:
Expand Down Expand Up @@ -71,6 +48,7 @@ make switch

If all goes well, `appstore.nro` should be sitting in the current directory.


## Building for Wii (with libogc)
1. Install [dkp-pacman](https://devkitpro.org/viewtopic.php?f=13&t=8702)
2. Install devkitPPC and needed Wii dependencies via dkp-pacman:
Expand All @@ -88,6 +66,7 @@ make wii

If all goes well, `appstore.dol` should be sitting in the current directory.


## Building for 3DS (with libctru)
1. Install [dkp-pacman](https://devkitpro.org/viewtopic.php?f=13&t=8702)
2. Install devkitARM and needed 3DS dependencies via dkp-pacman:
Expand All @@ -102,4 +81,21 @@ cd hb-appstore
make 3ds
```

If all goes well, `appstore.3dsx` should be sitting in the current directory.
If all goes well, `appstore.3dsx` should be sitting in the current directory.


## Building for PC
Below instructions are for Ubuntu, but should be similar on other platforms.

Both targets support the addition of `CFLAGS += -D_3DS_MOCK` in the Makefile to build a version that uses 3DS dimensions and layout logic for the window size.

The following produces `appstore.bin` in the current directory:
```
sudo apt-get install libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-gfx-dev zlib1g-dev gcc g++ libcurl4-openssl-dev
git clone --recursive https://github.com/fortheusers/hb-appstore.git
cd hb-appstore
make pc
```

### Windows Dependencies
See the [build_pc.sh](https://github.com/fortheusers/chesto/blob/main/helpers/build_pc.sh#L29-L35) script for info on how to install msys2 and mingw64 dependencies.
2 changes: 0 additions & 2 deletions gui/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,10 @@ int main(int argc, char* argv[])

if (cliMode)
{
#ifndef SDL1
// if NOGUI variable defined, use the console's main method
// TODO: process InputEvents outside of MainDisplay, which might have more requirements
int console_main(RootDisplay*, InputEvents*);
console_main(display, events);
#endif
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion libs/get
Submodule get updated 38 files
+465 −56 src/libs/rapidjson/include/rapidjson/allocators.h
+1 −1 src/libs/rapidjson/include/rapidjson/cursorstreamwrapper.h
+484 −92 src/libs/rapidjson/include/rapidjson/document.h
+1 −1 src/libs/rapidjson/include/rapidjson/encodedstream.h
+1 −1 src/libs/rapidjson/include/rapidjson/encodings.h
+110 −8 src/libs/rapidjson/include/rapidjson/error/en.h
+130 −6 src/libs/rapidjson/include/rapidjson/error/error.h
+1 −1 src/libs/rapidjson/include/rapidjson/filereadstream.h
+1 −1 src/libs/rapidjson/include/rapidjson/filewritestream.h
+2 −2 src/libs/rapidjson/include/rapidjson/fwd.h
+16 −9 src/libs/rapidjson/include/rapidjson/internal/biginteger.h
+71 −0 src/libs/rapidjson/include/rapidjson/internal/clzll.h
+8 −18 src/libs/rapidjson/include/rapidjson/internal/diyfp.h
+8 −4 src/libs/rapidjson/include/rapidjson/internal/dtoa.h
+1 −1 src/libs/rapidjson/include/rapidjson/internal/ieee754.h
+1 −1 src/libs/rapidjson/include/rapidjson/internal/itoa.h
+1 −1 src/libs/rapidjson/include/rapidjson/internal/meta.h
+1 −1 src/libs/rapidjson/include/rapidjson/internal/pow10.h
+5 −6 src/libs/rapidjson/include/rapidjson/internal/regex.h
+1 −1 src/libs/rapidjson/include/rapidjson/internal/stack.h
+15 −1 src/libs/rapidjson/include/rapidjson/internal/strfunc.h
+10 −7 src/libs/rapidjson/include/rapidjson/internal/strtod.h
+1 −1 src/libs/rapidjson/include/rapidjson/internal/swap.h
+1 −1 src/libs/rapidjson/include/rapidjson/istreamwrapper.h
+1 −1 src/libs/rapidjson/include/rapidjson/memorybuffer.h
+1 −1 src/libs/rapidjson/include/rapidjson/memorystream.h
+1 −1 src/libs/rapidjson/include/rapidjson/ostreamwrapper.h
+97 −29 src/libs/rapidjson/include/rapidjson/pointer.h
+2 −2 src/libs/rapidjson/include/rapidjson/prettywriter.h
+105 −20 src/libs/rapidjson/include/rapidjson/rapidjson.h
+69 −53 src/libs/rapidjson/include/rapidjson/reader.h
+1,125 −361 src/libs/rapidjson/include/rapidjson/schema.h
+1 −1 src/libs/rapidjson/include/rapidjson/stream.h
+1 −1 src/libs/rapidjson/include/rapidjson/stringbuffer.h
+481 −0 src/libs/rapidjson/include/rapidjson/uri.h
+21 −9 src/libs/rapidjson/include/rapidjson/writer.h
+3 −9 src/repos/OSCRepo.cpp
+3 −3 src/repos/UniStoreRepo.cpp

0 comments on commit be7a4cd

Please sign in to comment.