Skip to content

Commit

Permalink
added build shellscript
Browse files Browse the repository at this point in the history
  • Loading branch information
Hundemeier committed Jul 1, 2018
1 parent c5461a7 commit 1643177
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@
# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
.glide/

key2sacn
key2sacn
/build
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ Linux: you have to use root rights: `sudo ./key2sacn`.

Note: Linux can distinguish between mutiple keyboards, but this program uses only one at a time and
automaticly takes the first keyboard. There is currently no way to specify the keyboard to use.
For more fine-grained options on Linux use [key2sACN](https://github.com/Hundemeier/key2sACN).


This program was originally intended to use with a headless raspberry and a keyboard in an sACN environment.
Then this combination is useful if you want some buttons (mind the n-Key rollover!) away from your console.

This program is written in go and some compiled binaries are available under [releases](https://github.com/Hundemeier/key2sACN/releases).
This program is written in go and some compiled binaries are available under [releases](https://github.com/Hundemeier/key2sACN-simple/releases).

It uses the [keylogger](https://github.com/MarinX/keylogger) by MarinX and this sACN library: [sACN](https://github.com/Hundemeier/go-sacn).
23 changes: 23 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Set-Variable GOOS=linux
Set-Variable GOARCH=amd64
go build -o build/key2sACN-linux-64

Set-Variable GOOS=linux
Set-Variable GOARCH=386
go build -o build/key2sACN-linux-32

Set-Variable GOOS=windows
Set-Variable GOARCH=amd64
go build -o build/key2sACN-windows-64.exe

Set-Variable GOOS=windows
Set-Variable GOARCH=386
go build -o build/key2sACN-windows-32.exe

Set-Variable GOOS=darwin
Set-Variable GOARCH=amd64
go build -o build/key2sACN-macos-64

Set-Variable GOOS=darwin
Set-Variable GOARCH=386
go build -o build/key2sACN-macos-32
33 changes: 33 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

GREEN='\033[0;32m'
NC='\033[0m' # No Color
#TICK='\033[0;32m \xE2\x9C\x93 \033[0m'
TICK=$GREEN'\xE2\x9C\x93'$NC

printf 'building for...\n'
printf 'Linux AMD64'
if GOOS=linux GOARCH=amd64 go build -o build/key2sACN-linux-64; then
printf ' '$TICK'\n' $TICK
fi

printf 'Linux 386'
if GOOS=linux GOARCH=386 go build -o build/key2sACN-linux-32; then
printf ' '$TICK'\n' $TICK
fi

printf 'Windows AMD64'
if GOOS=windows GOARCH=amd64 go build -o build/key2sACN-windows-64.exe; then
printf ' '$TICK'\n' $TICK
fi

printf 'Windows 386'
if GOOS=windows GOARCH=386 go build -o build/key2sACN-windows-32.exe; then
printf ' '$TICK'\n' $TICK
fi

#printf 'Darwin AMD64'
#GOOS=darwin GOARCH=amd64 go build -o build/key2sACN-macos-64

#printf 'Darwin 386'
#GOOS=darwin GOARCH=386 go build -o build/key2sACN-macos-32

0 comments on commit 1643177

Please sign in to comment.