-
-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
meta: Streamlined build instruction and readme.
- Loading branch information
1 parent
6b7280f
commit 1525171
Showing
10 changed files
with
145 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,3 @@ __pycache__/ | |
.vscode/ | ||
.DS_Store | ||
.python-version | ||
src/protos/*.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
from cutekit.cmds import Cmd, append | ||
from cutekit.args import Args | ||
from cutekit import shell, vt100 | ||
import subprocess | ||
|
||
|
||
def commandIsAvailable(cmd: str) -> bool: | ||
print(f"Checking if {cmd} is available...", end="") | ||
try: | ||
cmd = shell.latest(cmd) | ||
out = subprocess.check_output([cmd, "--version"]) | ||
print(f"{vt100.GREEN} ok{vt100.RESET}") | ||
print( | ||
f"{vt100.BRIGHT_BLACK}Command: {cmd}\nVersion: {out.decode('utf-8').strip()}{vt100.RESET}") | ||
print() | ||
return True | ||
except Exception as e: | ||
print(f" {e}") | ||
print(f"{vt100.RED}Error: {cmd} is not available{vt100.RESET}") | ||
return False | ||
|
||
|
||
def doctorCmd(args: Args): | ||
commandIsAvailable("qemu-system-x86_64") | ||
commandIsAvailable("clang") | ||
commandIsAvailable("clang++") | ||
commandIsAvailable("ld.lld") | ||
commandIsAvailable("nasm") | ||
commandIsAvailable("ninja") | ||
commandIsAvailable("chatty") | ||
|
||
|
||
append(Cmd(None, "doctor", "Check if all required commands are available", doctorCmd)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
python-magic ~= 0.4.27 | ||
requests ~= 2.28.0 | ||
graphviz ~= 0.20.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# check for CUTEKIT_NOVENV | ||
if [ "$CUTEKIT_NOVENV" == "1" ]; then | ||
echo "CUTEKIT_NOVENV is set, skipping virtual environment setup." | ||
exec cutekit $@ | ||
fi | ||
|
||
if [ ! -f .cutekit/tools/ready ]; then | ||
echo "Tools not installed." | ||
echo "This script will install the tooling required to build SkiftOS into $PWD/.cutekit" | ||
|
||
if [ ! -t 0 ]; then | ||
read -p "Do you want to continue? [Y/n] " -n 1 -r | ||
echo | ||
if [[ ! $REPLY =~ ^[Yy]$ ]]; then | ||
echo "Aborting." | ||
exit 1 | ||
fi | ||
fi | ||
|
||
mkdir -p .cutekit | ||
|
||
echo "Setting up Python virtual environment..." | ||
python3 -m venv .cutekit/venv | ||
source .cutekit/venv/bin/activate | ||
|
||
echo "Downloading CuteKit & Chatty..." | ||
if [ ! -d .cutekit/tools/cutekit ]; then | ||
git clone --depth 1 https://github.com/cute-engineering/cutekit .cutekit/tools/cutekit | ||
else | ||
echo "CuteKit already downloaded." | ||
fi | ||
|
||
if [ ! -d .cutekit/tools/chatty ]; then | ||
git clone --depth 1 https://github.com/cute-engineering/chatty .cutekit/tools/chatty | ||
else | ||
echo "Chatty already downloaded." | ||
fi | ||
|
||
echo "Installing Dependencies..." | ||
pip3 install -r meta/plugins/requirements.txt | ||
|
||
echo "Installing Tools..." | ||
pip3 install -e .cutekit/tools/cutekit | ||
pip3 install -e .cutekit/tools/chatty | ||
|
||
touch .cutekit/tools/ready | ||
echo "Done!" | ||
fi | ||
|
||
if [ "$1" == "setup" ]; then | ||
exit 0 | ||
fi | ||
|
||
source .cutekit/venv/bin/activate | ||
export PATH="$PATH:.cutekit/venv/bin" | ||
|
||
cutekit $@ |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters