Skip to content

Commit 21a2006

Browse files
committed
this is a stupid hack but i'm too tired to keep trying to figure out how we're linking everything
1 parent 6c67709 commit 21a2006

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/resource/archive/OtrArchive.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,16 @@ std::shared_ptr<ResourceInitData> OtrArchive::LoadFileMeta(uint64_t hash) {
6464
return nullptr;
6565
}
6666

67+
// i think there's a way to get the SFileCreateArchive symbol to link
68+
// by using --whole-archive or something but i'm really lost trying to
69+
// figure that out. it isn't a problem when just building OTRExporter
70+
// for the ExtractAssets target in SoH (that works without this), but when
71+
// trying to build SoH itself this symbol is not found. this is a stupid
72+
// hack to get it to build.
73+
void OtrArchive::BlargBecauseLinker() {
74+
SFileCreateArchive("", 0, 0, nullptr);
75+
}
76+
6777
bool OtrArchive::LoadRaw() {
6878
const bool opened = SFileOpenArchive(GetPath().c_str(), 0, MPQ_OPEN_READ_ONLY, &mHandle);
6979
if (opened) {

src/resource/archive/OtrArchive.h

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ class OtrArchive : virtual public Archive {
2929
std::shared_ptr<File> LoadFileRaw(const std::string& filePath);
3030
std::shared_ptr<File> LoadFileRaw(uint64_t hash);
3131

32+
void BlargBecauseLinker();
33+
3234
protected:
3335
std::shared_ptr<ResourceInitData> LoadFileMeta(const std::string& filePath);
3436
std::shared_ptr<ResourceInitData> LoadFileMeta(uint64_t hash);

0 commit comments

Comments
 (0)