Skip to content

Commit

Permalink
Merge branch 'develop' into sync-master-2a0c4ead4
Browse files Browse the repository at this point in the history
  • Loading branch information
omichel authored Sep 1, 2024
2 parents 2a0c4ea + 46f5ebd commit fbce617
Show file tree
Hide file tree
Showing 163 changed files with 652 additions and 3,130 deletions.
21 changes: 1 addition & 20 deletions dependencies/Makefile.linux
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ QT_PACKAGE = webots-qt-$(QT_VERSION)-linux64-release.tar.bz2
OIS_PACKAGE = libOIS.1.4.tar.bz2
ASSIMP_PACKAGE = libassimp-5.2.3.tar.bz2
PICO_PACKAGE = libpico.tar.bz2
LUA_PACKAGE = lua-5.2.3.tar.gz
OPENSSL_VERSION=3.0.14
OPENSSL_SRC_PACKAGE=openssl-$(OPENSSL_VERSION).tar.gz

PACKAGES = qt open-al ois pico lua assimp
PACKAGES = qt open-al ois pico assimp
PACKAGES_CLEAN = $(addsuffix -clean, $(PACKAGES))

ifeq ($(UBUNTU_VERSION), 20.04)
Expand Down Expand Up @@ -113,24 +112,6 @@ $(WEBOTS_DEPENDENCY_PATH)/$(PICO_PACKAGE):
@if [ "$$(md5sum $(PICO_PACKAGE) | awk '{print $$1;}')" != "13ce4d080f1db578cb2b73206b52e4cb" ]; then echo "MD5 checksum failed for $(PICO_PACKAGE)"; exit 1; fi
@touch $(WEBOTS_DEPENDENCY_PATH)/$(PICO_PACKAGE)

lua-clean:
@rm -rf $(WEBOTS_DEPENDENCY_PATH)/lua-5.2.3 $(WEBOTS_DEPENDENCY_PATH)/$(LUA_PACKAGE)

lua: $(WEBOTS_DEPENDENCY_PATH)/lua-5.2.3/src/liblua.a

$(WEBOTS_DEPENDENCY_PATH)/lua-5.2.3:
@echo "# downloading $(LUA_PACKAGE)"
@rm -f $(WEBOTS_DEPENDENCY_PATH)/$(LUA_PACKAGE)
@wget -qq https://www.lua.org/ftp/$(LUA_PACKAGE) -P $(WEBOTS_DEPENDENCY_PATH)
@if [ "$$(md5sum $(LUA_PACKAGE) | awk '{print $$1;}')" != "dc7f94ec6ff15c985d2d6ad0f1b35654" ]; then echo "MD5 checksum failed for $(LUA_PACKAGE)"; exit 1; fi
@echo "# uncompressing $(LUA_PACKAGE)"
@tar xfm $(WEBOTS_DEPENDENCY_PATH)/$(LUA_PACKAGE) -C $(WEBOTS_DEPENDENCY_PATH)
@rm -f $(WEBOTS_DEPENDENCY_PATH)/$(LUA_PACKAGE)

$(WEBOTS_DEPENDENCY_PATH)/lua-5.2.3/src/liblua.a: $(WEBOTS_DEPENDENCY_PATH)/lua-5.2.3
@echo "# compiling lua"
+@make --silent -C $(WEBOTS_DEPENDENCY_PATH)/lua-5.2.3 linux 2> /dev/null

open-ssl-clean:
@rm -rf $(WEBOTS_DEPENDENCY_PATH)/$(OPENSSL_SRC_PACKAGE) $(WEBOTS_DEPENDENCY_PATH)/openssl-$(OPENSSL_VERSION) $(WEBOTS_DEPENDENCY_PATH)/openssl-3.0 $(WEBOTS_HOME_LIB)/libcrypto.so* $(WEBOTS_HOME_LIB)/libssl.so*

