Advertisement
Guest User

Untitled

a guest
Jan 12th, 2022
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.07 KB | None | 0 0
  1. ## Important notice:
  2. -----------------
  3.  
  4. The game must be compiled with precisely this version since SpiderMonkey
  5. does not guarantee API stability and may have behavioural changes that
  6. cause subtle bugs or network out-of-sync errors.
  7. A standard system-provided version of the library may only be used if it's
  8. exactly the same version or if it's another minor release that does not
  9. change the behaviour of the scripts executed by SpiderMonkey. Also it's
  10. crucial that "--enable-gcgenerational" was used for building the system
  11. provided libraries and that exact stack rooting was not disabled.
  12. Using different settings for compiling SpiderMonkey and 0 A.D.
  13. causes incompatibilities on the ABI (binary) level and can lead to
  14. crashes at runtime!
  15.  
  16. ## Building on Linux:
  17. -----------------
  18.  
  19. To build SpiderMonkey for use in 0 A.D. on Linux, just run build.sh.
  20.  
  21. ## Building on Mac OS X:
  22. -----------------
  23.  
  24. Use the build-osx-libs.sh script in libraries/osx.
  25.  
  26. ## Building on Windows:
  27. --------------------
  28.  
  29. We provide precompiled binaries for Windows.
  30. If you still need to build on Windows, here's a short guide.
  31.  
  32. In the Visual Studio Installer
  33. - Install Clang, Clang-CL
  34.  
  35. Install Rust from the official website
  36. Download & install Mozilla Build from [here](https://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-Latest.exe).
  37.  
  38. In Mozilla build run
  39. ```sh
  40. rustup target add i686-pc-windows-msvc
  41. ```
  42. You might also need
  43. ```sh
  44. rustup target add x86_64-pc-windows-msvc
  45. ```
  46.  
  47. After that you can run a simple script like this one in
  48.  
  49. ```sh
  50. #!/bin/sh
  51. LLVM_LOCATION="/c/PROGRA~1/MICROS~1/2017/Community/VC/Tools/Llvm/x64/bin/"
  52. export PATH="$PATH:$LLVM_LOCATION"
  53. cd "/libraries/source/spidermonkey" && JOBS=-j12 ".\build.sh"
  54. ```
  55.  
  56. If you already built once and don't want to download/extract/patch the tarball again you can just pass `REBUILD=false`
  57.  
  58. ```sh
  59. #!/bin/sh
  60. LLVM_LOCATION="/c/PROGRA~1/MICROS~1/2017/Community/VC/Tools/Llvm/x64/bin/"
  61. export PATH="$PATH:$LLVM_LOCATION"
  62. cd "/libraries/source/spidermonkey" && REBUILD=false JOBS=-j12 ".\build.sh"
  63. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement