update linker

This commit is contained in:
thefish 2019-01-24 14:39:03 +03:00
parent 364e46b1f0
commit 9ed9f7ae0f
4 changed files with 9 additions and 8 deletions

2
link.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/bash
ln -s src/bearlibterminal/libBearLibTerminal.so .

4
readme.md Normal file
View File

@ -0,0 +1,4 @@
develpoment
---
run linker.sh to create symlink, go library headers are already configured to use .so in same folder with binary

View File

@ -22,9 +22,6 @@
package bearlibterminal
// // #cgo LDFLAGS: -I/home/agurov/projects/zaar/alchemyst-go/src/bearlibterminal -L/home/agurov/projects/zaar/alchemyst-go/lib -lBearLibTerminal
// // #cgo LDFLAGS: -L../../lib -lBearLibTerminal
// #cgo LDFLAGS: -L. -Wl,-rpath -Wl,./ -lBearLibTerminal
// #include <stdlib.h>
// #include <BearLibTerminal.h>
@ -34,7 +31,6 @@ import (
"unsafe"
)
// compile with go build -o test
// check relative path with objdump -p test | grep RPATH
// must be: RPATH ./
@ -43,7 +39,6 @@ import (
// when development is complete, just $ sudo rm /etc/ld.so.conf.d/libbearterminal.conf
// compiled binaties must still work in same folder with .so
//
// Keyboard scancodes for events/states
//

View File

@ -19,13 +19,13 @@ func ReadKey() (string, int) {
pressed = Scancodemap[key]
if (blt.Check(blt.TK_SHIFT) != 0) {
if blt.Check(blt.TK_SHIFT) != 0 {
pressed = "Shift+" + pressed
}
if (blt.Check(blt.TK_ALT) != 0) {
if blt.Check(blt.TK_ALT) != 0 {
pressed = "Alt+" + pressed
}
if (blt.Check(blt.TK_CONTROL) != 0) {
if blt.Check(blt.TK_CONTROL) != 0 {
pressed = "Ctrl+" + pressed
}
fmt.Println(pressed)