Skip to content

Commit 96e6276

Browse files
authored
Snapping (#89)
1 parent 12c8340 commit 96e6276

File tree

5 files changed

+117
-30
lines changed

5 files changed

+117
-30
lines changed

.github/workflows/snapcraft.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
on: push
2+
name: Snap
3+
env:
4+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5+
BAZELISK_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6+
jobs:
7+
build_snap:
8+
name: Build snap on ubuntu
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
13+
- uses: samuelmeuli/action-snapcraft@v1
14+
with:
15+
use_lxd: true
16+
17+
- name: Build snap
18+
run: sg lxd -c 'snapcraft --use-lxd'
19+
20+
- uses: actions/upload-artifact@v2
21+
with:
22+
name: snapped
23+
path: '*.snap'
24+
if-no-files-found: error

.travis.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@ addons:
66
packages:
77
- cppcheck
88

9-
script:
10-
# - mv -v bazel-bin/voidstar/voidstar "bazel-bin/voidstar/voidstar-$(git describe --abbrev --dirty --always --tags)-$TRAVIS_OS_NAME-$(basename $CC)"
11-
- cppcheck --error-exitcode=1 --enable=all -Ivoidstar/include/ voids tar/
9+
script: []
10+
# - cppcheck --error-exitcode=1 --enable=all voidstar/

Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
BAZEL = ./bazelisk
2+
3+
voidstar: $(BAZEL)
4+
$(BAZEL) build $@
5+
6+
$(BAZEL):
7+
curl -fsSLo $@ https://github.com/bazelbuild/bazelisk/releases/download/v1.6.1/bazelisk-linux-amd64 && chmod +x $@
8+
9+
install: DESTDIR ?= .
10+
install:
11+
cp -v bazel-bin/voidstar/voidstar $(DESTDIR)/
12+
13+
debug:
14+
snapcraft

snap/snapcraft.yaml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: voidstar
2+
version: git
3+
summary: void* casts files onto 2D/3D colored spaces for your mind blowing needs # 79 char long summary
4+
description: |
5+
Usage:
6+
voidstar [OPTIONS] FILE...
7+
8+
-l, --list list backends
9+
-u, --ui choose ui mode
10+
-a, --algorithm algorithm to apply
11+
12+
-x, --width window width
13+
-y, --height window height
14+
-f, --fullscreen start on fullscreen
15+
--keep-chrome show title bar & allow resizing
16+
17+
-w, --sliding length of sliding window
18+
-s, --slide-step amount of points slid
19+
-m, --move move sliding window forward
20+
-n, --spin don't spin shape on itself
21+
22+
-b, --begin begin offset for the range
23+
-e, --end end offset for the range (0: till end of file)
24+
25+
-h, --help this help
26+
27+
# Press H and L to switch between files
28+
# Use A W S D Z X and your mouse to move in the 3D space
29+
# Press F for full screen
30+
# Use the arrows to slide and enlarge the sliding window
31+
# Press M to slide the window to the end
32+
# Use > to slide faster, < to slow down
33+
# SPACE to toggle spinning the shape
34+
# Press O to reset the camera position
35+
# ESC to quit
36+
37+
38+
grade: stable
39+
base: core20
40+
# confinement: strict
41+
confinement: devmode
42+
43+
apps:
44+
voidstar:
45+
command: voidstar
46+
environment:
47+
# https://forum.snapcraft.io/t/opengl-error-mesa-loader-fails/15197/2
48+
LD_LIBRARY_PATH: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/dri:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/mesa:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/mesa-gl:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/xorg
49+
LIBGL_DRIVERS_PATH: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/dri
50+
plugs:
51+
- home # to read files in $HOME
52+
- network # to read URLs
53+
- opengl # to access rendering hardware
54+
- optical-drive # to read CDs
55+
- removable-media # to read USB keys
56+
- wayland
57+
- x11 # to create windows
58+
59+
parts:
60+
voidstar:
61+
plugin: make
62+
source: .
63+
build-packages:
64+
- curl
65+
- g++
66+
- libgl1-mesa-dev
67+
- make
68+
- xorg-dev
69+
stage-packages:
70+
- libdri2-1
71+
- libdrm2
72+
- libgl1-mesa-dev
73+
- libgl1-mesa-glx
74+
- libgles2-mesa
75+
- xorg-dev
76+
# after:
77+
# - desktop-glib-only # https://snapcraft.io/docs/gpu-support

snap/snapcraft.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)