mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 23:08:36 +00:00
Made by tools/layout/move_0216.py (the commit before this one) on db8e0be9c, the final code head of 0.2.16:
- 75 git mv (renames, so `git log --follow` and blame keep working; packaging/acceptance_matrix.md shows as delete + add because its links
changed too) and 3 removals: SETUP.bat, UPDATE.bat and update.sh (setup.py --update pulls the code now);
- 1,425 path edits in 307 files: root-relative paths in CI, Docker, .gitignore and the release scripts; Markdown links; Python and
Node joins from a root that moved with its folder; explicit edits for code that computes a root or names a moved path; tables of
repository paths inside tests.
engine/ holds what CMake builds (src, include, cmake, metal, sycl, spark, third_party, the C++ tests and benches). app/ is the desktop
app and its host (was apps/). terminal/ is the Terminal in the layout of the installed one (strata.py, setup.py, strata_cli,
strata_control, serve, bin, data, ref, crates, the Python tools and tests). docs/ has the documentation, docs/lang/ the translated
READMEs, docs/history and docs/bench-results. tools/ has the repository's own checks, packaging, docker, research and nix.
tests/core/test_tqp_ref.py is a pytest file and stays with the Python tests (terminal/tests/core/).
AGENTS.md, README.md, LICENSE, setup.sh and START-HERE.bat stay at the root.
No behaviour change: the same command lines, the same sources. For this head a replay of the script gave the same numbers and the path
scan (tools/layout/checks/path_scan.py) reports no hit; the suites and the builds run on this commit next.
77 lines
3.4 KiB
Batchfile
77 lines
3.4 KiB
Batchfile
@echo off
|
|
rem Strata for Windows: the first run installs everything and starts the model; later runs just start it.
|
|
rem Needs only an NVIDIA or AMD graphics driver. Python is installed for your user account if it is missing (no admin needed).
|
|
setlocal
|
|
rem Python reads and writes text as UTF-8, not in the Windows code page (cp1251, cp866, ...): a folder or user name with Cyrillic or other letters stays intact (#3202).
|
|
set "PYTHONUTF8=1"
|
|
title Strata
|
|
cd /d "%~dp0"
|
|
rem the Terminal's sources and everything setup writes live in terminal\ (0.2.16 layout); an older clone's .venv moves there once
|
|
if exist "terminal\setup.py" (
|
|
if not exist "terminal\.venv" if exist ".venv\Scripts\python.exe" move ".venv" "terminal\.venv" >nul
|
|
cd /d "%~dp0terminal"
|
|
)
|
|
rem A bundled Python runtime (the python\ folder of the terminal archive) is used when it is there: nothing to find,
|
|
rem install or download. (START-HERE.bat --setup, --update)
|
|
if exist "python\python.exe" goto bundled
|
|
if exist ".venv\Scripts\python.exe" goto run
|
|
|
|
call :findpy
|
|
if defined PY goto venv
|
|
echo.
|
|
echo Python 3.10 or newer is not installed. Installing Python 3.12 for your user account ...
|
|
where winget >nul 2>nul
|
|
if errorlevel 1 goto pyorg
|
|
winget install -e --id Python.Python.3.12 --scope user --silent --source winget --accept-package-agreements --accept-source-agreements --disable-interactivity
|
|
call :findpy
|
|
if defined PY goto venv
|
|
:pyorg
|
|
echo Downloading the Python installer from python.org ...
|
|
powershell -NoProfile -ExecutionPolicy Bypass -Command "[Net.ServicePointManager]::SecurityProtocol='Tls12'; Invoke-WebRequest -UseBasicParsing https://www.python.org/ftp/python/3.12.10/python-3.12.10-amd64.exe -OutFile \"$env:TEMP\strata-python-setup.exe\""
|
|
if exist "%TEMP%\strata-python-setup.exe" "%TEMP%\strata-python-setup.exe" /quiet InstallAllUsers=0 PrependPath=1 Include_launcher=1 Include_test=0
|
|
call :findpy
|
|
if defined PY goto venv
|
|
echo.
|
|
echo Python could not be installed automatically.
|
|
echo Install 64-bit Python 3.12 from https://www.python.org/downloads/ ("Add python.exe to PATH"),
|
|
echo then double-click START-HERE.bat again.
|
|
pause
|
|
exit /b 1
|
|
|
|
:venv
|
|
rem a private environment inside this folder, so nothing is installed into the system Python
|
|
%PY% -m venv .venv
|
|
if exist ".venv\Scripts\python.exe" goto run
|
|
echo Could not create the Python environment in .venv
|
|
pause
|
|
exit /b 1
|
|
|
|
:bundled
|
|
set "PYTHONNOUSERSITE=1"
|
|
set "PYTHONHOME="
|
|
set "PYTHONPATH="
|
|
rem one block, read before it runs: setup.py --update pulls the newest code, which can change this very file
|
|
(
|
|
"python\python.exe" setup.py %*
|
|
if errorlevel 1 pause
|
|
exit /b
|
|
)
|
|
|
|
:run
|
|
rem one block, read before it runs: setup.py --update pulls the newest code, which can change this very file
|
|
(
|
|
".venv\Scripts\python.exe" setup.py %*
|
|
if errorlevel 1 pause
|
|
exit /b
|
|
)
|
|
|
|
:findpy
|
|
rem the py launcher first, then python on PATH (not the Microsoft Store stub), then the usual per-user folders
|
|
set "PY="
|
|
py -3 -c "import sys; sys.exit(0 if sys.version_info >= (3, 10) and sys.maxsize > 2**32 else 1)" >nul 2>nul
|
|
if not errorlevel 1 set "PY=py -3" & goto :eof
|
|
python -c "import sys; sys.exit(0 if sys.version_info >= (3, 10) and sys.maxsize > 2**32 else 1)" >nul 2>nul
|
|
if not errorlevel 1 set "PY=python" & goto :eof
|
|
for %%V in (313 312 311 310) do if exist "%LOCALAPPDATA%\Programs\Python\Python%%V\python.exe" set "PY="%LOCALAPPDATA%\Programs\Python\Python%%V\python.exe"" & goto :eof
|
|
goto :eof
|