Skip to content
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

Create comprehensive installation guide #12

Open
begna112 opened this issue Jan 4, 2021 · 1 comment
Open

Create comprehensive installation guide #12

begna112 opened this issue Jan 4, 2021 · 1 comment

Comments

@begna112
Copy link

begna112 commented Jan 4, 2021

Can you create a step-by-step walkthrough for how to install this?

Been trying to figure it out with someone who has an older version installed and it doesn't seem to work the same.

As this isn't a normal extension (or doesn't appear to be), it's not exactly self-evident how this should be setup without instructions.

Items that would be good to know:

  1. where to install
  2. how to install
  3. how to configure .vpy files to use this by default
  4. how to configure this globally so that individual workspaces/folders don't need a copy
  5. how to configure the terminal settings in vscode to use this properly

Items which might be complicating this for me:

  1. using Windows
  2. using python installed locally, not via mingw or other means
  3. my default integrated terminal is Powershell (used for work, so not going to change but others might be in similar situations)
@Endilll
Copy link
Owner

Endilll commented Jan 6, 2021

Nothing have changed for Windows users since VS Preview has been uploaded to GitHub, but that aside.

VSP is quite raw in this regard. Those are minimal steps to get it working:

  1. Clone the repo somewhere.
  2. Install dependencies. pip install -r requirements.txt seems the most convenient way.
  3. run VSP using python run.py, supplying path to .vpy script.

Further steps depends on your workflow:
a) to make VSP available in any terminal, you can create a script named vspreview that forwards all the arguments to run.py wherever you placed it, and put this script into some directory added to PATH
b) (my personal favorite) for VS Code, you can create a launch task, that opens file from active editor in VSP. It'd be along the lines of:

        {
            "name": "Current File",
            "type": "python",
            "request": "launch",
            "console": "integratedTerminal",
            "program": "C:\Users\Admin\Downloads\vapoursynth-preview\run.py",
            "args": [
                "${file}"
            ],
            "showReturnValue": true
        }

See below how to improve this approach.

Going through your items:

  1. Install anywhere
  2. git clone and pip install -r requirements.txt
  3. If you go the way in (a), you can associate .vpy with the script you create, but I'd say there's much more sense in associating it with VS Code
  4. Not so long ago user-level tasks were added to VS Code. If you want to have a hotkey to launch VSP readily available across all workspaces, you can make such task default build or test task. (an example of such setup)
  5. You need to go with (a) to have a convenient way to open scripts in VSP manually, but you don't need it if you go with (b) and point above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants