It is currently Fri Nov 22, 2019 8:50 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: Any reliable Linux IDE for PB?
PostPosted: Sun Sep 02, 2018 3:04 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Apr 26, 2003 2:49 pm
Posts: 630
I am really fed up with the PB IDE crashing every 10 seconds, coding is impossible.
So i am looking for alternatives, so far i just googled and found these ones:
http://blog.agileactors.com/blog/2017/11/6/best-linux-code-editor-top-10-reviewed-and-compared

I am testing Geany right now.
I just need something that can be configured with the pbcompiler, syntax highlighting, maybe project support, just the basic things to get you coding in pb.
Does anyone have any experience and could post opinions and a little guide for a quick set up?
I know there are more people with this problem, maybe we could start trying that list and post the results.


Top
 Profile  
Reply with quote  
 Post subject: Re: Any reliable Linux IDE for PB?
PostPosted: Sun Sep 02, 2018 4:00 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Apr 26, 2003 2:49 pm
Posts: 630
I did quick test with Geany but failed:

If you go to Build > Set Build Commands
In the Execute commands fill:
In the 'Command' editbox: your_pb_compilers_path/pbcompiler -h
Launches the pbcompiler and shows the help.

But: your_pb_compilers_path/pbcompiler %d/%e.pb

Shows

******************************************
PureBasic 5.62 (Linux - x64)
******************************************

Loading external modules...
Error: Can't load OS libraries, please re-install PureBasic.


------------------
(program exited with code: 1)
Press return to continue

I tried setting the working directory to the purebasic/compilers/ and does not work,
any hints?


Top
 Profile  
Reply with quote  
 Post subject: Re: Any reliable Linux IDE for PB?
PostPosted: Sun Sep 02, 2018 5:40 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Apr 26, 2003 2:49 pm
Posts: 630
Every single program i try vs code, code blocks.. i keep getting the same error, what am i missing?
vs code seems the best.


Top
 Profile  
Reply with quote  
 Post subject: Re: Any reliable Linux IDE for PB?
PostPosted: Sun Sep 02, 2018 7:59 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Apr 26, 2003 2:49 pm
Posts: 630
I read the INSTALL file on pb dir and used method 2.
Now i can compile from any terminal and the exe launches normaly, but when i try to compile from those ide programs the pbcompiler launches, compiles the program but it is not executed, a file purebasic.out is created.
Any help?


Top
 Profile  
Reply with quote  
 Post subject: Re: Any reliable Linux IDE for PB?
PostPosted: Sun Sep 02, 2018 9:04 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Apr 26, 2003 2:49 pm
Posts: 630
Got it to work in code blocks

in geany only works with files in the local hd not in usb

vs code does not work

does not work means it compiles but does not launch the exe, maybe a permissions issue?

any help will be appreciated.


Top
 Profile  
Reply with quote  
 Post subject: Re: Any reliable Linux IDE for PB?
PostPosted: Sun Sep 02, 2018 11:13 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 2046
Location: Germany
I found this...
Link viewtopic.php?f=15&t=70470

It's easier:
- Open your "personal folder".
- Show hidden files
- edit the file".bashrc"

Add the following lines
Quote:
export PUREBASIC_HOME=[path to purebasic] - example: /home/yourname/Apps/purebasic-v562
export PATH=$PUREBASIC_HOME/compilers:$PATH

Save ".bashrc"

P.S. The pbcompiler need the envoirment variable "PUREBASIC_HOME"

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: Any reliable Linux IDE for PB?
PostPosted: Sun Sep 02, 2018 11:43 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Apr 26, 2003 2:49 pm
Posts: 630
I also did that, from any terminal it works and launches the pb exe using
pbcompiler file.pb

But with those programs when configuring the tools passing that command line they only compile the executable, and don't run it.


Top
 Profile  
Reply with quote  
 Post subject: Re: Any reliable Linux IDE for PB?
