Compiling

From STModWiki

Jump to: navigation, search

[edit] Compiling the mission DLLs using the Front-End tool

-Under the mission menu, select build. Make sure that the mission to be built is the one highlighted. After selecting build, the tool will show output from parsing both the rule and script files in separate windows. To continue with each step of the building process just close these output windows.

[edit] Compiling the mission DLLs Manually:

-A mission is built from 2 source files and a map file: .scp (script file), .rul (rule file), and a .sol (map file).

-Pass the script file to the Script parser as a command line argument (ParseSCR.exe mission.scp).

Note: Both ParseScr.exe and ParseRul.exe require the ScriptInterface.h file be in the working directory (the directory from which you launched the parser).

-The script parser should generate a pair of files (.cpp/.h) corresponding to the name of the .scp file. (It also generates a .def file, but this file is unnecessary for building missions on the PC)

-Pass the .rul file to the Rule Parser as a command line argument (ParseRUL.exe mission.rul).

Note: ParseRul.exe expects the output of ParseScr.exe (the .h and .cpp files) to be in the working directory (the directory from which you launched the parser).

-The Rule Parser should generate an additional .cpp file, corresponding to the name of the .rul file. (For this reason, the .rul and .scp should have different root filenames. missionS.scp, missionR.rul -> missionS.cpp, missionS.h, missionR.cpp)

-Compile the .cpp file generated by the Script Parser into a Win32 DLL with the file extension .dsl.

-Compile the .cpp file generated by the Rule Parser into a Win32 DLL with the file extension .drl.

Note: Your compiler will need to reference the header files provided in the "Include" folder (included with the release of this tool) to compile these files.
Personal tools