Giter VIP home page Giter VIP logo

sokol-tools's Introduction

sokol-tools

Build

Command line tools for the sokol headers.

Documentation

  • sokol_shdc: shader-cross-compiler and code-generator for sokol_gfx.h

Precompiled binaries and fips-integration files:

https://github.com/floooh/sokol-tools-bin

Howto Clone, Build, Run and Debug:

Tool prerequisites:

> python --version
2.x or 3.x
> cmake --version
3.x
# optional:
> ninja --version
1.9.0

...plus your platform's C/C++ compiler toolchain (Xcode, Visual Studio, clang or gcc).

Clone

Create a separate workspace directory, this will be populated with dependency- and build-system-directories (the name doesn't matter), and clone the repository with submodules:

> mkdir workspace
> cd workspace
> git clone --recursive [email protected]:floooh/sokol-tools.git
> cd sokol-tools

Build

...on macOS:

> ./fips set config osx-xcode-release
# or with ninja:
> ./fips set config osx-ninja-release
> ./fips build

...on Windows:

> ./fips set config win64-vstudio-release
> ./fips build

...on Linux:

The executables for Linux must be compiled via Docker since they use static linking with musl, and Alpine Linux in Docker is the easiest option for this.

> cd docker
> ./build.sh

The compiled Linux executable will be in the same directory (docker/)

Creating a statically linked Linux executable with glibc instead of musl will create an executable which will most likely crash before main() is entered (this also means that development under Linux with the current build settings isn't possible, at least the static linking flags must be removed from the cmake files for this).

Run

List the compilation targets with:

> ./fips list targets

Run a compiled executable with:

> ./fips run [exe-target] -- [args]

The executables can be found in:

[workspace]/fips-deploy/sokol-tools/[config]/

Debug

To build for IDE debugging use any of the following build configs:

> ./fips set config osx-xcode-debug
> ./fips set config osx-vscode-debug
> ./fips set config linux-vscode-debug
> ./fips set config win64-vstudio-debug
> ./fips set config win64-vscode-debug

Then generate IDE project files and open the project in Visual Studio, VSCode or Xcode:

> ./fips gen
> ./fips open

Dependencies

Many thanks to:

sokol-tools's People

Contributors

floooh avatar code-disaster avatar allcreater avatar mattiasljungstrom avatar deins avatar erikwdev avatar 12boti avatar kochol avatar jbarthelmes avatar jsoref avatar kassane avatar msiedlarek avatar nmr8acme avatar haoyu234 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.