From c62f7fd81ef137d446a1131db5484a77a273a144 Mon Sep 17 00:00:00 2001 From: vcaesar Date: Sun, 9 Apr 2023 12:40:01 -0700 Subject: [PATCH 1/2] Update README.md and documents --- README.md | 60 +++++++++++-------------------------------------- docs/install.md | 33 +++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 47 deletions(-) create mode 100644 docs/install.md diff --git a/README.md b/README.md index d608c4e..7dadb85 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ RobotGo supports Mac, Windows, and Linux(X11); and robotgo supports arm64 and x8 - [Update](#update) - [Examples](#examples) - [Type Conversion and keys](https://github.com/go-vgo/robotgo/blob/master/docs/keys.md) -- [Cross-Compiling](#crosscompiling) +- [Cross-Compiling](https://github.com/go-vgo/robotgo/blob/master/docs/install.md#crosscompiling) - [Authors](#authors) - [Plans](#plans) - [Donate](#donate) @@ -84,18 +84,13 @@ GCC X11 with the XTest extension (the Xtst library) +"Clipboard": xsel xclip -"Bitmap": -libpng (Just used by bitmap) +"Bitmap": libpng (Just used by the bitmap.) -"Event": +"Event": xcb, xkb, libxkbcommon (Just used by the hook.) -xcb, xkb, libxkbcommon - -"Clipboard": - -xsel xclip ``` ##### Ubuntu: @@ -107,29 +102,34 @@ sudo apt install gcc libc6-dev # x11 sudo apt install libx11-dev xorg-dev libxtst-dev +# Clipboard +sudo apt install xsel xclip + +# # Bitmap sudo apt install libpng++-dev # Hook sudo apt install xcb libxcb-xkb-dev x11-xkb-utils libx11-xcb-dev libxkbcommon-x11-dev libxkbcommon-dev -# Clipboard -sudo apt install xsel xclip ``` ##### Fedora: ```yml +# x11 sudo dnf install libXtst-devel +# Clipboard +sudo dnf install xsel xclip + +# # Bitmap sudo dnf install libpng-devel # Hook sudo dnf install libxkbcommon-devel libxkbcommon-x11-devel xorg-x11-xkb-utils-devel -# Clipboard -sudo dnf install xsel xclip ``` ## Installation: @@ -488,40 +488,6 @@ func main() { } ``` -## CrossCompiling - -##### Windows64 to windows32 - -```Go -SET CGO_ENABLED=1 -SET GOARCH=386 -go build main.go -``` - -#### Other to windows - -Install Requirements (Ubuntu, Just used by bitmap.): - -```bash -sudo apt install gcc-multilib -sudo apt install gcc-mingw-w64 -# fix err: zlib.h: No such file or directory -sudo apt install libz-mingw-w64-dev -``` - -Build the binary: - -```Go -GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ go build -x ./ -``` - -``` -// CC=mingw-w64\x86_64-7.2.0-win32-seh-rt_v5-rev1\mingw64\bin\gcc.exe -// CXX=mingw-w64\x86_64-7.2.0-win32-seh-rt_v5-rev1\mingw64\bin\g++.exe -``` - -Some discussions and questions, please see [issues/228](https://github.com/go-vgo/robotgo/issues/228), [issues/143](https://github.com/go-vgo/robotgo/issues/143). - ## Authors - [The author is vz](https://github.com/vcaesar) diff --git a/docs/install.md b/docs/install.md new file mode 100644 index 0000000..4718707 --- /dev/null +++ b/docs/install.md @@ -0,0 +1,33 @@ +## CrossCompiling + +##### Windows64 to windows32 + +```Go +SET CGO_ENABLED=1 +SET GOARCH=386 +go build main.go +``` + +#### Other to windows + +Install Requirements (Ubuntu): + +```bash +sudo apt install gcc-multilib +sudo apt install gcc-mingw-w64 +# fix err: zlib.h: No such file or directory, Just used by bitmap. +sudo apt install libz-mingw-w64-dev +``` + +Build the binary: + +```Go +GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ go build -x ./ +``` + +``` +// CC=mingw-w64\x86_64-7.2.0-win32-seh-rt_v5-rev1\mingw64\bin\gcc.exe +// CXX=mingw-w64\x86_64-7.2.0-win32-seh-rt_v5-rev1\mingw64\bin\g++.exe +``` + +Some discussions and questions, please see [issues/228](https://github.com/go-vgo/robotgo/issues/228), [issues/143](https://github.com/go-vgo/robotgo/issues/143). From 8ea126d35ba63cb2d484dd2b29a47f8ef054618c Mon Sep 17 00:00:00 2001 From: vcaesar Date: Sun, 9 Apr 2023 12:41:44 -0700 Subject: [PATCH 2/2] Update: Update dockerfile and CI --- .circleci/config.yml | 2 +- .circleci/images/primary/Dockerfile | 2 +- appveyor.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 068162c..756e8d0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,7 +5,7 @@ jobs: docker: # using custom image, see .circleci/images/primary/Dockerfile # - image: govgo/robotgoci:1.10.3 - - image: golang:1.20.1 + - image: golang:1.20.3 working_directory: /gopath/src/github.com/go-vgo/robotgo steps: - checkout diff --git a/.circleci/images/primary/Dockerfile b/.circleci/images/primary/Dockerfile index 01b48c9..bc83ff9 100644 --- a/.circleci/images/primary/Dockerfile +++ b/.circleci/images/primary/Dockerfile @@ -1,5 +1,5 @@ # FROM golang:1.10.1 -FROM golang:1.19.4-stretch AS build +FROM golang:1.20.3-stretch AS build # FROM govgo/go:1.11.1 RUN apt update && apt install -y --no-install-recommends \ diff --git a/appveyor.yml b/appveyor.yml index 9f46745..2c2bc64 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -34,7 +34,7 @@ environment: PATH: C:\msys64\mingw32\bin\;C:\Program Files (x86)\NSIS\;%PATH% # - COMPILER: MINGW_W64 # ARCHITECTURE: x64 - GOVERSION: 1.20.1 + GOVERSION: 1.20.3 # GOPATH: c:\gopath # scripts that run after cloning repository