mirror of
				https://github.com/hyperion-project/hyperion.ng.git
				synced 2025-03-01 10:33:28 +00:00 
			
		
		
		
	* - New Media Foundation grabber
- JsonAPI available grabber fix
- commented json config removed
* Added libjpeg-turbo to dependencies
* Fix OSX build
Removed Azure Pipelines from build scripts
* Remove Platform from Dashboard
* Correct Grabber Namings
* Grabber UI improvements, generic JSONEditor Selection Update
* Active grabber fix
* Stop Framebuffer grabber on failure
* - Image format NV12 and I420 added
- Flip mode
- Scaling factor for MJPEG
- VSCode (compile before run)
- CI (push) dependency libjpeg-turbo added
* Refactor MediaFoundation (Part 1)
* Remove QDebug output
* Added image flipping ability to MF Grabber
* fix issue 1160
* -Reload MF Grabber only once per WebUI update
- Cleanup
* Improvements
* - Set 'Software Frame Decimation' begin to 0
- Removed grabber specific device name from Log
- Keep pixel format when switching resolution
- Display 'Flip mode' correct in Log
- BGR24 images always flipped
* Refactor MediaFoundation (Part 2)
* Refactor V4L2 grabber (part 1) (#62)
* Media Foundation grabber adapted to V4L2 change
* Enable Media Foundation grabber on windows
* Have fps as int, fix height typo
* Added video standards to JsonAPI output
* Error handling in source reader improved
* Fix "Frame to small" error
* Discovery VideoSources and Dynamically Update Editor
* Hide all element when no video grabber discovered, upate naming
* Do not show unsupported grabbers
* Copy Log to Clipboard
* Update Grabber schema and Defaults
* Update access levels and validate crop ranges
* Height and width in Qt grabber corrected
* Correct formatting
* Untabify
* Global component states across instances
* Components divided on the dashboard
* refactor
* Fix Merge-issues
* Database migration aligning with updated grabber model
* Align Grabber.js with new utility functions
* Allow editor-validation for enum-lists
* Handle "Show Explainations scenario" correctly
* Grabber - Ensure save is only possible on valid content
* Dashboard update + fix GlobalSignal connection
* Ensure default database is populated with current release
* Correct grabber4L2 access level
* Display Signal detection area in preview
* Write Hyperion version into default config on compiling.
* Create defaultconfig.json dynamically
* WebUI changes
* Correct grabber config look-ups
* Refactor i18n language loading
* Fix en.json
* Split global capture from instance capture config
* Update grabber default values
* Standalone grabber: Add --debug switch
* Enhance showInputOptionsForKey for multiple keys
* Add grabber instance link to system grabber config
* Only show signal detection area, if grabber is enabled
* Always show Active element on grabber page
* Remote control - Only display gabber status, if global grabber is enabled
* WebUI optimization (thx to @mkcologne)
Start Grabber only when global settings are enabled
Fixed an issue in the WebUI preview
* V4L2/MF changes
* Jsoneditor, Correct translation for default values
* Refactor LED-Device handling in UI and make element naming consistent
* MF Discovery extended
* Fix LGTM finding
* Support Grabber Bri, Hue, Sat and Con in UI, plus their defaults
* Concider Access level for item filtering
* Concider Access level for item filtering
* Revert "Concider Access level for item filtering"
This reverts commit 5b0ce3c0f2.
* Disable fpsSoftwareDecimation for framegrabber, as not supported yet
* JSON-Editor- Add updated schema for validation on dynamic elements
* added V4L2 color IDs
* LGTM findings fix
* destroy SR callback only on exit
* Grabber.js - Hide elements not supported by platform
* Fixed freezing start effect
* Grabber UI - Hardware controls - Show current values and allow to reset to defaults
* Grabber - Discovery - Add current values to properties
* Small things
* Clean-up Effects and have ENDLESS consistently defined
* Fix on/off/on priority during startup, by initializing _prevVisComp in line with background priority
* Add missing translation mappings
* DirectX Grabber reactivated/ QT Grabber size decimation fixed
* typo in push-master workflow
* Use PreciseTimer for Grabber to ensure stable FPS timing
* Set default Screencapture rate consistently
* Fix libjpeg-turbo download
* Remove Zero character from file
* docker-compile Add PLATFORM parameter, only copy output file after successful compile
* Framebuffer, Dispmanx, OSX, AML Grabber discovery, various clean-up and consistencies across grabbers
* Fix merge problem - on docker-compile Add PLATFORM parameter, only copy output file after successful compile
* Fix definition
* OSXFRameGrabber - Revert cast
* Clean-ups nach Feedback
* Disable certain libraries when building armlogic via standard stretch image as developer
* Add CEC availability to ServerInfo to have it platform independent
* Grabber UI - Fix problem that crop values are not populated when refining editor rage
* Preserve value when updating json-editor range
* LEDVisualisation - Clear image when source changes
* Fix - Preserve value when updating json-editor range
* LEDVisualisation - Clear image when no component is active
* Allow to have password handled by Password-Manager (#1263)
* Update default signal detection area to green assuming rainbow grabber
* LED Visualisation - Handle empty priority update
* Fix yuv420 in v4l2 grabber
* V4L2-Grabber discovery - Only report grabbers with valid video input information
* Grabber - Update static variables to have them working in release build
* LED Visualisation - ClearImage when no priorities
* LED Visualisation - Fix Logo resizing issue
* LED Visualisation - Have nearly black background and negative logo
Co-authored-by: LordGrey <lordgrey.emmel@gmail.com>
Co-authored-by: LordGrey <48840279+Lord-Grey@users.noreply.github.com>
		
	
		
			
				
	
	
		
			159 lines
		
	
	
		
			5.2 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			159 lines
		
	
	
		
			5.2 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
| #!/bin/sh
 | |
| 
 | |
| install_file()
 | |
| {
 | |
| 	src="$1"
 | |
| 	dest="$2"
 | |
| 
 | |
| 	if [ ! -e "$dest" ]
 | |
| 	then
 | |
| 		cp "$src" "${dest}"
 | |
| 		return 1
 | |
| 	else
 | |
| 		echo "--> Service file already exists, skip creation"
 | |
| 		return 0
 | |
| 	fi
 | |
| }
 | |
| 
 | |
| 
 | |
| echo "--- Hyperion ambient light postinstall ---"
 | |
| 
 | |
| #check system
 | |
| CPU_RPI=`grep -m1 -c 'BCM2708\|BCM2709\|BCM2710\|BCM2835\|BCM2836\|BCM2837\|BCM2711' /proc/cpuinfo`
 | |
| CPU_X32X64=`uname -m | grep 'x86_32\|i686\|x86_64' | wc -l`
 | |
| OS_HYPERBIAN=`grep ID /etc/os-release | grep -m1 -c HyperBian`
 | |
| 
 | |
| #Check for a bootloader as Berryboot
 | |
| BOOT_BERRYBOOT=$(grep -m1 -c '\(/var/media\|/media/pi\)/berryboot' /etc/mtab)
 | |
| 
 | |
| #get current system ip
 | |
| NET_IP=`hostname -I | cut -d " " -f1`
 | |
| 
 | |
| # search for users in system, returns first entry
 | |
| FOUND_USR=`who | grep -o -m1 '^\w*\b'` || "root"
 | |
| 
 | |
| # determine if we should use a service
 | |
| ENABLE_SERVICE=0
 | |
| STARTUP_MSG="echo ---> You can start Hyperion from your menu now"
 | |
| 
 | |
| if [ $CPU_RPI -eq 1 ]; then
 | |
| 	ENABLE_SERVICE=1
 | |
| 	STARTUP_MSG="echo ---> Hyperion has been installed as service, it will start on each system startup"
 | |
| fi
 | |
| 
 | |
| start_msg=""
 | |
| restart_msg=""
 | |
| 
 | |
| if grep -m1 systemd /proc/1/comm > /dev/null
 | |
| then
 | |
| 	echo "---> init deamon: systemd"
 | |
| 	# systemd
 | |
| 	if [ $OS_HYPERBIAN -eq 1 ]; then
 | |
| 		# start service only
 | |
| 		echo "--> Service file already exists, skip creation"
 | |
| 		start_msg="--> systemctl start hyperion"
 | |
| 		systemctl start hyperion
 | |
| 	else
 | |
| 		install_file /usr/share/hyperion/service/hyperion.systemd /etc/systemd/system/hyperiond@.service
 | |
| 		# service registration just on Raspberry Pi, probably need to ask the user how we should use the service. TODO service start in user login scope eg for x11?!
 | |
| 		if [ $ENABLE_SERVICE -eq 1 ]; then
 | |
| 			systemctl enable hyperiond"@${FOUND_USR}".service
 | |
| 			start_msg="--> systemctl start hyperiond for user ${FOUND_USR}"
 | |
| 			systemctl start hyperiond"@${FOUND_USR}"
 | |
| 		fi
 | |
| 	fi
 | |
| 
 | |
| elif [ -e /sbin/initctl ]
 | |
| then
 | |
| 	echo "---> init deamon: upstart"
 | |
| 	# upstart
 | |
| 	if [ $ENABLE_SERVICE -eq 1 ]; then
 | |
| 		install_file /usr/share/hyperion/service/hyperiond.initctl /etc/init/hyperion.conf && initctl reload-configuration
 | |
| 		start_msg="--> initctl start hyperiond"
 | |
| 		initctl start hyperiond
 | |
| 	fi
 | |
| 
 | |
| else
 | |
| 	echo "---> init deamon: sysV"
 | |
| 	# sysV
 | |
| 	if [ $ENABLE_SERVICE -eq 1 ]; then
 | |
| 		install_file /usr/share/hyperion/service/hyperion.init /etc/init.d/hyperiond && chmod +x /etc/init.d/hyperiond && update-rc.d hyperiond defaults 98 02
 | |
| 		start_msg="---> service hyperiond start"
 | |
| 		service hyperiond start
 | |
| 	fi
 | |
| fi
 | |
| 
 | |
| #cleanup
 | |
| rm -r /usr/share/hyperion/service
 | |
| 
 | |
| #link binarys and set exec bit
 | |
| BINSP=/usr/share/hyperion/bin
 | |
| BINTP=/usr/bin
 | |
| chmod +x -R $BINSP
 | |
| ln -fs $BINSP/hyperiond $BINTP/hyperiond
 | |
| ln -fs $BINSP/hyperion-remote $BINTP/hyperion-remote
 | |
| ln -fs $BINSP/hyperion-v4l2 $BINTP/hyperion-v4l2
 | |
| ln -fs $BINSP/hyperion-framebuffer $BINTP/hyperion-framebuffer 2>/dev/null
 | |
| ln -fs $BINSP/hyperion-dispmanx $BINTP/hyperion-dispmanx 2>/dev/null
 | |
| ln -fs $BINSP/hyperion-x11 $BINTP/hyperion-x11 2>/dev/null
 | |
| ln -fs $BINSP/hyperion-xcb $BINTP/hyperion-xcb 2>/dev/null
 | |
| ln -fs $BINSP/hyperion-aml $BINTP/hyperion-aml 2>/dev/null
 | |
| ln -fs $BINSP/hyperion-qt $BINTP/hyperion-qt 2>/dev/null
 | |
| 
 | |
| # install desktop icons / not on HyperBian
 | |
| if [ $OS_HYPERBIAN -ne 1 ]; then
 | |
| 	echo "---> Install Hyperion desktop icons"
 | |
| 	mkdir /usr/share/pixmaps/hyperion 2>/dev/null
 | |
| 	cp /usr/share/hyperion/desktop/*.png /usr/share/pixmaps/hyperion 2>/dev/null
 | |
| 	desktop-file-install /usr/share/hyperion/desktop/hyperiond.desktop 2>/dev/null
 | |
| fi
 | |
| 
 | |
| # cleanup desktop icons
 | |
| rm -r /usr/share/hyperion/desktop 2>/dev/null
 | |
| 
 | |
| #Check, if dtparam=spi=on is in place
 | |
| if [ $CPU_RPI -eq 1 ]; then
 | |
| 	BOOT_DIR="/boot"
 | |
| 	if [ $BOOT_BERRYBOOT -eq 1 ]; then
 | |
| 		BOOT_DIR=$(sed -ne "s#/dev/mmcblk0p1 \([^ ]*\) vfat rw,.*#\1#p" /etc/mtab)
 | |
| 	fi
 | |
| 	if [ -z "$BOOT_DIR" -o ! -f "$BOOT_DIR/config.txt" ]; then
 | |
| 		echo '---> Warning: RPi using BERRYBOOT found but can not locate where config.txt is to enable SPI. (BOOT_DIR='"$BOOT_DIR)"
 | |
| 		SPIOK=1 # Not sure if OK, but don't ask to reboot
 | |
| 	else
 | |
| 		SPIOK=`grep '^\dtparam=spi=on' "$BOOT_DIR/config.txt" | wc -l`
 | |
| 		if [ $SPIOK -ne 1 ]; then
 | |
| 			echo '---> Raspberry Pi found, but SPI is not set, we write "dtparam=spi=on" to '"$BOOT_DIR/config.txt"
 | |
| 			sed -i '$a dtparam=spi=on' "$BOOT_DIR/config.txt"
 | |
| 			REBOOTMESSAGE="echo Please reboot your Raspberry Pi, we inserted dtparam=spi=on to $BOOT_DIR/config.txt"
 | |
| 		fi
 | |
| 	fi
 | |
| fi
 | |
| 
 | |
| echo ${start_msg}
 | |
| 
 | |
| echo "-----------------------------------------------------------------------------"
 | |
| echo "---> Hyperion has been installed/updated!"
 | |
| echo "---> "
 | |
| $STARTUP_MSG
 | |
| echo "---> For configuration, visit with your browser: ${NET_IP}:8090"
 | |
| echo "---> or if already used by another service try: ${NET_IP}:8091"
 | |
| $REBOOTMESSAGE
 | |
| echo "-----------------------------------------------------------------------------"
 | |
| echo "Webpage: www.hyperion-project.org"
 | |
| echo "Forum: www.hyperion-project.org"
 | |
| echo "Documenation: docs.hyperion-project.org"
 | |
| echo "-----------------------------------------------------------------------------"
 | |
| 
 | |
| 
 | |
| if [ -e /opt/hyperion/ ]
 | |
| then
 | |
| 	echo
 | |
| 	echo "---------------------------------------------------------------------------------"
 | |
| 	echo "- It seemd that you have an older version of hyperion installed in /opt/hyperion -"
 | |
| 	echo "- please remove it to avoid problems                                            -"
 | |
| 	echo "---------------------------------------------------------------------------------"
 | |
| fi
 | |
| 
 | |
| exit 0
 |