Initial commit

This commit is contained in:
mike 2024-08-03 09:07:09 +01:00
parent 68a4a0945f
commit 6222bde4e5
7 changed files with 62 additions and 1 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
tools/

9
.gitmodules vendored Normal file
View file

@ -0,0 +1,9 @@
[submodule "dformat"]
path = dformat
url = https://github.com/dlang-community/dfmt.git
[submodule "dcd"]
path = dcd
url = https://github.com/dlang-community/DCD.git
[submodule "dscanner"]
path = dscanner
url = https://github.com/dlang-community/D-Scanner.git

View file

@ -1,3 +1,7 @@
# d-setup
Setup D language development environment for linux in a janky fashion
Setup D language development environment for linux in a janky fashion
Will setup DMD and LDC compilers (Can be found in ~/dlang)
Will build DCD, DFormat, DScanner tools for use in jetbrains IDE (can be found in ./tools)

1
dcd Submodule

@ -0,0 +1 @@
Subproject commit 27b1042959c4d1a27787cf502da14970ab821149

1
dformat Submodule

@ -0,0 +1 @@
Subproject commit 0ea0572e86a270bb2d146e3609fbb72c624d32d0

1
dscanner Submodule

@ -0,0 +1 @@
Subproject commit 796d212b05b3178e4c28e68fb4942e14751613e9

44
setup.sh Executable file
View file

@ -0,0 +1,44 @@
#!/bin/bash
ACCENT='\033[1;32m'
NC='\033[0m' # No Color
# Update submodules
echo -e "${ACCENT}Updating submodules${NC}\n"
git pull --recurse-submodules
git submodule update --init --recursive
# Setup compilers and activate DMD
echo -e "\n${ACCENT}Setting up compilers${NC}\n"
curl -fsS https://dlang.org/install.sh | bash -s dmd
curl -fsS https://dlang.org/install.sh | bash -s ldc
DMDDIR=$(ls -d ~/dlang/dmd-*/ | head -1)
echo -e "\n${ACCENT}Activating DMD with ${DMDDIR}${NC}\n"
source $DMDDIR/activate
dmd --version
# Build tools
mkdir -p ./tools
echo -e "\n${ACCENT}Building Tools${NC}"
echo -e "\n${ACCENT} - DFormat${NC}\n"
cd dformat
make
mv -f ./bin/dfmt ../tools/dfmt
echo -e "\n${ACCENT} - D-Scanner${NC}\n"
cd ../dscanner
make
mv -f ./bin/dscanner ../tools/dscanner
echo -e "\n${ACCENT} - DCD${NC}\n"
cd ../dcd
make
mv -f ./bin/dcd-client ../tools/dcd-client
mv -f ./bin/dcd-server ../tools/dcd-server
echo -e "\n${ACCENT}Complete"