From beabaa611cf69e199a06b86f7ea6c60e085bd1a9 Mon Sep 17 00:00:00 2001 From: Beernaert Robbe Date: Sat, 21 Mar 2026 11:52:02 +0100 Subject: [PATCH 1/4] fix: copy premake5.lua from local index --- premake-manager-cli/src/common-index/CommonIndex.cs | 8 ++++---- premake-manager-cli/src/libraries/LibraryManager.cs | 2 +- premake-manager-cli/src/utils/ExtractUtils.cs | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/premake-manager-cli/src/common-index/CommonIndex.cs b/premake-manager-cli/src/common-index/CommonIndex.cs index 96ad9fc..f272af9 100644 --- a/premake-manager-cli/src/common-index/CommonIndex.cs +++ b/premake-manager-cli/src/common-index/CommonIndex.cs @@ -40,12 +40,12 @@ public static void WriteFileIndex(IndexView index, string filePath = "premakeInd public static MemoryStream? ReadLibraryFile(IndexView index, GithubRepo repo) { - if (index.libraries.TryGetValue(repo.owner, out IList? libraries)) + if (index.libraries.TryGetValue(repo.owner.ToLower(), out IList? libraries)) { - if (null == libraries.Where((lib) => lib.name == repo.name).FirstOrDefault()) + if (null == libraries.Where((lib) => lib.name.ToLower() == repo.name.ToLower()).FirstOrDefault()) return null; GithubRepo remote = Github.GetRepoFromLink(index.remote); - return ExtractUtils.ReadFile(PathUtils.GetRemotePath(remote.owner, remote.name), $"{repo}-main/libraries/{repo.owner}/{repo.name}/premake5.lua".ToLower()); + return ExtractUtils.ReadFile(PathUtils.GetRemotePath(remote.owner, remote.name), $"{remote.name}-main/libraries/{repo.owner}/{repo.name}/premake5.lua".ToLower()); } return null; //could not find library. } @@ -73,7 +73,7 @@ public static async Task ExtractLibraryFile(IndexView index, GithubRepo re MemoryStream? stream = ReadLibraryFile(index, repo); if (stream == null) return false; - using (FileStream libraryFile = File.OpenWrite(await LibraryManager.GetLibraryPath(repo))) + using (FileStream libraryFile = File.OpenWrite(Path.Combine((await LibraryManager.GetLibraryPath(repo)).ToLower(), "premake5.lua"))) { stream.WriteTo(libraryFile); } diff --git a/premake-manager-cli/src/libraries/LibraryManager.cs b/premake-manager-cli/src/libraries/LibraryManager.cs index 8519508..82b70c0 100644 --- a/premake-manager-cli/src/libraries/LibraryManager.cs +++ b/premake-manager-cli/src/libraries/LibraryManager.cs @@ -104,7 +104,7 @@ public static async Task InstallLibraryCtx(ProgressContext ctx, string githubLin string downloadUrl = await ResolveDownloadUrl(repo, version); await DownloadUtils.DownloadProgressCtx(ctx, downloadUrl, $"downloading {libconfig.name} library", Path.Combine(PathUtils.GetTempModulePath(repo.name), $"{repo.name}.zip")); - await ExtractUtils.ExtractZipProgressCtx(ctx, Path.Combine(PathUtils.GetTempModulePath(repo.name), $"{repo.name}.zip"), await GetLibraryPath(repo), $"extracting {libconfig.name}"); + await ExtractUtils.ExtractZipProgressCtx(ctx, Path.Combine(PathUtils.GetTempModulePath(repo.name), $"{repo.name}.zip"), (await GetLibraryPath(repo)).ToLower(), $"extracting {libconfig.name}"); await RemotesManager.InstallRemotesLibrary(repo); } diff --git a/premake-manager-cli/src/utils/ExtractUtils.cs b/premake-manager-cli/src/utils/ExtractUtils.cs index 715c538..e447cb5 100644 --- a/premake-manager-cli/src/utils/ExtractUtils.cs +++ b/premake-manager-cli/src/utils/ExtractUtils.cs @@ -111,6 +111,7 @@ await AnsiConsole.Progress() public static async Task ExtractZipProgressCtx(ProgressContext ctx, string sourcePath, string destinationExtractDirectory, string description, bool deleteSource = true) { + ProgressTask extractTask = ctx.AddTask($"[green]{description}[/]"); ProgressTaskSettings settings = new(); From 200f38a90a1010e09b26422ffc448d763b8ce4ab Mon Sep 17 00:00:00 2001 From: Beernaert Robbe Date: Sat, 21 Mar 2026 12:02:19 +0100 Subject: [PATCH 2/4] fix: updated actions to vs2026 --- .github/workflows/build-and-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 795b936..cfb1443 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -30,13 +30,13 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v5 with: - dotnet-version: '9.0.x' + dotnet-version: '10.0.x' cache: true cache-dependency-path: ${{ github.workspace }}/premake-manager-cli - name: Installing premake5 uses: Jarod42/install-premake5@v6 - name: run premake5 - run: premake5 vs2022 + run: premake5 vs2026 - name: Install dependencies run: dotnet restore ${{ github.workspace }} From 4ab1b026c12cb46f66654b773d1757ba3293ad3e Mon Sep 17 00:00:00 2001 From: Beernaert Robbe Date: Sun, 29 Mar 2026 22:54:44 +0200 Subject: [PATCH 3/4] feat: added setincludedirs to premake system --- premake-manager-cli/src/main.cs | 9 --------- premake-manager-cli/src/utils/PremakeSystem.cs | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/premake-manager-cli/src/main.cs b/premake-manager-cli/src/main.cs index 8c7e06f..ae404f5 100644 --- a/premake-manager-cli/src/main.cs +++ b/premake-manager-cli/src/main.cs @@ -15,7 +15,6 @@ public class main { static async Task Main(string[] args) { - string sessionToken = ""; #if DEBUG bool interactive = true; #else @@ -27,14 +26,6 @@ static async Task Main(string[] args) { interactive = true; } - if (arg.StartsWith("--session=")) - { - // Extracts the part after "--session=" - sessionToken = arg.Substring("--session=".Length).Trim('"'); - await Github.SetSession(sessionToken); - - } - } diff --git a/premake-manager-cli/src/utils/PremakeSystem.cs b/premake-manager-cli/src/utils/PremakeSystem.cs index 06b446e..ecff53f 100644 --- a/premake-manager-cli/src/utils/PremakeSystem.cs +++ b/premake-manager-cli/src/utils/PremakeSystem.cs @@ -24,6 +24,8 @@ public static void Write(Config config, PremakeLibrary[] libraries, PremakeModul AddPath(config.LibrariesPath,"libraries"); AddLibs(libraries); AddModules(modules); + AddIncludeDirsSetFunction(); + AddIncludeDirs(); File.WriteAllText("premake-system.lua", string.Join("\n", content)); } static void AddDisclaimer() @@ -76,5 +78,21 @@ static void AddModulesEnd() { content.Add($"}}"); } + static void AddIncludeDirsSetFunction() + { + content.Add(@" + local function setincludedirs(name, path) + IncludeDirs = IncludeDirs or {} + local cleanName = string.gsub(name, ""-"", ""_"") + IncludeDirs[cleanName] = _SCRIPT_DIR .. ""/"" .. path + end + "); + + content.Add("_G.setincludedirs = setincludedirs"); + } + static void AddIncludeDirs() + { + content.Add("_G.IncludeDirs = {}"); + } } } From e0e0d059ef4d9a6d492212bad74a1bc2a28963fc Mon Sep 17 00:00:00 2001 From: Beernaert Robbe Date: Sun, 29 Mar 2026 22:59:00 +0200 Subject: [PATCH 4/4] fix: system writer cleanup --- premake-manager-cli/src/utils/PremakeSystem.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/premake-manager-cli/src/utils/PremakeSystem.cs b/premake-manager-cli/src/utils/PremakeSystem.cs index ecff53f..9af15f9 100644 --- a/premake-manager-cli/src/utils/PremakeSystem.cs +++ b/premake-manager-cli/src/utils/PremakeSystem.cs @@ -81,12 +81,13 @@ static void AddModulesEnd() static void AddIncludeDirsSetFunction() { content.Add(@" - local function setincludedirs(name, path) - IncludeDirs = IncludeDirs or {} - local cleanName = string.gsub(name, ""-"", ""_"") - IncludeDirs[cleanName] = _SCRIPT_DIR .. ""/"" .. path - end - "); +---INCLUDE_DIRS--- +local function setincludedirs(name, path) + IncludeDirs = IncludeDirs or {} + local cleanName = string.gsub(name, ""-"", ""_"") + IncludeDirs[cleanName] = _SCRIPT_DIR .. ""/"" .. path +end +"); content.Add("_G.setincludedirs = setincludedirs"); }