Function create [src]

Prototype

pub fn create( owner: *std.Build, source: LazyPath, dir: InstallDir, dest_rel_path: []const u8, ) *InstallFile

Parameters

owner: *std.Buildsource: LazyPathdir: InstallDirdest_rel_path: []const u8

Source

pub fn create( owner: *std.Build, source: LazyPath, dir: InstallDir, dest_rel_path: []const u8, ) *InstallFile { assert(dest_rel_path.len != 0); const install_file = owner.allocator.create(InstallFile) catch @panic("OOM"); install_file.* = .{ .step = Step.init(.{ .id = base_id, .name = owner.fmt("install {s} to {s}", .{ source.getDisplayName(), dest_rel_path }), .owner = owner, .makeFn = make, }), .source = source.dupe(owner), .dir = dir.dupe(owner), .dest_rel_path = owner.dupePath(dest_rel_path), }; source.addStepDependencies(&install_file.step); return install_file; }