diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 00f9029..c03a4e7 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -24,10 +24,10 @@ jobs: fetch-depth: 0 - name: Create channel file - run: echo ${{ env.BME_CHANNEL }} > ./installer/source/bme/bme_channel.txt + run: echo "${{ env.BME_CHANNEL }}" | Out-File -Encoding ascii ./installer/source/bme/bme_channel.txt -NoNewline - name: Override version file (release only) if: github.event_name == 'workflow_dispatch' - run: echo ${{ inputs.version }} > ./bme_version.txt + run: echo "${{ inputs.version }}" | Out-File -Encoding ascii ./bme_version.txt -NoNewline - name: Add msbuild to PATH uses: microsoft/setup-msbuild@v2 diff --git a/bmedll/FileSystemManager.cpp b/bmedll/FileSystemManager.cpp index 2230a40..4a1b4f6 100644 --- a/bmedll/FileSystemManager.cpp +++ b/bmedll/FileSystemManager.cpp @@ -85,8 +85,6 @@ FileSystemManager::FileSystemManager(const std::string& basePath) m_compiledPath = m_basePath / "r1_modsrc"; m_dumpPath = m_basePath / "assets_dump"; m_modsPath = m_basePath / "mods"; - m_savesPath = m_basePath / "saves"; - m_spawnlistsPath = m_basePath / "spawnlists"; if (!fs::exists(m_bspPath)) m_logger->error("bsp file does not exist at: {}", m_bspPath.string().c_str()); @@ -170,8 +168,6 @@ void FileSystemManager::EnsurePathsCreated() fs::create_directories(m_dumpPath); fs::create_directories(m_compiledPath); fs::create_directories(m_modsPath); - fs::create_directories(m_savesPath); - fs::create_directories(m_spawnlistsPath); } // TODO: Do we maybe need to add the search path in a frame hook or will this do? @@ -540,13 +536,3 @@ const fs::path& FileSystemManager::GetCompilePath() { return m_compiledPath; } - -const fs::path& FileSystemManager::GetSavesPath() -{ - return m_savesPath; -} - -const fs::path& FileSystemManager::GetSpawnlistsPath() -{ - return m_spawnlistsPath; -} \ No newline at end of file diff --git a/bmedll/FileSystemManager.h b/bmedll/FileSystemManager.h index 57fda6b..8d88dbf 100644 --- a/bmedll/FileSystemManager.h +++ b/bmedll/FileSystemManager.h @@ -15,8 +15,6 @@ class FileSystemManager fs::path m_compiledPath; fs::path m_dumpPath; fs::path m_modsPath; - fs::path m_savesPath; - fs::path m_spawnlistsPath; std::vector m_mapVPKs; std::vector m_mapNames; std::string m_lastMapReadFrom; @@ -51,6 +49,4 @@ class FileSystemManager const fs::path& GetBasePath(); const fs::path& GetModsPath(); const fs::path& GetCompilePath(); - const fs::path& GetSavesPath(); - const fs::path& GetSpawnlistsPath(); }; \ No newline at end of file diff --git a/bmedll/TTFSDK.cpp b/bmedll/TTFSDK.cpp index 66048b7..338adfd 100644 --- a/bmedll/TTFSDK.cpp +++ b/bmedll/TTFSDK.cpp @@ -109,6 +109,13 @@ const std::string GetBMEChannel() chan = sstr.str(); } else chan = std::string(BME_CHANNEL); + const auto rtrim = [](std::string_view str) -> std::string_view + { + const auto pos(str.find_last_not_of(" \t\n\r\f\v")); + str.remove_suffix(std::min(str.length() - pos - 1, str.length())); + return str; + }; + chan = rtrim(chan); return chan; }