-
-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Conflicts: # README.md
- Loading branch information
Showing
32 changed files
with
834 additions
and
620 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Funding | ||
patreon: meteyou | ||
ko_fi: mainsail |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Bug report | ||
description: Create a report to help us improve | ||
labels: ["bug", "triage"] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
This issue form is for reporting bugs only! | ||
If you have a feature request, please use [feature_request](/new?template=feature_request.yml) | ||
- type: textarea | ||
id: what-happened | ||
attributes: | ||
label: What happened | ||
description: >- | ||
A clear and concise description of what the bug is. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: expected-behavior | ||
attributes: | ||
label: What did you expect to happen | ||
description: >- | ||
A clear and concise description of what you expected to happen. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: repro-steps | ||
attributes: | ||
label: How to reproduce | ||
description: >- | ||
Minimal and precise steps to reproduce this bug. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: additional-info | ||
attributes: | ||
label: Additional information | ||
description: | | ||
If you have any additional information for us, use the field below. | ||
Please note, you can attach logs, screenshots or screen recordings here, by | ||
dragging and dropping files in the field below. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: Mainsail Discord | ||
url: https://discord.gg/skWTwTD | ||
about: Quickest way to get in contact |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Feature request | ||
description: Suggest an idea for this project | ||
labels: ["feature request"] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
This issue form is for feature requests only! | ||
If you've found a bug, please use [bug_report](/new?template=bug_report.yml) | ||
- type: textarea | ||
id: problem-description | ||
attributes: | ||
label: Is your feature request related to a problem? Please describe | ||
description: >- | ||
A clear and concise description of what the problem is. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: solution-description | ||
attributes: | ||
label: Describe the solution you'd like | ||
description: >- | ||
A clear and concise description of what you want to happen. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: possible-alternatives | ||
attributes: | ||
label: Describe alternatives you've considered | ||
description: >- | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
- type: textarea | ||
id: additional-info | ||
attributes: | ||
label: Additional information | ||
description: | | ||
If you have any additional information for us, use the field below. | ||
Please note, you can attach logs, screenshots or screen recordings here, by | ||
dragging and dropping files in the field below. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
#### crowsnest - A webcam Service for multiple Cams and Stream Services. | ||
#### | ||
#### Written by Stephan Wendel aka KwadFan <[email protected]> | ||
#### Copyright 2021 | ||
#### https://github.com/mainsail-crew/crowsnest | ||
#### | ||
#### This File is distributed under GPLv3 | ||
#### | ||
# shellcheck disable=all | ||
|
||
# crowsnest | ||
[ -n "$CROWSNEST_CROWSNEST_REPO_SHIP" ] || CROWSNEST_CROWSNEST_REPO_SHIP=https://github.com/mainsail-crew/crowsnest.git | ||
[ -n "$CROWSNEST_CROWSNEST_REPO_BRANCH" ] || CROWSNEST_CROWSNEST_REPO_BRANCH=master | ||
[ -n "$CROWSNEST_CROWSNEST_DEPS" ] || CROWSNEST_CROWSNEST_DEPS="git crudini bsdutils findutils v4l-utils ffmpeg" | ||
[ -n "$CROWSNEST_DEFAULT_CONF" ] || CROWSNEST_DEFAULT_CONF="mainsail_default.conf" | ||
[ -n "$CROWSNEST_DEFAULT_CONF_DIR" ] || CROWSNEST_DEFAULT_CONF_DIR="/home/${BASE_USER}/klipper_config" | ||
# Force Raspicam fix bool (1:yes / 0:no) | ||
[ -n "$CROWSNEST_FORCE_RASPICAMFIX" ] || CROWSNEST_FORCE_RASPICAMFIX=1 | ||
# Add Crowsnest to moonraker.conf (update manager) bool (1:yes / 0:no) | ||
[ -n "$CROWSNEST_ADD_CROWSNEST_MOONRAKER" ] || CROWSNEST_ADD_CROWSNEST_MOONRAKER=1 | ||
|
||
|
||
# ustreamer | ||
[ -n "$CROWSNEST_USTREAMER_DEPS" ] || CROWSNEST_USTREAMER_DEPS="git build-essential libevent-dev libjpeg-dev \ | ||
libbsd-dev libraspberrypi-dev libgpiod-dev" | ||
[ -n "$CROWSNEST_USTREAMER_WITH_OMX" ] || CROWSNEST_USTREAMER_WITH_OMX="y" | ||
[ -n "$CROWSNEST_USTREAMER_WITH_GPIO" ] || CROWSNEST_USTREAMER_WITH_GPIO="n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/usr/bin/env bash | ||
|
||
#### crowsnest - A webcam Service for multiple Cams and Stream Services. | ||
#### | ||
#### Written by Stephan Wendel aka KwadFan <[email protected]> | ||
#### Copyright 2021 | ||
#### https://github.com/mainsail-crew/crowsnest | ||
#### | ||
#### This File is distributed under GPLv3 | ||
#### | ||
|
||
# shellcheck disable=all | ||
|
||
# Error handling | ||
set -Ee | ||
|
||
source /common.sh | ||
install_cleanup_trap | ||
|
||
echo_green "Installing crowsnest and enable webcam Service ..." | ||
# install dependencies | ||
# force apt update | ||
apt update | ||
# It could use inbuilt dependencie check, but should speed up if preinstalled. | ||
# shellcheck disable=SC2086 | ||
check_install_pkgs ${CROWSNEST_CROWSNEST_DEPS} ${CROWSNEST_USTREAMER_DEPS} | ||
# Move to $HOME dir | ||
pushd "/home/${BASE_USER}" &> /dev/null || exit 1 | ||
# make sure config folder exist | ||
if [ ! -d "${CROWSNEST_DEFAULT_CONF_DIR}" ]; then | ||
sudo -u "${BASE_USER}" mkdir -p "${CROWSNEST_DEFAULT_CONF_DIR}" | ||
fi | ||
# clone Repo | ||
echo_green "Clone crowsnest repository ..." | ||
gitclone CROWSNEST_CROWSNEST_REPO crowsnest | ||
# install crowsnest - use crowsnest's make unattended | ||
pushd "/home/${BASE_USER}/crowsnest" &> /dev/null || exit 1 | ||
echo_green "Launch crowsnest install routine ..." | ||
pushd "/home/${BASE_USER}/crowsnest" &> /dev/null || exit 1 | ||
sudo -u "${BASE_USER}" make unattended | ||
# Apply Raspicam fix if enabled. | ||
if [ "${CROWSNEST_FORCE_RASPICAMFIX}" == "1" ]; then | ||
echo -en "Applying Raspicam Fix ... \r" | ||
sudo sh -c 'echo "bcm2835-v4l2" >> /etc/modules' | ||
sudo cp file_templates/bcm2835-v4l2.conf /etc/modprobe.d/ | ||
echo -e "Applying Raspicam Fix ... [OK]" | ||
fi | ||
popd &> /dev/null || exit 1 | ||
popd &> /dev/null || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
#!/bin/bash | ||
# shellcheck disable=all | ||
[ -n "$IS_REQ_PREINSTALL_VENV_DIR" ] || IS_REQ_PREINSTALL_VENV_DIR=/home/${BASE_USER}/klippy-env | ||
[ -n "$IS_REQ_PREINSTALL_DEPS" ] || IS_REQ_PREINSTALL_DEPS="python3-numpy python3-matplotlib" | ||
[ -n "$IS_REQ_PREINSTALL_PIP" ] || IS_REQ_PREINSTALL_PIP="numpy" | ||
[ -n "$IS_REQ_PREINSTALL_CFG_FILE" ] || IS_REQ_PREINSTALL_CFG_FILE="/boot/config.txt" | ||
[ -n "$IS_REQ_PREINSTALL_PIP" ] || IS_REQ_PREINSTALL_PIP="numpy<=1.21.4" | ||
[ -n "$IS_REQ_PREINSTALL_CFG_FILE" ] || IS_REQ_PREINSTALL_CFG_FILE="/boot/config.txt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,61 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Copyright 2021 by Stephan Wendel aka KwadFan | ||
# <[email protected]> | ||
# This file may distributed under GPLv3 | ||
######## | ||
|
||
### For easier maintainability look to klipper/config. | ||
#### MainsailOS Build Chain | ||
#### | ||
#### Klipper Install Module | ||
#### | ||
#### Written by Stephan Wendel aka KwadFan <[email protected]> | ||
#### Copyright 2021 - 2022 | ||
#### https://github.com/mainsail-crew/MainsailOS | ||
#### | ||
#### This File is distributed under GPLv3 | ||
#### | ||
|
||
# shellcheck enable=require-variable-braces | ||
|
||
## Source error handling, leave this in place | ||
set -xe | ||
set -Eex | ||
|
||
# Set LC_ALL to prevent errors | ||
export LC_ALL=C | ||
|
||
# Set DEBIAN_FRONTEND to noninteractive | ||
if [ "${DEBIAN_FRONTEND}" != "noninteractive" ]; then | ||
export DEBIAN_FRONTEND=noninteractive | ||
fi | ||
|
||
# Source CustomPIOS common.sh | ||
# shellcheck disable=SC1091 | ||
source /common.sh | ||
install_cleanup_trap | ||
|
||
echo_green "Input Shaper Requirements preinstall" | ||
echo_green "Install Input Shaper requirements ..." | ||
|
||
### install all deps at once for time consumption reasons. | ||
## APT: Update Repo Database and install Dependencies | ||
|
||
# Force apt update | ||
apt update | ||
echo_green "Installing Input Shaper Dependencies ..." | ||
apt update && apt install ${IS_REQ_PREINSTALL_DEPS} -y | ||
|
||
### numpy Parallelizing | ||
function max_cores() { | ||
local core_count | ||
core_count="$(nproc)" | ||
if [ "${core_count}" -lt 3 ]; then | ||
echo "$core_count" | ||
else | ||
echo "$(("${core_count}" -1))" | ||
fi | ||
} | ||
|
||
echo_green "System has $(nproc) Cores available." | ||
echo_green "Using $(max_cores)..." | ||
export NPY_NUM_BUILD_JOBS="$(max_cores)" | ||
|
||
# shellcheck disable=SC2086 | ||
# Disabling shellcheck SC2086, because we want "wordsplitting" | ||
check_install_pkgs ${IS_REQ_PREINSTALL_DEPS} | ||
|
||
### Check for Klipper Venv installed. | ||
pushd /home/${BASE_USER} | ||
pushd "/home/${BASE_USER}" &> /dev/null || exit 1 | ||
if [ -d "${IS_REQ_PREINSTALL_VENV_DIR}" ] && [ -x "${IS_REQ_PREINSTALL_VENV_DIR}/bin/pip" ]; then | ||
echo_green "Installing numpy..." | ||
sudo -u ${BASE_USER} ${IS_REQ_PREINSTALL_VENV_DIR}/bin/pip install -v "${IS_REQ_PREINSTALL_PIP}" | ||
sudo -u "${BASE_USER}" "${IS_REQ_PREINSTALL_VENV_DIR}"/bin/pip install -v "${IS_REQ_PREINSTALL_PIP}" | ||
else | ||
echo_red "Klipper Venv not found!" | ||
return 1 | ||
fi | ||
|
||
## Cleanup | ||
sudo -u ${BASE_USER} rm -rf /home/${BASE_USER}/.cache | ||
popd | ||
echo_green "Cleanup ..." | ||
sudo -u "${BASE_USER}" rm -rf "/home/${BASE_USER}/.cache" | ||
popd &> /dev/null || exit 1 | ||
|
||
## Enable spi interface by default | ||
echo_green "Enabling SPI Interface..." | ||
sed -i 's/#dtparam=spi=on/dtparam=spi=on/' ${IS_REQ_PREINSTALL_CFG_FILE} | ||
sed -i 's/#dtparam=spi=on/dtparam=spi=on/' "${IS_REQ_PREINSTALL_CFG_FILE}" | ||
|
||
### EOF | ||
echo_green "Install Input Shaper requirements ... done!" |
Oops, something went wrong.