david@MSI-7D43:~/workspaceToit$ git clone https://github.com/toitlang/pkg-cli.git
... etc ...
david@MSI-7D43:~/workspaceToit$ cd pkg-cli
david@MSI-7D43:~/workspaceToit/pkg-cli$ make all
mkdir -p build
# We need to set a build type, otherwise cmake won't run nicely on Windows.
# The build-type is otherwise unused.
cmake -B build -DCMAKE_BUILD_TYPE=Debug
TPKG: toit.pkg
Failing tests:
Skipped tests:
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: /home/david/workspaceToit/pkg-cli/build
cmake --build build --target install-pkgs
gmake[1]: Entering directory '/home/david/workspaceToit/pkg-cli/build'
gmake[2]: Entering directory '/home/david/workspaceToit/pkg-cli/build'
gmake[3]: Entering directory '/home/david/workspaceToit/pkg-cli/build'
gmake[4]: Entering directory '/home/david/workspaceToit/pkg-cli/build'
gmake[4]: Leaving directory '/home/david/workspaceToit/pkg-cli/build'
gmake[4]: Entering directory '/home/david/workspaceToit/pkg-cli/build'
/bin/sh: 1: toit.pkg: not found
gmake[4]: *** [tests/CMakeFiles/install-pkgs.dir/build.make:70: tests/CMakeFiles/install-pkgs] Error 127
gmake[4]: Leaving directory '/home/david/workspaceToit/pkg-cli/build'
gmake[3]: *** [CMakeFiles/Makefile2:99: tests/CMakeFiles/install-pkgs.dir/all] Error 2
gmake[3]: Leaving directory '/home/david/workspaceToit/pkg-cli/build'
gmake[2]: *** [CMakeFiles/Makefile2:106: tests/CMakeFiles/install-pkgs.dir/rule] Error 2
gmake[2]: Leaving directory '/home/david/workspaceToit/pkg-cli/build'
gmake[1]: *** [Makefile:134: install-pkgs] Error 2
gmake[1]: Leaving directory '/home/david/workspaceToit/pkg-cli/build'
make: *** [Makefile:12: install-pkgs] Error 2
david@MSI-7D43:~/workspaceToit/pkg-cli$
Usage
Usage:
examples/main.toit <command>
cli
make
jag run -d host
jag pkg install
toit.pkg
toit.pkg
jag pkg
toit.run
jag -d host run
toit.compile
toit.compile -o my-exe main.toit
main.toit
david@MSI-7D43:~/workspaceToit/pkg-cli/examples$ jag run -d host main.toit device
calling 'emit'
Error: Missing subcommand.
Manage a particular device.
Use the '--device' option to specify a specific device. Otherwise, the
last used device is used.
... etc
david@MSI-7D43:~/workspaceToit/pkg-cli/examples$ jag run -d host main.toit device --help
Run the specified .toit file on a Jaguar device as a new program. If the
device is already executing another program, that program is stopped before
the new program is started.
If you specify the device to be 'host' with the option '-d host', then the
... etc
--help
main.toit
jag run
--help
jag run -d host -- main.toit device --help
jag run -d host -- main.toit device --help
--
-- Generating done
-- Build files have been written to: /home/david/toit/build/host
make[1]: Leaving directory '/home/david/toit'
(cd build/host && ninja build_tools)
[5/494] Generating sdk/bin/toit.lsp
FAILED: sdk/bin/toit.lsp /home/david/toit/build/host/sdk/bin/toit.lsp
cd /home/david/toit/tools/toitlsp && /usr/bin/cmake -E env GODEBUG=netdns=go GOOS= GOARCH= go build -ldflags \ -X\ main.date=2024-03-26T16:02:22Z\ -X\ main.version=v2.0.0-alpha.143.4+32145fba -tags netgo\ osusergo -o /home/david/toit/build/host/sdk/bin/toit.lsp
No such file or directory
[6/494] Generating sdk/bin/toit.pkg
FAILED: sdk/bin/toit.pkg /home/david/toit/build/host/sdk/bin/toit.pkg
cd /home/david/toit/tools/tpkg && /usr/bin/cmake -E env GODEBUG=netdns=go GOOS= GOARCH= go build -ldflags \ -X\ main.date=2024-03-26T16:02:22Z\ -X\ main.version=v2.0.0-alpha.143.4+32145fba -tags netgo\ osusergo -o /home/david/toit/build/host/sdk/bin/toit.pkg
No such file or directory
[14/494] Building CXX object src/CMakeFiles/toit_core.dir/flash_registry_posix.cc.o
ninja: build stopped: subcommand failed.
cd
david@MSI-7D43:~/toit$ cmake --version
cmake version 3.22.1
--
go --verion
sudo apt install build-essential cmake ninja-build golang
apt
go help