BioGearsEngine / core

Repository for libbiogears and all core utilities
Apache License 2.0
56 stars 48 forks source link

Issue with example code for running HowTos #55

Closed clobraico22 closed 3 years ago

clobraico22 commented 3 years ago

The following code is posted in the HowTos wiki:

export BIOGEARS_ROOT=/opt/biogears cd BIOGERARS_ROOT}/build-gcc5.4 cd runtime ../outputs/bin/howto-bolusdrug

I think it is safe to assume there are some typos in the above snippet (e.g. it should be cd BIOGEARS_ROOT/build-gcc5.4). With that said, my system does not recognize any file or directory for build-gcc5.4. Can someone help me correct this so that I can run how-tos on linux?

StevenAWhite commented 3 years ago

The typo is simply that its cd ${BIOGEARS_ROOT} to expand the variable you exported in the first step. It is likely being overly fancy so through out the documentation I can keep referring to the variable and only update /opt/biogears in a single place if I ever change the examples.

The equivalent command would be cd /opt/biogears/build-gcc5.4/runtime

StevenAWhite commented 3 years ago

So, I fixed that issue in the documentation.

Now, the HowTo wiki is an example that assumes your used to using the cli interface for your operating system and you built BioGears according to the other wiki articles. The filepath of your runtime folder will be different based on where you built BioGears. The examples need to be adjusted to your specific machine.

Just cd to your build folder you configured in CMake and then one directory further to runtime. Now depending on how you built BioGears in Release, Debug, ReleaseWithDebInfo, or ReleaseMinSize the location of your binaries will change. All build artifacts are in outputs, but tehre is a subfolder for each configuration before the bin directory. So the relative path will be something like

../outputs/Release/bin/howto-asthmaattack.exe ../outputs/Debug/bin/howto-saringas

Hopefully that helps. The only thing the howto article is trying to get across is that you need to be in a runtime folder to execute most howto's or BioGears will throw some errors about not being able to read files. If your building from Master we actually have some changes that simplify this, but most of the documentation has not been updated with the libbiogears_io fallback routines in mind as the changes are only a few weeks old and the documentation lags behind so its accurate for old revisions.