mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-25 00:33:37 +05:00
Compare commits
16 Commits
v5.1.6
...
b2d00c4594
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b2d00c4594 | ||
|
|
6c81ba2232 | ||
|
|
a777461296 | ||
|
|
2c045bb647 | ||
|
|
a21e059328 | ||
|
|
6853e97fb8 | ||
|
|
837488e4dd | ||
|
|
68cc03f3d0 | ||
|
|
606686b33c | ||
|
|
fc494e21da | ||
|
|
41fccb88fd | ||
|
|
66975cd913 | ||
|
|
89ad92468d | ||
|
|
ef44ba8253 | ||
|
|
d41865e693 | ||
|
|
ba594355ba |
3
.vs/ProjectSettings.json
Normal file
3
.vs/ProjectSettings.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"CurrentProjectSetting": null
|
||||||
|
}
|
||||||
11
.vs/VSWorkspaceState.json
Normal file
11
.vs/VSWorkspaceState.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"ExpandedNodes": [
|
||||||
|
"",
|
||||||
|
"\\kiauh",
|
||||||
|
"\\kiauh\\components\\droidklipp",
|
||||||
|
"\\kiauh\\core",
|
||||||
|
"\\kiauh\\core\\menus"
|
||||||
|
],
|
||||||
|
"SelectedNode": "\\kiauh\\core\\menus\\main_menu.py",
|
||||||
|
"PreviewInSolutionExplorer": false
|
||||||
|
}
|
||||||
BIN
.vs/kiauhPlusDroidKlipp/v16/.suo
Normal file
BIN
.vs/kiauhPlusDroidKlipp/v16/.suo
Normal file
Binary file not shown.
BIN
.vs/slnx.sqlite
Normal file
BIN
.vs/slnx.sqlite
Normal file
Binary file not shown.
@@ -71,14 +71,14 @@ sudo apt-get update && sudo apt-get install git -y
|
|||||||
Once git is installed, use the following command to download KIAUH into your home-directory:
|
Once git is installed, use the following command to download KIAUH into your home-directory:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
cd ~ && git clone https://github.com/dw-0/kiauh.git
|
cd ~ && git clone https://github.com/CodeMasterCody3D/kiauhPlusDroidKlipp.git
|
||||||
```
|
```
|
||||||
|
|
||||||
* **Step 3:** \
|
* **Step 3:** \
|
||||||
Finally, start KIAUH by running the next command:
|
Finally, start KIAUH by running the next command:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
./kiauh/kiauh.sh
|
./kiauhPlusDroidKlipp/kiauh.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
* **Step 4:** \
|
* **Step 4:** \
|
||||||
|
|||||||
47
kiauh/components/droidklipp/droidklipp.py
Normal file
47
kiauh/components/droidklipp/droidklipp.py
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
def install_droidklipp():
|
||||||
|
try:
|
||||||
|
print("Are you sure you want to install DroidKlipp? (Y/N)")
|
||||||
|
user_confirmation = input().strip().lower()
|
||||||
|
|
||||||
|
if user_confirmation != 'y':
|
||||||
|
print("DroidKlipp installation aborted.")
|
||||||
|
return
|
||||||
|
|
||||||
|
print("Installing DroidKlipp...")
|
||||||
|
subprocess.run(['sudo', 'apt', 'install', '-y', 'adb', 'tmux'], check=True)
|
||||||
|
|
||||||
|
# Define the DroidKlipp repository URL and directory
|
||||||
|
droidklipp_repo_url = "https://github.com/CodeMasterCody3D/DroidKlipp.git"
|
||||||
|
droidklipp_dir = os.path.expanduser('~/DroidKlipp')
|
||||||
|
|
||||||
|
# Check if DroidKlipp directory exists, if not create it
|
||||||
|
if not os.path.isdir(droidklipp_dir):
|
||||||
|
print("DroidKlipp folder not found, creating directory...")
|
||||||
|
os.makedirs(droidklipp_dir)
|
||||||
|
|
||||||
|
# Clone the repository if not already cloned
|
||||||
|
if not os.path.isdir(os.path.join(droidklipp_dir, '.git')):
|
||||||
|
print("Cloning the DroidKlipp repository...")
|
||||||
|
subprocess.run(['git', 'clone', droidklipp_repo_url, droidklipp_dir], check=True)
|
||||||
|
else:
|
||||||
|
print("DroidKlipp repository already exists.")
|
||||||
|
|
||||||
|
# Change to the DroidKlipp directory
|
||||||
|
os.chdir(droidklipp_dir)
|
||||||
|
|
||||||
|
# Set executable permissions for the installation script
|
||||||
|
subprocess.run(['sudo', 'chmod', '+x', 'droidklipp.sh'], check=True)
|
||||||
|
|
||||||
|
# Run the installation script
|
||||||
|
subprocess.run(['./droidklipp.sh'], check=True)
|
||||||
|
|
||||||
|
print("DroidKlipp installation complete!")
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
print(f"Error during installation: {e}")
|
||||||
|
except Exception as e:
|
||||||
|
print(f"Unexpected error: {e}")
|
||||||
|
|
||||||
|
# Ensure you call this with proper confirmation before installation
|
||||||
@@ -102,7 +102,6 @@ def install_client(
|
|||||||
section=f"update_manager {client.name}",
|
section=f"update_manager {client.name}",
|
||||||
instances=mr_instances,
|
instances=mr_instances,
|
||||||
options=[
|
options=[
|
||||||
("persistent_files", ["config.json"]),
|
|
||||||
("type", "web"),
|
("type", "web"),
|
||||||
("channel", "stable"),
|
("channel", "stable"),
|
||||||
("repo", str(client.repo_path)),
|
("repo", str(client.repo_path)),
|
||||||
|
|||||||
@@ -118,8 +118,8 @@ def enable_mainsail_remotemode() -> None:
|
|||||||
c_json = MainsailData().client_dir.joinpath("config.json")
|
c_json = MainsailData().client_dir.joinpath("config.json")
|
||||||
with open(c_json, "r") as f:
|
with open(c_json, "r") as f:
|
||||||
config_data = json.load(f)
|
config_data = json.load(f)
|
||||||
|
|
||||||
if config_data["instancesDB"] == "browser" or config_data["instancesDB"] == "json":
|
if config_data["instancesDB"] == "browser":
|
||||||
Logger.print_info("Remote mode already configured. Skipped ...")
|
Logger.print_info("Remote mode already configured. Skipped ...")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ from __future__ import annotations
|
|||||||
import textwrap
|
import textwrap
|
||||||
from typing import Type
|
from typing import Type
|
||||||
|
|
||||||
|
from components.droidklipp.droidklipp import install_droidklipp
|
||||||
from components.crowsnest.crowsnest import install_crowsnest
|
from components.crowsnest.crowsnest import install_crowsnest
|
||||||
from components.klipper.services.klipper_setup_service import KlipperSetupService
|
from components.klipper.services.klipper_setup_service import KlipperSetupService
|
||||||
from components.klipperscreen.klipperscreen import install_klipperscreen
|
from components.klipperscreen.klipperscreen import install_klipperscreen
|
||||||
@@ -41,7 +42,6 @@ class InstallMenu(BaseMenu):
|
|||||||
|
|
||||||
def set_previous_menu(self, previous_menu: Type[BaseMenu] | None) -> None:
|
def set_previous_menu(self, previous_menu: Type[BaseMenu] | None) -> None:
|
||||||
from core.menus.main_menu import MainMenu
|
from core.menus.main_menu import MainMenu
|
||||||
|
|
||||||
self.previous_menu = previous_menu if previous_menu is not None else MainMenu
|
self.previous_menu = previous_menu if previous_menu is not None else MainMenu
|
||||||
|
|
||||||
def set_options(self) -> None:
|
def set_options(self) -> None:
|
||||||
@@ -53,7 +53,9 @@ class InstallMenu(BaseMenu):
|
|||||||
"5": Option(method=self.install_mainsail_config),
|
"5": Option(method=self.install_mainsail_config),
|
||||||
"6": Option(method=self.install_fluidd_config),
|
"6": Option(method=self.install_fluidd_config),
|
||||||
"7": Option(method=self.install_klipperscreen),
|
"7": Option(method=self.install_klipperscreen),
|
||||||
"8": Option(method=self.install_crowsnest),
|
"8": Option(method=self.install_droidklipp), # Add DroidKlipp option
|
||||||
|
"9": Option(method=self.install_crowsnest),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def print_menu(self) -> None:
|
def print_menu(self) -> None:
|
||||||
@@ -62,15 +64,17 @@ class InstallMenu(BaseMenu):
|
|||||||
╟───────────────────────────┬───────────────────────────╢
|
╟───────────────────────────┬───────────────────────────╢
|
||||||
║ Firmware & API: │ Touchscreen GUI: ║
|
║ Firmware & API: │ Touchscreen GUI: ║
|
||||||
║ 1) [Klipper] │ 7) [KlipperScreen] ║
|
║ 1) [Klipper] │ 7) [KlipperScreen] ║
|
||||||
║ 2) [Moonraker] │ ║
|
║ 2) [Moonraker] │ 8) [DroidKlipp] ║
|
||||||
|
║ │ ║
|
||||||
║ │ Webcam Streamer: ║
|
║ │ Webcam Streamer: ║
|
||||||
║ Webinterface: │ 8) [Crowsnest] ║
|
║ Webinterface: │ 9) [Crowsnest] ║
|
||||||
║ 3) [Mainsail] │ ║
|
║ 3) [Mainsail] │ ║
|
||||||
║ 4) [Fluidd] │ ║
|
║ 4) [Fluidd] │ ║
|
||||||
║ │ ║
|
║ │ ║
|
||||||
║ Client-Config: │ ║
|
║ Client-Config: │ ║
|
||||||
║ 5) [Mainsail-Config] │ ║
|
║ 5) [Mainsail-Config] │ ║
|
||||||
║ 6) [Fluidd-Config] │ ║
|
║ 6) [Fluidd-Config] │ ║
|
||||||
|
║ │ ║
|
||||||
╟───────────────────────────┴───────────────────────────╢
|
╟───────────────────────────┴───────────────────────────╢
|
||||||
"""
|
"""
|
||||||
)[1:]
|
)[1:]
|
||||||
@@ -107,3 +111,6 @@ class InstallMenu(BaseMenu):
|
|||||||
|
|
||||||
def install_crowsnest(self, **kwargs) -> None:
|
def install_crowsnest(self, **kwargs) -> None:
|
||||||
install_crowsnest()
|
install_crowsnest()
|
||||||
|
|
||||||
|
def install_droidklipp(self, **kwargs) -> None:
|
||||||
|
install_droidklipp()
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import sys
|
|||||||
import textwrap
|
import textwrap
|
||||||
from typing import Callable, Type
|
from typing import Callable, Type
|
||||||
|
|
||||||
|
from components.droidklipp.droidklipp import install_droidklipp
|
||||||
from components.crowsnest.crowsnest import get_crowsnest_status
|
from components.crowsnest.crowsnest import get_crowsnest_status
|
||||||
from components.klipper.klipper_utils import get_klipper_status
|
from components.klipper.klipper_utils import get_klipper_status
|
||||||
from components.klipperscreen.klipperscreen import get_klipperscreen_status
|
from components.klipperscreen.klipperscreen import get_klipperscreen_status
|
||||||
|
|||||||
@@ -9,6 +9,8 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from components.droidklipp.droidklipp import install_droidklipp
|
||||||
|
|
||||||
import re
|
import re
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ from __future__ import annotations
|
|||||||
import shutil
|
import shutil
|
||||||
import tempfile
|
import tempfile
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import List, Tuple, Union
|
from typing import List, Tuple
|
||||||
|
|
||||||
from core.logger import Logger
|
from core.logger import Logger
|
||||||
from core.submodules.simple_config_parser.src.simple_config_parser.simple_config_parser import (
|
from core.submodules.simple_config_parser.src.simple_config_parser.simple_config_parser import (
|
||||||
@@ -19,7 +19,7 @@ from core.submodules.simple_config_parser.src.simple_config_parser.simple_config
|
|||||||
)
|
)
|
||||||
from utils.instance_type import InstanceType
|
from utils.instance_type import InstanceType
|
||||||
|
|
||||||
ConfigOption = Tuple[str, Union[str, List[str]]]
|
ConfigOption = Tuple[str, str]
|
||||||
|
|
||||||
|
|
||||||
def add_config_section(
|
def add_config_section(
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ function update_klipperscreen() {
|
|||||||
git checkout -f master && ok_msg "Checkout successfull"
|
git checkout -f master && ok_msg "Checkout successfull"
|
||||||
|
|
||||||
if [[ $(md5sum "${KLIPPERSCREEN_DIR}/scripts/KlipperScreen-requirements.txt" | cut -d " " -f1) != "${old_md5}" ]]; then
|
if [[ $(md5sum "${KLIPPERSCREEN_DIR}/scripts/KlipperScreen-requirements.txt" | cut -d " " -f1) != "${old_md5}" ]]; then
|
||||||
status_msg "New dependencies detected..."
|
status_msg "New dependecies detected..."
|
||||||
"${KLIPPERSCREEN_ENV}"/bin/pip install -r "${KLIPPERSCREEN_DIR}/scripts/KlipperScreen-requirements.txt"
|
"${KLIPPERSCREEN_ENV}"/bin/pip install -r "${KLIPPERSCREEN_DIR}/scripts/KlipperScreen-requirements.txt"
|
||||||
ok_msg "Dependencies have been installed!"
|
ok_msg "Dependencies have been installed!"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ function update_mobileraker() {
|
|||||||
git checkout -f main && ok_msg "Checkout successfull"
|
git checkout -f main && ok_msg "Checkout successfull"
|
||||||
|
|
||||||
if [[ $(md5sum "${MOBILERAKER_DIR}/scripts/mobileraker-requirements.txt" | cut -d " " -f1) != "${old_md5}" ]]; then
|
if [[ $(md5sum "${MOBILERAKER_DIR}/scripts/mobileraker-requirements.txt" | cut -d " " -f1) != "${old_md5}" ]]; then
|
||||||
status_msg "New dependencies detected..."
|
status_msg "New dependecies detected..."
|
||||||
"${MOBILERAKER_ENV}"/bin/pip install -r "${MOBILERAKER_DIR}/scripts/mobileraker-requirements.txt"
|
"${MOBILERAKER_ENV}"/bin/pip install -r "${MOBILERAKER_DIR}/scripts/mobileraker-requirements.txt"
|
||||||
ok_msg "Dependencies have been installed!"
|
ok_msg "Dependencies have been installed!"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user