Reworked the project structure.
This commit is contained in:
44
.gitignore
vendored
44
.gitignore
vendored
@@ -3,25 +3,35 @@ __pycache__/
|
||||
*.py[cod]
|
||||
.pytest_cache/
|
||||
.idea/
|
||||
.run/
|
||||
|
||||
# Legacy safety net only. Release tooling requires private keys outside the
|
||||
# checkout and generated artifact tree.
|
||||
release-keys/
|
||||
config/local.toml
|
||||
diagnostics/config/local.toml
|
||||
|
||||
# Local development, investigation, and release tooling. The production
|
||||
# repository intentionally contains only the installer/runtime sources.
|
||||
AGENTS.md
|
||||
AIO_INSTALLER.md
|
||||
BOOTSTRAP_WORKPLAN.md
|
||||
DEBUGGING.md
|
||||
GITEA_UPDATES.md
|
||||
README.md
|
||||
config/
|
||||
configs/
|
||||
findings/
|
||||
# Generated builds, candidates, runtime evidence, and machine-local state.
|
||||
.artifacts/
|
||||
|
||||
# Legacy output locations remain ignored while existing local data is migrated
|
||||
# manually. New commands write only below .artifacts/.
|
||||
candidates/
|
||||
dist/
|
||||
replay_pid*.log
|
||||
results/
|
||||
testcases/
|
||||
tests/
|
||||
tools/
|
||||
dist/
|
||||
/native/
|
||||
runner-data/
|
||||
runner-token
|
||||
infra/gitea-runner/.env
|
||||
infra/gitea-runner/runner-data/
|
||||
infra/gitea-runner/runner-token
|
||||
server/telemetry/.env
|
||||
/diagnostics/
|
||||
/devtools/
|
||||
/docs/
|
||||
/infra/
|
||||
/artifacts/
|
||||
/release_tests/
|
||||
/tests/
|
||||
/tools/
|
||||
/.gitea/
|
||||
/.run/
|
||||
|
||||
117
install.sh
Normal file → Executable file
117
install.sh
Normal file → Executable file
@@ -3,8 +3,23 @@
|
||||
set -euo pipefail
|
||||
|
||||
SOURCE_ROOT="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
|
||||
if [[ -d "${SOURCE_ROOT}/src/ptlinux" ]]
|
||||
then
|
||||
PACKAGE_SOURCE_ROOT="${SOURCE_ROOT}/src"
|
||||
else
|
||||
# Bootstrap archives retain the historical top-level package layout.
|
||||
PACKAGE_SOURCE_ROOT="$SOURCE_ROOT"
|
||||
fi
|
||||
if [[ -d "${SOURCE_ROOT}/native/gamescope" ]]
|
||||
then
|
||||
GAMESCOPE_PROVENANCE_ROOT="${SOURCE_ROOT}/native/gamescope"
|
||||
GAMESCOPE_PATCH_ROOT="${GAMESCOPE_PROVENANCE_ROOT}/patches"
|
||||
else
|
||||
GAMESCOPE_PROVENANCE_ROOT="${PACKAGE_SOURCE_ROOT}/ptlinux/native"
|
||||
GAMESCOPE_PATCH_ROOT="$GAMESCOPE_PROVENANCE_ROOT"
|
||||
fi
|
||||
SEMVER_PATTERN='(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-(beta|rc)\.(0|[1-9][0-9]*))?'
|
||||
SOURCE_VERSION="$(sed -n 's/^__version__ = "\([^"]*\)"$/\1/p' "${SOURCE_ROOT}/ptlinux/__init__.py")"
|
||||
SOURCE_VERSION="$(sed -n 's/^__version__ = "\([^"]*\)"$/\1/p' "${PACKAGE_SOURCE_ROOT}/ptlinux/__init__.py")"
|
||||
VERSION="${PTLINUX_VERSION:-$SOURCE_VERSION}"
|
||||
if [[ ! "$VERSION" =~ ^${SEMVER_PATTERN}$ ]]
|
||||
then
|
||||
@@ -153,25 +168,30 @@ APP_ROOT="${INSTALL_DIRECTORY}/app"
|
||||
RELEASES_ROOT="${APP_ROOT}/releases"
|
||||
RELEASE_ROOT="${RELEASES_ROOT}/${VERSION}"
|
||||
|
||||
if [[ ! -d "${SOURCE_ROOT}/ptlinux" \
|
||||
|| ! -f "${SOURCE_ROOT}/ptdiag/assbin.py" \
|
||||
|| ! -f "${SOURCE_ROOT}/ptdiag/__init__.py" \
|
||||
|| ! -f "${SOURCE_ROOT}/ptdiag/logs.py" \
|
||||
|| ! -f "${SOURCE_ROOT}/ptlinux/desktop_entry.py" \
|
||||
|| ! -f "${SOURCE_ROOT}/ptlinux/launcher_wrapper.py" \
|
||||
|| ! -f "${SOURCE_ROOT}/ptlinux/self_update.py" \
|
||||
|| ! -f "${SOURCE_ROOT}/ptlinux/ui/__init__.py" \
|
||||
|| ! -f "${SOURCE_ROOT}/ptlinux/ui/dashboard.py" \
|
||||
|| ! -f "${SOURCE_ROOT}/ptlinux/launcher-update-public.pem" \
|
||||
|| ! -f "${SOURCE_ROOT}/ptlinux/native/pt-identity-probe.exe" \
|
||||
|| ! -f "${SOURCE_ROOT}/ptlinux/native/gamescope-3.16.20-ubuntu26.04-amd64" \
|
||||
|| ! -f "${SOURCE_ROOT}/ptlinux/native/gamescope-compat.README" \
|
||||
|| ! -f "${SOURCE_ROOT}/ptlinux/native/gamescope-compat.copyright" \
|
||||
|| ! -f "${SOURCE_ROOT}/ptlinux/native/gamescope-lazy-output-images.patch" \
|
||||
|| ! -f "${SOURCE_ROOT}/ptlinux/native/gamescope-wayland-live-resize.patch" \
|
||||
|| ! -f "${SOURCE_ROOT}/ptlinux/native/gamescope-wayland-letterbox-backing.patch" \
|
||||
|| ! -f "${SOURCE_ROOT}/ptlinux/native/gamescope-wayland-libdecor-input-scope.patch" \
|
||||
|| ! -f "${SOURCE_ROOT}/ptlinux/native/gamescope-keep-nested-windows-visible.patch" \
|
||||
if [[ ! -d "${PACKAGE_SOURCE_ROOT}/ptlinux" \
|
||||
|| ! -f "${PACKAGE_SOURCE_ROOT}/ptdiag/assbin.py" \
|
||||
|| ! -f "${PACKAGE_SOURCE_ROOT}/ptdiag/__init__.py" \
|
||||
|| ! -f "${PACKAGE_SOURCE_ROOT}/ptdiag/logs.py" \
|
||||
|| ! -f "${PACKAGE_SOURCE_ROOT}/ptlinux/desktop_entry.py" \
|
||||
|| ! -f "${PACKAGE_SOURCE_ROOT}/ptlinux/launcher_wrapper.py" \
|
||||
|| ! -f "${PACKAGE_SOURCE_ROOT}/ptlinux/self_update.py" \
|
||||
|| ! -f "${PACKAGE_SOURCE_ROOT}/ptlinux/ui/__init__.py" \
|
||||
|| ! -f "${PACKAGE_SOURCE_ROOT}/ptlinux/ui/dashboard.py" \
|
||||
|| ! -f "${PACKAGE_SOURCE_ROOT}/ptlinux/launcher-update-public.pem" \
|
||||
|| ! -f "${PACKAGE_SOURCE_ROOT}/ptlinux/native/pt-identity-probe.exe" \
|
||||
|| ! -f "${PACKAGE_SOURCE_ROOT}/ptlinux/native/ptr-bcrypt-proxy.dll" \
|
||||
|| ! -f "${PACKAGE_SOURCE_ROOT}/ptlinux/native/gamescope-3.16.20-ubuntu26.04-amd64" \
|
||||
|| ! -f "${GAMESCOPE_PROVENANCE_ROOT}/gamescope-compat.README" \
|
||||
|| ! -f "${GAMESCOPE_PROVENANCE_ROOT}/gamescope-compat.copyright" \
|
||||
|| ! -f "${GAMESCOPE_PATCH_ROOT}/gamescope-lazy-output-images.patch" \
|
||||
|| ! -f "${GAMESCOPE_PATCH_ROOT}/gamescope-wayland-live-resize.patch" \
|
||||
|| ! -f "${GAMESCOPE_PATCH_ROOT}/gamescope-wayland-letterbox-backing.patch" \
|
||||
|| ! -f "${GAMESCOPE_PATCH_ROOT}/gamescope-wayland-libdecor-input-scope.patch" \
|
||||
|| ! -f "${GAMESCOPE_PATCH_ROOT}/gamescope-keep-nested-windows-visible.patch" \
|
||||
|| ! -f "${SOURCE_ROOT}/scripts/__init__.py" \
|
||||
|| ! -f "${SOURCE_ROOT}/scripts/repository_paths.py" \
|
||||
|| ! -f "${SOURCE_ROOT}/scripts/release_lib.py" \
|
||||
|| ! -f "${SOURCE_ROOT}/release/config.json" \
|
||||
|| ! -f "${SOURCE_ROOT}/packaging/eu.pristontale.PTLinux.desktop" \
|
||||
|| ! -f "${SOURCE_ROOT}/packaging/eu.pristontale.PTLinux.png" \
|
||||
|| ! -f "${SOURCE_ROOT}/packaging/pristontale-eu" \
|
||||
@@ -223,7 +243,7 @@ then
|
||||
fi
|
||||
if ! "$PYTHON_BIN" -I -B -c \
|
||||
'import sys; sys.path.insert(0, sys.argv[1]); from ptlinux.update_resolver import validate_channel_version; validate_channel_version(sys.argv[2], sys.argv[3])' \
|
||||
"$SOURCE_ROOT" "$RELEASE_CHANNEL" "$VERSION"
|
||||
"$PACKAGE_SOURCE_ROOT" "$RELEASE_CHANNEL" "$VERSION"
|
||||
then
|
||||
printf '%s\n' "Launcher version and release channel validation failed." >&2
|
||||
exit 1
|
||||
@@ -236,46 +256,17 @@ then
|
||||
printf 'Launcher staging path already exists: %s\n' "$STAGING_RELEASE" >&2
|
||||
exit 1
|
||||
fi
|
||||
install -d -m 0755 "$STAGING_RELEASE"
|
||||
install -d -m 0755 \
|
||||
"${STAGING_RELEASE}/ptlinux" \
|
||||
"${STAGING_RELEASE}/ptlinux/native" \
|
||||
"${STAGING_RELEASE}/ptdiag"
|
||||
shopt -s globstar nullglob
|
||||
for SOURCE_MODULE in "${SOURCE_ROOT}/ptlinux/"**/*.py
|
||||
do
|
||||
RELATIVE_MODULE="${SOURCE_MODULE#"${SOURCE_ROOT}/ptlinux/"}"
|
||||
case "$RELATIVE_MODULE" in
|
||||
desktop_entry.py|launcher_wrapper.py)
|
||||
continue
|
||||
;;
|
||||
esac
|
||||
install -D -m 0644 \
|
||||
"$SOURCE_MODULE" \
|
||||
"${STAGING_RELEASE}/ptlinux/${RELATIVE_MODULE}"
|
||||
done
|
||||
shopt -u globstar nullglob
|
||||
install -m 0644 \
|
||||
"${SOURCE_ROOT}/ptlinux/launcher-update-public.pem" \
|
||||
"${STAGING_RELEASE}/ptlinux/launcher-update-public.pem"
|
||||
install -m 0644 \
|
||||
"${SOURCE_ROOT}/ptlinux/native/pt-identity-probe.exe" \
|
||||
"${STAGING_RELEASE}/ptlinux/native/pt-identity-probe.exe"
|
||||
install -m 0755 \
|
||||
"${SOURCE_ROOT}/ptlinux/native/gamescope-3.16.20-ubuntu26.04-amd64" \
|
||||
"${STAGING_RELEASE}/ptlinux/native/gamescope-3.16.20-ubuntu26.04-amd64"
|
||||
install -m 0644 \
|
||||
"${SOURCE_ROOT}/ptlinux/native/gamescope-compat.README" \
|
||||
"${SOURCE_ROOT}/ptlinux/native/gamescope-compat.copyright" \
|
||||
"${SOURCE_ROOT}/ptlinux/native/gamescope-lazy-output-images.patch" \
|
||||
"${SOURCE_ROOT}/ptlinux/native/gamescope-wayland-live-resize.patch" \
|
||||
"${SOURCE_ROOT}/ptlinux/native/gamescope-wayland-letterbox-backing.patch" \
|
||||
"${SOURCE_ROOT}/ptlinux/native/gamescope-wayland-libdecor-input-scope.patch" \
|
||||
"${SOURCE_ROOT}/ptlinux/native/gamescope-keep-nested-windows-visible.patch" \
|
||||
"${STAGING_RELEASE}/ptlinux/native/"
|
||||
install -m 0644 "${SOURCE_ROOT}/ptdiag/__init__.py" "${STAGING_RELEASE}/ptdiag/__init__.py"
|
||||
install -m 0644 "${SOURCE_ROOT}/ptdiag/assbin.py" "${STAGING_RELEASE}/ptdiag/assbin.py"
|
||||
install -m 0644 "${SOURCE_ROOT}/ptdiag/logs.py" "${STAGING_RELEASE}/ptdiag/logs.py"
|
||||
if ! "$PYTHON_BIN" -I -B -c \
|
||||
'import sys; from pathlib import Path; sys.path.insert(0, sys.argv[1]); from scripts.release_lib import load_config, stage_runtime_payload; stage_runtime_payload(Path(sys.argv[2]), load_config(Path(sys.argv[3])), source_root=Path(sys.argv[4]))' \
|
||||
"$SOURCE_ROOT" "$STAGING_RELEASE" "${SOURCE_ROOT}/release/config.json" "$SOURCE_ROOT"
|
||||
then
|
||||
printf '%s\n' "The launcher runtime payload could not be staged." >&2
|
||||
if [[ -d "$STAGING_RELEASE" && ! -L "$STAGING_RELEASE" ]]
|
||||
then
|
||||
rm -r -- "$STAGING_RELEASE"
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
printf '{\n "channel": "%s",\n "config_schema": 1,\n "minimum_config_schema": 1,\n "schema": 1,\n "tag": "v%s",\n "version": "%s"\n}\n' \
|
||||
"$RELEASE_CHANNEL" "$VERSION" "$VERSION" > "${STAGING_RELEASE}/release.json"
|
||||
chmod 0644 "${STAGING_RELEASE}/release.json"
|
||||
@@ -357,7 +348,7 @@ CURRENT_LINK="${APP_ROOT}/.current.$$.tmp"
|
||||
ln -s -- "releases/${VERSION}" "$CURRENT_LINK"
|
||||
mv -Tf -- "$CURRENT_LINK" "${APP_ROOT}/current"
|
||||
|
||||
"$PYTHON_BIN" "${SOURCE_ROOT}/ptlinux/launcher_wrapper.py" \
|
||||
"$PYTHON_BIN" "${PACKAGE_SOURCE_ROOT}/ptlinux/launcher_wrapper.py" \
|
||||
"${SOURCE_ROOT}/packaging/pristontale-eu" \
|
||||
"$APP_ROOT" \
|
||||
"$INSTALL_DIRECTORY" \
|
||||
@@ -365,7 +356,7 @@ mv -Tf -- "$CURRENT_LINK" "${APP_ROOT}/current"
|
||||
install -m 0644 \
|
||||
"${SOURCE_ROOT}/packaging/eu.pristontale.PTLinux.png" \
|
||||
"$ICON_PATH"
|
||||
"$PYTHON_BIN" "${SOURCE_ROOT}/ptlinux/desktop_entry.py" \
|
||||
"$PYTHON_BIN" "${PACKAGE_SOURCE_ROOT}/ptlinux/desktop_entry.py" \
|
||||
"${SOURCE_ROOT}/packaging/eu.pristontale.PTLinux.desktop" \
|
||||
"${BIN_HOME}/pristontale-eu" \
|
||||
"$ICON_PATH" \
|
||||
|
||||
1822
ptdiag/experiment.py
1822
ptdiag/experiment.py
File diff suppressed because it is too large
Load Diff
2388
ptlinux/cli.py
2388
ptlinux/cli.py
File diff suppressed because it is too large
Load Diff
2791
ptlinux/depot.py
2791
ptlinux/depot.py
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user