diff --git a/INSTALLER.md b/INSTALLER.md index e902430fcb..352f9dfe53 100644 --- a/INSTALLER.md +++ b/INSTALLER.md @@ -186,30 +186,23 @@ Overte Interface AppImages are built using [linuxdeploy](https://github.com/linu ```bash cd overte mkdir build -cd build -rm -rf * +rm -rf build/* +conan install . -s build_type=Release -b missing -pr:b=default -of build ``` Add `PRODUCTION_BUILD=1` to below command for release and release candidate builds. ```bash -OVERTE_USE_SYSTEM_QT=true cmake .. -DOVERTE_CPU_ARCHITECTURE=-msse3 -DVCPKG_BUILD_TYPE=release -DSERVER_ONLY=true -DBUILD_TOOLS=true +cmake --preset conan-release -DOVERTE_CPU_ARCHITECTURE=-msse3 ``` 4. Build ```bash -make domain-server assignment-client oven -j$(nproc) +cmake --build --preset conan-release --target domain-server assignment-client oven ``` 5. Create Debian package ```bash -cd ../pkg-scripts -``` -For Debian 11 and Ubuntu 22.04: -```bash -OVERTE_USE_SYSTEM_QT="true" DEBVERSION="1-experimental-debian-11" DEBEMAIL="julian.gro@overte.org" DEBFULLNAME="Julian Groß" ./make-deb-server -``` -For Ubuntu 18.04 and 20.04: -```bash -DEBVERSION="1-experimental-ubuntu-18.04" DEBEMAIL="julian.gro@overte.org" DEBFULLNAME="Julian Groß" ./make-deb-server +cd pkg-scripts +DEBVERSION="1-experimental-debian-11" DEBEMAIL="julian.gro@overte.org" DEBFULLNAME="Julian Groß" ./make-deb-server ``` ##### RPM package @@ -225,23 +218,23 @@ DEBVERSION="1-experimental-ubuntu-18.04" DEBEMAIL="julian.gro@overte.org" DEBFUL ```bash cd overte mkdir build -cd build -rm -rf * +rm -rf build/* +conan install . -s build_type=Release -b missing -pr:b=default -of build ``` Add `PRODUCTION_BUILD=1` to below command for release and release candidate builds. ```bash -OVERTE_USE_SYSTEM_QT=true cmake .. -DOVERTE_CPU_ARCHITECTURE=-msse3 -DVCPKG_BUILD_TYPE=release -DSERVER_ONLY=true -DBUILD_TOOLS=true +cmake --preset conan-release -DOVERTE_CPU_ARCHITECTURE=-msse3 -DSERVER_ONLY=true -DBUILD_TOOLS=true ``` 4. Build ```bash -make domain-server assignment-client oven -j$(nproc) +cmake --build --preset conan-release --target domain-server assignment-client oven ``` 5. Create RPM package ```bash -cd ../pkg-scripts +cd pkg-scripts ``` ```bash -OVERTE_USE_SYSTEM_QT="true" RPMVERSION="1.experimental" ./make-rpm-server +RPMVERSION="1.experimental" ./make-rpm-server ``` diff --git a/pkg-scripts/make-deb-server b/pkg-scripts/make-deb-server index 3c009a8c6f..8ad2b874d3 100755 --- a/pkg-scripts/make-deb-server +++ b/pkg-scripts/make-deb-server @@ -5,14 +5,14 @@ # SPDX-License-Identifier: Apache-2.0 if [ "$OVERTE" = "" ]; then - OVERTE=`realpath ..` + OVERTE=`realpath ..` fi sudo apt-get install chrpath binutils dh-make DEB_BUILD_ROOT=temp-make-deb/overte-server_$DEBVERSION if [ -d temp-make-deb ]; then - rm -r temp-make-deb + rm -r temp-make-deb fi mkdir -p $DEB_BUILD_ROOT @@ -25,10 +25,10 @@ chrpath -d $DEB_BUILD_ROOT/* # TODO: get Qt from Conan if building without system Qt -# hack: we get libnode.so.108 from conan-libs folder, because the dpkg command at the end of this file cannot always find libnode -cp $OVERTE/build/conanlibs/Release/libnode.so.108 $DEB_BUILD_ROOT -# hack: we get libttb.so.12 from conan-libs folder, because the dpkg command at the end of this file cannot always find libtbb12 -cp $OVERTE/build/conanlibs/Release/libttb.so.12 $DEB_BUILD_ROOT +# Hack: Create libnode.so from libnode.so.108 +# We don't fail on error, in case libnode is provided by the system already. +ln -s $OVERTE/build/conanlibs/Release/libnode.so.* $OVERTE/build/conanlibs/Release/libnode.so || True +cp $OVERTE/build/conanlibs/Release/*.so $DEB_BUILD_ROOT strip --strip-all $DEB_BUILD_ROOT/* cp $OVERTE/pkg-scripts/new-server $DEB_BUILD_ROOT @@ -68,27 +68,24 @@ echo domain-server opt/overte >> debian/install echo oven opt/overte >> debian/install echo new-server opt/overte >> debian/install for so in *.so*; do - echo $so opt/overte/lib >> debian/install + echo $so opt/overte/lib >> debian/install done #for service in *.service; do -# echo $service opt/overte/systemd >> debian/install +# echo $service opt/overte/systemd >> debian/install #done #for target in *.target; do -# echo $target opt/overte/systemd >> debian/install +# echo $target opt/overte/systemd >> debian/install #done find resources -type f -exec sh -c 'echo {} opt/overte/$(dirname "{}") >> debian/install' \; find plugins -type f -exec sh -c 'echo {} opt/overte/$(dirname "{}") >> debian/install' \; -if [ ! "$OVERTE_USE_SYSTEM_QT" ]; then - SOFILES=`ls *.so *.so.*.*.* | grep -Po '^(.+\.so(\.\d+)?)' | sed 's/\./\\\./g' | paste -d'|' -s` -else - SOFILES=`ls *.so | grep -Po '^(.+\.so(\.\d+)?)' | sed 's/\./\\\./g' | paste -d'|' -s` -fi +# We look for *.so.*.*.* as well, in case Qt is there. +SOFILES=`ls *.so *.so.*.*.* | grep -Po '^(.+\.so(\.\d+)?)' | sed 's/\./\\\./g' | paste -d'|' -s` # dpkg -S can only find packages which are already installed on the system. DEPENDS=`find * -path debian -prune -o -type f -executable -exec sh -c 'objdump -p {} | grep NEEDED' \; \ - | awk '{print $2}' | sort | uniq | egrep -v "^($SOFILES)$" \ - | xargs -n 1 -I {} sh -c 'dpkg -S {} | head -n 1' | cut -d ':' -f 1 | sort | uniq | paste -d',' -s` + | awk '{print $2}' | sort | uniq | egrep -v "^($SOFILES)$" \ + | xargs -n 1 -I {} sh -c 'dpkg -S {} | head -n 1' | cut -d ':' -f 1 | sort | uniq | paste -d',' -s` cp $OVERTE/pkg-scripts/server-rules debian/rules sed "s/{DEPENDS}/$DEPENDS/" $OVERTE/pkg-scripts/server-control > debian/control diff --git a/pkg-scripts/make-rpm-server b/pkg-scripts/make-rpm-server index 5e7a10e500..e0518f5b83 100755 --- a/pkg-scripts/make-rpm-server +++ b/pkg-scripts/make-rpm-server @@ -5,7 +5,7 @@ # SPDX-License-Identifier: Apache-2.0 if [ "$OVERTE" = "" ]; then - OVERTE=`realpath ..` + OVERTE=`realpath ..` fi # Remove minus character from version numbers, because rpmtool doesn't allow them. @@ -13,30 +13,32 @@ VERSION=${RPMVERSION//-} # TODO: Handle Qt built by Conan +# Hack: Create libnode.so from libnode.so.108 +# We don't fail on error, in case libnode is provided by the system already. +ln -s $OVERTE/build/conanlibs/Release/libnode.so.* $OVERTE/build/conanlibs/Release/libnode.so || True SOFILES=`ls \ - $OVERTE/build/libraries/*/*.so \ - $OVERTE/build/conanlibs/Release/libnode.so* \ - | sed 's/\./\\\./g' \ - | paste -d'|' -s` + $OVERTE/build/libraries/*/*.so \ + $OVERTE/build/conanlibs/Release/*.so \ + | sed 's/\./\\\./g' \ + | paste -d'|' -s` DEPENDS=mesa-libGL,`ls \ - $OVERTE/build/assignment-client/assignment-client \ - $OVERTE/build/domain-server/domain-server \ - $OVERTE/build/tools/oven/oven \ - $OVERTE/build/libraries/*/*.so \ - $OVERTE/build/conanlibs/Release/libnode.so* \ - $OVERTE/build/conanlibs/Release/libtbb.so* \ - $OVERTE/build/assignment-client/plugins/*.so \ - $OVERTE/build/assignment-client/plugins/*/*.so \ - | xargs -I {} sh -c 'objdump -p {} | grep NEEDED' \ - | awk '{print $2}' \ - | sort | uniq \ - | grep -E -v "^($SOFILES)$" \ - | grep -v ^libGL \ - | xargs -I {} sh -c "ldconfig -p | grep {} | tr ' ' '\n' | grep /" \ - | xargs rpm -qf --queryformat "%{NAME}\n" \ - | sort | uniq \ - | paste -d',' -s` + $OVERTE/build/assignment-client/assignment-client \ + $OVERTE/build/domain-server/domain-server \ + $OVERTE/build/tools/oven/oven \ + $OVERTE/build/libraries/*/*.so \ + $OVERTE/build/conanlibs/Release/*.so \ + $OVERTE/build/assignment-client/plugins/*.so \ + $OVERTE/build/assignment-client/plugins/*/*.so \ + | xargs -I {} sh -c 'objdump -p {} | grep NEEDED' \ + | awk '{print $2}' \ + | sort | uniq \ + | grep -E -v "^($SOFILES)$" \ + | grep -v ^libGL \ + | xargs -I {} sh -c "ldconfig -p | grep {} | tr ' ' '\n' | grep /" \ + | xargs rpm -qf --queryformat "%{NAME}\n" \ + | sort | uniq \ + | paste -d',' -s` sudo yum install chrpath