Skip to content

Commit de2ce01

Browse files
committed
LuaInstaller.Console: restore 'list-vs' and 'list-win-sdk' commands
1 parent 88ea496 commit de2ce01

3 files changed

Lines changed: 44 additions & 0 deletions

File tree

.github/workflows/lfs.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ jobs:
110110
& $console $c;
111111
Write-Host;
112112
}
113+
114+
Write-Host "command: ${color}install";
113115
114116
& $console install `
115117
"dest-dir=${{ env.LUA_DIR }}" `

LuaInstaller.Console/Program.cs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ LuaInstaller.Console.exe list-lua
2424
Lists all Lua versions that this tool
2525
is able to build
2626
27+
LuaInstaller.Console.exe list-vs
28+
Lists all MSVC compilers found
29+
for x64 on 64 Bit Operating
30+
Systems or x86 otherwise.
31+
2732
LuaInstaller.Console.exe list-vs-x86
2833
Lists all MSVC x86 toolset
2934
compilers found
@@ -32,6 +37,11 @@ LuaInstaller.Console.exe list-vs-x64
3237
Lists all MSVC x64 toolset
3338
compilers found
3439
40+
LuaInstaller.Console.exe list-win-sdk
41+
Lists all Windows SDK found
42+
for x64 on 64 Bit Operating
43+
Systems or x86 otherwise
44+
3545
LuaInstaller.Console.exe list-win-sdk-x86
3646
Lists all Windows SDK x86 found
3747
@@ -175,6 +185,17 @@ private static int Main(string[] args)
175185
}
176186
break;
177187
}
188+
case "list-vs":
189+
{
190+
IInstalledComponents components = new InstalledComponents();
191+
Architecture arch = Environment.Is64BitOperatingSystem ? Architecture.X64 : Architecture.X86;
192+
193+
foreach (VisualStudio vs in components.AllVisualStudioByArch(arch))
194+
{
195+
Write(vs.Version.ToString());
196+
}
197+
break;
198+
}
178199
case "list-vs-x86":
179200
{
180201
IInstalledComponents components = new InstalledComponents();
@@ -195,6 +216,17 @@ private static int Main(string[] args)
195216
}
196217
break;
197218
}
219+
case "list-win-sdk":
220+
{
221+
IInstalledComponents components = new InstalledComponents();
222+
Architecture arch = Environment.Is64BitOperatingSystem ? Architecture.X64 : Architecture.X86;
223+
224+
foreach (WindowsSdk sdk in components.AllWindowsSdkByArch(arch))
225+
{
226+
Write(sdk.Version.ToString());
227+
}
228+
break;
229+
}
198230
case "list-win-sdk-x86":
199231
{
200232
IInstalledComponents components = new InstalledComponents();

docs/LuaInstaller.Console.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ LuaInstaller.Console.exe list-lua
1414
Lists all Lua versions that this tool
1515
is able to build
1616
17+
LuaInstaller.Console.exe list-vs
18+
Lists all MSVC compilers found
19+
for x64 on 64 Bit Operating
20+
Systems or x86 otherwise.
21+
1722
LuaInstaller.Console.exe list-vs-x86
1823
Lists all MSVC x86 toolset
1924
compilers found
@@ -22,6 +27,11 @@ LuaInstaller.Console.exe list-vs-x64
2227
Lists all MSVC x64 toolset
2328
compilers found
2429
30+
LuaInstaller.Console.exe list-win-sdk
31+
Lists all Windows SDK found
32+
for x64 on 64 Bit Operating
33+
Systems or x86 otherwise
34+
2535
LuaInstaller.Console.exe list-win-sdk-x86
2636
Lists all Windows SDK x86 found
2737

0 commit comments

Comments
 (0)