Convert Ring project source code to executable files for Windows, Linux, macOS, and FreeBSD.
ringpm install ring2exe-plus from ysdragon
ring ring2exe.ring filename.ring [Options]
This will set filename.ring as the input to the program.
The following files will be generated:
filename.ringo: The Ring Object File (by Ring Compiler).filename.c: The C source code file, which contains the.ringofile content.filename_build_...: Build scripts for the detected C compiler (e.g.,_build_cl.bat,_build_gcc.sh).filename.objorfilename.o: Object file generated by the C compiler.filename.exeorfilename: The final executable file.
You can build ring2exe itself by running:
ring ring2exe.ring ring2exe.ring
This will generate a native ring2exe executable that you can use directly:
# On Windows
ring2exe filename.ring
# On Linux, macOS, or FreeBSD
./ring2exe filename.ring
# On Windows
ring2exe test.ring
test.exe
# On Linux, macOS, or FreeBSD
ring2exe test.ring
./test
| Option | Description |
|---|---|
-keep |
Don't delete temporary files (.c, .obj, build scripts) |
-static |
Build standalone executable (no ring.dll/ring.so/ring.dylib) |
-gui |
Build GUI application (hides console window on Windows) |
-cc=<compiler> |
Specify C compiler (e.g., clang, gcc, tcc) |
-cflags=<flags> |
Specify C compiler flags (e.g., -g, -Wall) |
-output=<name> |
Specify custom output filename |
| Option | Description |
|---|---|
-dist |
Prepare application for distribution |
-allruntime |
Include all libraries in distribution |
-mobileqt |
Prepare Qt project for mobile platforms |
-webassemblyqt |
Prepare Qt project for WebAssembly |
Use with -dist to specify which package formats to generate. Default: scripts only.
| Flag | Platform | Description |
|---|---|---|
-scripts |
All | Generate installation scripts (default) |
-deb |
Linux | Generate Debian package (.deb) |
-rpm |
Linux | Generate RPM package (.rpm) |
-appimage |
Linux | Generate AppImage package |
-appbundle |
macOS | Generate App Bundle (.app) |
-pkg |
FreeBSD | Generate FreeBSD package (.pkg) |
| Pattern | Description |
|---|---|
-<library> |
Include library (e.g., -qt, -allegro, -mysql) |
-no<library> |
Exclude library (e.g., -noqt, -noallegro) |
# Default: only scripts
ring2exe myapp.ring -dist
# Linux: generate Debian package
ring2exe myapp.ring -dist -deb
# Linux: generate multiple formats
ring2exe myapp.ring -dist -deb -rpm -appimage
# macOS: with App Bundle
ring2exe myapp.ring -dist -appbundle
# FreeBSD: with pkg package
ring2exe myapp.ring -dist -pkg
# Combine with library flags
ring2exe myapp.ring -dist -deb -qt -allruntimeThis project is licensed under the MIT License. See the LICENSE file for details.