Documentation ¶
Overview ¶
Package compiler provides an API for acquiring the compiler binaries and compiling Pawn code
Index ¶
- func CompileSource(ctx context.Context, gh *github.Client, ...) (problems build.Problems, result build.Result, err error)
- func CompileWithCommand(cmd *exec.Cmd, workingDir, errorDir string, relative bool) (problems build.Problems, result build.Result, err error)
- func FromCache(meta versioning.DependencyMeta, dir string, platform string, cacheDir string) (compiler download.Compiler, hit bool, err error)
- func FromNet(ctx context.Context, gh *github.Client, meta versioning.DependencyMeta, ...) (compiler download.Compiler, err error)
- func GetCompilerFilename(version, platform, method string) string
- func GetCompilerPackage(ctx context.Context, gh *github.Client, config build.Config, dir string, ...) (compiler download.Compiler, err error)
- func GetCompilerPackageInfo(cacheDir, platform string) (compiler download.Compiler, err error)
- func PrepareCommand(ctx context.Context, gh *github.Client, execDir, cacheDir, platform string, ...) (cmd *exec.Cmd, err error)
- func RunPostBuildCommands(ctx context.Context, cfg build.Config, output io.Writer) (err error)
- func RunPreBuildCommands(ctx context.Context, cfg build.Config, output io.Writer) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompileSource ¶
func CompileSource( ctx context.Context, gh *github.Client, execDir, errorDir, cacheDir, platform string, config build.Config, relative bool, ) ( problems build.Problems, result build.Result, err error, )
CompileSource compiles a given input script to the specified output path using compiler version
func CompileWithCommand ¶
func CompileWithCommand( cmd *exec.Cmd, workingDir, errorDir string, relative bool, ) (problems build.Problems, result build.Result, err error)
CompileWithCommand takes a prepared command and executes it
func FromCache ¶
func FromCache( meta versioning.DependencyMeta, dir string, platform string, cacheDir string, ) (compiler download.Compiler, hit bool, err error)
FromCache attempts to get a compiler package from the cache, `hit` represents success
func FromNet ¶
func FromNet( ctx context.Context, gh *github.Client, meta versioning.DependencyMeta, dir string, platform string, cacheDir string, ) (compiler download.Compiler, err error)
FromNet downloads a compiler package to the cache
func GetCompilerFilename ¶
GetCompilerFilename returns the path to a compiler given its platform and version number.
func GetCompilerPackage ¶
func GetCompilerPackage( ctx context.Context, gh *github.Client, config build.Config, dir string, platform string, cacheDir string, ) (compiler download.Compiler, err error)
GetCompilerPackage downloads and installs a Pawn compiler to a user directory
func GetCompilerPackageInfo ¶
GetCompilerPackageInfo returns the URL for a specific compiler version
func PrepareCommand ¶
func PrepareCommand( ctx context.Context, gh *github.Client, execDir, cacheDir, platform string, config build.Config, ) (cmd *exec.Cmd, err error)
PrepareCommand prepares a build command for compiling the given input script
func RunPostBuildCommands ¶
RunPostBuildCommands executes commands after a build is ran for a certain build config
Types ¶
This section is empty.