update pkg to newest fixed ci

This commit is contained in:
vcaesar 2018-09-17 14:23:05 -04:00
parent 3447822f65
commit f7ea916b21
25 changed files with 246 additions and 10 deletions

1
.gitignore vendored
View File

@ -50,6 +50,7 @@ _testmain.go
!cdeps/mac/libpng.a
!cdeps/win32/libpng.a
!cdeps/win64/libpng.a
cdeps/hook
*.la
*.lo

2
Gopkg.lock generated
View File

@ -54,7 +54,7 @@
branch = "master"
name = "github.com/robotn/gohook"
packages = ["."]
revision = "3dccbf0083168096c576bf62abb3d5d4c916e2ea"
revision = "40c3386427eb558eb26426d3f56ac766c3e32335"
[[projects]]
name = "github.com/shirou/gopsutil"

View File

@ -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)
<!-- This is a work in progress. -->
```Go
package main
@ -8,7 +12,7 @@ package main
import (
"fmt"
"go-vgo/robotn/gohook"
"github.com/robotn/gohook"
)
func main() {

80
vendor/github.com/robotn/gohook/appveyor.yml generated vendored Normal file
View File

@ -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

19
vendor/github.com/robotn/gohook/circle.yml generated vendored Normal file
View File

@ -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)

View File

@ -12,6 +12,7 @@
#include <config.h>
#endif
#include <stdlib.h>
#include "pub.h"

View File

@ -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 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, 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()
}
}

View File

@ -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 <config.h>

View File

@ -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 <config.h>

View File

@ -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

View File

@ -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 <config.h>

View File

@ -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 <config.h>

View File

@ -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

View File

@ -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 <config.h>

View File

@ -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 <config.h>

View File

@ -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 <config.h>

View File

@ -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
***********************************************************************/

View File

@ -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 <config.h>

View File

@ -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 <config.h>

View File

@ -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 <config.h>

View File

@ -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 <config.h>

View File

@ -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

View File

@ -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 <config.h>

View File

@ -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 <config.h>

View File

@ -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;
}