[GRASS-user] why is v.build.all (and many others) a windows batch file and not an executable?

Bartolomei.Chris Bartolomei.Chris at ensco.com
Tue May 3 15:50:16 PDT 2016


Hi Martin
The problem I am having is that my bourne shell scripts (#!/bin/sh) cannot execute the bat files ... the scripts call the GRASS modules by name i.e.
v.db.update map=stream_7 layer=3 column=block_col value="-1" --quiet
In GRASS 6.4.4 (with msys) I could just run the scripts and everything ran fine.
I've upgraded to 7.0.4 (from OSGEO4W and with msys) and now my scripts crash any time it tries to execute a GRASS module that is a bat wrapper saying it can't execute them.
The error message is sh: v.db.update: command not found
There is no v.db.update.exe ... only v.db.update.bat ... and, of course, v.db.update.py in the scripts directory.
I have to code it as this now:
python $PY_SCRIPTS/v.db.update.py map=stream_7 layer=3 column=block_col value="-1" --quiet
(where PY_SCRIPTS is the path to the scripts, not the bat wrappers... i.e. c:/OSGEO4W64/apps/Grass/Grass-7.0.4/scripts)

Note that v.db.update is just one of numerous examples ... I tried to attach the list but it bounced.

I understand that some of this is written in C and some of this is written in python ... is it not possible to compile the python into an executable binary (.exe) and just have .exe's in bin?
That would sure save some grief ...
Thanks

Chris Bartolomei P.E.
Engineer/Scientist
ENSCO, Inc.
bartolomei.chris at ensco.com
________________________________________
From: Martin Landa [landa.martin at gmail.com]
Sent: Tuesday, May 03, 2016 1:25 PM
To: Bartolomei.Chris
Cc: Helmut Kudrnovsky; grass-user at lists.osgeo.org
Subject: Re: [GRASS-user] why is v.build.all (and many others) a windows batch file and not an executable?

2016-05-03 22:17 GMT+02:00 Bartolomei.Chris <Bartolomei.Chris at ensco.com>:
> I attached a couple txt files (I hope they don't get striped off...) listing the GRASS modules in the "bin" directory - one lists all of the ".exe" modules and one lists all of the ".bat" modules. Why are there both formats? How are we supposed to run (shell) scripts calling the modules? It just doesn't make sense having the two different formats in the same folder... all of the modules should be executables or all of the modules should be Windows Batch files. Having the mix makes it very hard to program.

sorry I don't fully understand your question. The `bin` directory
contains executables, in other words programs (modules) which are
added to the PATH when GRASS is starting. The exe files are binary
executables (compiled C modules). The bat files are wrappers around
Python modules (same as it was in GRASS 6 for Bash modules). Martin


--
Martin Landa
https://urldefense.proofpoint.com/v2/url?u=http-3A__geo.fsv.cvut.cz_gwiki_Landa&d=CwIFaQ&c=DsZY2bea7iNIzyp-7sZ0t0F2UfNQZUfZhEPCv_2wBI0&r=O31ltou6ygJL2Y01kQyNJJD2kiILIsbyz2V0Hn4lFUY&m=X6JAcPIMDN9cfIcLFFOOPJyDBL02gLKLQMdncu9LMY8&s=fbgnLCjRYYslCA5QlxN48QgfXp3CmLx6zKFdGfX3gUY&e=
https://urldefense.proofpoint.com/v2/url?u=http-3A__gismentors.cz_mentors_landa&d=CwIFaQ&c=DsZY2bea7iNIzyp-7sZ0t0F2UfNQZUfZhEPCv_2wBI0&r=O31ltou6ygJL2Y01kQyNJJD2kiILIsbyz2V0Hn4lFUY&m=X6JAcPIMDN9cfIcLFFOOPJyDBL02gLKLQMdncu9LMY8&s=DKTvoZTDeKe1obdGnw2qFMITEAlkqjlIAW84rKFj2JQ&e=

The information contained in this email message is intended only for the use of the individual(s) to whom it is addressed and may contain information that is privileged and sensitive. If you are not the intended recipient, or otherwise have received this communication in error, please notify the sender immediately by email at the above referenced address and note that any further dissemination, distribution or copying of this communication is strictly prohibited.

The U.S. Export Control Laws regulate the export and re-export of technology originating in the United States. This includes the electronic transmission of information and software to foreign countries and to certain foreign nationals. Recipient agrees to abide by these laws and their regulations -- including the U.S. Department of Commerce Export Administration Regulations and the U.S. Department of State International Traffic in Arms Regulations -- and not to transfer, by electronic transmission or otherwise, any content derived from this email to either a foreign national or a foreign destination in violation of such laws.


More information about the grass-user mailing list