Skip to main content

Compile code generated by Sim4Sys Designer

Generate code with Sim4Sys

You can also generate an executable file from code for projects originating from Sim4Sys Designer. To do this, zip the code folder generated by Sim4Sys Designer and upload it to Hub4Sys. There are two available methods:

Get a Windows executable using mingw

  1. Ensure that mingw is correctly installed or refer to the Cygwin Installation Page.
  2. Generate ('Overview' tab > 'View menu' button > [Code] Build) the code from your model by choosing the CygWin GCC Toolchain:
choosing CygWin GCC Toolchain

  1. Configure your project settings as outlined but use 'boost_system' instead of 'boost_system-mt'.
  2. Click on Finish button.
  3. Compress your code into a zip file.

Get a Linux Executable using WSL

  1. Ensure that WSL is correctly installed or refer to the WSL
  2. Generate ('Overview' tab > 'View menu' button > [Code] Build) the code from your model by choosing the Linux GCC Toolchain; sometimes, you need to unselect "Show project types and toolchains only if they are not supported on the platform".
choosing Linux GCC Toolchain

  1. Configure your project settings by replacing 'libCWS_default' with 'CWS_linux_boost1.66_x86_64' in the linker tab.
  2. Compress your code into a zip file.

Create an executable from code

On Hub4Sys, to create an executable file, you have to:

  1. Log in.
  2. Select a Project.
  3. Go to Artifact > Executables tab.
  4. Click on "Create Executable" button.
Create executable dialog

Then:

  1. Choose an archive (zip) containing the code generated from Sim4Sys Designer.
  2. Choose a name.
  3. Set the description of the executable, explaining the implemented features.
  4. Finally, click on "Upload" to load the given file:
Create executable dialog

This action will initiate a build, that you can monitor in the Build tab.
Upon successful completion, you'll have access to the freshly generated executable file.

Builds page

Download the Executable

Once the build is complete, you can download the zip file containing your model executable:

  • In Executable tab, click on Download button button
  • In Build tab, select a build, then click on "Download resulting executable" button:
Download button

Run the Executable

Depending on your previous choice regarding code generation:

  • Double-click on the Windows executable.
  • If you chose the Linux way, open your WSL console and launch your file through the command line.

Delete a Build

To maintain a clean project, you can delete old or failed builds by clicking on the cross button:

Delete Build

A pop-up will appear to confirm the deletion:

Delete Build Confirmation

info

To delete a specific build, you must be its creator or the project owner.