The message is the instruction
Nothing in DominScript has to be set up in advance. If a script uses a plugin whose library is not on your machine, the plugin stops and says what it needs — the file by name, and the folder to put it in, as a real path on your disk:
sdl2.Init: SDL2 not found. Install it, or copy SDL2.dll into C:\DominScript\runtime
That folder, runtime, is inside the DominScript folder you unpacked, and it is empty when you get it. Either install the library the way your system normally does, or download it and copy the named file into runtime. Run the script again; that is all. The same rule holds on Windows and Linux, for every plugin.
Which plugin needs what
| Plugin | Library | Windows file | Linux file |
|---|---|---|---|
sdl2 | SDL2 — windows, input, audio, 2D drawing | SDL2.dll | libSDL2-2.0.so.0 |
sdl2_image | SDL2_image — PNG / JPG / WebP / TIFF decoded into a pixel packet (and SDL2 for its surfaces) | SDL2_image.dll | libSDL2_image-2.0.so.0 |
sdl2_ttf | SDL2_ttf — TrueType text rendered into a pixel packet; brings FreeType along (and SDL2 for its surfaces). Fonts are not shipped: the script names a system font file or its own | SDL2_ttf.dll | libSDL2_ttf-2.0.so.0 |
opengl | SDL2 for the window and context; OpenGL itself comes with the OS | SDL2.dll | libSDL2-2.0.so.0 |
ffmpeg | FFmpeg — decoding video and audio | avutil-NN.dll, swresample-N.dll, avcodec-NN.dll, avformat-NN.dll, swscale-N.dll | libavutil.so.NN, libswresample.so.N, libavcodec.so.NN, libavformat.so.NN, libswscale.so.N |
tls | OpenSSL 3 — HTTPS and TLS sockets | libssl-3-x64.dll, libcrypto-3-x64.dll | libssl.so.3, libcrypto.so.3 |
sqlite | SQLite 3 | sqlite3.dll | libsqlite3.so.0 |
The other official plugins need nothing. The spinning-cube demo on the front page (opengl_ffmpeg_script_driven_demo.dom) needs SDL2, SDL2_image and FFmpeg; the 2D sdl2_demo.dom needs SDL2 and SDL2_image; both cube demos now take their logo through SDL2_image as well.
Where to get them
- SDL2, SDL2_image and SDL2_ttf. The release pages at github.com/libsdl-org/SDL, github.com/libsdl-org/SDL_image and github.com/libsdl-org/SDL_ttf; on Windows the
win32-x64zip of each holds the single DLL. On Linux:apt install libsdl2-2.0-0 libsdl2-image-2.0-0 libsdl2-ttf-2.0-0(or your distribution’s equivalent). No font comes with any of them or with DominScript: a script opens a font file of the system (/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf,C:\Windows\Fonts\arial.ttf) or its own. - FFmpeg. ffmpeg.org/download.html; on Windows take a shared build — its
binfolder holds the DLLs, copy the five named above. On Linux:apt install ffmpeg. - OpenSSL 3. On Linux it is almost always present already. On Windows, a binary installer or the two DLLs from a build; openssl.org links to both.
- SQLite 3. On Linux, present on practically every system. On Windows, sqlite.org/download.html → “Precompiled Binaries for Windows” → the
sqlite-dll-win-x64zip.
How DominScript searches
Every plugin looks in the same three places, in this order, and takes the first hit — at load time, in its init hook (see how plugins start and stop), so a missing library stops the script before it starts:
- the
runtimefolder inside the DominScript folder (or the folder named byDOMIN_RUNTIME_DIRin the environment, if you set one); - a developer-tree location,
3rd_party/<library>/<platform>, which a downloaded DominScript does not have; - wherever the operating system itself would find the library — a system install, the folder
dominis in,PATHon Windows, the library directories on Linux.
Because runtime comes first, a copy there also wins over an older system version, should you ever need that.
Three rules
- Match the bit-width. A 64-bit
domin.exeneeds 64-bit DLLs. A mismatch does not warn; it simply fails to load, and the message above appears. - Keep the license next to the file. Each of these libraries permits being copied this way; each asks that its
LICENSE(andNOTICE, where it has one) travel with it. Put them inruntimebeside the file. - Prefer the system’s copy. A library in
runtimedoes not get your operating system’s security updates. Use the folder when the system has no copy, not instead of one.