Some checks failed
Build / build (18.x, macos-latest) (push) Has been cancelled
Build / build (18.x, ubuntu-latest) (push) Has been cancelled
Build / build (18.x, windows-latest) (push) Has been cancelled
Build / build (20.x, macos-latest) (push) Has been cancelled
Build / build (20.x, ubuntu-latest) (push) Has been cancelled
Build / build (20.x, windows-latest) (push) Has been cancelled
57 lines
1.4 KiB
Markdown
57 lines
1.4 KiB
Markdown
# Portable STEP Service Runtime
|
|
|
|
## Goal
|
|
|
|
Run the STEP save backend from this project folder on another Windows machine without installing system Python or system FreeCAD.
|
|
|
|
## Expected layout
|
|
|
|
Put these runtimes inside the project root:
|
|
|
|
```text
|
|
Online3DViewer/
|
|
runtime/
|
|
python/
|
|
python.exe
|
|
...
|
|
freecad/
|
|
bin/
|
|
FreeCADCmd.exe
|
|
...
|
|
```
|
|
|
|
## One-time setup on the source machine
|
|
|
|
1. Copy a full Windows Python runtime into `runtime/python`.
|
|
2. Copy the FreeCAD folder into `runtime/freecad`.
|
|
3. Install backend dependencies into the portable Python:
|
|
|
|
```bat
|
|
tools\step_service\setup_portable_python.bat
|
|
```
|
|
|
|
## Start the backend
|
|
|
|
Use the portable launcher:
|
|
|
|
```bat
|
|
tools\step_service\start_portable_server.bat
|
|
```
|
|
|
|
This launcher only uses `runtime/python/python.exe`. It does not modify system PATH.
|
|
|
|
## How FreeCAD is resolved
|
|
|
|
The backend now checks FreeCAD in this order:
|
|
|
|
1. `runtime/freecad/bin/FreeCADCmd.exe`
|
|
2. `FreeCADCmd` from the current environment
|
|
|
|
So your existing local setup still works, but the portable folder takes priority when present.
|
|
|
|
## Notes
|
|
|
|
- Copy the whole project folder to the target machine.
|
|
- The target machine still needs normal Windows runtime support that FreeCAD and Python depend on.
|
|
- If you want zero manual commands on the target machine, use `start_portable_server.bat` instead of `python tools/step_service/server.py`.
|