Page 1 of 3

Installed PB... Now what?

Posted: Tue Apr 18, 2006 1:43 am
by Inf0Byt3
I installed LinuxMepis (i think it's quite easy to work with) BUT (there's allways a 'but') I don't manage to compile anything :(. The gtk1 ide is working perfectly but when I try to compile the code i get this:
a) Ide closes immediately
b) In the error listbox in the IDE I get 'unknown location /root/...pbcompiler'
c) Waiting for the executable to start.... (FOREVER)
I installed PB exactly like in the INSTALL file.
What should I do? Two screenies:

<Removed the screenies>

Thanks.

Posted: Tue Apr 18, 2006 2:13 am
by LuCiFeR[SD]
Hey, we keep bumping into each other don't we LOL.

My advice would be to follow freds "not recomended installation method"

cause unfortunatey it is the most reliable method imho.

Posted: Tue Apr 18, 2006 5:53 am
by Straker
Looks like its not finding your compilers directory. Copy the following code into a text editor and save it as "pb.sh" in your home directory. Then set the permissions on it to execute.

Code: Select all

export PUREBASIC_HOME=/root/Desktop/PureBasic3
export PATH=$PUREBASIC_HOME/compilers:$PATH
purebasic
Then use this pb.sh shell script as your launcher for PB. If the GTK2 Editor works for you, you can replace the last line of the script with "purebasic_gtk2".

Good luck.

Posted: Tue Apr 18, 2006 6:54 am
by Fangbeast
Straker Offtopic I know but, can you still buy the serious "ufo" that your avatar is from? I only ever saw 2 episodes so many years ago and liked it.

Posted: Tue Apr 18, 2006 8:46 am
by Trond
Straker: When I type pbcompiler in any terminal it is found, but neither of the IDEs can find it.

Posted: Tue Apr 18, 2006 8:49 am
by Fred
Do you launch the IDE from the terminal as well ? As long your PUREBASIC_HOME envvar is set it should be ok. type: echo $ PUREBASIC_HOME to see if it's set (and it must be set with the 'export' before). You have to take a care of letter case differences on Linux as well.

Posted: Tue Apr 18, 2006 9:44 am
by Trond
Wow, it finds the compiler when I launch it from the terminal. Why is this?

Posted: Tue Apr 18, 2006 10:09 am
by Fred
The envvars are related to a terminal where you define them (for example if you define them in the .bashrc, it's only available for the 'bash' based terminals), that's why it's important to launch the compiler either from the terminal or from a shell script, like Straker did.

Posted: Tue Apr 18, 2006 11:17 am
by Trond
Can't I make them "global"?

Posted: Tue Apr 18, 2006 11:47 am
by Fred
You can may be try this (not tested): http://linux.derkeiler.com/Mailing-List ... /0072.html

Posted: Tue Apr 18, 2006 12:54 pm
by Inf0Byt3
Thank you for the quick answers! I was sleeping, I posted this at 4:30 AM local time :D. I'll try the methods now.

Posted: Tue Apr 18, 2006 1:25 pm
by freak
You should be able to do a little script with just the export statement and then the call to open the IDE.
This should work.

Posted: Tue Apr 18, 2006 1:30 pm
by Nik
Maybe Fred should deliver this script with PB for Linux and mention it in the install file I think Strakers script is right used something like that as well but now I somehow did manage to get it working withoout don't know what^^

Posted: Tue Apr 18, 2006 1:34 pm
by freak
We could also add a Preference option to set the path. The IDE can then set the variable for the
compiler before starting it.
Then you would only need to set the variables for console compiling.

I will see what can be done when i work on the linux ide again.

Posted: Tue Apr 18, 2006 2:08 pm
by Inf0Byt3
Thanks Straker! It worked perfectly. This is a must in the Linux Package. Maybe Fred can make a utility in PB. Just choose the path and it will generate a .sh file, something like a launcher...