openFrameworks-RaspberryPi / openFrameworks

This repo has migrated into the openFramworks core! Please go to http://github.com/openFrameworks/openFrameworks for the latest!
http://github.com/openFrameworks/openFrameworks
Other
104 stars 11 forks source link

fixes the dataPathRoot for the arm-linux #85

Closed danzeeeman closed 11 years ago

danzeeeman commented 11 years ago

I branched off your makefile-cleanup to fix the dataPathRoot issue.

arturoc commented 11 years ago

mmh, the linux version should work, it's also better because it takes into account where the exe is so you can run the program from anywhere and it'll find the data folder.

what was returning the linux version?

danzeeeman commented 11 years ago

I was getting this:

[readers.c:1182] error: Cannot open file /home/pi/src/openFrameworks/examples/sound/soundPlayerFFTExample/bin/soundPlayerFFTExample.appھ/data/sounds/jdee_beat.mp3: No such file or directory [error] ofOpenALSoundPlayer: couldnt read /home/pi/src/openFrameworks/examples/sound/soundPlayerFFTExample/bin/soundPlayerFFTExample.appھ/data/sounds/jdee_beat.mp3

On Dec 16, 2012 1:23 PM, "arturo" notifications@github.com wrote:

mmh, the linux version should work, it's also better because it takes into account where the exe is so you can run the program from anywhere and it'll find the data folder.

what was returning the linux version?

— Reply to this email directly or view it on GitHubhttps://github.com/openFrameworks-RaspberryPi/openFrameworks/pull/85#issuecomment-11420825.

bakercp commented 11 years ago

Could this be an odd artifact because of the .app suffix? I recently added that to the makefile system at the request of @jvcleave. Perhaps it thinks that .app is a OSX-like .app folder? I can't check now, but will later ...

A quick test -- if you change the suffix to something else does that fix it?

arturoc commented 11 years ago

that seems like a not null terminated string, will take a look

On 12/17/2012 01:09 AM, Dan Moore wrote:

I was getting this:

[readers.c:1182] error: Cannot open file /home/pi/src/openFrameworks/examples/sound/soundPlayerFFTExample/bin/soundPlayerFFTExample.appھ/data/sounds/jdee_beat.mp3:

No such file or directory [error] ofOpenALSoundPlayer: couldnt read /home/pi/src/openFrameworks/examples/sound/soundPlayerFFTExample/bin/soundPlayerFFTExample.appھ/data/sounds/jdee_beat.mp3

On Dec 16, 2012 1:23 PM, "arturo" notifications@github.com wrote:

mmh, the linux version should work, it's also better because it takes into account where the exe is so you can run the program from anywhere and it'll find the data folder.

what was returning the linux version?

— Reply to this email directly or view it on GitHubhttps://github.com/openFrameworks-RaspberryPi/openFrameworks/pull/85#issuecomment-11420825.

— Reply to this email directly or view it on GitHub https://github.com/openFrameworks-RaspberryPi/openFrameworks/pull/85#issuecomment-11425180.

danzeeeman commented 11 years ago

I was thinking about this last night. I don't think we should be using abs path for data path for the r_pi. It might be fine on desktop linux, but how do you go about sharing an app between two machines? If it is always looking in home/user/pi/src/openFrameworks/examples/sound/bin/data/fooBar.mp3 for an app compiled on my pi, what happens if I share an app or release something for the pi I'll have to tell people to match my specific directory structure. If you look at what all the other platforms do, they keep the data path relative to the App, I think that is a good idea. I've already fixed this issue on the makefile_cleanup branch. I know it is not how it works on Desktop Linux but I think in the long run it's better. What are you guy's thoughts?

Dan

On Mon, Dec 17, 2012 at 3:02 AM, arturo notifications@github.com wrote:

that seems like a not null terminated string, will take a look

On 12/17/2012 01:09 AM, Dan Moore wrote:

I was getting this:

[readers.c:1182] error: Cannot open file

