Project 'eordentl/caltech-cs3-msvc' was moved to 'cs3/msvc'. Please update any links and bookmarks that may still have the old path.

Caltech CS 3 on Windows

This document describes how to set up a Windows computer to take CS 3 at Caltech.

For Students

  1. Clone this repository in C:\Users\<username>, so that the path to the top-level folder is C:\Users\<username>\msvc.
  2. Add C:\Users\<username>\msvc\bin to your PATH. (Start -> "Edit the system environment variables -> Environment Variables -> System Variables/Path)
  3. Download Visual Studio Community from https://visualstudio.microsoft.com/downloads/.
  4. Run the downloaded file, accepting default options. A second installer will open.
  5. Click on the "Available" tab, then under Visual Studio Community 2019, click "More -> Import Configuration". Select the file .vsconfig in this repo, click "Review details", then click "Install".
  6. The files will now download and install. This step may take a while. You may want to uncheck "Start after installation".

Note that this installs the Visual Studio IDE. Do not use this editor, instead use VSCode.

For Developers

The make executable was copied from https://bitbucket.org/xoviat/chocolatey-packages/src/master, which is the source of Chocolatey's make. The include, lib, and share folders in this repo do not need to be distributed (they're for building addons to make).

The remainder of the packages were built with vcpkg's x64-windows triplet and copied from the vcpkg directories to this repo for portability.

Packages:

  • sdl2
  • sdl2-gfx
  • sdl2-image[libjpeg-turbo]
  • sdl2-ttf
  • sdl2-mixer[dynamic-load, libflac, mpg123, nativemidi]

Adding additional packages is easy if they are available as the appropriate triplet in vcpkg. Once all packages are installed, copy the contents of the bin, include, and lib folders for the x64-windows triplet into this repo (taking care to flatten lib folders if some files are in manual-link).

The current version of this repo is for building 64-bit applications. If you want to use it for 32-bit (perhaps to make ASan nicer), the only change should be using the x86-windows triplet instead, plus some changes in the projects to point the toolchain to the correct location.

Notes

  • Really, all we should need is BuildTools. However, the ASan symbolizer has an undocumented dependency on "C++ profiling tools", which are only available as part of the Community download.
  • ASan does not include LSan. This configuration will not detect memory leaks, and from brief experimentation, it is nontrivial to do so.
  • 64-bit ASan throws "ignorable" exceptions: "Rather than statically reserving a large amount of possibly unused memory, the virtual space is expanded through exceptions."