Skip to content

Commit

Permalink
fix(build): nd dependencies (flybywiresim#8384)
Browse files Browse the repository at this point in the history
* fix(build): nd dependencies

* fix(build): a380x too
  • Loading branch information
tracernz authored Jan 5, 2024
1 parent b0e45de commit 5843e8e
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 20 deletions.
22 changes: 13 additions & 9 deletions fbw-a32nx/src/systems/instruments/buildSrc/igniter/tasks.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@ export function getInstrumentsIgniterTasks() {
const baseInstruments = fs.readdirSync(join(Directories.instruments, 'src'), { withFileTypes: true })
.filter((d) => d.isDirectory() && fs.existsSync(join(Directories.instruments, 'src', d.name, 'config.json')));

return baseInstruments.map(({ name }) => new ExecTask(
name,
`cd fbw-a32nx && mach build -f ${name}`,
[
join('fbw-a32nx/src/systems/instruments/src', name),
'fbw-a32nx/src/systems/instruments/src/Common',
join('fbw-a32nx/out/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/A32NX', name),
],
));
return baseInstruments.map(({ name }) => {
const config = JSON.parse(fs.readFileSync(join(Directories.instruments, 'src', name, 'config.json')));
return new ExecTask(
name,
`cd fbw-a32nx && mach build -f ${name}`,
[
join('fbw-a32nx/src/systems/instruments/src', name),
'fbw-a32nx/src/systems/instruments/src/Common',
join('fbw-a32nx/out/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/A32NX', name),
...(config.extraDeps || []),
],
);
});
}
5 changes: 4 additions & 1 deletion fbw-a32nx/src/systems/instruments/src/ND/config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"index": "./instrument.tsx",
"isInteractive": false
"isInteractive": false,
"extraDeps": [
"fbw-common/src/systems/instruments/src/ND"
]
}
22 changes: 13 additions & 9 deletions fbw-a380x/src/systems/instruments/buildSrc/igniter/tasks.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@ export function getInstrumentsIgniterTasks() {
const baseInstruments = fs.readdirSync(join(Directories.instruments, 'src'), { withFileTypes: true })
.filter((d) => d.isDirectory() && fs.existsSync(join(Directories.instruments, 'src', d.name, 'config.json')));

return baseInstruments.map(({ name }) => new ExecTask(
name,
`cd fbw-a380x && mach build -f ${name}`,
[
join('fbw-a380x/src/systems/instruments/src', name),
'fbw-a380x/src/systems/instruments/src/Common',
join('fbw-a380x/out/flybywire-aircraft-a380-842/html_ui/Pages/VCockpit/Instruments/A380X', name),
],
));
return baseInstruments.map(({ name }) => {
const config = JSON.parse(fs.readFileSync(join(Directories.instruments, 'src', name, 'config.json')));
return new ExecTask(
name,
`cd fbw-a380x && mach build -f ${name}`,
[
join('fbw-a380x/src/systems/instruments/src', name),
'fbw-a380x/src/systems/instruments/src/Common',
join('fbw-a380x/out/flybywire-aircraft-a380-842/html_ui/Pages/VCockpit/Instruments/A380X', name),
...(config.extraDeps || []),
],
);
});
}
5 changes: 4 additions & 1 deletion fbw-a380x/src/systems/instruments/src/ND/config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"index": "./instrument.tsx",
"isInteractive": false
"isInteractive": false,
"extraDeps": [
"fbw-common/src/systems/instruments/src/ND"
]
}

0 comments on commit 5843e8e

Please sign in to comment.