PostPosted: Mon Sep 03, 2018 2:00 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Feb 08, 2014 3:26 pm
Posts: 705
(Linux Slackware 14.2 - Purebasic 5.62 x64 in ~/Documents/purebasic)
Hello.pb
Code:
OpenConsole()
PrintN("Hello World")
Input()


$ PS1='\w \$ '
~/Documents $ purebasic/compilers/pbcompiler Hello.pb

******************************************
PureBasic 5.62 (Linux - x64)
******************************************

Loading external modules...
Error: Can't load OS libraries, please re-install PureBasic.


~/Documents $ export PUREBASIC_HOME=~/Documents/purebasic

~/Documents $ echo $PUREBASIC_HOME
/home/marc/Documents/purebasic

~/Documents $ purebasic/compilers/pbcompiler Hello.pb -e Hello

******************************************
PureBasic 5.62 (Linux - x64)
******************************************

Loading external modules...
Starting compilation...
Starting compilation...
4 lines processed.
Creating the executable.

- Feel the ..PuRe.. Power -

~/Documents $ file Hello
Hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, stripped

~/Documents $ ./Hello
Hello World

:arrow: You need to set PUREBASIC_HOME to purebasic root folder even if you compile from compiler folder

:D
Quote:
but it is not executed, a file purebasic.out is created
So it's works. purebasic.out is the name of the compiled file if you don't specify -e
The compiler (command line) does not launch executable after compiling.
You need to launch it yourself (./purebasic.out)
Remember that under unix, there is no PATH on the local directory (security). You must specify the full name or (./name) to launch a program.

:wink:

Edit: Hum, sometime executable is launch after compiling
Reset for testing

$ PS1='[\w \$] '
[~/Documents $] cd ~/Documents/
[~/Documents $] export PUREBASIC_HOME=
[~/Documents $] echo $PUREBASIC_HOME
(nothing)
[~/Documents $] purebasic/compilers/pbcompiler Hello.pb

******************************************
PureBasic 5.62 (Linux - x64)
******************************************

Loading external modules...
Error: Can't load OS libraries, please re-install PureBasic.

[~/Documents $] export PUREBASIC_HOME=~/Documents/purebasic
[~/Documents $] echo $PUREBASIC_HOME
/home/marc/Documents/purebasic
(yes)
[~/Documents $] purebasic/compilers/pbcompiler Hello.pb

******************************************
PureBasic 5.62 (Linux - x64)
******************************************

Loading external modules...
Starting compilation...
Starting compilation...
4 lines processed.
Creating the executable.

- Feel the ..PuRe.. Power -

Hello World

_________________
(English is not my native language, I use an online translator)
Windows 10 Family x64 + Linux (Slackware, Debian on Oracle VirtualBox 6.0) + Raspberry Pi


Top
 Profile  
Reply with quote  
 Post subject: Re: Any reliable Linux IDE for PB?
PostPosted: Mon Sep 03, 2018 3:38 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 2046
Location: Germany
Its work for me

A little trick to start extern debugger over small script

Create script "calldebugger.sh" and save to "purebasic/compilers" folder
Quote:
pbcompiler --debugger "$1" -e "$2"
pbdebugger $2


Program "RunCompiler" to start script..
Code:
Import "-no-pie"
EndImport

Global file.s, out.s, param.s
file = ProgramParameter(0)
If Bool(file)
  If Left(file,1) <> "/"
    file = GetCurrentDirectory() + file
  EndIf
Else
  file = OpenFileRequester("PB-File", "", "", 0)
