2. Windows build - Use batch file and full path #77
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
tldr:
WindowsPreBuildsteps to.batfile%~fpath expansion forDependencies.zipfile so the build uses the fully qualified path..
Hello, thank you so much for creating and sharing Mesen. It is absolutely fantastic. I very much enjoy using it and I wanted to try to give something back.
When building in Visual Studio on Windows 10 at the latest Mesen code - commit fabc9a6 - I get an error about "The file cannot be accessed" while building the
UIproject:Have you ever seen this?
Potential Cause
I think this may be caused by my computer getting confused about the file path for the final
Dependencies.zipzip file. It claims it is not able to find that file.I am using Visual Studio 2022 Community, Version 17.14.23, doing a Release x64 build.
I'm not sure if this is an issue with my setup or if I did something wrong. My steps were:
git clonethe mesen repo to a local foldermesen.slnwith Visual Studio 2022Releaseandx64build configBuild -> Build SolutionMy guess is that this is some difference between system environment variables and powershell's behaviour with paths, or what folders are included in paths.
Fix - Use the full path
I found that if I change the build script to use the full path for the zip file, then the build succeeds.
I went into the
PreBuildWindowscommand and added a batch file%~fpath expansion for the file path.The build then succeeds just fine.
So I wanted to offer this patch to use the full file path.
Move build steps into batch file
To make viewing and maintaining the build steps a bit easier for humans, I took the liberty of copying the
PreBuildWindowscommands into a batch file.This would let anyone view all of the steps in one place, e.g. inside a regular Visual Studio editor window, and be able to use regular newlines for spacing, instead of having to edit everything inside a Visual Studio properties window, or use the special

characters for newlines.Thank you for your time.