Open chknatwork opened 1 year ago
If it helps, I currently have wxwidgets 3.2.2.1, Ninja 1.11.1, Meson 1.2.1, Cmake 3.27.6, and gcc 13.2.1 installed from EndeavourOS repo and the AUR.
IIRC I was just good with cmake and msvc. Maybe give a check to the other forks contributions.
IIRC I was just good with cmake and msvc. Maybe give a check to the other forks contributions.
I assume msvc is part of Windows development. I guess you mean you were able to compile it under Windows?
I'm also having issues on Arch Linux:
-- Generating done (0.0s)
-- Build files have been written to: /space/tom/.yay-builds/patchergui/src/patchergui/UPKUtils/build
[ 2%] Building CXX object CMakeFiles/ModParser.dir/space/tom/.yay-builds/patchergui/src/patchergui/UPKUtils/ModParser.cpp.o
/space/tom/.yay-builds/patchergui/src/patchergui/UPKUtils/ModParser.cpp: In function ‘std::string MakeTextBlock(char*, size_t)’:
/space/tom/.yay-builds/patchergui/src/patchergui/UPKUtils/ModParser.cpp:50:9: error: ‘uint8_t’ was not declared in this scope
50 | uint8_t ch = data[i];
| ^~~~~~~
/space/tom/.yay-builds/patchergui/src/patchergui/UPKUtils/ModParser.cpp:7:1: note: ‘uint8_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
6 | #include <cctype>
+++ |+#include <cstdint>
7 |
/space/tom/.yay-builds/patchergui/src/patchergui/UPKUtils/ModParser.cpp:51:16: error: expected ‘;’ before ‘up’
51 | uint8_t up = ((ch & 0xF0) >> 4);
| ^~~
| ;
/space/tom/.yay-builds/patchergui/src/patchergui/UPKUtils/ModParser.cpp:52:16: error: expected ‘;’ before ‘lw’
52 | uint8_t lw = (ch & 0x0F);
| ^~~
| ;
/space/tom/.yay-builds/patchergui/src/patchergui/UPKUtils/ModParser.cpp:53:25: error: ‘up’ was not declared in this scope
53 | out += chLookup[up];
| ^~
/space/tom/.yay-builds/patchergui/src/patchergui/UPKUtils/ModParser.cpp:54:25: error: ‘lw’ was not declared in this scope
54 | out += chLookup[lw];
| ^~
Adding #include <cstdint>
to ModParser.cpp
seems to fix the compile issues, but then I get these linking errors:
[ 55%] Linking CXX executable CompareUPK
/usr/bin/ld: libUPKInfo.a(UPKInfo.cpp.o): in function `UPKInfo::FormatName[abi:cxx11](unsigned int, bool)':
UPKInfo.cpp:(.text+0x1c0e): undefined reference to `FormatHEX[abi:cxx11](unsigned int)'
/usr/bin/ld: UPKInfo.cpp:(.text+0x1c7b): undefined reference to `FormatHEX[abi:cxx11](char*, unsigned long)'
/usr/bin/ld: UPKInfo.cpp:(.text+0x1d5b): undefined reference to `FormatHEX[abi:cxx11](unsigned int)'
/usr/bin/ld: UPKInfo.cpp:(.text+0x1dd5): undefined reference to `FormatHEX[abi:cxx11](unsigned int)'
/usr/bin/ld: libUPKInfo.a(UPKInfo.cpp.o): in function `UPKInfo::FormatCompressedHeader[abi:cxx11]()':
UPKInfo.cpp:(.text+0x2707): undefined reference to `FormatHEX[abi:cxx11](unsigned int)'
/usr/bin/ld: libUPKInfo.a(UPKInfo.cpp.o): in function `UPKInfo::FormatSummary[abi:cxx11]()':
UPKInfo.cpp:(.text+0x30f0): undefined reference to `FormatHEX[abi:cxx11](unsigned int)'
/usr/bin/ld: UPKInfo.cpp:(.text+0x3263): undefined reference to `FormatHEX[abi:cxx11](unsigned int)'
/usr/bin/ld: libUPKInfo.a(UPKInfo.cpp.o):UPKInfo.cpp:(.text+0x336a): more undefined references to `FormatHEX[abi:cxx11](unsigned int)' follow
/usr/bin/ld: libUPKInfo.a(UPKInfo.cpp.o): in function `UPKInfo::FormatSummary[abi:cxx11]()':
UPKInfo.cpp:(.text+0x33de): undefined reference to `FormatPackageFlags[abi:cxx11](unsigned int)'
/usr/bin/ld: UPKInfo.cpp:(.text+0x348b): undefined reference to `FormatHEX[abi:cxx11](unsigned int)'
/usr/bin/ld: UPKInfo.cpp:(.text+0x3577): undefined reference to `FormatHEX[abi:cxx11](unsigned int)'
/usr/bin/ld: UPKInfo.cpp:(.text+0x3663): undefined reference to `FormatHEX[abi:cxx11](unsigned int)'
/usr/bin/ld: UPKInfo.cpp:(.text+0x36ec): undefined reference to `FormatHEX[abi:cxx11](unsigned int)'
/usr/bin/ld: UPKInfo.cpp:(.text+0x3775): undefined reference to `FormatHEX[abi:cxx11](unsigned int)'
/usr/bin/ld: libUPKInfo.a(UPKInfo.cpp.o):UPKInfo.cpp:(.text+0x37f9): more undefined references to `FormatHEX[abi:cxx11](unsigned int)' follow
/usr/bin/ld: libUPKInfo.a(UPKInfo.cpp.o): in function `UPKInfo::FormatSummary[abi:cxx11]()':
UPKInfo.cpp:(.text+0x3f62): undefined reference to `FormatCompressionFlags[abi:cxx11](unsigned int)'
/usr/bin/ld: UPKInfo.cpp:(.text+0x40f3): undefined reference to `FormatHEX[abi:cxx11](unsigned int)'
/usr/bin/ld: UPKInfo.cpp:(.text+0x4269): undefined reference to `FormatHEX[abi:cxx11](unsigned int)'
/usr/bin/ld: UPKInfo.cpp:(.text+0x452e): undefined reference to `FormatHEX[abi:cxx11](std::vector<char, std::allocator<char> >)'
/usr/bin/ld: libUPKInfo.a(UPKInfo.cpp.o): in function `UPKInfo::FormatImport[abi:cxx11](unsigned int, bool)':
UPKInfo.cpp:(.text+0x8175): undefined reference to `FormatHEX[abi:cxx11](unsigned int)'
/usr/bin/ld: UPKInfo.cpp:(.text+0x81ef): undefined reference to `FormatHEX[abi:cxx11](char*, unsigned long)'
/usr/bin/ld: UPKInfo.cpp:(.text+0x8593): undefined reference to `FormatHEX[abi:cxx11](unsigned int)'
/usr/bin/ld: libUPKInfo.a(UPKInfo.cpp.o): in function `UPKInfo::FormatExport[abi:cxx11](unsigned int, bool)':
UPKInfo.cpp:(.text+0x91a1): undefined reference to `FormatHEX[abi:cxx11](unsigned int)'
/usr/bin/ld: UPKInfo.cpp:(.text+0x921c): undefined reference to `FormatHEX[abi:cxx11](char*, unsigned long)'
/usr/bin/ld: UPKInfo.cpp:(.text+0x935f): undefined reference to `FormatHEX[abi:cxx11](unsigned int)'
/usr/bin/ld: UPKInfo.cpp:(.text+0x943d): undefined reference to `FormatHEX[abi:cxx11](unsigned int)'
/usr/bin/ld: UPKInfo.cpp:(.text+0x951a): undefined reference to `FormatHEX[abi:cxx11](unsigned int)'
/usr/bin/ld: UPKInfo.cpp:(.text+0x9711): undefined reference to `FormatHEX[abi:cxx11](unsigned int)'
/usr/bin/ld: UPKInfo.cpp:(.text+0x9902): undefined reference to `FormatHEX[abi:cxx11](unsigned int)'
/usr/bin/ld: UPKInfo.cpp:(.text+0x996b): undefined reference to `FormatObjectFlagsH[abi:cxx11](unsigned int)'
/usr/bin/ld: UPKInfo.cpp:(.text+0x99ae): undefined reference to `FormatHEX[abi:cxx11](unsigned int)'
/usr/bin/ld: UPKInfo.cpp:(.text+0x9a1a): undefined reference to `FormatObjectFlagsL[abi:cxx11](unsigned int)'
/usr/bin/ld: UPKInfo.cpp:(.text+0x9a60): undefined reference to `FormatHEX[abi:cxx11](unsigned int)'
/usr/bin/ld: UPKInfo.cpp:(.text+0x9b1b): undefined reference to `FormatHEX[abi:cxx11](unsigned int)'
/usr/bin/ld: UPKInfo.cpp:(.text+0x9b99): undefined reference to `FormatHEX[abi:cxx11](unsigned int)'
/usr/bin/ld: UPKInfo.cpp:(.text+0x9c02): undefined reference to `FormatExportFlags[abi:cxx11](unsigned int)'
/usr/bin/ld: UPKInfo.cpp:(.text+0x9d2d): undefined reference to `FormatHEX[abi:cxx11](unsigned int)'
/usr/bin/ld: UPKInfo.cpp:(.text+0x9f4e): undefined reference to `FormatHEX[abi:cxx11](unsigned int)'
/usr/bin/ld: UPKInfo.cpp:(.text+0xa4d2): undefined reference to `FormatHEX[abi:cxx11](unsigned int)'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/CompareUPK.dir/build.make:98: CompareUPK] Error 1
make[1]: *** [CMakeFiles/Makefile2:351: CMakeFiles/CompareUPK.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
Unfortunately, I don't know CMake very well so I'm not sure how to debug this.
I was able to fix this issue by adding #include <cstdint>
to the following files: ModParser.h, LzoUtils.h, CustomTFC.h, and UENativeTablesReader.cpp
I was able to fix this issue by adding
#include <cstdint>
to the following files: ModParser.h, LzoUtils.h, CustomTFC.h, and UENativeTablesReader.cpp
Was able to compile using cmake and make commands. For some reason, using ninja doesn't work.
Despite a successful compile on the binaries, I get an xcomgame.upk error. The logs show an unexpected error occurred.
Looking at the debug log, it looks like the commandline options for DecompressLZO
has changed. Commenting out line 769 of PatcherGUIMain.cpp, i.e.,
diff --git a/src/PatcherGUIMain.cpp b/src/PatcherGUIMain.cpp
index 179e348..3c0db1f 100644
--- a/src/PatcherGUIMain.cpp
+++ b/src/PatcherGUIMain.cpp
@@ -766,7 +766,7 @@ bool PatcherGUIFrame::DecompressUPK()
{
long retVal = 0;
wxString executeDecompressCommandLineString = "\"" + DecompressProgram + "\"";
- executeDecompressCommandLineString += " \"" + FilesToDecompress[i] + "\"";
+ // executeDecompressCommandLineString += " \"" + FilesToDecompress[i] + "\"";
executeDecompressCommandLineString += " \"" + TextCtrl1->GetValue() + COOKED_DIR + "/" + FilesToDecompress[i] + "\"";
wxExecuteEnv env;
(in addition to the above additions of #include <cstdint>
) seems to allow PatcherGUI to work again.
(At least, it claims to have successfully applied the patches I use, but I haven't actually run XCOM to test it yet and seems to be working correctly.)
While compiling a new binary, I encountered the following errors for this command.
UPKUtils
$ninja
Not sure how if this needs an update or I made a mistake.