Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installer: overwrite all essential files #907

Merged
merged 2 commits into from
Aug 7, 2023

Conversation

lahm86
Copy link
Collaborator

@lahm86 lahm86 commented Aug 6, 2023

Resolves #904.

Checklist

  • I have read the coding conventions
  • I have added a changelog entry about what my pull request accomplishes, or it is an internal change

Description

Changed the overwrite check approach to look at extensions so to avoid listing each file (the bin files alone would make this unmanageable I think). It will only overwrite what's in the release zip anyway, so such things as Tomb1Main.json5 will remain unaffected. I included the shaders too - do you think this is OK, or given previous shader issues should we leave these out?

@lahm86 lahm86 added the Feature New functionality label Aug 6, 2023
@lahm86 lahm86 added this to the 2.16 milestone Aug 6, 2023
@lahm86 lahm86 self-assigned this Aug 6, 2023
@lahm86 lahm86 requested review from rr- and walkawayy August 6, 2023 15:09
Overwrites any files such as level data, music files and existing user settings.
If this option is off, only overwrites Tomb1Main.exe in order to update the game.
Overwrites any files such as level data and music files. If this option is off, only
overwrites Tomb1Main.exe and other essential files in order to update the game.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think this checkbox does anything given the new changes – the release .zip contains only files from the new
extensions whitelist?

Copy link
Collaborator Author

@lahm86 lahm86 Aug 6, 2023

Choose a reason for hiding this comment

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

There are the three PNG files too - eidospc.png, titleh.png and titleh_ub.png. Should we just remove the checkbox altogether?
Actually, the setting is also used here, so I suppose that ensures music and level files are retained.

https://github.com/LostArtefacts/Tomb1Main/blob/develop/tools/installer/Installer/Installers/InstallExecutor.cs#L62

Copy link
Collaborator

Choose a reason for hiding this comment

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

IMO we should remove this box altogether, and the "install source" shouldn't overwrite the files whereas tomb1main files should. What do you think about this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sounds good, I'll work on updating it.

Copy link
Collaborator Author

@lahm86 lahm86 Aug 7, 2023

Choose a reason for hiding this comment

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

Updates now in place:

  • Everything in the Tomb1Main embedded zip file will always be written to the target.
  • Install source will only write files that aren't in the target folder already.
  • Downloaded music and UB files will not be written if they already exist.

@lahm86 lahm86 requested a review from rr- August 7, 2023 09:47
Copy link
Collaborator

@walkawayy walkawayy left a comment

Choose a reason for hiding this comment

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

LGTM

@lahm86 lahm86 merged commit 1c5b427 into LostArtefacts:develop Aug 7, 2023
1 check passed
@lahm86 lahm86 deleted the issue-904-essential-overwrites branch August 7, 2023 13:28
@rr- rr- added the TR1 label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New functionality TR1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update installer to overwrite essential files
3 participants