Hi, just came across this. Finally, someone actually was able to get flutter working with a portable build. After hours of looking into it for days I also came to the same conclusion as yours and found this project by chance. I was able to successfully get the portable build working, with some caveats. I only added some changes on the fly.
- Used Aria2C to download instead of what you were using. It was way faster and utilized the entire bandwidth I had.
- Added an option to create a session based env setup instead of messing with the system's variables.
- Your script relied on the Microsoft.VisualStudio.Setup.Configuration.Native.dll which yes, it is necessary to be registered. But since you skipped msi extraction I added an option for it.
- When unregistering, deleting the entire HKLM\SOFTWARE\Microsoft\VisualStudio made system vc runtime to be messed up. Games/Apps which ran fine were suddenly non-functional. Since the key added was HKLM\SOFTWARE\Microsoft\VisualStudio\Setup it's better to target that only.
- Also, perhaps back then flutter was simpler. Now it looks for vswhere in C:\Program Files (x86)\Microsoft Visual Studio\Installer
without which it fails miserably.
- And then. Flutter strikes again. I had to make a symlink for the Install_Path to C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools (and also change the path in states.json file)
CMake itself detected visual studio just fine. Flutter just doesn't let cmake get that on its own (I may test out if it's possible to do so modifying the cmakelists.txt file but exhausted for the day)
If you're still checking the script out. Here's my version of it.
main-Copy1.ipynb
Hi, just came across this. Finally, someone actually was able to get flutter working with a portable build. After hours of looking into it for days I also came to the same conclusion as yours and found this project by chance. I was able to successfully get the portable build working, with some caveats. I only added some changes on the fly.
without which it fails miserably.
CMake itself detected visual studio just fine. Flutter just doesn't let cmake get that on its own (I may test out if it's possible to do so modifying the cmakelists.txt file but exhausted for the day)
If you're still checking the script out. Here's my version of it.
main-Copy1.ipynb