dendibakh / perf-book

The book "Performance Analysis and Tuning on Modern CPU"
https://book.easyperf.net/perf_book
Creative Commons Zero v1.0 Universal
2k stars 144 forks source link

Simplify build instructions on Windows #37

Closed ntoslinux closed 2 months ago

ntoslinux commented 6 months ago

Below change will make the build instructions same as Linux. We just have to run cmd before running them.

ntoslinux commented 6 months ago

@dendibakh

dendibakh commented 6 months ago

Actually, you're right. I like to use powershell on windows (and maybe some other folks as well), so let's keep powershell commands as well.

dendibakh commented 6 months ago

My suggestion:

# Windows cmd prompt
python export_book.py && pdflatex book.tex && bibtex book && pdflatex book.tex && pdflatex book.tex

# Windows powershell
function Run-Block-With-Error($block) {
    $ErrorActionPreference="Stop"
    Invoke-Command -ScriptBlock $block
}
Run-Block-With-Error {python.exe export_book.py; pdflatex book.tex; bibtex book; pdflatex book.tex; pdflatex book.tex}
dendibakh commented 6 months ago

And sorry for the delay

dendibakh commented 2 months ago

Fixed by https://github.com/dendibakh/perf-book/commit/41055d29168b80646d7327c51a3ef8738d83f5e1