• Stars
    star
    208
  • Rank 187,917 (Top 4 %)
  • Language
    Go
  • License
    MIT License
  • Created about 4 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Zero-configuration build system to very quickly build C/C++ projects.

Quickbuild (qb)

qb is a zero-configuration build system to very quickly build C/C++ projects on Linux, Windows, and MacOS.

Example

Let's say you have a folder containing some source files:

// main.cpp
#include "test.h"
int main() {
  test();
  return 0;
}

// test.h
void test();

// test.cpp
#include <cstdio>
void test() {
  printf("Hello, world\n");
}

You run qb in this directory:

~/qbtest $ qb
22:30:40.363 | main.cpp
22:30:40.364 | test.cpp
22:30:40.456 | 👏 qbtest
22:30:40.456 | ⏳ compile 53.9738ms, link 39.1138ms

And you run the resulting binary:

~/qbtest $ ./qbtest
Hello, world

Installing

To install qb, you can download a release and make sure it exists in your PATH.

If you have Go installed, you can also install the latest development version of qb by simply running go get github.com/codecat/qb.

Commands

You can pass a number of commands to qb.

qb run

Runs the binary after building it.

qb clean

Cleans all output files that qb could generate.

Optional configuration

Since qb is meant to be a zero configuration tool, you don't have to do any configuration to get going quickly. It will do its best to find appropriate defaults for your setup, you just run qb and it builds.

If you do want a little bit more control over what happens, you can either use command line flags or create a configuration file in your source folder.

Command line options

qb [--name name]
   [--type <exe|dll|lib>]
   [--pkg name]
   [--static]
   [--debug]
   [--verbose]
   [--strict]
   [--exceptions <std|all|min>]
   [--optimize <default|none|size|speed>]
   [--include <path>]
   [--define <define>]

--name

Sets the name of the project and controls the output filename. You should not provide any file extension here as it will be added automatically.

If no name is passed, the name of the current directory will be used.

For example, --name foo will produce a binary foo on Linux, and foo.exe on Windows.

--type

Sets the type of the project, which can be an executable or a (dynamic) library. This is specified using the keywords exe, dll, or lib.

For example, to create a dynamic library, you would pass --type dll.

--pkg

Adds a package to link to by its name. qb will try to resolve the package by itself, using a variety of sources. Listed here are the sources, in the order that they will be searched for:

  1. Local configuration: If you have a qb.toml file, this will check for packages defined there.
    [package.sfml]
    includes = [ "D:\\Libs\\SFML-2.5.1\\include\\" ]
    linkdirs = [ "D:\\Libs\\SFML-2.5.1\\lib\\" ]
    links = [
      "sfml-main.lib",
      "sfml-graphics-s.lib",
      "sfml-system-s.lib",
      "sfml-window-s.lib",
      "opengl32.lib",
      "winmm.lib",
      "gdi32.lib",
    ]
    defines = [ "SFML_STATIC" ]
  2. pkgconfig: If you have pkg-config installed on your system, it will be checking for packages from there.
  3. Nothing else yet, but the following is planned: global configuration (like local, but system-wide), and vcpkg (for Windows).

For example, to link with SFML, we can add --pkg sfml, as long as sfml can be resolved by one of the package sources.

Additionally, if Conan is installed, it may be used as a way to manage packages. If a conanfile.txt exists, it will run conan install . (unless conanbuildfile.txt already exists). Then conanbuildfile.txt is used to properly compile & link to any dependencies in the Conanfile.

--static

Links statically in order to create a standalone binary that does not perform any loading of dynamic libraries.

--debug

Produces debug information for the resulting binary. On Windows that means a .pdb file, on Linux that means embedding debug information into the binary itself so that it can be used with gdb, and on Mac that means a .dSYM bundle.

--verbose

Makes it so that all compiler and linker commands will be printed to the log. Useful for debugging qb itself.

--strict

Makes the compiler more strict with its warnings.

--exceptions

Sets the way that the compiler's runtime will handle exceptions. Can either be standard (std), all, or minimal (min). The default is standard.

