wiki:Development

Version 3 (modified by Henrik Heimbuerger, 9 years ago) (diff)

insert section on how to contribute from the landing page

Internals

This page is a primer on the development process around CortUI and should provide you with your first steps if you want to contribute.

If you're interested in studying how CortUI works, you should also have a look at Internals.

How to contribute

screenshot_LobbySmall.png

You're very welcome to improve the documentation of CortUI by editing this wiki, even if it's just correcting a typo or spelling mistake.

Registration of new accounts on this site is currently disabled, so please contact Cort on Discord to set up a new user account.

If you find a bug in CortUI or any HUD, you may open a new ticket on this page. Please make sure to search for it first, to avoid creating duplicate tickets. Your bug report should always contain the essential Three Things, as for example outlined in Joel Spolsky's excellent article Painless Bug Tracking:

  1. Steps to reproduce,
  2. What you expected to see, and
  3. What you saw instead.

You may (and should) also create a new ticket to suggest a feature you would like to see added. Additionally, do not hesitate to open a ticket for requesting improved documentation on anything!

When creating new tickets, please leave all fields empty that you don't understand or are not sure what to select. I will add them in later. In particular, leave the component on [untriaged] and the milestone empty if you're not absolutely sure where it belongs. That way, the ticket query function can be used properly.

Note that the list of tickets is everything that is being worked on. Please do not PM me to report a bug. These tickets are exactly what I have on my list. If it is not here, I do not know about it. Whatever is marked as accepted is currently in the process of being implemented.

Code repository

CortUI is developed on an SVN repository at the following URL: svn://svn.rtsquad.org/cortui/. The repository is anonymously readable, so you can do a checkout without having an account. If you just want to browse the source, clicking Browse Source in the navigation bar of this Trac instance is probably the easiest way.

In theory, you qualify for commit access by providing a series of accepted patch files as attachments to tickets. This isn't rigorously enforced however, if you have a good reason to need commit access, you will get it. Patches are nevertheless always welcome!

First steps

Here's a rough guideline of the steps you could take if you want to contribute to CortUI.

  1. Choose a ticket you want to work on. Create a new one if you want to implement a new feature or pick one from the list of Good First Bugs if you want to help out by fixing existing issues. In any case, indicate that you're working on a ticket by 'accepting' it (select accept as the action at the bottom of the ticket page and click on Submit changes).
  2. Install TortoiseSVN (or any other SVN client of your preference), this will require you to reboot at the end.
  3. After rebooting, TortoiseSVN will have integrated into the Windows Explorer (or your file manager of choice). Create an empty directory where you want to work on CortUI, right-click it and select SVN Checkout. It will ask for a URL, tell it svn://svn.rtsquad.org/cortui/trunk.
  4. Click OK and you'll get a "working copy". This is an exact duplicate of the latest state we're working on. Now you can make your edits inside this working copy. There's no need to copy files in and out. No changes you make will go live until you tell it to and you can revert to the latest official version of a file at any time.
  5. After making your changes, you will probably want to test them by building a new installer or Modulus package, see below for how to do that.
  6. When you are confident that your changes work well, you can submit them. Right click your working copy folder and select Create patch from the TortoiseSVN submenu. Select the files you want to include in your submission. Please only include a single set of associated changes per patch file. The rule of thumb is "as small as possible, as large as necessary". You can double-click on files here to see what you have changed. Confirm that only parts relevant for your ticket have been changed.
  7. Click on OK and give it a meaningful name.
  8. Now attach the patch file to your ticket. Write what you changed, why, what it fixes and what is left to do into the comment area of the ticket. Reassign the ticket to a person responsible for including it, e.g. a HUDsmith or when in doubt, to Cort. Submit your comment.
  9. Be proud of your accomplishment and your support for CortUI and feel free to motivate others to help out in the forum and on IRC.

To get the latest changes others have made into your working copy, right-click it and select SVN Update. You should do that regularly, in particularly every time you start working and before you create a patch file, to see incompatible changes as quickly as possible.

Watch the timeline to see what others are changing.

Building the installer

Building the installer is fairly easy:

  1. Install the latest version of the Nullsoft Scriptable Installation System.
  2. Copy the FindProcDLL.dll from your CortUI working copy to the 'Plugins' subdirectory of your NSIS installation.
  3. Right-click the CortUI.nsi file in your working copy and select "Compile NSIS Script".

This should build a file named CortUI-<version>-dev-<date>-<time>.exe in your working copy. To generate other version numbers, the installation script has a few switches than you can set in the MakeNSISW tool that is building the installer (Tools -> Settings):

  • A symbol of BUILD_ID set to the latest revision number you updated to will build a file called CortUI-<version>-dev-r<revision>.exe. This is useful for beta releases. Knowing which revision they were built from makes it easier to track down bugs.
  • A symbol of RELEASE set to any value will build the final CortUI-<version>.exe. This may only be used for final releases.

The in-game version number is automatically set to this version as well.

Building the Modulus package

To build the Modulus package, run the BuildModulusPackage.cmd in the root of your working copy with the version number as the argument.

The version number is currently only used for the package filename. The Definition.xml file for Modulus needs to be modified manually.