CompilingLua icon indicating copy to clipboard operation
CompilingLua copied to clipboard

Update README.md - Copiling

Open shoshta73 opened this issue 1 year ago • 2 comments

Updated The Compilation instruction to be according to the correct usage of the Visual Studio guide lines

shoshta73 avatar Sep 05 '23 19:09 shoshta73

Ignoring the long list of issues with the instruction text for a moment...

I suspect it would be far easier to find an equivalent of the %VS140COMNTOOLS% and %VS120COMNTOOLS% variables for more recent Visual Studio releases and then update the actual script rather than updating the instructions.

Unfortunately I don't have any more recent versions of Visual Studio installed, and I don't intend to install them, so unless you or someone else can provide that information, the script's going to be stuck as it is for now.

After some brief research, it seems %VS160COMNTOOLS% may be a candidate.

What does the console print if you run ECHO %VS160COMNTOOLS%?

Or, alternatively, does this modified script compile Lua correctly?

https://github.com/Pharap/CompilingLua/tree/vs16-test

Pharap avatar Sep 11 '23 03:09 Pharap

Sorry for the late reply.

I have done tests on both scripts and it seems to me that the most consistent build-clean-rebuild results were given by calling MS VS toolchain to console / PowerShelPowerShell(I am running on PowerShell 7.3.7) and both will compile it correctly apart from smaller inconvenience to call MS VS toolchain

By default %VS_XXX_COMNTOOLS%, %VS160CMNTOOLS% in this case should resolve to: C:\Program Files\Microsoft Visual Studio<release>(2022)<package>(professional)\Common7\Tools newer releases... 2019 resolves in command prompt but does not resolve in PowerShell and 2022 does not resolve in either (note that could be caused by per-user settings or different installation options of Visual Studio).

Also, one viable option would be to introduce a premake file that would generate a solution for the Lua source code hence it seems that Visual Studio seems to be finegly to satisfy when it comes to manual compilations.

To close up that as I have seen what is done in practice is setting those variables manually, for example, found in the wilderness of GitHub https://github.com/rosmir/octlab/commit/master on addition at line 7 and then using it as needed.

shoshta73 avatar Oct 03 '23 23:10 shoshta73