diff --git a/ports/gcc/port.sh b/ports/gcc/port.sh index 3eefe7e..d20025d 100755 --- a/ports/gcc/port.sh +++ b/ports/gcc/port.sh @@ -34,7 +34,7 @@ cp ports/gcc/changes/gcc_gcc_config_host_darwin.c bin/gcc-src/gcc/config/host-da cp ports/gcc/changes/gcc_libgcc_config.host bin/gcc-src/libgcc/config.host cp ports/gcc/changes/gcc_libstdc++-v3_configure bin/gcc-src/libstdc++-v3/configure -if [ "$1" == "download-only" ]; then +if [ "$1" = "download-only" ]; then exit 0 fi diff --git a/res/Theme Source.dat b/res/Theme Source.dat index e3ad4f4..16cbbd8 100644 Binary files a/res/Theme Source.dat and b/res/Theme Source.dat differ diff --git a/start.sh b/start.sh index f6a3d36..fbd1405 100755 --- a/start.sh +++ b/start.sh @@ -6,7 +6,16 @@ cd "$(dirname "$0")" # Create the bin directory. mkdir -p bin -if [[ "$OSTYPE" == "darwin"* ]]; then +# Check that we are running on a sensible platform. +uname -o | grep Cygwin > /dev/null +if [ $? -ne 1 ]; then + echo Cygwin is not supported. Please install a modern GNU/Linux distro. + exit +fi + +# Setup for Darwin. +uname -o | grep Darwin > /dev/null +if [ $? -ne 1 ]; then export CC=gcc-11 export CXX=g++-11 export CPPFLAGS=-I/opt/homebrew/include @@ -15,13 +24,6 @@ if [[ "$OSTYPE" == "darwin"* ]]; then alias gcc="gcc-11" alias g++="g++-11" alias sed="gsed" -else - # Check that we are running on a sensible platform. - uname -o | grep Cygwin > /dev/null - if [ $? -ne 1 ]; then - echo Cygwin is not supported. Please install a modern GNU/Linux distro. - exit - fi fi # Check that the source code is valid. diff --git a/util/build.c b/util/build.c index 6e724b4..1a6ff5a 100644 --- a/util/build.c +++ b/util/build.c @@ -36,6 +36,7 @@ bool foundValidCrossCompiler; bool coloredOutput; bool encounteredErrors; bool interactiveMode; +bool canBuildLuigi; FILE *systemLog; char compilerPath[4096]; int argc; @@ -333,15 +334,15 @@ void BuildUtilities() { BUILD_UTILITY("render_svg", "-lm", ""); BUILD_UTILITY("build_core", "-pthread -DPARALLEL_BUILD", ""); -#ifndef __APPLE__ // Luigi doesn't support macOS. - BUILD_UTILITY("config_editor", "-lX11 -Wno-unused-parameter", ""); + if (canBuildLuigi) { + BUILD_UTILITY("config_editor", "-lX11 -Wno-unused-parameter", ""); - if (CheckDependencies("Utilities.Designer")) { - if (!CallSystem("g++ -MMD -D UI_LINUX -O3 util/designer2.cpp -o bin/designer2 -g -lX11 -Wno-unused-parameter " WARNING_FLAGS)) { - ParseDependencies("bin/designer2.d", "Utilities.Designer", false); + if (CheckDependencies("Utilities.Designer")) { + if (!CallSystem("g++ -MMD -D UI_LINUX -O3 util/designer2.cpp -o bin/designer2 -g -lX11 -Wno-unused-parameter " WARNING_FLAGS)) { + ParseDependencies("bin/designer2.d", "Utilities.Designer", false); + } } } -#endif } void Build(int optimise, bool compile) { @@ -1573,6 +1574,8 @@ int main(int _argc, char **_argv) { printf("Enter 'help' to get a list of commands.\n"); char *prev = NULL; + canBuildLuigi = !CallSystem("gcc -o bin/luigi.h.gch util/luigi.h -D UI_IMPLEMENTATION -D UI_LINUX"); + while (true) { char *l = NULL; size_t pos = 0;