go-flutter-desktop / Hover

Licence: bsd-3-clause
Hover helps developers to release Flutter applications on desktop.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Hover

Fd
A simple, fast and user-friendly alternative to 'find'
Stars: ✭ 19,851 (+2743.98%)
Mutual labels:  cli, tool
Awesome bot
✅ Validate links in awesome projects
Stars: ✭ 697 (-0.14%)
Mutual labels:  cli, tool
Jql
A JSON Query Language CLI tool
Stars: ✭ 368 (-47.28%)
Mutual labels:  cli, tool
Circleci Cli
Use CircleCI from the command line
Stars: ✭ 297 (-57.45%)
Mutual labels:  cli, tool
Org Formation Cli
Better than landingzones!
Stars: ✭ 471 (-32.52%)
Mutual labels:  cli, tool
Frankenstein
Correct README Redirects
Stars: ✭ 305 (-56.3%)
Mutual labels:  cli, tool
Legit
Git for Humans, Inspired by GitHub for Mac™.
Stars: ✭ 5,682 (+714.04%)
Mutual labels:  cli, tool
Musoq
Use SQL on various data sources
Stars: ✭ 252 (-63.9%)
Mutual labels:  cli, tool
Npkill
List any node_modules directories in your system, as well as the space they take up. You can then select which ones you want to erase to free up space.
Stars: ✭ 5,325 (+662.89%)
Mutual labels:  cli, tool
Jtc
JSON processing utility
Stars: ✭ 425 (-39.11%)
Mutual labels:  cli, tool
Teip
Select partial standard input and replace with the result of another command efficiently
Stars: ✭ 280 (-59.89%)
Mutual labels:  cli, tool
Diskus
A minimal, fast alternative to 'du -sh'
Stars: ✭ 674 (-3.44%)
Mutual labels:  cli, tool
Onefetch
Git repository summary on your terminal
Stars: ✭ 3,680 (+427.22%)
Mutual labels:  cli, tool
Pastel
A command-line tool to generate, analyze, convert and manipulate colors
Stars: ✭ 3,742 (+436.1%)
Mutual labels:  cli, tool
Fastify Cli
Run a Fastify application with one command!
Stars: ✭ 260 (-62.75%)
Mutual labels:  cli, tool
Release It
🚀 Automate versioning and package publishing
Stars: ✭ 4,773 (+583.81%)
Mutual labels:  cli, tool
Hiper
🚀 A statistical analysis tool for performance testing
Stars: ✭ 2,667 (+282.09%)
Mutual labels:  cli, tool
Iponmap
commandline IP location finder
Stars: ✭ 250 (-64.18%)
Mutual labels:  cli, tool
Phpinsights
🔰 Instant PHP quality checks from your console
Stars: ✭ 4,442 (+536.39%)
Mutual labels:  cli, tool
Ferret
Declarative web scraping
Stars: ✭ 4,837 (+592.98%)
Mutual labels:  cli, tool

Hover - Run Flutter apps on the desktop with hot-reload

Hover is a simple build tool to create Flutter desktop applications.

Hover is brand new and under development, it should be considered alpha. Anything can break, please backup your data before using hover

Hover is part of the go-flutter project. Please report issues at the go-flutter issue tracker.

Install

Hover uses Go to build your Flutter application to desktop. Hover itself is also written using the Go language. You will need to install go on your development machine.

Run go version and make sure that your Go version is 1.13 or higher.

Then install hover by running this in your home directory:

GO111MODULE=on go get -u -a github.com/go-flutter-desktop/hover

Or windows:

set GO111MODULE=on
go get -u -a github.com/go-flutter-desktop/hover

Or for powershell:

$env:GO111MODULE="on"; go get -u -a github.com/go-flutter-desktop/hover

Make sure the hover binary is on your PATH (defaults are $GOPATH/bin or $HOME/go/bin)

Run the same command to update when a newer version becomes available.

Install these dependencies:

  • You need to make sure you have a C compiler.
    The recommended C compiler are documented here.

  • You need to make sure you have dependencies of GLFW:

    • On macOS, you need Xcode or Command Line Tools for Xcode (xcode-select --install) for required headers and libraries.
    • On Ubuntu/Debian-like Linux distributions, you need libgl1-mesa-dev xorg-dev packages.
    • On CentOS/Fedora-like Linux distributions, you need libX11-devel libXcursor-devel libXrandr-devel libXinerama-devel mesa-libGL-devel libXi-devel packages.
    • See here for full details.

Getting started with an existing Flutter project

This assumes you have an existing flutter project which you want to run on desktop. If you don't have a project yet, follow the flutter tutorial for setting up a new project first.

Init project for hover

cd into a flutter project.

cd projects/simpleApplication

The first time you use hover for a project, you'll need to initialize the project for use with hover. An argument can be passed to hover init to set the project path. This is usually the path for your project on github or a self-hosted git service. If you are unsure use hover init without a path. You can change the path later.

hover init github.com/my-organization/simpleApplication

This creates the directory go and adds boilerplate files such as Go code and a default logo.

Optionally, you may add plugins to go/cmd/options.go
Optionally, change the logo in go/assets/logo.png, which is used as icon for the window.

Run with hot-reload

To run the application and attach flutter for hot-reload support:

hover run

The hot-reload is manual because you'll need to press 'r' in the terminal to hot-reload the application.

By default, hover uses the file lib/main_desktop.dart as entrypoint. You may specify a different endpoint by using the --target flag.

IDE integration

VSCode

Please try the experimental Hover extension for VSCode.

If you want to manually integrate with VSCode, read this issue.

Emacs

Check hover.el packge for emacs integration.

Build standalone application

To create a standalone release (JIT mode) build run this command:

hover build linux # or darwin or windows

You can create a build for any of the supported OSs using cross-compiling which needs Docker to be installed. Then run the command from above and it will do everything for you.

The output will be in go/build/outputs/linux or windows or darwin.

To start the binary: (replace yourApplicationName with your app name)

./go/build/outputs/linux/yourApplicationName

It's possible to zip the whole dir go/build/outputs/linux and ship it to a different machine.

Packaging

You can package your application for different packaging formats.
First initialize the packaging format:

hover init-packaging linux-appimage

Update the configuration files located in go/packaging/linux-appimage/to your needs.
Then create a build and package it using this command:

hover build linux-appimage

The packaging output is placed in go/build/outputs/linux-appimage/

To get a list of all available packaging formats run:

hover build --help

Flavors

Hover supports different application flavors via --flavor MY_FLAVOR command. If you wish to create a new flavor for you application, simply copy go/hover.yaml into go/hover-MY_FLAVOR.yaml and modify contents as needed. If no flavor is specified, Hover will always default to hover.yaml

hover run --flavor develop || hover build --flavor develop
// hover-develop.yaml

Issues

Please report issues at the go-flutter issue tracker.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].