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

added architecture flag to files extraction command #204

Closed
wants to merge 3 commits into from
Closed

added architecture flag to files extraction command #204

wants to merge 3 commits into from

Conversation

mega5800
Copy link
Contributor

@mega5800 mega5800 commented Aug 13, 2024

👍🎉 First off, thanks for taking the time to contribute! 🎉👍

Please fill out the following checklist:

If you need any help at all, feel free to submit the PR and @-mention activescott and I'll be happy to assist!

Hello @activescott.

I took care of this ticket, and for now I submit a first pull request for your consideration.
The idea behind this update is similar to the approach used in the flat extraction feature.
First, I perform a regular file extraction using the x command, and then I delete any PE files that belong to the architecture opposite to the one specified by the user with the -a flag.

Please note that are different files with the .duplicate1 suffix.
These are various text files with different extensions that are not architecture specific.

For example:
image
However, I don't think they contain valuable information for the user, unlike other PE files that I handle in this update.

Once you are happy with the presented solution, I will added additional test cases for the new feature.

Thank you.

@activescott
Copy link
Owner

Thank you for your efforts here. It seems a bit messy that it’s still gonna leave. Duplicate files behind when they are almost certainly architecture specific. if windows installer knows how to choose the right files in this case surely we could too.
I have my no means done exhaustive research on this, but in a quick search, I did note the following:

Each 64-bit Windows Installer component in the package must include the msidbComponentAttributes64bit bit in the Attributes column of the Component Table.

from https://learn.microsoft.com/en-us/windows/win32/msi/64-bit-windows-installer-packages

I think we should explore some other solutions here by researching the MSI database and see if we can more accurately extract architecture specific files. Again I haven’t done exhaustive research here because I’m busy with something else at the moment but I can look around later or you can do 30 minutes of searching or show and let me know what you find.

@mega5800
Copy link
Contributor Author

Thank you @activescott for your input.

I agree that leaving duplicate files after extraction is not a viable solution and is something I will avoid in my pull request.
I just wanted to raise this point for discussion.

Your suggestion about msidbComponentAttributes64bit sounds promising, and I believe I've found a solution for the duplicate files issue using this value.
I will update my pull request with this new approach during the weekend.

Thank you.

@mega5800
Copy link
Contributor Author

Hello @activescott.

I decided to close this pull request for now, as I believe I can quickly support the multi-language GUI ticket.
I will keep the developed logic and will research the subject later on.

Thank you.

@mega5800 mega5800 closed this Aug 18, 2024
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.

2 participants