/home/pi/src/openFrameworks/examples/sound/soundPlayerFFTExample/bin/soundPlayerFFTExample.appھ/data/sounds/jdee_beat.mp3:

No such file or directory [error] ofOpenALSoundPlayer: couldnt read

/home/pi/src/openFrameworks/examples/sound/soundPlayerFFTExample/bin/soundPlayerFFTExample.appھ/data/sounds/jdee_beat.mp3

On Dec 16, 2012 1:23 PM, "arturo" notifications@github.com wrote:

mmh, the linux version should work, it's also better because it takes into account where the exe is so you can run the program from anywhere and it'll find the data folder.

what was returning the linux version?

— Reply to this email directly or view it on GitHub< https://github.com/openFrameworks-RaspberryPi/openFrameworks/pull/85#issuecomment-11420825>.

— Reply to this email directly or view it on GitHub < https://github.com/openFrameworks-RaspberryPi/openFrameworks/pull/85#issuecomment-11425180>.

— Reply to this email directly or view it on GitHubhttps://github.com/openFrameworks-RaspberryPi/openFrameworks/pull/85#issuecomment-11433138.

"I believe in science. Unlike mathematical theorems, scientific results can't be proved. They can only be tested again and again, until only a fool would not believe them.

I cannot prove that electrons exist, but I believe fervently in their existence. And if you don't believe in them, I have a high voltage cattle prod I'm willing to apply as an argument on their behalf. Electrons speak for themselves."

-- Seth Lloyd: Quantum Mechanical Engineer, MIT

/.

arturoc commented 11 years ago

this is setup everytime the app starts, it finds where the exe is and adds /data so it should work between machines no matter where the app is. you can even add your app folder to the $PATH and run it from anywhere and will still find the data folder

On 12/17/2012 02:10 PM, Dan Moore wrote:

I was thinking about this last night. I don't think we should be using abs path for data path for the r_pi. It might be fine on desktop linux, but how do you go about sharing an app between two machines? If it is always looking in home/user/pi/src/openFrameworks/examples/sound/bin/data/fooBar.mp3 for an app compiled on my pi, what happens if I share an app or release something for the pi I'll have to tell people to match my specific directory structure. If you look at what all the other platforms do, they keep the data path relative to the App, I think that is a good idea. I've already fixed this issue on the makefile_cleanup branch. I know it is not how it works on Desktop Linux but I think in the long run it's better. What are you guy's thoughts?

Dan

On Mon, Dec 17, 2012 at 3:02 AM, arturo notifications@github.com wrote:

that seems like a not null terminated string, will take a look

On 12/17/2012 01:09 AM, Dan Moore wrote:

I was getting this:

[readers.c:1182] error: Cannot open file

/home/pi/src/openFrameworks/examples/sound/soundPlayerFFTExample/bin/soundPlayerFFTExample.appھ/data/sounds/jdee_beat.mp3:

No such file or directory [error] ofOpenALSoundPlayer: couldnt read

/home/pi/src/openFrameworks/examples/sound/soundPlayerFFTExample/bin/soundPlayerFFTExample.appھ/data/sounds/jdee_beat.mp3

On Dec 16, 2012 1:23 PM, "arturo" notifications@github.com wrote:

mmh, the linux version should work, it's also better because it takes into account where the exe is so you can run the program from anywhere and it'll find the data folder.

what was returning the linux version?

— Reply to this email directly or view it on GitHub<

https://github.com/openFrameworks-RaspberryPi/openFrameworks/pull/85#issuecomment-11420825>.

— Reply to this email directly or view it on GitHub <

https://github.com/openFrameworks-RaspberryPi/openFrameworks/pull/85#issuecomment-11425180>.

— Reply to this email directly or view it on GitHubhttps://github.com/openFrameworks-RaspberryPi/openFrameworks/pull/85#issuecomment-11433138.

"I believe in science. Unlike mathematical theorems, scientific results can't be proved. They can only be tested again and again, until only a fool would not believe them.

