Skip to content

Conversation

@NicBOMB
Copy link
Contributor

@NicBOMB NicBOMB commented Oct 26, 2022

This fixes leftovers from the prior #5.
However, my comment about the loot library linking error is still relevant and a fixing commit could be added to this PR before merging.

  CXX(target) Release/obj.target/node-loot/src/exceptions.o
  CXX(target) Release/obj.target/node-loot/src/string_cast.o
  CXX(target) Release/obj.target/node-loot/src/napi_helpers.o
  CXX(target) Release/obj.target/node-loot/src/util.o
  SOLINK_MODULE(target) Release/obj.target/node-loot.node
/usr/bin/ld: cannot find -l../loot_api/loot: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [node-loot.target.mk:142: Release/obj.target/node-loot.node] Error 1

clang analyzer makes lots of files there.
This fixes leftovers from the prior Nexus-Mods#5
@TanninOne
Copy link
Contributor

@NicBOMB I might be wrong but as far as I remember libloot was fairly complex to build - maybe that's limited to windows.
I would rather not rebuild libloot unless we can indeed do that fully automatic through npm on every platform without requiring additional developer tools.

But since libloot binaries are hosted on github, downloading those dynamically for the current platform might be easier.

@NicBOMB
Copy link
Contributor Author

NicBOMB commented Oct 28, 2022

@NicBOMB I might be wrong but as far as I remember libloot was fairly complex to build - maybe that's limited to windows. I would rather not rebuild libloot unless we can indeed do that fully automatic through npm on every platform without requiring additional developer tools.

@TanninOne I built easily on my second try since I already had most of the depends. I was only missing boost, installed it, then libloot compiled. cmake curl git pip3 wget are commonly shipped by default on most/all Linux distros. Rust is also packaged for all major distros and I had already installed it. I don't know about the windows setup required for Rust/curl/wget, but cmake, git, and python are already required for Vortex. libloot provides a CMake file which works great.
I ran cmake -S . -B build;make -C build; and it compiled just fine. Results:

$ ls build
CMakeCache.txt  CMakeFiles  cmake_install.cmake  CPackConfig.cmake  CPackSourceConfig.cmake  external  generated  libloot_internals_tests  libloot.so  libloot_tests  LICENSE  Makefile  Morrowind  Oblivion  README.md  Skyrim  SkyrimSE

The recommended build commands seemed excessive only since my environment is already running the latest/required versions of the build tools.

But since libloot binaries are hosted on github, downloading those dynamically for the current platform might be easier.

I agree, we should fetch those prebuilt platform binaries rather than additionally require more build tools like the Rust toolkit to build Vortex.

@NicBOMB
Copy link
Contributor Author

NicBOMB commented Nov 2, 2022

I'll open a new PR once libloot gets a new release following loot/libloot#87 (comment) so we can begin getting those platform specific binaries dynamically. For now, I've included the binary from the latest libloot v18 for linux. This PR can be reviewed and merged.

@NicBOMB
Copy link
Contributor Author

NicBOMB commented Dec 18, 2022

But since libloot binaries are hosted on github, downloading those dynamically for the current platform might be easier.

@TanninOne As of libloot v0.18.3 release artifacts hosted on github use a simple release name. They can be automatically downloaded easily, however, those archives are only available with xz and 7z compression. Those compression formats are not supported by node-tar, node-stream-zip, or node (as in download_lz4.js). In order to use those releases something like tar -C libloot -xf libloot.tar.xz -J --strip=1 on Linux would be sufficient. How should those archives be decompressed on Windows? For reference, loot appears to use cmake to decompress and extract.

@TanninOne
Copy link
Contributor

@NicBOMB The best way to deal with that would probably be to use https://github.com/Nexus-Mods/node-7z
7z can deal with those archives, it exists on all platforms and we need it to work anyway since Vortex uses it to extract mods.

Includes an updated build script (libloot.js) and bindings.gyp fixes.
remove autogypi
prebuild still depends on an outdated version of node-gyp.
This causes builds to fail in vortex_devel, but not standalone builds.
node-gyp is death by a thousand cuts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants