Download Documentation API Reference Samples Asset Store Donate🡕




Building


Building Your App with ursina.build



Open cmd in the project folder and run
python -m ursina.build

It will then move the necessary files to a 'build' directory which you can then distribute.

Package ursina application for Windows 10.
Provided with project folder path, creates a build folder where
it copies python and project's dependent packages. Requires a main.py file.
Copies game scripts and assets into 'build/scr' folder.
Creates a .bat file to start the game.

--ignore # add assets to ignore --name # change project name --include_modules # include extra modules like this: --include_modules module_one,module_two,module_tree --overwrite # don't ask to overwrite existing build, just overwrite --skip_engine --skip_game --compile_to_pyc=True --compile_to_pyc=False

Make sure to include any extra modules with --include_modules PIL,numpy for example.
Any errors while the application is running will be logged in log.txt instead of the console.



Building with Nuitka



Follow the instructions on https://nuitka.net/



Building Your App with auto-py-to-exe



This way is not recommended since it will slow to open and have a bigger file size.

1. pip install auto-py-to-exe
2. Go to cmd and type auto-py-to-exe to open the gui
3. Enter script location
4. Select onefile
5. Select either console based or window based
6. Icon (optional)
7. Under additional files, click add folder and add:
    panda3d-1.10.6.dist-info,
    panda3d,
    direct,
    ursina-3.1.0.dist-info,
    ursina,

    and any other files included for your app/game.
    You can find these in YOUR_PYTHON_FOLDER/Lib/site-packages/

8. Go under "Advanced" to "–paths" and add folder "YOUR_PYTHON_FOLDER/Lib/site-packages/panda3d"
9. Set an output location (optional)
10. Finally select "convert .py to .exe"