release: restore ZUPT and harden source-only 5.2.2
This commit is contained in:
parent
74e393ba3e
commit
ff99770bd0
205 changed files with 19627 additions and 13215 deletions
|
|
@ -1,51 +1,7 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# Copyright (c) 2025-2026 Cristian Cezar Moisés
|
||||
# Build Zupt GUI AppImage
|
||||
# Requires: appimagetool, python3, pip
|
||||
set -e
|
||||
|
||||
APP="zupt-gui"
|
||||
VERSION="1.0.0"
|
||||
APPDIR="${APP}.AppDir"
|
||||
|
||||
rm -rf "$APPDIR" "${APP}-${VERSION}-x86_64.AppImage"
|
||||
mkdir -p "$APPDIR/usr/bin" "$APPDIR/usr/share/zupt-gui" "$APPDIR/usr/share/applications" "$APPDIR/usr/share/icons/hicolor/256x256/apps"
|
||||
|
||||
# Install Python + deps into AppDir
|
||||
python3 -m venv "$APPDIR/usr/python"
|
||||
"$APPDIR/usr/python/bin/pip" install PySide6 --quiet
|
||||
|
||||
# Copy app
|
||||
cp ../../src/zupt_gui.py "$APPDIR/usr/share/zupt-gui/"
|
||||
cp ../../assets/zupt.png "$APPDIR/usr/share/icons/hicolor/256x256/apps/zupt-gui.png" 2>/dev/null || true
|
||||
|
||||
# Create launcher
|
||||
cat > "$APPDIR/AppRun" << 'APPRUN'
|
||||
#!/bin/bash
|
||||
HERE="$(dirname "$(readlink -f "$0")")"
|
||||
export PATH="$HERE/usr/bin:$HERE/usr/python/bin:$PATH"
|
||||
exec python3 "$HERE/usr/share/zupt-gui/zupt_gui.py" "$@"
|
||||
APPRUN
|
||||
chmod +x "$APPDIR/AppRun"
|
||||
|
||||
# Desktop file
|
||||
cat > "$APPDIR/${APP}.desktop" << DESKTOP
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Zupt GUI
|
||||
Comment=Post-Quantum Backup Utility
|
||||
Exec=zupt-gui
|
||||
Icon=zupt-gui
|
||||
Categories=Utility;Archiving;Security;
|
||||
Terminal=false
|
||||
DESKTOP
|
||||
|
||||
# Build AppImage
|
||||
if command -v appimagetool >/dev/null; then
|
||||
ARCH=x86_64 appimagetool "$APPDIR" "${APP}-${VERSION}-x86_64.AppImage"
|
||||
echo "Built: ${APP}-${VERSION}-x86_64.AppImage"
|
||||
else
|
||||
echo "appimagetool not found. Install from https://github.com/AppImage/AppImageKit"
|
||||
echo "AppDir ready at: $APPDIR/"
|
||||
fi
|
||||
# Compatibility entry point for the canonical source-only GUI builder.
|
||||
set -Eeuo pipefail
|
||||
repo_root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/../../.." && pwd -P)
|
||||
exec "$repo_root/packaging/build-gui-appimage.sh" "$@"
|
||||
|
|
|
|||
|
|
@ -1,94 +1,7 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# Copyright (c) 2025-2026 Cristian Cezar Moisés
|
||||
# Build zupt-gui .deb package
|
||||
set -e
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
VERSION="${VERSION:-2.2.1}"
|
||||
ARCH="all"
|
||||
PKG="zupt-gui_${VERSION}_${ARCH}"
|
||||
ROOT="/tmp/$PKG"
|
||||
|
||||
rm -rf "$ROOT"
|
||||
mkdir -p "$ROOT/DEBIAN" \
|
||||
"$ROOT/usr/bin" \
|
||||
"$ROOT/usr/lib/python3/dist-packages" \
|
||||
"$ROOT/usr/share/applications" \
|
||||
"$ROOT/usr/share/icons/hicolor/256x256/apps" \
|
||||
"$ROOT/usr/share/doc/zupt-gui"
|
||||
|
||||
# Python module
|
||||
install -m 644 src/zupt_gui.py "$ROOT/usr/lib/python3/dist-packages/zupt_gui.py"
|
||||
|
||||
# Launcher
|
||||
cat > "$ROOT/usr/bin/zupt-gui" <<'LAUNCH'
|
||||
#!/usr/bin/env python3
|
||||
import sys
|
||||
sys.path.insert(0, "/usr/lib/python3/dist-packages")
|
||||
from zupt_gui import main
|
||||
sys.exit(main())
|
||||
LAUNCH
|
||||
chmod +x "$ROOT/usr/bin/zupt-gui"
|
||||
|
||||
# Desktop file
|
||||
install -m 644 packaging/zupt-gui.desktop "$ROOT/usr/share/applications/" 2>/dev/null || cat > "$ROOT/usr/share/applications/zupt-gui.desktop" <<'DESK'
|
||||
[Desktop Entry]
|
||||
Name=Zupt GUI
|
||||
GenericName=Post-Quantum Backup Utility
|
||||
Comment=Compress and encrypt files with hybrid PQ crypto
|
||||
Exec=zupt-gui
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Utility;Archiving;Security;
|
||||
Icon=zupt-gui
|
||||
DESK
|
||||
|
||||
# Icon (use a real one if assets exist)
|
||||
if [ -f assets/zupt-256.png ]; then
|
||||
install -m 644 assets/zupt-256.png "$ROOT/usr/share/icons/hicolor/256x256/apps/zupt-gui.png"
|
||||
elif [ -d ../assets ] && [ -f ../assets/zupt-256.png ]; then
|
||||
install -m 644 ../assets/zupt-256.png "$ROOT/usr/share/icons/hicolor/256x256/apps/zupt-gui.png"
|
||||
else
|
||||
# 1×1 placeholder
|
||||
printf '\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x01\x00\x00\x00\x01\x08\x06\x00\x00\x00\x1f\x15\xc4\x89\x00\x00\x00\rIDATx\x9cc\xfc\xcf\xc0\x00\x00\x00\x05\x00\x01\xa5\xf6E@\x00\x00\x00\x00IEND\xaeB`\x82' > "$ROOT/usr/share/icons/hicolor/256x256/apps/zupt-gui.png"
|
||||
fi
|
||||
|
||||
# Docs
|
||||
install -m 644 README.md "$ROOT/usr/share/doc/zupt-gui/"
|
||||
gzip -9n -c ../CHANGELOG.md > "$ROOT/usr/share/doc/zupt-gui/changelog.gz" 2>/dev/null || true
|
||||
|
||||
cat > "$ROOT/usr/share/doc/zupt-gui/copyright" <<'COPYRIGHT'
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: zupt-gui
|
||||
Upstream-Contact: Cristian Cezar Moisés <zupt@riseup.net>
|
||||
Source: https://git.securityops.co/cristiancmoises/zupt
|
||||
|
||||
Files: *
|
||||
Copyright: 2025-2026 Cristian Cezar Moisés
|
||||
License: AGPL-3.0+
|
||||
COPYRIGHT
|
||||
|
||||
INSTALLED_SIZE=$(du -sk "$ROOT" | cut -f1)
|
||||
cat > "$ROOT/DEBIAN/control" <<EOF
|
||||
Package: zupt-gui
|
||||
Version: $VERSION
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Architecture: $ARCH
|
||||
Depends: python3 (>= 3.9), python3-pyside6, zupt (>= 2.2.0)
|
||||
Maintainer: Cristian Cezar Moisés <zupt@riseup.net>
|
||||
Installed-Size: $INSTALLED_SIZE
|
||||
Homepage: https://git.securityops.co/cristiancmoises/zupt
|
||||
Description: Zupt GUI — Post-Quantum Backup Utility
|
||||
Cross-platform graphical interface for the zupt backup compression
|
||||
utility with post-quantum hybrid encryption (ML-KEM-768 + X25519).
|
||||
.
|
||||
v2.2+ uses libzuptsdk under the hood for HKDF-SHA3 hybrid combiner,
|
||||
32-byte key commitment, HPKE binding (RFC 9180), and anti-fault
|
||||
double-decapsulation. Supports legacy archives via auto-detection.
|
||||
EOF
|
||||
|
||||
dpkg-deb --build --root-owner-group "$ROOT" "/tmp/$PKG.deb"
|
||||
echo "Built: /tmp/$PKG.deb"
|
||||
dpkg-deb --info "/tmp/$PKG.deb" | head -12
|
||||
# Compatibility entry point for the canonical source-only GUI builder.
|
||||
set -Eeuo pipefail
|
||||
repo_root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/../.." && pwd -P)
|
||||
exec "$repo_root/packaging/build-gui-deb.sh" "$@"
|
||||
|
|
|
|||
|
|
@ -1,13 +1,12 @@
|
|||
Package: zupt-gui
|
||||
Version: 1.0.0
|
||||
Version: 5.2.2
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Architecture: all
|
||||
Depends: python3 (>= 3.9), python3-pyside6, zupt (>= 2.1.6)
|
||||
Maintainer: Cristian Cezar Moises <cristian@zupt.dev>
|
||||
Depends: python3 (>= 3.9), python3-pyqt6 | python3-pyside6.qtwidgets, zupt (= 5.2.2)
|
||||
Maintainer: Cristian Cezar Moisés <sac@securityops.co>
|
||||
Homepage: https://github.com/cristiancmoises/zupt
|
||||
Description: Zupt GUI — Post-Quantum Backup Utility
|
||||
Cross-platform graphical interface for the zupt backup compression
|
||||
utility with post-quantum hybrid encryption (ML-KEM-768 + X25519),
|
||||
hardware-adaptive codecs, block-level deduplication, and full-disk
|
||||
backup/restore support.
|
||||
Description: Qt graphical interface for the ZUPT backup utility
|
||||
The GUI creates, inspects, verifies, and extracts .zupt archives through the
|
||||
separately packaged ZUPT command. Native post-quantum modes are available
|
||||
in the baseline build; SDK and PQ-box controls follow CLI capability detection.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
[Nemo Action]
|
||||
Name=Compress with Zupt
|
||||
Comment=Create encrypted .zupt archive
|
||||
Name=Compress with ZUPT
|
||||
Comment=Create a .zupt archive with ZUPT GUI
|
||||
Exec=zupt-gui --compress %F
|
||||
Icon-Name=package-x-generic
|
||||
Icon-Name=zupt-gui
|
||||
Selection=Any
|
||||
Extensions=any;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
[Nemo Action]
|
||||
Name=Extract with Zupt
|
||||
Comment=Decrypt and extract .zupt archive
|
||||
Name=Extract with ZUPT
|
||||
Comment=Extract a .zupt archive with ZUPT GUI
|
||||
Exec=zupt-gui --extract %F
|
||||
Icon-Name=package-x-generic
|
||||
Icon-Name=zupt-gui
|
||||
Selection=S
|
||||
Extensions=zupt;
|
||||
|
|
|
|||
|
|
@ -1,39 +1,42 @@
|
|||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# Copyright (c) 2026 Cristian Cezar Moisés
|
||||
|
||||
# Offline build manifest for the integrated source tree. The Qt/Python base and
|
||||
# SDK are resolved by Flatpak before the build; no command below uses pip or
|
||||
# downloads project dependencies.
|
||||
app-id: dev.zupt.gui
|
||||
runtime: org.freedesktop.Platform
|
||||
runtime-version: '24.08'
|
||||
sdk: org.freedesktop.Sdk
|
||||
runtime: org.kde.Platform
|
||||
runtime-version: '6.8'
|
||||
sdk: org.kde.Sdk
|
||||
base: io.qt.PySide.BaseApp
|
||||
base-version: '6.8'
|
||||
command: zupt-gui
|
||||
|
||||
finish-args:
|
||||
- --share=ipc
|
||||
- --socket=x11
|
||||
- --socket=fallback-x11
|
||||
- --socket=wayland
|
||||
- --filesystem=home
|
||||
- --device=all # For disk backup (block devices)
|
||||
|
||||
modules:
|
||||
- name: python3-pyside6
|
||||
buildsystem: simple
|
||||
build-commands:
|
||||
- pip3 install --prefix=/app PySide6
|
||||
|
||||
- name: zupt
|
||||
buildsystem: simple
|
||||
build-commands:
|
||||
- make
|
||||
- install -Dm755 zupt /app/bin/zupt
|
||||
sources:
|
||||
- type: git
|
||||
url: https://git.securityops.co/cristiancmoises/zupt
|
||||
tag: v2.1.6
|
||||
|
||||
- name: zupt-gui
|
||||
buildsystem: simple
|
||||
build-commands:
|
||||
- install -Dm755 src/zupt_gui.py /app/bin/zupt-gui
|
||||
- install -Dm644 packaging/zupt-gui.desktop /app/share/applications/dev.zupt.gui.desktop
|
||||
- make -j${FLATPAK_BUILDER_N_JOBS} WITH_SDK=0 WITH_PQBOX=0
|
||||
- make WITH_SDK=0 WITH_PQBOX=0 check
|
||||
- make PREFIX=/app WITH_SDK=0 WITH_PQBOX=0 INSTALL_LEGACY_ALIAS=0 install
|
||||
- install -Dm644 gui/src/zupt_gui.py /app/bin/zupt_gui.py
|
||||
- install -Dm755 packaging/portable/zupt-gui.sh /app/bin/zupt-gui
|
||||
- install -Dm644 gui/packaging/zupt-gui.desktop /app/share/applications/dev.zupt.gui.desktop
|
||||
- sed -i 's/^Icon=.*/Icon=dev.zupt.gui/' /app/share/applications/dev.zupt.gui.desktop
|
||||
- install -Dm644 gui/assets/zupt-icon.png /app/share/icons/hicolor/256x256/apps/dev.zupt.gui.png
|
||||
- install -Dm644 doc/zupt-gui.1 /app/share/man/man1/zupt-gui.1
|
||||
- install -d /app/share/licenses/zupt
|
||||
- install -m 0644 LICENSE LICENSE-AGPL-3.0 LICENSE-GPL-3.0 LICENSE-BSD-2-Clause LICENSE-BSD-3-Clause LICENSE-CC0-1.0 NOTICE THIRD-PARTY-NOTICES.md /app/share/licenses/zupt/
|
||||
- install -d /app/share/licenses/zupt-gui
|
||||
- install -m 0644 LICENSE-AGPL-3.0 /app/share/licenses/zupt-gui/LICENSE-AGPL-3.0
|
||||
- install -m 0644 gui/LICENSE-GUI /app/share/licenses/zupt-gui/LICENSE-GUI
|
||||
- install -m 0644 gui/assets/README.md /app/share/licenses/zupt-gui/ASSET-PROVENANCE.md
|
||||
sources:
|
||||
- type: dir
|
||||
path: .
|
||||
path: ../../..
|
||||
|
|
|
|||
|
|
@ -1,92 +1,102 @@
|
|||
@echo off
|
||||
REM ══════════════════════════════════════════════════
|
||||
REM Zupt GUI — Windows Build Script
|
||||
REM Creates: ZuptGUI-2.1.6-Setup.exe
|
||||
REM
|
||||
REM Prerequisites:
|
||||
REM 1. Python 3.9+ (python.org)
|
||||
REM 2. NSIS 3.x (nsis.sourceforge.io)
|
||||
REM 3. zupt.exe (compiled zupt CLI binary for Windows)
|
||||
REM
|
||||
REM Usage:
|
||||
REM cd packaging\windows
|
||||
REM build-windows.bat
|
||||
REM ══════════════════════════════════════════════════
|
||||
setlocal
|
||||
rem SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
rem Build the ZUPT GUI installer without downloading dependencies.
|
||||
rem
|
||||
rem Prerequisites must already be installed: Python 3.9+, PySide6, PyInstaller,
|
||||
rem Inno Setup 6, and a source-built/tested zupt.exe. The CLI path can be
|
||||
rem selected with ZUPT_CLI_EXE. Final output goes to ZUPT_DIST_DIR,
|
||||
rem which defaults to a directory below %%TEMP%% (outside the Git checkout).
|
||||
rem ZUPT_WINDOWS_RUNTIME_NOTICES_DIR is mandatory and must contain the
|
||||
rem license/notices for the exact Python, PyInstaller, Qt and PySide/PyQt
|
||||
rem runtime files embedded by this local build.
|
||||
|
||||
echo.
|
||||
echo Zupt GUI — Windows Build
|
||||
echo ════════════════════════
|
||||
echo.
|
||||
setlocal EnableExtensions
|
||||
for %%I in ("%~dp0\..\..\..") do set "REPO_ROOT=%%~fI"
|
||||
set "VERSION=%~1"
|
||||
if not defined VERSION set "VERSION=5.2.2"
|
||||
if not defined ZUPT_DIST_DIR set "ZUPT_DIST_DIR=%TEMP%\zupt-release"
|
||||
if not defined ZUPT_CLI_EXE set "ZUPT_CLI_EXE=%REPO_ROOT%\zupt.exe"
|
||||
set "WORK=%TEMP%\zupt-gui-build-%RANDOM%-%RANDOM%"
|
||||
set "RC=1"
|
||||
|
||||
REM ── Step 1: Install Python deps ──
|
||||
echo [1/4] Installing dependencies...
|
||||
pip install PySide6 pyinstaller --quiet --upgrade
|
||||
if errorlevel 1 (
|
||||
echo ERROR: pip install failed. Is Python in PATH?
|
||||
pause
|
||||
exit /b 1
|
||||
where pyinstaller >nul 2>nul || (
|
||||
echo ERROR: PyInstaller is required and is not downloaded by this script.>&2
|
||||
goto :cleanup
|
||||
)
|
||||
where ISCC.exe >nul 2>nul || (
|
||||
echo ERROR: Inno Setup 6 ISCC.exe is required.>&2
|
||||
goto :cleanup
|
||||
)
|
||||
if not exist "%ZUPT_CLI_EXE%" (
|
||||
echo ERROR: source-built CLI not found: %ZUPT_CLI_EXE%>&2
|
||||
goto :cleanup
|
||||
)
|
||||
if not defined ZUPT_WINDOWS_RUNTIME_NOTICES_DIR (
|
||||
echo ERROR: set ZUPT_WINDOWS_RUNTIME_NOTICES_DIR for the exact bundled runtime.>&2
|
||||
goto :cleanup
|
||||
)
|
||||
if not exist "%ZUPT_WINDOWS_RUNTIME_NOTICES_DIR%\MANIFEST.txt" (
|
||||
echo ERROR: runtime notice directory must contain MANIFEST.txt.>&2
|
||||
goto :cleanup
|
||||
)
|
||||
for %%I in ("%ZUPT_WINDOWS_RUNTIME_NOTICES_DIR%\MANIFEST.txt") do if %%~zI LEQ 0 (
|
||||
echo ERROR: runtime notice MANIFEST.txt must not be empty.>&2
|
||||
goto :cleanup
|
||||
)
|
||||
for %%N in (PYTHON-NOTICE.txt PYINSTALLER-NOTICE.txt QT-NOTICE.txt) do (
|
||||
if not exist "%ZUPT_WINDOWS_RUNTIME_NOTICES_DIR%\%%N" (
|
||||
echo ERROR: runtime notice directory is missing %%N.>&2
|
||||
goto :cleanup
|
||||
)
|
||||
for %%I in ("%ZUPT_WINDOWS_RUNTIME_NOTICES_DIR%\%%N") do if %%~zI LEQ 0 (
|
||||
echo ERROR: runtime notice %%N must not be empty.>&2
|
||||
goto :cleanup
|
||||
)
|
||||
)
|
||||
set "QT_BINDING_NOTICE_FOUND="
|
||||
for %%N in (PYSIDE6-NOTICE.txt PYQT6-NOTICE.txt) do if exist "%ZUPT_WINDOWS_RUNTIME_NOTICES_DIR%\%%N" (
|
||||
for %%I in ("%ZUPT_WINDOWS_RUNTIME_NOTICES_DIR%\%%N") do if %%~zI GTR 0 set "QT_BINDING_NOTICE_FOUND=1"
|
||||
)
|
||||
if not defined QT_BINDING_NOTICE_FOUND (
|
||||
echo ERROR: runtime notices need non-empty PYSIDE6-NOTICE.txt or PYQT6-NOTICE.txt.>&2
|
||||
goto :cleanup
|
||||
)
|
||||
|
||||
REM ── Step 2: Build .exe with PyInstaller ──
|
||||
echo [2/4] Building ZuptGUI.exe...
|
||||
if exist dist rmdir /s /q dist
|
||||
if exist build rmdir /s /q build
|
||||
mkdir "%WORK%" || goto :cleanup
|
||||
if not exist "%ZUPT_DIST_DIR%" mkdir "%ZUPT_DIST_DIR%" || goto :cleanup
|
||||
|
||||
pyinstaller --onefile --windowed ^
|
||||
--name "ZuptGUI" ^
|
||||
--icon "..\..\assets\zupt.ico" ^
|
||||
--add-data "..\..\assets\zupt.ico;assets" ^
|
||||
--add-data "..\..\assets\zupt.png;assets" ^
|
||||
"..\..\src\zupt_gui.py"
|
||||
|
||||
if not exist "dist\ZuptGUI.exe" (
|
||||
echo ERROR: PyInstaller build failed.
|
||||
pause
|
||||
exit /b 1
|
||||
"%ZUPT_CLI_EXE%" version >"%WORK%\cli-version.txt" 2>&1 || goto :cleanup
|
||||
findstr /b /c:"zupt %VERSION%" "%WORK%\cli-version.txt" >nul || (
|
||||
echo ERROR: CLI version does not match %VERSION%.>&2
|
||||
goto :cleanup
|
||||
)
|
||||
echo Built: dist\ZuptGUI.exe
|
||||
"%ZUPT_CLI_EXE%" help >nul 2>&1 || goto :cleanup
|
||||
|
||||
REM ── Step 3: Check for zupt.exe ──
|
||||
echo [3/4] Checking for zupt.exe...
|
||||
if not exist "zupt.exe" (
|
||||
echo.
|
||||
echo WARNING: zupt.exe not found in this directory.
|
||||
echo The installer needs zupt.exe to bundle the CLI tool.
|
||||
echo Options:
|
||||
echo a) Copy zupt.exe here and re-run this script
|
||||
echo b) Build zupt from source with MSYS2/MinGW:
|
||||
echo pacman -S mingw-w64-x86_64-gcc make
|
||||
echo cd zupt-2.1.6 ^&^& make
|
||||
echo cp zupt.exe packaging/windows/
|
||||
echo.
|
||||
)
|
||||
pyinstaller --noconfirm --clean --onefile --windowed ^
|
||||
--name zupt-gui ^
|
||||
--icon "%REPO_ROOT%\gui\assets\zupt.ico" ^
|
||||
--add-data "%REPO_ROOT%\gui\assets\zupt.ico;assets" ^
|
||||
--add-data "%REPO_ROOT%\gui\assets\zupt-icon.png;assets" ^
|
||||
--distpath "%WORK%\dist" ^
|
||||
--workpath "%WORK%\build" ^
|
||||
--specpath "%WORK%" ^
|
||||
"%REPO_ROOT%\gui\src\zupt_gui.py" || goto :cleanup
|
||||
|
||||
REM ── Step 4: Build NSIS installer ──
|
||||
echo [4/4] Building installer...
|
||||
where makensis >nul 2>&1
|
||||
if errorlevel 1 (
|
||||
echo.
|
||||
echo NSIS not found. Install from: https://nsis.sourceforge.io
|
||||
echo Then run: makensis zupt-installer.nsi
|
||||
echo.
|
||||
echo Standalone exe ready at: dist\ZuptGUI.exe
|
||||
pause
|
||||
exit /b 0
|
||||
)
|
||||
set "GUI_EXE=%WORK%\dist\zupt-gui.exe"
|
||||
if not exist "%GUI_EXE%" goto :cleanup
|
||||
set "ZUPT_BIN=%ZUPT_CLI_EXE%"
|
||||
"%GUI_EXE%" --version >"%WORK%\gui-version.txt" 2>&1 || goto :cleanup
|
||||
findstr /b /c:"zupt-gui %VERSION%" "%WORK%\gui-version.txt" >nul || goto :cleanup
|
||||
|
||||
makensis zupt-installer.nsi
|
||||
if errorlevel 1 (
|
||||
echo ERROR: NSIS build failed.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
ISCC.exe "/DAppVersion=%VERSION%" "/DGuiExecutable=%GUI_EXE%" ^
|
||||
"/DCliExecutable=%ZUPT_CLI_EXE%" "/DBuildOutputDir=%ZUPT_DIST_DIR%" ^
|
||||
"/DRuntimeNoticesDir=%ZUPT_WINDOWS_RUNTIME_NOTICES_DIR%" ^
|
||||
"%REPO_ROOT%\packaging\windows\zupt-gui.iss" || goto :cleanup
|
||||
|
||||
echo.
|
||||
echo ════════════════════════════════════════════
|
||||
echo Build complete!
|
||||
echo Standalone: dist\ZuptGUI.exe
|
||||
echo Installer: ZuptGUI-2.1.6-Setup.exe
|
||||
echo ════════════════════════════════════════════
|
||||
echo.
|
||||
pause
|
||||
if not exist "%ZUPT_DIST_DIR%\ZUPT-Setup-%VERSION%.exe" goto :cleanup
|
||||
echo PASS: built %ZUPT_DIST_DIR%\ZUPT-Setup-%VERSION%.exe
|
||||
set "RC=0"
|
||||
|
||||
:cleanup
|
||||
if exist "%WORK%" rmdir /s /q "%WORK%"
|
||||
endlocal & exit /b %RC%
|
||||
|
|
|
|||
|
|
@ -1,132 +0,0 @@
|
|||
; Zupt GUI — NSIS Installer Script
|
||||
; Builds: ZuptGUI-Setup.exe
|
||||
;
|
||||
; Prerequisites on the build machine:
|
||||
; 1. NSIS 3.x installed (https://nsis.sourceforge.io)
|
||||
; 2. Run build-windows.bat first to create dist/ZuptGUI.exe
|
||||
; 3. Place zupt.exe in this directory
|
||||
; 4. Then: makensis zupt-installer.nsi
|
||||
|
||||
!include "MUI2.nsh"
|
||||
!include "FileFunc.nsh"
|
||||
|
||||
; ── Config ──
|
||||
!define APPNAME "Zupt"
|
||||
!define APPVERSION "2.1.6"
|
||||
!define GUIVERSION "1.0.0"
|
||||
!define PUBLISHER "Cristian Cezar Moises"
|
||||
!define HELPURL "https://github.com/cristiancmoises/zupt"
|
||||
!define EXE "ZuptGUI.exe"
|
||||
!define CLI "zupt.exe"
|
||||
|
||||
Name "${APPNAME} ${APPVERSION}"
|
||||
OutFile "ZuptGUI-${APPVERSION}-Setup.exe"
|
||||
InstallDir "$PROGRAMFILES\${APPNAME}"
|
||||
InstallDirRegKey HKLM "Software\${APPNAME}" "InstallDir"
|
||||
RequestExecutionLevel admin
|
||||
|
||||
; ── UI ──
|
||||
!define MUI_ICON "..\..\assets\zupt.ico"
|
||||
!define MUI_UNICON "..\..\assets\zupt.ico"
|
||||
!define MUI_ABORTWARNING
|
||||
!define MUI_WELCOMEPAGE_TITLE "Install ${APPNAME} ${APPVERSION}"
|
||||
!define MUI_WELCOMEPAGE_TEXT "Post-quantum backup compression with ML-KEM-768 + X25519 hybrid encryption.$\r$\n$\r$\nThis will install the Zupt GUI and CLI tools."
|
||||
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
!insertmacro MUI_PAGE_LICENSE "..\..\LICENSE"
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
|
||||
!insertmacro MUI_UNPAGE_CONFIRM
|
||||
!insertmacro MUI_UNPAGE_INSTFILES
|
||||
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
|
||||
; ── Install ──
|
||||
Section "Install"
|
||||
SetOutPath $INSTDIR
|
||||
|
||||
; Copy files
|
||||
File "dist\${EXE}"
|
||||
File "${CLI}"
|
||||
File "..\..\assets\zupt.ico"
|
||||
File "..\..\LICENSE"
|
||||
File "..\..\README.md"
|
||||
|
||||
; Write uninstaller
|
||||
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
||||
|
||||
; Start Menu
|
||||
CreateDirectory "$SMPROGRAMS\${APPNAME}"
|
||||
CreateShortcut "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk" "$INSTDIR\${EXE}" "" "$INSTDIR\zupt.ico"
|
||||
CreateShortcut "$SMPROGRAMS\${APPNAME}\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
|
||||
|
||||
; Desktop shortcut
|
||||
CreateShortcut "$DESKTOP\${APPNAME}.lnk" "$INSTDIR\${EXE}" "" "$INSTDIR\zupt.ico"
|
||||
|
||||
; Add to PATH (so zupt.exe is available system-wide)
|
||||
EnVar::AddValue "PATH" "$INSTDIR"
|
||||
|
||||
; Register .zupt file association
|
||||
WriteRegStr HKCR ".zupt" "" "ZuptArchive"
|
||||
WriteRegStr HKCR "ZuptArchive" "" "Zupt Archive"
|
||||
WriteRegStr HKCR "ZuptArchive\DefaultIcon" "" "$INSTDIR\zupt.ico"
|
||||
WriteRegStr HKCR "ZuptArchive\shell\open\command" "" '"$INSTDIR\${EXE}" --extract "%1"'
|
||||
WriteRegStr HKCR "ZuptArchive\shell\verify\command" "" '"$INSTDIR\${CLI}" test "%1"'
|
||||
WriteRegStr HKCR "ZuptArchive\shell\verify" "" "Verify Integrity"
|
||||
|
||||
; Right-click "Compress with Zupt" on any file
|
||||
WriteRegStr HKCR "*\shell\ZuptCompress" "" "Compress with Zupt"
|
||||
WriteRegStr HKCR "*\shell\ZuptCompress\Icon" "" "$INSTDIR\zupt.ico"
|
||||
WriteRegStr HKCR "*\shell\ZuptCompress\command" "" '"$INSTDIR\${EXE}" --compress "%1"'
|
||||
|
||||
; Right-click on directories
|
||||
WriteRegStr HKCR "Directory\shell\ZuptCompress" "" "Compress with Zupt"
|
||||
WriteRegStr HKCR "Directory\shell\ZuptCompress\Icon" "" "$INSTDIR\zupt.ico"
|
||||
WriteRegStr HKCR "Directory\shell\ZuptCompress\command" "" '"$INSTDIR\${EXE}" --compress "%1"'
|
||||
|
||||
; Add/Remove Programs entry
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayName" "${APPNAME} — Post-Quantum Backup"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "UninstallString" "$INSTDIR\Uninstall.exe"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayIcon" "$INSTDIR\zupt.ico"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "Publisher" "${PUBLISHER}"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayVersion" "${APPVERSION}"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "URLInfoAbout" "${HELPURL}"
|
||||
|
||||
; Calculate installed size
|
||||
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
|
||||
IntFmt $0 "0x%08X" $0
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "EstimatedSize" "$0"
|
||||
SectionEnd
|
||||
|
||||
; ── Uninstall ──
|
||||
Section "Uninstall"
|
||||
; Remove files
|
||||
Delete "$INSTDIR\${EXE}"
|
||||
Delete "$INSTDIR\${CLI}"
|
||||
Delete "$INSTDIR\zupt.ico"
|
||||
Delete "$INSTDIR\LICENSE"
|
||||
Delete "$INSTDIR\README.md"
|
||||
Delete "$INSTDIR\Uninstall.exe"
|
||||
RMDir "$INSTDIR"
|
||||
|
||||
; Remove shortcuts
|
||||
Delete "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk"
|
||||
Delete "$SMPROGRAMS\${APPNAME}\Uninstall.lnk"
|
||||
RMDir "$SMPROGRAMS\${APPNAME}"
|
||||
Delete "$DESKTOP\${APPNAME}.lnk"
|
||||
|
||||
; Remove from PATH
|
||||
EnVar::DeleteValue "PATH" "$INSTDIR"
|
||||
|
||||
; Remove file associations
|
||||
DeleteRegKey HKCR ".zupt"
|
||||
DeleteRegKey HKCR "ZuptArchive"
|
||||
DeleteRegKey HKCR "*\shell\ZuptCompress"
|
||||
DeleteRegKey HKCR "Directory\shell\ZuptCompress"
|
||||
|
||||
; Remove Add/Remove Programs entry
|
||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}"
|
||||
DeleteRegKey HKLM "Software\${APPNAME}"
|
||||
SectionEnd
|
||||
|
|
@ -1,12 +1,13 @@
|
|||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Zupt GUI
|
||||
GenericName=Post-Quantum Backup
|
||||
Comment=Compress, encrypt, and backup with quantum-resistant cryptography
|
||||
Exec=zupt-gui
|
||||
Name=ZUPT GUI
|
||||
GenericName=Backup and Compression Utility
|
||||
Comment=Create, inspect, verify, and extract ZUPT archives
|
||||
Exec=zupt-gui %f
|
||||
Icon=zupt-gui
|
||||
Categories=Utility;Archiving;Security;
|
||||
Keywords=backup;compress;encrypt;quantum;zupt;
|
||||
Categories=Utility;Archiving;Compression;
|
||||
Keywords=backup;archive;compression;encryption;post-quantum;zupt;
|
||||
Terminal=false
|
||||
StartupNotify=true
|
||||
MimeType=application/x-zupt;
|
||||
|
|
|
|||
Loading…
Reference in a new issue