Just installed Ubuntu 6.1 and has some "dumb" ques
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
> Ops, i've read about RunProgram() linux function was not able to do somethings and that it is in the 'todo' list or something like that...
No. There is nothing on the list for RunProgram(). It should work like on windows.
"export" is not a program anyway, but a shell command as well. So it only works in a shell.
Also, changing environment variables only affects the current program + later started
child programs. So even if this worked, the variable change does not affect
the own program (only the child), so also not the later RunProgram() for the IDE.
PB has commands to modify environment variables. The changes are passed
on when a new program is run as a child. so try this:
No. There is nothing on the list for RunProgram(). It should work like on windows.
"export" is not a program anyway, but a shell command as well. So it only works in a shell.
Also, changing environment variables only affects the current program + later started
child programs. So even if this worked, the variable change does not affect
the own program (only the child), so also not the later RunProgram() for the IDE.
PB has commands to modify environment variables. The changes are passed
on when a new program is run as a child. so try this:
Code: Select all
SetEnvironmentVariable("PUREBASIC_HOME", GetEnvironmentVariable("HOME") + "/purebasic")
SetEnvironmentVariable("PATH", GetEnvironmentVariable("PATH") + ":" + GetEnvironmentVariable("HOME") + "/purebasic/compilers")
RunProgram("purebasic", Parameter.s, WorkingDirectory.s)
quidquid Latine dictum sit altum videtur
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
That's great, thank you Timo


Yes, in linux you can make any .sh (bash) file in which you accept any number of parameters. Inside the file, the parameters are obtained with: '$1', '$2', '$3', etc. the name of the bash file would be obtained with '$0'Trond wrote:Couldn't you run "/bin/sh" with all the commands you want executed as the parameter (similar to cmd's /c switch)?

Thought I would use this thread for my dumb question rather than start a new dumb questions thread.
I have just installed the latest stable release of Debain Sarge onto my test machine & me being a Linux illiterate I must say it was surprisingly easy to do.
I now have PB4 Linux working with some help from this thread, so thanks to the ppl who have thrown their dollars worth in so far.
My question is regards to InitSound() function in this Linux version which is for some reason failing on me. - An example of this is the WeaponzII sample in the example files which simply returns 0 on this machine, but all the graphics work seamlessly. Is there maybe something else I need to install for PB to have sound functions work?
Also. fwiw - Sound is working fine with gnome default sounds, mp3's, wav, etc, just not in the PB environment?

I have just installed the latest stable release of Debain Sarge onto my test machine & me being a Linux illiterate I must say it was surprisingly easy to do.
I now have PB4 Linux working with some help from this thread, so thanks to the ppl who have thrown their dollars worth in so far.
My question is regards to InitSound() function in this Linux version which is for some reason failing on me. - An example of this is the WeaponzII sample in the example files which simply returns 0 on this machine, but all the graphics work seamlessly. Is there maybe something else I need to install for PB to have sound functions work?
Also. fwiw - Sound is working fine with gnome default sounds, mp3's, wav, etc, just not in the PB environment?
Can't help you with IniTSound but wanted to mention that as of a few weeks ago the newest stable debian is Etch not Sarge
Visit www.sceneproject.org
Yup 7.04 Ubuntu has some nice little tweaks.
http://www.ubuntu.com/getubuntu/upgrading
@baldrick:
Getting any error when you compile in console ?
Thalius
http://www.ubuntu.com/getubuntu/upgrading
@baldrick:
Getting any error when you compile in console ?
Thalius
"In 3D there is never enough Time to do Things right,
but there's always enough Time to make them *look* right."
"psssst! i steal signatures... don't tell anyone!
"
but there's always enough Time to make them *look* right."
"psssst! i steal signatures... don't tell anyone!

@Thalias,
I just tried the console from your suggestion & yes I am getting an error
I just tried the console from your suggestion & yes I am getting an error
Since my original post here I have changed the libsdl from 1 option to another option debian has called "all". This has stopped the 0 return on initsound(), but now this same example crashes when an attempt is made to play a sound.ALSA lib pcm_dmix.c:864:(snd_pcm_dmix_open) unable to open slave