Update 6.0.0

This commit is contained in:
Cyril 2024-05-01 16:10:07 +02:00
parent bb0b7539a0
commit c8db437b79
63 changed files with 3667 additions and 737 deletions

View file

@ -28,7 +28,11 @@ function install_camera_settings_control(){
mkdir -p "$HS_CONFIG_FOLDER"
fi
echo -e "Info: Linking file..."
cp "$CAMERA_SETTINGS_URL" "$HS_CONFIG_FOLDER"/camera-settings.cfg
if v4l2-ctl --list-devices | grep -q 'CCX2F3298'; then
cp "$CAMERA_SETTINGS_NEBULA_URL" "$HS_CONFIG_FOLDER"/camera-settings.cfg
else
cp "$CAMERA_SETTINGS_URL" "$HS_CONFIG_FOLDER"/camera-settings.cfg
fi
if grep -q "include Helper-Script/camera-settings" "$PRINTER_CFG" ; then
echo -e "Info: Camera Settings configurations are already enabled in printer.cfg file..."
else

View file

@ -31,28 +31,48 @@ function remove_creality_web_interface(){
case "${yn}" in
Y|y)
echo -e "${white}"
echo -e "Info: Disabling files..."
if [ -f /usr/bin/web-server ]; then
mv /usr/bin/web-server /usr/bin/web-server.disabled
fi
if [ -f /usr/bin/Monitor ]; then
mv /usr/bin/Monitor /usr/bin/Monitor.disabled
fi
echo -e "Info: Stopping services..."
set +e
killall -q Monitor
killall -q web-server
set -e
if [ -d "$FLUIDD_FOLDER" ] && [ ! -d "$MAINSAIL_FOLDER" ]; then
echo -e "Info: Applying changes..."
sed -i '/listen 4408 default_server;/a \ listen 80;' /usr/data/nginx/nginx/nginx.conf
if [ "$model" = "3V3" ]; then
sed -i '/listen 4408 default_server;/a \ listen 80;' /etc/nginx/nginx.conf
else
sed -i '/listen 4408 default_server;/a \ listen 80;' /usr/data/nginx/nginx/nginx.conf
fi
echo -e "Info: Disabling files..."
if [ -f /usr/bin/web-server ]; then
mv /usr/bin/web-server /usr/bin/web-server.disabled
fi
if [ -f /usr/bin/Monitor ]; then
mv /usr/bin/Monitor /usr/bin/Monitor.disabled
fi
echo -e "Info: Stopping services..."
set +e
killall -q Monitor
killall -q web-server
set -e
echo -e "Info: Restarting Nginx service..."
restart_nginx
ok_msg "Creality Web Interface has been removed successfully!"
echo -e " ${white}You can now connect to Fluidd Web Interface with ${yellow}http://$(check_ipaddress)${white}"
elif [ ! -d "$FLUIDD_FOLDER" ] && [ -d "$MAINSAIL_FOLDER" ]; then
echo -e "Info: Applying changes..."
sed -i '/listen 4409 default_server;/a \ listen 80;' /usr/data/nginx/nginx/nginx.conf
if [ "$model" = "3V3" ]; then
sed -i '/listen 4409 default_server;/a \ listen 80;' /etc/nginx/nginx.conf
else
sed -i '/listen 4409 default_server;/a \ listen 80;' /usr/data/nginx/nginx/nginx.conf
fi
echo -e "Info: Disabling files..."
if [ -f /usr/bin/web-server ]; then
mv /usr/bin/web-server /usr/bin/web-server.disabled
fi
if [ -f /usr/bin/Monitor ]; then
mv /usr/bin/Monitor /usr/bin/Monitor.disabled
fi
echo -e "Info: Stopping services..."
set +e
killall -q Monitor
killall -q web-server
set -e
echo -e "Info: Restarting Nginx service..."
restart_nginx
ok_msg "Creality Web Interface has been removed successfully!"
@ -60,13 +80,28 @@ function remove_creality_web_interface(){
elif [ -d "$FLUIDD_FOLDER" ] && [ -d "$MAINSAIL_FOLDER" ]; then
local interface_choice
while true; do
echo
read -p " ${white}Which Web Interface do you want to set as default (on port 80)? (${yellow}fluidd${white}/${yellow}mainsail${white}): ${yellow}" interface_choice
case "${interface_choice}" in
FLUIDD|fluidd)
echo -e "${white}"
echo -e "Info: Applying changes..."
sed -i '/listen 4408 default_server;/a \ listen 80;' /usr/data/nginx/nginx/nginx.conf
if [ "$model" = "3V3" ]; then
sed -i '/listen 4408 default_server;/a \ listen 80;' /etc/nginx/nginx.conf
else
sed -i '/listen 4408 default_server;/a \ listen 80;' /usr/data/nginx/nginx/nginx.conf
fi
echo -e "Info: Disabling files..."
if [ -f /usr/bin/web-server ]; then
mv /usr/bin/web-server /usr/bin/web-server.disabled
fi
if [ -f /usr/bin/Monitor ]; then
mv /usr/bin/Monitor /usr/bin/Monitor.disabled
fi
echo -e "Info: Stopping services..."
set +e
killall -q Monitor
killall -q web-server
set -e
echo -e "Info: Restarting Nginx service..."
restart_nginx
ok_msg "Creality Web Interface has been removed successfully!"
@ -75,7 +110,23 @@ function remove_creality_web_interface(){
MAINSAIL|mainsail)
echo -e "${white}"
echo -e "Info: Applying changes..."
sed -i '/listen 4409 default_server;/a \ listen 80;' /usr/data/nginx/nginx/nginx.conf
if [ "$model" = "3V3" ]; then
sed -i '/listen 4409 default_server;/a \ listen 80;' /etc/nginx/nginx.conf
else
sed -i '/listen 4409 default_server;/a \ listen 80;' /usr/data/nginx/nginx/nginx.conf
fi
echo -e "Info: Disabling files..."
if [ -f /usr/bin/web-server ]; then
mv /usr/bin/web-server /usr/bin/web-server.disabled
fi
if [ -f /usr/bin/Monitor ]; then
mv /usr/bin/Monitor /usr/bin/Monitor.disabled
fi
echo -e "Info: Stopping services..."
set +e
killall -q Monitor
killall -q web-server
set -e
echo -e "Info: Restarting Nginx service..."
restart_nginx
ok_msg "Creality Web Interface has been removed successfully!"
@ -104,6 +155,12 @@ function restore_creality_web_interface(){
case "${yn}" in
Y|y)
echo -e "${white}"
echo -e "Info: Restoring changes..."
if [ "$model" = "3V3" ]; then
sed -i '/listen 80;/d' /etc/nginx/nginx.conf
else
sed -i '/listen 80;/d' /usr/data/nginx/nginx/nginx.conf
fi
echo -e "Info: Restoring files..."
if [ -f /usr/bin/web-server.disabled ] && [ -f "$INITD_FOLDER"/S99start_app ]; then
mv /usr/bin/web-server.disabled /usr/bin/web-server
@ -111,8 +168,6 @@ function restore_creality_web_interface(){
if [ -f /usr/bin/Monitor.disabled ] && [ ! -d "$GUPPY_SCREEN_FOLDER" ]; then
mv /usr/bin/Monitor.disabled /usr/bin/Monitor
fi
echo -e "Info: Restoring changes..."
sed -i '/listen 80;/d' /usr/data/nginx/nginx/nginx.conf
echo -e "Info: Restarting services..."
restart_nginx
set +e

View file

@ -14,6 +14,19 @@ function fluidd_message(){
bottom_line
}
function fluidd_3v3_message(){
top_line
title 'Fluidd' "${yellow}"
inner_line
hr
echo -e "${cyan}Fluidd is a free and open-source Klipper Web interface for ${white}"
echo -e "${cyan}managing your 3d printer. ${white}"
echo -e "${cyan}This allows to have an updated version of Fluidd. ${white}"
echo -e "${cyan}It will be accessible on port 4408. ${white}"
hr
bottom_line
}
function install_fluidd(){
fluidd_message
local yn
@ -87,4 +100,85 @@ function remove_fluidd(){
error_msg "Please select a correct choice!";;
esac
done
}
function install_fluidd_3v3(){
fluidd_3v3_message
local yn
while true; do
install_msg "Updated Fluidd" yn
case "${yn}" in
Y|y)
echo -e "${white}"
echo -e "Info: Downloading Fluidd file..."
"$CURL" -L "$FLUIDD_URL" -o "$USR_DATA"/fluidd.zip
echo -e "Info: Creating directory..."
if [ -d "$FLUIDD_FOLDER" ]; then
rm -rf "$FLUIDD_FOLDER"
fi
mkdir -p "$FLUIDD_FOLDER"
mv "$USR_DATA"/fluidd.zip "$FLUIDD_FOLDER"
echo -e "Info: Extracting files..."
unzip "$FLUIDD_FOLDER"/fluidd.zip -d "$FLUIDD_FOLDER"
echo -e "Info: Deleting existing folders..."
rm -f "$FLUIDD_FOLDER"/fluidd.zip
rm -rf "$USR_SHARE"/fluidd
echo -e "Info: Linking files..."
ln -sf "$FLUIDD_FOLDER" "$USR_SHARE"/fluidd
if grep -q "#\[update_manager fluidd\]" "$MOONRAKER_CFG" ; then
echo -e "Info: Enabling Fluidd configurations for Update Manager..."
sed -i -e 's/^\s*#[[:space:]]*\[update_manager fluidd\]/[update_manager fluidd]/' -e '/^\[update_manager fluidd\]/,/^\s*$/ s/^\(\s*\)#/\1/' "$MOONRAKER_CFG"
else
echo -e "Info: Fluidd configurations are already enabled for Update Manager..."
fi
echo -e "Info: Restarting Nginx service..."
restart_nginx
echo -e "Info: Restarting Moonraker service..."
stop_moonraker
start_moonraker
ok_msg "Updated Fluidd has been installed successfully!"
echo -e " You can now connect to Fluidd Web Interface with ${yellow}http://$(check_ipaddress):4408${white}"
return;;
N|n)
error_msg "Installation canceled!"
return;;
*)
error_msg "Please select a correct choice!";;
esac
done
}
function remove_fluidd_3v3(){
fluidd_3v3_message
local yn
while true; do
remove_msg "Updated Fluidd" yn
case "${yn}" in
Y|y)
echo -e "${white}"
echo -e "Info: Removing files..."
rm -rf "$FLUIDD_FOLDER"
if grep -q "\[update_manager fluidd\]" "$MOONRAKER_CFG" ; then
echo -e "Info: Disabling Fluidd configurations for Update Manager..."
sed -i '/^\[update_manager fluidd\]/,/^\s*$/ s/^\(\s*\)\([^#]\)/#\1\2/' "$MOONRAKER_CFG"
else
echo -e "Info: Fluidd configurations are already disabled for Update Manager..."
fi
echo -e "Info: Restoring stock Fluidd version..."
rm -rf /overlay/upper/usr/share/fluidd
mount -o remount /
echo -e "Info: Restarting Nginx service..."
restart_nginx
echo -e "Info: Restarting Moonraker service..."
stop_moonraker
start_moonraker
ok_msg "Updated Fluidd has been removed successfully!"
return;;
N|n)
error_msg "Deletion canceled!"
return;;
*)
error_msg "Please select a correct choice!";;
esac
done
}

View file

