Documentation
¶
Overview ¶
Package cmd provides utilities for managing apps and packages that use the Cogent Core framework.
Index ¶
- func Build(c *config.Config) error
- func Changed(c *config.Config) error
- func Install(c *config.Config) error
- func Log(c *config.Config) error
- func NextRelease(c *config.Config) error
- func Pack(c *config.Config) error
- func Pull(c *config.Config) error
- func Release(c *config.Config) error
- func Run(c *config.Config) error
- func SetFFmpegEnv()
- func Setup(c *config.Config) error
- func SetupPackages() []string
- func Test(c *config.Config) error
- func Update(c *config.Config) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Build ¶
Build builds an executable for the package at the config path for the config platforms.
func Changed ¶
Changed concurrently prints all of the repositories within this directory that have been changed and need to be updated in Git.
func Log ¶
Log prints the logs from your app running on Android to the terminal. Android is the only supported platform for log; use the -debug flag on run for other platforms.
func NextRelease ¶
NextRelease releases the project with the current git version tag incremented by one patch version.
func Pack ¶
Pack builds and packages the app for the target platform. For android, ios, and web, it is equivalent to build.
func Run ¶
Run builds and runs the config package. It also displays the logs generated by the app. It uses the same config info as build.
func SetFFmpegEnv ¶
func SetFFmpegEnv()
SetFFmpegEnv sets the environment of the core command for building and running apps with the FFmpeg installed in [ffmpegDir] by core setup -video, if any: its pkg-config files, and its shared libraries for the apps (an rpath on Linux, and the PATH on Windows, for core run). With FFmpeg of Homebrew that is not linked (ffmpeg@9), its pkg-config files.
func Setup ¶
Setup installs platform-specific dependencies for the current platform, and the latest versions of the Go tools for developing with Cogent Core: goimports, goalimports, and goalls (which core update keeps updated). It only needs to be called once per system.
With the video option, it also installs FFmpeg for the video package (cogentcore.org/core/video), which it needs on desktop platforms. With the js option, it installs the tools of the js platform (see web.SetupJS). With the androidsim option, it also installs the Android SDK and makes an Android virtual device for the emulator (see mobile.SetupAndroidSim). With the print option, it only prints the system packages that it installs for the current platform (see SetupPackages).
func SetupPackages ¶
func SetupPackages() []string
SetupPackages returns the system packages that setup installs for the current platform: on Linux, the packages for the package manager of its distribution, and nil on other platforms or an unknown distribution.
func Test ¶
Test runs the tests of the given packages for the target platform, as with go test. For the js platform (core test js), the tests are compiled to JavaScript by GoScript, with the build tags and overrides of core build js, and run in bun, or in Chrome for the packages that say so with a //core:js-test line in a test file (see the goscript package in base), which also has other options. A package pattern with ... only matches the packages that have such a line. The tools are installed first if needed (as by core setup -js).
func Update ¶ added in v0.5.8
Update updates the core command and the tools that it uses to their latest versions: the core command itself (from the main branch, as it is installed), the GoScript compiler and bun that the js platform uses, if they are installed, and the Go tools for developing with Cogent Core (goimports, goalimports, and goalls), which it installs if they are not installed. A tool built from a local source checkout is not replaced unless the force option is set, and the check option only reports which tools have updates. With the video option, it also updates FFmpeg for the video package (see core setup -video).
Types ¶
This section is empty.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package config contains the configuration structs for the Cogent Core tool.
|
Package config contains the configuration structs for the Cogent Core tool. |
|
Package generate provides the generation of useful methods, variables, and constants for Cogent Core code.
|
Package generate provides the generation of useful methods, variables, and constants for Cogent Core code. |
|
Package mobile provides functions for building Cogent Core apps for mobile devices.
|
Package mobile provides functions for building Cogent Core apps for mobile devices. |
|
binres
Package binres implements encoding and decoding of android binary resources.
|
Package binres implements encoding and decoding of android binary resources. |
|
sdkpath
Package sdkpath provides functions for locating the Android SDK.
|
Package sdkpath provides functions for locating the Android SDK. |
|
Package rendericon renders the icon of an app (icon.svg) to an image of a given size.
|
Package rendericon renders the icon of an app (icon.svg) to an image of a given size. |
|
Package web provides functions for building Cogent Core apps for the web.
|
Package web provides functions for building Cogent Core apps for the web. |