This only makes a difference on Windows, where setting this to all will allow the runtime to catch certain access violation and other exceptions. When it's minimal or min, the minimal amount of exception handling will be done, which is similar to all, but there is no stack unwinding.

--optimize

Sets whether to use optimization. Can either be default, none, size, or speed. The default is default.

When this option is set to default, whether the binary will be optimized is defined by whether it's a debug build or not. For example, when building with qb --debug, you will get an unoptimized binary, but by building without any options (by just running qb) it will produce an optimized build.

--include

Adds a directory to the include path. For example, to add the folders foo and bar to the include path, you would run qb --include foo --include bar.

--define

Adds a precompiler definition. For example, to define FOO and BAR in the preprocessor when compiling, you would run qb --define FOO --define BAR.

Configuration file

It's possible to create a qb.toml file (in the folder you're running qb) to specify your configuration options as well. This is handy if you build a lot but don't want to pass the command line options every time.

The configuration file works the same as the command line options, except they are in a toml file. Values not defined in the file will remain as their defaults. For example, to make qb always build as a dynamic library with the name libfoo, you would put this in qb.toml:

name = "libfoo"
type = "dll"

To make a statically linked debug binary, you can put this in the configuration file:

static = true
debug = true

More Repositories

1

ClawSearch

A memory scanner plugin for x64dbg, inspired by Cheat Engine.
C
271
star
2

godot-tbloader

TrenchBroom Loader for Godot 4. (Alternative to Qodot)
C++
236
star
3

catsight

Cross-platform process memory inspector
C++
168
star
4

angelscript-mirror

Unofficial mirror for Angelscript's SVN repository, updated hourly.
C++
152
star
5

tm-dashboard

Dashboard for Trackmania displaying a bunch of vehicle information on screen.
AngelScript
50
star
6

ccpp

ccpp, a general purpose single-header preprocessor library.
C++
44
star
7

asdbg

A remote debugger for AngelScript.
C++
42
star
8

BinFind

Perform regex pattern matching on binary data. (Regex-like)
C++
35
star
9

go-enet

Enet bindings for Go using cgo.
C
34
star
10

dmzblack-96dpi

🐭 DMZ-Black with only the 96 DPI images. To force size 24 cursor on some Linux machines with high resolution monitors, especially on XFCE.
Shell
32
star
11

enet-p2p

Example for ENet on how to connect 2 peers to each other that are both behind a NAT using NAT hole punching.
C++
27
star
12

scratch2

Single-header base C++ classes.
C++
27
star
13

reddit-radio

Discord bot for /r/hardstyle
JavaScript
26
star
14

tm-better-chat

A better chat for Trackmania using Openplanet.
AngelScript
21
star
15

OpenSMO

👯 Open Stepmania Online Server
C#
21
star
16

angel

LÖVE, but with AngelScript instead of Lua.
C++
13
star
17

hoh-trainer

Trainer mod for Heroes of Hammerwatch, which can also be extended upon by other mods.
AngelScript
12
star
18

OpenAdvanceWars

🔫 Open source clone of Advance Wars 2.
C++
11
star
19

Nin

Tiny PHP framework based on some of the core ideas of Yii 1 and 2. (Nin means "No It's Not")
PHP
10
star
20

loveman

Project manager for LÖVE and LÖVR.
C#
10
star
21

SHVDNPro

Fork of crosire's ScriptHookVDotNet with major optimization fixes.
C#
10
star
22

ClipUpload

Old application to upload images and other files to certain places on the internet.
C#
8
star
23

Chatzilla-Plugins

💬 My Chatzilla plugins
JavaScript
8
star
24

mrag2

A Monogame helper library for graphics, content, and animation.
C#
8
star
25

maniaplanet-history

Keeping track of ManiaPlanet 4 updates.
C++
7
star
26

libflp

Library for parsing FL Studio .flp files.
C++
7
star
27

Scratch

🎩 Scratch, a general-purpose header-only core classes library for C++.
C++
7
star
28

unet

Unified Lobby Networking library in C++, providing cross-play between Steam lobbies, Gog Galaxy lobbies, and Enet sockets.
C++
7
star
29

ngui

Structured GUI framework for Love2D written in pure Lua.
Lua
6
star
30

