Skip to content

ysdragon/ring2exe-plus

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ring2EXE (Plus): Ring to Executable

Convert Ring project source code to executable files for Windows, Linux, macOS, and FreeBSD.

Installation

ringpm install ring2exe-plus from ysdragon

Usage

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 .ringo file content.
  • filename_build_...: Build scripts for the detected C compiler (e.g., _build_cl.bat, _build_gcc.sh).
  • filename.obj or filename.o: Object file generated by the C compiler.
  • filename.exe or filename: The final executable file.

Note

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

Testing

# On Windows
ring2exe test.ring
test.exe

# On Linux, macOS, or FreeBSD
ring2exe test.ring
./test

Options

Build Options

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

Distribution Options

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

Package Format Flags

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)

Library Flags

Pattern Description
-<library> Include library (e.g., -qt, -allegro, -mysql)
-no<library> Exclude library (e.g., -noqt, -noallegro)

Examples

# 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 -allruntime

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Ring2EXE (Plus) package for the Ring programming language

Resources

License

Stars

Watchers

Forks

Languages

  • Ring 99.0%
  • Other 1.0%