I cannot prove that electrons exist, but I believe fervently in their existence. And if you don't believe in them, I have a high voltage cattle prod I'm willing to apply as an argument on their behalf. Electrons speak for themselves."

-- Seth Lloyd: Quantum Mechanical Engineer, MIT

/.

— Reply to this email directly or view it on GitHub https://github.com/openFrameworks-RaspberryPi/openFrameworks/pull/85#issuecomment-11440897.

danzeeeman commented 11 years ago

oh that is how that works? well something isn't returning correctly then. IDK I'm always one that advocates KISS but if you can get it working on these then go for it.

On Mon, Dec 17, 2012 at 8:25 AM, arturo notifications@github.com wrote:

this is setup everytime the app starts, it finds where the exe is and adds /data so it should work between machines no matter where the app is. you can even add your app folder to the $PATH and run it from anywhere and will still find the data folder

On 12/17/2012 02:10 PM, Dan Moore wrote:

I was thinking about this last night. I don't think we should be using abs path for data path for the r_pi. It might be fine on desktop linux, but how do you go about sharing an app between two machines? If it is always looking in home/user/pi/src/openFrameworks/examples/sound/bin/data/fooBar.mp3 for an app compiled on my pi, what happens if I share an app or release something for the pi I'll have to tell people to match my specific directory structure. If you look at what all the other platforms do, they keep the data path relative to the App, I think that is a good idea. I've already fixed this issue on the makefile_cleanup branch. I know it is not how it works on Desktop Linux but I think in the long run it's better. What are you guy's thoughts?

Dan

On Mon, Dec 17, 2012 at 3:02 AM, arturo notifications@github.com wrote:

that seems like a not null terminated string, will take a look

On 12/17/2012 01:09 AM, Dan Moore wrote:

I was getting this:

[readers.c:1182] error: Cannot open file

/home/pi/src/openFrameworks/examples/sound/soundPlayerFFTExample/bin/soundPlayerFFTExample.appھ/data/sounds/jdee_beat.mp3:

No such file or directory [error] ofOpenALSoundPlayer: couldnt read

/home/pi/src/openFrameworks/examples/sound/soundPlayerFFTExample/bin/soundPlayerFFTExample.appھ/data/sounds/jdee_beat.mp3

On Dec 16, 2012 1:23 PM, "arturo" notifications@github.com wrote:

mmh, the linux version should work, it's also better because it takes into account where the exe is so you can run the program from anywhere and it'll find the data folder.

what was returning the linux version?

— Reply to this email directly or view it on GitHub<

https://github.com/openFrameworks-RaspberryPi/openFrameworks/pull/85#issuecomment-11420825>.

— Reply to this email directly or view it on GitHub <

https://github.com/openFrameworks-RaspberryPi/openFrameworks/pull/85#issuecomment-11425180>.

— Reply to this email directly or view it on GitHub< https://github.com/openFrameworks-RaspberryPi/openFrameworks/pull/85#issuecomment-11433138>.

"I believe in science. Unlike mathematical theorems, scientific results can't be proved. They can only be tested again and again, until only a fool would not believe them.

I cannot prove that electrons exist, but I believe fervently in their existence. And if you don't believe in them, I have a high voltage cattle prod I'm willing to apply as an argument on their behalf. Electrons speak for themselves."

-- Seth Lloyd: Quantum Mechanical Engineer, MIT

/.

— Reply to this email directly or view it on GitHub < https://github.com/openFrameworks-RaspberryPi/openFrameworks/pull/85#issuecomment-11440897>.

— Reply to this email directly or view it on GitHubhttps://github.com/openFrameworks-RaspberryPi/openFrameworks/pull/85#issuecomment-11441322.

"I believe in science. Unlike mathematical theorems, scientific results can't be proved. They can only be tested again and again, until only a fool would not believe them.

I cannot prove that electrons exist, but I believe fervently in their existence. And if you don't believe in them, I have a high voltage cattle prod I'm willing to apply as an argument on their behalf. Electrons speak for themselves."

-- Seth Lloyd: Quantum Mechanical Engineer, MIT

/.