-
-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[suggestion] move /scripts to a separate repo or do some other thing to support cross-compile #93
Comments
Hey that's super cool ! I thought about using Moving the scripts would be a major pain, I am sure we can figure out a way to do it without moving them. Would you be able to share what you are doing to compile so that I can take a look and configure/update the build system ? The EDIT: I believe I added a log window in the GUI. If you could open it and see what the error is when opening other dimension that would be really helpful. |
my environment is wsl Ubuntu 22.04.2 LTS
at the end of the day the workspace look like this:
compile command like this , cd to their ./build folder first #zlib-ng
emcmake cmake .. -DZLIB_COMPAT=on -DBUILD_SHARED_LIBS=OFF
cmake --build ..
#lib-png
emcmake cmake .. -DPNG_SHARED=OFF -DPNG_STATIC=ON -DZLIB_LIBRARY="../../zlib-ng" -DZLIB_INCLUDE_DIR="../../zlib-ng"
#fmt
emcmake cmake .. -DBUILD_SHARED_LIBS=OFF -DFMT_TEST=OFF -DCMAKE_CXX_COMPILER="/mnt/c/Users/radnd/Documents/Code/emsdk/upstream/emscripten/em++"
#spdlog
emcmake cmake .. -DSPDLOG_FMT_EXTERNAL=ON -DSPDLOG_BUILD_EXAMPLE=OFF -DSPDLOG_BUILD_TESTS=OFF
#mcmap
#I didn't managed to make relative path work
emcmake cmake .. -DCMAKE_BUILD_TYPE=Release -DZLIB_LIBRARY="/mnt/c/Users/radnd/Documents/Code/zlib-ng/build/libz.a" -DZLIB_INCLUDE_DIR="/mnt/c/Users/radnd/Documents/Code/zlib-ng/build/" -DPNG_PNG_INCLUDE_DIR="/mnt/c/Users/radnd/Documents/Code/libpng/build" -DPNG_LIBRARY="/mnt/c/Users/radnd/Documents/Code/libpng/build" We never try to build in nether/end , so it's actually not a problem to me , would be good to make code handle this special case anyway,here is the log i reproduced on my temp local server
|
I got
The core library |
TLDR : i'm trying to compile mcmap to
wasm
using emscripten , /scripts makes it hard to do that "cross-compile"Rencently , player of my creative server want to render some small part of map (e.g. a single floor of a big building ) , due to the truncate on y-axis this can't be achieved by dynmap. So I plan to compile mcmap to wasm to make they render thier building in browser. The problem here is because tools in /scripts got compiled to wasm format , too. It can't run when called in MakeFile.
I know I can tell players to use the Windows GUI one, but it's difficult for them to read English , and it seems the program isn't able to read spigot server world (except overworld , other show error "... not a save folder")
Make
json->bson
optional also helps ,since it's the only tool got called by now.This change will make cross-compile easier in general , not only
c++->wasm
The text was updated successfully, but these errors were encountered: