Skip to content

Development guide

wrycu edited this page May 9, 2020 · 12 revisions

Development

Notice

Code is written pretty badly and poorly documented, so, sorry for that in advance.

develop branch is used for development and pre-releases, usually when Release Candidate works well I merge the develop back into master and push out Release build.

qt_ui branch is a work in progress rework of the project. See the last part of this page to get started with this branch.


Develop Branch

How to:

  1. Clone the repository
  2. Copy DCS loadout files from release bundle ./resources/payloads (originally they were scattered around DCS folder)
  3. Check out develop branch.
  4. Verify requirements are installed (pip install -r requirements.txt)

And, finally, to actually run application from source files, you would need to execute __init__.py and provide a few arguments: User profile "Saved Games" directory location (usually %UserProfile%\Saved Games), application version (for the logs and save compatibility check, just use dev for development) and --stdout (so that debug output would go into console).

Making a release

  • You need pyinstaller.exe in the $PATH for mkrelease.py (in resources/tools) to work.

Run mkrelease.py from the root folder, it will prompt you for version number, and package up everything into zip file under ./build folder.

Required arguments:

  • Saved Games path. Usually %UserProfile%\Saved Games
  • Version string. For the development use dev

Supported options:

  • --stdout - console output, no exception handler
  • --force-stable-DCS - force using DCS instead of DCS.openbeta
  • --ignore-save - don't load saved game on startup

Tools in resources/tools:

  • generate_landmap.py - will generate landmap polygons from cau|gulf_terrain.miz and save them to `../cau|gulflandmap.p". Polygons are constructed from USA units in the mission files, first being a overall landmap, and others are exclusion zones (like lakes and whatnot). Used to determine units placement (so ground vehicles won't end up in a sea or lake)
  • generate_loadout_check.py - will generate loadout_check.miz mission, which would contain all supported planes in all possible configurations. Used to verify that each plane have correct ordinance
  • miz_diff.py - debugging tool to compare two lua mission files (from .miz files).
  • generate_goundobjectsmap.py - will generate enemy ground assets map from cau|gulf_groundobjects.miz and save them to ../cau|gulf_groundobjects.p. Those static groups and AA units are used to populate the territory with enemy infrastructure and as a targets in strike type of missions. Only a handful of statics are supported. Contrary to other tools must be run from the root directory
  • mkrelease.py - zip up everything into release bundle. Contrary to other tools must be run from the root directory

Other resources files:

  • default_options.lua - default options file for missions.

Qt UI Branch:

Install Python 3.7+

To get started and launch the app :

  1. Clone the repository, and the qt_ui branch
  2. Run pip install requirement.txt to install dependencies
  3. Run the file main.py with the following settings:

image