First, ensure that your SC is downgraded to 1.15.1 (or FG won't work properly).
Open FireGraft. Create a new file, etc. That's the easy part.
Go to button sets. Find the entry for the barracks. This is easily done using the search function at the bottom. Now, there are a few ways you can add the button.
The first way is to use the 'add' dropdown menu. It is located at the top right. Find the 'train unit' thingy and choose Jim Raynor. Then you have to choose a button position for the unit. It works like this:
1 2 3
4 5 6
7 8 9
I'd use 5, personally. Alternatively, you could copy and paste (as new) the Marine entry, and change the Requirement variable and the Action variable to match with Jim Raynor instead of the Marine.
Once you have the button, you'll have to change the unit's requirements. Go to the .dat requirements tab.
Find the Jim Raynor (Marine) entry. You'll notice it is blank, and the "Used" checkbox is blank. Check that checkbox, and we'll add some requirements. Right click on the 'end of list' that just appeared for you, and press 'add item'. First, we want Jim to be built from a barracks, so we'll need two lines that look like this:
Current unit is...
Jim Raynor
So go ahead and add another line by right clicking "end of list" and adding another. (By doing it on the 'end of list', it ensures that your new item is added at the end. It's how I prefer to do it.) On your first item, go to your dropdown menu at the bottom and select 'current unit is'. Then select the second one. With this one we have to find the barracks. But, you'll notice you have a bit of trouble finding it among the options you have. There are two little buttons at the bottom that are labelled "Opcode" and "Paramater". Opcodes are things that identify a type of requirement, such as "Current unit is", or "Must not be lifted off". Parameters are units, upgrades and techs. So, switch that to Parameters, and then find that barracks.
In a similar fashion to those, add "Is not lifted off" to your list. This is pretty self-explanatory.
Finally, we want the unit to require the Science Facility (or if you don't, this is a good learning experience anyway
). To make a unit require something, we simply have to add that parameter without a single opcode. So add a new item, and simply change it to "Science Facility". It should now look like this:
Current unit is...
Barracks
Is not lifted off
Science Facility
Go ahead and save your file as an .exe. When prompted to add an MPQ archive to the file, choose yes, and select the MPQ you added your .dat files to. (Alternatively, you can edit the firegraft produced MPQ using WinMPQ directly).
Play around with other things in Firegraft, and look at other units for examples to try new things (for example, look at the lurker to see how to make a unit require tech, etc). Have fun.