-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjustfile
More file actions
133 lines (110 loc) · 5.12 KB
/
Copy pathjustfile
File metadata and controls
133 lines (110 loc) · 5.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
GENERATOR := "Ninja"
build:
cd build && ninja -j8
config backend="AUTO" bezel_native="OFF":
mkdir -p build
cd build && cmake -G "{{ GENERATOR }}" \
-DCMAKE_C_COMPILER=/usr/bin/clang \
-DCMAKE_CXX_COMPILER=/usr/bin/clang++ \
-DCMAKE_C_COMPILER_LAUNCHER= \
-DCMAKE_CXX_COMPILER_LAUNCHER= \
-DBACKEND={{ backend }} \
-DBEZEL_NATIVE={{ bezel_native }} \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
..
target target backend="AUTO" bezel_native="OFF":
mkdir -p build
cd build && cmake -G "{{ GENERATOR }}" \
-DBACKEND={{ backend }} \
-DBEZEL_NATIVE={{ bezel_native }} \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_C_COMPILER_LAUNCHER= \
-DCMAKE_CXX_COMPILER_LAUNCHER= \
..
cd build && ninja -j8 {{ target }}
run test="" backend="AUTO" bezel_native="OFF":
test_dir="{{ test }}"; if [ -z "$test_dir" ]; then test_dir="$(tr -d '\n' < tests/default.txt)"; fi; cd "tests/$test_dir" && atlas script compile && cd "../.."; MTL_HUD_ENABLED=0 ./build/bin/atlasrun "tests/$test_dir/project.atlas"
addTest name:
test_dir="tests/{{ name }}"; [ ! -e "$test_dir" ] || { echo "Test already exists: $test_dir" >&2; exit 1; }; mkdir -p "$test_dir/assets/scripts" && cp tests/simple/project.atlas "$test_dir/project.atlas" && cp tests/simple/main.ascene "$test_dir/main.ascene" && cp tests/simple/assets/scripts/simpleLog.ts "$test_dir/assets/scripts/simpleLog.ts" && (cd "$test_dir" && cargo run --quiet --manifest-path ../../cli/Cargo.toml -- script init) && rm -f "$test_dir/lib/atlas.d.ts" && ln -s ../../../runtime/atlas.d.ts "$test_dir/lib/atlas.d.ts"
debug backend="AUTO" bezel_native="OFF":
just build {{ backend }} {{ bezel_native }}
MTL_HUD_ENABLED=1 ./build/bin/atlas_test
clangd backend="AUTO" bezel_native="OFF":
mkdir -p build
cd build && cmake -G "{{ GENERATOR }}" \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DBACKEND={{ backend }} \
-DBEZEL_NATIVE={{ bezel_native }} \
-DCMAKE_C_COMPILER_LAUNCHER= \
-DCMAKE_CXX_COMPILER_LAUNCHER= \
..
ln -sf build/compile_commands.json compile_commands.json
lint:
run-clang-tidy -p build -quiet -warnings-as-errors='*'
clean:
rm -rf build include/atlas/core/default_shaders.h docs/html
frametest:
just build
timeout 2 ./build/bin/atlas_test
cli:
cargo build
copy-cli:
cargo build --release
cp target/release/atlas /usr/local/bin/atlas
package-debug-macos args="":
ATLAS_ALLOW_UNNOTARIZED_RELEASE=1 ./scripts/package_app.py --debug --macOS
package-release-macos:
ATLAS_ALLOW_UNNOTARIZED_RELEASE=1 ./scripts/package_app.py --release --macOS
release-macos:
ATLAS_ALLOW_UNNOTARIZED_RELEASE=1 ./scripts/package_app.py --release --macOS
./scripts/sign_macos_local.py
release-metal:
rm -rf build/release-metal
mkdir -p build/release-metal dist/release
cd build/release-metal && cmake -G "{{ GENERATOR }}" \
-DCMAKE_BUILD_TYPE=Release \
-DBACKEND=METAL \
-DCMAKE_C_COMPILER_LAUNCHER= \
-DCMAKE_CXX_COMPILER_LAUNCHER= \
../..
cd build/release-metal && ninja -j8
release-opengl:
rm -rf build/release-opengl
mkdir -p build/release-opengl dist/release
cd build/release-opengl && cmake -G "{{ GENERATOR }}" \
-DCMAKE_BUILD_TYPE=Release \
-DBACKEND=OPENGL \
-DCMAKE_C_COMPILER_LAUNCHER= \
-DCMAKE_CXX_COMPILER_LAUNCHER= \
../..
cd build/release-opengl && ninja -j8 atlas bezel finewave aurora hydra opal photon graphite
release-vulkan:
rm -rf build/release-vulkan
mkdir -p build/release-vulkan dist/release
cd build/release-vulkan && cmake -G "{{ GENERATOR }}" \
-DCMAKE_BUILD_TYPE=Release \
-DBACKEND=VULKAN \
-DCMAKE_C_COMPILER_LAUNCHER= \
-DCMAKE_CXX_COMPILER_LAUNCHER= \
../..
cd build/release-vulkan && ninja -j8 atlas bezel finewave aurora hydra opal photon graphite
docs backend="AUTO":
mkdir -p build
doxygen -w html header.html delete.html delete.css
rm delete.html delete.css
cd build && cmake -G "{{ GENERATOR }}" \
-DBACKEND={{ backend }} \
-DCMAKE_C_COMPILER_LAUNCHER= \
-DCMAKE_CXX_COMPILER_LAUNCHER= \
..
cp header.html build/_deps/doxygen-awesome-css-src/header.html
rm header.html
doxygen Doxyfile
release backend="AUTO":
if [ "{{ backend }}" = "AUTO" ] || [ "{{ backend }}" = "all" ] || [ "{{ backend }}" = "ALL" ]; then just release-metal && just release-opengl && just release-vulkan; elif [ "{{ backend }}" = "metal" ] || [ "{{ backend }}" = "METAL" ]; then just release-metal; elif [ "{{ backend }}" = "opengl" ] || [ "{{ backend }}" = "OPENGL" ]; then just release-opengl; elif [ "{{ backend }}" = "vulkan" ] || [ "{{ backend }}" = "VULKAN" ]; then just release-vulkan; else echo "Unknown backend '{{ backend }}'. Use AUTO|metal|opengl|vulkan" && exit 1; fi
run-docs:
just docs
python3 -m http.server 8000 --directory docs/html
editor backend="AUTO" bezel_native="OFF":
just target AtlasEditor {{ backend }} {{ bezel_native }}
"./build/bin/Atlas Engine.app/Contents/MacOS/Atlas Engine"