mirror of https://gitlab.com/nakst/essence
error propagation from freetype, harfbuzz, musl build scripts
This commit is contained in:
parent
cd44120589
commit
75119ec851
|
@ -1,3 +1,5 @@
|
||||||
|
set -e
|
||||||
|
|
||||||
if [ ! -d "bin/freetype" ]; then
|
if [ ! -d "bin/freetype" ]; then
|
||||||
echo "Downloading FreeType..."
|
echo "Downloading FreeType..."
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
set -e
|
||||||
|
|
||||||
CompileHarfbuzz() {
|
CompileHarfbuzz() {
|
||||||
$CC -c hb-aat-layout.cc -o hb-aat-layout.o
|
$CC -c hb-aat-layout.cc -o hb-aat-layout.o
|
||||||
$CC -c hb-aat-map.cc -o hb-aat-map.o
|
$CC -c hb-aat-map.cc -o hb-aat-map.o
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
set -e
|
||||||
|
|
||||||
if [ ! -d "bin/musl" ]; then
|
if [ ! -d "bin/musl" ]; then
|
||||||
echo "Downloading Musl..."
|
echo "Downloading Musl..."
|
||||||
|
|
||||||
|
|
38
util/build.c
38
util/build.c
|
@ -153,30 +153,19 @@ int CallSystemF(const char *format, ...) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BuildAPIDependencies() {
|
bool BuildAPIDependencies() {
|
||||||
if (CheckDependencies("API Header")) {
|
if (CheckDependencies("API Header")) {
|
||||||
CallSystem("bin/build_core headers");
|
CallSystem("bin/build_core headers");
|
||||||
ParseDependencies("bin/dependency_files/api_header.d", "API Header", false);
|
ParseDependencies("bin/dependency_files/api_header.d", "API Header", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
CallSystem("ports/musl/build.sh " TARGET_NAME);
|
if (CallSystem("ports/musl/build.sh " TARGET_NAME)) return false;
|
||||||
|
if (CallSystem(TOOLCHAIN_PREFIX "-gcc -c desktop/crt1.c -o cross/lib/gcc/" TOOLCHAIN_PREFIX "/" GCC_VERSION "/crt1.o")) return false;
|
||||||
FILE *f = fopen("bin/Object Files/crt1.o", "rb");
|
if (CallSystem(TOOLCHAIN_PREFIX "-gcc -c desktop/crtglue.c -o cross/lib/gcc/" TOOLCHAIN_PREFIX "/" GCC_VERSION "/crtglue.o")) return false;
|
||||||
|
if (CallSystem("ports/freetype/build.sh " TARGET_NAME)) return false;
|
||||||
if (f) {
|
if (CallSystem("ports/harfbuzz/build.sh " TARGET_NAME)) return false;
|
||||||
fclose(f);
|
if (CallSystem("cp -p kernel/module.h root/Applications/POSIX/include")) return false;
|
||||||
} else {
|
return true;
|
||||||
CallSystem("mkdir -p root/Applications/POSIX/lib");
|
|
||||||
CallSystem(TOOLCHAIN_PREFIX "-gcc -c desktop/crt1.c -o bin/Object\\ Files/crt1.o");
|
|
||||||
CallSystem("cp bin/Object\\ Files/crt1.o root/Applications/POSIX/lib");
|
|
||||||
CallSystem(TOOLCHAIN_PREFIX "-gcc -c desktop/crtglue.c -o bin/Object\\ Files/crtglue.o");
|
|
||||||
CallSystem("cp bin/Object\\ Files/crtglue.o root/Applications/POSIX/lib");
|
|
||||||
}
|
|
||||||
|
|
||||||
CallSystem("ports/freetype/build.sh " TARGET_NAME);
|
|
||||||
CallSystem("ports/harfbuzz/build.sh " TARGET_NAME);
|
|
||||||
|
|
||||||
CallSystem("cp -p kernel/module.h root/Applications/POSIX/include");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OutputStartOfBuildINI(FILE *f, bool forceDebugBuildOff) {
|
void OutputStartOfBuildINI(FILE *f, bool forceDebugBuildOff) {
|
||||||
|
@ -254,7 +243,10 @@ void SaveConfig();
|
||||||
void Compile(uint32_t flags, int partitionSize, const char *volumeLabel) {
|
void Compile(uint32_t flags, int partitionSize, const char *volumeLabel) {
|
||||||
buildStartTimeStamp = time(NULL);
|
buildStartTimeStamp = time(NULL);
|
||||||
BuildUtilities();
|
BuildUtilities();
|
||||||
BuildAPIDependencies();
|
|
||||||
|
if (!BuildAPIDependencies()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
LoadOptions();
|
LoadOptions();
|
||||||
|
|
||||||
|
@ -795,7 +787,11 @@ void BuildCrossCompiler() {
|
||||||
|
|
||||||
{
|
{
|
||||||
BuildUtilities();
|
BuildUtilities();
|
||||||
BuildAPIDependencies();
|
|
||||||
|
if (!BuildAPIDependencies()) {
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
FILE *f = fopen("bin/build.ini", "wb");
|
FILE *f = fopen("bin/build.ini", "wb");
|
||||||
OutputStartOfBuildINI(f, false);
|
OutputStartOfBuildINI(f, false);
|
||||||
fprintf(f, "[general]\nwithout_kernel=1\n");
|
fprintf(f, "[general]\nwithout_kernel=1\n");
|
||||||
|
|
Loading…
Reference in New Issue