mirror of https://gitlab.com/nakst/essence
				
				
				
			fix building on other systems
This commit is contained in:
		
							parent
							
								
									3ad305c4fd
								
							
						
					
					
						commit
						f53bb37c84
					
				|  | @ -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 | ||||
| 
 | ||||
|  |  | |||
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										18
									
								
								start.sh
								
								
								
								
							
							
						
						
									
										18
									
								
								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. | ||||
|  |  | |||
							
								
								
									
										15
									
								
								util/build.c
								
								
								
								
							
							
						
						
									
										15
									
								
								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; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 nakst
						nakst