mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
build script optimization (#642)
* implement make install set CMAKE_INSTALL_PREFIX e.g. to /opt to install to /opt/hyperion set ENABLE_SYSTEM_INSTALL to ON to activate installation after compiling use make install or make install/strip (for performance/size optimized binaries - compile in Release to get best performance) * cleanup cmake files use cmake -DINSTALL_PREFIX=/opt/hyperion .. to install all files to hyperion or cmake -DINSTALL_PREFIX=/usr/ to install to usr. install folders are linux standard. bin go to bin folder and additionals (effects) go to share/hyperion * add uninstall target - be patient with that, this will remove files from your system install service files to share/hyperion - if you want to use them you have to make a symlink to your location of service files * optimize build release script install service files into hyperion share folder (services not activated, this must be done by distribution package script) initial support of cmake option -DPLATFORM= option. This selects platform specific cmake flags. no need for -DENABLE_... options (unless you want some special things) automatic detect for apple build * update submodule Former-commit-id: 5f06f314841810c780c871f810158010d3d2de70
This commit is contained in:
@@ -1,43 +1,31 @@
|
||||
#!/bin/sh
|
||||
# create all directly for release with -DCMAKE_BUILD_TYPE=Release -Wno-dev
|
||||
# Create the x64 build
|
||||
mkdir build-x86x64
|
||||
cd build-x86x64
|
||||
cmake -DENABLE_DISPMANX=OFF -DENABLE_X11=ON -DCMAKE_BUILD_TYPE=Release -Wno-dev ..
|
||||
make -j 4
|
||||
cd ..
|
||||
|
||||
# Create the x32 build
|
||||
#mkdir build-x32
|
||||
#cd build-x32
|
||||
#cmake -DIMPORT_PROTOC=../build-x64/protoc_export.cmake -DENABLE_DISPMANX=OFF -DENABLE_X11=ON -DCMAKE_BUILD_TYPE=Release -Wno-dev ..
|
||||
#make -j 4
|
||||
#cd ..
|
||||
# make_release <release name> <platform> [<cmake args ...>]
|
||||
make_release()
|
||||
{
|
||||
echo
|
||||
echo "--- build release for $1 ---"
|
||||
echo
|
||||
RELEASE=$1
|
||||
PLATFORM=$2
|
||||
shift 2
|
||||
|
||||
# Create the RPI build
|
||||
mkdir build-rpi
|
||||
cd build-rpi
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE="../Toolchain-rpi.cmake" -DIMPORT_PROTOC=../build-x86x64/protoc_export.cmake -DENABLE_WS2812BPWM=ON -DENABLE_WS281XPWM=ON -DCMAKE_BUILD_TYPE=Release -Wno-dev ..
|
||||
make -j 4
|
||||
cd ..
|
||||
mkdir -p build-${RELEASE}
|
||||
cd build-${RELEASE}
|
||||
cmake -DPLATFORM=${PLATFORM} $@ -DCMAKE_BUILD_TYPE=Release -Wno-dev .. || exit 1
|
||||
make -j $(nproc) || exit 1
|
||||
strip bin/*
|
||||
cd ..
|
||||
bin/create_release.sh . ${RELEASE}
|
||||
}
|
||||
|
||||
# Create the WETEK build
|
||||
mkdir build-wetek
|
||||
cd build-wetek
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE="../Toolchain-rpi.cmake" -DIMPORT_PROTOC=../build-x86x64/protoc_export.cmake -DENABLE_DISPMANX=OFF -DENABLE_FB=ON -DENABLE_AMLOGIC=ON -DCMAKE_BUILD_TYPE=Release -Wno-dev ..
|
||||
make -j 4
|
||||
cd ..
|
||||
export PATH="$PATH:$HOME/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin"
|
||||
CMAKE_PROTOC_FLAG="-DIMPORT_PROTOC=../build-x86x64/protoc_export.cmake"
|
||||
|
||||
# Create the IMX6 build
|
||||
#mkdir build-imx6
|
||||
#cd build-imx6
|
||||
#cmake -DCMAKE_TOOLCHAIN_FILE="../Toolchain-imx6.cmake" -DIMPORT_PROTOC=../build-x32x64/protoc_export.cmake -DENABLE_DISPMANX=OFF -DENABLE_FB=ON -DCMAKE_BUILD_TYPE=Release -Wno-dev ..
|
||||
#make -j 4
|
||||
#cd ..
|
||||
make_release x86x64 x86
|
||||
#make_release x32 x86 ${CMAKE_PROTOC_FLAG}
|
||||
make_release rpi rpi -DCMAKE_TOOLCHAIN_FILE="../Toolchain-rpi.cmake" ${CMAKE_PROTOC_FLAG}
|
||||
make_release wetek rpi -DCMAKE_TOOLCHAIN_FILE="../Toolchain-rpi.cmake" ${CMAKE_PROTOC_FLAG}
|
||||
#make_release imx6 imx6 -DCMAKE_TOOLCHAIN_FILE="../Toolchain-imx6.cmake" ${CMAKE_PROTOC_FLAG}
|
||||
|
||||
bin/create_release.sh . x86x64
|
||||
#bin/create_release.sh . x32
|
||||
bin/create_release.sh . rpi
|
||||
bin/create_release.sh . wetek
|
||||
#bin/create_release.sh . imx6
|
||||
|
||||
|
@@ -27,11 +27,7 @@ tar --create --gzip --absolute-names --show-transformed-names --ignore-failed-re
|
||||
--transform "s:$repodir/bin/service/hyperion.systemd.sh:hyperion/init.d/hyperion.systemd.sh:" \
|
||||
--transform "s:$repodir/bin/service/hyperion.initctl.sh:hyperion/init.d/hyperion.initctl.sh:" \
|
||||
--transform "s://:/:g" \
|
||||
"$builddir/bin/hyperiond" \
|
||||
"$builddir/bin/hyperion-remote" \
|
||||
"$builddir/bin/hyperion-v4l2" \
|
||||
"$builddir/bin/hyperion-x11" \
|
||||
"$builddir/bin/hyperion-dispmanx" \
|
||||
"$builddir/bin/hyperion"* \
|
||||
"$repodir/effects/"* \
|
||||
"$repodir/bin/service/hyperion.init.sh" \
|
||||
"$repodir/bin/service/hyperion.systemd.sh" \
|
||||
|
Reference in New Issue
Block a user