Initial commit

This commit is contained in:
2025-11-17 10:28:09 +01:00
parent 7bff81691f
commit 6ee36e26be
391 changed files with 110253 additions and 0 deletions

8
scripts/all.sh Executable file
View File

@@ -0,0 +1,8 @@
(
clear;
sh compileAndRunPreprocessor.sh;
sh compileAndRunApplication.sh;
)

0
scripts/application.dump Normal file
View File

0
scripts/classes.dump Normal file
View File

View File

@@ -0,0 +1,7 @@
(
sh compileApplication.sh;
sh runApplication.sh;
)

View File

@@ -0,0 +1,9 @@
(
sh compilePreprocessor.sh;
sh runPreprocessor.sh;
)

70
scripts/compileApplication.sh Executable file
View File

@@ -0,0 +1,70 @@
(
cd ../application/;
cd demos
: '
tcc -I./ *.c ./examples/example.text.c -o ../../../binaries/example.text
cd ../sqlite3
tcc -I./ *.c ./examples/example.sqlite3.c -o ../../../binaries/example.sqlite3 ../../../libraries/sqlite3/sqlite3.o
cd ../example.multiple.inheritance
tcc -I./ *.c ./examples/example.multiple.inheritance.c -o ../../../binaries/example.multiple.inheritance
cd ../example.console.log
tcc -I./ *.c ./examples/example.console.log.c -o ../../../binaries/example.console.log
cd ../example.file.system
tcc -I./ *.c ./examples/example.file.system.c -o ../../../binaries/example.file.system
'
cd example.opengl
tcc -I./ -I./engine/ -I/usr/include/freetype2 -lfreetype */*.c */*/*.c *.c -o ../../../binaries/example.opengl ../../../libraries/sqlite3/sqlite3.o -lm -lssl -lX11 -lGL -lpng
: '
cd ../example.web.server
#-I/usr/local/ssl/include -L/usr/local/ssl/lib/
sudo tcc -I./ *.c ./examples/example.web.server.c -o ../../../binaries/example.web.server -lssl -lcrypto #-I../../../libraries/openssl/include -L../../../libraries/openssl -I./ ../../../libraries/openssl/libssl.a ../../../libraries/openssl/libcrypto.a # ./libssl.a ./libcrypto.a #-lssl -lcrypto
cd ../example.operator.overload
tcc -I./ *.c ./examples/example.operator.overload.c -o ../../../binaries/example.operator.overload
cd ../example.vector
tcc -I./ *.c ./examples/example.vector.c -o ../../../binaries/example.vector
cd ../../target/
tcc -lGL -lX11 -I/usr/include/freetype2 -lfreetype -lm *.c -pthread -lm -I/home/kaj/Downloads/mesa-18.3.6/include -I../../libraries/sqlite3/ ../../libraries/sqlite3/sqlite3.o -I./ -o ../../binaries/application
cd ../example.vulkan
tcc -I./ *.c ./examples/example.vulkan.c -o ../../../binaries/example.vulkan -lvulkan -lglfw -lxcb -lX11
'
)

10
scripts/compilePreprocessor.sh Executable file
View File

@@ -0,0 +1,10 @@
(
cd ../source;
tcc index.c -Wall -lm -I./ application.c include.c templateInstanceProperty.c templateInstance.c template.c fileManager.c console.c variable.c tools.c array.c function.c codeBundle.c class.c file.c property.c replacement.c argument.c method.c text.c lexer.c fileSystem.c -lpcre -o ../binaries/preprocessor;
)

2
scripts/disassemble.sh Executable file
View File

@@ -0,0 +1,2 @@
cd ../binaries/
objdump -S --disassemble application > application.dump

BIN
scripts/menu Executable file
View File

Binary file not shown.

114
scripts/menu.c Executable file
View File

@@ -0,0 +1,114 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
#define COMPILE_AND_RUN_PREPROCESSOR_AND_APPLICATION "\
#/bin/bash \n\
sh all.sh \n\
"
#define COMPILE_AND_RUN_APPLICATION "\
#/bin/bash \n\
sh compileAndRunApplication.sh \n\
"
#define COMPILE_AND_RUN_PREPROCESSOR "\
#/bin/bash \n\
sh compileAndRunPreprocessor.sh \n\
"
#define COMPILE_APPLICATION "\
#/bin/bash \n\
sh compileApplication.sh \n\
"
#define RUN_APPLICATION "\
#/bin/bash \n\
sh runApplication.sh \n\
"
#define COMPILE_PREPROCESSOR "\
#/bin/bash \n\
sh compilePreprocessor.sh \n\
"
#define RUN_PREPROCESSOR "\
#/bin/bash \n\
sh runPreprocessor.sh \n\
"
int main(int argc, char *argv[])
{
system("clear");
int num;
char * ch;
for(; ;)
{
printf("Enter a choice:\n\n");
printf(" 1: Compile and run preprocessor and your application.\n");
printf(" 2: Compile and run application.\n");
printf(" 3: Compile and run preprocessor.\n");
printf(" 4: Compile application.\n");
printf(" 5: Run application.\n");
printf(" 6: Compile preprocessor.\n");
printf(" 7: run preprocessor.\n\n");
printf(":\n ");
scanf("%d",&num);
switch(num)
{
case 1:
system(COMPILE_AND_RUN_PREPROCESSOR_AND_APPLICATION);
break;
case 2:
system(COMPILE_AND_RUN_APPLICATION);
break;
case 3:
system(COMPILE_AND_RUN_PREPROCESSOR);
break;
case 4:
system(COMPILE_APPLICATION);
break;
case 5:
system(RUN_APPLICATION);
break;
case 6:
system(COMPILE_PREPROCESSOR);
break;
case 7:
system(RUN_PREPROCESSOR);
default:
system(COMPILE_AND_RUN_PREPROCESSOR_AND_APPLICATION);
}
}
exit(1);
return 0;
}

31
scripts/runApplication.sh Executable file
View File

@@ -0,0 +1,31 @@
(
cd ../application/source
cd ../../binaries/
#./application
#./example.text
#./example.sqlite3
#./example.multiple.inheritance
#./example.console.log
#./example.file.system
#./example.operator.overload
#./example.vector
#./example.file.system
#./example.web.server
./example.opengl
#./example.vulkan
)

29
scripts/runPreprocessor.sh Executable file
View File

@@ -0,0 +1,29 @@
(
cd ../source;
#../binaries/preprocessor application.c -o ../application/target/
#../binaries/preprocessor examples/example.text.c -o ../application/demos/text/
#../binaries/preprocessor examples/example.sqlite3.c -o ../application/demos/sqlite3/
#../binaries/preprocessor examples/example.multiple.inheritance.c -o ../application/demos/example.multiple.inheritance/
#../binaries/preprocessor examples/example.console.log.c -o ../application/demos/example.console.log/
#../binaries/preprocessor examples/example.file.system.c -o ../application/demos/example.file.system/
#../binaries/preprocessor examples/example.operator.overload.c -o ../application/demos/example.operator.overload/
#../binaries/preprocessor examples/example.vector.c -o ../application/demos/example.vector/
#../binaries/preprocessor examples/example.web.server.c -o ../application/demos/example.web.server/
../binaries/preprocessor examples/example.opengl.c -o ../application/demos/example.opengl/
#../binaries/preprocessor examples/example.vulkan.c -o ../application/demos/example.vulkan/
)

10
scripts/runServer.sh Normal file
View File

@@ -0,0 +1,10 @@
../binaries/preprocessor examples/example.web.server.c -o ../application/demos/example.web.server/
cd ../application/demos/example.web.server
#-I/usr/local/ssl/include -L/usr/local/ssl/lib/
sudo tcc -I./ *.c ./examples/example.web.server.c -o ../../../binaries/example.web.server -lssl -lcrypto #-I../../../libraries/openssl/include -L../../../libraries/openssl -I./ ../../../libraries/openssl/libssl.a ../../../libraries/openssl/libcrypto.a # ./libssl.a ./libcrypto.a #-lssl -lcrypto
../../../binaries/example.web.server