Skip to content

feat: multi-sim support#512

Merged
FoxtrotSierra6829 merged 48 commits intomasterfrom
multi-sim-support
Nov 1, 2025
Merged

feat: multi-sim support#512
FoxtrotSierra6829 merged 48 commits intomasterfrom
multi-sim-support

Conversation

@FoxtrotSierra6829
Copy link
Copy Markdown
Member

@FoxtrotSierra6829 FoxtrotSierra6829 commented Mar 2, 2025

Summary of Changes

  • detection of MSFS 2024 paths additionally to MSFS 2020
  • addons filtered by simulator
  • ability to switch between managing addons for each simulator
  • allow enabling or disabling simulators
  • improved temp folder logic, allowing the use of a dedicated temp folder or the install directory specific to the sim.
  • adapted error handling

Screenshots (if necessary)

grafik
grafik
grafik

Additional context

I initially intended addons to be able to support multiple simulators without needing two entries. This turned out to only be possible with a translation layer due to the need for individual addon keys for state handling, as well as the facilitation of chosing which set of paths to use. As in the long term, the configuration of an addon between the two MSFS simulators will diverge either way, I have opted for not creating this translation layer to ease the maintainability of the code.

Requires the use of an adapted configuration (flybywiresim/installer-data#56) or enabling force use local configuration.

Old versions of the installer (pre this PR) are unable to filter addons by simulator. Having a configuration with an MSFS 2020 and an MSFS 2024 version of an addon will therefore lead to having both versions shown and detected as installed. The new installer version will filter out any addons without the simulator property. A potential course of action to mitigate this issue is to initially release the new config alongside the new installer version without MSFS 2024 addons to allow for a transition.

Discord username (if different from GitHub):
foxtrotsierra

@Benjozork Benjozork self-assigned this Apr 19, 2025
Comment thread src/renderer/actions/install-path.utils.tsx Outdated
Comment thread src/renderer/actions/install-path.utils.tsx Outdated
Comment thread src/renderer/components/App/NavBar.tsx Outdated
Comment thread src/renderer/components/ErrorModal/index.tsx
Msfs2024 = 'msfs2024',
}

export type TypeOfSimulator = `${Simulators}` | Simulators;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two types look equivalent.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first type resolves to the raw strings of the enum while the second resolves to the enum. The acceptance of raw strings seems no longer required with the current fully typed implementation, so I have removed the union type.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update: It is still required to union these two types because the configuration is violating the type if it doesn't include the type '${Simulators}', as it is expected to verify against the raw string. Using a union of the types seems a better option than using a translation layer. Of course one could discard the second type and use raw strings within the installer program code too, however that seems less type safe.

While the fetched live configuration is not checked against at runtime, in my opinion it is better to have a standardized handling together with the shipped defaultconfiguration as well as using the same types for validation in the installer-data repo

(Idk why tslint didn't even complain about the defaultconfiguration, the last time I edited this...)

Copy link
Copy Markdown

@flogross89 flogross89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot! Overall approach looks valid and doable.
I don't have any experience with the installer codebase though, so take my approval with a grain of salt. Given how few potential reviewers there are though, I'd say we continue with merging and release testing.

@flogross89
Copy link
Copy Markdown

@Benjozork Thanks a lot for the review!
@FoxtrotSierra6829 Is there anything left to do before we can merge this PR and create v3.4.4-rc.2 ?

@FoxtrotSierra6829 FoxtrotSierra6829 merged commit 9a0f2de into master Nov 1, 2025
3 checks passed
@FoxtrotSierra6829 FoxtrotSierra6829 deleted the multi-sim-support branch January 14, 2026 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants