DaedalusCompiler
DaedalusCompiler copied to clipboard
Daedalus ( Gothic I & II scripting language ) Compiler to DAT
Daedalus Compiler
This is repo with Daedalus ( Gothic I, II scripting language ) compiler. Project is using internally ANTL4 for parsing source code. The compiler itself is written in .NET Core C#.
You can listen about our compiler on below video. Video has bad audio quality, we encourage you to turn on subtitles, on the current moment we have subtitles for Polish, German and English language.
Download
Download latest version of the tool
Requirements
- Installed .NET Core 2+ runtime
Standard Usage
- Download & unpack latest release.
- Use dotnet runtime to run the Compiler:
$ dotnet /path/to/DaedalusCompiler/DaedalusCompiler.dll
- Make alias for easy usage. Recommended alias is
gdc
(g
othicd
aedalusc
ompiler).
For example in Linux and MacOS type:
$ alias gdc='dotnet /path/to/DaedalusCompiler/DaedalusCompiler.dll'
Example usage:
- generate
Gothic.dat
file fromGothic.src
file in output directory:
$ gdc /path/to/Gothic.src
- generate
result.dat
file fromGothic.src
file in custom directory, using custom runtime:
$ gdc /path/to/Gothic.src --runtime /path/to/runtime.d --output-dat /path/to/result.dat
- generate
ou.csl
,ou.bin
andGothic.dat
in output directory, ignore warnings W1 and W2:
$ gdc /path/to/Gothic.src --gen-ou --suppress W1:W2
- generate
Gothic.dat
inScripts/_compiled
,ou.csl
andou.bin
inScripts/Content/Cutscene
:
$ gdc /path/to/Gothic.src --output-dat "Scripts/_compiled/Gothic.dat" --gen-ou --output-ou "Scripts/Content/Cutscene"
- generate
Gothic.dat
, enable unused symbol detection, provide zen paths to make that detection more accurate:
$ gdc /path/to/Gothic.src --zen-paths="/path/to/zens/*.zen"
Usage with docker ( .NET Core runtime not needed )
Our compiler is available on docker hub, if you have installed docker you should be able to run compiler with:
docker run -v "$(pwd)":/usr/workspace dziejekhorinis/daedalus-compiler <path-to-gothic-src>
Path which is argument of docker run is relative to folder where we made mount.
Example usage:
docker run -v "$(pwd)":/usr/workspace dziejekhorinis/daedalus-compiler ./Gothic.src
Configure development environment
Project uses ANTLR4 and .NET Core C#.
For .NET Core C# it is recomended to use Visual Studio 2017.
For ANTLR4 you can use InteliJ or Visual Studio Code.
Configure VSCode for ANTLR
- Install Java (I think the best choice will be Java8 SDK).
- Install ANTLR4 VSCode extension.
- Optionally you can install Daedalus VSCode extension.
Now you can open folder /DaedalusCompiler/src/Parser
in VSCode and start contributing Daedalus gramar.
ANTLR 4 VSCode extension helps you developing gramar by syntax coloring, code completion and debugging tools. For more details check out ANTLR 4 VSCode extension site.