Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2010-01

FPC / Lazarus potential bug Project Options Dialog

6 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Andrew Brunner

I wanted to know if anyone has had any success with executing shell scripts on builds. Lazarus has a dialog for project options and compiler. In compiler section there is a GUI for "Execute before". I had all three options checked (Compile, Build, Run) with the shell script ./prebuild.sh

This script is set as executable and the permissions were incorrect at first but Lazarus knew to throw me the error. I fixed the permissions but get an error 127 on building the project. I tried ./prebuild.sh and just prebuild.sh and the full path/prebuild.sh and all of them threw the same error on building.

I was reading that there is a bug reported a few months ago about this kind of issue and I wanted to know if anyone is on this?

Latest Lazarus + FPC from SVN (today).

Thanks, -Andy

Reply by email

cobines
to Andrew Brunner

2010/1/31 Andrew Brunner :

Show quoted text 5 lines
I wanted to know if anyone has had any success with executing shell scripts on builds.  Lazarus has a dialog for project options and compiler.  In compiler section there is a GUI for "Execute before".  I had all three options checked (Compile, Build, Run) with the shell script ./prebuild.sh

It is working for me. On Windows and Linux. I have "Before: Compile, Build" checked. Command is:
"_getsvnrev.cmd $(LazarusDir)"

The script is run from the project directory (the one with .lpi).

Show quoted text 5 lines
This script is set as executable and the permissions were incorrect at first but Lazarus knew to throw me the error.  I fixed the permissions but get an error 127 on building the project.  I tried ./prebuild.sh and just prebuild.sh and the full path/prebuild.sh and all of them threw the same error on building.

Can you run the script directly? (./prebuild.sh)
Make sure the script returns 0 if successful.

cobines

Reply by email

Andrew Brunner
to cobines

Thanks, I just added the exit 0 to the script. I can execute the script and it does what it is supposed to do. I just can't get the script to run before I build via Lazarus. No matter what I do I keep seeing the error 127. Any other ideas?

TExternalToolList.Run Exception: the process exited with error code 127

Thanks.

cobines wrote 28 lines
2010/1/31 Andrew Brunner : > I wanted to know if anyone has had any success with executing shell > scripts on builds.  Lazarus has a dialog for project options and > compiler.  In compiler section there is a GUI for "Execute before".  I > had all three options checked (Compile, Build, Run) with the shell > script ./prebuild.sh It is working for me. On Windows and Linux. I have "Before: Compile, Build" checked. Command is: "_getsvnrev.cmd $(LazarusDir)" The script is run from the project directory (the one with .lpi). > This script is set as executable and the permissions were incorrect at > first but Lazarus knew to throw me the error.  I fixed the permissions > but get an error 127 on building the project.  I tried ./prebuild.sh > and just prebuild.sh and the full path/prebuild.sh and all of them > threw the same error on building. Can you run the script directly? (./prebuild.sh) Make sure the script returns 0 if successful. -- cobines _______________________________________________ fpc-devel maillist  -   http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Jonas Maebe
to Andrew Brunner: I wanted to know if anyone has had any success with executing shell scripts on builds. …
Andrew Brunner wrote 5 lines
This script is set as executable and the permissions were incorrect at first but Lazarus knew to throw me the error. I fixed the permissions but get an error 127 on building the project. I tried ./prebuild.sh and just prebuild.sh and the full path/prebuild.sh and all of them threw the same error on building.

Try the following:

/bin/bash /full/path/to/prebuild.sh

Jonas

Reply by email

Andrew Brunner
to Jonas Maebe: Try the following: /bin/bash /full/path/to/prebuild.sh Jonas

Wonderful. It's working now. Thanks guys.

Jonas Maebe wrote 19 lines
On 31 Jan 2010, at 05:07, Andrew Brunner wrote: > This script is set as executable and the permissions were incorrect at > first but Lazarus knew to throw me the error.  I fixed the permissions > but get an error 127 on building the project.  I tried ./prebuild.sh > and just prebuild.sh and the full path/prebuild.sh and all of them > threw the same error on building. Try the following: /bin/bash /full/path/to/prebuild.sh Jonas _______________________________________________ fpc-devel maillist  -   http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email