Sign inSign up

srpatsu21/dear-glfw-vulkan-compiler

By srpatsu21

•Updated 4 months ago

C++ Vulkan environment using Dear-ImGui, GLFW, GLM. Provides all required toLinux & Windows.

Image
Developer tools
1

926

srpatsu21/dear-glfw-vulkan-compiler repository overview

⁠Vulkan Dear-ImGui Glfw Glm

Container to compile everything together

⁠script to make a start setup

  • Linux

    set -e
    
    IMAGE="srpatsu21/dear-glfw-vulkan-compiler:latest"
    DEST="."
    
    mkdir -p "$DEST"
    mkdir -p "$DEST/vscode-extensions"
    
    docker run --rm \
        -v "$(pwd)/$DEST":/copy-dest \
        "$IMAGE" \
        bash -c "
            cp -r /workspace/* /copy-dest/ || true
            cp -r /root/.vscode-server/extensions /copy-dest/vscode-extensions/ || true
        "
    
    echo "files from container copied to $DEST"
    
  • Windows

    $ErrorActionPreference = "Stop"
    
    $image = "srpatsu21/dear-glfw-vulkan-compiler:latest"
    $dest = "."
    
    if (-not (Test-Path $dest)) {
        New-Item -ItemType Directory -Path $dest | Out-Null
    }
    $vscodeDir = Join-Path $dest "vscode-extensions"
    if (-not (Test-Path $vscodeDir)) {
        New-Item -ItemType Directory -Path $vscodeDir | Out-Null
    }
    
    docker run --rm -v "${PWD}\$dest:/copy-dest" $image `
        bash -c "
            cp -r /workspace/* /copy-dest/ || true
            cp -r /root/.vscode-server/extensions /copy-dest/vscode-extensions/ || true
        "
    
    Write-Host "Files from container copied to $dest"
    

⁠Docker Compose setup

  • docker-compose.yml
services:
    dear-glfw-vulkan-compiler:
        image: srpatsu21/dear-glfw-vulkan-compiler:1.3.0
        container_name: dear-glfw-vulkan-dev
        stdin_open: true
        tty: true
        working_dir: /workspace
        environment:
            # ssh pass
            ROOT_PASSWORD: 123
        ports:
            # ssh port
            - "2222:22"

        volumes:
            # create build files
            - ./build:/workspace/build
            - ./build-release:/workspace/build-release
            - ./build-windows:/workspace/build-windows
            - ./build-windows-release:/workspace/build-windows-release

            # map your libs and config
            - ./CMakeLists.txt:/workspace/CMakeLists.txt
            - ./toolchain-mingw.cmake:/workspace/toolchain-mingw.cmake
            - ./lib:/workspace/lib

            # make src interactive
            - ./src:/workspace/src

            # if you want to replace the scripts
            - ./scripts:/workspace/scripts
  • Acess the container to compile
docker compose up -d
docker exec -it dear-glfw-vulkan-dev bash

or you can acess by vscode or ssh

  • run script
    • Linux Debug

      ./scripts/build_linux.sh
      
    • Linux Release

      ./scripts/build_linux_release.sh
      
    • Windows Debug

      ./scripts/build_windows.sh
      
    • Windows Release

      ./scripts/build_windows_release.sh
      
    • Others scripts

          ./scripts/build_all_debug.sh
          ./scripts/build_all_release.sh
          ./scripts/build_all.sh
      

⁠GitHub

https://github.com/SrPatsu21/Vulkan_Dear-ImGui_Glfw_Glm⁠

Tag summary

Content type

Image

Digest

sha256:4f4506ed1…

Size

1.2 GB

Last updated

4 months ago

docker pull srpatsu21/dear-glfw-vulkan-compiler:1.3.0