Skip to content

Development

gbakeman edited this page Aug 10, 2024 · 16 revisions

New Developers

Welcome to the WinNUT project, and thank you for your interest in contributing. The project is constantly evolving, and new procedures or standards may be introduced at any time. See below for the most current information.

Development Environment Setup

This project is built for .NET Framework 4.8, which is supported up to Visual Studio 2022.

Get the latest version of Visual Studio (Community, Free)

The WinNUT project is currently built in Visual Studio 2022. You can download the Community edition for free. Install recommended extensions as needed for your purposes.

Recommended Extensions

Build MSI Installers. Not necessary unless you're creating a distribution/release.

View stack traces in Visual Studio from the pasted contents of a stack trace. Free.

Save and load your open Visual Studio tabs. Useful for when you need to switch to another branch, and want to stash your progress in the current branch with notes on what you were doing at the time. Free.

Translations

This program uses the Multilingual App Toolkit 4.0 to provide translation support.

Applying translations

When a translation CSV is updated in the Translations/ folder, some manual work needs to be done in order to apply the translation to the program.

  1. Open the CSV file in an editor (Excel), and the related *.xlf file in the Multilingual toolkit.
  2. Copy and paste new/changed translations to their equivalent resource in the multilingual toolkit.
  3. Build the solution and make sure all resource files have been automatically updated.

Build & Release Procedure

The Assembly version is automatically incremented, as defined in SharedAssemblyInfo.vb. The build number is automatically set as the number of days since January 1 2000, and the revision is the number of seconds since midnight divided by two. Major and minor versions are determined manually.

Procedure

Manual releasing is done after desired branches have been merged into the current Dev branch.

  1. Make a build with the (Pre)Release configuration
  2. Confirm the version of the client assembly
  3. Edit the properties of the WinNUT-Setup project:
    • Update Version to the major.minor.build of the built client assembly
    • Let the Product and PackageCode fields be regenerated automatically when prompted
    • Go down the Detected Dependencies list in the Solution Explorer, and Exclude any the .NET assemblies that it decided to include
  4. Commit the Setup project changes (and any other uncommitted changes) in git
  5. Make sure the Setup project is built with the latest modifications
  6. Test an MSI upgrade with the built installer on the developer's system
  7. Uninstall WinNUT, then reinstall the previous version (downloading from GitHub if necessary)
  8. Tag and push the commit with the version in the format vmajor.minor.build.
  9. Compress the contents of the WinNUT Client output, giving the archive file a name including the word NoInstaller.
  10. Generate a new release on GitHub, generate release notes and add other details as necessary.
  11. Upload the archive and the generated Setup.msi file.
  12. After publishing the release, test an update from the previous version of WinNUT on the developer's machine to verify automatic update functionality.

WinForms

Windows Forms is the toolkit from Microsoft for creating UI applications in Windows. There are many design patterns for Windows Forms, but the WinNUT project will try to standardize on an MVC pattern, and likely shift between passive views and supervising controllers as convenient. The goal will be to take advantage of the tools provided by Microsoft.

Design goals

  • MVC design adherence
  • Modularization
  • Separate worker and GUI threads
  • Use DataBinding when possible

References

Windows Forms-specific

General UI design reference