Skip to content

Installation and Usage

luckasw edited this page Dec 17, 2024 · 1 revision

Installation and Usage Guide

Installation

Linux

Installation on Linux is straightforward:

  1. Get a Compiled Executable:

    • Download the pre-compiled executable from the project release page.
    • Run it directly from the command line:
      ./bpmn-parser
  2. Build from Source:

    • Install Rust and CoinCBC as instructed on the CoinCBC Wiki.
    • Clone the repository:
      git clone <repository_url>
      cd <project_directory>
    • Build the project:
      cargo build --release
    • Execute the program:
      ./target/release/bpmn-parser

Windows

To run the program on Windows, you need to use Windows Subsystem for Linux (WSL):

  1. Install WSL and a Linux distribution like Ubuntu from the Microsoft Store.
  2. Follow the Linux installation steps mentioned above.

macOS

On macOS, follow these steps:

  1. Install Rust: Use rustup to install Rust:

    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  2. Install CoinCBC

Use Homebrew to install CoinCBC:

brew install coin-or-tools/coinor/cbc

Building the project

Clone the repository and build:

git clone <repository_url>
cd <project_directory>
cargo build --release

Usage

Create an input file input.txt in the same directory as the executable. This file should contain your BPMN diagram written in the DSL language. Refer to the README for the DSL language rules.

Run the program by double-clicking the compiled executable. The program will automatically search for input.txt in the same directory.

Command-Line Interface (CLI)

For advanced usage, use the following command syntax:

bpmn-parser <output_image_type>

<filename>: (Optional) Name of the input file. None give it will search for input.txt
<output_image_type>: (Optional, must be given with filename) Specify the output image format (png, pdf, or svg).

Output The program generates a .bpmn file in the same directory as the executable. This .bpmn file contains the XML for your BPMN diagram, which can be imported into tools like bpmn.io for further editing or exporting. If an output image format is specified, the program will also generate the corresponding image (e.g., diagram.png, diagram.pdf, or diagram.svg) in the executable's directory.

Example

bpmn-parser input.txt png

This will: Parse input.txt in the current directory. Generate input.bpmn (XML format). Generate input.png in the same directory.

Clone this wiki locally