Skip to content

Commit

Permalink
Merge pull request #54 from Traxar/master
Browse files Browse the repository at this point in the history
fix issue #53 aka:
  • Loading branch information
zenith391 committed Aug 20, 2023
2 parents d8b9982 + 4eaa251 commit 5d1503b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
15 changes: 9 additions & 6 deletions android/Sdk.zig
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,15 @@ pub fn init(b: *Builder, user_config: ?UserConfig, toolchains: ToolchainVersions
.name = "zip_add",
.root_source_file = .{ .path = sdkRoot() ++ "/tools/zip_add.zig" },
});
zip_add.addCSourceFile(sdkRoot() ++ "/vendor/kuba-zip/zip.c", &[_][]const u8{
"-std=c99",
"-fno-sanitize=undefined",
"-D_POSIX_C_SOURCE=200112L",
zip_add.addCSourceFile(.{
.file = .{ .path = sdkRoot() ++ "/vendor/kuba-zip/zip.c" },
.flags = &[_][]const u8{
"-std=c99",
"-fno-sanitize=undefined",
"-D_POSIX_C_SOURCE=200112L",
},
});
zip_add.addIncludePath(sdkRoot() ++ "/vendor/kuba-zip");
zip_add.addIncludePath(.{ .path = sdkRoot() ++ "/vendor/kuba-zip" });
zip_add.linkLibC();

break :blk HostTools{
Expand Down Expand Up @@ -890,7 +893,7 @@ pub fn compileAppLibrary(

// exe.addIncludePath(include_dir);

exe.addLibraryPath(lib_dir);
exe.addLibraryPath(.{ .path = lib_dir });

// exe.addIncludePath(include_dir);
// exe.addIncludePath(system_include_dir);
Expand Down
4 changes: 2 additions & 2 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub fn build(b: *std.Build) !void {
else
b.addExecutable(.{ .name = name, .root_source_file = programPath, .target = target, .optimize = optimize });

const install_step = b.addInstallArtifact(exe);
const install_step = b.addInstallArtifact(exe, .{});
const working = blk: {
for (broken) |broken_name| {
if (std.mem.eql(u8, name, broken_name))
Expand Down Expand Up @@ -61,7 +61,7 @@ pub fn build(b: *std.Build) !void {
lib.linkLibC();
_ = try install(lib, .{});
// lib.emit_h = true;
const lib_install = b.addInstallArtifact(lib);
const lib_install = b.addInstallArtifact(lib, .{});
b.getInstallStep().dependOn(&lib_install.step);

const buildc_step = b.step("shared", "Build capy as a shared library (with C ABI)");
Expand Down
10 changes: 5 additions & 5 deletions build_capy.zig
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ pub fn install(step: *std.Build.CompileStep, options: CapyBuildOptions) !*std.Bu
step.linkSystemLibrary("gdi32");
step.linkSystemLibrary("gdiplus");
switch (step.target.toTarget().cpu.arch) {
.x86_64 => step.addObjectFile(prefix ++ "/src/backends/win32/res/x86_64.o"),
.x86_64 => step.addObjectFile(.{ .path = prefix ++ "/src/backends/win32/res/x86_64.o" }),
//.i386 => step.addObjectFile(prefix ++ "/src/backends/win32/res/i386.o"), // currently disabled due to problems with safe SEH
else => {}, // not much of a problem as it'll just lack styling
}
Expand All @@ -155,9 +155,9 @@ pub fn install(step: *std.Build.CompileStep, options: CapyBuildOptions) !*std.Bu
const sdk_framework_dir = std.fs.path.join(b.allocator, &.{ sdk_root_dir, "System/Library/Frameworks" }) catch unreachable;
const sdk_include_dir = std.fs.path.join(b.allocator, &.{ sdk_root_dir, "usr/include" }) catch unreachable;
const sdk_lib_dir = std.fs.path.join(b.allocator, &.{ sdk_root_dir, "usr/lib" }) catch unreachable;
step.addFrameworkPath(sdk_framework_dir);
step.addSystemIncludePath(sdk_include_dir);
step.addLibraryPath(sdk_lib_dir);
step.addFrameworkPath(.{ .path = sdk_framework_dir });
step.addSystemIncludePath(.{ .path = sdk_include_dir });
step.addLibraryPath(.{ .path = sdk_lib_dir });
}

step.linkLibC();
Expand Down Expand Up @@ -278,7 +278,7 @@ pub fn install(step: *std.Build.CompileStep, options: CapyBuildOptions) !*std.Bu
}

const serve = WebServerStep.create(b, step);
const install_step = b.addInstallArtifact(step);
const install_step = b.addInstallArtifact(step, .{});
serve.step.dependOn(&install_step.step);
return &serve.step;
} else {
Expand Down

0 comments on commit 5d1503b

Please sign in to comment.