From ce4829d4f648ab02cd7d252baa8c40ac5eee299b Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Wed, 21 Aug 2024 17:01:33 +0000 Subject: [PATCH] Reorganise build system --- .gitignore | 6 - CMakeLists.txt | 250 ++++++++++++++++++ ...RPiClang.txt => CMakeToolChainRPiClang.txt | 4 +- ...hainRPiGCC.txt => CMakeToolChainRPiGCC.txt | 0 README | 63 ++++- all.sh | 2 - build.sh | 22 -- clean.sh | 2 - compile-config.sample => cmake.config.sample | 15 +- compiler | 5 - compiler.sample | 7 + src/config.json.sample => config.json.sample | 0 install.sh | 3 - {src => res}/fonts/helvB18-ISO8859-1.pcf | Bin {src => res}/fonts/helvB18.bdf | 0 {src => res}/fonts/helvB18.cc | Bin {src => res}/fonts/helvB24-ISO8859-1.pcf | Bin {src => res}/fonts/helvB24.bdf | 0 {src => res}/fonts/helvB24.cc | Bin {src => res}/fonts/licensehelv.txt | 0 {src/other => res/images}/defposter.png | Bin {src/other => res/images}/dolbyoff.png | Bin {src/other => res/images}/dolbyon.png | Bin {src/other => res/images}/hd1080i.png | Bin {src/other => res/images}/hd720p.png | Bin {src/other => res/images}/licence.txt | 0 {src/other => res/images}/properties.png | Bin {src/other => res/images}/radio.png | Bin {src/other => res/images}/recfolder.png | Bin {src/other => res/images}/recording.png | Bin {src/other => res/images}/recordings.png | Bin {src/other => res/images}/restart.png | Bin {src/other => res/images}/sd576i.png | Bin {src/other => res/images}/timers.png | Bin {src/other => res/images}/tv.png | Bin {src/other => res/images}/txtoff.png | Bin {src/other => res/images}/txton.png | Bin {src/other => res/images}/vdr.jpg | Bin {src/other => res/images}/vdrhires.jpg | Bin {src/other => res/images}/vdrhires.png | Bin {src/other => res/images}/wallpaper720p.jpg | Bin {src/other => res/images}/wallpaperNTSC.jpg | Bin {src/other => res/images}/wallpaperPAL.jpg | Bin {src => res}/raspi-patches/fetch_libav.sh | 0 .../raspi-patches/libav_transcode.patch | 0 {src => res}/raspi-patches/readme.txt | 0 run.sh | 3 - src/CMakeLists.txt | 130 --------- src/osdopenvg.cc | 4 +- 49 files changed, 328 insertions(+), 188 deletions(-) delete mode 100644 .gitignore create mode 100644 CMakeLists.txt rename src/CMakeToolChainRPiClang.txt => CMakeToolChainRPiClang.txt (82%) rename src/CMakeToolChainRPiGCC.txt => CMakeToolChainRPiGCC.txt (100%) delete mode 100755 all.sh delete mode 100755 build.sh delete mode 100755 clean.sh rename compile-config.sample => cmake.config.sample (58%) delete mode 100755 compiler create mode 100755 compiler.sample rename src/config.json.sample => config.json.sample (100%) delete mode 100755 install.sh rename {src => res}/fonts/helvB18-ISO8859-1.pcf (100%) rename {src => res}/fonts/helvB18.bdf (100%) rename {src => res}/fonts/helvB18.cc (100%) rename {src => res}/fonts/helvB24-ISO8859-1.pcf (100%) rename {src => res}/fonts/helvB24.bdf (100%) rename {src => res}/fonts/helvB24.cc (100%) rename {src => res}/fonts/licensehelv.txt (100%) rename {src/other => res/images}/defposter.png (100%) rename {src/other => res/images}/dolbyoff.png (100%) rename {src/other => res/images}/dolbyon.png (100%) rename {src/other => res/images}/hd1080i.png (100%) rename {src/other => res/images}/hd720p.png (100%) rename {src/other => res/images}/licence.txt (100%) rename {src/other => res/images}/properties.png (100%) rename {src/other => res/images}/radio.png (100%) rename {src/other => res/images}/recfolder.png (100%) rename {src/other => res/images}/recording.png (100%) rename {src/other => res/images}/recordings.png (100%) rename {src/other => res/images}/restart.png (100%) rename {src/other => res/images}/sd576i.png (100%) rename {src/other => res/images}/timers.png (100%) rename {src/other => res/images}/tv.png (100%) rename {src/other => res/images}/txtoff.png (100%) rename {src/other => res/images}/txton.png (100%) rename {src/other => res/images}/vdr.jpg (100%) rename {src/other => res/images}/vdrhires.jpg (100%) rename {src/other => res/images}/vdrhires.png (100%) rename {src/other => res/images}/wallpaper720p.jpg (100%) rename {src/other => res/images}/wallpaperNTSC.jpg (100%) rename {src/other => res/images}/wallpaperPAL.jpg (100%) rename {src => res}/raspi-patches/fetch_libav.sh (100%) rename {src => res}/raspi-patches/libav_transcode.patch (100%) rename {src => res}/raspi-patches/readme.txt (100%) delete mode 100755 run.sh delete mode 100644 src/CMakeLists.txt diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 871ef78..0000000 --- a/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -*~ -.#* -config.json -build -compile-config -initssh diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..aa2c7b9 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,250 @@ +# CMAKE_SOURCE_DIR - top of git tree +# CMAKE_BINARY_DIR - build dir top + +cmake_minimum_required(VERSION 3.13.4) + +# set(CMAKE_VERBOSE_ON) +# set(CMAKE_VERBOSE_MAKEFILE ON) + +include(${CMAKE_SOURCE_DIR}/../cmake.config) + +set(ENABLE_MOLD ${CONFIG_ENABLE_MOLD}) +set(MOLD_BIN ${CONFIG_MOLD_BIN}) +set(FORCE_COLOR ${CONFIG_FORCE_COLOR}) +set(ALL_WARNINGS ${CONFIG_ALL_WARNINGS}) + +if(CONFIG_CROSS_COMPILE) + if(CONFIG_CROSS_COMPILER STREQUAL gcc) + set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/CMakeToolChainRPiGCC.txt) + elseif(CONFIG_CROSS_COMPILER STREQUAL clang) + set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/CMakeToolChainRPiClang.txt) + endif() +endif() + + + +set (VOMP_OBJ_COMMON + src/util.cc + src/control.cc + src/thread.cc + src/timers.cc + src/i18n.cc + src/udp4.cc + src/udp6.cc + src/vdpc.cc + src/tcp.cc + src/message.cc + src/messagequeue.cc + src/wol.cc + src/audio.cc + src/video.cc + src/vdr.cc + src/recman.cc + src/recording.cc + src/recinfo.cc + src/channel.cc + src/rectimer.cc + src/event.cc + src/directory.cc + src/mark.cc + src/option.cc + src/vfeed.cc + src/afeed.cc + src/demuxer.cc + src/demuxervdr.cc + src/demuxerts.cc + src/stream.cc + src/osd.cc + src/surface.cc + src/region.cc + src/colour.cc + src/boxstack.cc + src/boxx.cc + src/tbboxx.cc + src/vrecording.cc + src/vinfo.cc + src/vquestion.cc + src/vrecordinglist.cc + src/vrecordinglistclassic.cc + src/vrecordinglistadvanced.cc + src/vepgsummary.cc + src/vepglistadvanced.cc + src/vmute.cc + src/vvolume.cc + src/vtimerlist.cc + src/vtimeredit.cc + src/vrecordingmenu.cc + src/vchannellist.cc + src/vwelcome.cc + src/vvideorec.cc + src/vepgsettimer.cc + src/vchannelselect.cc + src/vserverselect.cc + src/vconnect.cc + src/vepg.cc + src/vrecmove.cc + src/vradiorec.cc + src/vaudioselector.cc + src/vscreensaver.cc + src/vopts.cc + src/wselectlist.cc + src/wjpeg.cc + src/wsymbol.cc + src/wbutton.cc + src/wtextbox.cc + src/woptionpane.cc + src/woptionbox.cc + src/wremoteconfig.cc + src/wtabbar.cc + src/led.cc + src/inputman.cc + src/input.cc + src/inputudp.cc + src/inputlirc.cc + src/vpicturebanner.cc + src/eventdispatcher.cc + src/vdrrequestpacket.cc + src/vdrresponsepacket.cc + src/vvideolivetv.cc + src/sleeptimer.cc + src/wprogressbar.cc + src/bitmap.cc + src/dvbsubtitles.cc + src/tfeed.cc + src/vteletextview.cc + src/teletextdecodervbiebu.cc + src/teletxt/txtfont.cc + src/movieinfo.cc + src/seriesinfo.cc + src/wmovieview.cc + src/wseriesview.cc + src/wtvmedia.cc + src/wpictureview.cc + src/osdvector.cc + src/surfacevector.cc + src/buffer.cc + src/config.cc + src/log.cc + src/playervideorec.cc + src/playervideolive.cc + src/playerradiolive.cc + src/playerradiorec.cc + src/imageloader.cc + src/image.cc + src/telem.cc +) +# abstractoption.cc + +set (VOMP_OBJ_RASPBERRY + src/main.cc + src/threadp.cc + src/osdopenvg.cc + src/ledraspberry.cc + src/videoomx.cc + src/audioomx.cc + src/imageomx.cc + src/wjpegsimple.cc + src/inputlinux.cc + src/inputcec.cc + src/omx/omx.cc + src/omx/omximagedecode.cc + src/omx/omxeglrender.cc + src/imageomx2.cc +) + +# +#OBJ_WINDOWS = winmain.o threadwin.o inputwin.o ledwin.o videowin.o \ +# audiowin.o windowsosd.o dsallocator.o dssourcefilter.o dssourcepin.o \ +# wwinvideofilter.o wwinvideoh264filter.o wwinaudiofilter.o \ +# wwinmp3audiofilter.o wjpegsimple.o +# +#OBJ_WINLEGACY = osdwinpixel.o surfacewin.o \ +# fonts/helvB24.o fonts/helvB18.o +# +#OBJ_WINCURRENT = osdwinvector.o +# + +set (PNG_FILES + vdrhires.png + wallpaper720p.jpg + properties.png + radio.png + timers.png + tv.png + recordings.png + restart.png + hd1080i.png + hd720p.png + sd576i.png + txtoff.png + txton.png + dolbyoff.png + dolbyon.png + recording.png + recfolder.png + defposter.png +) + +project(vomp) +add_executable(vomp ${VOMP_OBJ_COMMON} ${VOMP_OBJ_RASPBERRY} pngs.o) + +# set(CMAKE_CXX_COMPILER_LAUNCHER "distcc") - not until cmake 3.17! + + + +if (${ENABLE_MOLD}) + target_link_options(vomp PRIVATE "-fuse-ld=${MOLD_BIN}") +endif() + +set(CMAKE_BUILD_TYPE Debug) +target_compile_options(vomp PRIVATE -O0) + +set_property(TARGET vomp PROPERTY CXX_STANDARD 14) + +find_path(INC_VC bcm_host.h PATHS /opt/vc/include) +find_path(INC_FT2 ft2build.h PATHS /usr/include/freetype2) +find_path(INC_MAGICK Magick++.h PATHS /usr/include/ImageMagick-6) +find_path(INC_MAGICK2 magick/magick-baseconfig.h PATHS /usr/include/arm-linux-gnueabihf/ImageMagick-6) + +target_include_directories(vomp SYSTEM PRIVATE ${INC_VC} ${INC_FT2} ${INC_MAGICK} ${INC_MAGICK2}) + +target_compile_options(vomp PRIVATE + -Werror=return-type + -Wall + -Wextra + -Wshadow + -Wmissing-declarations + -Winit-self + -Woverloaded-virtual + -Wmissing-format-attribute + -Wdisabled-optimization + -Wmissing-noreturn +) + +if (${ALL_WARNINGS}) + target_compile_options(vomp PRIVATE -Wold-style-cast -Wconversion) +endif() + +if (${FORCE_COLOR}) + target_compile_options(vomp PRIVATE -fdiagnostics-color=always) +endif() + +target_compile_options(vomp PRIVATE + -D_GNU_SOURCE -DIPV4 -DIPV6 -DVOMP_PLATFORM_RASPBERRY -DMAGICKCORE_HDRI_ENABLE=0 + -DMAGICKCORE_QUANTUM_DEPTH=16 -DDEV) + +target_link_libraries(vomp + pthread stdc++ rt brcmEGL brcmOpenVG openmaxil bcm_host avformat avcodec + fmt avutil swresample m dl fontconfig freetype Magick++-6.Q16 + MagickWand-6.Q16 MagickCore-6.Q16 jsoncpp) + +target_link_directories(vomp PRIVATE + ${CMAKE_SYSROOT}/opt/vc/lib + ${CMAKE_SYSROOT}/usr/lib/arm-linux-gnueabihf) + +add_custom_command( + OUTPUT pngs.o + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/res/images + COMMENT pngs.o + COMMAND ${CMAKE_LINKER} -r -b binary -o ${CMAKE_BINARY_DIR}/pngs.o ${PNG_FILES} +) diff --git a/src/CMakeToolChainRPiClang.txt b/CMakeToolChainRPiClang.txt similarity index 82% rename from src/CMakeToolChainRPiClang.txt rename to CMakeToolChainRPiClang.txt index 063e2fe..733904e 100644 --- a/src/CMakeToolChainRPiClang.txt +++ b/CMakeToolChainRPiClang.txt @@ -6,8 +6,8 @@ set(CMAKE_SYSROOT /pi-root) # Clang #set(CMAKE_C_COMPILER "/usr/bin/clang-11") #set(CMAKE_CXX_COMPILER "/usr/bin/clang++-11") -set(CMAKE_C_COMPILER "/opt/vompclient/compiler") -set(CMAKE_CXX_COMPILER "/opt/vompclient/compiler") +set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/../compiler") +set(CMAKE_CXX_COMPILER "${CMAKE_BINARY_DIR}/../compiler") set(CMAKE_LINKER /usr/bin/arm-linux-gnueabihf-ld) set(CMAKE_C_FLAGS "-target arm-linux-gnueabihf -mfloat-abi=hard -mcpu=cortex-a7") set(CMAKE_CXX_FLAGS "-target arm-linux-gnueabihf -mfloat-abi=hard -mcpu=cortex-a7") diff --git a/src/CMakeToolChainRPiGCC.txt b/CMakeToolChainRPiGCC.txt similarity index 100% rename from src/CMakeToolChainRPiGCC.txt rename to CMakeToolChainRPiGCC.txt diff --git a/README b/README index 95f53bb..2788436 100644 --- a/README +++ b/README @@ -1,4 +1,63 @@ -How to set up a build: +== Setup Build == -Copy compile-config.sample to compile-config +Create a top level directory, let's say vompdev + +Inside vompdev, clone the git repo: + +git clone https://git.vomp.tv/vompclient.git git + +Copy two sample files to the top level directory: + +cp git/cmake.config.sample cmake.config +cp git/compiler.sample compiler + +Edit the two new files to taste. + +== Build == + +In the top level directory: + +mkdir build +cd build +cmake -S ../git +make -j4 (concurrent procs to taste) + + +== Install == + +In the top level directory: + +Copy git/config.json.sample ./config.json + +Edit config.json to suit - this is a runtime config file for vomp. + +Copy build/vomp config.json to a Pi in the same directory. Run it. + +== Cross Compile == + +Get compiling working on a nice clean Raspbian 10 installation. +Copy the entire installation to a Debian 10 install at /pi-root + +In cmake.config, enable cross compiling. + +== Fastest Compilation == + +Use cross compiling on fast x64 hardware. +Setup distcc: https://www.distcc.org +In cmake.config set the cross compiler to clang. +Download / compile the mold linker. Enable in cmake.config. + +== Directory structure == + +After configuring things and doing a build your (much abbreviated) +directory stucture should look like this: + +/vompdev + git/ + .git/ + build/ + vomp + cmake.config + config.json + compiler diff --git a/all.sh b/all.sh deleted file mode 100755 index da7074d..0000000 --- a/all.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./build.sh && ./install.sh && ./run.sh diff --git a/build.sh b/build.sh deleted file mode 100755 index cf5dfb8..0000000 --- a/build.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -source compile-config - -if [ ! -d "build" ]; then - - if [ $CROSS_COMPILE == "yes" ]; then - if [ $CROSS_COMPILER == "gcc" ]; then - CROSS_COMPILE_INSERT=-DCMAKE_TOOLCHAIN_FILE=../src/CMakeToolChainRPiGCC.txt - elif [ $CROSS_COMPILER == "clang" ]; then - CROSS_COMPILE_INSERT=-DCMAKE_TOOLCHAIN_FILE=../src/CMakeToolChainRPiClang.txt - fi - fi - - mkdir build - - cmake $CROSS_COMPILE_INSERT -DENABLE_MOLD=${ENABLE_MOLD} -DMOLD_BIN=${MOLD_BIN} \ - -DFORCE_COLOR=${FORCE_COLOR} -DALL_WARNINGS=${ALL_WARNINGS} -S src -B build - -fi - -make -C build -j$MAKE_J diff --git a/clean.sh b/clean.sh deleted file mode 100755 index bc9bfaa..0000000 --- a/clean.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -rm -rf build diff --git a/compile-config.sample b/cmake.config.sample similarity index 58% rename from compile-config.sample rename to cmake.config.sample index 12c67fd..3fd4903 100644 --- a/compile-config.sample +++ b/cmake.config.sample @@ -1,18 +1,15 @@ -# Set the number of concurrent threads for compiling (make's -j option): -MAKE_J=1 - # Enable cross-compiling -CROSS_COMPILE=no +set(CONFIG_CROSS_COMPILE no) # Set cross compiler. Options: gcc clang -CROSS_COMPILER=gcc +set(CONFIG_CROSS_COMPILER gcc) # Use mold for linker? (Only possible if compiler is clang) -ENABLE_MOLD=no -MOLD_BIN=/opt/mold/bin/mold +set(CONFIG_ENABLE_MOLD no) +set(CONFIG_MOLD_BIN /opt/mold/bin/mold) # Force color output from compiler? remote distcc workers disable color by default -FORCE_COLOR=no +set(CONFIG_FORCE_COLOR no) # Add -Wold-style-cast and -Wconversion to compiler options -ALL_WARNINGS=no +set(CONFIG_ALL_WARNINGS no) diff --git a/compiler b/compiler deleted file mode 100755 index afff73d..0000000 --- a/compiler +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -/usr/bin/distcc /usr/bin/clang-11 "$@" -#/usr/bin/clang-11 "$@" - diff --git a/compiler.sample b/compiler.sample new file mode 100755 index 0000000..50bc258 --- /dev/null +++ b/compiler.sample @@ -0,0 +1,7 @@ +#!/bin/bash + +# Enable one compiler + +/usr/bin/clang-11 "$@" +# /usr/bin/distcc /usr/bin/clang-11 "$@" + diff --git a/src/config.json.sample b/config.json.sample similarity index 100% rename from src/config.json.sample rename to config.json.sample diff --git a/install.sh b/install.sh deleted file mode 100755 index cb3823c..0000000 --- a/install.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -scp build/vomp config.json targetpi:/dev/shm diff --git a/src/fonts/helvB18-ISO8859-1.pcf b/res/fonts/helvB18-ISO8859-1.pcf similarity index 100% rename from src/fonts/helvB18-ISO8859-1.pcf rename to res/fonts/helvB18-ISO8859-1.pcf diff --git a/src/fonts/helvB18.bdf b/res/fonts/helvB18.bdf similarity index 100% rename from src/fonts/helvB18.bdf rename to res/fonts/helvB18.bdf diff --git a/src/fonts/helvB18.cc b/res/fonts/helvB18.cc similarity index 100% rename from src/fonts/helvB18.cc rename to res/fonts/helvB18.cc diff --git a/src/fonts/helvB24-ISO8859-1.pcf b/res/fonts/helvB24-ISO8859-1.pcf similarity index 100% rename from src/fonts/helvB24-ISO8859-1.pcf rename to res/fonts/helvB24-ISO8859-1.pcf diff --git a/src/fonts/helvB24.bdf b/res/fonts/helvB24.bdf similarity index 100% rename from src/fonts/helvB24.bdf rename to res/fonts/helvB24.bdf diff --git a/src/fonts/helvB24.cc b/res/fonts/helvB24.cc similarity index 100% rename from src/fonts/helvB24.cc rename to res/fonts/helvB24.cc diff --git a/src/fonts/licensehelv.txt b/res/fonts/licensehelv.txt similarity index 100% rename from src/fonts/licensehelv.txt rename to res/fonts/licensehelv.txt diff --git a/src/other/defposter.png b/res/images/defposter.png similarity index 100% rename from src/other/defposter.png rename to res/images/defposter.png diff --git a/src/other/dolbyoff.png b/res/images/dolbyoff.png similarity index 100% rename from src/other/dolbyoff.png rename to res/images/dolbyoff.png diff --git a/src/other/dolbyon.png b/res/images/dolbyon.png similarity index 100% rename from src/other/dolbyon.png rename to res/images/dolbyon.png diff --git a/src/other/hd1080i.png b/res/images/hd1080i.png similarity index 100% rename from src/other/hd1080i.png rename to res/images/hd1080i.png diff --git a/src/other/hd720p.png b/res/images/hd720p.png similarity index 100% rename from src/other/hd720p.png rename to res/images/hd720p.png diff --git a/src/other/licence.txt b/res/images/licence.txt similarity index 100% rename from src/other/licence.txt rename to res/images/licence.txt diff --git a/src/other/properties.png b/res/images/properties.png similarity index 100% rename from src/other/properties.png rename to res/images/properties.png diff --git a/src/other/radio.png b/res/images/radio.png similarity index 100% rename from src/other/radio.png rename to res/images/radio.png diff --git a/src/other/recfolder.png b/res/images/recfolder.png similarity index 100% rename from src/other/recfolder.png rename to res/images/recfolder.png diff --git a/src/other/recording.png b/res/images/recording.png similarity index 100% rename from src/other/recording.png rename to res/images/recording.png diff --git a/src/other/recordings.png b/res/images/recordings.png similarity index 100% rename from src/other/recordings.png rename to res/images/recordings.png diff --git a/src/other/restart.png b/res/images/restart.png similarity index 100% rename from src/other/restart.png rename to res/images/restart.png diff --git a/src/other/sd576i.png b/res/images/sd576i.png similarity index 100% rename from src/other/sd576i.png rename to res/images/sd576i.png diff --git a/src/other/timers.png b/res/images/timers.png similarity index 100% rename from src/other/timers.png rename to res/images/timers.png diff --git a/src/other/tv.png b/res/images/tv.png similarity index 100% rename from src/other/tv.png rename to res/images/tv.png diff --git a/src/other/txtoff.png b/res/images/txtoff.png similarity index 100% rename from src/other/txtoff.png rename to res/images/txtoff.png diff --git a/src/other/txton.png b/res/images/txton.png similarity index 100% rename from src/other/txton.png rename to res/images/txton.png diff --git a/src/other/vdr.jpg b/res/images/vdr.jpg similarity index 100% rename from src/other/vdr.jpg rename to res/images/vdr.jpg diff --git a/src/other/vdrhires.jpg b/res/images/vdrhires.jpg similarity index 100% rename from src/other/vdrhires.jpg rename to res/images/vdrhires.jpg diff --git a/src/other/vdrhires.png b/res/images/vdrhires.png similarity index 100% rename from src/other/vdrhires.png rename to res/images/vdrhires.png diff --git a/src/other/wallpaper720p.jpg b/res/images/wallpaper720p.jpg similarity index 100% rename from src/other/wallpaper720p.jpg rename to res/images/wallpaper720p.jpg diff --git a/src/other/wallpaperNTSC.jpg b/res/images/wallpaperNTSC.jpg similarity index 100% rename from src/other/wallpaperNTSC.jpg rename to res/images/wallpaperNTSC.jpg diff --git a/src/other/wallpaperPAL.jpg b/res/images/wallpaperPAL.jpg similarity index 100% rename from src/other/wallpaperPAL.jpg rename to res/images/wallpaperPAL.jpg diff --git a/src/raspi-patches/fetch_libav.sh b/res/raspi-patches/fetch_libav.sh similarity index 100% rename from src/raspi-patches/fetch_libav.sh rename to res/raspi-patches/fetch_libav.sh diff --git a/src/raspi-patches/libav_transcode.patch b/res/raspi-patches/libav_transcode.patch similarity index 100% rename from src/raspi-patches/libav_transcode.patch rename to res/raspi-patches/libav_transcode.patch diff --git a/src/raspi-patches/readme.txt b/res/raspi-patches/readme.txt similarity index 100% rename from src/raspi-patches/readme.txt rename to res/raspi-patches/readme.txt diff --git a/run.sh b/run.sh deleted file mode 100755 index ecf0765..0000000 --- a/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -ssh -t targetpi "cd /dev/shm; ulimit -c unlimited; ./vomp" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt deleted file mode 100644 index 5796a17..0000000 --- a/src/CMakeLists.txt +++ /dev/null @@ -1,130 +0,0 @@ -cmake_minimum_required(VERSION 3.13.4) - -set (VOMP_OBJ_COMMON - util.cc control.cc thread.cc timers.cc i18n.cc udp4.cc udp6.cc vdpc.cc tcp.cc - message.cc messagequeue.cc wol.cc audio.cc video.cc - vdr.cc recman.cc recording.cc recinfo.cc channel.cc rectimer.cc event.cc - directory.cc mark.cc option.cc vfeed.cc afeed.cc - demuxer.cc demuxervdr.cc demuxerts.cc stream.cc osd.cc surface.cc - region.cc colour.cc boxstack.cc boxx.cc tbboxx.cc vrecording.cc - vinfo.cc vquestion.cc vrecordinglist.cc vrecordinglistclassic.cc - vrecordinglistadvanced.cc vepgsummary.cc vepglistadvanced.cc - vmute.cc vvolume.cc vtimerlist.cc vtimeredit.cc vrecordingmenu.cc - vchannellist.cc vwelcome.cc vvideorec.cc vepgsettimer.cc - vchannelselect.cc vserverselect.cc vconnect.cc vepg.cc vrecmove.cc - vradiorec.cc vaudioselector.cc vscreensaver.cc vopts.cc - wselectlist.cc wjpeg.cc wsymbol.cc wbutton.cc wtextbox.cc - woptionpane.cc woptionbox.cc wremoteconfig.cc wtabbar.cc led.cc - inputman.cc input.cc inputudp.cc inputlirc.cc vpicturebanner.cc - eventdispatcher.cc vdrrequestpacket.cc - vdrresponsepacket.cc vvideolivetv.cc sleeptimer.cc - wprogressbar.cc bitmap.cc dvbsubtitles.cc tfeed.cc vteletextview.cc - teletextdecodervbiebu.cc teletxt/txtfont.cc movieinfo.cc seriesinfo.cc - wmovieview.cc wseriesview.cc wtvmedia.cc wpictureview.cc - osdvector.cc surfacevector.cc buffer.cc config.cc log.cc - playervideorec.cc playervideolive.cc playerradiolive.cc playerradiorec.cc - imageloader.cc image.cc telem.cc -) -# abstractoption.cc - -set (VOMP_OBJ_RASPBERRY - main.cc threadp.cc osdopenvg.cc ledraspberry.cc videoomx.cc audioomx.cc imageomx.cc - wjpegsimple.cc inputlinux.cc inputcec.cc - omx/omx.cc omx/omximagedecode.cc omx/omxeglrender.cc imageomx2.cc -) - -# -#OBJ_WINDOWS = winmain.o threadwin.o inputwin.o ledwin.o videowin.o \ -# audiowin.o windowsosd.o dsallocator.o dssourcefilter.o dssourcepin.o \ -# wwinvideofilter.o wwinvideoh264filter.o wwinaudiofilter.o \ -# wwinmp3audiofilter.o wjpegsimple.o -# -#OBJ_WINLEGACY = osdwinpixel.o surfacewin.o \ -# fonts/helvB24.o fonts/helvB18.o -# -#OBJ_WINCURRENT = osdwinvector.o -# - -set (PNG_FILES - other/vdrhires.png - other/wallpaper720p.jpg - other/properties.png - other/radio.png - other/timers.png - other/tv.png - other/recordings.png - other/restart.png - other/hd1080i.png - other/hd720p.png - other/sd576i.png - other/txtoff.png - other/txton.png - other/dolbyoff.png - other/dolbyon.png - other/recording.png - other/recfolder.png - other/defposter.png -) - -project(vomp) -add_executable(vomp ${VOMP_OBJ_COMMON} ${VOMP_OBJ_RASPBERRY} pngs.o) - -# set(CMAKE_CXX_COMPILER_LAUNCHER "distcc") - not until cmake 3.17! - -if (${ENABLE_MOLD}) - target_link_options(vomp PRIVATE "-fuse-ld=${MOLD_BIN}") -endif() - -set(CMAKE_BUILD_TYPE Debug) -target_compile_options(vomp PRIVATE -O0) - -set_property(TARGET vomp PROPERTY CXX_STANDARD 14) - -find_path(INC_VC bcm_host.h PATHS /opt/vc/include) -find_path(INC_FT2 ft2build.h PATHS /usr/include/freetype2) -find_path(INC_MAGICK Magick++.h PATHS /usr/include/ImageMagick-6) -find_path(INC_MAGICK2 magick/magick-baseconfig.h PATHS /usr/include/arm-linux-gnueabihf/ImageMagick-6) - -target_include_directories(vomp SYSTEM PRIVATE ${INC_VC} ${INC_FT2} ${INC_MAGICK} ${INC_MAGICK2}) - -target_compile_options(vomp PRIVATE - -Werror=return-type - -Wall - -Wextra - -Wshadow - -Wmissing-declarations - -Winit-self - -Woverloaded-virtual - -Wmissing-format-attribute - -Wdisabled-optimization - -Wmissing-noreturn -) - -if (${ALL_WARNINGS}) - target_compile_options(vomp PRIVATE -Wold-style-cast -Wconversion) -endif() - -if (${FORCE_COLOR}) - target_compile_options(vomp PRIVATE -fdiagnostics-color=always) -endif() - - -target_compile_options(vomp PRIVATE - -D_GNU_SOURCE -DIPV4 -DIPV6 -DVOMP_PLATFORM_RASPBERRY -DMAGICKCORE_HDRI_ENABLE=0 - -DMAGICKCORE_QUANTUM_DEPTH=16 -DDEV) - -target_link_libraries(vomp - pthread stdc++ rt brcmEGL brcmOpenVG openmaxil bcm_host avformat avcodec - fmt avutil swresample m dl fontconfig freetype Magick++-6.Q16 - MagickWand-6.Q16 MagickCore-6.Q16 jsoncpp) - -target_link_directories(vomp PRIVATE - ${CMAKE_SYSROOT}/opt/vc/lib - ${CMAKE_SYSROOT}/usr/lib/arm-linux-gnueabihf) - -add_custom_command( - OUTPUT pngs.o - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} - COMMENT pngs.o - COMMAND ${CMAKE_LINKER} -r -b binary -o ../build/pngs.o ${PNG_FILES} -) diff --git a/src/osdopenvg.cc b/src/osdopenvg.cc index f9902fa..cb0c855 100644 --- a/src/osdopenvg.cc +++ b/src/osdopenvg.cc @@ -35,8 +35,8 @@ static const char* TAG = "OsdOpenVG"; -#define EXTERNALPICTURE(name, fname, fileextension) extern uint8_t name ## _data[] asm("_binary_other_"#fname"_"#fileextension"_start"); \ - extern uint8_t name ## _data_end[] asm("_binary_other_"#fname"_"#fileextension"_end"); +#define EXTERNALPICTURE(name, fname, fileextension) extern uint8_t name ## _data[] asm("_binary_"#fname"_"#fileextension"_start"); \ + extern uint8_t name ## _data_end[] asm("_binary_"#fname"_"#fileextension"_end"); EXTERNAL_PICTS -- 2.39.5