diff --git a/.gitignore b/.gitignore index ce3fba6..dfd2c9f 100755 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ *.txt Files/__pycache__/* +.flatpak-builder/ +build/ diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..51d6ea3 --- /dev/null +++ b/Makefile @@ -0,0 +1,6 @@ + + +all: gpu-viewer + +gpu-viewer: + flatpak-builder build online.winehub.GPUViewer.yml --force-clean --user --install diff --git a/gpu-viewer.desktop b/gpu-viewer.desktop index c27a3b1..284d83e 100755 --- a/gpu-viewer.desktop +++ b/gpu-viewer.desktop @@ -1,4 +1,3 @@ -#!/usr/bin/env xdg-open [Desktop Entry] Encoding=UTF-8 version=1.15 diff --git a/online.winehub.GPUViewer.appdata.xml b/online.winehub.GPUViewer.appdata.xml new file mode 100644 index 0000000..0064b3d --- /dev/null +++ b/online.winehub.GPUViewer.appdata.xml @@ -0,0 +1,26 @@ + + + online.winehub.GPUViewer + CC0-1.0 + GPUViewer + GPUViewer by Arun Sivaraman + +

A front-end to glxinfo, vulkaninfo, clinfo and es2_info

+
+ + GTK + GNOME + System + + https://github.com/arunsivaramanneo/GPU-Viewer + https://github.com/arunsivaramanneo/GPU-Viewer + LicenseRef-proprietary + Arun Sivaraman + + + GPUViewer details + https://user-images.githubusercontent.com/30646692/49328576-271fd880-f599-11e8-95d3-d9db4b03e91b.png + + + +
\ No newline at end of file diff --git a/online.winehub.GPUViewer.json b/online.winehub.GPUViewer.json new file mode 100644 index 0000000..7e8c01a --- /dev/null +++ b/online.winehub.GPUViewer.json @@ -0,0 +1,152 @@ +{ + "app-id": "online.winehub.GPUViewer", + "runtime": "org.freedesktop.Platform", + "runtime-version": "18.08", + "sdk": "org.freedesktop.Sdk", + "finish-args": [ + "--share=ipc", + "--socket=wayland", + "--socket=x11", + "--device=dri", + "--require-version=0.9.0" + ], + "cleanup": [ + "/include", + "/share/gtk-doc", + "/lib/debug", + "/share/man", + "/bin/cairo-trace", + "*.a", + "*.la" + ], + "command": "gpu-viewer", + "modules": [ + { + "name": "pycairo", + "buildsystem": "meson", + "sources": [ + { + "type": "archive", + "url": "https://github.com/pygobject/pycairo/releases/download/v1.18.0/pycairo-1.18.0.tar.gz", + "sha256": "abd42a4c9c2069febb4c38fe74bfc4b4a9d3a89fea3bc2e4ba7baff7a20f783f" + } + ] + }, + { + "name": "cairo", + "buildsystem": "autotools", + "sources": [ + { + "type": "archive", + "url": "https://cairographics.org/releases/cairo-1.16.0.tar.xz", + "sha256": "5e7b29b3f113ef870d1e3ecf8adf21f923396401604bda16d44be45e66052331" + } + ] + }, + { + "name": "pygobject", + "buildsystem": "meson", + "sources": [ + { + "type": "archive", + "url": "https://download.gnome.org/sources/pygobject/3.30/pygobject-3.30.4.tar.xz", + "sha256": "2dc1a1a444b82955e65b81c2a2511ecf8032404beba4ef1d48144168f2f64c43" + } + ] + }, + { + "name": "mesa-demos", + "buildsystem": "simple", + "build-commands": [ + "cd src/xdemos;gcc -o glxinfo glxinfo.c glinfo_common.c -O2 -lX11 -lXext -lGLX -lGL -lpthread -DPACKAGE_VERSION=\"8.4.0\" -DPACKAGE_STRING=\"mesa-demos 8.4.0\" -DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi\\?product=Mesa\\&component=Demos\" -DPACKAGE_URL=\"\" -DPACKAGE=\"mesa-demos\" -DVERSION=\"8.4.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1", + "cd src/egl/opengles2; gcc -o es2_info es2_info.c -O2 -lX11 -lXext -lGLX -lGL -lEGL -lpthread -DPACKAGE_VERSION=\"8.4.0\" -DPACKAGE_STRING=\"mesa-demos 8.4.0\" -DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi\\?product=Mesa\\&component=Demos\" -DPACKAGE_URL=\"\" -DPACKAGE=\"mesa-demos\" -DVERSION=\"8.4.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1", + "install -m755 src/xdemos/glxinfo ${FLATPAK_DEST}/bin", + "install -m755 src/egl/opengles2/es2_info ${FLATPAK_DEST}/bin" + ], + "sources": [ + { + "type": "archive", + "url": "https://mesa.freedesktop.org/archive/demos/mesa-demos-8.4.0.tar.bz2", + "sha256": "01e99c94a0184e63e796728af89bfac559795fb2a0d6f506fa900455ca5fff7d" + } + ] + }, + { + "name": "khronos-headers", + "buildsystem": "simple", + "build-commands": [ + "cp -r CL/ ${FLATPAK_DEST}/include/" + ], + "sources": [ + { + "type": "git", + "url": "https://github.com/KhronosGroup/OpenCL-Headers" + } + ] + }, + { + "name": "clinfo", + "buildsystem": "simple", + "build-commands": [ + "CFLAGS=\"-I${FLATPAK_DEST}/include\" make", + "mkdir ${FLATPAK_DEST}/share/man", + "install -m755 clinfo ${FLATPAK_DEST}/bin/clinfo", + "make PREFIX=${FLATPAK_DEST} MANDIR=${FLATPAK_DEST}/share/man install" + ], + "sources": [ + { + "type": "archive", + "url": "https://github.com/Oblomov/clinfo/archive/2.2.18.04.06.tar.gz", + "sha256": "f77021a57b3afcdebc73107e2254b95780026a9df9aa4f8db6aff11c03f0ec6c" + } + ] + }, + { + "name": "vulkan-tools", + "buildsystem": "simple", + "build-commands": [ + "ls", + "cmake -DCMAKE_INSTALL_PREFIX:PATH=${FLATPAK_DEST} -DCMAKE_INSTALL_LIBDIR=%{libdir} -DCMAKE_INSTALL_SYSCONFDIR:PATH=/app/etc -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_RPATH:BOOL=yes -DBUILD_VKJSON=OFF -DBUILD_WSI_MIR_SUPPORT=OFF -DBUILD_WSI_XCB_SUPPORT=ON -DBUILD_WSI_XLIB_SUPPORT=ON -DBUILD_WSI_WAYLAND_SUPPORT=ON -DGLSLANG_SPIRV_INCLUDE_DIR=./ -DBUILD_TESTS=OFF -DBUILD_LAYERS=OFF -DBUILD_DEMOS=ON", + "make vulkaninfo", + "install -m755 demos/vulkaninfo ${FLATPAK_DEST}/bin/vulkaninfo" + ], + "sources": [ + { + "type": "archive", + "url": "https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/archive/sdk-1.1.73.0.tar.gz", + "sha256": "ab6bd8162b246bc5d73dcfb3b69ed7a35b12b739735493f47304b0fc852463e1" + } + ] + }, + { + "name": "gpuviewer-tools", + "buildsystem": "simple", + "build-commands": [ + "mkdir -p ${FLATPAK_DEST}/share/icons/hicolor/512x512/", + "install -m644 Images/GPU_Viewer.png ${FLATPAK_DEST}/share/icons/hicolor/512x512/", + "sed -i \"s/sudo//g\" install", + "sed -i \"s/\\/usr\\/bin/\\/app\\/bin/g\" install", + "sed -i \"s/\\/usr\\/share/\\/app\\/share/g\" install", + "mkdir -p ${FLATPAK_DEST}/share/applications/", + "sed -i \"s/\\/usr\\/share/\\/app\\/share/g\" gpu-viewer.desktop", + "sed \"s/Icon/Icon=GPU_Viewer.png/g\"", + "sh -c ./install", + "echo -e \"#!/bin/sh\ncd /app/share/gpu-viewer/Files/\npython3 GPUViewer.py\" >/app/bin/gpu-viewer", + "chmod 755 ${FLATPAK_DEST}/bin/gpu-viewer", + "mkdir -p ${FLATPAK_DEST}/share/appdata", + "install -m6440 online.winehub.GPUViewer.appdata.xml ${FLATPAK_DEST}/share/appdata" + ], + "sources": [ + { + "type": "archive", + "url": "https://github.com/arunsivaramanneo/GPU-Viewer/archive/v1.15.tar.gz", + "sha256": "366abf2322b6c4dd9852b3352cfbe397b4481bf2fc8f210813cede98bc19fcf5" + }, + { + "type": "file", + "path": "online.winehub.GPUViewer.appdata.xml" + } + ] + } + ] +} diff --git a/online.winehub.GPUViewer.yml b/online.winehub.GPUViewer.yml new file mode 100644 index 0000000..bf74b39 --- /dev/null +++ b/online.winehub.GPUViewer.yml @@ -0,0 +1,131 @@ +app-id: online.winehub.GPUViewer +runtime: org.freedesktop.Platform +runtime-version: '18.08' +sdk: org.freedesktop.Sdk + +finish-args: + - --share=ipc + - --socket=wayland + - --socket=x11 + - --device=dri + - --require-version=0.9.0 + +cleanup: + - /include + - /share/gtk-doc + - /lib/debug + - /share/man + - /bin/cairo-trace + - '*.a' + - '*.la' + +no-debuginfo: false + +command: gpu-viewer + +modules: + - name: pycairo + buildsystem: meson + sources: + - type: archive + url: https://github.com/pygobject/pycairo/releases/download/v1.18.0/pycairo-1.18.0.tar.gz + sha256: abd42a4c9c2069febb4c38fe74bfc4b4a9d3a89fea3bc2e4ba7baff7a20f783f + + - name: cairo + buildsystem: autotools + sources: + - type: archive + url: https://cairographics.org/releases/cairo-1.16.0.tar.xz + sha256: 5e7b29b3f113ef870d1e3ecf8adf21f923396401604bda16d44be45e66052331 + + - name: pygobject + buildsystem: meson + sources: + - type: archive + url: https://download.gnome.org/sources/pygobject/3.30/pygobject-3.30.4.tar.xz + sha256: 2dc1a1a444b82955e65b81c2a2511ecf8032404beba4ef1d48144168f2f64c43 + + - name: mesa-demos + buildsystem: simple + build-commands: + - cd src/xdemos; gcc -o glxinfo glxinfo.c glinfo_common.c -O2 -lX11 -lXext -lGLX + -lGL -lpthread -DPACKAGE_VERSION="8.4.0" -DPACKAGE_STRING="mesa-demos 8.4.0" + -DPACKAGE_BUGREPORT="https://bugs.freedesktop.org/enter_bug.cgi\?product=Mesa\&component=Demos" + -DPACKAGE_URL="" -DPACKAGE="mesa-demos" -DVERSION="8.4.0" -DSTDC_HEADERS=1 + -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 + -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 + -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 + - cd src/egl/opengles2; gcc -o es2_info es2_info.c -O2 -lX11 -lXext -lGLX + -lEGL -lGL -lpthread -DPACKAGE_VERSION="8.4.0" -DPACKAGE_STRING="mesa-demos 8.4.0" + -DPACKAGE_BUGREPORT="https://bugs.freedesktop.org/enter_bug.cgi\?product=Mesa\&component=Demos" + -DPACKAGE_URL="" -DPACKAGE="mesa-demos" -DVERSION="8.4.0" -DSTDC_HEADERS=1 + -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 + -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 + -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 + + - install -m755 src/xdemos/glxinfo ${FLATPAK_DEST}/bin + - install -m755 src/egl/opengles2/es2_info ${FLATPAK_DEST}/bin + + sources: + - type: archive + url: https://mesa.freedesktop.org/archive/demos/mesa-demos-8.4.0.tar.bz2 + sha256: 01e99c94a0184e63e796728af89bfac559795fb2a0d6f506fa900455ca5fff7d + + - name: khronos-headers + buildsystem: simple + build-commands: + - cp -r CL/ ${FLATPAK_DEST}/include/ + sources: + - type: git + url: https://github.com/KhronosGroup/OpenCL-Headers + + - name: clinfo + buildsystem: simple + build-commands: + - CFLAGS="-I${FLATPAK_DEST}/include" make + - mkdir ${FLATPAK_DEST}/share/man + - install -m755 clinfo ${FLATPAK_DEST}/bin/clinfo + - make PREFIX=${FLATPAK_DEST} MANDIR=${FLATPAK_DEST}/share/man install + sources: + - type: archive + url: https://github.com/Oblomov/clinfo/archive/2.2.18.04.06.tar.gz + sha256: f77021a57b3afcdebc73107e2254b95780026a9df9aa4f8db6aff11c03f0ec6c + + - name: vulkan-tools + buildsystem: simple + build-commands: + - cmake -DCMAKE_INSTALL_PREFIX:PATH=${FLATPAK_DEST} -DCMAKE_INSTALL_LIBDIR=%{libdir} + -DCMAKE_INSTALL_SYSCONFDIR:PATH=/app/etc -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_RPATH:BOOL=yes + -DBUILD_VKJSON=OFF -DBUILD_WSI_MIR_SUPPORT=OFF -DBUILD_WSI_XCB_SUPPORT=ON + -DBUILD_WSI_XLIB_SUPPORT=ON -DBUILD_WSI_WAYLAND_SUPPORT=ON -DGLSLANG_SPIRV_INCLUDE_DIR=./ + -DBUILD_TESTS=OFF -DBUILD_LAYERS=OFF -DBUILD_DEMOS=ON + - make vulkaninfo + - install -m755 demos/vulkaninfo ${FLATPAK_DEST}/bin/vulkaninfo + sources: + - type: archive + url: https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/archive/sdk-1.1.73.0.tar.gz + sha256: ab6bd8162b246bc5d73dcfb3b69ed7a35b12b739735493f47304b0fc852463e1 + + - name: gpuviewer-tools + buildsystem: simple + build-commands: + - mkdir -p ${FLATPAK_DEST}/share/icons/hicolor/512x512/apps + - install -m644 Images/GPU_Viewer.png ${FLATPAK_DEST}/share/icons/hicolor/512x512/apps + - sed -i "s/sudo//g" install + - sed -i "s/\/usr\/bin/\/app\/bin/g" install + - sed -i "s/\/usr\/share/\/app\/share/g" install + - mkdir -p ${FLATPAK_DEST}/share/applications/ + - sed -i "/Icon=/c\Icon=GPU_Viewer" gpu-viewer.desktop + - sed -i "/Exec=/c\Exec=gpu-viewer" gpu-viewer.desktop + - sh -c ./install + - "echo -e \"#!/bin/sh\ncd /app/share/gpu-viewer/Files/\npython3 GPUViewer.py\"\ + \ >/app/bin/gpu-viewer" + - chmod 755 ${FLATPAK_DEST}/bin/gpu-viewer + - mkdir -p ${FLATPAK_DEST}/share/appdata + - install -m6440 online.winehub.GPUViewer.appdata.xml ${FLATPAK_DEST}/share/appdata + sources: + - type: archive + url: https://github.com/arunsivaramanneo/GPU-Viewer/archive/v1.15.tar.gz + sha256: 366abf2322b6c4dd9852b3352cfbe397b4481bf2fc8f210813cede98bc19fcf5 + - type: file + path: online.winehub.GPUViewer.appdata.xml