@ -25,23 +25,18 @@ function install_git_backup(){
if [ -f "$HS_CONFIG_FOLDER"/git-backup.cfg ]; then
rm -f "$HS_CONFIG_FOLDER"/git-backup.cfg
fi
if [ -d "$KLIPPER_CONFIG_FOLDER"/.git ]; then
rm -rf "$KLIPPER_CONFIG_FOLDER"/.git
fi
if [ -d "$HS_BACKUP_FOLDER"/git-backup ]; then
rm -rf "$HS_BACKUP_FOLDER"/git-backup
fi
if [ ! -d "$HS_CONFIG_FOLDER" ]; then
mkdir -p "$HS_CONFIG_FOLDER"
fi
echo -e "Info: Running Git Backup installer..."
chmod 755 "$GIT_BACKUP_INSTALLER"
sh "$GIT_BACKUP_INSTALLER" -i
echo -e "Info: Linking file..."
ln -sf "$GIT_BACKUP_URL" "$HS_CONFIG_FOLDER"/git-backup.cfg
if grep -q "include Helper-Script/git-backup" "$PRINTER_CFG" ; then
echo -e "Info: Git Backup configurations are already enabled in printer.cfg file..."
else
echo -e "Info: Adding Git Backup configurations in printer.cfg file..."
sed -i '/\[include printer_params\.cfg\]/a \[include Helper-Script/git-backup\.cfg\]' "$PRINTER_CFG"
fi
echo -e "Info: Restarting Klipper service..."
restart_klipper
ok_msg "Git Backup has been installed and configured successfully!"
return;;
N|n)
error_msg "Installation canceled!"
@ -61,11 +56,24 @@ function remove_git_backup(){
Y|y)
echo -e "${white}"
echo -e "Info: Stopping services..."
/etc/init.d/S52Git-Backup stop
set +e
/etc/init.d/S52Git-Backup stop >/dev/null 2>&1
killall -q git-backup.sh
killall -q inotifywait
set -e
echo -e "Info: Removing files..."
rm -f "$HS_CONFIG_FOLDER"/git-backup.cfg
rm -f "$INITD_FOLDER"/S52Git-Backup
if [ -f "$INITD_FOLDER"/S52Git-Backup ];then
rm -f "$INITD_FOLDER"/S52Git-Backup
fi
if [ -f "$INITD_FOLDER"/disabled.S52Git-Backup ];then
rm -f "$INITD_FOLDER"/disabled.S52Git-Backup
fi
rm -rf "$KLIPPER_CONFIG_FOLDER"/.git
rm -rf "$HS_BACKUP_FOLDER"/git-backup
if [ ! -n "$(ls -A "$HS_BACKUP_FOLDER")" ]; then
rm -rf "$HS_BACKUP_FOLDER"
fi
if grep -q "include Helper-Script/git-backup" "$PRINTER_CFG" ; then
echo -e "Info: Removing Git Backup configurations in printer.cfg file..."
sed -i '/include Helper-Script\/git-backup\.cfg/d' "$PRINTER_CFG"
@ -75,7 +83,6 @@ function remove_git_backup(){
if [ -f "$ENTWARE_FILE" ]; then
echo -e "Info: Removing packages..."
"$ENTWARE_FILE" --autoremove remove inotifywait
"$ENTWARE_FILE" --autoremove remove procps-ng-pkill
fi
if [ ! -n "$(ls -A "$HS_CONFIG_FOLDER")" ]; then
rm -rf "$HS_CONFIG_FOLDER"

View file

@ -24,28 +24,44 @@ function install_guppy_screen(){
if [ -f "$USR_DATA"/guppyscreen.tar.gz ]; then
rm -f "$USR_DATA"/guppyscreen.tar.gz
fi
if [ $K1 -eq 1 ]; then
if [ "$model" = "K1" ] || [ "$model" = "3V3" ]; then
local theme_choice
while true; do
read -p " Do you want to install it with ${green}Material Design ${white}or ${green}Z-Bolt ${white}theme? (${yellow}material${white}/${yellow}zbolt${white}): ${yellow}" theme_choice
read -p " Do you want to install ${green}Nightly Build ${white}or ${green}Release Build ${white}? (${yellow}nightly${white}/${yellow}release${white}): ${yellow}" theme_choice
case "${theme_choice}" in
MATERIAL|material)
NIGHTLY|nightly)
echo -e "${white}"
echo -e "Info: Downloading Guppy Screen..."
"$CURL" -L https://github.com/ballaswag/guppyscreen/releases/download/nightly/guppyscreen.tar.gz -o "$USR_DATA"/guppyscreen.tar.gz
break;;
RELEASE|release)
echo -e "${white}"
echo -e "Info: Downloading Guppy Screen..."
"$CURL" -L https://github.com/ballaswag/guppyscreen/releases/latest/download/guppyscreen.tar.gz -o "$USR_DATA"/guppyscreen.tar.gz
break;;
ZBOLT|zbolt)
echo -e "${white}"
echo -e "Info: Downloading Guppy Screen..."
"$CURL" -L https://github.com/ballaswag/guppyscreen/releases/latest/download/guppyscreen-zbolt.tar.gz -o "$USR_DATA"/guppyscreen.tar.gz
break;;
*)
error_msg "Please select a correct choice!";;
esac
done
else
echo -e "Info: Downloading Guppy Screen..."
"$CURL" -L https://github.com/ballaswag/guppyscreen/releases/latest/download/guppyscreen-smallscreen.tar.gz -o "$USR_DATA"/guppyscreen.tar.gz
local theme_choice
while true; do
read -p " Do you want to install ${green}Nightly Build ${white}or ${green}Release Build ${white}? (${yellow}nightly${white}/${yellow}release${white}): ${yellow}" theme_choice
case "${theme_choice}" in
NIGHTLY|nightly)
echo -e "${white}"
echo -e "Info: Downloading Guppy Screen..."
"$CURL" -L https://github.com/ballaswag/guppyscreen/releases/download/nightly/guppyscreen-smallscreen.tar.gz -o "$USR_DATA"/guppyscreen.tar.gz
break;;
RELEASE|release)
echo -e "${white}"
echo -e "Info: Downloading Guppy Screen..."
"$CURL" -L https://github.com/ballaswag/guppyscreen/releases/latest/download/guppyscreen-smallscreen.tar.gz -o "$USR_DATA"/guppyscreen.tar.gz
break;;
*)
error_msg "Please select a correct choice!";;
esac
done
fi
echo -e "Info: Installing files..."
tar -xvf "$USR_DATA"/guppyscreen.tar.gz -C "$USR_DATA"
@ -114,7 +130,17 @@ function install_guppy_screen(){
mkdir -p "$KLIPPER_CONFIG_FOLDER"/GuppyScreen/scripts
cp "$GUPPY_SCREEN_FOLDER"/scripts/*.cfg "$KLIPPER_CONFIG_FOLDER"/GuppyScreen
cp "$GUPPY_SCREEN_FOLDER"/scripts/*.py "$KLIPPER_CONFIG_FOLDER"/GuppyScreen/scripts
ln -sf "$GUPPY_SCREEN_URL1" "$KLIPPER_CONFIG_FOLDER"/GuppyScreen/guppy_update.cfg
if [ "$model" = "K1" ]; then
ln -sf "$GUPPY_SCREEN_URL1" "$KLIPPER_CONFIG_FOLDER"/GuppyScreen/guppy_update.cfg
else
ln -sf "$GUPPY_SCREEN_3V3_URL" "$KLIPPER_CONFIG_FOLDER"/GuppyScreen/guppy_update.cfg
fi
if [ "$model" = "3V3" ]; then
if [ -f "$GUPPY_SCREEN_FOLDER"/guppyconfig.json ];then
rm -f "$GUPPY_SCREEN_FOLDER"/guppyconfig.json
fi
cp "$GUPPY_SCREEN_CONFIG_3V3_URL" "$GUPPY_SCREEN_FOLDER"/guppyconfig.json
fi
chmod 775 "$GUPPY_SCREEN_URL2"
if grep -q "include GuppyScreen" "$PRINTER_CFG" ; then
echo -e "Info: Guppy Screen configurations are already enabled in printer.cfg file."
@ -128,11 +154,13 @@ function install_guppy_screen(){
else
echo -e "Info: Stock configuration is already disabled in gcode_macro.cfg file..."
fi
if grep -q '\[gcode_macro INPUTSHAPER\]' "$MACROS_CFG" ; then
echo -e "Info: Replacing stock configuration in gcode_macro.cfg file..."
sed -i 's/SHAPER_CALIBRATE AXIS=y/SHAPER_CALIBRATE/' "$MACROS_CFG"
else
echo -e "Info: Stock configuration is already replaced in gcode_macro.cfg file..."
if [ "$model" = "K1" ]; then
if grep -q '\[gcode_macro INPUTSHAPER\]' "$MACROS_CFG" ; then
echo -e "Info: Replacing stock configuration in gcode_macro.cfg file..."
sed -i 's/SHAPER_CALIBRATE AXIS=y/SHAPER_CALIBRATE/' "$MACROS_CFG"
else
echo -e "Info: Stock configuration is already replaced in gcode_macro.cfg file..."
fi
fi
sync
echo -e "Info: Restarting Moonraker service..."
@ -221,11 +249,13 @@ function remove_guppy_screen(){
else
echo -e "Info: Stock configuration is already enabled in gcode_macro.cfg file..."
fi
if grep -q '\[gcode_macro INPUTSHAPER\]' "$MACROS_CFG" ; then
echo -e "Info: Restoring stock configuration in gcode_macro.cfg file..."
sed -i 's/SHAPER_CALIBRATE/SHAPER_CALIBRATE AXIS=y/' "$MACROS_CFG"
else
echo -e "Info: Stock configuration is already restored in gcode_macro.cfg file..."
if [ "$model" = "K1" ]; then
if grep -q '\[gcode_macro INPUTSHAPER\]' "$MACROS_CFG" ; then
echo -e "Info: Restoring stock configuration in gcode_macro.cfg file..."
sed -i 's/SHAPER_CALIBRATE/SHAPER_CALIBRATE AXIS=y/' "$MACROS_CFG"
else
echo -e "Info: Stock configuration is already restored in gcode_macro.cfg file..."
fi
fi
echo -e "Info: Restarting Moonraker service..."
stop_moonraker

View file

@ -50,7 +50,7 @@ function install_improved_shapers(){
else
echo -e "Info: [gcode_macro AUTOTUNE_SHAPERS] configurations are already disabled in gcode_macro.cfg file..."
fi
if [ $K1 -eq 1 ]; then
if [ "$model" = "K1" ]; then
if grep -q '\[gcode_macro INPUTSHAPER\]' "$MACROS_CFG" ; then
echo -e "Info: Replacing [gcode_macro INPUTSHAPER] configurations in gcode_macro.cfg file..."
sed -i 's/SHAPER_CALIBRATE AXIS=y/SHAPER_CALIBRATE/' "$MACROS_CFG"
@ -106,7 +106,7 @@ function remove_improved_shapers(){
else
echo -e "Info: [gcode_macro AUTOTUNE_SHAPERS] configurations are already restored in gcode_macro.cfg file..."
fi
if [ $K1 -eq 1 ]; then
if [ "$model" = "K1" ]; then
if grep -q '\[gcode_macro INPUTSHAPER\]' "$MACROS_CFG" ; then
echo -e "Info: Restoring [gcode_macro INPUTSHAPER] configurations in gcode_macro.cfg file..."
sed -i 's/SHAPER_CALIBRATE/SHAPER_CALIBRATE AXIS=y/' "$MACROS_CFG"

View file

@ -8,7 +8,10 @@ function kamp_message(){
inner_line
hr
echo -e "${cyan}KAMP is an extension that allows to generate a mesh and ${white}"
echo -e "${cyan}purge line only in the area you really need it. ${white}"
echo -e "${cyan}purge line only in the area of the bed used by the objects ${white}"
echo -e "${cyan}being printed. When used, the method will automatically ${white}"
echo -e "${cyan}adjust the mesh parameters based on the area occupied by the ${white}"
echo -e "${cyan}defined print objects. ${white}"
hr
bottom_line
}
@ -37,8 +40,19 @@ function install_kamp(){
ln -sf "$KAMP_URL"/Line_Purge.cfg "$KAMP_FOLDER"/Line_Purge.cfg
ln -sf "$KAMP_URL"/Prusa_Slicer.cfg "$KAMP_FOLDER"/Prusa_Slicer.cfg
ln -sf "$KAMP_URL"/Smart_Park.cfg "$KAMP_FOLDER"/Smart_Park.cfg
ln -sf "$KAMP_URL"/Start_Print.cfg "$KAMP_FOLDER"/Start_Print.cfg
if [ "$model" = "K1" ]; then
ln -sf "$KAMP_URL"/Start_Print.cfg "$KAMP_FOLDER"/Start_Print.cfg
else
ln -sf "$KAMP_URL"/Start_Print-3v3.cfg "$KAMP_FOLDER"/Start_Print.cfg
fi
cp "$KAMP_URL"/KAMP_Settings.cfg "$KAMP_FOLDER"/KAMP_Settings.cfg
ln -sf "$VIRTUAL_PINS_URL" "$VIRTUAL_PINS_FILE"
if grep -q "[virtual_pins]" "$PRINTER_CFG" ; then
echo -e "Info: Adding [virtual_pins] configuration in printer.cfg file..."
sed -i '/\[include sensorless.cfg\]/i [virtual_pins]' "$PRINTER_CFG"
else
echo -e "Info: [virtual_pins] configuration is already enabled in printer.cfg file..."
fi
if grep -q "include Helper-Script/KAMP/KAMP_Settings" "$PRINTER_CFG" ; then
echo -e "Info: KAMP configurations are already enabled in printer.cfg file..."
else
@ -97,6 +111,14 @@ function remove_kamp(){
echo -e "${white}"
echo -e "Info: Removing files..."
rm -rf "$HS_CONFIG_FOLDER"/KAMP
rm -f "$KLIPPER_EXTRAS_FOLDER"/virtual_pins.py
rm -f "$KLIPPER_EXTRAS_FOLDER"/virtual_pins.pyc
if grep -q "[virtual_pins]" "$PRINTER_CFG" ; then
echo -e "Info: Removing [virtual_pins] configuration in printer.cfg file..."
sed -i '/\[virtual_pins\]/d' "$PRINTER_CFG"
else
echo -e "Info: [virtual_pins] configuration is already removed in printer.cfg file..."
fi
if grep -q "include Helper-Script/KAMP/KAMP_Settings" "$PRINTER_CFG" ; then
echo -e "Info: Removing KAMP configurations in printer.cfg file..."
sed -i '/include Helper-Script\/KAMP\/KAMP_Settings\.cfg/d' "$PRINTER_CFG"
@ -123,4 +145,4 @@ function remove_kamp(){
error_msg "Please select a correct choice!";;
esac
done
}
}

View file

@ -28,7 +28,11 @@ function install_m600_support(){
mkdir -p "$HS_CONFIG_FOLDER"
fi
echo -e "Info: Linking file..."
ln -sf "$M600_SUPPORT_URL" "$HS_CONFIG_FOLDER"/M600-support.cfg
if [ "$model" = "K1" ]; then
ln -sf "$M600_SUPPORT_URL" "$HS_CONFIG_FOLDER"/M600-support.cfg
else
ln -sf "$M600_SUPPORT_3V3_URL" "$HS_CONFIG_FOLDER"/M600-support.cfg
fi
if grep -q "include Helper-Script/M600-support" "$PRINTER_CFG" ; then
echo -e "Info: M600 Support configurations are already enabled in printer.cfg file..."
else

View file

@ -0,0 +1,89 @@
#!/bin/sh
set -e
function customize_menu_ui_3v3() {
top_line
title '[ CUSTOMIZE MENU ]' "${yellow}"
inner_line
hr
menu_option '1' 'Remove' 'Creality Web Interface'
menu_option '2' 'Restore' 'Creality Web Interface'
hr
menu_option '3' 'Install' 'Guppy Screen'
menu_option '4' 'Remove' 'Guppy Screen'
hr
menu_option '5' 'Install' 'Creality Dynamic Logos for Fluidd'
hr
inner_line
hr
bottom_menu_option 'b' 'Back to [Main Menu]' "${yellow}"
bottom_menu_option 'q' 'Exit' "${darkred}"
hr
version_line "$(get_script_version)"
bottom_line
}
function customize_menu_3v3() {
clear
customize_menu_ui_3v3
local customize_menu_opt
while true; do
read -p " ${white}Type your choice and validate with Enter: ${yellow}" customize_menu_opt
case "${customize_menu_opt}" in
1)
if [ ! -d "$FLUIDD_FOLDER" ] && [ ! -d "$MAINSAIL_FOLDER" ]; then
error_msg "Updated Fluidd or Mainsail is needed, please install one of them first!"
elif [ ! -f "$CREALITY_WEB_FILE" ]; then
error_msg "Creality Web Interface is already removed!"
echo -e " ${darkred}Please restore Creality Web Interface first if you want to change the default Web Interface.${white}"
echo
else
run "remove_creality_web_interface" "customize_menu_ui_3v3"
fi;;
2)
if [ -f "$CREALITY_WEB_FILE" ]; then
error_msg "Creality Web Interface is already present!"
elif [ ! -f "$INITD_FOLDER"/S99start_app ]; then
error_msg "Guppy Screen need to be removed first to restore Creality Web Interface!"
else
run "restore_creality_web_interface" "customize_menu_ui_3v3"
fi;;
3)
if [ -d "$GUPPY_SCREEN_FOLDER" ]; then
error_msg "Guppy Screen is already installed!"
echo -e " ${darkred}Please remove Guppy Screen first if you want to change the theme.${white}"
echo
elif [ -d "$IMP_SHAPERS_FOLDER" ]; then
error_msg "Please remove Improved Shapers Calibrations first, Guppy Screen already use it!"
elif [ ! -f /lib/ld-2.29.so ]; then
error_msg "Make sure you're running 1.3.x.x firmware version!"
elif [ ! -f "$KLIPPER_SHELL_FILE" ]; then
error_msg "Klipper Gcode Shell Command is needed, please install it first!"
else
run "install_guppy_screen" "customize_menu_ui_3v3"
fi;;
4)
if [ ! -d "$GUPPY_SCREEN_FOLDER" ]; then
error_msg "Guppy Screen is not installed!"
else
run "remove_guppy_screen" "customize_menu_ui_3v3"
fi;;
5)
if [ -f "$FLUIDD_LOGO_FILE" ]; then
error_msg "Creality Dynamic Logos for Fluidd are already installed!"
elif [ ! -d "$FLUIDD_FOLDER" ]; then
error_msg "Updated Fluidd is needed, please install it first!"
else
run "install_creality_dynamic_logos" "customize_menu_ui_3v3"
fi;;
B|b)
clear; main_menu; break;;
Q|q)
clear; exit 0;;
*)
error_msg "Please select a correct choice!";;
esac
done
customize_menu_3v3
}

View file

@ -0,0 +1,97 @@
#!/bin/sh
set -e
function check_folder_3v3() {
local folder_path="$1"
if [ -d "$folder_path" ]; then
echo -e "${green}"
else
echo -e "${red}"
fi
}
function check_file_3v3() {
local file_path="$1"
if [ -f "$file_path" ]; then
echo -e "${green}"
else
echo -e "${red}"
fi
}
function check_simplyprint_3v3() {
if grep -q "\[simplyprint\]" "$MOONRAKER_CFG"; then
echo -e "${green}"
else
echo -e "${red}"
fi
}
function info_menu_ui_3v3() {
top_line
title '[ INFORMATIONS MENU ]' "${yellow}"
inner_line
hr
subtitle '•ESSENTIALS:'
info_line "$(check_folder_3v3 "$MOONRAKER_FOLDER")" 'Updated Moonraker'
info_line "$(check_folder_3v3 "$FLUIDD_FOLDER")" 'Updated Fluidd'
info_line "$(check_folder_3v3 "$MAINSAIL_FOLDER")" 'Mainsail'
hr
subtitle '•UTILITIES:'
info_line "$(check_file_3v3 "$ENTWARE_FILE")" 'Entware'
info_line "$(check_file_3v3 "$KLIPPER_SHELL_FILE")" 'Klipper Gcode Shell Command'
hr
subtitle '•IMPROVEMENTS:'
info_line "$(check_folder_3v3 "$KAMP_FOLDER")" 'Klipper Adaptive Meshing & Purging'
info_line "$(check_file_3v3 "$BUZZER_FILE")" 'Buzzer Support'
info_line "$(check_folder_3v3 "$IMP_SHAPERS_FOLDER")" 'Improved Shapers Calibrations'
info_line "$(check_file_3v3 "$USEFUL_MACROS_FILE")" 'Useful Macros'
info_line "$(check_file_3v3 "$SAVE_ZOFFSET_FILE")" 'Save Z-Offset Macros'
info_line "$(check_file_3v3 "$M600_SUPPORT_FILE")" 'M600 Support'
info_line "$(check_file_3v3 "$GIT_BACKUP_FILE")" 'Git Backup'
hr
subtitle '•CAMERA:'
info_line "$(check_file_3v3 "$TIMELAPSE_FILE")" 'Moonraker Timelapse'
info_line "$(check_file_3v3 "$CAMERA_SETTINGS_FILE")" 'Nebula Camera Settings Control'
info_line "$(check_file_3v3 "$USB_CAMERA_FILE")" 'USB Camera Support'
hr
subtitle '•REMOTE ACCESS:'
info_line "$(check_folder_3v3 "$OCTOEVERYWHERE_FOLDER")" 'OctoEverywhere'
info_line "$(check_folder_3v3 "$MOONRAKER_OBICO_FOLDER")" 'Obico'
info_line "$(check_folder_3v3 "$GUPPYFLO_FOLDER")" 'GuppyFLO'
info_line "$(check_folder_3v3 "$MOBILERAKER_COMPANION_FOLDER")" 'Mobileraker Companion'
info_line "$(check_folder_3v3 "$OCTOAPP_COMPANION_FOLDER")" 'OctoApp Companion'
info_line "$(check_simplyprint_3v3)" 'SimplyPrint'
hr
subtitle '•CUSTOMIZATION:'
info_line "$(check_file_3v3 "$CREALITY_WEB_FILE")" 'Creality Web Interface'
info_line "$(check_folder_3v3 "$GUPPY_SCREEN_FOLDER")" 'Guppy Screen'
info_line "$(check_file_3v3 "$FLUIDD_LOGO_FILE")" 'Creality Dynamic Logos for Fluidd'
hr
inner_line
hr
bottom_menu_option 'b' 'Back to [Main Menu]' "${yellow}"
bottom_menu_option 'q' 'Exit' "${darkred}"
hr
version_line "$(get_script_version)"
bottom_line
}
function info_menu_3v3() {
clear
info_menu_ui_3v3
local info_menu_opt
while true; do
read -p " ${white}Type your choice and validate with Enter: ${yellow}" info_menu_opt
case "${info_menu_opt}" in
B|b)
clear; main_menu; break;;
Q|q)
clear; exit 0;;
*)
error_msg "Please select a correct choice!";;
esac
done
info_menu_3v3
}

View file

@ -0,0 +1,244 @@
#!/bin/sh
set -e
function install_menu_ui_3v3() {
top_line
title '[ INSTALL MENU ]' "${yellow}"
inner_line
hr
subtitle '•ESSENTIALS:'
menu_option ' 1' 'Install' 'Updated Moonraker'
menu_option ' 2' 'Install' 'Updated Fluidd (port 4408)'
menu_option ' 3' 'Install' 'Mainsail (port 4409)'
hr
subtitle '•UTILITIES:'
menu_option ' 4' 'Install' 'Entware'
menu_option ' 5' 'Install' 'Klipper Gcode Shell Command'
hr
subtitle '•IMPROVEMENTS:'
menu_option ' 6' 'Install' 'Klipper Adaptive Meshing & Purging'
menu_option ' 7' 'Install' 'Buzzer Support'
menu_option ' 8' 'Install' 'Improved Shapers Calibrations'
menu_option ' 9' 'Install' 'Useful Macros'
menu_option '10' 'Install' 'Save Z-Offset Macros'
menu_option '11' 'Install' 'M600 Support'
menu_option '12' 'Install' 'Git Backup'
hr
subtitle '•CAMERA:'
menu_option '13' 'Install' 'Moonraker Timelapse'
menu_option '14' 'Install' 'Nebula Camera Settings Control'
menu_option '15' 'Install' 'USB Camera Support'
hr
subtitle '•REMOTE ACCESS:'
menu_option '16' 'Install' 'OctoEverywhere'
menu_option '17' 'Install' 'Moonraker Obico'
menu_option '18' 'Install' 'GuppyFLO'
menu_option '19' 'Install' 'Mobileraker Companion'
menu_option '20' 'Install' 'OctoApp Companion'
menu_option '21' 'Install' 'SimplyPrint'
hr
inner_line
hr
bottom_menu_option 'b' 'Back to [Main Menu]' "${yellow}"
bottom_menu_option 'q' 'Exit' "${darkred}"
hr
version_line "$(get_script_version)"
bottom_line
}
function install_menu_3v3() {
clear
install_menu_ui_3v3
local install_menu_opt
while true; do
read -p " ${white}Type your choice and validate with Enter: ${yellow}" install_menu_opt
case "${install_menu_opt}" in
1)
if [ -d "$MOONRAKER_FOLDER" ]; then
error_msg "Updated Moonraker is already installed!"
else
run "install_moonraker_3v3" "install_menu_ui_3v3"
fi;;
2)
if [ -d "$FLUIDD_FOLDER" ]; then
error_msg "Updated Fluidd is already installed!"
elif [ ! -d "$MOONRAKER_FOLDER" ]; then
error_msg "Updated Moonraker is needed, please install it first!"
else
run "install_fluidd_3v3" "install_menu_ui_3v3"
fi;;
3)
if [ -d "$MAINSAIL_FOLDER" ]; then
error_msg "Mainsail is already installed!"
elif [ ! -d "$MOONRAKER_FOLDER" ]; then
error_msg "Updated Moonraker is needed, please install it first!"
else
run "install_mainsail" "install_menu_ui_3v3"
fi;;
4)
if [ -f "$ENTWARE_FILE" ]; then
error_msg "Entware is already installed!"
else
run "install_entware" "install_menu_ui_3v3"
fi;;
5)
if [ -f "$KLIPPER_SHELL_FILE" ]; then
error_msg "Klipper Gcode Shell Command is already installed!"
else
run "install_gcode_shell_command" "install_menu_ui_3v3"
fi;;
6)
if [ -d "$KAMP_FOLDER" ]; then
error_msg "Klipper Adaptive Meshing & Purging is already installed!"
else
run "install_kamp" "install_menu_ui_3v3"
fi;;
7)
if [ -f "$BUZZER_FILE" ]; then
error_msg "Buzzer Support is already installed!"
elif [ ! -f "$KLIPPER_SHELL_FILE" ]; then
error_msg "Klipper Gcode Shell Command is needed, please install it first!"
else
run "install_buzzer_support" "install_menu_ui_3v3"
fi;;
8)
if [ -d "$IMP_SHAPERS_FOLDER" ]; then
error_msg "Improved Shapers Calibrations are already installed!"
elif [ -d "$GUPPY_SCREEN_FOLDER" ]; then
error_msg "Guppy Screen already has these features!"
elif [ ! -f "$KLIPPER_SHELL_FILE" ]; then
error_msg "Klipper Gcode Shell Command is needed, please install it first!"
else
run "install_improved_shapers" "install_menu_ui_3v3"
fi;;
9)
if [ -f "$USEFUL_MACROS_FILE" ]; then
error_msg "Useful Macros are already installed!"
elif [ ! -f "$KLIPPER_SHELL_FILE" ]; then
error_msg "Klipper Gcode Shell Command is needed, please install it first!"
else
run "install_useful_macros" "install_menu_ui_3v3"
fi;;
10)
if [ -f "$SAVE_ZOFFSET_FILE" ]; then
error_msg "Save Z-Offset Macros are already installed!"
else
run "install_save_zoffset_macros" "install_menu_ui_3v3"
fi;;
11)
if [ -f "$M600_SUPPORT_FILE" ]; then
error_msg "M600 Support is already installed!"
else
run "install_m600_support" "install_menu_ui_3v3"
fi;;
12)
if [ -f "$GIT_BACKUP_FILE" ]; then
error_msg "Git Backup is already installed!"
elif [ ! -f "$ENTWARE_FILE" ]; then
error_msg "Entware is needed, please install it first!"
elif [ ! -f "$KLIPPER_SHELL_FILE" ]; then
error_msg "Klipper Gcode Shell Command is needed, please install it first!"
else
run "install_git_backup" "install_menu_ui_3v3"
fi;;
13)
if [ -f "$TIMELAPSE_FILE" ]; then
error_msg "Moonraker Timelapse is already installed!"
elif [ ! -f "$ENTWARE_FILE" ]; then
error_msg "Entware is needed, please install it first!"
else
run "install_moonraker_timelapse" "install_menu_ui_3v3"
fi;;
14)
if [ -f "$CAMERA_SETTINGS_FILE" ]; then
error_msg "Nebula Camera Settings Control is already installed!"
elif ! v4l2-ctl --list-devices | grep -q 'CCX2F3298'; then
error_msg "Nebula camera not detected, please plug it in!"
elif [ ! -f "$KLIPPER_SHELL_FILE" ]; then
error_msg "Klipper Gcode Shell Command is needed, please install it first!"
else
run "install_camera_settings_control" "install_menu_ui_3v3"
fi;;
15)
if [ -f "$USB_CAMERA_FILE" ]; then
error_msg "Camera USB Support is already installed!"
elif v4l2-ctl --list-devices | grep -qE 'CREALITY|CCX2F3298'; then
error_msg "It looks like you are using a Creality camera and it's not compatible!"
elif [ ! -f "$ENTWARE_FILE" ]; then
error_msg "Entware is needed, please install it first!"
else
run "install_usb_camera" "install_menu_ui_3v3"
fi;;
16)
if [ -d "$OCTOEVERYWHERE_FOLDER" ]; then
error_msg "OctoEverywhere is already installed!"
elif [ ! -d "$MOONRAKER_FOLDER" ]; then
error_msg "Updated Moonraker is needed, please install it first!"
elif [ ! -d "$FLUIDD_FOLDER" ] && [ ! -d "$MAINSAIL_FOLDER" ]; then
error_msg "Updated Fluidd or Mainsail is needed, please install one of them first!"
elif [ ! -f "$ENTWARE_FILE" ]; then
error_msg "Entware is needed, please install it first!"
else
run "install_octoeverywhere" "install_menu_ui_3v3"
fi;;
17)
if [ -d "$MOONRAKER_OBICO_FOLDER" ]; then
error_msg "Moonraker Obico is already installed!"
elif [ ! -d "$MOONRAKER_FOLDER" ]; then
error_msg "Updated Moonraker is needed, please install it first!"
elif [ ! -d "$FLUIDD_FOLDER" ] && [ ! -d "$MAINSAIL_FOLDER" ]; then
error_msg "Updated Fluidd or Mainsail is needed, please install one of them first!"
elif [ ! -f "$ENTWARE_FILE" ]; then
error_msg "Entware is needed, please install it first!"
else
run "install_moonraker_obico" "install_menu_ui_3v3"
fi;;
18)
if [ ! -d "$MOONRAKER_FOLDER" ]; then
error_msg "Updated Moonraker is needed, please install it first!"
else
run "install_guppyflo" "install_menu_ui_3v3"
fi;;
19)
if [ -d "$MOBILERAKER_COMPANION_FOLDER" ]; then
error_msg "Mobileraker Companion is already installed!"
elif [ ! -d "$MOONRAKER_FOLDER" ]; then
error_msg "Updated Moonraker is needed, please install it first!"
elif [ ! -d "$FLUIDD_FOLDER" ] && [ ! -d "$MAINSAIL_FOLDER" ]; then
error_msg "Fluidd or Mainsail is needed, please install one of them first!"
else
run "install_mobileraker_companion" "install_menu_ui_3v3"
fi;;
20)
if [ -d "$OCTOAPP_COMPANION_FOLDER" ]; then
error_msg "OctoApp Companion is already installed!"
elif [ ! -d "$MOONRAKER_FOLDER" ]; then
error_msg "Updated Moonraker is needed, please install it first!"
elif [ ! -d "$FLUIDD_FOLDER" ] && [ ! -d "$MAINSAIL_FOLDER" ]; then
error_msg "Updated Fluidd or Mainsail is needed, please install one of them first!"
elif [ ! -f "$ENTWARE_FILE" ]; then
error_msg "Entware is needed, please install it first!"
else
run "install_octoapp_companion" "install_menu_ui_3v3"
fi;;
21)
if grep -q "\[simplyprint\]" "$MOONRAKER_CFG"; then
error_msg "SimplyPrint is already installed!"
elif [ ! -d "$MOONRAKER_FOLDER" ]; then
error_msg "Updated Moonraker is needed, please install it first!"
elif [ ! -d "$FLUIDD_FOLDER" ] && [ ! -d "$MAINSAIL_FOLDER" ]; then
error_msg "Updated Fluidd or Mainsail is needed, please install one of them first!"
else
run "install_simplyprint" "install_menu_ui_3v3"
fi;;
B|b)
clear; main_menu; break;;
Q|q)
clear; exit 0;;
*)
error_msg "Please select a correct choice!";;
esac
done
install_menu_3v3
}

View file

@ -0,0 +1,212 @@
#!/bin/sh
set -e
function remove_menu_ui_3v3() {
top_line
title '[ REMOVE MENU ]' "${yellow}"
inner_line
hr
subtitle '•ESSENTIALS:'
menu_option ' 1' 'Remove' 'Updated Moonraker'
menu_option ' 2' 'Remove' 'Updated Fluidd (port 4408)'
menu_option ' 3' 'Remove' 'Mainsail (port 4409)'
hr
subtitle '•UTILITIES:'
menu_option ' 6' 'Remove' 'Klipper Adaptive Meshing & Purging'
menu_option ' 7' 'Remove' 'Buzzer Support'
menu_option ' 8' 'Remove' 'Improved Shapers Calibrations'
menu_option ' 9' 'Remove' 'Useful Macros'
menu_option '10' 'Remove' 'Save Z-Offset Macros'
menu_option '11' 'Remove' 'M600 Support'
menu_option '12' 'Remove' 'Git Backup'
hr
subtitle '•CAMERA:'
menu_option '13' 'Remove' 'Moonraker Timelapse'
menu_option '14' 'Remove' 'Nebula Camera Settings Control'
menu_option '15' 'Remove' 'USB Camera Support'
hr
subtitle '•REMOTE ACCESS:'
menu_option '16' 'Remove' 'OctoEverywhere'
menu_option '17' 'Remove' 'Moonraker Obico'
menu_option '18' 'Remove' 'GuppyFLO'
menu_option '19' 'Remove' 'Mobileraker Companion'
menu_option '20' 'Remove' 'OctoApp Companion'
menu_option '21' 'Remove' 'SimplyPrint'
hr
inner_line
hr
bottom_menu_option 'b' 'Back to [Main Menu]' "${yellow}"
bottom_menu_option 'q' 'Exit' "${darkred}"
hr
version_line "$(get_script_version)"
bottom_line
}
function remove_menu_3v3() {
clear
remove_menu_ui_3v3
local remove_menu_opt
while true; do
read -p " ${white}Type your choice and validate with Enter: ${yellow}" remove_menu_opt
case "${remove_menu_opt}" in
1)
if [ ! -d "$MOONRAKER_FOLDER" ]; then
error_msg "Updated Moonraker is not installed!"
else
run "remove_moonraker_3v3" "remove_menu_ui_3v3"
fi;;
2)
if [ ! -d "$FLUIDD_FOLDER" ]; then
error_msg "Updated Fluidd is not installed!"
elif [ ! -f "$CREALITY_WEB_FILE" ] && [ ! -d "$MAINSAIL_FOLDER" ]; then
error_msg "Creality Web Interface is removed!"
echo -e " ${darkred}Please restore Creality Web Interface first if you want to remove Updated Fluidd.${white}"
echo
else
run "remove_fluidd_3v3" "remove_menu_ui_3v3"
fi;;
3)
if [ ! -d "$MAINSAIL_FOLDER" ]; then
error_msg "Mainsail is not installed!"
elif [ ! -f "$CREALITY_WEB_FILE" ] && [ ! -d "$FLUIDD_FOLDER" ]; then
error_msg "Creality Web Interface is removed!"
echo -e " ${darkred}Please restore Creality Web Interface first if you want to remove Mainsail.${white}"
echo
else
run "remove_mainsail" "remove_menu_ui_3v3"
fi;;
4)
if [ ! -f "$ENTWARE_FILE" ]; then
error_msg "Entware is not installed!"
elif [ -f "$TIMELAPSE_FILE" ]; then
error_msg "Entware is needed to use Moonraker Timelapse, please uninstall it first!"
elif [ -f "$GIT_BACKUP_FILE" ]; then
error_msg "Entware is needed to use Git Backup, please uninstall it first!"
elif [ -d "$OCTOEVERYWHERE_FOLDER" ]; then
error_msg "Entware is needed to use OctoEverywhere, please uninstall it first!"
elif [ -d "$MOONRAKER_OBICO_FOLDER" ]; then
error_msg "Entware is needed to use Moonraker Obico, please uninstall it first!"
elif [ ! -f "$USB_CAMERA_FILE" ]; then
error_msg "Entware is needed to use USB Camera Support, please uninstall it first!"
else
run "remove_entware" "remove_menu_ui_3v3"
fi;;
5)
if [ ! -f "$KLIPPER_SHELL_FILE" ]; then
error_msg "Klipper Gcode Shell Command is not installed!"
elif [ -d "$GUPPY_SCREEN_FOLDER" ]; then
error_msg "Klipper Gcode Shell Command is needed to use Guppy Screen, please uninstall it first!"
elif [ -d "$IMP_SHAPERS_FOLDER" ]; then
error_msg "Klipper Gcode Shell Command is needed to use Improved Shapers Calibrations, please uninstall it first!"
elif [ -f "$GIT_BACKUP_FILE" ]; then
error_msg "Klipper Gcode Shell Command is needed to use Git Backup, please uninstall it first!"
else
run "remove_gcode_shell_command" "remove_menu_ui_3v3"
fi;;
6)
if [ ! -d "$KAMP_FOLDER" ]; then
error_msg "Klipper Adaptive Meshing & Purging is not installed!"
else
run "remove_kamp" "remove_menu_ui_3v3"
fi;;
7)
if [ ! -f "$BUZZER_FILE" ]; then
error_msg "Buzzer Support is not installed!"
else
run "remove_buzzer_support" "remove_menu_ui_3v3"
fi;;
8)
if [ ! -d "$IMP_SHAPERS_FOLDER" ]; then
error_msg "Improved Shapers Calibrations are not installed!"
else
run "remove_improved_shapers" "remove_menu_ui_3v3"
fi;;
9)
if [ ! -f "$USEFUL_MACROS_FILE" ]; then
error_msg "Useful Macros are not installed!"
else
run "remove_useful_macros" "remove_menu_ui_3v3"
fi;;
10)
if [ ! -f "$SAVE_ZOFFSET_FILE" ]; then
error_msg "Save Z-Offset Macros are not installed!"
else
run "remove_save_zoffset_macros" "remove_menu_ui_3v3"
fi;;
11)
if [ ! -f "$M600_SUPPORT_FILE" ]; then
error_msg "M600 Support is not installed!"
else
run "remove_m600_support" "remove_menu_ui_3v3"
fi;;
12)
if [ ! -f "$GIT_BACKUP_FILE" ]; then
error_msg "Git Backup is not installed!"
else
run "remove_git_backup" "remove_menu_ui_3v3"
fi;;
13)
if [ ! -f "$TIMELAPSE_FILE" ]; then
error_msg "Moonraker Timelapse is not installed!"
else
run "remove_moonraker_timelapse" "remove_menu_ui_3v3"
fi;;
14)
if [ ! -f "$CAMERA_SETTINGS_FILE" ]; then
error_msg "Nebula Camera Settings Control is not installed!"
else
run "remove_camera_settings_control" "remove_menu_ui_3v3"
fi;;
15)
if [ ! -f "$USB_CAMERA_FILE" ]; then
error_msg "USB Camera Support is not installed!"
else
run "remove_usb_camera" "remove_menu_ui_3v3"
fi;;
16)
if [ ! -d "$OCTOEVERYWHERE_FOLDER" ]; then
error_msg "OctoEverywhere is not installed!"
else
run "remove_octoeverywhere" "remove_menu_ui_3v3"
fi;;
17)
if [ ! -d "$MOONRAKER_OBICO_FOLDER" ]; then
error_msg "Moonraker Obico is not installed!"
else
run "remove_moonraker_obico" "remove_menu_ui_3v3"
fi;;
18)
if [ ! -d "$GUPPYFLO_FOLDER" ]; then
error_msg "GuppyFLO is not installed!"
else
run "remove_guppyflo" "remove_menu_ui_3v3"
fi;;
19)
if [ ! -d "$MOBILERAKER_COMPANION_FOLDER" ]; then
error_msg "Mobileraker Companion is not installed!"
else
run "remove_mobileraker_companion" "remove_menu_ui_3v3"
fi;;
20)
if [ ! -d "$OCTOAPP_COMPANION_FOLDER" ]; then
error_msg "OctoApp Companion is not installed!"
else
run "remove_octoapp_companion" "remove_menu_ui_3v3"
fi;;
21)
if ! grep -q "\[simplyprint\]" "$MOONRAKER_CFG"; then
error_msg "SimplyPrint is not installed!"
else
run "remove_simplyprint" "remove_menu_ui_3v3"
fi;;
B|b)
clear; main_menu; break;;
Q|q)
clear; exit 0;;
*)
error_msg "Please select a correct choice!";;
esac
done
remove_menu_3v3
}

View file

@ -0,0 +1,115 @@
#!/bin/sh
set -e
function tools_menu_ui_3v3() {
top_line
title '[ TOOLS MENU ]' "${yellow}"
inner_line
hr
menu_option ' 1' 'Prevent updating' 'Klipper configuration files'
menu_option ' 2' 'Allow updating' 'Klipper configuration files'
menu_option ' 3' 'Fix' 'printing Gcode files from folder'
hr
menu_option ' 4' 'Enable' 'camera settings in Moonraker'
menu_option ' 5' 'Disable' 'camera settings in Moonraker'
hr
menu_option ' 6' 'Restart' 'Nginx service'
menu_option ' 7' 'Restart' 'Moonraker service'
menu_option ' 8' 'Restart' 'Klipper service'
hr
menu_option ' 9' 'Update' 'Entware packages'
hr
menu_option '10' 'Clear' 'cache'
menu_option '11' 'Clear' 'logs files'
hr
menu_option '12' 'Restore' 'a previous firmware'
hr
menu_option '13' 'Reset' 'factory settings'
hr
inner_line
hr
bottom_menu_option 'b' 'Back to [Main Menu]' "${yellow}"
bottom_menu_option 'q' 'Exit' "${darkred}"
hr
version_line "$(get_script_version)"
bottom_line
}
function tools_menu_3v3() {
clear
tools_menu_ui_3v3
local tools_menu_opt
while true; do
read -p " ${white}Type your choice and validate with Enter: ${yellow}" tools_menu_opt
case "${tools_menu_opt}" in
1)
if [ -f "$INITD_FOLDER"/disabled.S55klipper_service ]; then
error_msg "Updating Klipper configuration files is already prevented!"
else
run "prevent_updating_klipper_files" "tools_menu_ui_3v3"
fi;;
2)
if [ ! -f "$INITD_FOLDER"/disabled.S55klipper_service ]; then
error_msg "Updating Klipper configuration files is already allowed!"
else
run "allow_updating_klipper_files" "tools_menu_ui_3v3"
fi;;
3)
if [ -f "$KLIPPER_KLIPPY_FOLDER"/gcode.py ]; then
run "printing_gcode_from_folder" "tools_menu_ui_3v3"
fi;;
4)
if grep -q "^\[webcam Camera\]$" "$MOONRAKER_CFG"; then
error_msg "Camera settings are alredy enabled in Moonraker!"
else
run "enable_camera_settings" "tools_menu_ui_3v3"
fi;;
5)
if grep -q "^#\[webcam Camera\]" "$MOONRAKER_CFG"; then
error_msg "Camera settings are alredy disabled in Moonraker!"
else
run "disable_camera_settings" "tools_menu_ui_3v3"
fi;;
6)
if [ ! -d "$NGINX_FOLDER" ]; then
error_msg "Nginx is not installed!"
else
run "restart_nginx_action" "tools_menu_ui_3v3"
fi;;
7)
if [ ! -d "$MOONRAKER_FOLDER" ]; then
error_msg "Moonraker is not installed!"
else
run "restart_moonraker_action" "tools_menu_ui_3v3"
fi;;
8)
if [ ! -f "$INITD_FOLDER"/S55klipper_service ]; then
error_msg "Klipper service is not present!"
else
run "restart_klipper_action" "tools_menu_ui_3v3"
fi;;
9)
if [ ! -f "$ENTWARE_FILE" ]; then
error_msg "Entware is not installed!"
else
run "update_entware_packages" "tools_menu_ui_3v3"
fi;;
10)
run "clear_cache" "tools_menu_ui_3v3";;
11)
run "clear_logs" "tools_menu_ui_3v3";;
12)
run "restore_previous_firmware" "tools_menu_ui_3v3";;
13)
run "reset_factory_settings" "tools_menu_ui_3v3";;
B|b)
clear; main_menu; break;;
Q|q)
clear; exit 0;;
*)
error_msg "Please select a correct choice!";;
esac
done
tools_menu_3v3
}

View file

@ -2,7 +2,7 @@
set -e
function customize_menu_ui() {
function customize_menu_ui_k1() {
top_line
title '[ CUSTOMIZE MENU ]' "${yellow}"
inner_line
@ -27,9 +27,9 @@ function customize_menu_ui() {
bottom_line
}
function customize_menu() {
function customize_menu_k1() {
clear
customize_menu_ui
customize_menu_ui_k1
local customize_menu_opt
while true; do
read -p " ${white}Type your choice and validate with Enter: ${yellow}" customize_menu_opt
@ -40,7 +40,7 @@ function customize_menu() {
elif [ ! -d "$BOOT_DISPLAY_FOLDER" ]; then
error_msg "Please use latest firmware to install Custom Boot Display!"
else
run "install_custom_boot_display" "customize_menu_ui"
run "install_custom_boot_display" "customize_menu_ui_k1"
fi;;
2)
if [ ! -f "$BOOT_DISPLAY_FILE" ]; then
@ -48,17 +48,17 @@ function customize_menu() {
elif [ ! -d "$BOOT_DISPLAY_FOLDER" ]; then
error_msg "Please use latest firmware to restore Stock Boot Display!"
else
run "remove_custom_boot_display" "customize_menu_ui"
run "remove_custom_boot_display" "customize_menu_ui_k1"
fi;;
3)
if [ ! -d "$FLUIDD_FOLDER" ] && [ ! -d "$MAINSAIL_FOLDER" ]; then
error_msg "Fluidd or Mainsail is needed, please install it first!"
error_msg "Fluidd or Mainsail is needed, please install one of them first!"
elif [ ! -f "$CREALITY_WEB_FILE" ]; then
error_msg "Creality Web Interface is already removed!"
echo -e " ${darkred}Please restore Creality Web Interface first if you want to change the default Web Interface.${white}"
echo
else
run "remove_creality_web_interface" "customize_menu_ui"
run "remove_creality_web_interface" "customize_menu_ui_k1"
fi;;
4)
if [ -f "$CREALITY_WEB_FILE" ]; then
@ -66,7 +66,7 @@ function customize_menu() {
elif [ ! -f "$INITD_FOLDER"/S99start_app ]; then
error_msg "Guppy Screen need to be removed first to restore Creality Web Interface!"
else
run "restore_creality_web_interface" "customize_menu_ui"
run "restore_creality_web_interface" "customize_menu_ui_k1"
fi;;
5)
if [ -d "$GUPPY_SCREEN_FOLDER" ]; then
@ -80,13 +80,13 @@ function customize_menu() {
elif [ ! -f "$KLIPPER_SHELL_FILE" ]; then
error_msg "Klipper Gcode Shell Command is needed, please install it first!"
else
run "install_guppy_screen" "customize_menu_ui"
run "install_guppy_screen" "customize_menu_ui_k1"
fi;;
6)
if [ ! -d "$GUPPY_SCREEN_FOLDER" ]; then
error_msg "Guppy Screen is not installed!"
else
run "remove_guppy_screen" "customize_menu_ui"
run "remove_guppy_screen" "customize_menu_ui_k1"
fi;;
7)
if [ -f "$FLUIDD_LOGO_FILE" ]; then
@ -94,7 +94,7 @@ function customize_menu() {
elif [ ! -d "$FLUIDD_FOLDER" ]; then
error_msg "Fluidd is needed, please install it first!"
else
run "install_creality_dynamic_logos" "customize_menu_ui"
run "install_creality_dynamic_logos" "customize_menu_ui_k1"
fi;;
B|b)
clear; main_menu; break;;
@ -104,5 +104,5 @@ function customize_menu() {
error_msg "Please select a correct choice!";;
esac
done
customize_menu
customize_menu_k1
}

101
scripts/menu/K1/info_menu_K1.sh Executable file
View file

@ -0,0 +1,101 @@
#!/bin/sh
set -e
function check_folder_k1() {
local folder_path="$1"
if [ -d "$folder_path" ]; then
echo -e "${green}"
else
echo -e "${red}"
fi
}
function check_file_k1() {
local file_path="$1"
if [ -f "$file_path" ]; then
echo -e "${green}"
else
echo -e "${red}"
fi
}
function check_simplyprint_k1() {
if grep -q "\[simplyprint\]" "$MOONRAKER_CFG"; then
echo -e "${green}"
else
echo -e "${red}"
fi
}
function info_menu_ui_k1() {
top_line
title '[ INFORMATIONS MENU ]' "${yellow}"
inner_line
hr
subtitle '•ESSENTIALS:'
info_line "$(check_folder_k1 "$MOONRAKER_FOLDER")" 'Moonraker & Nginx'
info_line "$(check_folder_k1 "$FLUIDD_FOLDER")" 'Fluidd'
info_line "$(check_folder_k1 "$MAINSAIL_FOLDER")" 'Mainsail'
hr
subtitle '•UTILITIES:'
info_line "$(check_file_k1 "$ENTWARE_FILE")" 'Entware'
info_line "$(check_file_k1 "$KLIPPER_SHELL_FILE")" 'Klipper Gcode Shell Command'
hr
subtitle '•IMPROVEMENTS:'
info_line "$(check_folder_k1 "$KAMP_FOLDER")" 'Klipper Adaptive Meshing & Purging'
info_line "$(check_file_k1 "$BUZZER_FILE")" 'Buzzer Support'
info_line "$(check_folder_k1 "$NOZZLE_CLEANING_FOLDER")" 'Nozzle Cleaning Fan Control'
info_line "$(check_file_k1 "$FAN_CONTROLS_FILE")" 'Fans Control Macros'
info_line "$(check_folder_k1 "$IMP_SHAPERS_FOLDER")" 'Improved Shapers Calibrations'
info_line "$(check_file_k1 "$USEFUL_MACROS_FILE")" 'Useful Macros'
info_line "$(check_file_k1 "$SAVE_ZOFFSET_FILE")" 'Save Z-Offset Macros'
info_line "$(check_file_k1 "$SCREWS_ADJUST_FILE")" 'Screws Tilt Adjust Support'
info_line "$(check_file_k1 "$M600_SUPPORT_FILE")" 'M600 Support'
info_line "$(check_file_k1 "$GIT_BACKUP_FILE")" 'Git Backup'
hr
subtitle '•CAMERA:'
info_line "$(check_file_k1 "$TIMELAPSE_FILE")" 'Moonraker Timelapse'
info_line "$(check_file_k1 "$CAMERA_SETTINGS_FILE")" 'Camera Settings Control'
info_line "$(check_file_k1 "$USB_CAMERA_FILE")" 'USB Camera Support'
hr
subtitle '•REMOTE ACCESS:'
info_line "$(check_folder_k1 "$OCTOEVERYWHERE_FOLDER")" 'OctoEverywhere'
info_line "$(check_folder_k1 "$MOONRAKER_OBICO_FOLDER")" 'Obico'
info_line "$(check_folder_k1 "$GUPPYFLO_FOLDER")" 'GuppyFLO'
info_line "$(check_folder_k1 "$MOBILERAKER_COMPANION_FOLDER")" 'Mobileraker Companion'
info_line "$(check_folder_k1 "$OCTOAPP_COMPANION_FOLDER")" 'OctoApp Companion'
info_line "$(check_simplyprint_k1)" 'SimplyPrint'
hr
subtitle '•CUSTOMIZATION:'
info_line "$(check_file_k1 "$BOOT_DISPLAY_FILE")" 'Custom Boot Display'
info_line "$(check_file_k1 "$CREALITY_WEB_FILE")" 'Creality Web Interface'
info_line "$(check_folder_k1 "$GUPPY_SCREEN_FOLDER")" 'Guppy Screen'
info_line "$(check_file_k1 "$FLUIDD_LOGO_FILE")" 'Creality Dynamic Logos for Fluidd'
hr
inner_line
hr
bottom_menu_option 'b' 'Back to [Main Menu]' "${yellow}"
bottom_menu_option 'q' 'Exit' "${darkred}"
hr
version_line "$(get_script_version)"
bottom_line
}
function info_menu_k1() {
clear
info_menu_ui_k1
local info_menu_opt
while true; do
read -p " ${white}Type your choice and validate with Enter: ${yellow}" info_menu_opt
case "${info_menu_opt}" in
B|b)
clear; main_menu; break;;
Q|q)
clear; exit 0;;
*)
error_msg "Please select a correct choice!";;
esac
done
info_menu_k1
}

View file

@ -2,7 +2,7 @@
set -e
function install_menu_ui() {
function install_menu_ui_k1() {
top_line
title '[ INSTALL MENU ]' "${yellow}"
inner_line
@ -25,13 +25,13 @@ function install_menu_ui() {
menu_option '11' 'Install' 'Useful Macros'
menu_option '12' 'Install' 'Save Z-Offset Macros'
menu_option '13' 'Install' 'Screws Tilt Adjust Support'
menu_option '14' 'Install' 'Virtual Pins Support'
menu_option '15' 'Install' 'M600 Support'
menu_option '16' 'Install' 'Git Backup'
menu_option '14' 'Install' 'M600 Support'
menu_option '15' 'Install' 'Git Backup'
hr
subtitle '•CAMERA:'
menu_option '17' 'Install' 'Moonraker Timelapse'
menu_option '18' 'Install' 'Camera Settings Control'
menu_option '16' 'Install' 'Moonraker Timelapse'
menu_option '17' 'Install' 'Camera Settings Control'
menu_option '18' 'Install' 'USB Camera Support'
hr
subtitle '•REMOTE ACCESS:'
menu_option '19' 'Install' 'OctoEverywhere'
@ -50,9 +50,9 @@ function install_menu_ui() {
bottom_line
}
function install_menu() {
function install_menu_k1() {
clear
install_menu_ui
install_menu_ui_k1
local install_menu_opt
while true; do
read -p " ${white}Type your choice and validate with Enter: ${yellow}" install_menu_opt
@ -61,7 +61,7 @@ function install_menu() {
if [ -d "$MOONRAKER_FOLDER" ]; then
error_msg "Moonraker and Nginx are already installed!"
else
run "install_moonraker_nginx" "install_menu_ui"
run "install_moonraker_nginx" "install_menu_ui_k1"
fi;;
2)
if [ -d "$FLUIDD_FOLDER" ]; then
@ -69,7 +69,7 @@ function install_menu() {
elif [ ! -d "$MOONRAKER_FOLDER" ] && [ ! -d "$NGINX_FOLDER" ]; then
error_msg "Moonraker and Nginx are needed, please install them first!"
else
run "install_fluidd" "install_menu_ui"
run "install_fluidd" "install_menu_ui_k1"
fi;;
3)
if [ -d "$MAINSAIL_FOLDER" ]; then
@ -77,27 +77,25 @@ function install_menu() {
elif [ ! -d "$MOONRAKER_FOLDER" ] && [ ! -d "$NGINX_FOLDER" ]; then
error_msg "Moonraker and Nginx are needed, please install them first!"
else
run "install_mainsail" "install_menu_ui"
run "install_mainsail" "install_menu_ui_k1"
fi;;
4)
if [ -f "$ENTWARE_FILE" ]; then
error_msg "Entware is already installed!"
else
run "install_entware" "install_menu_ui"
run "install_entware" "install_menu_ui_k1"
fi;;
5)
if [ -f "$KLIPPER_SHELL_FILE" ]; then
error_msg "Klipper Gcode Shell Command is already installed!"
else
run "install_gcode_shell_command" "install_menu_ui"
run "install_gcode_shell_command" "install_menu_ui_k1"
fi;;
6)
if [ -d "$KAMP_FOLDER" ]; then
error_msg "Klipper Adaptive Meshing & Purging is already installed!"
elif [ ! -f "$VIRTUAL_PINS_FILE" ]; then
error_msg "Virtual Pins Support is needed, please install it first!"
else
run "install_kamp" "install_menu_ui"
run "install_kamp" "install_menu_ui_k1"
fi;;
7)
if [ -f "$BUZZER_FILE" ]; then
@ -105,19 +103,19 @@ function install_menu() {
elif [ ! -f "$KLIPPER_SHELL_FILE" ]; then
error_msg "Klipper Gcode Shell Command is needed, please install it first!"
else
run "install_buzzer_support" "install_menu_ui"
run "install_buzzer_support" "install_menu_ui_k1"
fi;;
8)
if [ -d "$NOZZLE_CLEANING_FOLDER" ]; then
error_msg "Nozzle Cleaning Fan Control is already installed!"
else
run "install_nozzle_cleaning_fan_control" "install_menu_ui"
run "install_nozzle_cleaning_fan_control" "install_menu_ui_k1"
fi;;
9)
if [ -f "$FAN_CONTROLS_FILE" ]; then
error_msg "Fans Control Macros are already installed!"
else
run "install_fans_control_macros" "install_menu_ui"
run "install_fans_control_macros" "install_menu_ui_k1"
fi;;
10)
if [ -d "$IMP_SHAPERS_FOLDER" ]; then
@ -127,7 +125,7 @@ function install_menu() {
elif [ ! -f "$KLIPPER_SHELL_FILE" ]; then
error_msg "Klipper Gcode Shell Command is needed, please install it first!"
else
run "install_improved_shapers" "install_menu_ui"
run "install_improved_shapers" "install_menu_ui_k1"
fi;;
11)
if [ -f "$USEFUL_MACROS_FILE" ]; then
@ -135,33 +133,27 @@ function install_menu() {
elif [ ! -f "$KLIPPER_SHELL_FILE" ]; then
error_msg "Klipper Gcode Shell Command is needed, please install it first!"
else
run "install_useful_macros" "install_menu_ui"
run "install_useful_macros" "install_menu_ui_k1"
fi;;
12)
if [ -f "$SAVE_ZOFFSET_FILE" ]; then
error_msg "Save Z-Offset Macros are already installed!"
else
run "install_save_zoffset_macros" "install_menu_ui"
run "install_save_zoffset_macros" "install_menu_ui_k1"
fi;;
13)
if [ -f "$SCREWS_ADJUST_FILE" ]; then
error_msg "Screws Tilt Adjust Support is already installed!"
else
run "install_screws_tilt_adjust" "install_menu_ui"
run "install_screws_tilt_adjust" "install_menu_ui_k1"
fi;;
14)
if [ -f "$VIRTUAL_PINS_FILE" ]; then
error_msg "Virtual Pins Support is already installed!"
else
run "install_virtual_pins" "install_menu_ui"
fi;;
15)
if [ -f "$M600_SUPPORT_FILE" ]; then
error_msg "M600 Support is already installed!"
else
run "install_m600_support" "install_menu_ui"
run "install_m600_support" "install_menu_ui_k1"
fi;;
16)
15)
if [ -f "$GIT_BACKUP_FILE" ]; then
error_msg "Git Backup is already installed!"
elif [ ! -f "$ENTWARE_FILE" ]; then
@ -169,25 +161,33 @@ function install_menu() {
elif [ ! -f "$KLIPPER_SHELL_FILE" ]; then
error_msg "Klipper Gcode Shell Command is needed, please install it first!"
else
run "install_git_backup" "install_menu_ui"
run "install_git_backup" "install_menu_ui_k1"
fi;;
17)
16)
if [ -f "$TIMELAPSE_FILE" ]; then
error_msg "Moonraker Timelapse is already installed!"
elif [ ! -f "$ENTWARE_FILE" ]; then
error_msg "Entware is needed, please install it first!"
else
run "install_moonraker_timelapse" "install_menu_ui"
run "install_moonraker_timelapse" "install_menu_ui_k1"
fi;;
18)
17)
if [ -f "$CAMERA_SETTINGS_FILE" ]; then
error_msg "Camera Settings Control is already installed!"
elif v4l2-ctl --list-devices | grep -q 'CCX2F3299'; then
error_msg "You have the new hardware version of the camera and it's not compatible!"
elif v4l2-ctl --list-devices | grep -q 'CCX2F3299' && [ ! -f "$INITD_FOLDER"/S50usb_camera ]; then
error_msg "This is not compatible with the new hardware version of the camera!"
elif [ ! -f "$KLIPPER_SHELL_FILE" ]; then
error_msg "Klipper Gcode Shell Command is needed, please install it first!"
else
run "install_camera_settings_control" "install_menu_ui"
run "install_camera_settings_control" "install_menu_ui_k1"
fi;;
18)
if [ -f "$USB_CAMERA_FILE" ]; then
error_msg "Camera USB Support is already installed!"
elif [ ! -f "$ENTWARE_FILE" ]; then
error_msg "Entware is needed, please install it first!"
else
run "install_usb_camera" "install_menu_ui_k1"
fi;;
19)
if [ -d "$OCTOEVERYWHERE_FOLDER" ]; then
@ -195,11 +195,11 @@ function install_menu() {
elif [ ! -d "$MOONRAKER_FOLDER" ]; then
error_msg "Moonraker and Nginx are needed, please install them first!"
elif [ ! -d "$FLUIDD_FOLDER" ] && [ ! -d "$MAINSAIL_FOLDER" ]; then
error_msg "Fluidd or Mainsail is needed, please install it first!"
error_msg "Fluidd or Mainsail is needed, please install one of them first!"
elif [ ! -f "$ENTWARE_FILE" ]; then
error_msg "Entware is needed, please install it first!"
else
run "install_octoeverywhere" "install_menu_ui"
run "install_octoeverywhere" "install_menu_ui_k1"
fi;;
20)
if [ -d "$MOONRAKER_OBICO_FOLDER" ]; then
@ -207,17 +207,17 @@ function install_menu() {
elif [ ! -d "$MOONRAKER_FOLDER" ]; then
error_msg "Moonraker and Nginx are needed, please install them first!"
elif [ ! -d "$FLUIDD_FOLDER" ] && [ ! -d "$MAINSAIL_FOLDER" ]; then
error_msg "Fluidd or Mainsail is needed, please install it first!"
error_msg "Fluidd or Mainsail is needed, please install one of them first!"
elif [ ! -f "$ENTWARE_FILE" ]; then
error_msg "Entware is needed, please install it first!"
else
run "install_moonraker_obico" "install_menu_ui"
run "install_moonraker_obico" "install_menu_ui_k1"
fi;;
21)
if [ ! -d "$MOONRAKER_FOLDER" ] && [ ! -d "$NGINX_FOLDER" ]; then
error_msg "Moonraker and Nginx are needed, please install them first!"
else
run "install_guppyflo" "install_menu_ui"
run "install_guppyflo" "install_menu_ui_k1"
fi;;
22)
if [ -d "$MOBILERAKER_COMPANION_FOLDER" ]; then
@ -225,9 +225,9 @@ function install_menu() {
elif [ ! -d "$MOONRAKER_FOLDER" ]; then
error_msg "Moonraker and Nginx are needed, please install them first!"
elif [ ! -d "$FLUIDD_FOLDER" ] && [ ! -d "$MAINSAIL_FOLDER" ]; then
error_msg "Fluidd or Mainsail is needed, please install it first!"
error_msg "Fluidd or Mainsail is needed, please install one of them first!"
else
run "install_mobileraker_companion" "install_menu_ui"
run "install_mobileraker_companion" "install_menu_ui_k1"
fi;;
23)
if [ -d "$OCTOAPP_COMPANION_FOLDER" ]; then
@ -235,11 +235,11 @@ function install_menu() {
elif [ ! -d "$MOONRAKER_FOLDER" ]; then
error_msg "Moonraker and Nginx are needed, please install them first!"
elif [ ! -d "$FLUIDD_FOLDER" ] && [ ! -d "$MAINSAIL_FOLDER" ]; then
error_msg "Fluidd or Mainsail is needed, please install it first!"
error_msg "Fluidd or Mainsail is needed, please install one of them first!"
elif [ ! -f "$ENTWARE_FILE" ]; then
error_msg "Entware is needed, please install it first!"
else
run "install_octoapp_companion" "install_menu_ui"
run "install_octoapp_companion" "install_menu_ui_k1"
fi;;
24)
if grep -q "\[simplyprint\]" "$MOONRAKER_CFG"; then
@ -247,9 +247,9 @@ function install_menu() {
elif [ ! -d "$MOONRAKER_FOLDER" ]; then
error_msg "Moonraker and Nginx are needed, please install them first!"
elif [ ! -d "$FLUIDD_FOLDER" ] && [ ! -d "$MAINSAIL_FOLDER" ]; then
error_msg "Fluidd or Mainsail is needed, please install it first!"
error_msg "Fluidd or Mainsail is needed, please install one of them first!"
else
run "install_simplyprint" "install_menu_ui"
run "install_simplyprint" "install_menu_ui_k1"
fi;;
B|b)
clear; main_menu; break;;
@ -259,5 +259,5 @@ function install_menu() {
error_msg "Please select a correct choice!";;
esac
done
install_menu
install_menu_k1
}

View file

@ -2,7 +2,7 @@
set -e
function remove_menu_ui() {
function remove_menu_ui_k1() {
top_line
title '[ REMOVE MENU ]' "${yellow}"
inner_line
@ -25,13 +25,13 @@ function remove_menu_ui() {
menu_option '11' 'Remove' 'Useful Macros'
menu_option '12' 'Remove' 'Save Z-Offset Macros'
menu_option '13' 'Remove' 'Screws Tilt Adjust Support'
menu_option '14' 'Remove' 'Virtual Pins Support'
menu_option '15' 'Remove' 'M600 Support'
menu_option '16' 'Remove' 'Git Backup'
menu_option '14' 'Remove' 'M600 Support'
menu_option '15' 'Remove' 'Git Backup'
hr
subtitle '•CAMERA:'
menu_option '17' 'Remove' 'Moonraker Timelapse'
menu_option '18' 'Remove' 'Camera Settings Control'
menu_option '16' 'Remove' 'Moonraker Timelapse'
menu_option '17' 'Remove' 'Camera Settings Control'
menu_option '18' 'Remove' 'USB Camera Support'
hr
subtitle '•REMOTE ACCESS:'
menu_option '19' 'Remove' 'OctoEverywhere'
@ -50,9 +50,9 @@ function remove_menu_ui() {
bottom_line
}
function remove_menu() {
function remove_menu_k1() {
clear
remove_menu_ui
remove_menu_ui_k1
local remove_menu_opt
while true; do
read -p " ${white}Type your choice and validate with Enter: ${yellow}" remove_menu_opt
@ -61,7 +61,7 @@ function remove_menu() {
if [ ! -d "$MOONRAKER_FOLDER" ] && [ ! -d "$NGINX_FOLDER" ]; then
error_msg "Moonraker and Nginx are not installed!"
else
run "remove_moonraker_nginx" "remove_menu_ui"
run "remove_moonraker_nginx" "remove_menu_ui_k1"
fi;;
2)
if [ ! -d "$FLUIDD_FOLDER" ]; then
@ -71,7 +71,7 @@ function remove_menu() {
echo -e " ${darkred}Please restore Creality Web Interface first if you want to remove Fluidd.${white}"
echo
else
run "remove_fluidd" "remove_menu_ui"
run "remove_fluidd" "remove_menu_ui_k1"
fi;;
3)
if [ ! -d "$MAINSAIL_FOLDER" ]; then
@ -81,7 +81,7 @@ function remove_menu() {
echo -e " ${darkred}Please restore Creality Web Interface first if you want to remove Mainsail.${white}"
echo
else
run "remove_mainsail" "remove_menu_ui"
run "remove_mainsail" "remove_menu_ui_k1"
fi;;
4)
if [ ! -f "$ENTWARE_FILE" ]; then
@ -94,8 +94,10 @@ function remove_menu() {
error_msg "Entware is needed to use OctoEverywhere, please uninstall it first!"
elif [ -d "$MOONRAKER_OBICO_FOLDER" ]; then
error_msg "Entware is needed to use Moonraker Obico, please uninstall it first!"
elif [ ! -f "$USB_CAMERA_FILE" ]; then
error_msg "Entware is needed to use USB Camera Support, please uninstall it first!"
else
run "remove_entware" "remove_menu_ui"
run "remove_entware" "remove_menu_ui_k1"
fi;;
5)
if [ ! -f "$KLIPPER_SHELL_FILE" ]; then
@ -108,126 +110,126 @@ function remove_menu() {
error_msg "Klipper Gcode Shell Command is needed to use Guppy Screen, please uninstall it first!"
elif [ -d "$IMP_SHAPERS_FOLDER" ]; then
error_msg "Klipper Gcode Shell Command is needed to use Improved Shapers Calibrations, please uninstall it first!"
elif [ -d "$GIT_BACKUP_FOLDER" ]; then
elif [ -f "$GIT_BACKUP_FILE" ]; then
error_msg "Klipper Gcode Shell Command is needed to use Git Backup, please uninstall it first!"
elif [ -f "$USEFUL_MACROS_FILE" ]; then
error_msg "Klipper Gcode Shell Command is needed to use Useful Macros, please uninstall it first!"
else
run "remove_gcode_shell_command" "remove_menu_ui"
run "remove_gcode_shell_command" "remove_menu_ui_k1"
fi;;
6)
if [ ! -d "$KAMP_FOLDER" ]; then
error_msg "Klipper Adaptive Meshing & Purging is not installed!"
else
run "remove_kamp" "remove_menu_ui"
run "remove_kamp" "remove_menu_ui_k1"
fi;;
7)
if [ ! -f "$BUZZER_FILE" ]; then
error_msg "Buzzer Support is not installed!"
else
run "remove_buzzer_support" "remove_menu_ui"
run "remove_buzzer_support" "remove_menu_ui_k1"
fi;;
8)
if [ ! -d "$NOZZLE_CLEANING_FOLDER" ]; then
error_msg "Nozzle Cleaning Fan Control is not installed!"
else
run "remove_nozzle_cleaning_fan_control" "remove_menu_ui"
run "remove_nozzle_cleaning_fan_control" "remove_menu_ui_k1"
fi;;
9)
if [ ! -f "$FAN_CONTROLS_FILE" ]; then
error_msg "Fans Control Macros are not installed!"
else
run "remove_fans_control_macros" "remove_menu_ui"
run "remove_fans_control_macros" "remove_menu_ui_k1"
fi;;
10)
if [ ! -d "$IMP_SHAPERS_FOLDER" ]; then
error_msg "Improved Shapers Calibrations are not installed!"
else
run "remove_improved_shapers" "remove_menu_ui"
run "remove_improved_shapers" "remove_menu_ui_k1"
fi;;
11)
if [ ! -f "$USEFUL_MACROS_FILE" ]; then
error_msg "Useful Macros are not installed!"
else
run "remove_useful_macros" "remove_menu_ui"
run "remove_useful_macros" "remove_menu_ui_k1"
fi;;
12)
if [ ! -f "$SAVE_ZOFFSET_FILE" ]; then
error_msg "Save Z-Offset Macros are not installed!"
else
run "remove_save_zoffset_macros" "remove_menu_ui"
run "remove_save_zoffset_macros" "remove_menu_ui_k1"
fi;;
13)
if [ ! -f "$SCREWS_ADJUST_FILE" ]; then
error_msg "Screws Tilt Adjust Support is not installed!"
else
run "remove_screws_tilt_adjust" "remove_menu_ui"
run "remove_screws_tilt_adjust" "remove_menu_ui_k1"
fi;;
14)
if [ ! -f "$VIRTUAL_PINS_FILE" ]; then
error_msg "Virtual Pins Support is not installed!"
else
run "remove_virtual_pins" "remove_menu_ui"
fi;;
15)
if [ ! -f "$M600_SUPPORT_FILE" ]; then
error_msg "M600 Support is not installed!"
else
run "remove_m600_support" "remove_menu_ui"
run "remove_m600_support" "remove_menu_ui_k1"
fi;;
16)
15)
if [ ! -f "$GIT_BACKUP_FILE" ]; then
error_msg "Git Backup is not installed!"
else
run "remove_git_backup" "remove_menu_ui"
run "remove_git_backup" "remove_menu_ui_k1"
fi;;
17)
16)
if [ ! -f "$TIMELAPSE_FILE" ]; then
error_msg "Moonraker Timelapse is not installed!"
else
run "remove_moonraker_timelapse" "remove_menu_ui"
run "remove_moonraker_timelapse" "remove_menu_ui_k1"
fi;;
18)
17)
if [ ! -f "$CAMERA_SETTINGS_FILE" ]; then
error_msg "Camera Settings Control is not installed!"
else
run "remove_camera_settings_control" "remove_menu_ui"
run "remove_camera_settings_control" "remove_menu_ui_k1"
fi;;
18)
if [ ! -f "$USB_CAMERA_FILE" ]; then
error_msg "USB Camera Support is not installed!"
else
run "remove_usb_camera" "remove_menu_ui_k1"
fi;;
19)
if [ ! -d "$OCTOEVERYWHERE_FOLDER" ]; then
error_msg "OctoEverywhere is not installed!"
else
run "remove_octoeverywhere" "remove_menu_ui"
run "remove_octoeverywhere" "remove_menu_ui_k1"
fi;;
20)
if [ ! -d "$MOONRAKER_OBICO_FOLDER" ]; then
error_msg "Moonraker Obico is not installed!"
else
run "remove_moonraker_obico" "remove_menu_ui"
run "remove_moonraker_obico" "remove_menu_ui_k1"
fi;;
21)
if [ ! -d "$GUPPYFLO_FOLDER" ]; then
error_msg "GuppyFLO is not installed!"
else
run "remove_guppyflo" "remove_menu_ui"
run "remove_guppyflo" "remove_menu_ui_k1"
fi;;
22)
if [ ! -d "$MOBILERAKER_COMPANION_FOLDER" ]; then
error_msg "Mobileraker Companion is not installed!"
else
run "remove_mobileraker_companion" "remove_menu_ui"
run "remove_mobileraker_companion" "remove_menu_ui_k1"
fi;;
23)
if [ ! -d "$OCTOAPP_COMPANION_FOLDER" ]; then
error_msg "OctoApp Companion is not installed!"
else
run "remove_octoapp_companion" "remove_menu_ui"
run "remove_octoapp_companion" "remove_menu_ui_k1"
fi;;
24)
if ! grep -q "\[simplyprint\]" "$MOONRAKER_CFG"; then
error_msg "SimplyPrint is not installed!"
else
run "remove_simplyprint" "remove_menu_ui"
run "remove_simplyprint" "remove_menu_ui_k1"
fi;;
B|b)
clear; main_menu; break;;
@ -237,5 +239,5 @@ function remove_menu() {
error_msg "Please select a correct choice!";;
esac
done
remove_menu
remove_menu_k1
}

View file

@ -2,7 +2,7 @@
set -e
function tools_menu_ui() {
function tools_menu_ui_k1() {
top_line
title '[ TOOLS MENU ]' "${yellow}"
inner_line
@ -36,9 +36,9 @@ function tools_menu_ui() {
bottom_line
}
function tools_menu() {
function tools_menu_k1() {
clear
tools_menu_ui
tools_menu_ui_k1
local tools_menu_opt
while true; do
read -p " ${white}Type your choice and validate with Enter: ${yellow}" tools_menu_opt
@ -47,62 +47,62 @@ function tools_menu() {
if [ -f "$INITD_FOLDER"/disabled.S55klipper_service ]; then
error_msg "Updating Klipper configuration files is already prevented!"
else
run "prevent_updating_klipper_files" "tools_menu_ui"
run "prevent_updating_klipper_files" "tools_menu_ui_k1"
fi;;
2)
if [ ! -f "$INITD_FOLDER"/disabled.S55klipper_service ]; then
error_msg "Updating Klipper configuration files is already allowed!"
else
run "allow_updating_klipper_files" "tools_menu_ui"
run "allow_updating_klipper_files" "tools_menu_ui_k1"
fi;;
3)
if [ -f "$KLIPPER_KLIPPY_FOLDER"/gcode.py ]; then
run "printing_gcode_from_folder" "tools_menu_ui"
run "printing_gcode_from_folder" "tools_menu_ui_k1"
fi;;
4)
if grep -q "^\[webcam Camera\]$" "$MOONRAKER_CFG"; then
error_msg "Camera settings are alredy enabled in Moonraker!"
else
run "enable_camera_settings" "tools_menu_ui"
run "enable_camera_settings" "tools_menu_ui_k1"
fi;;
5)
if grep -q "^#\[webcam Camera\]" "$MOONRAKER_CFG"; then
error_msg "Camera settings are alredy disabled in Moonraker!"
else
run "disable_camera_settings" "tools_menu_ui"
run "disable_camera_settings" "tools_menu_ui_k1"
fi;;
6)
if [ ! -d "$NGINX_FOLDER" ]; then
error_msg "Nginx is not installed!"
else
run "restart_nginx_action" "tools_menu_ui"
run "restart_nginx_action" "tools_menu_ui_k1"
fi;;
7)
if [ ! -d "$MOONRAKER_FOLDER" ]; then
error_msg "Moonraker is not installed!"
else
run "restart_moonraker_action" "tools_menu_ui"
run "restart_moonraker_action" "tools_menu_ui_k1"
fi;;
8)
if [ ! -f "$INITD_FOLDER"/S55klipper_service ]; then
error_msg "Klipper service is not present!"
else
run "restart_klipper_action" "tools_menu_ui"
run "restart_klipper_action" "tools_menu_ui_k1"
fi;;
9)
if [ ! -f "$ENTWARE_FILE" ]; then
error_msg "Entware is not installed!"
else
run "update_entware_packages" "tools_menu_ui"
run "update_entware_packages" "tools_menu_ui_k1"
fi;;
10)
run "clear_cache" "tools_menu_ui";;
run "clear_cache" "tools_menu_ui_k1";;
11)
run "clear_logs" "tools_menu_ui";;
run "clear_logs" "tools_menu_ui_k1";;
12)
run "restore_previous_firmware" "tools_menu_ui";;
run "restore_previous_firmware" "tools_menu_ui_k1";;
13)
run "reset_factory_settings" "tools_menu_ui";;
run "reset_factory_settings" "tools_menu_ui_k1";;
B|b)
clear; main_menu; break;;
Q|q)
@ -111,5 +111,5 @@ function tools_menu() {
error_msg "Please select a correct choice!";;
esac
done
tools_menu
tools_menu_k1
}

View file

@ -33,7 +33,7 @@ function customize_menu_ke() {
case "${customize_menu_opt}" in
1)
if [ ! -d "$FLUIDD_FOLDER" ] && [ ! -d "$MAINSAIL_FOLDER" ]; then
error_msg "Fluidd or Mainsail is needed, please install it first!"
error_msg "Fluidd or Mainsail is needed, please install one of them first!"
elif [ ! -f "$CREALITY_WEB_FILE" ]; then
error_msg "Creality Web Interface is already removed!"
echo -e " ${darkred}Please restore Creality Web Interface first if you want to change the default Web Interface.${white}"

View file

@ -45,11 +45,12 @@ function info_menu_ui_ke() {
subtitle '•IMPROVEMENTS:'
info_line "$(check_folder_ke "$IMP_SHAPERS_FOLDER")" 'Improved Shapers Calibrations'
info_line "$(check_file_ke "$SAVE_ZOFFSET_FILE")" 'Save Z-Offset Macros'
info_line "$(check_file_ke "$VIRTUAL_PINS_FILE")" 'Virtual Pins Support'
info_line "$(check_file_ke "$GIT_BACKUP_FILE")" 'Git Backup'
hr
subtitle '•CAMERA:'
info_line "$(check_file_ke "$TIMELAPSE_FILE")" 'Moonraker Timelapse'
info_line "$(check_file_ke "$CAMERA_SETTINGS_FILE")" 'Nebula Camera Settings Control'
info_line "$(check_file_ke "$USB_CAMERA_FILE")" 'USB Camera Support'
hr
subtitle '•REMOTE ACCESS:'
info_line "$(check_folder_ke "$OCTOEVERYWHERE_FOLDER")" 'OctoEverywhere'

View file

@ -19,19 +19,20 @@ function install_menu_ui_ke() {
subtitle '•IMPROVEMENTS:'
menu_option ' 6' 'Install' 'Improved Shapers Calibrations'
menu_option ' 7' 'Install' 'Save Z-Offset Macros'
menu_option ' 8' 'Install' 'Virtual Pins Support'
menu_option ' 9' 'Install' 'Git Backup'
menu_option ' 8' 'Install' 'Git Backup'
hr
subtitle '•CAMERA:'
menu_option '10' 'Install' 'Moonraker Timelapse'
menu_option ' 9' 'Install' 'Moonraker Timelapse'
menu_option '10' 'Install' 'Nebula Camera Settings Control'
menu_option '11' 'Install' 'USB Camera Support'
hr
subtitle '•REMOTE ACCESS:'
menu_option '11' 'Install' 'OctoEverywhere'
menu_option '12' 'Install' 'Moonraker Obico'
menu_option '13' 'Install' 'GuppyFLO'
menu_option '14' 'Install' 'Mobileraker Companion'
menu_option '15' 'Install' 'OctoApp Companion'
menu_option '16' 'Install' 'SimplyPrint'
menu_option '12' 'Install' 'OctoEverywhere'
menu_option '13' 'Install' 'Moonraker Obico'
menu_option '14' 'Install' 'GuppyFLO'
menu_option '15' 'Install' 'Mobileraker Companion'
menu_option '16' 'Install' 'OctoApp Companion'
menu_option '17' 'Install' 'SimplyPrint'
hr
inner_line
hr
@ -100,12 +101,6 @@ function install_menu_ke() {
run "install_save_zoffset_macros" "install_menu_ui_ke"
fi;;
8)
if [ -f "$VIRTUAL_PINS_FILE" ]; then
error_msg "Virtual Pins Support is already installed!"
else
run "install_virtual_pins" "install_menu_ui_ke"
fi;;
9)
if [ -f "$GIT_BACKUP_FILE" ]; then
error_msg "Git Backup is already installed!"
elif [ ! -f "$ENTWARE_FILE" ]; then
@ -115,7 +110,7 @@ function install_menu_ke() {
else
run "install_git_backup" "install_menu_ui_ke"
fi;;
10)
9)
if [ -f "$TIMELAPSE_FILE" ]; then
error_msg "Moonraker Timelapse is already installed!"
elif [ ! -f "$ENTWARE_FILE" ]; then
@ -123,65 +118,85 @@ function install_menu_ke() {
else
run "install_moonraker_timelapse" "install_menu_ui_ke"
fi;;
10)
if [ -f "$CAMERA_SETTINGS_FILE" ]; then
error_msg "Nebula Camera Settings Control is already installed!"
elif ! v4l2-ctl --list-devices | grep -q 'CCX2F3298'; then
error_msg "Nebula camera not detected, please plug it in!"
elif [ ! -f "$KLIPPER_SHELL_FILE" ]; then
error_msg "Klipper Gcode Shell Command is needed, please install it first!"
else
run "install_camera_settings_control" "install_menu_ui_ke"
fi;;
11)
if [ -f "$USB_CAMERA_FILE" ]; then
error_msg "Camera USB Support is already installed!"
elif v4l2-ctl --list-devices | grep -qE 'CREALITY|CCX2F3298'; then
error_msg "It looks like you are using a Creality camera and it's not compatible!"
elif [ ! -f "$ENTWARE_FILE" ]; then
error_msg "Entware is needed, please install it first!"
else
run "install_usb_camera" "install_menu_ui_ke"
fi;;
12)
if [ -d "$OCTOEVERYWHERE_FOLDER" ]; then
error_msg "OctoEverywhere is already installed!"
elif [ ! -d "$MOONRAKER_FOLDER" ]; then
error_msg "Moonraker and Nginx are needed, please install them first!"
elif [ ! -d "$FLUIDD_FOLDER" ] && [ ! -d "$MAINSAIL_FOLDER" ]; then
error_msg "Fluidd or Mainsail is needed, please install it first!"
error_msg "Fluidd or Mainsail is needed, please install one of them first!"
elif [ ! -f "$ENTWARE_FILE" ]; then
error_msg "Entware is needed, please install it first!"
else
run "install_octoeverywhere" "install_menu_ui_ke"
fi;;
12)
13)
if [ -d "$MOONRAKER_OBICO_FOLDER" ]; then
error_msg "Moonraker Obico is already installed!"
elif [ ! -d "$MOONRAKER_FOLDER" ]; then
error_msg "Moonraker and Nginx are needed, please install them first!"
elif [ ! -d "$FLUIDD_FOLDER" ] && [ ! -d "$MAINSAIL_FOLDER" ]; then
error_msg "Fluidd or Mainsail is needed, please install it first!"
error_msg "Fluidd or Mainsail is needed, please install one of them first!"
elif [ ! -f "$ENTWARE_FILE" ]; then
error_msg "Entware is needed, please install it first!"
else
run "install_moonraker_obico" "install_menu_ui_ke"
fi;;
13)
14)
if [ ! -d "$MOONRAKER_FOLDER" ] && [ ! -d "$NGINX_FOLDER" ]; then
error_msg "Moonraker and Nginx are needed, please install them first!"
else
run "install_guppyflo" "install_menu_ui_ke"
fi;;
14)
15)
if [ -d "$MOBILERAKER_COMPANION_FOLDER" ]; then
error_msg "Mobileraker Companion is already installed!"
elif [ ! -d "$MOONRAKER_FOLDER" ]; then
error_msg "Moonraker and Nginx are needed, please install them first!"
elif [ ! -d "$FLUIDD_FOLDER" ] && [ ! -d "$MAINSAIL_FOLDER" ]; then
error_msg "Fluidd or Mainsail is needed, please install it first!"
error_msg "Fluidd or Mainsail is needed, please install one of them first!"
else
run "install_mobileraker_companion" "install_menu_ui_ke"
fi;;
15)
16)
if [ -d "$OCTOAPP_COMPANION_FOLDER" ]; then
error_msg "OctoApp Companion is already installed!"
elif [ ! -d "$MOONRAKER_FOLDER" ]; then
error_msg "Moonraker and Nginx are needed, please install them first!"
elif [ ! -d "$FLUIDD_FOLDER" ] && [ ! -d "$MAINSAIL_FOLDER" ]; then
error_msg "Fluidd or Mainsail is needed, please install it first!"
error_msg "Fluidd or Mainsail is needed, please install one of them first!"
elif [ ! -f "$ENTWARE_FILE" ]; then
error_msg "Entware is needed, please install it first!"
else
run "install_octoapp_companion" "install_menu_ui_ke"
fi;;
16)
17)
if grep -q "\[simplyprint\]" "$MOONRAKER_CFG"; then
error_msg "SimplyPrint is already installed!"
elif [ ! -d "$MOONRAKER_FOLDER" ]; then
error_msg "Moonraker and Nginx are needed, please install them first!"
elif [ ! -d "$FLUIDD_FOLDER" ] && [ ! -d "$MAINSAIL_FOLDER" ]; then
error_msg "Fluidd or Mainsail is needed, please install it first!"
error_msg "Fluidd or Mainsail is needed, please install one of them first!"
else
run "install_simplyprint" "install_menu_ui_ke"
fi;;

View file

@ -19,19 +19,20 @@ function remove_menu_ui_ke() {
subtitle '•IMPROVEMENTS:'
menu_option ' 6' 'Remove' 'Improved Shapers Calibrations'
menu_option ' 7' 'Remove' 'Save Z-Offset Macros'
menu_option ' 8' 'Remove' 'Virtual Pins Support'
menu_option ' 9' 'Remove' 'Git Backup'
menu_option ' 8' 'Remove' 'Git Backup'
hr
subtitle '•CAMERA:'
menu_option '10' 'Remove' 'Moonraker Timelapse'
menu_option ' 9' 'Remove' 'Moonraker Timelapse'
menu_option '10' 'Install' 'Nebula Camera Settings Control'
menu_option '11' 'Remove' 'USB Camera Support'
hr
subtitle '•REMOTE ACCESS:'
menu_option '11' 'Remove' 'OctoEverywhere'
menu_option '12' 'Remove' 'Moonraker Obico'
menu_option '13' 'Remove' 'GuppyFLO'
menu_option '14' 'Remove' 'Mobileraker Companion'
menu_option '15' 'Remove' 'OctoApp Companion'
menu_option '16' 'Remove' 'SimplyPrint'
menu_option '12' 'Remove' 'OctoEverywhere'
menu_option '13' 'Remove' 'Moonraker Obico'
menu_option '14' 'Remove' 'GuppyFLO'
menu_option '15' 'Remove' 'Mobileraker Companion'
menu_option '16' 'Remove' 'OctoApp Companion'
menu_option '17' 'Remove' 'SimplyPrint'
hr
inner_line
hr
@ -86,6 +87,8 @@ function remove_menu_ke() {
error_msg "Entware is needed to use OctoEverywhere, please uninstall it first!"
elif [ -d "$MOONRAKER_OBICO_FOLDER" ]; then
error_msg "Entware is needed to use Moonraker Obico, please uninstall it first!"
elif [ ! -f "$USB_CAMERA_FILE" ]; then
error_msg "Entware is needed to use USB Camera Support, please uninstall it first!"
else
run "remove_entware" "remove_menu_ui_ke"
fi;;
@ -96,7 +99,7 @@ function remove_menu_ke() {
error_msg "Klipper Gcode Shell Command is needed to use Guppy Screen, please uninstall it first!"
elif [ -d "$IMP_SHAPERS_FOLDER" ]; then
error_msg "Klipper Gcode Shell Command is needed to use Improved Shapers Calibrations, please uninstall it first!"
elif [ -d "$GIT_BACKUP_FOLDER" ]; then
elif [ -f "$GIT_BACKUP_FILE" ]; then
error_msg "Klipper Gcode Shell Command is needed to use Git Backup, please uninstall it first!"
else
run "remove_gcode_shell_command" "remove_menu_ui_ke"
@ -114,58 +117,64 @@ function remove_menu_ke() {
run "remove_save_zoffset_macros" "remove_menu_ui_ke"
fi;;
8)
if [ ! -f "$VIRTUAL_PINS_FILE" ]; then
error_msg "Virtual Pins Support is not installed!"
else
run "remove_virtual_pins" "remove_menu_ui_ke"
fi;;
9)
if [ ! -f "$GIT_BACKUP_FILE" ]; then
error_msg "Git Backup is not installed!"
else
run "remove_git_backup" "remove_menu_ui_ke"
fi;;
10)
9)
if [ ! -f "$TIMELAPSE_FILE" ]; then
error_msg "Moonraker Timelapse is not installed!"
else
run "remove_moonraker_timelapse" "remove_menu_ui_ke"
fi;;
10)
if [ ! -f "$CAMERA_SETTINGS_FILE" ]; then
error_msg "Nebula Camera Settings Control is not installed!"
else
run "remove_camera_settings_control" "remove_menu_ui_ke"
fi;;
11)
if [ ! -f "$USB_CAMERA_FILE" ]; then
error_msg "USB Camera Support is not installed!"
else
run "remove_usb_camera" "remove_menu_ui_3v3"
fi;;
12)
if [ ! -d "$OCTOEVERYWHERE_FOLDER" ]; then
error_msg "OctoEverywhere is not installed!"
else
run "remove_octoeverywhere" "remove_menu_ui_ke"
fi;;
12)
13)
if [ ! -d "$MOONRAKER_OBICO_FOLDER" ]; then
error_msg "Moonraker Obico is not installed!"
else
run "remove_moonraker_obico" "remove_menu_ui_ke"
fi;;
13)
14)
if [ ! -d "$GUPPYFLO_FOLDER" ]; then
error_msg "GuppyFLO is not installed!"
else
run "remove_guppyflo" "remove_menu_ui_ke"
fi;;
14)
15)
if [ ! -d "$MOBILERAKER_COMPANION_FOLDER" ]; then
error_msg "Mobileraker Companion is not installed!"
else
run "remove_mobileraker_companion" "remove_menu_ui_ke"
fi;;
15)
16)
if [ ! -d "$OCTOAPP_COMPANION_FOLDER" ]; then
error_msg "OctoApp Companion is not installed!"
else
run "remove_octoapp_companion" "remove_menu_ui_ke"
fi;;
16)
17)
if ! grep -q "\[simplyprint\]" "$MOONRAKER_CFG"; then
error_msg "SimplyPrint is not installed!"
else
run "remove_simplyprint" "remove_menu_ui"
run "remove_simplyprint" "remove_menu_ui_ke"
fi;;
B|b)
clear; main_menu; break;;

View file

@ -1,101 +0,0 @@
#!/bin/sh
set -e
function check_folder() {
local folder_path="$1"
if [ -d "$folder_path" ]; then
echo -e "${green}"
else
echo -e "${red}"
fi
}
function check_file() {
local file_path="$1"
if [ -f "$file_path" ]; then
echo -e "${green}"
else
echo -e "${red}"
fi
}
function check_simplyprint() {
if grep -q "\[simplyprint\]" "$MOONRAKER_CFG"; then
echo -e "${green}"
else
echo -e "${red}"
fi
}
function info_menu_ui() {
top_line
title '[ INFORMATIONS MENU ]' "${yellow}"
inner_line
hr
subtitle '•ESSENTIALS:'
info_line "$(check_folder "$MOONRAKER_FOLDER")" 'Moonraker & Nginx'
info_line "$(check_folder "$FLUIDD_FOLDER")" 'Fluidd'
info_line "$(check_folder "$MAINSAIL_FOLDER")" 'Mainsail'
hr
subtitle '•UTILITIES:'
info_line "$(check_file "$ENTWARE_FILE")" 'Entware'
info_line "$(check_file "$KLIPPER_SHELL_FILE")" 'Klipper Gcode Shell Command'
hr
subtitle '•IMPROVEMENTS:'
info_line "$(check_folder "$KAMP_FOLDER")" 'Klipper Adaptive Meshing & Purging'
info_line "$(check_file "$BUZZER_FILE")" 'Buzzer Support'
info_line "$(check_folder "$NOZZLE_CLEANING_FOLDER")" 'Nozzle Cleaning Fan Control'
info_line "$(check_file "$FAN_CONTROLS_FILE")" 'Fans Control Macros'
info_line "$(check_folder "$IMP_SHAPERS_FOLDER")" 'Improved Shapers Calibrations'
info_line "$(check_file "$USEFUL_MACROS_FILE")" 'Useful Macros'
info_line "$(check_file "$SAVE_ZOFFSET_FILE")" 'Save Z-Offset Macros'
info_line "$(check_file "$SCREWS_ADJUST_FILE")" 'Screws Tilt Adjust Support'
info_line "$(check_file "$VIRTUAL_PINS_FILE")" 'Virtual Pins Support'
info_line "$(check_file "$M600_SUPPORT_FILE")" 'M600 Support'
info_line "$(check_file "$GIT_BACKUP_FILE")" 'Git Backup'
hr
subtitle '•CAMERA:'
info_line "$(check_file "$TIMELAPSE_FILE")" 'Moonraker Timelapse'
info_line "$(check_file "$CAMERA_SETTINGS_FILE")" 'Camera Settings Control'
hr
subtitle '•REMOTE ACCESS:'
info_line "$(check_folder "$OCTOEVERYWHERE_FOLDER")" 'OctoEverywhere'
info_line "$(check_folder "$MOONRAKER_OBICO_FOLDER")" 'Obico'
info_line "$(check_folder "$GUPPYFLO_FOLDER")" 'GuppyFLO'
info_line "$(check_folder "$MOBILERAKER_COMPANION_FOLDER")" 'Mobileraker Companion'
info_line "$(check_folder "$OCTOAPP_COMPANION_FOLDER")" 'OctoApp Companion'
info_line "$(check_simplyprint)" 'SimplyPrint'
hr
subtitle '•CUSTOMIZATION:'
info_line "$(check_file "$BOOT_DISPLAY_FILE")" 'Custom Boot Display'
info_line "$(check_file "$CREALITY_WEB_FILE")" 'Creality Web Interface'
info_line "$(check_folder "$GUPPY_SCREEN_FOLDER")" 'Guppy Screen'
info_line "$(check_file "$FLUIDD_LOGO_FILE")" 'Creality Dynamic Logos for Fluidd'
hr
inner_line
hr
bottom_menu_option 'b' 'Back to [Main Menu]' "${yellow}"
bottom_menu_option 'q' 'Exit' "${darkred}"
hr
version_line "$(get_script_version)"
bottom_line
}
function info_menu() {
clear
info_menu_ui
local info_menu_opt
while true; do
read -p " ${white}Type your choice and validate with Enter: ${yellow}" info_menu_opt
case "${info_menu_opt}" in
B|b)
clear; main_menu; break;;
Q|q)
clear; exit 0;;
*)
error_msg "Please select a correct choice!";;
esac
done
info_menu
}

View file

@ -2,7 +2,12 @@
set -e
if /usr/bin/get_sn_mac.sh model 2>&1 | grep -iq "K1"; then K1=1; else K1=0; fi
get_model=$( /usr/bin/get_sn_mac.sh model 2>&1 )
if echo "$get_model" | grep -iq "K1"; then
model="K1"
elif echo "$get_model" | grep -iq "F001"; then
model="3V3"
fi
function get_script_version() {
local version
@ -21,30 +26,22 @@ function version_line() {
function script_title() {
local title
if [ $K1 -eq 0 ]; then
title="KE"
if [ "$model" = "K1" ]; then
title="K1 SERIES"
elif [ "$model" = "3V3" ]; then
title="ENDER-3 V3 SERIES"
else
title="K1"
title="KE SERIES"
fi
echo "${title}"
}
function fw_version() {
local firmware
if [ $K1 -eq 0 ]; then
firmware="1.1.0.12"
else
firmware="1.3.3.5"
fi
echo "${firmware}"
}
function main_menu_ui() {
top_line
title "• HELPER SCRIPT FOR CREALITY $(script_title) SERIES" "${blue}"
title "• HELPER SCRIPT FOR CREALITY $(script_title)" "${blue}"
title "Copyright © Cyril Guislain (Guilouz)" "${white}"
inner_line
title "/!\\ ONLY USE IT WITH FIRMWARE $(fw_version) AND ABOVE /!\\" "${darkred}"
title "/!\\ ONLY USE THIS SCRIPT WITH LATEST FIRMWARE VERSION /!\\" "${darkred}"
inner_line
hr
main_menu_option '1' '[Install]' 'Menu'
@ -71,41 +68,51 @@ function main_menu() {
read -p "${white} Type your choice and validate with Enter: ${yellow}" main_menu_opt
case "${main_menu_opt}" in
1) clear
if [ $K1 -eq 0 ]; then
install_menu_ke
if [ "$model" = "K1" ]; then
install_menu_k1
elif [ "$model" = "3V3" ]; then
install_menu_3v3
else
install_menu
install_menu_ke
fi
break;;
2) clear
if [ $K1 -eq 0 ]; then
remove_menu_ke
if [ "$model" = "K1" ]; then
remove_menu_k1
elif [ "$model" = "3V3" ]; then
remove_menu_3v3
else
remove_menu
remove_menu_ke
fi
break;;
3) clear
if [ $K1 -eq 0 ]; then
customize_menu_ke
if [ "$model" = "K1" ]; then
customize_menu_k1
elif [ "$model" = "3V3" ]; then
customize_menu_3v3
else
customize_menu
customize_menu_ke
fi
break;;
4) clear
backup_restore_menu
break;;
5) clear
if [ $K1 -eq 0 ]; then
tools_menu_ke
if [ "$model" = "K1" ]; then
tools_menu_k1
elif [ "$model" = "3V3" ]; then
tools_menu_3v3
else
tools_menu
tools_menu_ke
fi
main_ui;;
6) clear
if [ $K1 -eq 0 ]; then
info_menu_ke
if [ "$model" = "K1" ]; then
info_menu_k1
elif [ "$model" = "3V3" ]; then
info_menu_3v3
else
info_menu
info_menu_ke
fi
break;;
7) clear

View file

@ -16,6 +16,19 @@ function moonraker_nginx_message(){
bottom_line
}
function moonraker_3v3_message(){
top_line
title 'Updated Moonraker' "${yellow}"
inner_line
hr
echo -e "${cyan}Moonraker is a Python 3 based web server that exposes APIs ${white}"
echo -e "${cyan}with which client applications may use to interact with ${white}"
echo -e "${cyan}Klipper firmware. ${white}"
echo -e "${cyan}This allows to have an updated version of Moonraker. ${white}"
hr
bottom_line
}
function install_moonraker_nginx(){
moonraker_nginx_message
local yn
@ -24,8 +37,10 @@ function install_moonraker_nginx(){
case "${yn}" in
Y|y)
echo -e "${white}"
echo -e "Info: Extracting files..."
echo -e "Info: Extracting Moonraker files..."
tar -xvf "$MOONRAKER_URL1" -C "$USR_DATA"
echo -e "Info: Extracting Nginx files..."
tar -xvf "$NGINX_URL" -C "$USR_DATA"
echo -e "Info: Copying services files..."
if [ ! -f "$INITD_FOLDER"/S50nginx ]; then
cp "$NGINX_SERVICE_URL" "$INITD_FOLDER"/S50nginx
@ -82,10 +97,12 @@ function remove_moonraker_nginx(){
Y|y)
echo -e "${white}"
echo -e "Info: Stopping Moonraker and Nginx services..."
cd /overlay/upper
stop_moonraker
stop_nginx
echo -e "Info: Removing files..."
cd "$MOONRAKER_FOLDER"/moonraker-env/bin
python3 -m pip uninstall -y pyserial-asyncio==0.6
cd
rm -f "$INITD_FOLDER"/S50nginx
rm -f "$INITD_FOLDER"/S56moonraker_service
rm -f "$KLIPPER_CONFIG_FOLDER"/moonraker.conf
@ -107,4 +124,114 @@ function remove_moonraker_nginx(){
error_msg "Please select a correct choice!";;
esac
done
}
function install_moonraker_3v3(){
moonraker_3v3_message
local yn
while true; do
install_msg "Updated Moonraker" yn
case "${yn}" in
Y|y)
echo -e "${white}"
echo -e "Info: Stopping Moonraker and Nginx services..."
stop_moonraker
stop_nginx
echo -e "Info: Extracting files..."
tar -xvf "$MOONRAKER_URL1" -C "$USR_DATA"
echo -e "Info: Deleting existing folders..."
rm -rf "$USR_SHARE"/moonraker
rm -rf "$USR_SHARE"/moonraker-env
echo -e "Info: Linking files..."
ln -sf "$MOONRAKER_FOLDER"/moonraker "$USR_SHARE"/moonraker
ln -sf "$MOONRAKER_FOLDER"/moonraker-env "$USR_SHARE"/moonraker-env
if [ -f /etc/nginx/nginx.conf ]; then
echo -e "Info: Copying Nginx configuration file..."
mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.backup
cp "$NGINX_CONF_URL" /etc/nginx/nginx.conf
fi
echo -e "Info: Copying Moonraker configuration file..."
if [ -f "$KLIPPER_CONFIG_FOLDER"/moonraker.conf ]; then
rm -f "$KLIPPER_CONFIG_FOLDER"/moonraker.conf
fi
cp "$MOONRAKER_URL2" "$KLIPPER_CONFIG_FOLDER"/moonraker.conf
if [ -f "$PRINTER_DATA_FOLDER"/moonraker.asvc ]; then
rm -f "$PRINTER_DATA_FOLDER"/moonraker.asvc
fi
cp "$MOONRAKER_URL3" "$PRINTER_DATA_FOLDER"/moonraker.asvc
echo -e "Info: Applying changes from official repo..."
cd "$MOONRAKER_FOLDER"/moonraker
git stash; git checkout master; git pull
echo -e "Info: Installing Supervisor Lite..."
chmod 755 "$SUPERVISOR_URL"
ln -sf "$SUPERVISOR_URL" "$SUPERVISOR_FILE"
echo -e "Info: Installing Host Controls Support..."
chmod 755 "$SUDO_URL"
chmod 755 "$SYSTEMCTL_URL"
ln -sf "$SUDO_URL" "$SUDO_FILE"
ln -sf "$SYSTEMCTL_URL" "$SYSTEMCTL_FILE"
echo -e "Info: Installing necessary packages..."
cd "$MOONRAKER_FOLDER"/moonraker-env/bin
python3 -m pip install --no-cache-dir pyserial-asyncio==0.6
echo -e "Info: Starting Nginx service..."
start_nginx
echo -e "Info: Starting Moonraker service..."
start_moonraker
ok_msg "Updated Moonraker has been installed successfully!"
return;;
N|n)
error_msg "Installation canceled!"
return;;
*)
error_msg "Please select a correct choice!";;
esac
done
}
function remove_moonraker_3v3(){
moonraker_3v3_message
local yn
while true; do
remove_msg "Updated Moonraker" yn
case "${yn}" in
Y|y)
echo -e "${white}"
echo -e "Info: Stopping Moonraker and Nginx services..."
stop_moonraker
stop_nginx
echo -e "Info: Removing files..."
cd "$MOONRAKER_FOLDER"/moonraker-env/bin
python3 -m pip uninstall -y pyserial-asyncio==0.6
cd
rm -rf "$PRINTER_DATA_FOLDER"/comms
rm -rf "$MOONRAKER_FOLDER"
rm -f "$KLIPPER_CONFIG_FOLDER"/moonraker.conf
rm -f "$KLIPPER_CONFIG_FOLDER"/.moonraker.conf.bkp
rm -f "$PRINTER_DATA_FOLDER"/.moonraker.uuid
rm -f "$PRINTER_DATA_FOLDER"/moonraker.asvc
rm -f "$SUPERVISOR_FILE"
rm -f "$SUDO_FILE"
rm -f "$SYSTEMCTL_FILE"
if [ -f /etc/nginx/nginx.conf.backup ]; then
echo -e "Info: Restoring stock Nginx configuration..."
rm -f /etc/nginx/nginx.conf
mv /etc/nginx/nginx.conf.backup /etc/nginx/nginx.conf
fi
echo -e "Info: Restoring stock Moonraker version..."
rm -rf /overlay/upper/usr/share/moonraker
rm -rf /overlay/upper/usr/share/moonraker-env
mount -o remount /
echo -e "Info: Starting Nginx service..."
start_nginx
echo -e "Info: Starting Moonraker service..."
start_moonraker
ok_msg "Updated Moonraker has been removed successfully!"
return;;
N|n)
error_msg "Deletion canceled!"
return;;
*)
error_msg "Please select a correct choice!";;
esac
done
}

View file

@ -17,6 +17,7 @@ function set_paths() {
CURL="${HELPER_SCRIPT_FOLDER}/files/fixes/curl"
INITD_FOLDER="/etc/init.d"
USR_DATA="/usr/data"
USR_SHARE="/usr/share"
PRINTER_DATA_FOLDER="$USR_DATA/printer_data"
# Helper Script #
@ -38,7 +39,9 @@ function set_paths() {
# Nginx #
NGINX_FOLDER="${USR_DATA}/nginx"
NGINX_URL="${HS_FILES}/moonraker/nginx.tar.gz"
NGINX_SERVICE_URL="${HS_FILES}/services/S50nginx"
NGINX_CONF_URL="${HS_FILES}/moonraker/nginx.conf"
# Supervisor Lite #
SUPERVISOR_FILE="/usr/bin/supervisorctl"
@ -56,6 +59,7 @@ function set_paths() {
KLIPPER_KLIPPY_FOLDER="/usr/share/klipper/klippy"
KLIPPER_SERVICE_URL="${HS_FILES}/services/S55klipper_service"
KLIPPER_GCODE_URL="${HS_FILES}/fixes/gcode.py"
KLIPPER_GCODE_3V3_URL="${HS_FILES}/fixes/gcode_3v3.py"
# Fluidd #
FLUIDD_FOLDER="${USR_DATA}/fluidd"
@ -76,6 +80,8 @@ function set_paths() {
# Klipper Adaptive Meshing & Purging #
KAMP_FOLDER="${HS_CONFIG_FOLDER}/KAMP"
KAMP_URL="${HS_FILES}/kamp"
VIRTUAL_PINS_FILE="${KLIPPER_EXTRAS_FOLDER}/virtual_pins.py"
VIRTUAL_PINS_URL="${HS_FILES}/klipper-virtual-pins/virtual_pins.py"
# Buzzer Support #
BUZZER_FILE="${HS_CONFIG_FOLDER}/buzzer-support.cfg"
@ -98,6 +104,7 @@ function set_paths() {
# Useful Macros #
USEFUL_MACROS_FILE="${HS_CONFIG_FOLDER}/useful-macros.cfg"
USEFUL_MACROS_URL="${HS_FILES}/macros/useful-macros.cfg"
USEFUL_MACROS_3V3_URL="${HS_FILES}/macros/useful-macros-3v3.cfg"
# Save Z-Offset Macros #
SAVE_ZOFFSET_FILE="${HS_CONFIG_FOLDER}/save-zoffset.cfg"
@ -109,13 +116,10 @@ function set_paths() {
SCREWS_ADJUST_K1_URL="${HS_FILES}/screws-tilt-adjust/screws-tilt-adjust-k1.cfg"
SCREWS_ADJUST_K1M_URL="${HS_FILES}/screws-tilt-adjust/screws-tilt-adjust-k1max.cfg"
# Virtual Pins Support #
VIRTUAL_PINS_FILE="${KLIPPER_EXTRAS_FOLDER}/virtual_pins.py"
VIRTUAL_PINS_URL="${HS_FILES}/klipper-virtual-pins/virtual_pins.py"
# M600 Support #
M600_SUPPORT_FILE="${HS_CONFIG_FOLDER}/M600-support.cfg"
M600_SUPPORT_URL="${HS_FILES}/macros/M600-support.cfg"
M600_SUPPORT_3V3_URL="${HS_FILES}/macros/M600-support-3v3.cfg"
# Git Backup #
GIT_BACKUP_INSTALLER="${HS_FILES}/git-backup/git-backup.sh"
@ -130,6 +134,12 @@ function set_paths() {
# Camera Settings Control #
CAMERA_SETTINGS_FILE="${HS_CONFIG_FOLDER}/camera-settings.cfg"
CAMERA_SETTINGS_URL="${HS_FILES}/camera-settings/camera-settings.cfg"
CAMERA_SETTINGS_NEBULA_URL="${HS_FILES}/camera-settings/camera-settings-nebula.cfg"
# USB Camera Support
USB_CAMERA_FILE="${INITD_FOLDER}/S50usb_camera"
USB_CAMERA_SINGLE_URL="${HS_FILES}/services/S50usb_camera-single"
USB_CAMERA_DUAL_URL="${HS_FILES}/services/S50usb_camera-dual"
# OctoEverywhere #
OCTOEVERYWHERE_FOLDER="${USR_DATA}/octoeverywhere"
@ -165,6 +175,8 @@ function set_paths() {
GUPPY_SCREEN_FOLDER="${USR_DATA}/guppyscreen"
GUPPY_SCREEN_URL1="${HS_FILES}/guppy-screen/guppy_update.cfg"
GUPPY_SCREEN_URL2="${HS_FILES}/guppy-screen/guppy-update.sh"
GUPPY_SCREEN_3V3_URL="${HS_FILES}/guppy-screen/guppy_update-3v3.cfg"
GUPPY_SCREEN_CONFIG_3V3_URL="${HS_FILES}/guppy-screen/guppyconfig-3v3.json"
# Creality Dynamic Logos for Fluidd #
FLUIDD_LOGO_FILE="${USR_DATA}/fluidd/logo_creality_v2.svg"

View file

@ -157,7 +157,12 @@ function printing_gcode_from_folder(){
rm -f "$KLIPPER_KLIPPY_FOLDER"/gcode.pyc
fi
echo -e "Info: Linking files..."
ln -sf "$KLIPPER_GCODE_URL" "$KLIPPER_KLIPPY_FOLDER"/gcode.py
if [ "$model" = "K1" ]; then
ln -sf "$KLIPPER_GCODE_URL" "$KLIPPER_KLIPPY_FOLDER"/gcode.py
fi
if [ "$model" = "3V3" ]; then
ln -sf "$KLIPPER_GCODE_3V3_URL" "$KLIPPER_KLIPPY_FOLDER"/gcode.py
fi
echo -e "Info: Restarting Klipper service..."
restart_klipper
ok_msg "Fix has been applied successfully!"

102
scripts/usb_camera.sh Executable file
View file

@ -0,0 +1,102 @@
#!/bin/sh
set -e
function usb_camera_message(){
top_line
title 'USB Camera Support' "${yellow}"
inner_line
hr
echo -e "${cyan}This allows to use third-party camera from your printer's ${white}"
echo -e "${cyan}USB port. ${white}"
hr
bottom_line
}
function install_usb_camera(){
usb_camera_message
local yn
while true; do
install_msg "USB Camera Support" yn
case "${yn}" in
Y|y)
echo -e "${white}"
echo -e "Info: Copying file..."
if [ "$model" = "K1" ]; then
cp "$USB_CAMERA_DUAL_URL" "$INITD_FOLDER"/S50usb_camera
else
cp "$USB_CAMERA_SINGLE_URL" "$INITD_FOLDER"/S50usb_camera
echo
echo -e " ${darkred}Be careful with the 1080p resolution!"
echo -e " It takes more resources and timelapses are larger and take longer to convert.${white}"
echo -e " 720p is a good compromise between quality and performance."
echo -e " Make sure your camera is compatible with the chosen resolution."
echo
local resolution
while true; do
read -p " What camera resolution do you want to apply? (${yellow}480p${white}/${yellow}720p${white}/${yellow}1080p${white}): ${yellow}" resolution
case "${resolution}" in
480p|480P)
echo -e "${white}"
echo -e "Info: Applying change..."
sed -i 's/1280x720/640x480/g' "$INITD_FOLDER"/S50usb_camera
break;;
720p|720P)
echo -e "${white}"
echo -e "Info: Applying change..."
break;;
1080p|1080p)
echo -e "${white}"
echo -e "Info: Applying change..."
sed -i 's/1280x720/1920x1080/g' "$INITD_FOLDER"/S50usb_camera
break;;
*)
error_msg "Please select a correct choice!";;
esac
done
fi
chmod 755 "$INITD_FOLDER"/S50usb_camera
echo -e "Info: Installing necessary packages..."
"$ENTWARE_FILE" update && "$ENTWARE_FILE" install mjpg-streamer mjpg-streamer-input-http mjpg-streamer-input-uvc mjpg-streamer-output-http mjpg-streamer-www
echo -e "Info: Starting service..."
"$INITD_FOLDER"/S50usb_camera start
ok_msg "USB Camera Support has been installed successfully!"
return;;
N|n)
error_msg "Installation canceled!"
return;;
*)
error_msg "Please select a correct choice!";;
esac
done
}
function remove_usb_camera(){
usb_camera_message
local yn
while true; do
remove_msg "USB Camera Support" yn
case "${yn}" in
Y|y)
echo -e "${white}"
echo -e "Info: Stopping service..."
"$INITD_FOLDER"/S50usb_camera stop
echo -e "Info: Removing file..."
rm -f "$INITD_FOLDER"/S50usb_camera
echo -e "Info: Removing packages..."
"$ENTWARE_FILE" --autoremove remove mjpg-streamer-www
"$ENTWARE_FILE" --autoremove remove mjpg-streamer-output-http
"$ENTWARE_FILE" --autoremove remove mjpg-streamer-input-uvc
"$ENTWARE_FILE" --autoremove remove mjpg-streamer-input-http
"$ENTWARE_FILE" --autoremove remove mjpg-streamer
ok_msg "USB Camera Support has been removed successfully!"
echo -e " Please reboot your printer by using power switch on back!"
return;;
N|n)
error_msg "Deletion canceled!"
return;;
*)
error_msg "Please select a correct choice!";;
esac
done
}

View file

@ -29,7 +29,11 @@ function install_useful_macros(){
mkdir -p "$HS_CONFIG_FOLDER"
fi
echo -e "Info: Linking file..."
ln -sf "$USEFUL_MACROS_URL" "$HS_CONFIG_FOLDER"/useful-macros.cfg
if [ "$model" = "K1" ]; then
ln -sf "$USEFUL_MACROS_URL" "$HS_CONFIG_FOLDER"/useful-macros.cfg
else
ln -sf "$USEFUL_MACROS_3V3_URL" "$HS_CONFIG_FOLDER"/useful-macros.cfg
fi
if grep -q "include Helper-Script/useful-macros" "$PRINTER_CFG" ; then
echo -e "Info: Useful Macros configurations are already enabled in printer.cfg file..."
else

View file

@ -1,73 +0,0 @@
#!/bin/sh
set -e
function virtual_pins_message(){
top_line
title 'Virtual Pins Support' "${yellow}"
inner_line
hr
echo -e "${cyan}It allows usage of virtual (simulated) pins in Klipper ${white}"
echo -e "${cyan}configurations files. ${white}"
hr
bottom_line
}
function install_virtual_pins(){
virtual_pins_message
local yn
while true; do
install_msg "Virtual Pins Support" yn
case "${yn}" in
Y|y)
echo -e "${white}"
echo -e "Info: Linking file..."
ln -sf "$VIRTUAL_PINS_URL" "$VIRTUAL_PINS_FILE"
if grep -q "[virtual_pins]" "$PRINTER_CFG" ; then
echo -e "Info: Adding [virtual_pins] configuration in printer.cfg file..."
sed -i '/\[include sensorless.cfg\]/i [virtual_pins]' "$PRINTER_CFG"
else
echo -e "Info: [virtual_pins] configuration is already enabled in printer.cfg file..."
fi
echo -e "Info: Restarting Klipper service..."
restart_klipper
ok_msg "Virtual Pins Support has been installed successfully!"
return;;
N|n)
error_msg "Installation canceled!"
return;;
*)
error_msg "Please select a correct choice!";;
esac
done
}
function remove_virtual_pins(){
virtual_pins_message
local yn
while true; do
remove_msg "Virtual Pins Support" yn
case "${yn}" in
Y|y)
echo -e "${white}"
echo -e "Info: Removing file..."
rm -f "$KLIPPER_EXTRAS_FOLDER"/virtual_pins.py
rm -f "$KLIPPER_EXTRAS_FOLDER"/virtual_pins.pyc
if grep -q "[virtual_pins]" "$PRINTER_CFG" ; then
echo -e "Info: Removing [virtual_pins] configuration in printer.cfg file..."
sed -i '/\[virtual_pins\]/d' "$PRINTER_CFG"
else
echo -e "Info: [virtual_pins] configuration is already removed in printer.cfg file..."
fi
echo -e "Info: Restarting Klipper service..."
restart_klipper
ok_msg "Virtual Pins Support has been removed successfully!"
return;;
N|n)
error_msg "Deletion canceled!"
return;;
*)
error_msg "Please select a correct choice!";;
esac
done
}