diff --git a/.bazelrc b/.bazelrc index dafe0e8..7714123 100644 --- a/.bazelrc +++ b/.bazelrc @@ -2,4 +2,10 @@ build --jobs 128 build --cxxopt='-std=c++17' build --copt=-fdiagnostics-color=always -run --copt=-fdiagnostics-color=always +run --copt=-fdiagnostics-color=always + +# Dependencies locking +sync --experimental_repository_resolved_file=resolved.bzl +build --experimental_resolved_file_instead_of_workspace=resolved.bzl +build --experimental_repository_hash_file=resolved.bzl +build --experimental_verify_repository_rules=@bazel_tools//tools/build_defs/repo:git.bzl%git_repository diff --git a/.github/workflows/vsenv.bat b/.github/workflows/vsenv.bat new file mode 100644 index 0000000..2b6e5f6 --- /dev/null +++ b/.github/workflows/vsenv.bat @@ -0,0 +1,17 @@ +@echo off + +SET VSWHERE="C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere" + +:: See https://github.com/microsoft/vswhere/wiki/Find-VC +for /f "usebackq delims=*" %%i in (`%VSWHERE% -latest -property installationPath`) do ( + call "%%i"\Common7\Tools\vsdevcmd.bat %* +) + +:: Loop over all environment variables and make them global using set-env. +:: See: https://help.github.com/en/articles/development-tools-for-github-actions#set-an-environment-variable-set-env +:: See: https://stackoverflow.com/questions/39183272/loop-through-all-environmental-variables-and-take-actions-depending-on-prefix +setlocal +for /f "delims== tokens=1,2" %%a in ('set') do ( + echo ::set-env name=%%a::%%b +) +endlocal diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml new file mode 100644 index 0000000..8c5b9dd --- /dev/null +++ b/.github/workflows/workflow.yml @@ -0,0 +1,66 @@ +on: push +name: Build +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BAZELISK_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +jobs: + build_on_ubuntu: + name: Build on ubuntu + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install + run: sudo apt update && sudo apt-get install -y libgl1-mesa-dev xorg-dev + - run: bazelisk build voidstar + + build_on_macos: + name: Build on macos + runs-on: macos-latest + steps: + - uses: actions/setup-python@v1 + with: + python-version: '3.x' + - uses: actions/checkout@v2 + - run: bazelisk build voidstar + + build_on_windows: + name: Build on windows + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + + # Trying to install & use GCC + # From https://github.com/onqtam/doctest/pull/285/files + - name: Install (Windows) + shell: powershell + run: | + Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh') + scoop install ninja --global + #if ("${{ matrix.compiler }}".StartsWith("clang")) { + # scoop install llvm --global + #} + #if ("${{ matrix.compiler }}" -eq "gcc") { + # Chocolatey GCC is broken on the windows-2019 image. + # See: https://github.com/DaanDeMeyer/doctest/runs/231595515 + # See: https://github.community/t5/GitHub-Actions/Something-is-wrong-with-the-chocolatey-installed-version-of-gcc/td-p/32413 + scoop install gcc --global + echo "::set-env name=CC::gcc" + echo "::set-env name=CXX::g++" + #} elseif ("${{ matrix.compiler }}" -eq "clang") { + # echo "::set-env name=CC::clang" + # echo "::set-env name=CXX::clang++" + #} else { + # echo "::set-env name=CC::${{ matrix.compiler }}" + # echo "::set-env name=CXX::${{ matrix.compiler }}" + #} + # Scoop modifies the PATH so we make the modified PATH global. + echo "::set-env name=PATH::$env:PATH" + - name: Configure x64 + run: .github\workflows\vsenv.bat -arch=x64 -host_arch=x64 + + - shell: bash + run: | + gcc --version || true + clang --version || true + + - run: bazelisk build voidstar diff --git a/.gitignore b/.gitignore index 9f3f584..6872e14 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,7 @@ travis-miners -/build - /parts /prime /snap/.snapcraft /stage /voidstar_*.snap -/bazel-* diff --git a/.travis.yml b/.travis.yml index 2889481..66135eb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,81 +1,11 @@ sudo: false language: cpp -compiler: -- clang -- gcc -os: -- osx -- linux addons: apt: packages: - - libglew-dev - - xorg-dev - - libgl1-mesa-dev - - libc++-dev - cppcheck -before_install: -- openssl aes-256-cbc -K $encrypted_b87f4dd04cd0_key -iv $encrypted_b87f4dd04cd0_iv -in travis-miners.enc -out travis-miners -d - -install: -- | - case "$TRAVIS_OS_NAME" in - 'osx') - travis_wait 15 brew update - travis_wait 15 brew install glew - curl -#fSLo ./bazel https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-darwin-amd64 && chmod +x ./bazel - ;; - 'linux') - curl -#fSLo ./bazel https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64 && chmod +x ./bazel - ;; - esac - -before_script: -- ./bazel --version || true -- $CC --version || true -- $CXX --version || true - script: -- ./bazel build //voidstar -- ./bazel-bin/voidstar/voidstar -h -- ./bazel-bin/voidstar/voidstar --help -- ./bazel-bin/voidstar/voidstar -l -- ./bazel-bin/voidstar/voidstar --list -#- ./bazel-bin/voidstar/voidstar $(echo */) -- mv -v bazel-bin/voidstar/voidstar "bazel-bin/voidstar/voidstar-$(git describe --abbrev --dirty --always --tags)-$TRAVIS_OS_NAME-$(basename $CC)" -- if [[ "$TRAVIS_OS_NAME" = 'linux' ]]; then cppcheck --error-exitcode=1 --enable=all -Ivoidstar/include/ voids tar/; fi - -after_success: -- | - if [[ "$TRAVIS_SECURE_ENV_VARS" == 'true' ]] && [[ "$TRAVIS_BRANCH" == 'master' ]] && [[ "$TRAVIS_PULL_REQUEST" == 'false' ]] && [[ "$TRAVIS_OS_NAME" == 'linux' ]]; then - major=v1 - minor="$(($(git describe --tags | grep $major | cut -d. -f2) + 1))" - tag=$major.$minor.$TRAVIS_BUILD_ID - echo Tag: $tag - msg="$(git log -1 --pretty=%B | head -n 1)" - echo "Message: $msg" - echo Commit: $TRAVIS_COMMIT - if [[ 0 -ne "$(git tag --contains $TRAVIS_COMMIT | wc -l)" ]]; then echo 'Already tagged this commit!' && exit 0; fi - git config --global user.email 'pierrefenoll+travis-voidstar@gmail.com' - git config --global user.name 'Autotag' - git remote set-url origin git@github.com:$TRAVIS_REPO_SLUG.git - git tag -a $tag -m "$msg" $TRAVIS_COMMIT - chmod 600 travis-miners - eval `ssh-agent -s` - ssh-add travis-miners - echo Tagging $TRAVIS_COMMIT with $tag - git push --tags || true - fi - -deploy: - provider: releases - api_key: - secure: cu/xvTwEXo4SD9BUb84dRSBCu8NB5KaHEFhERVlwGd9feKllpRpo1Vaflwzmoa/JEpdq5cgIV4b4f8OUtmPHlCeHq0nq6l7+Sl0p0yW0juSH0rDvJgJTde+Rma70RKVjz4mgtgLHa/PKNBHbdPl3kmVQ/aUZtF1qYN6ObiS+a+gIFQcUX0IQfJhBHRLxmc94ozW/9FxXzz0zhENeE8PWAMhAWdmxHnlYQPBuWw6EYsbzhD5s1lkywzBNprJ+XTqtc7dgTUUwZ7UkkhpQ4RrfRzjJUpKb2pjDo+8WZhsCjYnQRTCquKF4eoDM2barD/KuzRx/W+pD+eLZG7NLlm4t592mVwO+p9py330+UgS8JdNl+GJfq9QrK23Uo6FMaG/SoHO1qFd5J5RHdFO0QhCKj/BxSirayc0Jv4e04X7a8ssasIX19KpINiZO/kQZAhioumm7UXLo6cKn1nzPbPkZJ7efvKkauSMCkQgd/UZ07P3ZxgEYn9eU3KLohNq1HFxCoBsCwSXSqSkUAVRA0QAgJBUCeD/ZCuRi5icgbi7AT/OeiP0YXoi1o6aGqMIp5AQ3ysSOosJRuwSjbeZ1YgxonqVYATH1jJPg0fzyPASLGIx90UN8MmBxe/CXk0gNOrf3TTYYgdWErwB1lRcbb0fZvYfu/FDb3vp2tQjTrM/Q+qY= - skip_cleanup: true - overwrite: true - file_glob: true - file: bazel-bin/voidstar/voidstar-* - on: - tags: true +# - mv -v bazel-bin/voidstar/voidstar "bazel-bin/voidstar/voidstar-$(git describe --abbrev --dirty --always --tags)-$TRAVIS_OS_NAME-$(basename $CC)" +- cppcheck --error-exitcode=1 --enable=all -Ivoidstar/include/ voids tar/ diff --git a/BUILD b/BUILD index e69de29..d17d940 100644 --- a/BUILD +++ b/BUILD @@ -0,0 +1,2 @@ +licenses(["notice"]) +exports_files(["LICENSE"]) diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 2ab92dd..0000000 --- a/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM debian:9 -WORKDIR /app -COPY . $PWD -RUN set -x \ - && apt update \ - && apt install -y \ - x11-apps \ - libglew-dev libglm-dev libglfw3-dev pkg-config \ - libc++-dev clang cmake -RUN set -x \ - && ./configure \ - && cd build \ - && make -j7 -ENV DISPLAY :0 -ENTRYPOINT ["/app/build/voidstar"] diff --git a/Dockerfile.dev b/Dockerfile.dev deleted file mode 100644 index ccc8b66..0000000 --- a/Dockerfile.dev +++ /dev/null @@ -1,10 +0,0 @@ -FROM debian:9 -RUN set -x \ - && apt update \ - && apt install -y \ - x11-apps \ - libglew-dev libglm-dev libglfw3-dev pkg-config \ - libc++-dev clang cmake -ENV DISPLAY :0 -WORKDIR /app -ENTRYPOINT ["/bin/sh", "-c", "set -x && ./configure && cd build && make -j7 && ./voidstar ./voidstar ../data/*"] diff --git a/LOCKFILE.bzl b/LOCKFILE.bzl deleted file mode 100644 index 2edd373..0000000 --- a/LOCKFILE.bzl +++ /dev/null @@ -1,5 +0,0 @@ -locked = {} -locked["http_archive> tar.gz github.com/KhronosGroup/OpenGL-Registry "] = {"sha256": "e8ed826674eaac11cb74e256c7a5bd03ee5d9678949a69e312b52394484d0657", "url": "https://github.com/KhronosGroup/OpenGL-Registry/archive/4594c03239fb76580bc5d5a13acb2a8f563f0158.tar.gz"} -locked["http_archive> zip github.com/bazelbuild/rules_cc "] = {"sha256": "523c59bb3f16518679668594c8874da46872fde05c32ba246bc0a35ec292f8a6", "url": "https://github.com/bazelbuild/rules_cc/archive/34ca16f4aa4bf2a5d3e4747229202d6cb630ebab.zip"} -locked["http_archive> zip github.com/g-truc/glm "] = {"sha256": "cc5f92593be85d51fc243a4735a07898f010e32f7c1496822e8d78a3df651320", "url": "https://github.com/g-truc/glm/archive/efbfecab63da2adb2dc197f91270ff6221900740.zip"} -locked["http_archive> zip github.com/glfw/glfw "] = {"sha256": "d627cb439cece9ead0693659ced597e9775596a3b72c708ba04590520c7e8ca9", "url": "https://github.com/glfw/glfw/archive/e65de2941c056ee5833b4dab3db36b297b53aa14.zip"} diff --git a/README.md b/README.md index b6ca4c4..68644fe 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,8 @@ The actual file being represented below [is data/BigPictureBG.tga](http://www.do ## Usage ```shell -bazel build //voidstar -./bazel-bin/voidstar/voidstar --move ../data/* +bazel build voidstar +./bazel-bin/voidstar/voidstar --move bazel-bin/voidstar/voidstar data/* ``` ``` @@ -83,14 +83,13 @@ mv your/interesting/files/* data/ 1. Download one of the `osx` files of [the latest release](https://github.com/fenollp/voidstar/releases/latest) 1. Open Terminal.app (you can search for it in Spotlight) -1. Type `brew install glew` then press ENTER. This installs the GLEW dependency. 1. Type `chmod u+x ` then drag and drop the file you downloaded then press ENTER (now this file can be executed) 1. Now drag and drop your executable then drag a file you want to look at (e.g. `data/dragon.vox`) then press ENTER 1. A window should appear. Move your mouse and play with your keyboard's arrows. You should see some colored dots in 3D. ### on any Linux distribution -`sudo snap install voidstar` +`snap install voidstar` This relies on [snaps](https://snapcraft.io/docs/core/install). @@ -107,23 +106,5 @@ https://github.com/fenollp/voidstar/issues/2 ### Debian ```shell -sudo apt install libglew-dev +sudo apt-get install mesa-common-dev libegl1-mesa-dev libgles2-mesa-dev xorg-dev ``` - -### OSX - -```shell -brew install glew -``` - -### Web - -https://github.com/fenollp/voidstar/issues/9 - -### Android - -https://github.com/fenollp/voidstar/issues/7 - -### iOS - -https://github.com/fenollp/voidstar/issues/8 diff --git a/WORKSPACE b/WORKSPACE index 65e26d7..6c2e6ec 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -1,46 +1,64 @@ workspace(name = "voidstar") -load("@bazel_tools//tools/build_defs/repo:http.bzl", bare_http_archive = "http_archive") +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -bare_http_archive( - name = "bazel_lock", - # Locked on 2020-04-04 - sha256 = "ce1a1c3753b970419c8d5ea3e5afbc24ad62beacbb32c48672186c78411540f8", - strip_prefix = "bazel_lock-081217b3d17d9a8a817eb8fd4ec6058145126a2c", - type = "zip", - url = "https://github.com/fenollp/bazel_lock/archive/081217b3d17d9a8a817eb8fd4ec6058145126a2c.zip", +http_archive( + name = "bazel_upgradable", + strip_prefix = "bazel_upgradable-0.1.1", + url = "https://github.com/fenollp/bazel_upgradable/archive/0.1.1.zip", ) -load("@bazel_lock//rules:locked.bzl", "http_archive") -load("//:LOCKFILE.bzl", "locked") +load("@bazel_upgradable//:rule.bzl", "upgradable_repository") -http_archive( +upgradable_repository( name = "rules_cc", - locked = locked, - type = "zip", - upgrades_slug = "github.com/bazelbuild/rules_cc", + remote = "git://github.com/bazelbuild/rules_cc.git", ) -http_archive( +upgradable_repository( name = "khronos_opengl_registry", build_file = "@//third_party:gl.BUILD", - locked = locked, - type = "tar.gz", - upgrades_slug = "github.com/KhronosGroup/OpenGL-Registry", + remote = "git://github.com/KhronosGroup/OpenGL-Registry.git", ) -http_archive( +upgradable_repository( name = "glfw", build_file = "@//third_party:glfw3.BUILD", - locked = locked, - type = "zip", - upgrades_slug = "github.com/glfw/glfw", + remote = "git://github.com/glfw/glfw.git", ) -http_archive( - name = "com_github_gtruc_glm", +upgradable_repository( + name = "glfw_osx", + build_file = "@//third_party:glfw3_osx.BUILD", + release = "glfw-{tag_digits}.bin.MACOS.zip", + remote = "git://github.com/glfw/glfw.git", + strip_prefix = "glfw-{tag_digits}.bin.MACOS", + tag = "~3", +) + +upgradable_repository( + name = "glm", build_file = "@//third_party:glm.BUILD", - locked = locked, - type = "zip", - upgrades_slug = "github.com/g-truc/glm", + remote = "git://github.com/g-truc/glm.git", +) + +glew_version_constraint = "<=2" + +upgradable_repository( + name = "glew", + build_file = "@//third_party:glew.BUILD", + release = "{tag}.tgz", + remote = "git://github.com/nigels-com/glew.git", + strip_prefix = "glew-{tag_digits}", + tag = glew_version_constraint, + type = "tar.gz", +) + +upgradable_repository( + name = "glew_win64", + build_file = "@//third_party:glew_win64.BUILD", + release = "{tag}-win32.zip", + remote = "git://github.com/nigels-com/glew.git", + strip_prefix = "glew-{tag_digits}", + tag = glew_version_constraint, ) diff --git a/docker-dev.sh b/docker-dev.sh deleted file mode 100755 index ec7d014..0000000 --- a/docker-dev.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -#$ docker build -f Dockerfile.dev -t voiddev . - -# https://stackoverflow.com/a/25168483/1418165 - -XSOCK=/tmp/.X11-unix -XAUTH=/tmp/.docker.xauth -xauth nlist :0 | sed -e 's/^..../ffff/' | xauth -f $XAUTH nmerge - - -docker run --rm -it \ - -v $XSOCK:$XSOCK \ - -v $XAUTH:$XAUTH \ - -v /dev/input \ - -v "$PWD":/app \ - -e XAUTHORITY=$XAUTH \ - voiddev diff --git a/docker.sh b/docker.sh deleted file mode 100755 index f12fdfd..0000000 --- a/docker.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -# https://stackoverflow.com/a/25168483/1418165 - -XSOCK=/tmp/.X11-unix -XAUTH=/tmp/.docker.xauth -xauth nlist :0 | sed -e 's/^..../ffff/' | xauth -f $XAUTH nmerge - - -docker run --rm -it \ - -v $XSOCK:$XSOCK \ - -v $XAUTH:$XAUTH \ - -v /dev/input \ - -e XAUTHORITY=$XAUTH \ - void \ - /app/build/voidstar diff --git a/hacking/BUILD b/hacking/BUILD index a0127a0..fcd59de 100644 --- a/hacking/BUILD +++ b/hacking/BUILD @@ -2,17 +2,13 @@ load("@rules_cc//cc:defs.bzl", "cc_binary") package(default_visibility = ["//visibility:public"]) -# For glfw3: -# sudo apt install libgl1-mesa-dev xorg-dev -# For glew: -# sudo apt install libglew-dev - cc_binary( name = "argh", srcs = ["argh.cc"], - linkopts = ["-lGLEW"], deps = [ - "@glfw", + "//third_party:glew", + "//third_party:glfw", + "@glm", "@khronos_opengl_registry//:gl_headers", ], ) diff --git a/hacking/argh.cc b/hacking/argh.cc index b65be84..7efbabb 100644 --- a/hacking/argh.cc +++ b/hacking/argh.cc @@ -1,13 +1,12 @@ #include #include -#include #include #include #include -#define GLEW_STATIC -#include - +#include "GL/glew.h" +#include "glm/gtc/matrix_transform.hpp" +// #include "include/GLFW/glfw3.h" using Floats = std::vector; @@ -438,7 +437,8 @@ int main(int argc, const char* argv[]) { glUseProgram(shaderProgram); glBindVertexArray(VAO); glDrawArrays(GL_POINTS, 0, POINTS); - // std::cerr << "#elements: " << elements.size() << " " << elements[0] << "-" + // std::cerr << "#elements: " << elements.size() << " " << elements[0] << + // "-" // << elements.back() << std::endl; // glDrawRangeElements(GL_POINTS, elements[0], elements.back(), // elements.size(), GL_UNSIGNED_INT, &elements[0]); diff --git a/resolved.bzl b/resolved.bzl new file mode 100644 index 0000000..33b7b2b --- /dev/null +++ b/resolved.bzl @@ -0,0 +1,1111 @@ +resolved = [ + { + "original_rule_class": "bind", + "original_attributes": { + "name": "android/crosstool", + "actual": "@bazel_tools//tools/cpp:toolchain" + }, + "native": "bind(name = \"android/crosstool\", actual = \"@bazel_tools//tools/cpp:toolchain\")" + }, + { + "original_rule_class": "bind", + "original_attributes": { + "name": "android/d8_jar_import", + "actual": "@bazel_tools//tools/android:no_android_sdk_repository_error" + }, + "native": "bind(name = \"android/d8_jar_import\", actual = \"@bazel_tools//tools/android:no_android_sdk_repository_error\")" + }, + { + "original_rule_class": "bind", + "original_attributes": { + "name": "android/dx_jar_import", + "actual": "@bazel_tools//tools/android:no_android_sdk_repository_error" + }, + "native": "bind(name = \"android/dx_jar_import\", actual = \"@bazel_tools//tools/android:no_android_sdk_repository_error\")" + }, + { + "original_rule_class": "bind", + "original_attributes": { + "name": "android/sdk", + "actual": "@bazel_tools//tools/android:poison_pill_android_sdk" + }, + "native": "bind(name = \"android/sdk\", actual = \"@bazel_tools//tools/android:poison_pill_android_sdk\")" + }, + { + "original_rule_class": "bind", + "original_attributes": { + "name": "android_ndk_for_testing", + "actual": "//:dummy" + }, + "native": "bind(name = \"android_ndk_for_testing\", actual = \"//:dummy\")" + }, + { + "original_rule_class": "bind", + "original_attributes": { + "name": "android_sdk_for_testing", + "actual": "//:dummy" + }, + "native": "bind(name = \"android_sdk_for_testing\", actual = \"//:dummy\")" + }, + { + "original_rule_class": "local_repository", + "original_attributes": { + "name": "bazel_tools", + "path": "/home/pete/.cache/bazel/_bazel_pete/install/f439a981a1e06f45be981c123f9858d5/embedded_tools" + }, + "native": "local_repository(name = \"bazel_tools\", path = __embedded_dir__ + \"/\" + \"embedded_tools\")" + }, + { + "original_rule_class": "bind", + "original_attributes": { + "name": "cc_toolchain", + "actual": "@local_config_cc//:toolchain" + }, + "native": "bind(name = \"cc_toolchain\", actual = \"@local_config_cc//:toolchain\")" + }, + { + "original_rule_class": "bind", + "original_attributes": { + "name": "databinding_annotation_processor", + "actual": "@bazel_tools//tools/android:empty" + }, + "native": "bind(name = \"databinding_annotation_processor\", actual = \"@bazel_tools//tools/android:empty\")" + }, + { + "original_rule_class": "bind", + "original_attributes": { + "name": "has_androidsdk", + "actual": "@bazel_tools//tools/android:always_false" + }, + "native": "bind(name = \"has_androidsdk\", actual = \"@bazel_tools//tools/android:always_false\")" + }, + { + "original_rule_class": "local_repository", + "original_attributes": { + "name": "voidstar", + "path": "." + }, + "native": "local_repository(name = \"voidstar\", path = \".\")" + }, + { + "original_rule_class": "@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "original_attributes": { + "name": "bazel_upgradable", + "url": "https://github.com/fenollp/bazel_upgradable/archive/0.1.1.zip", + "strip_prefix": "bazel_upgradable-0.1.1" + }, + "repositories": [ + { + "rule_class": "@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://github.com/fenollp/bazel_upgradable/archive/0.1.1.zip", + "urls": [], + "sha256": "55ebd3df408f239f59f4a7c8e97130c4ea16809372bd49b8fa0a5b8574f32455", + "netrc": "", + "auth_patterns": {}, + "canonical_id": "", + "strip_prefix": "bazel_upgradable-0.1.1", + "type": "", + "patches": [], + "patch_tool": "", + "patch_args": [ + "-p0" + ], + "patch_cmds": [], + "patch_cmds_win": [], + "build_file_content": "", + "workspace_file_content": "", + "name": "bazel_upgradable" + }, + "output_tree_hash": "a4dcfba962ce40b9029ae4ee611273e7bb567e3ec973f83f700b4cef8352dae8" + } + ] + }, + { + "original_rule_class": "@bazel_upgradable//:rule.bzl%upgradable_repository", + "original_attributes": { + "name": "glew", + "build_file": "//third_party:glew.BUILD", + "release": "{tag}.tgz", + "remote": "git://github.com/nigels-com/glew.git", + "strip_prefix": "glew-{tag_digits}", + "tag": "<=2", + "type": "tar.gz" + }, + "repositories": [ + { + "rule_class": "@bazel_upgradable//:rule.bzl%upgradable_repository", + "attributes": { + "netrc": "", + "auth_patterns": {}, + "canonical_id": "", + "patches": [], + "patch_tool": "", + "patch_args": [ + "-p0" + ], + "patch_cmds": [], + "patch_cmds_win": [], + "build_file": "//third_party:glew.BUILD", + "build_file_content": "", + "workspace_file_content": "", + "branch": "", + "release": "{tag}.tgz", + "remote": "git://github.com/nigels-com/glew.git", + "sha256": "04de91e7e6763039bc11940095cd9c7f880baba82196a7765f727ac05a993c95", + "strip_prefix": "glew-2.1.0", + "tag": "<=2", + "type": "tar.gz", + "urls": [ + "https://github.com/nigels-com/glew/releases/download/glew-2.1.0/glew-2.1.0.tgz" + ], + "name": "glew" + }, + "output_tree_hash": "f79fc7ceaa4bad7e02da40557fa5e95882317ef0ea85453980050213771f1f5c" + } + ] + }, + { + "original_rule_class": "@bazel_upgradable//:rule.bzl%upgradable_repository", + "original_attributes": { + "name": "glew_win64", + "build_file": "//third_party:glew_win64.BUILD", + "release": "{tag}-win32.zip", + "remote": "git://github.com/nigels-com/glew.git", + "strip_prefix": "glew-{tag_digits}", + "tag": "<=2" + }, + "repositories": [ + { + "rule_class": "@bazel_upgradable//:rule.bzl%upgradable_repository", + "attributes": { + "netrc": "", + "auth_patterns": {}, + "canonical_id": "", + "patches": [], + "patch_tool": "", + "patch_args": [ + "-p0" + ], + "patch_cmds": [], + "patch_cmds_win": [], + "build_file": "//third_party:glew_win64.BUILD", + "build_file_content": "", + "workspace_file_content": "", + "branch": "", + "release": "{tag}-win32.zip", + "remote": "git://github.com/nigels-com/glew.git", + "sha256": "80cfc88fd295426b49001a9dc521da793f8547ac10aebfc8bdc91ddc06c5566c", + "strip_prefix": "glew-2.1.0", + "tag": "<=2", + "type": "zip", + "urls": [ + "https://github.com/nigels-com/glew/releases/download/glew-2.1.0/glew-2.1.0-win32.zip" + ], + "name": "glew_win64" + }, + "output_tree_hash": "73848204f8734716c63d44190227fa2285b74d830ea2ef7eb9db168949ac0cc4" + } + ] + }, + { + "original_rule_class": "@bazel_upgradable//:rule.bzl%upgradable_repository", + "original_attributes": { + "name": "glfw", + "build_file": "//third_party:glfw3.BUILD", + "remote": "git://github.com/glfw/glfw.git" + }, + "repositories": [ + { + "rule_class": "@bazel_upgradable//:rule.bzl%upgradable_repository", + "attributes": { + "netrc": "", + "auth_patterns": {}, + "canonical_id": "", + "patches": [], + "patch_tool": "", + "patch_args": [ + "-p0" + ], + "patch_cmds": [], + "patch_cmds_win": [], + "build_file": "//third_party:glfw3.BUILD", + "build_file_content": "", + "workspace_file_content": "", + "branch": "", + "release": "", + "remote": "git://github.com/glfw/glfw.git", + "sha256": "b617867a824f7d7d284b7874eca720070d6670f5218b5723bb0c334dddeeac81", + "strip_prefix": "glfw-cab41529da42f46dc6d6aec159a9b8d1d1331652", + "tag": "", + "type": "tar.gz", + "urls": [ + "https://github.com/glfw/glfw/archive/cab41529da42f46dc6d6aec159a9b8d1d1331652.tar.gz" + ], + "name": "glfw" + }, + "output_tree_hash": "68ae54ef893d3b0972d4bf0bbdaac67c2d1838288454613b6649fd4bd6172e5d" + } + ] + }, + { + "original_rule_class": "@bazel_upgradable//:rule.bzl%upgradable_repository", + "original_attributes": { + "name": "glfw_osx", + "build_file": "//third_party:glfw3_osx.BUILD", + "release": "glfw-{tag_digits}.bin.MACOS.zip", + "remote": "git://github.com/glfw/glfw.git", + "strip_prefix": "glfw-{tag_digits}.bin.MACOS", + "tag": "~3" + }, + "repositories": [ + { + "rule_class": "@bazel_upgradable//:rule.bzl%upgradable_repository", + "attributes": { + "netrc": "", + "auth_patterns": {}, + "canonical_id": "", + "patches": [], + "patch_tool": "", + "patch_args": [ + "-p0" + ], + "patch_cmds": [], + "patch_cmds_win": [], + "build_file": "//third_party:glfw3_osx.BUILD", + "build_file_content": "", + "workspace_file_content": "", + "branch": "", + "release": "glfw-{tag_digits}.bin.MACOS.zip", + "remote": "git://github.com/glfw/glfw.git", + "sha256": "e412c75f850c320192df491ec3bf623847fafa847b46ffd3bbd7478057148f5a", + "strip_prefix": "glfw-3.3.2.bin.MACOS", + "tag": "~3", + "type": "zip", + "urls": [ + "https://github.com/glfw/glfw/releases/download/3.3.2/glfw-3.3.2.bin.MACOS.zip" + ], + "name": "glfw_osx" + }, + "output_tree_hash": "1d14d142ffc28377df0e16987d269135c77bd9625053a8f9a8a10501c5236c69" + } + ] + }, + { + "original_rule_class": "@bazel_upgradable//:rule.bzl%upgradable_repository", + "original_attributes": { + "name": "glm", + "build_file": "//third_party:glm.BUILD", + "remote": "git://github.com/g-truc/glm.git" + }, + "repositories": [ + { + "rule_class": "@bazel_upgradable//:rule.bzl%upgradable_repository", + "attributes": { + "netrc": "", + "auth_patterns": {}, + "canonical_id": "", + "patches": [], + "patch_tool": "", + "patch_args": [ + "-p0" + ], + "patch_cmds": [], + "patch_cmds_win": [], + "build_file": "//third_party:glm.BUILD", + "build_file_content": "", + "workspace_file_content": "", + "branch": "", + "release": "", + "remote": "git://github.com/g-truc/glm.git", + "sha256": "3d93ee844f51749a5da88363460fe822cf14a706ef3a0054ca056e79f4c28548", + "strip_prefix": "glm-7574b172e989c00b5cf3141e948d91e2011f1f8a", + "tag": "", + "type": "tar.gz", + "urls": [ + "https://github.com/g-truc/glm/archive/7574b172e989c00b5cf3141e948d91e2011f1f8a.tar.gz" + ], + "name": "glm" + }, + "output_tree_hash": "6e7684f006ed5da339604822238017c62457d769a748d02125d7c496e112983d" + } + ] + }, + { + "original_rule_class": "@bazel_upgradable//:rule.bzl%upgradable_repository", + "original_attributes": { + "name": "khronos_opengl_registry", + "build_file": "//third_party:gl.BUILD", + "remote": "git://github.com/KhronosGroup/OpenGL-Registry.git" + }, + "repositories": [ + { + "rule_class": "@bazel_upgradable//:rule.bzl%upgradable_repository", + "attributes": { + "netrc": "", + "auth_patterns": {}, + "canonical_id": "", + "patches": [], + "patch_tool": "", + "patch_args": [ + "-p0" + ], + "patch_cmds": [], + "patch_cmds_win": [], + "build_file": "//third_party:gl.BUILD", + "build_file_content": "", + "workspace_file_content": "", + "branch": "", + "release": "", + "remote": "git://github.com/KhronosGroup/OpenGL-Registry.git", + "sha256": "3655db73a88ff1a32f8f3a56f3a4bc1fd936cb91957a40c1989f291ddaf0bb9d", + "strip_prefix": "OpenGL-Registry-03e1bfb87c4664d34dc7822fb591841eec747094", + "tag": "", + "type": "tar.gz", + "urls": [ + "https://github.com/KhronosGroup/OpenGL-Registry/archive/03e1bfb87c4664d34dc7822fb591841eec747094.tar.gz" + ], + "name": "khronos_opengl_registry" + }, + "output_tree_hash": "a61bbd8ffc9952a06d919d9d75c8ddf9b2e8b045d980be7b72ea74f25e32fd6c" + } + ] + }, + { + "original_rule_class": "@bazel_upgradable//:rule.bzl%upgradable_repository", + "original_attributes": { + "name": "rules_cc", + "remote": "git://github.com/bazelbuild/rules_cc.git" + }, + "repositories": [ + { + "rule_class": "@bazel_upgradable//:rule.bzl%upgradable_repository", + "attributes": { + "netrc": "", + "auth_patterns": {}, + "canonical_id": "", + "patches": [], + "patch_tool": "", + "patch_args": [ + "-p0" + ], + "patch_cmds": [], + "patch_cmds_win": [], + "build_file_content": "", + "workspace_file_content": "", + "branch": "", + "release": "", + "remote": "git://github.com/bazelbuild/rules_cc.git", + "sha256": "abe679f9a6513a72d73f09f96318b0060770fdc93695a6cd766550b492ce6ef1", + "strip_prefix": "rules_cc-4c3e410486a078d6492baeaebb406ce4d20e3164", + "tag": "", + "type": "tar.gz", + "urls": [ + "https://github.com/bazelbuild/rules_cc/archive/4c3e410486a078d6492baeaebb406ce4d20e3164.tar.gz" + ], + "name": "rules_cc" + }, + "output_tree_hash": "5c38d1024465f121d126bb85c550718de8127998d0988bdb6010559e556030f6" + } + ] + }, + { + "original_rule_class": "@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "original_attributes": { + "name": "remote_coverage_tools", + "urls": [ + "https://mirror.bazel.build/bazel_coverage_output_generator/releases/coverage_output_generator-v2.1.zip" + ], + "sha256": "96ac6bc9b9fbc67b532bcae562da1642409791e6a4b8e522f04946ee5cc3ff8e" + }, + "repositories": [ + { + "rule_class": "@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "", + "urls": [ + "https://mirror.bazel.build/bazel_coverage_output_generator/releases/coverage_output_generator-v2.1.zip" + ], + "sha256": "96ac6bc9b9fbc67b532bcae562da1642409791e6a4b8e522f04946ee5cc3ff8e", + "netrc": "", + "auth_patterns": {}, + "canonical_id": "", + "strip_prefix": "", + "type": "", + "patches": [], + "patch_tool": "", + "patch_args": [ + "-p0" + ], + "patch_cmds": [], + "patch_cmds_win": [], + "build_file_content": "", + "workspace_file_content": "", + "name": "remote_coverage_tools" + }, + "output_tree_hash": "a021aeb7dfe67e7a2bb584ae6cfaaff48068b302c3b972d0d5a2cb068640531b" + } + ] + }, + { + "original_rule_class": "bind", + "original_attributes": { + "name": "bootclasspath", + "actual": "@local_jdk//:bootclasspath" + }, + "native": "bind(name = \"bootclasspath\", actual = \"@local_jdk//:bootclasspath\")" + }, + { + "original_rule_class": "bind", + "original_attributes": { + "name": "extclasspath", + "actual": "@local_jdk//:extdir" + }, + "native": "bind(name = \"extclasspath\", actual = \"@local_jdk//:extdir\")" + }, + { + "original_rule_class": "bind", + "original_attributes": { + "name": "extdir", + "actual": "@local_jdk//:extdir" + }, + "native": "bind(name = \"extdir\", actual = \"@local_jdk//:extdir\")" + }, + { + "original_rule_class": "bind", + "original_attributes": { + "name": "jar", + "actual": "@local_jdk//:jar" + }, + "native": "bind(name = \"jar\", actual = \"@local_jdk//:jar\")" + }, + { + "original_rule_class": "bind", + "original_attributes": { + "name": "java", + "actual": "@local_jdk//:java" + }, + "native": "bind(name = \"java\", actual = \"@local_jdk//:java\")" + }, + { + "original_rule_class": "bind", + "original_attributes": { + "name": "javac", + "actual": "@local_jdk//:javac" + }, + "native": "bind(name = \"javac\", actual = \"@local_jdk//:javac\")" + }, + { + "original_rule_class": "bind", + "original_attributes": { + "name": "jdk", + "actual": "@local_jdk//:jdk" + }, + "native": "bind(name = \"jdk\", actual = \"@local_jdk//:jdk\")" + }, + { + "original_rule_class": "bind", + "original_attributes": { + "name": "jdk-default", + "actual": "@local_jdk//:jdk" + }, + "native": "bind(name = \"jdk-default\", actual = \"@local_jdk//:jdk\")" + }, + { + "original_rule_class": "bind", + "original_attributes": { + "name": "jni_header", + "actual": "@local_jdk//:jni_header" + }, + "native": "bind(name = \"jni_header\", actual = \"@local_jdk//:jni_header\")" + }, + { + "original_rule_class": "bind", + "original_attributes": { + "name": "jni_md_header-darwin", + "actual": "@local_jdk//:jni_md_header-darwin" + }, + "native": "bind(name = \"jni_md_header-darwin\", actual = \"@local_jdk//:jni_md_header-darwin\")" + }, + { + "original_rule_class": "bind", + "original_attributes": { + "name": "jni_md_header-freebsd", + "actual": "@local_jdk//:jni_md_header-freebsd" + }, + "native": "bind(name = \"jni_md_header-freebsd\", actual = \"@local_jdk//:jni_md_header-freebsd\")" + }, + { + "original_rule_class": "bind", + "original_attributes": { + "name": "jni_md_header-linux", + "actual": "@local_jdk//:jni_md_header-linux" + }, + "native": "bind(name = \"jni_md_header-linux\", actual = \"@local_jdk//:jni_md_header-linux\")" + }, + { + "original_rule_class": "bind", + "original_attributes": { + "name": "jni_md_header-openbsd", + "actual": "@local_jdk//:jni_md_header-openbsd" + }, + "native": "bind(name = \"jni_md_header-openbsd\", actual = \"@local_jdk//:jni_md_header-openbsd\")" + }, + { + "original_rule_class": "bind", + "original_attributes": { + "name": "jre", + "actual": "@local_jdk//:jre" + }, + "native": "bind(name = \"jre\", actual = \"@local_jdk//:jre\")" + }, + { + "original_rule_class": "bind", + "original_attributes": { + "name": "jre-default", + "actual": "@local_jdk//:jre" + }, + "native": "bind(name = \"jre-default\", actual = \"@local_jdk//:jre\")" + }, + { + "original_rule_class": "new_local_repository", + "original_attributes": { + "name": "local_jdk", + "path": "", + "build_file": "/home/pete/.cache/bazel/_bazel_pete/install/f439a981a1e06f45be981c123f9858d5/jdk.BUILD" + }, + "native": "new_local_repository(name = \"local_jdk\", path = \"\", build_file = __embedded_dir__ + \"/\" + \"jdk.BUILD\")" + }, + { + "original_rule_class": "@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "original_attributes": { + "name": "remote_java_tools_darwin", + "generator_name": "remote_java_tools_darwin", + "generator_function": "maybe", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v8.0/java_tools_javac11_darwin-v8.0.zip", + "https://github.com/bazelbuild/java_tools/releases/download/javac11_v8.0/java_tools_javac11_darwin-v8.0.zip" + ], + "sha256": "e0291e8956ac295143da4a673ca50727f7376665ee82b649a4ee810b64ff76c1" + }, + "repositories": [ + { + "rule_class": "@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v8.0/java_tools_javac11_darwin-v8.0.zip", + "https://github.com/bazelbuild/java_tools/releases/download/javac11_v8.0/java_tools_javac11_darwin-v8.0.zip" + ], + "sha256": "e0291e8956ac295143da4a673ca50727f7376665ee82b649a4ee810b64ff76c1", + "netrc": "", + "auth_patterns": {}, + "canonical_id": "", + "strip_prefix": "", + "type": "", + "patches": [], + "patch_tool": "", + "patch_args": [ + "-p0" + ], + "patch_cmds": [], + "patch_cmds_win": [], + "build_file_content": "", + "workspace_file_content": "", + "name": "remote_java_tools_darwin" + }, + "output_tree_hash": "e1494f2430a8d725c7386b148acf1f65c9f9bc2b2e1369831c309db7257fc6f0" + } + ] + }, + { + "original_rule_class": "@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "original_attributes": { + "name": "remote_java_tools_linux", + "generator_name": "remote_java_tools_linux", + "generator_function": "maybe", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v8.0/java_tools_javac11_linux-v8.0.zip", + "https://github.com/bazelbuild/java_tools/releases/download/javac11_v8.0/java_tools_javac11_linux-v8.0.zip" + ], + "sha256": "c24aef916cc5a8e9f6d53db1f93c54fe5790a58996a1099592e1dfe992acc81e" + }, + "repositories": [ + { + "rule_class": "@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v8.0/java_tools_javac11_linux-v8.0.zip", + "https://github.com/bazelbuild/java_tools/releases/download/javac11_v8.0/java_tools_javac11_linux-v8.0.zip" + ], + "sha256": "c24aef916cc5a8e9f6d53db1f93c54fe5790a58996a1099592e1dfe992acc81e", + "netrc": "", + "auth_patterns": {}, + "canonical_id": "", + "strip_prefix": "", + "type": "", + "patches": [], + "patch_tool": "", + "patch_args": [ + "-p0" + ], + "patch_cmds": [], + "patch_cmds_win": [], + "build_file_content": "", + "workspace_file_content": "", + "name": "remote_java_tools_linux" + }, + "output_tree_hash": "61010b7dba00e61e471de4ce70caf0e57b1e4508b2bbf5e4fa81bec90045de53" + } + ] + }, + { + "original_rule_class": "@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "original_attributes": { + "name": "remote_java_tools_windows", + "generator_name": "remote_java_tools_windows", + "generator_function": "maybe", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v8.0/java_tools_javac11_windows-v8.0.zip", + "https://github.com/bazelbuild/java_tools/releases/download/javac11_v8.0/java_tools_javac11_windows-v8.0.zip" + ], + "sha256": "444c391977e50af4e10549a28d021069d2ca7745a0e7b9b968a7b153fe3ea430" + }, + "repositories": [ + { + "rule_class": "@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v8.0/java_tools_javac11_windows-v8.0.zip", + "https://github.com/bazelbuild/java_tools/releases/download/javac11_v8.0/java_tools_javac11_windows-v8.0.zip" + ], + "sha256": "444c391977e50af4e10549a28d021069d2ca7745a0e7b9b968a7b153fe3ea430", + "netrc": "", + "auth_patterns": {}, + "canonical_id": "", + "strip_prefix": "", + "type": "", + "patches": [], + "patch_tool": "", + "patch_args": [ + "-p0" + ], + "patch_cmds": [], + "patch_cmds_win": [], + "build_file_content": "", + "workspace_file_content": "", + "name": "remote_java_tools_windows" + }, + "output_tree_hash": "9dda84c2aab258115c3c074127a465640a2c493e02c0ad56a4b4f80eedc4dfb0" + } + ] + }, + { + "original_rule_class": "@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "original_attributes": { + "name": "remotejdk11_linux", + "generator_name": "remotejdk11_linux", + "generator_function": "maybe", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-linux_x64.tar.gz" + ], + "sha256": "360626cc19063bc411bfed2914301b908a8f77a7919aaea007a977fa8fb3cde1", + "strip_prefix": "zulu11.37.17-ca-jdk11.0.6-linux_x64", + "build_file": "@local_jdk//:BUILD.bazel" + }, + "repositories": [ + { + "rule_class": "@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-linux_x64.tar.gz" + ], + "sha256": "360626cc19063bc411bfed2914301b908a8f77a7919aaea007a977fa8fb3cde1", + "netrc": "", + "auth_patterns": {}, + "canonical_id": "", + "strip_prefix": "zulu11.37.17-ca-jdk11.0.6-linux_x64", + "type": "", + "patches": [], + "patch_tool": "", + "patch_args": [ + "-p0" + ], + "patch_cmds": [], + "patch_cmds_win": [], + "build_file": "@local_jdk//:BUILD.bazel", + "build_file_content": "", + "workspace_file_content": "", + "name": "remotejdk11_linux" + }, + "output_tree_hash": "564e955d13b4964a9e290728fa27ac50b2578f552868bbe39217013e4a562b98" + } + ] + }, + { + "original_rule_class": "@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "original_attributes": { + "name": "remotejdk11_linux_aarch64", + "generator_name": "remotejdk11_linux_aarch64", + "generator_function": "maybe", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.37.48-ca-jdk11.0.6/zulu11.37.48-ca-jdk11.0.6-linux_aarch64.tar.gz" + ], + "sha256": "a452f1b9682d9f83c1c14e54d1446e1c51b5173a3a05dcb013d380f9508562e4", + "strip_prefix": "zulu11.37.48-ca-jdk11.0.6-linux_aarch64", + "build_file": "@local_jdk//:BUILD.bazel" + }, + "repositories": [ + { + "rule_class": "@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.37.48-ca-jdk11.0.6/zulu11.37.48-ca-jdk11.0.6-linux_aarch64.tar.gz" + ], + "sha256": "a452f1b9682d9f83c1c14e54d1446e1c51b5173a3a05dcb013d380f9508562e4", + "netrc": "", + "auth_patterns": {}, + "canonical_id": "", + "strip_prefix": "zulu11.37.48-ca-jdk11.0.6-linux_aarch64", + "type": "", + "patches": [], + "patch_tool": "", + "patch_args": [ + "-p0" + ], + "patch_cmds": [], + "patch_cmds_win": [], + "build_file": "@local_jdk//:BUILD.bazel", + "build_file_content": "", + "workspace_file_content": "", + "name": "remotejdk11_linux_aarch64" + }, + "output_tree_hash": "c8558b88d3038b9056e820ed11e3c0ceed2d102fa67e375970875ed485c7252c" + } + ] + }, + { + "original_rule_class": "@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "original_attributes": { + "name": "remotejdk11_macos", + "generator_name": "remotejdk11_macos", + "generator_function": "maybe", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-macosx_x64.tar.gz" + ], + "sha256": "e1fe56769f32e2aaac95e0a8f86b5a323da5af3a3b4bba73f3086391a6cc056f", + "strip_prefix": "zulu11.37.17-ca-jdk11.0.6-macosx_x64", + "build_file": "@local_jdk//:BUILD.bazel" + }, + "repositories": [ + { + "rule_class": "@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-macosx_x64.tar.gz" + ], + "sha256": "e1fe56769f32e2aaac95e0a8f86b5a323da5af3a3b4bba73f3086391a6cc056f", + "netrc": "", + "auth_patterns": {}, + "canonical_id": "", + "strip_prefix": "zulu11.37.17-ca-jdk11.0.6-macosx_x64", + "type": "", + "patches": [], + "patch_tool": "", + "patch_args": [ + "-p0" + ], + "patch_cmds": [], + "patch_cmds_win": [], + "build_file": "@local_jdk//:BUILD.bazel", + "build_file_content": "", + "workspace_file_content": "", + "name": "remotejdk11_macos" + }, + "output_tree_hash": "7ab7a00a16b43325d9c87ba37e51e3f64ddc8acb8e1ccc0299ffa131470bbfe4" + } + ] + }, + { + "original_rule_class": "@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "original_attributes": { + "name": "remotejdk11_win", + "generator_name": "remotejdk11_win", + "generator_function": "maybe", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64.zip" + ], + "sha256": "a9695617b8374bfa171f166951214965b1d1d08f43218db9a2a780b71c665c18", + "strip_prefix": "zulu11.37.17-ca-jdk11.0.6-win_x64", + "build_file": "@local_jdk//:BUILD.bazel" + }, + "repositories": [ + { + "rule_class": "@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64.zip" + ], + "sha256": "a9695617b8374bfa171f166951214965b1d1d08f43218db9a2a780b71c665c18", + "netrc": "", + "auth_patterns": {}, + "canonical_id": "", + "strip_prefix": "zulu11.37.17-ca-jdk11.0.6-win_x64", + "type": "", + "patches": [], + "patch_tool": "", + "patch_args": [ + "-p0" + ], + "patch_cmds": [], + "patch_cmds_win": [], + "build_file": "@local_jdk//:BUILD.bazel", + "build_file_content": "", + "workspace_file_content": "", + "name": "remotejdk11_win" + }, + "output_tree_hash": "5aee9a49df795a67a19a36d839cf96b33209237e0aff14b887a0872143ba67e7" + } + ] + }, + { + "original_rule_class": "@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "original_attributes": { + "name": "rules_java", + "generator_name": "rules_java", + "generator_function": "maybe", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip", + "https://github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip" + ], + "sha256": "bc81f1ba47ef5cc68ad32225c3d0e70b8c6f6077663835438da8d5733f917598", + "strip_prefix": "rules_java-7cf3cefd652008d0a64a419c34c13bdca6c8f178" + }, + "repositories": [ + { + "rule_class": "@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip", + "https://github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip" + ], + "sha256": "bc81f1ba47ef5cc68ad32225c3d0e70b8c6f6077663835438da8d5733f917598", + "netrc": "", + "auth_patterns": {}, + "canonical_id": "", + "strip_prefix": "rules_java-7cf3cefd652008d0a64a419c34c13bdca6c8f178", + "type": "", + "patches": [], + "patch_tool": "", + "patch_args": [ + "-p0" + ], + "patch_cmds": [], + "patch_cmds_win": [], + "build_file_content": "", + "workspace_file_content": "", + "name": "rules_java" + }, + "output_tree_hash": "00a0f1231dacff0b0cea3886200e0158c67a3600068275da14120f5434f83b5e" + } + ] + }, + { + "original_rule_class": "@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "original_attributes": { + "name": "rules_proto", + "generator_name": "rules_proto", + "generator_function": "maybe", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz", + "https://github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz" + ], + "sha256": "602e7161d9195e50246177e7c55b2f39950a9cf7366f74ed5f22fd45750cd208", + "strip_prefix": "rules_proto-97d8af4dc474595af3900dd85cb3a29ad28cc313" + }, + "repositories": [ + { + "rule_class": "@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz", + "https://github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz" + ], + "sha256": "602e7161d9195e50246177e7c55b2f39950a9cf7366f74ed5f22fd45750cd208", + "netrc": "", + "auth_patterns": {}, + "canonical_id": "", + "strip_prefix": "rules_proto-97d8af4dc474595af3900dd85cb3a29ad28cc313", + "type": "", + "patches": [], + "patch_tool": "", + "patch_args": [ + "-p0" + ], + "patch_cmds": [], + "patch_cmds_win": [], + "build_file_content": "", + "workspace_file_content": "", + "name": "rules_proto" + }, + "output_tree_hash": "4f74a84e9684fc73c48656a9a6c60bdfaed2cabdf5dc7d21da7ae2ee78c7efa3" + } + ] + }, + { + "original_rule_class": "@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "original_attributes": { + "name": "android_tools", + "url": "https://mirror.bazel.build/bazel_android_tools/android_tools_pkg-0.16.0.tar.gz", + "sha256": "e2cbd43a9d23aa32197c29d689a7e017f205acb07053f5dd584f500a1a9d4361" + }, + "repositories": [ + { + "rule_class": "@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://mirror.bazel.build/bazel_android_tools/android_tools_pkg-0.16.0.tar.gz", + "urls": [], + "sha256": "e2cbd43a9d23aa32197c29d689a7e017f205acb07053f5dd584f500a1a9d4361", + "netrc": "", + "auth_patterns": {}, + "canonical_id": "", + "strip_prefix": "", + "type": "", + "patches": [], + "patch_tool": "", + "patch_args": [ + "-p0" + ], + "patch_cmds": [], + "patch_cmds_win": [], + "build_file_content": "", + "workspace_file_content": "", + "name": "android_tools" + }, + "output_tree_hash": "563abe0b4c8e7d52b6dc007fe723b3c0393790818e96a313b447c3e32270e2c6" + } + ] + }, + { + "original_rule_class": "local_config_platform", + "original_attributes": { + "name": "local_config_platform" + }, + "native": "local_config_platform(name = 'local_config_platform')" + }, + { + "original_rule_class": "local_repository", + "original_attributes": { + "name": "platforms", + "path": "/home/pete/.cache/bazel/_bazel_pete/install/f439a981a1e06f45be981c123f9858d5/platforms" + }, + "native": "local_repository(name = \"platforms\", path = __embedded_dir__ + \"/\" + \"platforms\")" + }, + { + "original_rule_class": "@bazel_tools//tools/osx:xcode_configure.bzl%xcode_autoconf", + "original_attributes": { + "name": "local_config_xcode", + "generator_name": "local_config_xcode", + "generator_function": "xcode_configure", + "xcode_locator": "@bazel_tools//tools/osx:xcode_locator.m" + }, + "repositories": [ + { + "rule_class": "@bazel_tools//tools/osx:xcode_configure.bzl%xcode_autoconf", + "attributes": { + "name": "local_config_xcode", + "generator_name": "local_config_xcode", + "generator_function": "xcode_configure", + "xcode_locator": "@bazel_tools//tools/osx:xcode_locator.m" + }, + "output_tree_hash": "ec026961157bb71cf68d1b568815ad68147ed16f318161bc0da40f6f3d7d79fd" + } + ] + }, + { + "original_rule_class": "@bazel_tools//tools/sh:sh_configure.bzl%sh_config", + "original_attributes": { + "name": "local_config_sh", + "generator_name": "local_config_sh", + "generator_function": "sh_configure" + }, + "repositories": [ + { + "rule_class": "@bazel_tools//tools/sh:sh_configure.bzl%sh_config", + "attributes": { + "name": "local_config_sh", + "generator_name": "local_config_sh", + "generator_function": "sh_configure" + }, + "output_tree_hash": "7bf5ba89669bcdf4526f821bc9f1f9f49409ae9c61c4e8f21c9f17e06c475127" + } + ] + }, + { + "original_rule_class": "@bazel_tools//tools/cpp:cc_configure.bzl%cc_autoconf", + "original_attributes": { + "name": "local_config_cc", + "generator_name": "local_config_cc", + "generator_function": "cc_configure" + }, + "repositories": [ + { + "rule_class": "@bazel_tools//tools/cpp:cc_configure.bzl%cc_autoconf", + "attributes": { + "name": "local_config_cc", + "generator_name": "local_config_cc", + "generator_function": "cc_configure" + }, + "output_tree_hash": "6964c407a22e3fa0c52c992e4cf24145271e2580a714d100c1cf11e4ddbc019e" + } + ] + }, + { + "original_rule_class": "@bazel_tools//tools/cpp:cc_configure.bzl%cc_autoconf_toolchains", + "original_attributes": { + "name": "local_config_cc_toolchains", + "generator_name": "local_config_cc_toolchains", + "generator_function": "cc_configure" + }, + "repositories": [ + { + "rule_class": "@bazel_tools//tools/cpp:cc_configure.bzl%cc_autoconf_toolchains", + "attributes": { + "name": "local_config_cc_toolchains", + "generator_name": "local_config_cc_toolchains", + "generator_function": "cc_configure" + }, + "output_tree_hash": "1f5225797781e52701eedc83d3881885dbf142cf22222c8ef3b38c8a4b70070e" + } + ] + }, + { + "original_rule_class": "register_toolchains", + "original_attributes": { + "name": "//external/register_toolchains", + "*args": [ + "@bazel_tools//tools/jdk:all", + "@bazel_tools//tools/python:autodetecting_toolchain", + "@local_config_sh//:local_sh_toolchain", + "@local_config_cc_toolchains//:all" + ] + }, + "native": "register_toolchains(\"@bazel_tools//tools/jdk:all\", \"@bazel_tools//tools/python:autodetecting_toolchain\", \"@local_config_sh//:local_sh_toolchain\", \"@local_config_cc_toolchains//:all\")" + }, + { + "original_rule_class": "register_execution_platforms", + "original_attributes": { + "name": "//external/register_execution_platforms", + "*args": [] + }, + "native": "register_execution_platforms()" + } +] diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yml similarity index 86% rename from snap/snapcraft.yaml rename to snap/snapcraft.yml index e0064f1..f9d3d40 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yml @@ -1,4 +1,3 @@ - name: voidstar version: '1.14.238936273' # just for humans, typically '1.2+git' or '1.3.2' summary: void* casts files onto 2D/3D colored spaces for your mind blowing needs # 79 char long summary @@ -26,9 +25,3 @@ parts: source: . configflags: - -DCMAKE_INSTALL_PREFIX=/bin - build-packages: - - libglm-dev - - pkg-config - stage-packages: - - libglew-dev - - libglfw3-dev diff --git a/third_party/BUILD b/third_party/BUILD index ffd0fb0..a11ccb4 100644 --- a/third_party/BUILD +++ b/third_party/BUILD @@ -1 +1,35 @@ +load("@rules_cc//cc:defs.bzl", "cc_library") + package(default_visibility = ["//visibility:public"]) + +config_setting( + name = "linux", + constraint_values = ["@bazel_tools//platforms:linux"], +) + +config_setting( + name = "osx", + constraint_values = ["@bazel_tools//platforms:osx"], +) + +config_setting( + name = "windows", + constraint_values = ["@bazel_tools//platforms:windows"], +) + +cc_library( + name = "glfw", + deps = select({ + ":linux": ["@glfw//:glfw_linux"], + ":osx": ["@glfw_osx"], + ":windows": ["@glfw//:glfw_windows"], + }), +) + +cc_library( + name = "glew", + deps = select({ + ":windows": ["@glew_win64//:glew_win64"], + "//conditions:default": ["@glew//:glew"], + }), +) diff --git a/third_party/glew.BUILD b/third_party/glew.BUILD new file mode 100644 index 0000000..5fd76b2 --- /dev/null +++ b/third_party/glew.BUILD @@ -0,0 +1,19 @@ +load("@rules_cc//cc:defs.bzl", "cc_library") + +package(default_visibility = ["//visibility:public"]) + +cc_library( + name = "glew", + srcs = ["src/glew.c"], + hdrs = glob(["include/GL/*.h"]), + defines = [ + "GLEW_NO_GLU", + "GLEW_STATIC", + ], + includes = ["include"], + linkopts = select({ + "@//third_party:linux": ["-lGL"], + "@//third_party:osx": ["-framework OpenGL"], + }), + visibility = ["//visibility:public"], +) diff --git a/third_party/glew_win64.BUILD b/third_party/glew_win64.BUILD new file mode 100644 index 0000000..8fa9a2e --- /dev/null +++ b/third_party/glew_win64.BUILD @@ -0,0 +1,16 @@ +load("@rules_cc//cc:defs.bzl", "cc_library") + +package(default_visibility = ["//visibility:public"]) + +cc_library( + name = "glew_win64", + # TODO? bin/Release/x64/glew32.dll + srcs = glob(["lib/Release/x64/*.lib"]), + hdrs = glob(["include/GL/*.h"]), + defines = [ + "GLEW_NO_GLU", + "GLEW_STATIC", + ], + includes = ["include"], + visibility = ["//visibility:public"], +) diff --git a/third_party/glfw3.BUILD b/third_party/glfw3.BUILD index 3fa5332..f03d274 100644 --- a/third_party/glfw3.BUILD +++ b/third_party/glfw3.BUILD @@ -1,63 +1,80 @@ +load("@rules_cc//cc:defs.bzl", "cc_library") + package(default_visibility = ["//visibility:public"]) -config_setting( - name = "linux", - constraint_values = ["@bazel_tools//platforms:linux"], -) +# TODO: simplify & update using https://raw.githubusercontent.com/pbellis/bazel-glfw/master/glfw.BUILD -config_setting( - name = "macos", - constraint_values = ["@bazel_tools//platforms:macos"], -) +# SRCS from https://github.com/glfw/glfw/blob/e65de2941c056ee5833b4dab3db36b297b53aa14/src/CMakeLists.txt -config_setting( - name = "windows", - constraint_values = ["@bazel_tools//platforms:windows"], -) +SRCS = [ + "src/context.c", + "src/init.c", + "src/input.c", + "src/internal.h", + "src/mappings.h", + "src/monitor.c", + "src/vulkan.c", + "src/window.c", +] + +SRCS_WIN32 = [ + "src/egl_context.c", + "src/egl_context.h", + "src/osmesa_context.c", + "src/osmesa_context.h", + "src/wgl_context.c", + "src/wgl_context.h", + "src/win32_init.c", + "src/win32_joystick.c", + "src/win32_joystick.h", + "src/win32_monitor.c", + "src/win32_platform.h", + "src/win32_thread.c", + "src/win32_time.c", + "src/win32_window.c", +] + +SRCS_X11 = [ + "src/egl_context.c", + "src/egl_context.h", + "src/glx_context.c", + "src/glx_context.h", + "src/osmesa_context.c", + "src/osmesa_context.h", + "src/posix_thread.c", + "src/posix_thread.h", + "src/posix_time.c", + "src/posix_time.h", + "src/x11_init.c", + "src/x11_monitor.c", + "src/x11_platform.h", + "src/x11_window.c", + "src/xkb_unicode.c", + "src/xkb_unicode.h", +] + +HDRS = [ + "include/GLFW/glfw3.h", + "include/GLFW/glfw3native.h", +] + +INCLUDES = [ + "include", +] cc_library( name = "glfw_linux", - srcs = glob([ - "src/context.c", - "src/egl_context.c", - "src/egl_context.h", - "src/glfw_config.h", - "src/glx_context.c", - "src/glx_context.h", - "src/init.c", - "src/input.c", - "src/internal.h", + srcs = SRCS + SRCS_X11 + [ "src/linux_joystick.c", "src/linux_joystick.h", - "src/mappings.h", - "src/monitor.c", - "src/osmesa_context.c", - "src/osmesa_context.h", - "src/posix_time.c", - "src/posix_time.h", - "src/posix_thread.c", - "src/posix_thread.h", - "src/posix_tls.c", - "src/posix_tls.h", - "src/vulkan.c", - "src/window.c", - "src/x11_init.c", - "src/x11_monitor.c", - "src/x11_platform.h", - "src/x11_window.c", - "src/xkb_unicode.c", - "src/xkb_unicode.h", - ]), - hdrs = [ - "include/GLFW/glfw3.h", - "include/GLFW/glfw3native.h", ], + hdrs = HDRS, defines = [ "_GLFW_X11", "_GLFW_GLX", "_GLFW_USE_OPENGL", ], - includes = ["include"], + includes = INCLUDES, linkopts = [ # Note: This is a bit of a HACK to build & link against whatever # version of X11 is installed on the system. Ideally, X11 would also @@ -76,40 +93,13 @@ cc_library( cc_library( name = "glfw_windows", - srcs = glob([ - "src/context.c", - "src/egl_context.c", - "src/egl_context.h", - "src/glfw_config.h", - "src/init.c", - "src/input.c", - "src/internal.h", - "src/monitor.c", - "src/vulkan.c", - "src/window.c", - "src/wgl_context.c", - "src/wgl_context.h", - "src/win32_init.c", - "src/win32_joystick.c", - "src/win32_joystick.h", - "src/win32_monitor.c", - "src/win32_platform.h", - "src/win32_time.c", - "src/win32_time.h", - "src/win32_tls.c", - "src/win32_tls.h", - "src/win32_window.c", - "src/win32_unicode.c", - "src/win32_unicode.h", - ]), - hdrs = [ - "include/GLFW/glfw3.h", - "include/GLFW/glfw3native.h", - ], + srcs = SRCS + SRCS_WIN32, + hdrs = HDRS, defines = [ "_GLFW_WIN32", "_GLFW_USE_OPENGL", ], + includes = INCLUDES, linkopts = [ "-DEFAULTLIB:opengl32.lib", "-DEFAULTLIB:gdi32.lib", @@ -119,16 +109,8 @@ cc_library( # Note: the Bazel MSVC CROSSTOOL prevents including wingdi.h by default, to # prevent Windows macros from altering the global namespace. Glfw is set up # to carefully handle these headers. - nocopts = "/DNOGDI", - deps = [ - "@khronos_opengl_registry//:gl_headers", - ], -) - -cc_library( - name = "glfw", - deps = select({ - ":linux": [":glfw_linux"], - ":windows": [":glfw_windows"], - }), + # FIXME: commented out due to: + # in nocopts attribute of cc_library rule @glfw//:glfw_windows: This attribute was removed. See https://github.com/bazelbuild/bazel/issues/8706 for details. + # nocopts = "/DNOGDI", + deps = ["@khronos_opengl_registry//:gl_headers"], ) diff --git a/third_party/glfw3_osx.BUILD b/third_party/glfw3_osx.BUILD new file mode 100644 index 0000000..df30626 --- /dev/null +++ b/third_party/glfw3_osx.BUILD @@ -0,0 +1,23 @@ +load("@rules_cc//cc:defs.bzl", "cc_library") + +package(default_visibility = ["//visibility:public"]) + +cc_library( + name = "glfw_osx", + srcs = ["lib-macos/libglfw3.a"], + hdrs = [ + "include/GLFW/glfw3.h", + "include/GLFW/glfw3native.h", + ], + defines = [ + "_GLFW_COCOA", + # "_GLFW_GLX", + # "_GLFW_USE_OPENGL", + ], + includes = ["include"], + linkopts = [ + "-framework Cocoa", + "-framework IOKit", + "-framework CoreFoundation", + ], +) diff --git a/travis-miners.enc b/travis-miners.enc deleted file mode 100644 index 76b1f87..0000000 Binary files a/travis-miners.enc and /dev/null differ diff --git a/voidstar/BUILD b/voidstar/BUILD index 86798d4..938380a 100644 --- a/voidstar/BUILD +++ b/voidstar/BUILD @@ -18,11 +18,17 @@ cc_library( "size2str.cc", ], hdrs = [ - "indices.h", "registrar.h", "size2str.h", "types.h", ], + deps = [":indices"], +) + +cc_library( + name = "indices", + hdrs = ["indices.h"], + deps = ["//third_party:glew"], ) cc_library( diff --git a/voidstar/indices.h b/voidstar/indices.h index 07db20b..f3da93c 100644 --- a/voidstar/indices.h +++ b/voidstar/indices.h @@ -1,9 +1,9 @@ #pragma once -#include - #include +#include "GL/glew.h" + using Floats = std::vector; using Index = GLuint; diff --git a/voidstar/managers/BUILD b/voidstar/managers/BUILD index 207ea09..d476f16 100644 --- a/voidstar/managers/BUILD +++ b/voidstar/managers/BUILD @@ -28,11 +28,11 @@ cc_library( name = "manager_glfw3", srcs = ["glfw3.cc"], hdrs = ["glfw3.h"], - linkopts = ["-lGLEW"], deps = [ ":manager", - "@com_github_gtruc_glm//:glm", - "@glfw", + "//third_party:glew", + "//third_party:glfw", + "@glm", "@khronos_opengl_registry//:gl_headers", ], alwayslink = 1, # For registration diff --git a/voidstar/managers/glfw3.cc b/voidstar/managers/glfw3.cc index 003f9f1..158c82d 100644 --- a/voidstar/managers/glfw3.cc +++ b/voidstar/managers/glfw3.cc @@ -1,8 +1,5 @@ -#define GLEW_STATIC -#include - -// This comments prevents clang-format from messing up includes. - +#include "GL/glew.h" +// This comments prevents clang-format from reordering includes #include "voidstar/managers/glfw3.h" std::shared_ptr GLFW3Manager::instance_; diff --git a/voidstar/types.h b/voidstar/types.h index 1946580..d19f9c8 100644 --- a/voidstar/types.h +++ b/voidstar/types.h @@ -15,4 +15,6 @@ typedef int16_t s16; typedef int32_t s32; typedef int64_t s64; +#ifndef __unused #define __unused __attribute__((unused)) +#endif