Problem with vs201x.lua and vs200x.lua Visual Studio .sln generation.

Added by John Brandwood over 2 years ago

I've hit a problem importing jamplus-generated Visual Studio solutions into the text editor that I'm using (Zeus if that matters).

This has been the case for a while, and it is still that way with a brand new source build of jamplus and luaplus from the nextgen branch yesterday.

This is because jamplus is writing out project paths into the ".sln" solution file in a very differently to the way that Visual Studio writes them out ... it is using "/" path separators instead of "\", and worse, it puts a double slash as the last path separator instead of a single-slash.

For example ... jamplus writes ...

VisualStudioVersion = 12.0.21005.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "D:/root/project/build/workspace-win32/_workspace.vs2013_//libpng.vcxproj", "{D4D234F8-6FE5-4203-90E2-DC0DABC1AAE1}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "D:/root/project/build/workspace-win32/_workspace.vs2013_//zlib.vcxproj", "{050C5547-C443-4086-B86F-CBECE289DFBC}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "!BuildWorkspace", "D:/root/project/build/workspace-win32/_workspace.vs2013_/!BuildWorkspace.vcxproj", "{E8CA7290-4178-45A0-AC65-0AD7CA090868}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "!UpdateWorkspace", "D:/root/project/build/workspace-win32/_workspace.vs2013_/!UpdateWorkspace.vcxproj", "{37A0F5A8-1351-4387-98FD-54721F531E02}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "!JamSupport", "!JamSupport", "{6A258B41-074B-4849-BAAA-7979E27ED94C}"
EndProject

instead of ...

VisualStudioVersion = 12.0.21005.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "D:\root\project\build\workspace-win32\_workspace.vs2013_\libpng.vcxproj", "{D4D234F8-6FE5-4203-90E2-DC0DABC1AAE1}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "D:\root\project\build\workspace-win32\_workspace.vs2013_\zlib.vcxproj", "{050C5547-C443-4086-B86F-CBECE289DFBC}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "!BuildWorkspace", "D:\root\project\build\workspace-win32\_workspace.vs2013_\!BuildWorkspace.vcxproj", "{E8CA7290-4178-45A0-AC65-0AD7CA090868}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "!UpdateWorkspace", "D:\root\project\build\workspace-win32\_workspace.vs2013_\!UpdateWorkspace.vcxproj", "{37A0F5A8-1351-4387-98FD-54721F531E02}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "!JamSupport", "!JamSupport", "{01690D48-E6B8-4B54-B4D7-CEBFE4F9EACF}"
EndProject

I'm attaching a patch that fixes this behavior at the point where the lines are written out.

It would probably be better to fix the "Filename" values when they're originally put into the structures, but try as I might, I just couldn't see where that was done.

John

fix-workspace.patch Magnifier - Patch file to fix vs200x.lua and vs201x.lua (1.27 KB)


Replies (1)

RE: Problem with vs201x.lua and vs200x.lua Visual Studio .sln generation. - Added by Joshua Jensen over 2 years ago

This is fixed in the jamplus3 branch.

If we need to, I can see about backporting to nextgen, but I'm mostly in a state where I am moving forward toward JamPlus 3.0.

Thanks for the patch and pointing out the issue.

-Josh

(1-1/1)