Skip to content

Built target only works when the current directory is the Foxtrot directory - hard-coded specific file names #15

@DerekK19

Description

@DerekK19

The two gui files model.rs and backdrop.rs have hard-coded file names in std::fs::read calls. This means that the gui target will only run when the current directory is Foxtrot.

A simple change (from someone who has never programmed in Rust until today!) is to change the line in gui/src/backdrop.rs

std::fs::read("gui/src/backdrop.wgsl")

to

std::fs::read(concat!(env!("CARGO_MANIFEST_DIR"), "/src/backdrop.wgsl"))

and similar in model.rs

Once this is done, the gui target can be executed from any folder - e.g the one where the step files are

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions