mirror of https://gitlab.com/nakst/essence
replace uxn sh with script
This commit is contained in:
parent
f08fef727b
commit
56dfdc8cb3
|
@ -0,0 +1,19 @@
|
|||
#import "util/get_source.script" get_source;
|
||||
|
||||
str targetName #option;
|
||||
str toolchainPrefix #option;
|
||||
int processorCount #option;
|
||||
|
||||
void Start() {
|
||||
PathDeleteRecursively("bin/uxn");
|
||||
PathDeleteRecursively("bin/noodle");
|
||||
assert SystemShellExecute("git clone https://git.sr.ht/~rabbits/uxn bin/uxn");
|
||||
assert SystemShellExecute("git clone https://git.sr.ht/~rabbits/noodle bin/noodle");
|
||||
assert SystemShellExecuteWithWorkingDirectory("bin/uxn", "git checkout d2cf7213d0287f9777fac583f6889ee18b188f8d");
|
||||
assert SystemShellExecuteWithWorkingDirectory("bin/noodle", "git checkout 17b6b2d48c6fa07adbf25f8c79b0e1b8675be8ad");
|
||||
assert SystemShellExecute("cc -DNDEBUG -Os -g0 -s bin/uxn/src/uxnasm.c -o bin/uxnasm"); // Build the assembler.
|
||||
assert SystemShellExecuteWithWorkingDirectory("bin/noodle", "../uxnasm src/main.tal ../noodle.rom"); // Build the ROM.
|
||||
assert FileWriteAll("bin/uxn/src/devices/ppu.h", "/* removed */");
|
||||
assert SystemShellExecute("%toolchainPrefix%-gcc -DNDEBUG -Os -g0 -s ports/uxn/emulator.c "
|
||||
+ "-ffreestanding -nostdlib -lgcc -z max-page-size=0x1000 -o bin/uxnemu"); // Build the emulator.
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
set -e
|
||||
|
||||
# Get the source.
|
||||
rm -rf bin/uxn bin/noodle
|
||||
git clone https://git.sr.ht/~rabbits/uxn bin/uxn
|
||||
cd bin/uxn
|
||||
git checkout d2cf7213d0287f9777fac583f6889ee18b188f8d
|
||||
cd ../..
|
||||
git clone https://git.sr.ht/~rabbits/noodle bin/noodle
|
||||
cd bin/noodle
|
||||
git checkout 17b6b2d48c6fa07adbf25f8c79b0e1b8675be8ad
|
||||
cd ../..
|
||||
|
||||
# Build the assembler.
|
||||
cc -DNDEBUG -Os -g0 -s bin/uxn/src/uxnasm.c -o bin/uxnasm
|
||||
|
||||
# Build the ROMs.
|
||||
cd bin/noodle
|
||||
../../bin/uxnasm src/main.tal ../../bin/noodle.rom
|
||||
cd ../..
|
||||
|
||||
# Build the emulator.
|
||||
echo > bin/uxn/src/devices/ppu.h
|
||||
x86_64-essence-gcc -DNDEBUG -Os -g0 -s ports/uxn/emulator.c -ffreestanding -nostdlib -lgcc -z max-page-size=0x1000 -o bin/uxnemu
|
Loading…
Reference in New Issue