diff --git a/build/premake/extern_libs5.lua b/build/premake/extern_libs5.lua index c4d70c2db3..c08fec18c0 100644 --- a/build/premake/extern_libs5.lua +++ b/build/premake/extern_libs5.lua @@ -538,9 +538,9 @@ extern_lib_defs = { }, spidermonkey = { compile_settings = function() - if _OPTIONS["with-system-mozjs52"] then + if _OPTIONS["with-system-mozjs"] then if not _OPTIONS["android"] then - pkgconfig.add_includes("mozjs-52") + pkgconfig.add_includes("mozjs-60") end else if os.istarget("windows") then @@ -558,21 +558,17 @@ extern_lib_defs = { end end, link_settings = function() - if _OPTIONS["with-system-mozjs52"] then + if _OPTIONS["with-system-mozjs"] then if _OPTIONS["android"] then - links { "mozjs-52" } + links { "mozjs-60" } else - pkgconfig.add_links("mozjs-52") + pkgconfig.add_links("mozjs-60") end else - filter { "Debug", "action:vs*" } - links { "mozjs52-ps-debug-vc140" } - filter { "Release", "action:vs*" } - links { "mozjs52-ps-release-vc140" } - filter { "Debug", "action:not vs*" } - links { "mozjs52-ps-debug" } - filter { "Release", "action:not vs*" } - links { "mozjs52-ps-release" } + filter { "Debug" } + links { "mozjs60-ps-debug" } + filter { "Release" } + links { "mozjs60-ps-release" } filter { } add_source_lib_paths("spidermonkey") end diff --git a/build/premake/premake5.lua b/build/premake/premake5.lua index 10e72013b5..30893f01fb 100644 --- a/build/premake/premake5.lua +++ b/build/premake/premake5.lua @@ -6,7 +6,7 @@ newoption { trigger = "icc", description = "Use Intel C++ Compiler (Linux only; newoption { trigger = "jenkins-tests", description = "Configure CxxTest to use the XmlPrinter runner which produces Jenkins-compatible output" } newoption { trigger = "minimal-flags", description = "Only set compiler/linker flags that are really needed. Has no effect on Windows builds" } newoption { trigger = "outpath", description = "Location for generated project files" } -newoption { trigger = "with-system-mozjs52", description = "Search standard paths for libmozjs52, instead of using bundled copy" } +newoption { trigger = "with-system-mozjs", description = "Search standard paths for libmozjs60, instead of using bundled copy" } newoption { trigger = "with-system-nvtt", description = "Search standard paths for nvidia-texture-tools library, instead of using bundled copy" } newoption { trigger = "without-audio", description = "Disable use of OpenAL/Ogg/Vorbis APIs" } newoption { trigger = "without-lobby", description = "Disable the use of gloox and the multiplayer lobby" } diff --git a/build/workspaces/clean-workspaces.sh b/build/workspaces/clean-workspaces.sh index d24a7b9bcb..44e4e9e0ef 100755 --- a/build/workspaces/clean-workspaces.sh +++ b/build/workspaces/clean-workspaces.sh @@ -33,11 +33,17 @@ if [ "$preserve_libs" != "true" ]; then (cd ../../libraries/source/fcollada/src && rm -rf ./output) (cd ../../libraries/source/nvtt/src && rm -rf ./build) (cd ../../libraries/source/spidermonkey && rm -f .already-built) - (cd ../../libraries/source/spidermonkey && rm -rf ./mozjs-45.0.2) + (cd ../../libraries/source/spidermonkey && rm -rf ./lib) + (cd ../../libraries/source/spidermonkey && rm -rf ./include-unix-debug) + (cd ../../libraries/source/spidermonkey && rm -rf ./include-unix-release) + (cd ../../libraries/source/spidermonkey && rm -rf ./mozjs-62.9.1) fi # Still delete the directory of previous SpiderMonkey versions to # avoid wasting disk space if people clean workspaces after updating. +(cd ../../libraries/source/spidermonkey && rm -rf ./mozjs-52.9.1pre1) +(cd ../../libraries/source/spidermonkey && rm -rf ./mozjs-45.0.2) +(cd ../../libraries/source/spidermonkey && rm -rf ./mozjs-38.0.0) (cd ../../libraries/source/spidermonkey && rm -rf ./mozjs-38.0.0) (cd ../../libraries/source/spidermonkey && rm -rf ./mozjs31) (cd ../../libraries/source/spidermonkey && rm -rf ./mozjs24) diff --git a/build/workspaces/update-workspaces.sh b/build/workspaces/update-workspaces.sh index 71706bcd43..16ef040b14 100644 --- a/build/workspaces/update-workspaces.sh +++ b/build/workspaces/update-workspaces.sh @@ -41,7 +41,7 @@ premake_args="" with_system_premake5=false without_nvtt=false with_system_nvtt=false -with_system_mozjs52=false +with_system_mozjs=false enable_atlas=true for i in "$@" @@ -50,7 +50,7 @@ do --with-system-premake5 ) with_system_premake5=true ;; --without-nvtt ) without_nvtt=true; premake_args="${premake_args} --without-nvtt" ;; --with-system-nvtt ) with_system_nvtt=true; premake_args="${premake_args} --with-system-nvtt" ;; - --with-system-mozjs52 ) with_system_mozjs52=true; premake_args="${premake_args} --with-system-mozjs52" ;; + --with-system-mozjs ) with_system_mozjs=true; premake_args="${premake_args} --with-system-mozjs" ;; --enable-atlas ) enable_atlas=true ;; --disable-atlas ) enable_atlas=false ;; -j* ) JOBS=$i ;; @@ -87,7 +87,7 @@ if [ "`uname -s`" != "Darwin" ]; then # Build/update bundled external libraries (cd ../../libraries/source/fcollada/src && ${MAKE} ${JOBS}) || die "FCollada build failed" echo - if [ "$with_system_mozjs52" = "false" ]; then + if [ "$with_system_mozjs" = "false" ]; then (cd ../../libraries/source/spidermonkey && MAKE=${MAKE} JOBS=${JOBS} ./build.sh) || die "SpiderMonkey build failed" fi echo diff --git a/source/scriptinterface/ScriptTypes.h b/source/scriptinterface/ScriptTypes.h index 78be5a8e2b..ac2dd0d58b 100644 --- a/source/scriptinterface/ScriptTypes.h +++ b/source/scriptinterface/ScriptTypes.h @@ -73,7 +73,7 @@ # pragma GCC diagnostic pop #endif -#if MOZJS_MAJOR_VERSION != 52 +#if MOZJS_MAJOR_VERSION != 60 #error Your compiler is trying to use an incorrect major version of the \ SpiderMonkey library. The only version that works is the one in the \ libraries/spidermonkey/ directory, and it will not work with a typical \