ripose-jp / Memento

An mpv-based video player for studying Japanese
https://ripose-jp.github.io/Memento/
GNU General Public License v2.0
434 stars 21 forks source link

Improve performance of windows build script on rebuild #218

Closed spacehamster closed 2 months ago

spacehamster commented 2 months ago

Amended windows build script to skip redundant work on rebuild

ripose-jp commented 2 months ago

Please update your commit message in accordance with the guidelines.

Not that I'm necessarily against this change, but currently it's going to break other scripts. You'll also need to modify build-installer.sh as well since it depends on build.sh.

I think you might be making this change since you have a suboptimal development environment. If you're using VSCode what I like to do is the following:

After doing this, you shouldn't need to run this build script anymore unless you want to make portable binaries. You should be able to just click the Build button in VSCode. gdb and everything else should work as well once you set up a launch.json using Native Debug.

spacehamster commented 2 months ago

I think you might be making this change since you have a suboptimal development environment.

Yes, I had been using VSCode without using the CMake Plugin. This solves the main issue I was having. It still rebuilds from when switching build type (debug/release), but that doesn't happen often to bother me. Do you want me to make the suggested changes or just close the pull request?

Also looking briefly, both Native Debug and Microsoft C/C++ Extensions support debugging with Msys2, is there an advantage to one to the other? I'd just been using Microsoft C/C++ Extensions.

ripose-jp commented 2 months ago

It still rebuilds from when switching build type (debug/release)

It has to. The binary generated by the compiler when given -O0 and -O3 are completely different.

Do you want me to make the suggested changes or just close the pull request?

I really just use these build scripts to create portable binaries. Adding features useful for development doesn't seem too useful in my opinion, so I lean towards closing the PR.

Microsoft C/C++ Extensions support debugging with Msys2

That's what they want you to think, but I have never ever gotten visual debug on VSCode to work on Windows except with Native Debug. It's the only reason I recommend it, since I know at this point the problem with Microsoft's extension isn't just user error.