Skip to content

Conversation

@Qxe5
Copy link

@Qxe5 Qxe5 commented Nov 27, 2023

Issue

On the initial configuration wizard when the following is set:

image

The program will create duplicated files in the user profile regardless:

image

Fix

Remove redundant calls of ExtractNativeDependencies() and let the following method call it:

public static void CreateConfig(bool portable)

N.B. An empty directory "Mesen2" will still be created in the user profile. I can add that folder not being created with the above setting if this is a wanted change.

@SourMesen
Copy link
Owner

I'm aware of this issue, however, extracting the files is required - not doing so will crash the application when it starts. This won't be visible if you're running through, e.g Visual Studio, because the folder that contains Mesen.exe will also contain all the files that it needs to extract, but if you run the .exe file from a folder that doesn't have those files (e.g libskiasharp, mesencore.dll, etc.), which is what happens when someone runs mesen after download it, the application displays nothing and crashes immediately with these changes.

@Qxe5
Copy link
Author

Qxe5 commented Nov 28, 2023

Sorry about that, yes it wasn't visible in Visual Studio as the dependancies are there. I have not been able to build a single exe file with the PublishProfiles (VS 2022). The DLLs are outputted to the build directory in addition to Mesen.exe.

Would this changed commit work?

If so, Directory.Delete() may need some exception handling but I have not found a case unless the permissions of Mesen2 are changed retroactively by the user.

@Qxe5 Qxe5 marked this pull request as ready for review November 29, 2023 13:42
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