Expand Down
27 changes: 1 addition & 26 deletions dependencies/Makefile.mac
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ QT_PACKAGE = qt-6.5.3-release.tar.bz2
ASSIMP_PACKAGE = assimp-5.2.3.tar.bz2
FFMPEG_PACKAGE = ffmpeg.tar.bz2
FREETYPE_PACKAGE = freetype2.tar.bz2
LUA_PACKAGE = liblua-5.2.3.tar.bz2
OIS_PACKAGE = libOIS-1.3.tar.bz2
PICO_PACKAGE = libpico-1.0.tar.bz2

PACKAGES = qt assimp ffmpeg freetype lua ois pico
PACKAGES = qt assimp ffmpeg freetype ois pico
PACKAGES_CLEAN = $(addsuffix -clean, $(PACKAGES))

.PHONY: release debug distrib profile clean cleanse $(PACKAGES) $(PACKAGES_CLEAN)
Expand Down Expand Up @@ -126,30 +125,6 @@ freetype2:
@tar xfm $(FREETYPE_PACKAGE)
@rm -f $(FREETYPE_PACKAGE)


lua-clean:
@rm -rf $(WEBOTS_HOME_LIB)/liblua.dylib
@rm -rf $(WEBOTS_HOME)/dependencies/lua-*
@rm -rf $(WEBOTS_HOME)/dependencies/liblua-*.tar.bz2

lua: $(WEBOTS_HOME_LIB)/liblua.dylib

$(WEBOTS_HOME_LIB)/liblua.dylib: $(WEBOTS_DEPENDENCY_PATH)/$(LUA_PACKAGE)
@echo "# uncompressing $(LUA_PACKAGE)"
@tar xfm $(LUA_PACKAGE) -C $(WEBOTS_HOME)/Contents
@mv $(WEBOTS_HOME)/Contents/dependencies/lua-5.2.3 $(WEBOTS_HOME)/dependencies/
@rmdir $(WEBOTS_HOME)/Contents/dependencies
@install_name_tool -id @rpath/Contents/lib/webots/liblua.dylib $@
@codesign --force -s - $@


$(WEBOTS_DEPENDENCY_PATH)/$(LUA_PACKAGE):
@echo "# downloading $(LUA_PACKAGE)"
@rm -f $(WEBOTS_DEPENDENCY_PATH)/$(LUA_PACKAGE)
@$(WGET) $(DEPENDENCIES_URL)/$(LUA_PACKAGE) -P $(WEBOTS_DEPENDENCY_PATH)
@if [ "b81047a7d382c1531b5b18530c6578ad" != `md5 -q $(LUA_PACKAGE)` ]; then echo "MD5 checksum failed for $(LUA_PACKAGE)"; exit 1; fi
@touch $@

