UCSolarCarTeam / Delta-OnBoard-Media-Control

GNU Affero General Public License v3.0
0 stars 2 forks source link

Where To Place Music #16

Open bseto opened 8 years ago

bseto commented 8 years ago

Because of the new GPIO library requiring root. The program now has all its file paths coded with absolute paths. This means the fonts and music have to be in different places.

Currently:

Fonts, /usr/share/fonts Music, /home/Music

I was wondering if anyone had better idea/places for the above files. Once we have decided where to place them, we will need to update the README.

bseto commented 8 years ago

@mpminardi @cheunggg @enochtsang

mpminardi commented 8 years ago

I remember we looked into it a bit, but is there any way we could make the music directory based on the user? I imagine we can find a C function / system call that will get us the current user, then we could do something like /home/ + currentUser + /music?

bseto commented 8 years ago

http://stackoverflow.com/questions/2910377/get-home-directory-in-linux-c

First and Second answer looks like they'd work

enochtsang commented 8 years ago

I say because we're using the pi specifically for a backup camera, we should keep it at the root. So files would be kept in , /MediaControl/. Then we can keep it organized in there and split up files accordingly, so we'd have a /MediaControl/Fonts/ and /MediaControl/Music/.

bseto commented 8 years ago

Okay. I like this solution. Just to clarify, you do mean /MediaControl/ and not /root/MediaControl/ right?

enochtsang commented 8 years ago

Does it matter? Whichever one is easier I think. The main point of me suggesting /MediaControl/ was so we can use absolute paths easily in the pi, since /MediaControl/ is a pretty short string literal.

bseto commented 8 years ago

http://askubuntu.com/questions/34880/use-of-opt-and-usr-local-directories-in-the-context-of-a-pc

I think we will install in /opt instead.

bseto commented 8 years ago

@benji373 please take a look at this

bseto commented 8 years ago

/home/ should be the place. @cheunggg @benji373