From cfac2aa093183184f96d91528c43739c7f9d3f37 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Sep 2023 09:36:35 +0000 Subject: [PATCH 1/9] build(deps): bump deps/libtommath from `3746c58` to `8314bde` Bumps [deps/libtommath](https://github.com/libtom/libtommath) from `3746c58` to `8314bde`. - [Release notes](https://github.com/libtom/libtommath/releases) - [Commits](https://github.com/libtom/libtommath/compare/3746c58f29a1ebea15046932bbc9dacc35b4b214...8314bde5e5c8e5d9331460130a9d1066e324f091) --- updated-dependencies: - dependency-name: deps/libtommath dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- deps/libtommath | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/libtommath b/deps/libtommath index 3746c58f..8314bde5 160000 --- a/deps/libtommath +++ b/deps/libtommath @@ -1 +1 @@ -Subproject commit 3746c58f29a1ebea15046932bbc9dacc35b4b214 +Subproject commit 8314bde5e5c8e5d9331460130a9d1066e324f091 From aaf4960a15fec31f31185f5ebfdeccd9bece0cce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 10:02:37 +0000 Subject: [PATCH 2/9] build(deps): bump deps/GSL from `4300304` to `e64c97f` Bumps [deps/GSL](https://github.com/microsoft/GSL) from `4300304` to `e64c97f`. - [Release notes](https://github.com/microsoft/GSL/releases) - [Commits](https://github.com/microsoft/GSL/compare/4300304ef24c247b3db0255763f46b9f95c3a83d...e64c97fc2cfc11992098bb38eda932de275e3f4d) --- updated-dependencies: - dependency-name: deps/GSL dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- deps/GSL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/GSL b/deps/GSL index 4300304e..e64c97fc 160000 --- a/deps/GSL +++ b/deps/GSL @@ -1 +1 @@ -Subproject commit 4300304ef24c247b3db0255763f46b9f95c3a83d +Subproject commit e64c97fc2cfc11992098bb38eda932de275e3f4d From afb9e5da47b5b3882a9ec97f92f57e8c73a4aafd Mon Sep 17 00:00:00 2001 From: Louvenarde Date: Sat, 13 Jan 2024 18:08:06 +0100 Subject: [PATCH 3/9] Fixes for weapon writing --- src/Components/Modules/AssetInterfaces/IWeapon.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Components/Modules/AssetInterfaces/IWeapon.cpp b/src/Components/Modules/AssetInterfaces/IWeapon.cpp index e256ebcd..dc27bef7 100644 --- a/src/Components/Modules/AssetInterfaces/IWeapon.cpp +++ b/src/Components/Modules/AssetInterfaces/IWeapon.cpp @@ -396,6 +396,7 @@ namespace Assets continue; } + buffer->align(Utils::Stream::ALIGN_4); buffer->saveMax(sizeof(Game::snd_alias_list_t*)); buffer->saveString(def->bounceSound[i]->aliasName); } @@ -525,7 +526,7 @@ namespace Assets if (def->physCollmap) { - dest->physCollmap = builder->saveSubAsset(Game::XAssetType::ASSET_TYPE_PHYSCOLLMAP, def->overlayMaterialEMPLowRes).physCollmap; + dest->physCollmap = builder->saveSubAsset(Game::XAssetType::ASSET_TYPE_PHYSCOLLMAP, def->physCollmap).physCollmap; } if (def->projectileModel) From fea8a51abba674f3c61877b8c32c46c97b211fb8 Mon Sep 17 00:00:00 2001 From: Louvenarde Date: Sat, 13 Jan 2024 19:09:43 +0100 Subject: [PATCH 4/9] Fix sqr distance overflowing over 32 --- src/Components/Modules/Renderer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Components/Modules/Renderer.cpp b/src/Components/Modules/Renderer.cpp index 03cd72ca..191b82f5 100644 --- a/src/Components/Modules/Renderer.cpp +++ b/src/Components/Modules/Renderer.cpp @@ -382,7 +382,7 @@ namespace Components auto world = gfxAsset->asset.header.gfxWorld; auto drawDistance = r_playerDrawDebugDistance.get(); - auto sqrDist = drawDistance * drawDistance; + auto sqrDist = drawDistance * static_cast(drawDistance); switch (val) { From a39435f800096ad5ef4b72e9b0899baf94c9d1ec Mon Sep 17 00:00:00 2001 From: Louvenarde Date: Sat, 13 Jan 2024 19:12:11 +0100 Subject: [PATCH 5/9] Bump IW4OF --- deps/iw4-open-formats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/iw4-open-formats b/deps/iw4-open-formats index 700a2ae8..3468c066 160000 --- a/deps/iw4-open-formats +++ b/deps/iw4-open-formats @@ -1 +1 @@ -Subproject commit 700a2ae858c27568d95e21ce8c5f941d36c4a6c4 +Subproject commit 3468c0665c4d27e43b92945bcb295103394cdfd0 From 6be4b617b82415a9a9a2178e479b0cc9aa00b8c6 Mon Sep 17 00:00:00 2001 From: Louvenarde Date: Sat, 13 Jan 2024 20:10:26 +0100 Subject: [PATCH 6/9] Restore some code that was hastily removed, and add a warning for images of missing category --- src/Components/Modules/AssetHandler.cpp | 12 ++ src/Components/Modules/StructuredData.cpp | 159 +++++++++++++++++++++- 2 files changed, 167 insertions(+), 4 deletions(-) diff --git a/src/Components/Modules/AssetHandler.cpp b/src/Components/Modules/AssetHandler.cpp index ae538b8b..b76def14 100644 --- a/src/Components/Modules/AssetHandler.cpp +++ b/src/Components/Modules/AssetHandler.cpp @@ -224,6 +224,18 @@ namespace Components void AssetHandler::ModifyAsset(Game::XAssetType type, Game::XAssetHeader asset, const std::string& name) { +#ifdef DEBUG + if (type == Game::XAssetType::ASSET_TYPE_IMAGE && name[0] != ',') + { + const auto image = asset.image; + const auto cat = static_cast(image->category); + if (cat == Game::ImageCategory::IMG_CATEGORY_UNKNOWN) + { + Logger::Warning(Game::CON_CHANNEL_GFX, "Image {} has wrong category IMG_CATEGORY_UNKNOWN, this is an IMPORTANT ISSUE that should be fixed!\n", name); + } + } +#endif + if (type == Game::ASSET_TYPE_MATERIAL && (name == "gfx_distortion_knife_trail" || name == "gfx_distortion_heat_far" || name == "gfx_distortion_ring_light" || name == "gfx_distortion_heat") && asset.material->info.sortKey >= 43) { if (Zones::Version() >= VERSION_ALPHA2) diff --git a/src/Components/Modules/StructuredData.cpp b/src/Components/Modules/StructuredData.cpp index 7036559e..80a1fb8c 100644 --- a/src/Components/Modules/StructuredData.cpp +++ b/src/Components/Modules/StructuredData.cpp @@ -149,10 +149,161 @@ namespace Components { if (Dedicated::IsEnabled()) return; - // Correctly upgrade stats - Utils::Hook(0x42F088, StructuredData::UpdateVersionOffsets, HOOK_CALL).install()->quick(); + // Do not execute this when building zones + if (!ZoneBuilder::IsEnabled()) + { + // Correctly upgrade stats + Utils::Hook(0x42F088, StructuredData::UpdateVersionOffsets, HOOK_CALL).install()->quick(); - // 15 or more custom classes - Utils::Hook::Set(0x60A2FE, NUM_CUSTOM_CLASSES); + // 15 or more custom classes + Utils::Hook::Set(0x60A2FE, NUM_CUSTOM_CLASSES); + + return; + } + + + // TODO: Since all of the following is zonebuilder-only code, move it to IW4OF or IStructuredDataDefSet.cpp + AssetHandler::OnLoad([](Game::XAssetType type, Game::XAssetHeader asset, const std::string& filename, bool* /*restrict*/) + { + // Only intercept playerdatadef loading + if (type != Game::ASSET_TYPE_STRUCTURED_DATA_DEF || filename != "mp/playerdata.def") return; + + // Store asset + Game::StructuredDataDefSet* data = asset.structuredDataDefSet; + if (!data) return; + + if (data->defCount != 1) + { + Logger::Error(Game::ERR_FATAL, "PlayerDataDefSet contains more than 1 definition!"); + return; + } + + if (data->defs[0].version != 155) + { + Logger::Error(Game::ERR_FATAL, "Initial PlayerDataDef is not version 155, patching not possible!"); + return; + } + + std::unordered_map>> patchDefinitions; + std::unordered_map> otherPatchDefinitions; + + // First check if all versions are present + for (int i = 156;; ++i) + { + // We're on DB thread (OnLoad) so use DB thread for FS + FileSystem::File definition(std::format("{}/{}.json", filename, i), Game::FsThread::FS_THREAD_DATABASE); + if (!definition.exists()) break; + + std::vector> enumContainer; + std::unordered_map otherPatches; + + nlohmann::json defData; + try + { + defData = nlohmann::json::parse(definition.getBuffer()); + } + catch (const nlohmann::json::parse_error& ex) + { + Logger::PrintError(Game::CON_CHANNEL_ERROR, "JSON Parse Error: {}\n", ex.what()); + return; + } + + if (!defData.is_object()) + { + Logger::Error(Game::ERR_FATAL, "PlayerDataDef patch for version {} is invalid!", i); + return; + } + + for (auto pType = 0; pType < StructuredData::PlayerDataType::COUNT; ++pType) + { + auto enumData = defData[StructuredData::EnumTranslation[pType]]; + + std::vector entryData; + + if (enumData.is_array()) + { + for (const auto& rawEntry : enumData) + { + if (rawEntry.is_string()) + { + entryData.push_back(rawEntry.get()); + } + } + } + + enumContainer.push_back(entryData); + } + + auto other = defData["other"]; + + if (other.is_object()) + { + for (auto& item : other.items()) + { + if (item.value().is_string()) + { + otherPatches[item.key()] = item.value().get(); + } + } + } + + patchDefinitions[i] = enumContainer; + otherPatchDefinitions[i] = otherPatches; + } + + // Nothing to patch + if (patchDefinitions.empty()) return; + + // Reallocate the definition + auto* newData = StructuredData::MemAllocator.allocateArray(data->defCount + patchDefinitions.size()); + std::memcpy(&newData[patchDefinitions.size()], data->defs, sizeof Game::StructuredDataDef * data->defCount); + + // Prepare the buffers + for (unsigned int i = 0; i < patchDefinitions.size(); ++i) + { + std::memcpy(&newData[i], data->defs, sizeof Game::StructuredDataDef); + newData[i].version = (patchDefinitions.size() - i) + 155; + + // Reallocate the enum array + auto* newEnums = StructuredData::MemAllocator.allocateArray(data->defs->enumCount); + std::memcpy(newEnums, data->defs->enums, sizeof Game::StructuredDataEnum * data->defs->enumCount); + newData[i].enums = newEnums; + } + + // Apply new data + data->defs = newData; + data->defCount += patchDefinitions.size(); + + // Patch the definition + for (unsigned int i = 0; i < data->defCount; ++i) + { + // No need to patch version 155 + if (newData[i].version == 155) continue; + + if (patchDefinitions.contains(newData[i].version)) + { + auto patchData = patchDefinitions[newData[i].version]; + auto otherData = otherPatchDefinitions[newData[i].version]; + + // Invalid patch data + if (patchData.size() != StructuredData::PlayerDataType::COUNT) + { + Logger::Error(Game::ERR_FATAL, "PlayerDataDef patch for version {} wasn't parsed correctly!", newData[i].version); + continue; + } + + // Apply the patch data + for (auto pType = 0; pType < StructuredData::PlayerDataType::COUNT; ++pType) + { + if (!patchData[pType].empty()) + { + StructuredData::PatchPlayerDataEnum(&newData[i], static_cast(pType), patchData[pType]); + } + } + + StructuredData::PatchAdditionalData(&newData[i], otherData); + } + } + }); } } From 4badcdd0086f976d88c0b94e1abeaa8afd1fb29b Mon Sep 17 00:00:00 2001 From: Louvenarde Date: Sat, 13 Jan 2024 20:10:47 +0100 Subject: [PATCH 7/9] Bump IW4OF --- deps/iw4-open-formats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/iw4-open-formats b/deps/iw4-open-formats index 3468c066..f174f1c4 160000 --- a/deps/iw4-open-formats +++ b/deps/iw4-open-formats @@ -1 +1 @@ -Subproject commit 3468c0665c4d27e43b92945bcb295103394cdfd0 +Subproject commit f174f1c4c4c465c337166b92e03b355695c5bc93 From 70f34a93192dda647a9a5937b48109c7bf2d47e1 Mon Sep 17 00:00:00 2001 From: Louvenarde Date: Sat, 13 Jan 2024 21:10:15 +0100 Subject: [PATCH 8/9] No structured data shenanigans while dumping --- src/Components/Modules/StructuredData.cpp | 232 +++++++++++----------- src/Components/Modules/ZoneBuilder.hpp | 3 +- 2 files changed, 120 insertions(+), 115 deletions(-) diff --git a/src/Components/Modules/StructuredData.cpp b/src/Components/Modules/StructuredData.cpp index 80a1fb8c..34f9e6c9 100644 --- a/src/Components/Modules/StructuredData.cpp +++ b/src/Components/Modules/StructuredData.cpp @@ -73,12 +73,12 @@ namespace Components // Sort alphabetically qsort(indices, dataVector.size(), sizeof(Game::StructuredDataEnumEntry), [](void const* first, void const* second) - { - const Game::StructuredDataEnumEntry* entry1 = reinterpret_cast(first); - const Game::StructuredDataEnumEntry* entry2 = reinterpret_cast(second); + { + const Game::StructuredDataEnumEntry* entry1 = reinterpret_cast(first); + const Game::StructuredDataEnumEntry* entry2 = reinterpret_cast(second); - return std::string(entry1->string).compare(entry2->string); - }); + return std::string(entry1->string).compare(entry2->string); + }); // Apply our patches dataEnum->entryCount = dataVector.size(); @@ -117,7 +117,7 @@ namespace Components } } - bool StructuredData::UpdateVersionOffsets(Game::StructuredDataDefSet *set, Game::StructuredDataBuffer *buffer, Game::StructuredDataDef *whatever) + bool StructuredData::UpdateVersionOffsets(Game::StructuredDataDefSet* set, Game::StructuredDataBuffer* buffer, Game::StructuredDataDef* whatever) { Game::StructuredDataDef* newDef = &set->defs[0]; Game::StructuredDataDef* oldDef = &set->defs[0]; @@ -164,146 +164,150 @@ namespace Components // TODO: Since all of the following is zonebuilder-only code, move it to IW4OF or IStructuredDataDefSet.cpp AssetHandler::OnLoad([](Game::XAssetType type, Game::XAssetHeader asset, const std::string& filename, bool* /*restrict*/) - { - // Only intercept playerdatadef loading - if (type != Game::ASSET_TYPE_STRUCTURED_DATA_DEF || filename != "mp/playerdata.def") return; - - // Store asset - Game::StructuredDataDefSet* data = asset.structuredDataDefSet; - if (!data) return; - - if (data->defCount != 1) { - Logger::Error(Game::ERR_FATAL, "PlayerDataDefSet contains more than 1 definition!"); - return; - } - - if (data->defs[0].version != 155) - { - Logger::Error(Game::ERR_FATAL, "Initial PlayerDataDef is not version 155, patching not possible!"); - return; - } - - std::unordered_map>> patchDefinitions; - std::unordered_map> otherPatchDefinitions; - - // First check if all versions are present - for (int i = 156;; ++i) - { - // We're on DB thread (OnLoad) so use DB thread for FS - FileSystem::File definition(std::format("{}/{}.json", filename, i), Game::FsThread::FS_THREAD_DATABASE); - if (!definition.exists()) break; - - std::vector> enumContainer; - std::unordered_map otherPatches; - - nlohmann::json defData; - try - { - defData = nlohmann::json::parse(definition.getBuffer()); - } - catch (const nlohmann::json::parse_error& ex) - { - Logger::PrintError(Game::CON_CHANNEL_ERROR, "JSON Parse Error: {}\n", ex.what()); + if (ZoneBuilder::IsDumpingZone()) { return; } - if (!defData.is_object()) + // Only intercept playerdatadef loading + if (type != Game::ASSET_TYPE_STRUCTURED_DATA_DEF || filename != "mp/playerdata.def") return; + + // Store asset + Game::StructuredDataDefSet* data = asset.structuredDataDefSet; + if (!data) return; + + if (data->defCount != 1) { - Logger::Error(Game::ERR_FATAL, "PlayerDataDef patch for version {} is invalid!", i); + Logger::Error(Game::ERR_FATAL, "PlayerDataDefSet contains more than 1 definition!"); return; } - for (auto pType = 0; pType < StructuredData::PlayerDataType::COUNT; ++pType) + if (data->defs[0].version != 155) { - auto enumData = defData[StructuredData::EnumTranslation[pType]]; + Logger::Error(Game::ERR_FATAL, "Initial PlayerDataDef is not version 155, patching not possible!"); + return; + } - std::vector entryData; + std::unordered_map>> patchDefinitions; + std::unordered_map> otherPatchDefinitions; - if (enumData.is_array()) + // First check if all versions are present + for (int i = 156;; ++i) + { + // We're on DB thread (OnLoad) so use DB thread for FS + FileSystem::File definition(std::format("{}/{}.json", filename, i), Game::FsThread::FS_THREAD_DATABASE); + if (!definition.exists()) break; + + std::vector> enumContainer; + std::unordered_map otherPatches; + + nlohmann::json defData; + try { - for (const auto& rawEntry : enumData) + defData = nlohmann::json::parse(definition.getBuffer()); + } + catch (const nlohmann::json::parse_error& ex) + { + Logger::PrintError(Game::CON_CHANNEL_ERROR, "JSON Parse Error: {}\n", ex.what()); + return; + } + + if (!defData.is_object()) + { + Logger::Error(Game::ERR_FATAL, "PlayerDataDef patch for version {} is invalid!", i); + return; + } + + for (auto pType = 0; pType < StructuredData::PlayerDataType::COUNT; ++pType) + { + auto enumData = defData[StructuredData::EnumTranslation[pType]]; + + std::vector entryData; + + if (enumData.is_array()) { - if (rawEntry.is_string()) + for (const auto& rawEntry : enumData) { - entryData.push_back(rawEntry.get()); + if (rawEntry.is_string()) + { + entryData.push_back(rawEntry.get()); + } + } + } + + enumContainer.push_back(entryData); + } + + auto other = defData["other"]; + + if (other.is_object()) + { + for (auto& item : other.items()) + { + if (item.value().is_string()) + { + otherPatches[item.key()] = item.value().get(); } } } - enumContainer.push_back(entryData); + patchDefinitions[i] = enumContainer; + otherPatchDefinitions[i] = otherPatches; } - auto other = defData["other"]; + // Nothing to patch + if (patchDefinitions.empty()) return; - if (other.is_object()) + // Reallocate the definition + auto* newData = StructuredData::MemAllocator.allocateArray(data->defCount + patchDefinitions.size()); + std::memcpy(&newData[patchDefinitions.size()], data->defs, sizeof Game::StructuredDataDef * data->defCount); + + // Prepare the buffers + for (unsigned int i = 0; i < patchDefinitions.size(); ++i) { - for (auto& item : other.items()) - { - if (item.value().is_string()) - { - otherPatches[item.key()] = item.value().get(); - } - } + std::memcpy(&newData[i], data->defs, sizeof Game::StructuredDataDef); + newData[i].version = (patchDefinitions.size() - i) + 155; + + // Reallocate the enum array + auto* newEnums = StructuredData::MemAllocator.allocateArray(data->defs->enumCount); + std::memcpy(newEnums, data->defs->enums, sizeof Game::StructuredDataEnum * data->defs->enumCount); + newData[i].enums = newEnums; } - patchDefinitions[i] = enumContainer; - otherPatchDefinitions[i] = otherPatches; - } + // Apply new data + data->defs = newData; + data->defCount += patchDefinitions.size(); - // Nothing to patch - if (patchDefinitions.empty()) return; - - // Reallocate the definition - auto* newData = StructuredData::MemAllocator.allocateArray(data->defCount + patchDefinitions.size()); - std::memcpy(&newData[patchDefinitions.size()], data->defs, sizeof Game::StructuredDataDef * data->defCount); - - // Prepare the buffers - for (unsigned int i = 0; i < patchDefinitions.size(); ++i) - { - std::memcpy(&newData[i], data->defs, sizeof Game::StructuredDataDef); - newData[i].version = (patchDefinitions.size() - i) + 155; - - // Reallocate the enum array - auto* newEnums = StructuredData::MemAllocator.allocateArray(data->defs->enumCount); - std::memcpy(newEnums, data->defs->enums, sizeof Game::StructuredDataEnum * data->defs->enumCount); - newData[i].enums = newEnums; - } - - // Apply new data - data->defs = newData; - data->defCount += patchDefinitions.size(); - - // Patch the definition - for (unsigned int i = 0; i < data->defCount; ++i) - { - // No need to patch version 155 - if (newData[i].version == 155) continue; - - if (patchDefinitions.contains(newData[i].version)) + // Patch the definition + for (unsigned int i = 0; i < data->defCount; ++i) { - auto patchData = patchDefinitions[newData[i].version]; - auto otherData = otherPatchDefinitions[newData[i].version]; + // No need to patch version 155 + if (newData[i].version == 155) continue; - // Invalid patch data - if (patchData.size() != StructuredData::PlayerDataType::COUNT) + if (patchDefinitions.contains(newData[i].version)) { - Logger::Error(Game::ERR_FATAL, "PlayerDataDef patch for version {} wasn't parsed correctly!", newData[i].version); - continue; - } + auto patchData = patchDefinitions[newData[i].version]; + auto otherData = otherPatchDefinitions[newData[i].version]; - // Apply the patch data - for (auto pType = 0; pType < StructuredData::PlayerDataType::COUNT; ++pType) - { - if (!patchData[pType].empty()) + // Invalid patch data + if (patchData.size() != StructuredData::PlayerDataType::COUNT) { - StructuredData::PatchPlayerDataEnum(&newData[i], static_cast(pType), patchData[pType]); + Logger::Error(Game::ERR_FATAL, "PlayerDataDef patch for version {} wasn't parsed correctly!", newData[i].version); + continue; } - } - StructuredData::PatchAdditionalData(&newData[i], otherData); + // Apply the patch data + for (auto pType = 0; pType < StructuredData::PlayerDataType::COUNT; ++pType) + { + if (!patchData[pType].empty()) + { + StructuredData::PatchPlayerDataEnum(&newData[i], static_cast(pType), patchData[pType]); + } + } + + StructuredData::PatchAdditionalData(&newData[i], otherData); + } } - } - }); + }); } } diff --git a/src/Components/Modules/ZoneBuilder.hpp b/src/Components/Modules/ZoneBuilder.hpp index c6fb46b6..1450faef 100644 --- a/src/Components/Modules/ZoneBuilder.hpp +++ b/src/Components/Modules/ZoneBuilder.hpp @@ -129,6 +129,7 @@ namespace Components #endif static bool IsEnabled(); + static bool IsDumpingZone() { return DumpingZone.length() > 0; }; static std::string TraceZone; static std::vector> TraceAssets; @@ -142,7 +143,7 @@ namespace Components static iw4of::api* GetExporter(); private: - static int StoreTexture(Game::GfxImageLoadDef **loadDef, Game::GfxImage *image); + static int StoreTexture(Game::GfxImageLoadDef** loadDef, Game::GfxImage* image); static void ReleaseTexture(Game::XAssetHeader header); static std::string FindMaterialByTechnique(const std::string& name); From 90dacd70b2eec75c3fadd4ea26578cdea194341d Mon Sep 17 00:00:00 2001 From: Louve <33836535+Rackover@users.noreply.github.com> Date: Sat, 20 Jan 2024 12:51:33 +0100 Subject: [PATCH 9/9] Update build.yml --- .github/workflows/build.yml | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f3692290..f102479a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,30 +51,3 @@ jobs: build/bin/Win32/${{matrix.configuration}}/iw4x.dll build/bin/Win32/${{matrix.configuration}}/iw4x.pdb - deploy: - name: Deploy artifacts - needs: build - runs-on: ubuntu-latest - if: github.event_name == 'push' && (github.ref == 'refs/heads/develop') - steps: - - name: Setup develop environment - if: github.ref == 'refs/heads/develop' - run: echo "DIAMANTE_MASTER_PATH=${{ secrets.DIAMANTE_MASTER_SSH_PATH }}" >> $GITHUB_ENV - - - name: Download Release binaries - uses: actions/download-artifact@v3.0.2 - with: - name: Release binaries - - # Set up committer info and GPG key - - name: Install SSH key - uses: shimataro/ssh-key-action@v2.5.1 - with: - key: ${{ secrets.DIAMANTE_MASTER_SSH_PRIVATE_KEY }} - known_hosts: 'just-a-placeholder-so-we-dont-get-errors' - - - name: Add known hosts - run: ssh-keyscan -H ${{ secrets.DIAMANTE_MASTER_SSH_ADDRESS }} >> ~/.ssh/known_hosts - - - name: Upload iw4x-client binary - run: rsync -avz iw4x.dll ${{ secrets.DIAMANTE_MASTER_SSH_USER }}@${{ secrets.DIAMANTE_MASTER_SSH_ADDRESS }}:${{ env.DIAMANTE_MASTER_PATH }}/legacy/