ois-clean:
@rm -rf $(WEBOTS_DEPENDENCY_PATH)/$(OIS_PACKAGE) $(WEBOTS_HOME_LIB)/*OIS.dylib $(WEBOTS_HOME)/include/libOIS

Expand Down
46 changes: 1 addition & 45 deletions dependencies/Makefile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ DEPENDENCIES_URL = https://cyberbotics.com/files/repository/dependencies/windows

ASSIMP_PACKAGE = assimp-5.2.3.zip
OPEN_VR_PACKAGE = openvr-1.0.7.zip
LUA_PACKAGE = lua-5.2.3.tar.gz
OIS_PACKAGE = libOIS.zip
PICO_PACKAGE = libpico-1.0.zip
LUA_GD_PACKAGE = lua-gd-windows.zip

PACKAGES = assimp open-vr lua ois pico lua-gd
PACKAGES = assimp open-vr ois pico
PACKAGES_CLEAN = $(addsuffix -clean, $(PACKAGES))
null :=
space := $(null) $(null)
Expand Down Expand Up @@ -99,30 +97,6 @@ $(WEBOTS_DEPENDENCY_PATH)/openvr-1.0.7:
@rm -f "$(WEBOTS_DEPENDENCY_PATH)/$(OPEN_VR_PACKAGE)"
@touch "$(WEBOTS_DEPENDENCY_PATH)/openvr-1.0.7"

lua-clean:
@rm -rf $(TARGET_PATH)/lua52.dll "$(WEBOTS_DEPENDENCY_PATH)/lua-5.2.3"

lua: $(TARGET_PATH)/lua52.dll

$(TARGET_PATH)/lua52.dll: $(WEBOTS_DEPENDENCY_PATH)/lua-5.2.3/src/lua52.dll
@echo "# copying lua dll"
@mkdir -p $(TARGET_PATH)
@cp "$(WEBOTS_DEPENDENCY_PATH)/lua-5.2.3/src/lua52.dll" "$(TARGET_PATH)/"

$(WEBOTS_DEPENDENCY_PATH)/lua-5.2.3:
@rm -f "$(WEBOTS_DEPENDENCY_PATH)/$(LUA_PACKAGE)"
@echo "# downloading $(LUA_PACKAGE)"
@wget -qq "https://www.lua.org/ftp/$(LUA_PACKAGE)" -P "$(WEBOTS_DEPENDENCY_PATH)"
@if [ "$$(md5sum $(LUA_PACKAGE) | awk '{print $$1;}')" != "dc7f94ec6ff15c985d2d6ad0f1b35654" ]; then echo "MD5 checksum failed for $(LUA_PACKAGE)"; exit 1; fi
@echo "# uncompressing $(LUA_PACKAGE)"
@cd "$(WEBOTS_DEPENDENCY_PATH)"; tar xfm $(LUA_PACKAGE) -C "$(WEBOTS_DEPENDENCY_PATH)"
@rm -f "$(WEBOTS_DEPENDENCY_PATH)/$(LUA_PACKAGE)"

$(WEBOTS_DEPENDENCY_PATH)/lua-5.2.3/src/lua52.dll: $(WEBOTS_DEPENDENCY_PATH)/lua-5.2.3
@sed -i '/AR= ar rcu/c\AR= ar rc' lua-5.2.3/src/Makefile
@echo "# compiling lua"
+@make --silent -C "$(WEBOTS_DEPENDENCY_PATH)/lua-5.2.3" mingw

ois-clean:
@rm -rf "$(WEBOTS_DEPENDENCY_PATH)/$(OIS_PACKAGE)" $(TARGET_PATH)/OIS.dll $(TARGET_PATH)/XInput9_1_0.dll "$(WEBOTS_HOME_PATH)/include/libOIS"

Expand Down Expand Up @@ -161,21 +135,3 @@ $(WEBOTS_DEPENDENCY_PATH)/$(PICO_PACKAGE):
@wget -qq "$(DEPENDENCIES_URL)/$(PICO_PACKAGE)" -P "$(WEBOTS_DEPENDENCY_PATH)"
@if [ "$$(md5sum $(PICO_PACKAGE) | awk '{print $$1;}')" != "78a74b1190eb3a75bc0ae5360c699517" ]; then echo "MD5 checksum failed for $(PICO_PACKAGE)"; exit 1; fi
@touch "$(WEBOTS_DEPENDENCY_PATH)/$(PICO_PACKAGE)"

lua-gd-clean:
@rm -rf "$(WEBOTS_DEPENDENCY_PATH)/$(LUA_GD_PACKAGE)" $(TARGET_PATH)/gd.dll

lua-gd: $(TARGET_PATH)/gd.dll

$(TARGET_PATH)/gd.dll: $(WEBOTS_DEPENDENCY_PATH)/$(LUA_GD_PACKAGE)
@echo "# uncompressing $(LUA_GD_PACKAGE)"
@mkdir -p $(TARGET_PATH)
@unzip -q -o "$(WEBOTS_DEPENDENCY_PATH)/$(LUA_GD_PACKAGE)" -d "$(WEBOTS_HOME_PATH)/msys64/mingw64/bin"
@touch "$(TARGET_PATH)/gd.dll"

$(WEBOTS_DEPENDENCY_PATH)/$(LUA_GD_PACKAGE):
@echo "# downloading $(LUA_GD_PACKAGE)"
@rm -f "$(WEBOTS_DEPENDENCY_PATH)/$(LUA_GD_PACKAGE)"
@wget -qq "$(DEPENDENCIES_URL)/$(LUA_GD_PACKAGE)" -P "$(WEBOTS_DEPENDENCY_PATH)"
@if [ "$$(md5sum $(LUA_GD_PACKAGE) | awk '{print $$1;}')" != "0a54dcc518d331a853f77fb66ebf75e9" ]; then echo "MD5 checksum failed for $(LUA_GD_PACKAGE)"; exit 1; fi
@touch "$(WEBOTS_DEPENDENCY_PATH)/$(LUA_GD_PACKAGE)"
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,6 @@ pip install pycodestyle
2. Run the tests:

```sh
cd $WEBOTS_HOME/docs
cd $WEBOTS_HOME/docs/tests
python -m unittest discover
```
3 changes: 3 additions & 0 deletions docs/reference/changelog-r2024.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Released on December **th, 2023.
- **Change the name of the web scene format from `X3D` to `W3D` ([#6280](https://github.com/cyberbotics/webots/pull/6280)).**
- Removed support for macOS 11 "Big Sur" and added support for macOS 14 "Sonoma" ([#6580](https://github.com/cyberbotics/webots/pull/6580)).
- Added the `indirectFieldAccess` tag to allow the `fields` variable to be used in proto templates without referencing a specific field ([#6614](https://github.com/cyberbotics/webots/pull/6614)).
- Added a method to include all subtypes of a node type in a PROTO field restriction ([#6574](https://github.com/cyberbotics/webots/pull/6574)).
- Removed support for Lua as a PROTO scripting language ([#6642](https://github.com/cyberbotics/webots/pull/6642)).
- Enhancements
- Improved the image range of the rotating [Lidar](lidar.md) ([#6324](https://github.com/cyberbotics/webots/pull/6324)).
- Cleanup
Expand All @@ -28,3 +30,4 @@ Released on December **th, 2023.
- Fixed connection errors when using long robot names in some environments ([#6635](https://github.com/cyberbotics/webots/pull/6635)).
- Fixed crash on macos when closing Webots under some circumstances ([#6635](https://github.com/cyberbotics/webots/pull/6635)).
- Fixed error on macos when when putting displays and cameras in separate windows ([#6635](https://github.com/cyberbotics/webots/pull/6635)).
- Fixed handling of remote assets from unofficial sources ([#6585](https://github.com/cyberbotics/webots/pull/6585)).
4 changes: 1 addition & 3 deletions docs/reference/javascript-procedural-proto.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ Webots cannot load procedural PROTO nodes directly, therefore the procedural PRO

### Programming Facts

- For backwards compatibility reasons, procedural PROTO files are assumed to be Lua by default.
In order to use JavaScript scripting it is required to add the comment `# template language: javascript` in the header of the file.
In order to use JavaScript scripting you should add the comment `# template language: javascript` in the header of the file.
- A template statement is encapsulated inside the `%<` and the `>%` tokens and can be written on several lines.
- Adding an "=" just after the opening token (`%<=`) allows to evaluate a statement.
- The use of template statements is exclusively allowed inside the content scope of the PROTO (cf. example).
Expand Down Expand Up @@ -72,7 +71,6 @@ Sphere {
%end

- Although not mandatory, the usage of semi-colons for JavaScript statements is highly encouraged.
- Lua and JavaScript Procedural PROTO nodes use two distinct tokens (`%{` and `}%` for Lua and `%<` and `>%` for JavaScript) and cannot be interchanged.
Which tokens will be considered depends on whether the comment line `# template language: javascript` is present.
- The `wbfile` module for file manipulation does not need to, and should not, be imported as it is added automatically to each instance of the engine.
- Performance degradation has been observed when the number of evaluations requested (i.e expressions of the form `%<= ... >%`) is large, generally in the tens of thousands.
Expand Down
Loading

0 comments on commit fbce617

Please sign in to comment.