feat: Reorganize license management; add new licenses.json and update run/test scripts

This commit is contained in:
Maximilian G.
2026-03-23 12:33:32 +00:00
committed by GitHub
parent c043f280b4
commit 59629f869c
3 changed files with 0 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
[
{
"user_id": "0001",
"license_key": "npEDI1JVhyisQ2dg-fWTTAn5H1hg3eS80Zc-4IptWIU=",
"hwid_uuid": "0c27aefd7107396933c7363efa38fb6c297aa3db119c1597952c05d947f4f27c"
},
{
"user_id": "0002",
"license_key": "qclcig8LitaXJGC4zqcZ3xFULlUinzGAOBYB07YGrTA=",
"hwid_uuid": "0c27aefd7107396933c7363efa38fb6c297aa3db119c1597952c05d947f4f37c"
},
{
"user_id": "0003",
"license_key": "H02JSHkh9qtnzU8D5yBVcyej98AU-R6lVhwyYfHA1uM",
"hwid_uuid": ""
}
]
Executable
+49
View File
@@ -0,0 +1,49 @@
#!/usr/bin/env bash
set -euo pipefail
if [[ -n "${CONDA_DEFAULT_ENV:-}" ]] && command -v conda >/dev/null 2>&1; then
conda deactivate || true
fi
source .venv/bin/activate
# Do not run apt here because third-party repos in dev containers can fail.
# We only check and provide the install hint if patchelf is missing.
if ! command -v patchelf >/dev/null 2>&1; then
echo "Error: patchelf is required for Nuitka standalone builds on Linux."
echo "Install with: sudo apt update && sudo apt install -y patchelf"
exit 1
fi
pip install -U nuitka ordered-set zstandard flask flask-jwt-extended cryptography pyotp qrcode
python - <<'PY'
from pathlib import Path
import json
root = Path.cwd()
settings_path = root / "settings.json"
version_file = root / "Code" / "version.txt"
version = "0.1.0"
if settings_path.is_file():
raw = settings_path.read_text(encoding="utf-8").strip()
if raw:
data = json.loads(raw)
if isinstance(data, dict):
version = str(data.get("version", version)).strip() or version
elif isinstance(data, list):
for item in data:
if isinstance(item, dict) and "version" in item:
version = str(item.get("version", version)).strip() or version
break
version_file.write_text(f"{version}\n", encoding="utf-8")
print(f"Prepared {version_file} with version: {version}")
PY
python -m nuitka --standalone --follow-imports --include-data-dir=Code/templates=templates --include-data-dir=Code/static=static --include-data-file=licenses.json=licenses.json --assume-yes-for-downloads --output-dir=Inventarsystem_Lizenz_Verwaltung --remove-output Code/main.py
if [[ -x "./build/main.dist/main.bin" ]]; then
./build/main.dist/main.bin
else
echo "Build step finished but executable not found at ./build/main.dist/main.bin"
exit 1
fi
Executable
+11
View File
@@ -0,0 +1,11 @@
curl -i -X POST "http://127.0.0.1:5000/validate__information" \
-H "Content-Type: application/json" \
-d '{"license":"npEDI1JVhyisQ2dg-fWTTAn5H1hg3eS80Zc-4IptWIU=","hwid":""}'
curl -i -X POST "http://127.0.0.1:5000/validate__information" \
-H "Content-Type: application/json" \
-d '{"license":"npEDI1JVhyisQ2dg-fWTTAn5H1hg3eS80Zc-4IptWIU=","hwid":"0c27aefd7107396933c7363efa38fb6c297aa3db119c1597952c05d947f4f27c"}'
curl -i -X POST "http://127.0.0.1:5000/validate__information" \
-H "Content-Type: application/json" \
-d '{"license":"npEDI1JVhyisQ2dg-fWTTAn5H1hg3eS80Zc-4IptWIU=","hwid":"0c27aefd7107396933c7363efa38fb6c297aa3db119c1597952c05d947f4f37c"}'