Skip to content

How to set up a development environment

immki edited this page Nov 26, 2021 · 5 revisions

This is not for the faint of heart, and won't be necessary unless you intend to contribute back to the project.

When using unattended install helpers, like Chocolatey, you may not have access to all of the necessary installation configuration options. For this it is recommended that you use the installers directly. This applies to both NodeJS and Visual Studio.

Installing Visual Studio

There's some specific parts of Visual Studio that we need to make sure are available when you go through the install process.

  • Under "Workloads" select:

    • Universal Windows Platform development
    • Node.js development (Probably not required, given we installed Node.js separately)
  • Under individual components, you'll need to install the following:

    • Git for Windows
    • .NET Core runtime
    • .NET 4.7.1 Targeting Pack
    • Windows SDK 16299 for UWP: C#, VB, JS

    An example screenshot from the main page of the VS2017 install process for a functioning development environment:

Terminal window

The First Build

  • Before opening the solution, open a Powershell terminal, go into the FluentTerminal.Client folder and run:
    • npm install (Ignore the warnings related to fluent-terminal-client)
    • npm run build
  • When the solution is first opened, it will help to set the architecture to x64 for testing, as we didn't install the ARM cross-compiling stuff for Visual Studio and we only include pre-compiled winpty binaries for x86 and x64.
    • For this reason, the default architecture of "Any CPU" will fail to build, and you will have to choose either x64 or x86
  • When first built, Visual studio will spend a significant amount of time resolving dependencies, and fetching additional components via nuGet. This is normal.
    • If you have done the steps so far correctly, and the build is left as a debug build, then the solution should build and launch when you press F5.

Subsequent Builds

  • If you change the FluentTerminal.Client contents (OR if you merge or pull changes that resulted in changes to files in that folder),you'll need to re-run the npm run build (and npm install if you, or the pulled-in changes, change the dependencies).
  • The rest of the build process is as usual through Visual Studio.

Packaging

  • To start, copy the Package.StoreAssociation.xml.dev to Package.StoreAssociation.xml, this will provide a basic StoreAssociation file to use when building the app.
  • With the solution open in Visual Studio, you can build a package for your own use by right-clicking on the FluentTerminal.Package project in the Solution Explorer and choosing Store->Create App Packages
  • Follow the prompts to create a package for sideloading, and if this is only for your personal use, it is OK to only build the x64 package, and not include the debug (i.e PDB) symbols.
    • Note that your commits with these settings (as well as a newly generated temporary store key) will involve changes to the FluentTerminal.Package.wapproj file, so be careful about that if you plan to submit them for PRs.
  • This will produce, if successful, a folder in FluentTerminal.Package\AppPackages that you can zip up and share. You'll need to follow the same install instructions as when installing a release from the GitHub repo, including installing the certificate and then installing the appxpackage.