From 5aa97db8289b04aefaaad029f13a113d6fffcd56 Mon Sep 17 00:00:00 2001
From: acidicoala <67734819+acidicoala@users.noreply.github.com>
Date: Fri, 26 Dec 2025 19:38:24 +0500
Subject: [PATCH] Fix steamworks downloader
---
.idea/SmokeAPI.iml | 2 +-
.idea/runConfigurations/linux_exports_generator__32_.xml | 2 +-
.idea/runConfigurations/linux_exports_generator__64_.xml | 2 +-
.idea/runConfigurations/steamworks_downloader__prompt_.xml | 2 +-
.idea/runConfigurations/steamworks_parser.xml | 2 +-
.idea/runConfigurations/sync.xml | 2 +-
.idea/runConfigurations/windows_exports_generator__64_.xml | 2 +-
tools/CMakeLists.txt | 5 +++++
tools/src/steamworks_downloader.cpp | 4 +++-
9 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/.idea/SmokeAPI.iml b/.idea/SmokeAPI.iml
index f08604b..4c94235 100644
--- a/.idea/SmokeAPI.iml
+++ b/.idea/SmokeAPI.iml
@@ -1,2 +1,2 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/linux_exports_generator__32_.xml b/.idea/runConfigurations/linux_exports_generator__32_.xml
index 977b509..74650f1 100644
--- a/.idea/runConfigurations/linux_exports_generator__32_.xml
+++ b/.idea/runConfigurations/linux_exports_generator__32_.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/.idea/runConfigurations/linux_exports_generator__64_.xml b/.idea/runConfigurations/linux_exports_generator__64_.xml
index 8c6bf6a..180ff54 100644
--- a/.idea/runConfigurations/linux_exports_generator__64_.xml
+++ b/.idea/runConfigurations/linux_exports_generator__64_.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/.idea/runConfigurations/steamworks_downloader__prompt_.xml b/.idea/runConfigurations/steamworks_downloader__prompt_.xml
index a774a35..75bb294 100644
--- a/.idea/runConfigurations/steamworks_downloader__prompt_.xml
+++ b/.idea/runConfigurations/steamworks_downloader__prompt_.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/.idea/runConfigurations/steamworks_parser.xml b/.idea/runConfigurations/steamworks_parser.xml
index 504d4c0..2a728c4 100644
--- a/.idea/runConfigurations/steamworks_parser.xml
+++ b/.idea/runConfigurations/steamworks_parser.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/.idea/runConfigurations/sync.xml b/.idea/runConfigurations/sync.xml
index f50d6ec..c4e21d1 100644
--- a/.idea/runConfigurations/sync.xml
+++ b/.idea/runConfigurations/sync.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/.idea/runConfigurations/windows_exports_generator__64_.xml b/.idea/runConfigurations/windows_exports_generator__64_.xml
index e4b4d6d..5d96401 100644
--- a/.idea/runConfigurations/windows_exports_generator__64_.xml
+++ b/.idea/runConfigurations/windows_exports_generator__64_.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index f7c55a9..f857fbc 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -7,6 +7,11 @@ project(SmokeAPITools LANGUAGES CXX)
add_executable(steamworks_downloader src/steamworks_downloader.cpp)
target_link_libraries(steamworks_downloader PRIVATE KoalaBoxTools)
+# TODO: Deduplicate this from Koalabox/CMakeLists.txt
+## https://github.com/serge1/ELFIO
+CPMAddPackage("gh:serge1/ELFIO#Release_3.12")
+target_link_libraries(steamworks_downloader PUBLIC elfio)
+
### Steamworks Parser executable
add_executable(steamworks_parser src/steamworks_parser.cpp)
diff --git a/tools/src/steamworks_downloader.cpp b/tools/src/steamworks_downloader.cpp
index 5f1f188..3642679 100644
--- a/tools/src/steamworks_downloader.cpp
+++ b/tools/src/steamworks_downloader.cpp
@@ -93,6 +93,7 @@ namespace {
kb::tools::zip::extract_files(
zip_file_path,
[&](const std::string& name, const bool) {
+ // C/C++ headers
if(name.starts_with("sdk/public/steam/") && name.ends_with(".h")) {
return unzip_dir / "headers/steam" / fs::path(name).filename();
}
@@ -108,7 +109,8 @@ namespace {
// Linux binaries
if(
- name.starts_with("sdk/redistributable_bin/linux") &&
+ name.starts_with("sdk/redistributable_bin/linux32") &&
+ !name.contains("linuxarm") &&
name.ends_with("libsteam_api.so")
) {
return unzip_dir / "binaries" / name.substr(name.find("linux"));