From 37691576fc9c2c5d7d8a22d60ccbf9cbdabc0d3b Mon Sep 17 00:00:00 2001 From: Mealman1551 Date: Mon, 12 Jan 2026 15:20:25 +0100 Subject: [PATCH 1/2] Update Makefile --- Makefile | 201 ++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 126 insertions(+), 75 deletions(-) diff --git a/Makefile b/Makefile index 21fc843..8d6c6bf 100644 --- a/Makefile +++ b/Makefile @@ -1,75 +1,126 @@ - -NAME=ADC_Archiver_1.4.4 -SRC=adc.py - -linux: - python3 -m nuitka --standalone --onefile --enable-plugin=tk-inter --output-dir=dist $(SRC) - -windows: - python -m nuitka --standalone --onefile --enable-plugin=tk-inter --windows-icon-from-ico=ADCIcon.ico --output-dir=dist $(SRC) - -deps-linux: - pip install -r requirements.txt --break-system-packages - pip install nuitka scons --break-system-packages - sudo apt install python3-tk -deps-windows: - python -m pip install -r requirements.txt - python -m pip install nuitka scons - -debug-linux: - python3 -m nuitka --debug --onefile --standalone --enable-plugin=tk-inter --output-dir=dist $(SRC) - -debug-windows: - python -m nuitka --debug --onefile --standalone --enable-plugin=tk-inter --windows-icon-from-ico=ADCIcon.ico --output-dir=dist $(SRC) - -clean-windows: - del /Q dist\* - -clean-linux: - rm -rf dist/* - -1.3.1-windows: - python -m nuitka --standalone --onefile --enable-plugin=tk-inter --windows-icon-from-ico=ADCIcon.ico --output-dir=dist src/v1_3_1/ADC_Archiver_1.3.1.py - -1.3.1-linux: - python3 -m nuitka --standalone --onefile --enable-plugin=tk-inter --output-dir=dist src/v1_3_1/ADC_Archiver_1.3.1.py - -1.2.0-windows: - python -m nuitka --standalone --onefile --enable-plugin=tk-inter --windows-icon-from-ico=ADCIcon.ico --output-dir=dist src/older/1.2.0/ADC_Archiver_1.2.0.py - -1.2.0-linux: - python3 -m nuitka --standalone --onefile --enable-plugin=tk-inter --output-dir=dist src/older/1.2.0/ADC_Archiver_1.2.0_Linux.py - -1.1.0-windows: - python -m nuitka --standalone --onefile --enable-plugin=tk-inter --windows-icon-from-ico=ADCIcon.ico --output-dir=dist "src/older/1.1.0/ADC Archiver 1.1.0 Source-Code.py" - -1.1.0-linux: - python3 -m nuitka --standalone --onefile --enable-plugin=tk-inter --output-dir=dist "src/older/1.1.0/ADC Archiver 1.1.0 Source-Code.py" - - -1.0.0-windows: - @echo This version is deprecated, please use at least 1.1.0 - python -m nuitka --standalone --onefile --enable-plugin=tk-inter --windows-icon-from-ico=ADCIcon.ico --output-dir=dist src/older/1.0.0/src1.0.0.py - -1.0.0-linux: - @echo This version is deprecated, please use at least 1.1.0 - python3 -m nuitka --standalone --onefile --enable-plugin=tk-inter --output-dir=dist src/older/1.0.0/src1.0.0.py - -install: - @echo "Installing ADC Archiver to /opt/adc..." - @if [ ! -d dist ]; then echo "dist not found. Build first."; exit 1; fi - @sudo mkdir -p /opt/adc - @bin=$$(ls dist/*.bin 2>/dev/null | head -n1) ; \ - if [ -z "$$bin" ]; then echo "No .bin found in dist"; exit 1; fi ; \ - echo "Using $$bin" ; \ - sudo cp "$$bin" /opt/adc/adc ; \ - sudo chmod +x /opt/adc/adc ; \ - sudo ln -sf /opt/adc/adc /usr/local/bin/adc - @echo "ADC Archiver installed successfully!" - @echo "You can now run 'adc' from anywhere in the terminal" - -remove: - @echo "Removing ADC Archiver from /opt/adc..." - sudo rm -rf /opt/adc - sudo rm -f /usr/local/bin/adc - @echo "ADC Archiver removed successfully!" +.PHONY: linux windows clean clean-linux clean-windows debug-linux debug-windows deps-linux deps-windows install remove \ + 1.3.1-linux 1.3.1-windows 1.2.0-linux 1.2.0-windows 1.1.0-linux 1.1.0-windows 1.0.0-linux 1.0.0-windows + +NAME=ADC_Archiver_1.4.4 +SRC=adc.py +INSTALL_DIR=/opt/adc +BINARY_NAME=adc +DESKTOP_FILE=adc-archiver.desktop +MIME_FILE=adc.xml +WRAPPER=invterm.sh + +# Build targets +linux: + python3 -m nuitka --standalone --onefile --enable-plugin=tk-inter --output-dir=dist $(SRC) + +windows: + python -m nuitka --standalone --onefile --enable-plugin=tk-inter --windows-icon-from-ico=ADCIcon.ico --output-dir=dist $(SRC) + +debug-linux: + python3 -m nuitka --debug --onefile --standalone --enable-plugin=tk-inter --output-dir=dist $(SRC) + +debug-windows: + python -m nuitka --debug --onefile --standalone --enable-plugin=tk-inter --windows-icon-from-ico=ADCIcon.ico --output-dir=dist $(SRC) + +# Dependencies +deps-linux: + pip install -r requirements.txt --break-system-packages + pip install nuitka scons --break-system-packages + sudo apt install python3-tk + +deps-windows: + python -m pip install -r requirements.txt + python -m pip install nuitka scons + +# Clean +clean-linux: + rm -rf dist/* + +clean-windows: + del /Q dist\* + +# Versioned builds +1.3.1-linux: + python3 -m nuitka --standalone --onefile --enable-plugin=tk-inter --output-dir=dist src/v1_3_1/ADC_Archiver_1.3.1.py + +1.3.1-windows: + python -m nuitka --standalone --onefile --enable-plugin=tk-inter --windows-icon-from-ico=ADCIcon.ico --output-dir=dist src/v1_3_1/ADC_Archiver_1.3.1.py + +1.2.0-linux: + python3 -m nuitka --standalone --onefile --enable-plugin=tk-inter --output-dir=dist src/older/1.2.0/ADC_Archiver_1.2.0_Linux.py + +1.2.0-windows: + python -m nuitka --standalone --onefile --enable-plugin=tk-inter --windows-icon-from-ico=ADCIcon.ico --output-dir=dist src/older/1.2.0/ADC_Archiver_1.2.0.py + +1.1.0-linux: + python3 -m nuitka --standalone --onefile --enable-plugin=tk-inter --output-dir=dist "src/older/1.1.0/ADC Archiver 1.1.0 Source-Code.py" + +1.1.0-windows: + python -m nuitka --standalone --onefile --enable-plugin=tk-inter --windows-icon-from-ico=ADCIcon.ico --output-dir=dist "src/older/1.1.0/ADC Archiver 1.1.0 Source-Code.py" + +1.0.0-linux: + @echo "This version is deprecated, please use at least 1.1.0" + python3 -m nuitka --standalone --onefile --enable-plugin=tk-inter --output-dir=dist src/older/1.0.0/src1.0.0.py + +1.0.0-windows: + @echo "This version is deprecated, please use at least 1.1.0" + python -m nuitka --standalone --onefile --enable-plugin=tk-inter --windows-icon-from-ico=ADCIcon.ico --output-dir=dist src/older/1.0.0/src1.0.0.py + +# Install / remove +install: + @echo "Installing ADC Archiver to $(INSTALL_DIR)..." + @if [ ! -d dist/adc.dist ]; then echo "dist/adc.dist folder not found. Build first with: make linux"; exit 1; fi + @sudo mkdir -p $(INSTALL_DIR) + @sudo cp -r dist/adc.dist/* $(INSTALL_DIR)/ + @sudo mv $(INSTALL_DIR)/adc.bin $(INSTALL_DIR)/$(BINARY_NAME) + @sudo chmod +x $(INSTALL_DIR)/$(BINARY_NAME) + @echo "Creating terminal wrapper script..." + @echo "#!/bin/bash" | sudo tee $(INSTALL_DIR)/$(WRAPPER) > /dev/null + @echo 'TERMINAL=""' | sudo tee -a $(INSTALL_DIR)/$(WRAPPER) > /dev/null + @echo 'if command -v gnome-terminal >/dev/null 2>&1; then' | sudo tee -a $(INSTALL_DIR)/$(WRAPPER) > /dev/null + @echo ' TERMINAL="gnome-terminal --"' | sudo tee -a $(INSTALL_DIR)/$(WRAPPER) > /dev/null + @echo 'elif command -v xfce4-terminal >/dev/null 2>&1; then' | sudo tee -a $(INSTALL_DIR)/$(WRAPPER) > /dev/null + @echo ' TERMINAL="xfce4-terminal -x"' | sudo tee -a $(INSTALL_DIR)/$(WRAPPER) > /dev/null + @echo 'elif command -v mate-terminal >/dev/null 2>&1; then' | sudo tee -a $(INSTALL_DIR)/$(WRAPPER) > /dev/null + @echo ' TERMINAL="mate-terminal -x"' | sudo tee -a $(INSTALL_DIR)/$(WRAPPER) > /dev/null + @echo 'elif command -v konsole >/dev/null 2>&1; then' | sudo tee -a $(INSTALL_DIR)/$(WRAPPER) > /dev/null + @echo ' TERMINAL="konsole -e"' | sudo tee -a $(INSTALL_DIR)/$(WRAPPER) > /dev/null + @echo 'elif command -v xterm >/dev/null 2>&1; then' | sudo tee -a $(INSTALL_DIR)/$(WRAPPER) > /dev/null + @echo ' TERMINAL="xterm -e"' | sudo tee -a $(INSTALL_DIR)/$(WRAPPER) > /dev/null + @echo 'else' | sudo tee -a $(INSTALL_DIR)/$(WRAPPER) > /dev/null + @echo ' echo "No terminal emulator found. Please install gnome-terminal, xfce4-terminal, mate-terminal or xterm."' | sudo tee -a $(INSTALL_DIR)/$(WRAPPER) > /dev/null + @echo ' exit 1' | sudo tee -a $(INSTALL_DIR)/$(WRAPPER) > /dev/null + @echo 'fi' | sudo tee -a $(INSTALL_DIR)/$(WRAPPER) > /dev/null + @echo 'exec $$TERMINAL /opt/adc/adc "$$@"' | sudo tee -a $(INSTALL_DIR)/$(WRAPPER) > /dev/null + @sudo chmod +x $(INSTALL_DIR)/$(WRAPPER) + @echo "[Desktop Entry]" | sudo tee /usr/share/applications/$(DESKTOP_FILE) > /dev/null + @echo "Name=ADC Archiver" | sudo tee -a /usr/share/applications/$(DESKTOP_FILE) > /dev/null + @echo "Comment=Extract ADC archives" | sudo tee -a /usr/share/applications/$(DESKTOP_FILE) > /dev/null + @echo "Exec=$(INSTALL_DIR)/$(WRAPPER) %f" | sudo tee -a /usr/share/applications/$(DESKTOP_FILE) > /dev/null + @echo "Terminal=false" | sudo tee -a /usr/share/applications/$(DESKTOP_FILE) > /dev/null + @echo "Type=Application" | sudo tee -a /usr/share/applications/$(DESKTOP_FILE) > /dev/null + @echo "MimeType=application/x-adc-archive;" | sudo tee -a /usr/share/applications/$(DESKTOP_FILE) > /dev/null + @echo "NoDisplay=true" | sudo tee -a /usr/share/applications/$(DESKTOP_FILE) > /dev/null + @echo "Categories=Utility;" | sudo tee -a /usr/share/applications/$(DESKTOP_FILE) > /dev/null + @echo "" | sudo tee /usr/share/mime/packages/$(MIME_FILE) > /dev/null + @echo "" | sudo tee -a /usr/share/mime/packages/$(MIME_FILE) > /dev/null + @echo " " | sudo tee -a /usr/share/mime/packages/$(MIME_FILE) > /dev/null + @echo " ADC Archive" | sudo tee -a /usr/share/mime/packages/$(MIME_FILE) > /dev/null + @echo " " | sudo tee -a /usr/share/mime/packages/$(MIME_FILE) > /dev/null + @echo " " | sudo tee -a /usr/share/mime/packages/$(MIME_FILE) > /dev/null + @echo "" | sudo tee -a /usr/share/mime/packages/$(MIME_FILE) > /dev/null + @sudo update-mime-database /usr/share/mime + @sudo update-desktop-database /usr/share/applications + @sudo ln -sf $(INSTALL_DIR)/$(BINARY_NAME) /usr/local/bin/adc + @if command -v caja >/dev/null 2>&1; then caja -q; elif command -v nautilus >/dev/null 2>&1; then nautilus -q; elif command -v dolphin >/dev/null 2>&1; then kbuildsycoca5; fi + @echo "ADC Archiver installed successfully!" +remove: + @echo "Removing ADC Archiver..." + @if [ -d $(INSTALL_DIR) ]; then sudo rm -rf $(INSTALL_DIR); fi + @if [ -L /usr/local/bin/adc ]; then sudo rm -f /usr/local/bin/adc; fi + @if [ -f /usr/share/applications/$(DESKTOP_FILE) ]; then sudo rm -f /usr/share/applications/$(DESKTOP_FILE); fi + @if [ -f /usr/share/mime/packages/$(MIME_FILE) ]; then sudo rm -f /usr/share/mime/packages/$(MIME_FILE); fi + @sudo update-mime-database /usr/share/mime + @sudo update-desktop-database /usr/share/applications + @if command -v caja >/dev/null 2>&1; then caja -q; elif command -v nautilus >/dev/null 2>&1; then nautilus -q; elif command -v dolphin >/dev/null 2>&1; then kbuildsycoca5; fi + @echo "ADC Archiver removed successfully!" From 86ee9cbd72e4b5c6fcc3ae747c2ef75843a08864 Mon Sep 17 00:00:00 2001 From: Mealman1551 Date: Mon, 12 Jan 2026 15:20:27 +0100 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d5f45ee..ba9a0e2 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [ADC contact e-mail address](mailto:nathandubuy4+adc@gmail.com) -[Forum](https://groups.google.com/g/adc-archiver) (Main announcement channel) +[Mailinglist](https://groups.google.com/g/adc-archiver) (Main announcement channel) IRC: OFTC - #adc-archiver (Only used for meetings and events)