jsakamoto/MarkdownPresenter — pull request #10 by nightroman (2014-09-26 06:03:24+00:00)
Title: Improvements for starting on Windows

## Improvements for Windows

### Changed files

- *httpd.ps1*
- *start-presenter-for-windows.bat*

!

### *httpd.ps1*

- `$ErrorActionPreference = 'Stop'`, e.g. to fail and exit if the server is
already started.
- Print *Ctrl-Break* as the tip to stop because *Ctrl-C* does not work well.
- Ability to start in any folder with *presentation.md* in it.
- Files are searched at first in `$Root`, the start folder, i.e.
*presentation.md*, images, modified files.
- Not found files are searched in `$Here`, the tool folder, i.e.
*Presenter.html*, *bg.jpg*, and scripts.

!

### *start-presenter-for-windows.bat*

- Use `-ExecutionPolicy Bypass` as the most effective way.
- Use `-File "%~dp0httpd.ps1"` instead of `-Command ". ..."`
- `%~dp0` to start *httpd.ps1* from the same location (`$Here`).
- To support paths with spaces and apostrophes.