Make work with astra
This commit is contained in:
parent
21859bcfb3
commit
c8ee5045e2
1 changed files with 6338 additions and 4613 deletions
181
BUILDING.md
181
BUILDING.md
|
|
@ -1,72 +1,109 @@
|
|||
# Linux build
|
||||
# Linux build and launch
|
||||
|
||||
The project targets **Unity 2018.1.6f1**. Keep this version for now: the
|
||||
simulation uses the bundled UNet networking API and the legacy .NET runtime.
|
||||
No engine migration has been made.
|
||||
The simulation builds and runs on Debian 13 x86_64 with its original
|
||||
**Unity 2018.1.6f1** editor. UNet, the legacy .NET runtime, the scene, and the
|
||||
traffic algorithms are retained. The source recovery is described in
|
||||
[Recovery/README.md](Recovery/README.md).
|
||||
|
||||
## Toolchain
|
||||
## Run over SSH
|
||||
|
||||
The following tools were installed and launched on this Debian 13 x86_64 host:
|
||||
On the server:
|
||||
|
||||
- Unity Editor: `/opt/unity/2018.1.6f1/Editor/Unity`, including Linux player support.
|
||||
- Blender 2.79b: `/opt/blender-2.79b-linux-glibc219-x86_64/blender`, also available
|
||||
as `blender` on PATH. The project's Blender models use the 2.79 file format.
|
||||
- GTK 2, libsoup 2.4, GLU, and GConf 2 compatibility libraries. GConf was installed
|
||||
from Debian's `libgconf-2-4_3.2.6-8_amd64.deb` and
|
||||
`gconf2-common_3.2.6-8_all.deb`; Debian 13 no longer ships those packages.
|
||||
- Xvfb and xauth for running the old editor without a desktop display.
|
||||
```sh
|
||||
./run-linux.sh --vnc
|
||||
```
|
||||
|
||||
Downloads: [Unity 2018.1.6f1](https://unity.com/releases/editor/whats-new/2018.1.6f1),
|
||||
[Blender 2.79b](https://download.blender.org/release/Blender2.79/),
|
||||
[Debian GConf packages](https://deb.debian.org/debian/pool/main/g/gconf/).
|
||||
On your local computer, open a second SSH connection with a tunnel:
|
||||
|
||||
## Build command
|
||||
```sh
|
||||
ssh -L 5901:127.0.0.1:5901 your-server
|
||||
```
|
||||
|
||||
Once Unity is activated and the damaged source assets below are restored:
|
||||
Connect a VNC viewer to `127.0.0.1:5901`. The VNC service listens only on
|
||||
localhost; access it through the SSH tunnel. The launcher starts a virtual
|
||||
1280×800 display, both Python services, the simulation server, and its graphical
|
||||
client. It requires `xvfb`, `xauth`, and `x11vnc`. Close the client or press
|
||||
Ctrl-C in the launcher terminal to stop all its processes.
|
||||
|
||||
Other modes:
|
||||
|
||||
```sh
|
||||
./run-linux.sh --server # Python services and headless simulation server
|
||||
./run-linux.sh --demo # Server plus graphical client on the current desktop
|
||||
```
|
||||
|
||||
Python 3 and Bash are required. The launcher uses local HTTP ports 8080/8081 and
|
||||
UNet port 7777; it refuses to start if an existing service occupies those ports.
|
||||
Traffic lights start in the original `off` state (uncontrolled intersections).
|
||||
The simulation does not automatically cycle them; the original HTTP API can
|
||||
control them. Logs are written under `Builds/linux/`.
|
||||
|
||||
A separate graphical Linux client can connect to an already running server:
|
||||
|
||||
```sh
|
||||
Builds/linux/Simulation.x86_64 --connect SERVER_ADDRESS \
|
||||
-screen-width 1280 -screen-height 800 -screen-fullscreen 0 -force-glcore
|
||||
```
|
||||
|
||||
Without `--connect`, the player opens the original connection menu. `--server`
|
||||
starts the server automatically; `--traffic-url` and `--event-url` can select
|
||||
other HTTP services. Keep server and client in separate processes, as the
|
||||
original simulation uses delayed client interpolation.
|
||||
|
||||
## Build
|
||||
|
||||
```sh
|
||||
./build-linux.sh
|
||||
```
|
||||
|
||||
For an editor installed elsewhere:
|
||||
Output: `Builds/linux/Simulation.x86_64` and `Builds/linux/Simulation_Data/`.
|
||||
Distribute both together. The build log is `Builds/linux/build.log`.
|
||||
The script uses Xvfb when no display is available and places temporary import
|
||||
files in `Builds/linux/tmp` by default to avoid filling a small `/tmp` tmpfs.
|
||||
Override the editor or temporary directory when needed:
|
||||
|
||||
```sh
|
||||
UNITY_EDITOR=/path/to/2018.1.6f1/Editor/Unity ./build-linux.sh
|
||||
UNITY_EDITOR=/path/to/2018.1.6f1/Editor/Unity TMPDIR=/large/tmp ./build-linux.sh
|
||||
```
|
||||
|
||||
The intended output is `Builds/linux/Simulation.x86_64`, with its accompanying
|
||||
data directory. The editor log is `Builds/linux/build.log`. The build uses
|
||||
`Assets/Scenes/Main.unity`; the original settings incorrectly named the absent
|
||||
`SampleScene.unity` despite already containing Main's GUID.
|
||||
The build includes `Assets/Scenes/Main.unity`. The original build settings
|
||||
incorrectly named the nonexistent `SampleScene.unity`.
|
||||
|
||||
The existing standalone startup code selects the client menu. This build command
|
||||
preserves that behavior.
|
||||
## Installed toolchain
|
||||
|
||||
## Current blockers and verification
|
||||
- `/opt/unity/2018.1.6f1/Editor/Unity`, including Linux player support.
|
||||
- Blender 2.79b at `/opt/blender-2.79b-linux-glibc219-x86_64/blender`, also
|
||||
available as `blender` on PATH for importing the original `.blend` models.
|
||||
- GTK 2, libsoup 2.4, GLU, and GConf 2 compatibility libraries. GConf came from
|
||||
Debian's `libgconf-2-4_3.2.6-8_amd64.deb` and
|
||||
`gconf2-common_3.2.6-8_all.deb`, as Debian 13 no longer includes it.
|
||||
- Xvfb, xauth, and x11vnc for SSH access. Mesa llvmpipe successfully rendered the
|
||||
client without a physical GPU. This software rendering can be slower than a
|
||||
desktop GPU. The machine has no audio device, so Unity reports audio fallback
|
||||
messages and runs without sound.
|
||||
|
||||
**No Linux executable has been built.** The editor starts, but the attempted
|
||||
batch build exits with status 1 at license activation:
|
||||
Downloads: [Unity 2018.1.6f1](https://unity.com/releases/editor/whats-new/2018.1.6f1),
|
||||
[Blender 2.79b](https://download.blender.org/release/Blender2.79/),
|
||||
[Debian GConf packages](https://deb.debian.org/debian/pool/main/g/gconf/).
|
||||
Recovery-only tools (ILSpy, UnityPy, OpenEXR, and .NET SDK) are not needed to build
|
||||
or run the restored source.
|
||||
|
||||
```text
|
||||
Failed to activate/update license. Missing or bad username and password.
|
||||
```
|
||||
## Activation on this machine
|
||||
|
||||
Unity Personal is free for eligible users, but still requires activation.
|
||||
For a desktop session, sign in to Unity Hub, then use Settings > Licenses >
|
||||
Add license > Get a free personal license if it is not activated automatically.
|
||||
See [Unity's Hub license instructions](https://docs.unity.com/en-us/hub/manage-license).
|
||||
Unity Personal was activated using the signed-in account. The modern
|
||||
entitlement alone was insufficient for this editor; Unity's official Licensing
|
||||
Client successfully issued the compatible legacy license with `--activate-ulf`.
|
||||
The editor now reads `~/.local/share/unity3d/Unity/Unity_lic.ulf`.
|
||||
No additional sign-in is needed for builds on this machine while that license
|
||||
remains valid. Licenses and credentials are outside the repository and build.
|
||||
|
||||
For SSH access, Unity CLI 1.0.0-beta.9 is installed at
|
||||
`/root/.local/bin/unity`, along with GNOME Keyring and `libsecret-tools`.
|
||||
Its login command prints a URL that can be opened in a browser on another
|
||||
device. Run `./unity-ssh.sh` as the same Linux user that will run the build.
|
||||
It starts a private D-Bus session and a dedicated Unity keyring under
|
||||
`~/.local/share/unity-ssh/keyrings`, leaving the desktop login keyring intact.
|
||||
Choose a password on first use and use the same password when reopening the
|
||||
helper. This password protects saved credentials locally; enter your Unity
|
||||
account password only on Unity's sign-in page. The helper verifies that the
|
||||
keyring can store and retrieve a test credential before opening a shell.
|
||||
In that shell, run:
|
||||
`./unity-ssh.sh` opens a private D-Bus session with a dedicated keyring in
|
||||
`~/.local/share/unity-ssh/keyrings`. It preserves the desktop keyring. Use the
|
||||
same local keyring password when reopening it; this is separate from your Unity
|
||||
account password. The helper checks that credentials can be stored before
|
||||
opening its shell. Run `./unity-ssh.sh --check` to check the keyring alone.
|
||||
|
||||
For an account sign-in or modern Personal activation, run inside that shell:
|
||||
|
||||
```sh
|
||||
unity auth login
|
||||
|
|
@ -74,37 +111,27 @@ unity license activate --personal --accept-eula
|
|||
unity license status
|
||||
```
|
||||
|
||||
The activation command accepts the Unity Personal license terms. Type `exit`
|
||||
when finished to close the shell and its keyring session.
|
||||
The login command prints a browser URL usable on another computer. The activation
|
||||
command accepts the Personal terms. Those commands alone may still require the
|
||||
legacy ULF compatibility step for Unity 2018. See the official
|
||||
[Unity CLI documentation](https://docs.unity.com/en-us/unity-cli/use-unity-cli).
|
||||
|
||||
The command options and browser-assisted login startup have been checked here.
|
||||
Keyring tests with temporary credentials cover creation, reopening, incorrect
|
||||
password rejection, inherited desktop sessions, and concurrent-session
|
||||
rejection. The CLI's own credential-store check resolves the Secret Service
|
||||
backend inside the helper. Run `./unity-ssh.sh --check` to check the keyring
|
||||
without starting a Unity sign-in.
|
||||
Sign-in, activation, and compatibility with the old editor still need to be
|
||||
verified. See [Unity CLI instructions](https://docs.unity.com/en-us/unity-cli/use-unity-cli)
|
||||
and [release notes](https://docs.unity.com/en-us/unity-cli/release-notes).
|
||||
## Verification
|
||||
|
||||
There is also existing file corruption, independent of activation. An audit
|
||||
found **33 asset files whose contents are Unity metadata instead of their
|
||||
expected source/model/image/material data**. Five of these are C# source files:
|
||||
Verified on this host:
|
||||
|
||||
- `UnityProject/Assets/Scripts/CarLL.cs`
|
||||
- `UnityProject/Assets/Scripts/misc/trafficLightColor.cs`
|
||||
- `UnityProject/Assets/Standard Assets/CrossPlatformInput/Scripts/VirtualInput.cs`
|
||||
- `UnityProject/Assets/!ext/PostProcessing/Editor/PostProcessingInspector.cs`
|
||||
- `UnityProject/Assets/!ext/PostProcessing/Editor/Monitors/WaveformMonitor.cs`
|
||||
- Linux player and editor C# compilation using the genuine Unity 2018 libraries.
|
||||
- A complete Linux standalone build, followed by server and graphical client
|
||||
startup through `run-linux.sh --vnc`.
|
||||
- Client connection, car spawning, completed trips, and traffic counts sent to
|
||||
the original Python backend.
|
||||
- HTTP traffic-light changes, queuing at red lights, and resumed traffic.
|
||||
- A local event displayed by the client's notification UI.
|
||||
- Rendered town, pedestrians, cars, post-processing, and recovered lighting.
|
||||
- No missing-script warnings or managed runtime exceptions during the successful
|
||||
server/client test. Old vendor API deprecation and model import warnings remain.
|
||||
- Launcher shutdown cleans up the services, players, VNC server, and virtual
|
||||
display it started.
|
||||
|
||||
A separate compilation attempt with Unity's bundled Mono compiler and genuine
|
||||
2018.1 assemblies fails with `CS8025: Parsing error` in `VirtualInput.cs`.
|
||||
The full asset list is in the local `Builds/linux/source-audit.txt`; compiler
|
||||
output is in `Builds/linux/script-check/compile.log`.
|
||||
|
||||
Some metadata is damaged too: there are duplicated GUIDs, source code stored in
|
||||
`.cs.meta` files, and empty directories with `.meta` names. The file at
|
||||
`UnityProject/Scripts/CarLL.cs` is not a usable backup: it contains a
|
||||
`TrafficController` class. A clean original checkout/archive is needed to
|
||||
restore these files reliably. Existing assets and the old Library cache were
|
||||
left intact.
|
||||
Local screenshots and test captures are under `Builds/linux/`; generated output
|
||||
and the preserved old Library cache are ignored by Git.
|
||||
|
|
|
|||
Loading…
Reference in a new issue