diff --git a/Makefile b/Makefile index 55da2c2..6099c11 100644 --- a/Makefile +++ b/Makefile @@ -8,10 +8,10 @@ DRY_RUN=false # Define dependencies DEPENDENCIES := nano htop nload sshpass python3-pip git ninja-build pkg-config gcc g++ systemd dkms python3-all python3-all-dev libpcap-dev libsodium-dev libevent-dev python3-pip python3-pyroute2 python3-msgpack \ python3-future python3-twisted python3-serial python3-jinja2 iw virtualenv debhelper dh-python fakeroot build-essential python3-autobahn python3-websockets nodejs npm gstreamer1.0-tools gstreamer1.0-plugins-base \ - gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-rtsp libgstrtspserver-1.0-0 python3-gi + gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-rtsp libgstrtspserver-1.0-0 python3-gi gstreamer1.0-gl libfuse2 libxcb-xinerama0 libxkbcommon-x11-0 libxcb-cursor-dev # Define installation targets and options -.PHONY: enable install interactive dependencies uninstall default full-install spirilink-driver spirilink-software setup-webapp-service configure-spirilink install-key setup-rtsp-service +.PHONY: enable install interactive dependencies uninstall default full-install spirilink-driver spirilink-software setup-webapp-service configure-spirilink install-key setup-rtsp-service install-QGC default: interactive install @@ -39,14 +39,15 @@ full-install: $(MAKE) setup-webapp-service $(MAKE) install-key $(MAKE) setup-rtsp-service + $(MAKE) install-QGC @echo "Full installation complete." manual-select: @clear @echo "Please select the components to install:" @echo "[1] Basic Tools (nano, htop, etc.)" - @echo "[2] MAVLink Router" - @echo "[3] Python Dependencies" + @echo "[2] MAVLink Router -TBD" + @echo "[3] QGroundControl" @echo "[4] SpiriLink Driver" @echo "[5] Configure SpiriLink" @echo "[6] SpiriLink Software" @@ -59,7 +60,7 @@ manual-select: for choice in $$selected; do \ if [ "$$choice" = "1" ]; then $(MAKE) dependencies; fi; \ if [ "$$choice" = "2" ]; then $(MAKE) mavlink-router; fi; \ - if [ "$$choice" = "3" ]; then $(MAKE) python-deps; fi; \ + if [ "$$choice" = "3" ]; then $(MAKE) install-QGC; fi; \ if [ "$$choice" = "4" ]; then $(MAKE) spirilink-driver; fi; \ if [ "$$choice" = "5" ]; then $(MAKE) configure-spirilink; fi; \ if [ "$$choice" = "6" ]; then $(MAKE) spirilink-software; fi; \ @@ -95,6 +96,16 @@ dependencies: done; @echo "All dependencies installed." +# Install QGC +.PHONY: install-QGC +install-QGC: + @echo "Installing QGroundControl..." + $(SUDO) usermod -a -G dialout $(USER); + $(SUDO) mkdir -p ~/QGC; + $(SUDO) wget -O ~/QGC/QGroundControl.AppImage https://d176tv9ibo4jno.cloudfront.net/latest/QGroundControl.AppImage; + $(SUDO) chmod +x ~/QGC/QGroundControl.AppImage; + @echo "QGroundControl installation complete. Run it with ~/QGC/QGroundControl.AppImage" + # Install SpiriLink driver .PHONY: spirilink-driver spirilink-driver: @@ -110,8 +121,9 @@ spirilink-driver: $(SUDO) mkdir -p ~/tmp; \ if [ "$$DRIVER_TYPE" = "EU" ]; then \ echo "Installing SpiriLink 8812EU driver..."; \ - git clone -b v5.15.0.1 https://github.com/svpcom/rtl8812eu.git ~/tmp/rtl8812eu && \ - cd ~/tmp/rtl8812eu && $(SUDO) ./dkms-install.sh; \ + git clone -b v5.15.0.1 https://github.com/libc0607/rtl88x2eu-20230815 ~/tmp/rtl8812eu && \ + cd ~/tmp/rtl8812eu && $(SUDO) sed -i 's/CONFIG_PLATFORM_I386_PC = y/CONFIG_PLATFORM_I386_PC = n/g' Makefile && \ + $(SUDO) sed -i 's/CONFIG_PLATFORM_ARM64_RPI = n/CONFIG_PLATFORM_ARM64_RPI = y/g' Makefile && $(SUDO) ./dkms-install.sh; \ elif [ "$$DRIVER_TYPE" = "AU" ]; then \ echo "Installing SpiriLink 8812AU driver..."; \ git clone -b v5.2.20 https://github.com/svpcom/rtl8812au.git ~/tmp/rtl8812au && \