logcrash-decoder

Decoder for Nadeo's LogCrash files generated by Trackmania and Maniaplanet.
Go
5
star
31

singleheader-socket

EzSock.h - single header cross-platform Socket wrapper class for C++.
C++
5
star
32

gonadeo

Go library to authenticate and communicate with Nadeo's live services.
Go
5
star
33

disco

Disposable development containers
Go
5
star
34

irl-phone

iOS app to control the irl-server app on Raspberry Pi
HTML
4
star
35

led-passive

Passive scriptable LED server for Raspberry Pi
C++
4
star
36

maniafix

Fixes an issue in ManiaPlanet 3 and TrackMania United Forever by patching the game in-memory. (Not for ManiaPlanet 4!)
C++
4
star
37

tmgl-viewer

Openplanet plugin to show Trackmania Grand League match status.
AngelScript
4
star
38

a.js

🌎 My Javascript library
JavaScript
3
star
39

irl-server

IRL livestreaming server for Raspberry Pi
Go
3
star
40

anchor-foundation

Dark Foundation theme for Anchor CMS.
PHP
3
star
41

MragPP

👾 Mrag++ is a C++ library for game development in SDL2. Its structure is loosely based on the concept of XNA (or Monogame).
C++
3
star
42

tm-http-inspect

Openplanet plugin to inspect HTTP requests within Trackmania.
AngelScript
3
star
43

p9

Yet another 9patch library for Love2D.
Lua
3
star
44

Coral

🎲 Coral Engine
C#
2
star
45

edna-run

The Chrome dino game, but set in the Kitboga universe.
JavaScript
2
star
46

steam-utils

Command line Steam utilities for debugging.
C++
2
star
47

mpman

Maniaplanet server manager for Nimz servers.
Go
2
star
48

ssbd-payload

Payload gamemode for Serious Sam's Bogus Detour.
AngelScript
2
star
49

nimania

Maniaplanet server controller written in C#.
C#
2
star
50

CosmicWin

📺 Makes YouTube homepage usable.
JavaScript
2
star
51

apache-angelscript

Angelscript module for the Apache webserver.
C++
2
star
52

screen-boundaries

Nimble Screen Boundaries teleports your mouse across multiple monitors when moved into a non-monitor area.
C#
2
star
53

beamngts

Typescript declarations for the BeamNG Lua environment.
Lua
2
star
54

nano

📝 My Nano fork, also referred to as Cato.
C
2
star
55

tm-editor-trails

Playtest trails in the Trackmania editor with playback controls.
AngelScript
2
star
56

ServerGUIHD

📦 Serious Sam HD: The Second Encounter dedicated server runner
Visual Basic
2
star
57

angelog.github.com

HTML
1
star
58

op-style-manager

Openplanet plugin to easily install and create custom Openplanet overlay styles.
AngelScript
1
star
59

vst3-premake

Quick example of building a VST3 plugin using Premake5 or GENie.
Lua
1
star
60

Rockets-Forever

🚀 Server mod for Serious Sam Classic: The Second Encounter (1.07)
C++
1
star
61

kana

Little site for learning Hiragana and Katakana. カナトレーナー
JavaScript
1
star
62

defqon-timetable

Timetable generator for Defqon. Made for 2019, 2022, 2023.
C#
1
star
63

apache-vhosts

Easy macros for making VirtualHosts in Apache configs.
1
star
64

termbox-powerline

Powerline-style rendering with Termbox.
C
1
star
65

hoh-pets

Pets mod for Heroes of Hammerwatch. Development is streamed live on Twitch.
AngelScript
1
star
66

kimsufi-watcher

⌚ Monitor Kimsufi server availability on a secondary monitor, with bright flashing colors once your desired server becomes available.
C#
1
star
67

xipgen

Generate short xip.io, nip.io, and sslip.io links.
Go
1
star
68

mixxx-gemini-gmx

Gemini GMX mapping and scripts for Mixxx.
JavaScript
1
star
69

TweetDeckSucks

🐦 TweetDeck sucks. So I made my own client called TweetDeck Sucks, based on the original TweetDeck Air client, which Twitter is no longer supporting.
C#
1
star