1
0
Fork 0
mirror of https://github.com/zigzap/zap.git synced 2025-10-20 15:14:08 +00:00

Use debug.err and exit 1 for windows fail message

This commit is contained in:
Froxcey 2024-02-19 20:37:08 +08:00
parent 1328bdf7c2
commit 2f174bbcef
No known key found for this signature in database
GPG key ID: 621379E1D6250388

View file

@ -3,8 +3,10 @@ const build_facilio = @import("facil.io/build.zig").build_facilio;
pub fn build(b: *std.build.Builder) !void {
const target = b.standardTargetOptions(.{});
if (target.getOsTag() == .windows)
@panic("\nCurrently, Facil.io and Zap are not compatible with Windows. Consider using Linux or Windows Subsystem for Linux (WSL) instead.\nFor more information, please see:\n- https://github.com/zigzap/zap#most-faq\n- https://facil.io/#forking-contributing-and-all-that-jazz\n");
if (target.getOsTag() == .windows) {
std.log.err("\x1b[31mPlatform Not Supported\x1b[0m\nCurrently, Facil.io and Zap are not compatible with Windows. Consider using Linux or Windows Subsystem for Linux (WSL) instead.\nFor more information, please see:\n- https://github.com/zigzap/zap#most-faq\n- https://facil.io/#forking-contributing-and-all-that-jazz\n", .{});
std.os.exit(1);
}
// Standard release options allow the person running `zig build` to select
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall.
const optimize = b.standardOptimizeOption(.{});