Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Schneider <oliver@assarbad.net>2022-02-21 02:20:31 +0300
committerOliver Schneider <oliver@assarbad.net>2022-02-21 02:20:31 +0300
commit68abe9eb99e5d8aec6a5dacfd8859a5bb01dce0b (patch)
treee9c56352f4652e07fdc582e27a8280cd888ce35f
parentf691e448fa4fd2fb96684612834f29d89a5e2d2b (diff)
Attempting to solve a glitch with VS version selector
It appears the true string in modern versions is "Visual Studio Version <version>" not just "Visual Studio <version>". Still need to figure out which of the VS versions changed it. Fixed up all tests. --HG-- branch : WDS-build
-rw-r--r--.gitignore10
-rw-r--r--.hgignore1
-rw-r--r--src/actions/vstudio/vs2005_solution.lua3
-rw-r--r--src/tools/gcc.lua2
-rw-r--r--tests/actions/vstudio/sln2005/header.lua44
-rw-r--r--tests/actions/vstudio/vc2010/test_files.lua2
6 files changed, 38 insertions, 24 deletions
diff --git a/.gitignore b/.gitignore
index a5dcc88..45e32c4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -35,3 +35,13 @@ Scratchpad.txt
Unix Worksheet.worksheet
project.bbprojectdata
Premake4.tmproj
+Visual Lint/PC-lint/**.vlstatus
+*.lnt
+intermediate/**
+premake4.exe
+src/host/hgtip.h
+*.asc
+.vs/**
+
+.hg/
+premake4.rev-*.exe
diff --git a/.hgignore b/.hgignore
index ac6b334..3454372 100644
--- a/.hgignore
+++ b/.hgignore
@@ -44,3 +44,4 @@ src/host/hgtip.h
.vs/**
.git/
+premake4.rev-*.exe
diff --git a/src/actions/vstudio/vs2005_solution.lua b/src/actions/vstudio/vs2005_solution.lua
index 7e10ff0..07441f1 100644
--- a/src/actions/vstudio/vs2005_solution.lua
+++ b/src/actions/vstudio/vs2005_solution.lua
@@ -41,7 +41,8 @@
local action = premake.action.current()
_p('Microsoft Visual Studio Solution File, Format Version %d.00', action.vstudio.solutionVersion)
if action.vstudio.shortSlnVersion ~= nil then
- _p('# Visual Studio %s', action.vstudio.shortSlnVersion)
+ _p('# Visual Studio Version %s', action.vstudio.shortSlnVersion)
+ _p('VisualStudioVersion = %s.0.0.0', action.vstudio.shortSlnVersion)
else
_p('# Visual Studio %s', _ACTION:sub(3))
end
diff --git a/src/tools/gcc.lua b/src/tools/gcc.lua
index 985d4f4..2268d7d 100644
--- a/src/tools/gcc.lua
+++ b/src/tools/gcc.lua
@@ -85,7 +85,7 @@
ldflags = "-L$(LIBOGC_LIB) $(MACHDEP)",
cfgsettings = [[
ifeq ($(strip $(DEVKITPPC)),)
- $(error "DEVKITPPC environment variable is not set")'
+ $(error "DEVKITPPC environment variable is not set")'
endif
include $(DEVKITPPC)/wii_rules']],
},
diff --git a/tests/actions/vstudio/sln2005/header.lua b/tests/actions/vstudio/sln2005/header.lua
index 61aae75..1b5ae62 100644
--- a/tests/actions/vstudio/sln2005/header.lua
+++ b/tests/actions/vstudio/sln2005/header.lua
@@ -77,12 +77,12 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
]]
--[[
-VS 2013 seems to add something like:
+VS 2013 seems to add something like (not mandatory):
-VisualStudioVersion = 12.0.31101.0
+VisualStudioVersion = 12.0.0.0
MinimumVisualStudioVersion = 10.0.40219.1
-which don't seem to be mandatory, though.
+which seems to be used by the Visual Studio Version Selector to launch the correct VS.
]]
end
@@ -91,15 +91,15 @@ which don't seem to be mandatory, though.
prepare()
test.capture [[
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 14
- ]]
+# Visual Studio Version 14
+VisualStudioVersion = 14.]]
--[[
-VS 2015 seems to add something like:
+VS 2015 seems to add something like (not mandatory):
-VisualStudioVersion = 14.0.23107.0
+VisualStudioVersion = 14.0.0.0
MinimumVisualStudioVersion = 10.0.40219.1
-which don't seem to be mandatory, though.
+which seems to be used by the Visual Studio Version Selector to launch the correct VS.
]]
end
@@ -108,15 +108,15 @@ which don't seem to be mandatory, though.
prepare()
test.capture [[
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
- ]]
+# Visual Studio Version 15
+VisualStudioVersion = 15.]]
--[[
-VS 2017 seems to add something like:
+VS 2017 seems to add something like (not mandatory):
-VisualStudioVersion = 15.0.26228.4
+VisualStudioVersion = 15.0.0.0
MinimumVisualStudioVersion = 10.0.40219.1
-which don't seem to be mandatory, though.
+which seems to be used by the Visual Studio Version Selector to launch the correct VS.
]]
end
@@ -125,15 +125,15 @@ which don't seem to be mandatory, though.
prepare()
test.capture [[
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 16
- ]]
+# Visual Studio Version 16
+VisualStudioVersion = 16.]]
--[[
-VS 2019 seems to add something like:
+VS 2019 seems to add something like (not mandatory):
-VisualStudioVersion = 16.0.29411.108
+VisualStudioVersion = 16.0.0.0
MinimumVisualStudioVersion = 10.0.40219.1
-which don't seem to be mandatory, though.
+which seems to be used by the Visual Studio Version Selector to launch the correct VS.
]]
end
@@ -142,14 +142,14 @@ which don't seem to be mandatory, though.
prepare()
test.capture [[
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 17
- ]]
+# Visual Studio Version 17
+VisualStudioVersion = 17.]]
--[[
-VS 2022 seems to add something like:
+VS 2022 seems to add something like (not mandatory):
VisualStudioVersion = 17.0.0.0
MinimumVisualStudioVersion = 10.0.40219.1
-which don't seem to be mandatory, though.
+which seems to be used by the Visual Studio Version Selector to launch the correct VS.
]]
end
diff --git a/tests/actions/vstudio/vc2010/test_files.lua b/tests/actions/vstudio/vc2010/test_files.lua
index 6cd1a16..330c35e 100644
--- a/tests/actions/vstudio/vc2010/test_files.lua
+++ b/tests/actions/vstudio/vc2010/test_files.lua
@@ -48,6 +48,7 @@
test.capture [[
<ItemGroup>
<ClCompile Include="hello.c">
+ <CompileAs>CompileAsC</CompileAs>
</ClCompile>
</ItemGroup>
]]
@@ -86,6 +87,7 @@
test.capture [[
<ItemGroup>
<ClCompile Include="src\greetings\hello.c">
+ <CompileAs>CompileAsC</CompileAs>
</ClCompile>
</ItemGroup>
]]