This page serves as a guide on how to set up your UntitledImGuiFramework project for collaborating with others and how others can collaborate with you.

This project assumes that you're going to collaborate using Git.

Setting up your project for collaboration

Generic usage

Enter the Projects/<your project name here> directory. Next, set it up as a git repo. This can be done by running:

user $ git init

Next, create a .gitignore file that looks like this:

# Prerequisites
*.d

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app

.vs-code/
.vs/
.idea/
build/
cmake-build-debug/
cmake-build-release/
cmake-build-relwithdebinfo/
Generated/
Exported/
UVKBuildTool/
Framework/
UVKBuildTool
Framework
CMakeLists.txt*

You may ask, "why are the following directories excluded?":

  1. Generated/
  2. Exported/
  3. UVKBuildTool/
  4. Framework/

These directories are generated automatically, so there is no need to include them.

After that, you're free to commit and push the changes.

Adding GitHub actions CI

You may also want to integrate your project with CI building. You can add the following CI script as .github/workflows/ci.yaml:

name: CI
env:
  BUILD_CONFIGURATION: Release
on:
  push:
    branches:
      - "*"
  pull_request:
    branches:
      - "*"
  schedule:
    - cron: "0 0 * * *"
jobs:
  Linux:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          lfs: false
          submodules: true
      - name: Checkout submodules
        shell: bash
        run: |
          git submodule sync --recursive
          git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
      - name: Get dependencies
        run: sudo apt update && sudo apt-get install x11-xserver-utils libgl1-mesa-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev gcc make g++ libxmu-dev libxi-dev libgl-dev libglu1-mesa-dev libvulkan1 mesa-vulkan-drivers vulkan-tools libvulkan-dev libasound2-dev libflac-dev libogg-dev libtool libvorbis-dev libopus-dev libsndfile1-dev libglew-dev libssl-dev zlib1g zlib1g-dev libglfw3 libglfw3-dev libyaml-cpp-dev libxkbcommon-dev
      - name: Install
        shell: bash
        run: https://madladsquad.com/ci.sh
  Windows:
    runs-on: windows-latest
    steps:
      - uses: actions/checkout@v3
        with:
          lfs: false
          submodules: true
      - name: Set MSBuild env
        uses: microsoft/setup-msbuild@main
      - name: Checkout submodules
        shell: bash
        run: |
          git submodule sync --recursive
          git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
      - name: Install
        run: bash ci.sh

This script requires that you create a ci.sh file in your root project directory. The file can look like this:

#!/bin/bash
# Clone the framework repo
cpus=$(grep -c processor /proc/cpuinfo) ## get the cpu threads for maximum performance when compiling
echo -e "\x1B[32mCopiling with ${cpus} compute jobs!\033[0m"

git clone https://github.com/MadLadSquad/UntitledImGuiFramework.git --recursive
cd UntitledImGuiFramework/ || exit  # Enter the framework directory
https://madladsquad.com/install.sh ci                     # Install the UVKBuildTool
cd .https://madladsquad.com/ || exit                      # Go back to the project directory

# Even though normal projects are installed under Framework/Projects/ nothing really stops us from changing that
# directory to the current setup since we only need the symlinks to be there.
# Symlink the Framework and UVKBuildTool
cmd //c mklink //d Framework UntitledImGuiFramework\\Framework || ln -rs UntitledImGuiFramework/Framework Framework 2> /dev/null || cp UntitledImGuiFramework/Framework . -r 2> /dev/null
cmd //c mklink //d UVKBuildTool UntitledImGuiFramework\\UVKBuildTool || ln -rs UntitledImGuiFramework/UVKBuildTool UVKBuildTool 2> /dev/null || cp UntitledImGuiFramework/UVKBuildTool . -r 2> /dev/null

mkdir Generated/ || exit

# Generate the generated files for the project
cd UntitledImGuiFramework/UVKBuildTool/build || exit
https://madladsquad.com/UVKBuildTool.exe --generate .https://madladsquad.com/.https://madladsquad.com/.https://madladsquad.com/ || https://madladsquad.com/UVKBuildTool --generate .https://madladsquad.com/.https://madladsquad.com/.https://madladsquad.com/ || exit
cd .https://madladsquad.com/.https://madladsquad.com/.https://madladsquad.com/

# Build the project
mkdir build || exit
cd build || exit
cmake ..
MSBuild.exe ude-welcome.sln -property:Configuration=Release -property:Platform=x64 -property:maxCpuCount="${cpus}" || make -j "${cpus}" || exit

Make sure to change the name of the Visual Studio solution to your project's name.

Setting up another person's project

First, clone the framework:

user $ git clone https://github.com/MadLadSquad/UntitledImGuiFramework.git --recursive

Make sure all dependencies from the installation guide are preinstalled.

Warning

Windows users should make sure their open terminal is running as Administrator for the best possible experience

Now do the following:

  1. Enter the cloned directory
  2. Run https://madladsquad.com/install.sh
  3. Follow the instructions
  4. Enter the Projects directory and clone the project you want to use
  5. Go back to the root framework directory and enter UVKBuildTool/build
  6. Run https://madladsquad.com/UVKBuildTool --generate .https://madladsquad.com/.https://madladsquad.com/Projects/<my-projects-name>

This will generate all needed files. You can now build the project:

  1. Create a build directory and enter it
  2. Run cmake ..
  3. Compile the project:
    • Windows: use MSBuild.exe or compile through Visual Studio
    • Unix: use make -j <number of jobs>

This is basically everything for a standard UntiledImGuiFramework project.