Some things here might not be completely necessary or is not the typical way of doing it but is what worked for me.
- Do a regular install of drupal 7.
- Will need to use git-bash not git-cmd.
- Do an install of civicrm to get a working civicrm+drupal7 using the civicrm master tree from github plus civicrm-drupal and civicrm-packages. MAKE SURE YOU INSTALL CIVI IN A SEPARATE DATABASE, otherwise your drupal database will get wiped by this process.
- In the drupal root,
composer require drush/drush:^8.0
- Update path so that it can find that drush.
- Optionally update path so that it can find node_modules/karma/bin/karma. It's optional because otherwise it will try to install it again but that also works. It doesn't get used here anyway.
- Create bin/setup.conf from bin/setup.conf.txt. Note that you need GENCODE_CMS=Drupal not lower-case drupal as it suggests.
- CIVISOURCEDIR means path to sites/all/modules/civicrm.