• Stars
    star
    910
  • Rank 50,206 (Top 1.0 %)
  • Language
    C#
  • License
    Apache License 2.0
  • Created about 7 years ago
  • Updated 5 months ago

Reviews

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

Repository Details

Sharpmake is an open-source C#-based solution for generating project definition files, such as Visual Studio projects and solutions, GNU makefiles, Xcode projects, etc.

Sharpmake

build

Introduction

Sharpmake is a generator for Visual Studio projects and solutions. It is similar to CMake and Premake, but it is designed for speed and scale. Sharpmake has been used at Ubisoft to generate several thousands of .vcxproj, .csproj and .sln files in a matter of seconds, and each of these projects can support a large number of Visual Studio configurations as well.

That makes Sharpmake ideal for the development of multi-platform games, where the number of platforms, the different levels of optimization, the multiple rendering APIs on PC and the level editor can quickly multiply the number of configurations a given code base must support. Sharpmake generates all those configurations at once, very quickly. Thus, it becomes trivial to generate and regenerate the entire project.

Sharpmake uses the C# language for its scripts, hence the name. That means you can edit your scripts in Visual Studio (or Visual Studio Code) and benefits from the default C# tooling (auto-completion, refactoring, debugger...).

Sharpmake can also generate makefiles and Xcode projects and can be run "natively" on any modern OSes that support recent version of the dotnet runtime.

Sharpmake was developed internally at Ubisoft for Assassin's Creed 3 in 2011. After experimenting with the other existing tools, it became clear that none of these solutions were performant enough to generate the number of configurations needed (at least not in a trivial way) and that a custom generator was needed.

Documentation

The Sharpmake documentation is split in two places:

The Sharpmake source code also comes with samples that you can study.

Building and running Sharpmake

Building and running Sharpmake is quite straightforward:

  • Clone the Git repository
  • Open the Sharpmake.sln solution located in the root folder
  • Hit the run button (by default it will run the first sample)

More Platforms

Sharpmake originally had support for game consoles, but Ubisoft pulled it out because those could not be open sourced. Sharpmake now has an extension system that allows support for these consoles to be added back at runtime.

More information about platforms can be found here.

Extending Sharpmake

Sharpmake is an open source project that come with some generic built-in features.

But as soon as we start speaking about additional features restricted by NDA (like for platforms), or for internal use only, it is handy to have a way to extend it.

The recommended solution is to follow this folder layout:

SharpmakeExtended:
 - πŸ“ Sharpmake
 - πŸ“ Sharpmake.Platforms
 - πŸ“ Sharpmake.Extensions
 -    Directory.build.props
 -    SharpmakeExtended.sln
  1. πŸ“ Sharpmake

The Sharpmake folder contains all the files of this Git repository.

We commonly call it Sharpmake core.

If you plan to version your SharpmakeExtended project under Git, you can use a Git submodule to pull on it directly.

  1. πŸ“ Sharpmake.Platforms (and πŸ“ Sharpmake.Extensions)

Platforms vs. Extensions: there is no difference between them, these two folders are only used to tidy/split things a little.

These two locations are where you can add any additional platforms (or extensions) in there own dedicated folder:

πŸ“ Sharpmake.Platforms
 - πŸ“ Sharpmake.Platform_A
      - *.cs
      - Sharpmake.Platform_A.csproj
 - πŸ“ Sharpmake.Platform_B
      - *.cs
      - Sharpmake.Platform_B.csproj

Sharpmake.Application.csproj (from Sharpmake core), automatically add .csproj from these folders to its dependency list. This means they will automatically be built and copied to its output folder, and simply hitting the "Start Debugging" button will just work.

  1. Directory.build.props

This file is used automatically by your .csproj from your platforms and extensions folders.

We recommend to - at least - import the same file from the Sharpmake core folder to re-use the same basic setup (target framework...). You can also customize/override any option after the import.

<Project>
  <!-- Rely on Sharpmake build setup -->
  <Import Project="Sharpmake/Directory.Build.props" />

  <!-- Add customization/override here -->
  <!-- ... -->
</Project>
  1. SharpmakeExtended.sln

This solution is only to ease development for humans. It allows to have in a single IDE all the projects from both Sharpmake core and the extended ones.

More Repositories

1

mixer

Add-on for real-time collaboration in Blender.
Python
1,316
star
2

massgate

Massgate is the online backend server for the Massive Entertainment game World in Conflict, and is now open-source to make it possible for anyone to host their own Massgate server.
C++
1,124
star
3

ubisoft-laforge-animation-dataset

Ubisoft La Forge - Animation Dataset
Python
954
star
4

ubisoft-laforge-ZeroEGGS

All about ZeroEggs
Python
356
star
5

mobydq

🐳 Tool to automate data quality checks on data pipelines
Vue
245
star
6

shotmanager

Shot Manager is a Blender add-on that introduces a true shot entity in Blender scenes, as well as a wide and powerful set of tools to build and edit sequences in real-time directly in the 3D context.
Python
197
star
7

ubisoft-laforge-daft-exprt

PyTorch Implementation of Daft-Exprt: Robust Prosody Transfer Across Speakers for Expressive Speech Synthesis
Python
118
star
8

NGitLab

.NET client for GitLab
C#
114
star
9

task-scheduler

TaskScheduler is a set of algorithms working together for asynchronous threaded code execution.
C++
84
star
10

vrtist

Virtual Reality tool for storytelling
C#
60
star
11

vulnmine

Vulnmine searches for vulnerable hosts using MS SCCM host / software inventory data with NIST NVD Vulnerability feed data.
Python
38
star
12

ubisoft-laforge-disentanglement-metrics

Python
32
star
13

ubisoft-laforge-Poisson-Filters

Code for "Compact Poisson Filters for Fast Fluid Simulation", ACM SIGGRAPH 2022 Conference.
HLSL
30
star
14

GitTimeLapseView

GitTimeLapseView is a visual diff tool that adds a timeline to your blame view
C#
29
star
15

videotracks

Video Tracks is a Blender add-on that provides track headers to the channels of the VSE.
Python
27
star
16

ubisoft-laforge-FFHQ-UV-Intrinsics

FFHQ-UV-Intrinstics: A dataset containing intrinsic face decomposition for 10k subjects of FFHQ-UV
26
star
17

stampinfo

Stamp Info is a Blender add-on that ensures the tracking of the rendered images by writing all the meta information directly on them, on specific areas such as their top and bottom.
Python
21
star
18

DirectBehaviorSpecification

Code to reproduce the Arena environment experiments from Direct Behavior Specification via Constrained Reinforcement Learning.
ASP.NET
19
star
19

ubisoft-laforge-asaf

Asaf
Python
16
star
20

ubisoft-laforge-face-editing-face-editing-using-part-based-optimization-of-the-latent-space

Face Editing Using Part-Based Optimization of the Latent Space
Python
14
star
21

assetbank

Blender add-on to manage asset banks and import or link 3D objects into Blender scenes.
Python
10
star
22

SmartNavMapGenerator

C#
9
star
23

ubisoft-laforge-climate-change-dataset

data set with Images extracted in WD2 engine
8
star
24

ubisoft-laforge-predictionperformance

Replication package for the paper: "Performance Prediction From Source Code Is Task and Domain Specific"
Python
7
star
25

usd-lod-schema-proposal

An open discussion to define a schema for Level Of Details in USD
7
star
26

ubisoft-laforge-PredictiveDeadReckoning

code from Predictive Dead Reckoning for Online Peer-to-Peer Games publication
Python
7
star
27

SmartNavEnvironment

C#
6
star
28

quartz-tezos-contracts

Ubisoft Quartz smart contract sources and build tools
JavaScript
5
star
29

ubisoft-laforge-lookat

Roff
4
star
30

ubisoft-laforge-brownbuild

Python
3
star
31

ubisoft-laforge-french-homograph-dataset

Complementary dataset for La Forge Speech Synthesis System for Blizzard Challenge 2023
2
star
32

genesis-contracts

Solidity
2
star
33

ubisoft-laforge-CrashReportPriorizationForLargeScaleScheduledLaunches

supporting material for Crash Report Prioritization for Large-Scale Scheduled Launches
Jupyter Notebook
1
star
34

ubisoft-laforge-toxbuster

Python
1
star
35

Ubisoft-LaForge-ToxPlainerDataSet

Dataset supporting "Unveiling Identity Biases in Toxicity Detection : A Game-Focused Dataset and Reactivity Analysis Approach"
1
star