[Qgis-user] OSGeo4W Shell with Unix-Style Terminal?

Jürgen E. Fischer jef at norbit.de
Thu Jul 7 09:40:38 PDT 2022


Hi Mike,

On Thu, 07. Jul 2022 at 12:20:52 -0400, Mike Treglia wrote:
> I think I might be missing some of the knowledge I need to implement this
> for now, which is alright. For example, I'm not sure where I should start
> adjusting things in that portion of the build_helpers script, and
> where/when I should run that, or if I'm should modify that portion of
> build_helpers (ln 107-143) and insert that into /c/OSGeo4W/bin/o4w_env.bat,
> such that the OSGeo4W.bat file will call on the desired environment.

Sorry, I was implying that you're shell savy and pointers were enough.
Copy fetchenv to your .profile and run it from there (or once you want to run
osgeo4w stuff).

…
fetchenv() {
	…	
}

fetchenv /c/OSGeo4W/bin/o4w_env.bat
…

It runs cmd to get a clean copy of the environment and once more with
o4w_env.bat to get the updated version and then works out the differences,
makes them shell digestable and sources them to the running shell.

Also works with other software that provides batch files to update the
environment (like msvc, strawberry perl, venvs in python - just to name the few
the osgeo4w build scripts use it for).


Jürgen

-- 
Jürgen E. Fischer           norBIT GmbH             Tel. +49-4931-918175-31
Dipl.-Inf. (FH)             Rheinstraße 13          Fax. +49-4931-918175-50
Software Engineer           D-26506 Norden            https://www.norbit.de
QGIS release manager (PSC)  Germany                 IRC: jef on Libera|OFTC
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20220707/1c51c825/attachment.sig>


More information about the Qgis-user mailing list