Skip to content

Instantly share code, notes, and snippets.

@NathanW2
Created December 8, 2015 00:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NathanW2/017fede73a1df2d2d112 to your computer and use it in GitHub Desktop.
Save NathanW2/017fede73a1df2d2d112 to your computer and use it in GitHub Desktop.
@ECHO OFF
REM ---------------------------------------------------------------------------------------
REM Change %OSGEO4W_ROOT% in setenv.bat to change in the location of QGIS.
REM ---------------------------------------------------------------------------------------
for %%x in (%cmdcmdline%) do if /i "%%~x"=="/c" set DOUBLECLICKED=1
REM Change OSGeo4W_ROOT to point to your install of QGIS.
SET OSGEO4W_ROOT=C:\OSGeo4W
SET QGISNAME=qgis
SET QGIS=%OSGEO4W_ROOT%\apps\%QGISNAME%
set QGIS_PREFIX_PATH=%QGIS%
CALL %OSGEO4W_ROOT%\bin\o4w_env.bat
: Python Setup
set PATH=%OSGEO4W_ROOT%\bin;%QGIS%\bin;%PATH%
SET PYTHONHOME=%OSGEO4W_ROOT%\apps\Python27
set PYTHONPATH=%QGIS%\python;%PYTHONPATH%
ECHO OSGeo path is: %OSGEO4W_ROOT%
ECHO Getting QGIS libs from: %QGIS%
ECHO Python loaded from: %PYTHONHOME%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment