-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplest support of Windows with Docker #5
Changes from 3 commits
bedeea5
dd48541
09ae126
63cbfa3
8557973
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,12 +17,31 @@ It has three display modes: | |
|
||
## Installation | ||
|
||
Note: Currently viewprof doesn't support Windows because the underlying library (vty) doesn't support it yet. See [#1](https://github.com/maoe/viewprof/issues/1). | ||
For Windows users, see below. | ||
|
||
``` | ||
stack install viewprof | ||
``` | ||
|
||
### On Windows | ||
|
||
#### Prerequisites | ||
|
||
- [Docker for Windows](https://docs.docker.com/docker-for-windows/install/) or [Docker Toolbox](https://docs.docker.com/toolbox/overview/). | ||
- Currently tried with: [Docker Toolbox v17.04.0ce](https://github.com/docker/toolbox/releases/tag/v17.04.0-ce) on Windows 10 Home. | ||
- [cygpath](https://cygwin.com/cygwin-ug-net/cygpath.html) | ||
- Bundled with [Cygwin](https://www.cygwin.com/), [MSYS2](http://www.msys2.org/) etc. | ||
|
||
#### How to install and launch | ||
|
||
```bash | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we use |
||
$ git clone git@github.com:maoe/viewprof.git | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please drop the $-signs to make the instructions copy-paste friendly. |
||
$ cd viewprof/docker | ||
$ docker-machine start | ||
$ docker build -t viewprof . | ||
$ .\viewprof.bat path/to/file.prof | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does Windows accept forward slash delimiters? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, actually whichever will do. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's good to know. |
||
``` | ||
|
||
## Usage | ||
|
||
| keys | action | | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/sh | ||
|
||
DOCKER_DIR=$(realpath $(dirname "$0")) | ||
cd "$(dirname "$0")" | ||
|
||
docker build -f "$DOCKER_DIR/Dockerfile" -t viewprof . | ||
docker build -t viewprof . |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
@echo off | ||
|
||
rem NOTE: This script assumes docker-machine.exe and cygpath are in the PATH! | ||
|
||
for /f "usebackq delims=" %%e in (`docker-machine.exe env --shell cmd`) do %%e | ||
for /f "usebackq delims=" %%v in (`cygpath %~f1`) do set viewprof_arg=%%v | ||
docker run --rm -it -v %viewprof_arg%:/home/viewprof/%viewprof_arg% viewprof /home/viewprof%viewprof_arg% |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's drop this sentence. The following instruction is short.