Skip to content
/ ARTTCB Public

ART Tiny C Builder - Little Builder for C Language with GCC using C#.

License

Notifications You must be signed in to change notification settings

ArTDsL/ARTTCB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ART Tiny C Builder (ARTTCB)

ART Tiny C Builder is a little C Language builder that uses GCC to perform quick project build based on pre-defined parameters.

Developed using C# NetCore and YAML, it's easy to setup and build your project.

Download the binaries here!

Need to run

How to use:

Using Binaries:

Instructions here are the same for all systems (Windows / Linux / MacOS):

1) Copy ARTTCB.exe (or ARTTCB in case of Linux and MacOs) to your project folder.

2) Create buildme.tcb file;

3) Run ARTTCB in a CMD (or terminal in case of Linux and MacOs).

4) Use the command .\ARTTCB.exe build -log (or ./ARTTCB build -log in case of Linux and MacOs).

OBS: Make sure all ARTTCB files are in the same folder, includer your buildme.tcb.

Compiling:

Windows:

1) In Windows open ARTTCB.sln (make sure you have Visual Studio 2022 and .NetCore 8 SDK installed).

2) Change on top from Debug to Release.

3) Compile first the lib project ARTTCB and after that the Console ARTTCBConsole project.

Linux and MacOs:

**1)**Make sure you have .NetCore 8 SDK and dotnet tools installed.

2) Open the folder where ARTTCB is located and open a terminal.

3) Use the command dotnet build ARTTCB.sln.

buildme.tcb

File buildme.tcb is a YAML file write with all information needed to build you project.

Example buildme.tcb file:
Modify as you need, DO NOT REMOVE ANY PARAMETER, if you don't want to use any info just put a "null" reference in front (example: next_build: null);

# Project Info
project_name: ""
project_version: "1.0.0"
project_author: ""
project_buildname: ""
# Project Folders
working_dir: "C:\\example\\"
build_folder: "build\\" # Uses "working_dir" as ROOT.
include_folders: "includes\\" # Uses "working_dir" as ROOT.
code_main_dir: "src\\" # Uses "working_dir" as ROOT.
# Build type
build_type: DLIB #(SLIB: STATIC LIB | DLIB: Dynamic Lib | EXE: Windows Exec | LEXEC: Linux Exec | MEXEC: MacOS Exec")
# C Files
c_files:
- "File1.c"
- "Folder\\File2.c"
#
# GCC Compiler Extra Parameters
compiler_params:
- '-Wall'
- '-Wextra'
- '-Wformat-security'
- '-Werror'
- '-Wstack-protector'
- '-fstack-protector-strong'
- '-fstack-clash-protection'
- '-D_FORTIFY_SOURCE=2'
# Next Build
next_build: "buildme2"
# Auto create build folders (if you don't have)
auto_create_folders: true
# Generate a LOG File
generate_log: true
# Jump Object Compilation
jump_object_compilation: false

What means those parameters?

Project Information:

  • project_name - Name of the project (use only alpha-numeric with spaces, can use uppercase and lowercase letters).
  • project_version - Version of the project (Only numbers, dots and hyphens).
  • project_author - Author of the project (same as Project Name, but can include "(c)" for copyright, dots and commas.
  • project_buildname - This name will be used in file outputs and others (recommended only lowercase letters, alpha-numeric, separated only with underscore).

Project Folders:

  • working_dir - Full path where your project is located.

  • build_folder - Folder where your build files are going to be located;

  • include_folders - Folder where your include (headers) files are located;

  • code_main_dir - Folder where your Source Code (*.c) files are located;

    (OBS: Folders: build_folder, include_folders, code_main_dir have the working_dir as ROOT, it means their path start inside the working_dir folder.)

Build type: (This will change in the future as things goes...)

  • build_type - The build_type defines what type of build you want to perform:
    • EXE - Windows Executable
    • LEXEC - Linux Executable
    • MEXEC - MacOS Executable
    • DLIB - Dynamic Library
    • SLIB - Static Library

C Files:

  • c_files - Path to All C Files (Array) ALso gonna change in the future;

Compiler Params:

  • compiler_params - All compile extra parameters goes here, it will be passed to GCC in the compilation line;

Next Build:

  • next_build - Need to build a Lib and then a Exe? Here is the solution, next_build allows you to create multiple build stages for your app, just create another buildme.tcb file and drop the name here (without .tcb), it will be executed one after another... In case of no next_build keep it a null object.

Extra:

  • auto_create_folders - Auto create build folder and all subfolders needed inside of it...
  • generate_log - Generate a log file in %working_dir%/ARTTCB_LOGS/ folder.
  • jump_object_compilation - Does not compile *.o (objects) and go straight to main build (Lib or Exec).

TODO:

  • Linux Exec/Libs Build;
  • MacOS Exec/Libs Build;
  • Auto Parameters (some, not all);
  • Auto *.c file referencer;
  • Better options;

Finally...

  • Thanks to YamlDotNet for this amazing Nuget Package!

This project is not a HUGE builder like CMake or something, it's just something simple that i want to make/use. But feel free to open an issue (if you find one) or ask me anything!

My X is always open, @ArT_DsL!

About

ART Tiny C Builder - Little Builder for C Language with GCC using C#.

Topics

Resources

License

Stars

Watchers

Forks

Languages