Measure for the top and bottom pieces of the jambs first, because they need to be installed before the side jambs. Mark the pieces so that when you cut them with the miter saw you cut along the waste side of the line, leaving just a smidge of the line that is the actual measurement of the cut. You want the pieces to fit smoothly into the slot.
Measure the depth of the window frame if you want to notch the top and bottom pieces out around the face of the wall. Add that measurement to the piece if you want notches so that you have a piece with two "L"-shaped sections on either end that slides into the frame. Cut the pieces on your miter saw, and double check them to ensure they fit smoothly into the top and bottom of the window frame.
Add glue to the window frame, and install the pieces on the top and bottom. Nail them into place with the finish nailer. Measure the two side jamb pieces, and cut them to fit. Apply wood glue, slide them into place vertically and nail them into place. Cover the jambs with trim later on to complete your project.