How to contribute to the project?
You should start reading the Contributor Guide, the Code of Conduct and the Security Policy.
Project Dependencies
This project primarily utilizes the Go programming language. Presented are the essential Go packages, along with their purposes:
embed: Useful for embedding files within the executable.
encoding/gob: Provides functions for encoding hotkey preferences and other data to a file.
github.com/gen2brain/beeep: Enables update notifications.
github.com/getlantern/systray: Manages system tray functionality.
github.com/go-vgo/robotgo: Simulates keyboard inputs.
github.com/pkg/browser: Facilitates opening of a browser directed to the release page on GitHub.
github.com/tcnksm/go-latest: Helps in retrieving the latest version from GitHub.
golang.design/x/clipboard: Grants access to the system clipboard.
golang.design/x/hotkey: Take care of creating and managing hotkeys.
How to get started
This guide will help you contribute to the Go-TextType project. Follow the steps below to get started:
System setup
Set up the Go SDK.
Install a C-Compiler:
The steps for installing with MSYS2 (recommended) are:
Download and install the latest version of MSYS2.
Once installed, do not use the MSYS terminal that opens
Open “MSYS2 MinGW64” from the start menu
Execute the following commands (if asked for installation options, be sure to choose “all”):
pacman -Syu pacman -S git mingw-w64-x86_64-toolchainYou will need to add /c/Program\ Files/Go/bin and ~/Go/bin to your $PATH, for MSYS2 you can paste the following command into your terminal:
echo "export PATH=\$PATH:/c/Program\ Files/Go/bin:~/Go/bin" >> ~/.bashrc`For the compiler to work on other terminals, you will need to set up the windows
PATH
variable to find these tools.Go to the “Edit the system environment variables” control panel, tap “Advanced” and add “C:\msys64\mingw64\bin” to the
Path list
.
Install UPX:
If you have chocolatey installed, run
choco install upx
from the command line with administrator privileges.If you don't have chocolatey installed, you can get the latest UPX – X64 Win64 version from GitHub and install it.
Get the source code from GitHub
Download the dependencies
Or run:
Build the application
Set the version and build ID
Setting the version and build ID is needed to have a unique version for each build and check the logs.
Clean the application folder
This is done by the build command automatically (see below).
Build the application with upx compression
The UPX compression will reduce the size of the executable by up to 69%. This will increase the startup time.
Or run:
Clean the application and temp files
Or run: