FriendUPCloud / friendup

FriendOS is a free web based platform that runs in your browser. It allows you to work and play, collaboratively, across devices.
https://friendos.com/
Other
347 stars 87 forks source link

FRIEND_HOME pointing to wrong directory? #33

Closed johalun closed 3 years ago

johalun commented 7 years ago

FRIEND_HOME is set to the repository root but in this case it can not find the config files looked for in $FRIEND_HOME/cfg/cfg.ini

I need to set it to the build/ dir where the built product is installed.

One example: https://github.com/FriendSoftwareLabs/friendup/blob/master/core/system/systembase.c#L235-L241

Note: It might also fail if the FRIEND_HOME env var does not contain a trailing slash.

stefkosdev commented 7 years ago

Hey

Binary and all files should go to one directory. I'm sure there is no need to change anything in code regarding this. Just somehow your binary is created in root folder, right? And to clarify: make - is makeing a binary, it doesnt bring all required files into one place. That's why each time you build (if you want to test it) your exe you must call 'make install' to put it into correct directory.

johalun commented 7 years ago

Yes, make install works as expected. Everything is installed in the build/ directory. However, in the install.sh FRIEND_HOME is set to FRIEND_FOLDER, which is the root of the repo. This results in a runtime error. The example in systembase.c (above) expects FRIEND_HOME to point to FRIEND_FOLDER/build/ otherwise it does not find the cfg.ini file... Do you not get the same error?

stefkosdev commented 7 years ago

I agree with you that FRIEND_HOME must point to FRIEND_FOLDER/build/, we will change that in installer then. I never had this problem to be honest even on arm computers which have installation done by installer.sh.