update scripts

This commit is contained in:
LordMZTE 2023-04-17 21:29:15 +02:00
parent b98da24d1c
commit fa65c3f54c
Signed by: LordMZTE
GPG key ID: B64802DC33A64FF6
7 changed files with 15 additions and 12 deletions

View file

@ -15,9 +15,9 @@ pub fn build(b: *std.build.Builder) void {
exe.addModule("ansi-term", b.dependency("ansi_term", .{}).module("ansi-term"));
exe.install();
b.installArtifact(exe);
const run_cmd = exe.run();
const run_cmd = b.addRunArtifact(exe);
run_cmd.step.dependOn(b.getInstallStep());
if (b.args) |args| {
run_cmd.addArgs(args);

View file

@ -15,6 +15,9 @@ pub fn populateEnvironment(env: *std.process.EnvMap) !void {
try env.put("MZTE_ENV_SET", "1");
// set shell to fish to prevent anything from defaulting to mzteinit
try env.put("SHELL", "fish");
// mix (elixir package manager) should respect XDG
try env.put("MIX_XDG", "1");

View file

@ -10,7 +10,7 @@ pub fn build(b: *std.build.Builder) void {
.target = target,
.optimize = mode,
});
exe.install();
b.installArtifact(exe);
const desktop_install_step = b.addInstallFile(
.{ .path = "assets/openbrowser.desktop" },
@ -18,7 +18,7 @@ pub fn build(b: *std.build.Builder) void {
);
b.getInstallStep().dependOn(&desktop_install_step.step);
const run_cmd = exe.run();
const run_cmd = b.addRunArtifact(exe);
run_cmd.step.dependOn(b.getInstallStep());
if (b.args) |args| {
run_cmd.addArgs(args);

View file

@ -20,7 +20,7 @@ pub fn build(b: *std.build.Builder) void {
exe.strip = optimize != .Debug and optimize != .ReleaseSafe;
exe.install();
b.installArtifact(exe);
var logo_install_step = b.addInstallFile(
.{ .path = "assets/playtwitch.svg" },
@ -34,7 +34,7 @@ pub fn build(b: *std.build.Builder) void {
);
b.getInstallStep().dependOn(&desktop_entry_install_step.step);
const run_cmd = exe.run();
const run_cmd = b.addRunArtifact(exe);
run_cmd.step.dependOn(b.getInstallStep());
if (b.args) |args| {
run_cmd.addArgs(args);

View file

@ -18,9 +18,9 @@ pub fn build(b: *std.build.Builder) void {
exe.addModule("ansi-term", b.dependency("ansi_term", .{}).module("ansi-term"));
exe.addModule("known-folders", b.dependency("known_folders", .{}).module("known-folders"));
exe.install();
b.installArtifact(exe);
const run_cmd = exe.run();
const run_cmd = b.addRunArtifact(exe);
run_cmd.step.dependOn(b.getInstallStep());
if (b.args) |args| {
run_cmd.addArgs(args);

View file

@ -17,9 +17,9 @@ pub fn build(b: *std.build.Builder) void {
exe.strip = mode != .Debug;
exe.install();
b.installArtifact(exe);
const run_cmd = exe.run();
const run_cmd = b.addRunArtifact(exe);
run_cmd.step.dependOn(b.getInstallStep());
if (b.args) |args| {
run_cmd.addArgs(args);

View file

@ -16,9 +16,9 @@ pub fn build(b: *std.build.Builder) void {
exe.strip = mode != .Debug;
exe.install();
b.installArtifact(exe);
const run_cmd = exe.run();
const run_cmd = b.addRunArtifact(exe);
run_cmd.step.dependOn(b.getInstallStep());
if (b.args) |args| {
run_cmd.addArgs(args);