EndIf
If Bool(file)
  out = #DQUOTE$ + GetPathPart(file) + GetFilePart(file, #PB_FileSystem_NoExtension) + #DQUOTE$
  file = #DQUOTE$ + file + #DQUOTE$
  param = "calldebugger.sh " + file + " " + out
  Compiler = RunProgram("bash", param, "", #PB_Program_Open | #PB_Program_Read)
  Output$ = ""
  If Compiler
    While ProgramRunning(Compiler)
      If AvailableProgramOutput(Compiler)
        Output$ + ReadProgramString(Compiler) + Chr(13)
      EndIf
      Delay(20)
    Wend
    Output$ + Chr(13) + Chr(13)
    Output$ + "Exitcode: " + Str(ProgramExitCode(Compiler))
   
    CloseProgram(Compiler) ; Schließt die Verbindung zum Programm
  EndIf
  MessageRequester("Output", Output$)
EndIf

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: Any reliable Linux IDE for PB?
PostPosted: Mon Sep 03, 2018 5:57 pm 
Offline
Enthusiast
Enthusiast

Joined: Mon Apr 10, 2017 6:17 pm
Posts: 289
Location: Germany
OpenSuse Leap 15 works fine with the Linux PB IDE and has all the features i need. I switched from *Ubuntu distros after trying to fix compatibility issues for a few days.

_________________
webpage


Top
 Profile  
Reply with quote  
 Post subject: Re: Any reliable Linux IDE for PB?
PostPosted: Mon Sep 03, 2018 7:56 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 2046
Location: Germany
Bitblazer wrote:
OpenSuse Leap 15 works fine with the Linux PB IDE and has all the features i need. I switched from *Ubuntu distros after trying to fix compatibility issues for a few days.
I'm running it under Ubuntu Gnome and Budgie.
What problems?

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: Any reliable Linux IDE for PB?
PostPosted: Mon Sep 03, 2018 9:00 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu May 21, 2009 6:56 pm
Posts: 526
Hi

I use OpenSuse Leap 42.3 and this is reasonable reliable. I do occasionally have the IDE vanish but not everyday. I am not sure what triggers this behavior because it will work fine for days and then all of a sudden it will vanish and I have to restart the IDE.

I have not had a chance to update to Opensuse 15 to see if it is better.

Simon


Top
 Profile  
Reply with quote  
 Post subject: Re: Any reliable Linux IDE for PB?
PostPosted: Tue Sep 04, 2018 12:06 am 
Offline
Enthusiast
Enthusiast

Joined: Sat Apr 26, 2003 2:49 pm
Posts: 630
Thanks for the help. It seems that visual studio code is a good option, finally i got it to work using "tasks", if anyone is interested i used:
Code:
{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "PB Build",
            "type": "shell",
            "command": "pbcompiler -d /fullpath/yourfile.pb"
        },

       {
            "label": "PB Run",
            "type": "shell",
            "command": "fullpath/purebasic.out"
        },

    ]
}

You can assign shortcuts to the tasks.
It's strange i had to use two tasks one for build and for run, gluing the commands with "&&" launches the executable twice!
More strange if you simply type 'pbcompiler file.pb' in the vs code terminal, builds and run the executable normally.


Top
 Profile  
Reply with quote  
 Post subject: Re: Any reliable Linux IDE for PB?
PostPosted: Tue Sep 04, 2018 6:23 am 
Offline
Enthusiast
Enthusiast

Joined: Sat Feb 08, 2014 3:26 pm
Posts: 705
This is what I indicated, sometimes the command line compiler (pbcompiler) runs the exe after compiling but not every time.

_________________
(English is not my native language, I use an online translator)
Windows 10 Family x64 + Linux (Slackware, Debian on Oracle VirtualBox 6.0) + Raspberry Pi


Top
 Profile  
Reply with quote  
 Post subject: Re: Any reliable Linux IDE for PB?
PostPosted: Wed Sep 05, 2018 9:14 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Apr 26, 2003 2:49 pm
Posts: 630
Finally i got visual studio code to compile and run saving all files with a single F5 key press, it took me two days LOL. i had to download the macros extension, because unbelievably there is not an option to save all before build.
I can post the steps if someone is interested.

With a lot of work this editor could be totally customized for PB.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye