Repository navigation
Building the Application
In order for the application to run with the option for a graphical user interface (GUI), two Go-based GTK4/Adwaita package dependencies are required.
While these packages will get installed automatically during project setup, they require a one-time C-based local compilation, which can take ~15-20 minutes to complete. Please be patient.
For the curious, the package used by the Go language for managing C-based sources--such as those used in the GTK4 projects above--is called
cgo.
As of this writing, a number of runtime warnings are generated by the cgo package which can visually interfere with the application runtime/logging output. If it's desired to suppress these compiler package warnings, be sure to set the following environment variable before building the application:
export CGO_CFLAGS="-w"Note that this export is not required for a successful build: it simply removes any external package warnings from being displayed when running theble-sync-cycle executable
-
Clone the repository and then change into the project directory:
git clone https://github.com/richbl/go-ble-sync-cycle cd go-ble-sync-cycle
-
Install Go package dependencies for the project:
go mod tidy -
Build the application:
go build -v ./cmd/ble-sync-cycleNote the use of the
-v(or--verbose) flag. This is useful the very first time the application is compiled, as it can take time to compile the application (~15-20 minutes). While this flag is optional, it's helpful to visually track the progression of this lengthy build processTo build an optimized executable (reduced binary size), run the following command:
go build -ldflags="-s -w" -v ./cmd/ble-sync-cycleThe resulting
buildcommand will create theble-sync-cycleexecutable in the current directory.
The BLE Sync Cycle Project Wiki