Skip to content

Commit

Permalink
Remove requirement for desktop env when installing sense-emu
Browse files Browse the repository at this point in the history
Applications with GUI can be launched via ssh, no need for a desktop environment.

Signed-off-by: mlradu <[email protected]>
  • Loading branch information
mlradu committed May 27, 2024
1 parent 940f269 commit db93be6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
3 changes: 1 addition & 2 deletions config
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,9 @@ CARRIER=
#
#
#
# [RASPBERRY PI SPECIFIC PACKAGES]*
# [RASPBERRY PI SPECIFIC PACKAGES]
# Install the following RaspberryPi specific packages: raspi-config, GPIO related (pigpio, python3-gpio, raspi-gpio, python3-rpi.gpio),
# VideoCore debugging related (vcdbg), sense-hat, sense-emu.
# *partially depends on DESKTOP ENVIRONMENT (only sense-hat and sense-emu packages)
INSTALL_RPI_PACKAGES=n
#
#
Expand Down
23 changes: 9 additions & 14 deletions stages/07.extra-tweaks/02.install-rpi-packages/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@

if [ "${INSTALL_RPI_PACKAGES}" = y ]; then

if [ "${CONFIG_DESKTOP}" = y ]; then
# Copy application launcher and icon for sense_emu
install -d "${BUILD_DIR}/usr/local/share/sense"
install -m 644 "${BASH_SOURCE%%/run.sh}"/files/sense_emu_gui.svg "${BUILD_DIR}/usr/local/share/sense/"
install -d "${BUILD_DIR}/usr/local/share/applications/"
install -m 644 "${BASH_SOURCE%%/run.sh}"/files/sense_emu_gui.desktop "${BUILD_DIR}/usr/local/share/applications/"
else
echo "Sense HAT and emulator won't be installed because CONFIG_DESKTOP is set to 'n'."
fi
# Copy application launcher and icon for sense_emu
install -d "${BUILD_DIR}/usr/local/share/sense"
install -m 644 "${BASH_SOURCE%%/run.sh}"/files/sense_emu_gui.svg "${BUILD_DIR}/usr/local/share/sense/"
install -d "${BUILD_DIR}/usr/local/share/applications/"
install -m 644 "${BASH_SOURCE%%/run.sh}"/files/sense_emu_gui.desktop "${BUILD_DIR}/usr/local/share/applications/"


chroot "${BUILD_DIR}" << EOF
# Uncomment packages installation from raspi.list
Expand All @@ -33,11 +30,9 @@ chroot "${BUILD_DIR}" << EOF
# Install vcdbg (tool for debugging VideoCore)
apt install -y vcdbg
if [ "${CONFIG_DESKTOP}" = y ]; then
# Install sense-hat and sense-emu
apt install -y sense-hat python3-sense-emu
yes | pip install sense-emu --break-system-packages
fi
# Install sense-hat and sense-emu
apt install -y sense-hat python3-sense-emu
yes | pip install sense-emu --break-system-packages
# Comment package installation from raspi.list
sed -i 's/deb /#deb /' /etc/apt/sources.list.d/raspi.list
Expand Down

0 comments on commit db93be6

Please sign in to comment.