Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build.zig: migrate to SDL2 #88

Merged
merged 1 commit into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ENV TAG=${TAG}

RUN apt-get update && apt-get install -y build-essential \
libusb-dev \
libsdl1.2-dev \
libsdl2-dev \
libfreetype6-dev \
libunwind-dev \
curl \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Before building the project, you need to install the necessary dependencies for
### On Ubuntu/Debian

```bash
sudo apt-get install libusb-dev libsdl1.2-dev libfreetype6-dev libunwind-dev zip protobuf-compiler cmake
sudo apt-get install libusb-dev libsdl2-dev libfreetype6-dev libunwind-dev zip protobuf-compiler cmake
```

### On Fedora40/41:
Expand Down
8 changes: 4 additions & 4 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1476,8 +1476,6 @@ pub fn build(b: *std.Build) !void {
"apps/plugins/lib/bmp_smooth_scale.c",
"apps/plugins/lib/kbd_helper.c",
"apps/plugins/lib/pluginlib_touchscreen.c",
"apps/plugins/lib/id3.c",
"apps/plugins/lib/mul_id3.c",
},
.flags = &cflags,
});
Expand Down Expand Up @@ -2940,7 +2938,7 @@ pub fn build(b: *std.Build) !void {
exe.linkLibrary(libskinparser);
exe.linkLibrary(libfixedpoint);
exe.linkLibrary(libuisimulator);
exe.linkSystemLibrary("SDL");
exe.linkSystemLibrary("SDL2");
exe.linkLibC();
}

Expand Down Expand Up @@ -3746,7 +3744,7 @@ fn addIncludePaths(c: *std.Build.Step.Compile) void {
c.addIncludePath(.{ .cwd_relative = "/usr/include" });
c.addIncludePath(.{ .cwd_relative = "/usr/include/x86_64-linux-gnu" });
c.addIncludePath(.{ .cwd_relative = "/usr/include/aarch64-linux-gnu" });
c.addIncludePath(.{ .cwd_relative = "/usr/include/SDL" });
c.addIncludePath(.{ .cwd_relative = "/usr/include/SDL2" });
c.addIncludePath(.{ .cwd_relative = "./firmware/export" });
c.addIncludePath(.{ .cwd_relative = "./firmware/drivers" });
c.addIncludePath(.{ .cwd_relative = "./build" });
Expand Down Expand Up @@ -3848,6 +3846,7 @@ const libfirmware_sources = [_][]const u8{
"firmware/target/hosted/sdl/system-sdl.c",
"firmware/target/hosted/sdl/load_code-sdl.c",
"firmware/target/hosted/sdl/timer-sdl.c",
"firmware/target/hosted/sdl/window-sdl.c",
"firmware/target/hosted/sdl/key_to_touch-sdl.c",
"firmware/target/hosted/sdl/app/load_code-sdl-app.c",
"firmware/target/hosted/sdl/app/button-application.c",
Expand Down Expand Up @@ -3883,6 +3882,7 @@ const libfirmware_sources = [_][]const u8{
"firmware/hangul.c",
"firmware/lru.c",
"firmware/screendump.c",
"firmware/drivers/button_queue.c",
"firmware/drivers/lcd-24bit.c",
"firmware/common/diacritic.c",
"firmware/drivers/led.c",
Expand Down
Loading