-
Notifications
You must be signed in to change notification settings - Fork 1
/
winbuild.sh
46 lines (41 loc) · 1.53 KB
/
winbuild.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
build()
{
echo "Compiling Vortex..."
mkdir "$PWD"/bin/build
mkdir "$PWD"/bin/build/interp
mkdir "$PWD"/bin/build/interp/win
clang++ \
-Ofast \
-Wno-everything \
-std=c++20 \
"$PWD"/src/Node/Node.cpp \
"$PWD"/src/Lexer/Lexer.cpp \
"$PWD"/src/Parser/Parser.cpp \
"$PWD"/src/Bytecode/Bytecode.cpp \
"$PWD"/src/Bytecode/Generator.cpp \
"$PWD"/src/VirtualMachine/VirtualMachine.cpp \
"$PWD"/src/utils/utils.cpp \
"$PWD"/main.cpp \
-o "$PWD"/bin/build/interp/win/vortex || { echo 'compilation failed' ; $SHELL; exit 1; }
while true; do
read -p "Do you want to add Vortex to 'C:\Program Files' and built-in modules to C:\Windows\Program Files\vortex\modules'? - this will allow you to call Vortex globally and set it up with built-in modules [y/n] " yn
case $yn in
[Yy]* )
cp "$PWD"/bin/build/interp/win/vortex.exe "C:/Program Files";
mkdir "C:/Program Files/vortex";
mkdir "C:/Program Files/vortex/modules";
echo "Compiling modules...";
cd "Modules";
./build_modules_win.sh;
cd ..;
cp -r "$PWD"/Modules/modules/* "C:/Program Files/vortex/modules";
cp "$PWD"/scripts/win/uninstall.sh "C:/Program Files/vortex";
echo "Added Vortex and standard modules to C:Program Files\vortex - Important: To uninstall, you will need to run uninstall.sh'"; break;;
[Nn]* ) exit;;
* ) echo "Please answer y or n.";;
esac
done
}
build
$SHELL