projectchrono / chrono

High-performance C++ library for multiphysics and multibody dynamics simulations
http://projectchrono.org
BSD 3-Clause "New" or "Revised" License
2.2k stars 461 forks source link

run_app.sh on MacOS Catalina potential permissions error #239

Open nickgravish opened 4 years ago

nickgravish commented 4 years ago

Hello,

Just a quick issue that should be easy to solve. Compiling the template project using cmake and make on MacOS 10.15.1 succeeds in building the project the app. However, the helper script run_script.sh results in a permission error when run on the app. I have identified the problem, the program within the app bundle needs to be made executable. So when I run

chmod 755 myexe.app/Contents/MacOS/myexe

followed by

./run_app.sh myexe.app

The template project runs fine. This should be a simple fix but I don't know bash scripts well enough to help. Or is this a configuration problem in cmake?

rainergericke commented 4 years ago

Hi Nick,

on my Mac 10.15.5 it doesn't happen. After building chrono you should be able to start an application bundle like yours in this way: ./myexe.app/Contents/MacOS/myexe without any changes. In principle you don't need run_app.sh. run_app.sh itself should be executable. chmod +x run_app.sh sets the execution bit. It is good to have run_app.sh available everywhere, so I put it in a place where it can be found automatically.

Rainer