From f7ea916b21f185283aa74f96bcc24eba7b6852b2 Mon Sep 17 00:00:00 2001 From: vcaesar Date: Mon, 17 Sep 2018 14:23:05 -0400 Subject: [PATCH] update pkg to newest fixed ci --- .gitignore | 1 + Gopkg.lock | 2 +- vendor/github.com/robotn/gohook/README.md | 8 +- vendor/github.com/robotn/gohook/appveyor.yml | 80 +++++++++++++++++++ vendor/github.com/robotn/gohook/circle.yml | 19 +++++ .../github.com/robotn/gohook/event/goEvent.h | 1 + vendor/github.com/robotn/gohook/hook.go | 23 ++++-- .../robotn/gohook/hook/darwin/event_c.h | 7 ++ .../robotn/gohook/hook/darwin/hook_c.h | 7 ++ .../robotn/gohook/hook/darwin/input.h | 7 ++ .../robotn/gohook/hook/darwin/input_c.h | 7 ++ .../robotn/gohook/hook/darwin/properties_c.h | 7 ++ vendor/github.com/robotn/gohook/hook/iohook.h | 7 ++ .../github.com/robotn/gohook/hook/logger_c.h | 7 ++ .../robotn/gohook/hook/windows/event_c.h | 7 ++ .../robotn/gohook/hook/windows/hook_c.h | 7 ++ .../robotn/gohook/hook/windows/input.h | 8 ++ .../robotn/gohook/hook/windows/input_c.h | 7 ++ .../robotn/gohook/hook/windows/properties_c.h | 7 ++ .../robotn/gohook/hook/x11/event_c.h | 7 ++ .../robotn/gohook/hook/x11/hook_c.h | 7 ++ .../github.com/robotn/gohook/hook/x11/input.h | 7 ++ .../robotn/gohook/hook/x11/input_c.h | 7 ++ .../robotn/gohook/hook/x11/properties_c.h | 7 ++ window/window.h | 2 +- 25 files changed, 246 insertions(+), 10 deletions(-) create mode 100644 vendor/github.com/robotn/gohook/appveyor.yml create mode 100644 vendor/github.com/robotn/gohook/circle.yml diff --git a/.gitignore b/.gitignore index f029d85..f5d8848 100644 --- a/.gitignore +++ b/.gitignore @@ -50,6 +50,7 @@ _testmain.go !cdeps/mac/libpng.a !cdeps/win32/libpng.a !cdeps/win64/libpng.a +cdeps/hook *.la *.lo diff --git a/Gopkg.lock b/Gopkg.lock index 4320b14..5cdc956 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -54,7 +54,7 @@ branch = "master" name = "github.com/robotn/gohook" packages = ["."] - revision = "3dccbf0083168096c576bf62abb3d5d4c916e2ea" + revision = "40c3386427eb558eb26426d3f56ac766c3e32335" [[projects]] name = "github.com/shirou/gopsutil" diff --git a/vendor/github.com/robotn/gohook/README.md b/vendor/github.com/robotn/gohook/README.md index be006df..bd46bc6 100644 --- a/vendor/github.com/robotn/gohook/README.md +++ b/vendor/github.com/robotn/gohook/README.md @@ -1,6 +1,10 @@ # gohook -This is a work in progress. +[![CircleCI Status](https://circleci.com/gh/robotn/gohook.svg?style=shield)](https://circleci.com/gh/robotn/gohook) +![Appveyor](https://ci.appveyor.com/api/projects/status/github/robotn/gohook?branch=master&svg=true) +[![Go Report Card](https://goreportcard.com/badge/github.com/robotn/gohook)](https://goreportcard.com/report/github.com/robotn/gohook) +[![GoDoc](https://godoc.org/github.com/robotn/gohook?status.svg)](https://godoc.org/github.com/robotn/gohook) + ```Go package main @@ -8,7 +12,7 @@ package main import ( "fmt" - "go-vgo/robotn/gohook" + "github.com/robotn/gohook" ) func main() { diff --git a/vendor/github.com/robotn/gohook/appveyor.yml b/vendor/github.com/robotn/gohook/appveyor.yml new file mode 100644 index 0000000..56f66a2 --- /dev/null +++ b/vendor/github.com/robotn/gohook/appveyor.yml @@ -0,0 +1,80 @@ +# version format +version: "{build}" + +# Operating system (build VM template) +# os: Windows Server 2012 R2 +os: Visual Studio 2017 + +# Platform. +# platform: +# - x64 +# - x86 + +clone_folder: c:\gopath\src\github.com\robotn\gohook + +# Environment variables +environment: + global: + GOPATH: C:\gopath + CC: gcc.exe + matrix: + - GOARCH: amd64 + # GOVERSION: 1.9.3 + GETH_ARCH: amd64 + MSYS2_ARCH: x86_64 + MSYS2_BITS: 64 + MSYSTEM: MINGW64 + PATH: C:\msys64\mingw64\bin\;C:\Program Files (x86)\NSIS\;%PATH% + - GOARCH: 386 + # GOVERSION: 1.9.3 + GETH_ARCH: 386 + MSYS2_ARCH: i686 + MSYS2_BITS: 32 + MSYSTEM: MINGW32 + PATH: C:\msys64\mingw32\bin\;C:\Program Files (x86)\NSIS\;%PATH% + # - COMPILER: MINGW_W64 + # ARCHITECTURE: x64 + GOVERSION: 1.10.4 + # GOPATH: c:\gopath + +# scripts that run after cloning repository +# install: +# - set PATH=%GOPATH%\bin;c:\go\bin;%PATH% +# - go version +# - go env +# - gcc --version + # - python --version + +install: + - set PATH=%GOPATH%\bin;c:\go\bin;%PATH% + - git submodule update --init + - rmdir C:\go /s /q + - appveyor DownloadFile https://storage.googleapis.com/golang/go%GOVERSION%.windows-%GETH_ARCH%.zip + - 7z x go%GOVERSION%.windows-%GETH_ARCH%.zip -y -oC:\ > NUL + - go version + - go env + - gcc --version + +# To run your custom scripts instead of automatic MSBuild +build_script: + # We need to disable firewall - https://github.com/appveyor/ci/issues/1579#issuecomment-309830648 + - ps: Disable-NetFirewallRule -DisplayName 'File and Printer Sharing (SMB-Out)' + - cd c:\gopath\src\github.com\robotn\gohook + - git branch + - go get -t ./... + +# To run your custom scripts instead of automatic tests +test_script: + # Unit tests + - ps: Add-AppveyorTest "Unit Tests" -Outcome Running + - go test -u github.com/robotn/gohook... + - ps: Update-AppveyorTest "Unit Tests" -Outcome Passed + +# notifications: +# - provider: Email +# to: +# - .io +# on_build_failure: true +# on_build_status_changed: true +# to disable deployment +deploy: off diff --git a/vendor/github.com/robotn/gohook/circle.yml b/vendor/github.com/robotn/gohook/circle.yml new file mode 100644 index 0000000..7570316 --- /dev/null +++ b/vendor/github.com/robotn/gohook/circle.yml @@ -0,0 +1,19 @@ +version: 2 + +jobs: + build: + docker: + # using custom image, see .circleci/images/primary/Dockerfile + - image: govgo/robotgoci:1.10.3 + working_directory: /gopath/src/github.com/robotn/gohook + steps: + - checkout + # specify any bash command here prefixed with `run: ` + # override: + # './...' is a relative pattern which means all subdirectories + # - run: go get -u golang.org/x/sys/unix + - run: go get -v -t -d ./... + - run: go test -v ./... + # codecov.io + # - run: go test -v -covermode=count -coverprofile=coverage.out + # - run: bash <(curl -s https://codecov.io/bash) \ No newline at end of file diff --git a/vendor/github.com/robotn/gohook/event/goEvent.h b/vendor/github.com/robotn/gohook/event/goEvent.h index b3467fb..ecff854 100644 --- a/vendor/github.com/robotn/gohook/event/goEvent.h +++ b/vendor/github.com/robotn/gohook/event/goEvent.h @@ -12,6 +12,7 @@ #include #endif +#include #include "pub.h" diff --git a/vendor/github.com/robotn/gohook/hook.go b/vendor/github.com/robotn/gohook/hook.go index a5b3b91..0613cb0 100644 --- a/vendor/github.com/robotn/gohook/hook.go +++ b/vendor/github.com/robotn/gohook/hook.go @@ -1,19 +1,30 @@ +// Copyright 2016 The go-vgo Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// https://github.com/go-vgo/robotgo/blob/master/LICENSE +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + package hook /* #cgo darwin CFLAGS: -x objective-c -Wno-deprecated-declarations -#cgo darwin LDFLAGS: -framework Cocoa +#cgo darwin LDFLAGS: -framework Cocoa + #cgo linux CFLAGS:-I/usr/src #cgo linux LDFLAGS: -L/usr/src -lX11 -lXtst #cgo linux LDFLAGS: -lX11-xcb -lxcb -lxcb-xkb -lxkbcommon -lxkbcommon-x11 -#cgo windows LDFLAGS: -lgdi32 -luser32 +//#cgo windows LDFLAGS: -lgdi32 -luser32 #include "event/goEvent.h" // #include "event/hook_async.h" */ import "C" -import( +import ( // "fmt" "unsafe" ) @@ -21,15 +32,15 @@ import( // AddEvent add event listener func AddEvent(key string) int { cs := C.CString(key) - + defer C.free(unsafe.Pointer(cs)) + eve := C.add_event(cs) geve := int(eve) - defer C.free(unsafe.Pointer(cs)) return geve } // StopEvent stop event listener func StopEvent() { C.stop_event() -} \ No newline at end of file +} diff --git a/vendor/github.com/robotn/gohook/hook/darwin/event_c.h b/vendor/github.com/robotn/gohook/hook/darwin/event_c.h index c621b71..0497aec 100644 --- a/vendor/github.com/robotn/gohook/hook/darwin/event_c.h +++ b/vendor/github.com/robotn/gohook/hook/darwin/event_c.h @@ -1,3 +1,10 @@ +/* Copyright (C) 2006-2017 Alexander Barker. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. +*/ #ifdef HAVE_CONFIG_H #include diff --git a/vendor/github.com/robotn/gohook/hook/darwin/hook_c.h b/vendor/github.com/robotn/gohook/hook/darwin/hook_c.h index cb8b609..474bef0 100644 --- a/vendor/github.com/robotn/gohook/hook/darwin/hook_c.h +++ b/vendor/github.com/robotn/gohook/hook/darwin/hook_c.h @@ -1,3 +1,10 @@ +/* Copyright (C) 2006-2017 Alexander Barker. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. +*/ #ifdef HAVE_CONFIG_H #include diff --git a/vendor/github.com/robotn/gohook/hook/darwin/input.h b/vendor/github.com/robotn/gohook/hook/darwin/input.h index a841070..9037515 100644 --- a/vendor/github.com/robotn/gohook/hook/darwin/input.h +++ b/vendor/github.com/robotn/gohook/hook/darwin/input.h @@ -1,3 +1,10 @@ +/* Copyright (C) 2006-2017 Alexander Barker. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. +*/ #ifndef _included_input_helper #define _included_input_helper diff --git a/vendor/github.com/robotn/gohook/hook/darwin/input_c.h b/vendor/github.com/robotn/gohook/hook/darwin/input_c.h index 298f67f..d884381 100644 --- a/vendor/github.com/robotn/gohook/hook/darwin/input_c.h +++ b/vendor/github.com/robotn/gohook/hook/darwin/input_c.h @@ -1,3 +1,10 @@ +/* Copyright (C) 2006-2017 Alexander Barker. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. +*/ #ifdef HAVE_CONFIG_H #include diff --git a/vendor/github.com/robotn/gohook/hook/darwin/properties_c.h b/vendor/github.com/robotn/gohook/hook/darwin/properties_c.h index 0a7679c..89559e6 100644 --- a/vendor/github.com/robotn/gohook/hook/darwin/properties_c.h +++ b/vendor/github.com/robotn/gohook/hook/darwin/properties_c.h @@ -1,3 +1,10 @@ +/* Copyright (C) 2006-2017 Alexander Barker. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. +*/ #ifdef HAVE_CONFIG_H #include diff --git a/vendor/github.com/robotn/gohook/hook/iohook.h b/vendor/github.com/robotn/gohook/hook/iohook.h index db0ba8b..022c2a1 100644 --- a/vendor/github.com/robotn/gohook/hook/iohook.h +++ b/vendor/github.com/robotn/gohook/hook/iohook.h @@ -1,3 +1,10 @@ +/* Copyright (C) 2006-2017 Alexander Barker. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. +*/ #ifndef __IOHOOK_H #define __IOHOOK_H diff --git a/vendor/github.com/robotn/gohook/hook/logger_c.h b/vendor/github.com/robotn/gohook/hook/logger_c.h index 8752245..7ea2c9a 100644 --- a/vendor/github.com/robotn/gohook/hook/logger_c.h +++ b/vendor/github.com/robotn/gohook/hook/logger_c.h @@ -1,3 +1,10 @@ +/* Copyright (C) 2006-2017 Alexander Barker. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. +*/ #ifdef HAVE_CONFIG_H #include diff --git a/vendor/github.com/robotn/gohook/hook/windows/event_c.h b/vendor/github.com/robotn/gohook/hook/windows/event_c.h index 2eb51f6..c1128fc 100644 --- a/vendor/github.com/robotn/gohook/hook/windows/event_c.h +++ b/vendor/github.com/robotn/gohook/hook/windows/event_c.h @@ -1,3 +1,10 @@ +/* Copyright (C) 2006-2017 Alexander Barker. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. +*/ #ifdef HAVE_CONFIG_H #include diff --git a/vendor/github.com/robotn/gohook/hook/windows/hook_c.h b/vendor/github.com/robotn/gohook/hook/windows/hook_c.h index ed15515..ec36bc8 100644 --- a/vendor/github.com/robotn/gohook/hook/windows/hook_c.h +++ b/vendor/github.com/robotn/gohook/hook/windows/hook_c.h @@ -1,3 +1,10 @@ +/* Copyright (C) 2006-2017 Alexander Barker. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. +*/ #ifdef HAVE_CONFIG_H #include diff --git a/vendor/github.com/robotn/gohook/hook/windows/input.h b/vendor/github.com/robotn/gohook/hook/windows/input.h index 6ba9817..8420d9a 100644 --- a/vendor/github.com/robotn/gohook/hook/windows/input.h +++ b/vendor/github.com/robotn/gohook/hook/windows/input.h @@ -1,3 +1,11 @@ +/* Copyright (C) 2006-2017 Alexander Barker. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. +*/ + /*********************************************************************** Input ***********************************************************************/ diff --git a/vendor/github.com/robotn/gohook/hook/windows/input_c.h b/vendor/github.com/robotn/gohook/hook/windows/input_c.h index f061b1b..c261c87 100644 --- a/vendor/github.com/robotn/gohook/hook/windows/input_c.h +++ b/vendor/github.com/robotn/gohook/hook/windows/input_c.h @@ -1,3 +1,10 @@ +/* Copyright (C) 2006-2017 Alexander Barker. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. +*/ #ifdef HAVE_CONFIG_H #include diff --git a/vendor/github.com/robotn/gohook/hook/windows/properties_c.h b/vendor/github.com/robotn/gohook/hook/windows/properties_c.h index 3c8ea2b..c9f2c74 100644 --- a/vendor/github.com/robotn/gohook/hook/windows/properties_c.h +++ b/vendor/github.com/robotn/gohook/hook/windows/properties_c.h @@ -1,3 +1,10 @@ +/* Copyright (C) 2006-2017 Alexander Barker. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. +*/ #ifdef HAVE_CONFIG_H #include diff --git a/vendor/github.com/robotn/gohook/hook/x11/event_c.h b/vendor/github.com/robotn/gohook/hook/x11/event_c.h index 50e5ede..85d5593 100644 --- a/vendor/github.com/robotn/gohook/hook/x11/event_c.h +++ b/vendor/github.com/robotn/gohook/hook/x11/event_c.h @@ -1,3 +1,10 @@ +/* Copyright (C) 2006-2017 Alexander Barker. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. +*/ #ifdef HAVE_CONFIG_H #include diff --git a/vendor/github.com/robotn/gohook/hook/x11/hook_c.h b/vendor/github.com/robotn/gohook/hook/x11/hook_c.h index 4be4b60..4733051 100644 --- a/vendor/github.com/robotn/gohook/hook/x11/hook_c.h +++ b/vendor/github.com/robotn/gohook/hook/x11/hook_c.h @@ -1,3 +1,10 @@ +/* Copyright (C) 2006-2017 Alexander Barker. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. +*/ #ifdef HAVE_CONFIG_H #include diff --git a/vendor/github.com/robotn/gohook/hook/x11/input.h b/vendor/github.com/robotn/gohook/hook/x11/input.h index 905983f..49940de 100644 --- a/vendor/github.com/robotn/gohook/hook/x11/input.h +++ b/vendor/github.com/robotn/gohook/hook/x11/input.h @@ -1,3 +1,10 @@ +/* Copyright (C) 2006-2017 Alexander Barker. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. +*/ #define USE_XKBCOMMON 0 //#define _included_input_helper 0 diff --git a/vendor/github.com/robotn/gohook/hook/x11/input_c.h b/vendor/github.com/robotn/gohook/hook/x11/input_c.h index 8d7f39d..e132d03 100644 --- a/vendor/github.com/robotn/gohook/hook/x11/input_c.h +++ b/vendor/github.com/robotn/gohook/hook/x11/input_c.h @@ -1,3 +1,10 @@ +/* Copyright (C) 2006-2017 Alexander Barker. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. +*/ #ifdef HAVE_CONFIG_H #include diff --git a/vendor/github.com/robotn/gohook/hook/x11/properties_c.h b/vendor/github.com/robotn/gohook/hook/x11/properties_c.h index 9358143..8a94b92 100644 --- a/vendor/github.com/robotn/gohook/hook/x11/properties_c.h +++ b/vendor/github.com/robotn/gohook/hook/x11/properties_c.h @@ -1,3 +1,10 @@ +/* Copyright (C) 2006-2017 Alexander Barker. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. +*/ #ifdef HAVE_CONFIG_H #include diff --git a/window/window.h b/window/window.h index 8041a4b..840e19f 100644 --- a/window/window.h +++ b/window/window.h @@ -663,7 +663,7 @@ char* get_title_by_hand(MData m_data){ char* name = m_data.Title; char* str = (char*)calloc(100, sizeof(char*)); - if(str)strcpy(str, name); + if(str)strcpy(str, name); return str; }